Browse Source

场景定制

h5_css
蟑螂恶霸 3 years ago
committed by yanyan
parent
commit
b722414fc8
  1. 10
      pages/index/index.vue
  2. 4
      subpkg/list/list.vue

10
pages/index/index.vue

@ -15,7 +15,7 @@
</swiper> </swiper>
</view> </view>
<view class="itembox"> <view class="itembox">
<span v-for="(item,i) in sceneList" :key="i" @click="navClickHandler(item)"><img :src="item" class="scene-img"></image></span> <span v-for="(item,i) in sceneList" :key="i" @click="navClickHandler(item)"><img :src="item.uploadPath" class="scene-img"></image></span>
</view> </view>
</view> </view>
@ -88,7 +88,11 @@
} else if (item.position.indexOf("banner") !=-1) { } else if (item.position.indexOf("banner") !=-1) {
this.swiperList.push(item.uploadPath) this.swiperList.push(item.uploadPath)
} else if (item.position.indexOf("bottom") !=-1) { } else if (item.position.indexOf("bottom") !=-1) {
this.sceneList.push(item.uploadPath) const obj = {
uploadPath:item.uploadPath,
isOpen:item.status
}
this.sceneList.push(obj)
} }
}) })
@ -96,7 +100,7 @@
}, },
navClickHandler(item) { navClickHandler(item) {
uni.navigateTo({ uni.navigateTo({
url: '/subpkg/list/list' url: '/subpkg/list/list?isOpen='+item.isOpen
}) })
}, },
checkLogin() { checkLogin() {

4
subpkg/list/list.vue

@ -45,6 +45,7 @@
return { return {
queryObj:{ queryObj:{
name:"", name:"",
isOpen:0,
pageNum:1, pageNum:1,
pageSize:10 pageSize:10
}, },
@ -57,7 +58,8 @@
sceneList: [] sceneList: []
}; };
}, },
onLoad() { onLoad(options) {
this.queryObj.isOpen = options.isOpen
this.getSwiperList(); this.getSwiperList();
this.getSceneList() this.getSceneList()
}, },

Loading…
Cancel
Save