Feat:香小智对接
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<script setup>
|
||||
<script>
|
||||
import {getSeason, getSeasonPoster} from "@/api/product";
|
||||
import cookie from "@/utils/store/cookie";
|
||||
import {getUrlParam} from "@/utils/common.js";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -48,6 +49,42 @@ export default {
|
||||
this.current++;
|
||||
},
|
||||
|
||||
saveImg() {
|
||||
let that = this;
|
||||
|
||||
uni.getSetting({
|
||||
success: getRes => {
|
||||
if (getRes.authSetting["scope.writePhotosAlbum"]) {
|
||||
that.downloadImage();
|
||||
} else {
|
||||
uni.authorize({
|
||||
scope: "scope.writePhotosAlbum",
|
||||
success: () => {
|
||||
that.downloadImage();
|
||||
},
|
||||
fail: () => {
|
||||
console.log("authorize fail")
|
||||
uni.openSetting({
|
||||
success: openRes => {
|
||||
console.log(typeof openRes, openRes)
|
||||
},
|
||||
fail: () => {
|
||||
uni.showToast({
|
||||
title: "请在设置中打开对应权限",
|
||||
icon: "none"
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
console.log(err, 2)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
downloadImage() {
|
||||
let that = this;
|
||||
const randomID = () => Math.random().toString(36).substring(2);
|
||||
@@ -108,8 +145,8 @@ export default {
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
<view class="scroll-item section">
|
||||
<u-swiper :autoplay="false" :current="current" :list="info.swiper" height="100vh" indicator
|
||||
<view class="scroll-item">
|
||||
<u-swiper :autoplay="false" :current="current" :list="info.swiper" height="1200rpx" radius="0" indicator
|
||||
imgMode="scaleToFill"></u-swiper>
|
||||
<image class="icon-direction icon-left" :src="webUrl+'/20230911105736198247.png'" mode="scaleToFill"
|
||||
@click="tapLeft"/>
|
||||
@@ -118,8 +155,10 @@ export default {
|
||||
</view>
|
||||
|
||||
<view class="scroll-item">
|
||||
<scroll-view scroll-y class="product-list" :style="{backgroundImage:'url(' + info.productImage + ')'}">
|
||||
<image class="item" :src="item.image" mode="scaleToFill" @click="$global.navToGoods(item.id)"
|
||||
<image class="bg-img" :src="info.productImage" mode="widthFix"/>
|
||||
<!-- <scroll-view scroll-y class="product-list" :style="{backgroundImage:'url(' + info.productImage + ')'}">-->
|
||||
<scroll-view scroll-y class="product-list">
|
||||
<image class="item" :src="item.image" mode="widthFix" @click="$global.navToGoods(item.id)"
|
||||
v-for="(item,index) in info.products" :key="index"/>
|
||||
</scroll-view>
|
||||
</view>
|
||||
@@ -143,11 +182,6 @@ export default {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.section {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.img-top {
|
||||
width: 100vw;
|
||||
}
|
||||
@@ -171,6 +205,17 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
.box-share{
|
||||
.box-img{
|
||||
width: 500rpx;
|
||||
height: 889.5rpx;
|
||||
}
|
||||
.main-img{
|
||||
width: 500rpx;
|
||||
height: 889.5rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.icon-direction {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
@@ -187,15 +232,19 @@ export default {
|
||||
}
|
||||
|
||||
.product-list {
|
||||
padding: 200rpx 32rpx 0;
|
||||
background-size: 100vw auto;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
padding: 280rpx 32rpx 0;
|
||||
|
||||
.item {
|
||||
width: 686rpx;
|
||||
height: 400rpx;
|
||||
margin-bottom: 46rpx;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.bg-img {
|
||||
width: 100vw;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user