Commit 0b4747c0 by zhangquan

去掉场景无缝衔接

1 parent 2a628e96
...@@ -40,6 +40,6 @@ ...@@ -40,6 +40,6 @@
</view> </view>
</view> </view>
<block wx:if="{{showAuth}}"> <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> </block>
...@@ -59,5 +59,5 @@ ...@@ -59,5 +59,5 @@
</scroll-view> </scroll-view>
</view> </view>
<block wx:if="{{showAuth}}"> <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> </block>
...@@ -10,7 +10,7 @@ Page({ ...@@ -10,7 +10,7 @@ Page({
data: { data: {
senceData, senceData,
headerHeight: 0, headerHeight: 0,
actNum: 3, actNum: 0,
navStyle, navStyle,
// 预估弹框 // 预估弹框
visible: false, visible: false,
...@@ -46,14 +46,14 @@ Page({ ...@@ -46,14 +46,14 @@ Page({
let sceneCodeList = [] let sceneCodeList = []
let senceData = [...this.data.senceData] let senceData = [...this.data.senceData]
// let res = [ // let res = [
// { // {
// sceneCode: 'SC001', // sceneCode: 'SC001',
// status: 1 // status: 0
// }, // },
// { // {
// sceneCode: 'SC002', // sceneCode: 'SC002',
// status: 1 // status: 1
// }, // },
// { // {
// sceneCode: 'SC003', // sceneCode: 'SC003',
// status: 1 // status: 1
...@@ -67,22 +67,17 @@ Page({ ...@@ -67,22 +67,17 @@ Page({
if(item.status==1) { if(item.status==1) {
let sceneTarget = senceData.find(sitem => sitem.sceneCode == item.sceneCode) let sceneTarget = senceData.find(sitem => sitem.sceneCode == item.sceneCode)
sceneTarget.show = 1 sceneTarget.show = 1
}
})
senceData.forEach((item,index) => {
if(item.show==1) {
sceneCodeList.push(item.sceneCode) 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; let actNum = 0,currentId = 0;
if(sceneCodeList?.length){ if(sceneCodeList?.length){
if(idx>-1){ actNum = senceData.findIndex(item => item.sceneCode== sceneCodeList[0])
actNum = 3
currentId = idx
}else{
actNum = senceData.findIndex(item => item.sceneCode== sceneCodeList[0])
}
} }
this.setData({ this.setData({
sceneCodeList, sceneCodeList,
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<block wx:if="{{sceneCodeList.length>0 && showPage}}"> <block wx:if="{{sceneCodeList.length>0 && showPage}}">
<view style="padding-top: {{headerHeight}}px;"> <view style="padding-top: {{headerHeight}}px;">
<view class="header"> <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"> <block wx:for="{{senceData}}" wx:key="index">
<swiper-item item-id="{{index}}" wx:if="{{item.show}}"> <swiper-item item-id="{{index}}" wx:if="{{item.show}}">
<image class="scene-img" src="{{IMGURL}}{{item.img}}"></image> <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!