Commit 0b4747c0 by zhangquan

去掉场景无缝衔接

1 parent 2a628e96
......@@ -40,6 +40,6 @@
</view>
</view>
<block wx:if="{{showAuth}}">
<authorize scopeType="writePhotosAlbum" buttonType="openSetting" bindfail="authFail" bindsuccess="authSuccess" show="{{showAuth}}"></authorize>
<authorize title="下载前需要获取您的‘添加到相册’权限,是否打开授权设置?" scopeType="writePhotosAlbum" buttonType="openSetting" bindfail="authFail" bindsuccess="authSuccess" show="{{showAuth}}"></authorize>
</block>
......@@ -59,5 +59,5 @@
</scroll-view>
</view>
<block wx:if="{{showAuth}}">
<authorize scopeType="writePhotosAlbum" buttonType="openSetting" bindfail="authFail" bindsuccess="authSuccess" show="{{showAuth}}"></authorize>
<authorize title="下载前需要获取您的‘添加到相册’权限,是否打开授权设置?" scopeType="writePhotosAlbum" buttonType="openSetting" bindfail="authFail" bindsuccess="authSuccess" show="{{showAuth}}"></authorize>
</block>
......@@ -10,7 +10,7 @@ Page({
data: {
senceData,
headerHeight: 0,
actNum: 3,
actNum: 0,
navStyle,
// 预估弹框
visible: false,
......@@ -46,14 +46,14 @@ Page({
let sceneCodeList = []
let senceData = [...this.data.senceData]
// let res = [
// {
// sceneCode: 'SC001',
// status: 1
// },
// {
// sceneCode: 'SC002',
// status: 1
// },
// {
// sceneCode: 'SC001',
// status: 0
// },
// {
// sceneCode: 'SC002',
// status: 1
// },
// {
// sceneCode: 'SC003',
// status: 1
......@@ -67,22 +67,17 @@ Page({
if(item.status==1) {
let sceneTarget = senceData.find(sitem => sitem.sceneCode == item.sceneCode)
sceneTarget.show = 1
}
})
senceData.forEach((item,index) => {
if(item.show==1) {
sceneCodeList.push(item.sceneCode)
}
})
let idx = sceneCodeList.findIndex(item => item=='SC004')
// senceData.forEach((item,index) => {
// if(item.show==1) {
// sceneCodeList.push(item.sceneCode)
// }
// })
let actNum = 0,currentId = 0;
if(sceneCodeList?.length){
if(idx>-1){
actNum = 3
currentId = idx
}else{
actNum = senceData.findIndex(item => item.sceneCode== sceneCodeList[0])
}
actNum = senceData.findIndex(item => item.sceneCode== sceneCodeList[0])
}
this.setData({
sceneCodeList,
......
......@@ -7,7 +7,7 @@
<block wx:if="{{sceneCodeList.length>0 && showPage}}">
<view style="padding-top: {{headerHeight}}px;">
<view class="header">
<swiper bindchange="changeSwiper" current="{{currentId}}" class="scene-wrap" circular="{{true}}" previousMargin="40rpx" nextMargin="40rpx">
<swiper bindchange="changeSwiper" current="{{currentId}}" class="scene-wrap" previousMargin="40rpx" nextMargin="40rpx">
<block wx:for="{{senceData}}" wx:key="index">
<swiper-item item-id="{{index}}" wx:if="{{item.show}}">
<image class="scene-img" src="{{IMGURL}}{{item.img}}"></image>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!