|
@@ -22,22 +22,7 @@ export default {
|
|
|
value: '沙市',
|
|
|
},
|
|
|
],
|
|
|
- list: [{
|
|
|
- image: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
|
|
|
- title: '昨夜星辰昨夜风,画楼西畔桂堂东',
|
|
|
- url:"/pages/buytickets/index?id=0cb4dd6c-ca33-4837-bd4a-7f01afb4d1a3"
|
|
|
- },
|
|
|
- {
|
|
|
- image: 'https://cdn.uviewui.com/uview/swiper/2.jpg',
|
|
|
- title: '身无彩凤双飞翼,心有灵犀一点通',
|
|
|
- url:"/pages/buytickets/index?id=0cb4dd6c-ca33-4837-bd4a-7f01afb4d1a3"
|
|
|
- },
|
|
|
- {
|
|
|
- image: 'https://cdn.uviewui.com/uview/swiper/3.jpg',
|
|
|
- title: '谁念西风独自凉,萧萧黄叶闭疏窗,沉思往事立残阳',
|
|
|
- url:"/pages/buytickets/index?id=0cb4dd6c-ca33-4837-bd4a-7f01afb4d1a3"
|
|
|
- }
|
|
|
- ],
|
|
|
+ list: [ ],
|
|
|
siteList:[
|
|
|
]
|
|
|
}
|
|
@@ -46,6 +31,20 @@ export default {
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
+ getBanner() {
|
|
|
+ API.getBannerInfo("1").then((res) => {
|
|
|
+ this.list=res.data;
|
|
|
+ for(var i in this.list){
|
|
|
+ var obj=this.list[i]
|
|
|
+ obj.url=obj.linkUrl
|
|
|
+ obj.image=obj.picUrl
|
|
|
+ obj.title=obj.name
|
|
|
+ }
|
|
|
+ this.carhelp.set("bannerList",this.list);
|
|
|
+ }).catch(error => {
|
|
|
+ this.$refs.common.alert( error);
|
|
|
+ })
|
|
|
+ },
|
|
|
bindPickerChange: function(e) {
|
|
|
// console.log('picker发送选择改变,携带值为', e.target.value)
|
|
|
this.index = e.target.value
|
|
@@ -127,8 +126,12 @@ export default {
|
|
|
}
|
|
|
},onReady(){
|
|
|
WxJsApi.getWxConfig(['scanQRCode','getLocation']);
|
|
|
-
|
|
|
+ var list=this.carhelp.get("bannerList");
|
|
|
+ if(list){
|
|
|
+ this.list=list;
|
|
|
+ }
|
|
|
this.getPoint();
|
|
|
+ this.getBanner();
|
|
|
//清空缓存
|
|
|
this.carhelp.set("form",{});
|
|
|
}
|