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>
</view>
<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>
@ -88,7 +88,11 @@
} else if (item.position.indexOf("banner") !=-1) {
this.swiperList.push(item.uploadPath)
} 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) {
uni.navigateTo({
url: '/subpkg/list/list'
url: '/subpkg/list/list?isOpen='+item.isOpen
})
},
checkLogin() {

4
subpkg/list/list.vue

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

Loading…
Cancel
Save