|
|
@ -49,9 +49,9 @@ |
|
|
|
<view class="category-list"> |
|
|
|
<view class="category-list"> |
|
|
|
<view class="category" v-for="(row, index) in categoryList" :key="index" @tap="toCategory(row)"> |
|
|
|
<view class="category" v-for="(row, index) in categoryList" :key="index" @tap="toCategory(row)"> |
|
|
|
<view class="img"> |
|
|
|
<view class="img"> |
|
|
|
<image :src="imagewxUrl+row.img"></image> |
|
|
|
<image :src="imageUrl+row.imgData"></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="text">{{ row.name }}</view> |
|
|
|
<view class="text">{{ row.title }}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
@ -253,29 +253,8 @@ |
|
|
|
pageNum: 1, |
|
|
|
pageNum: 1, |
|
|
|
pageSize: 6, |
|
|
|
pageSize: 6, |
|
|
|
// 分类菜单 |
|
|
|
// 分类菜单 |
|
|
|
categoryList: [{ |
|
|
|
categoryList: [ |
|
|
|
id: 1, |
|
|
|
|
|
|
|
name: '在线加油', |
|
|
|
|
|
|
|
img: 'user/home1.png', |
|
|
|
|
|
|
|
src: '/pages/goods/refuel/refuel' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
id: 2, |
|
|
|
|
|
|
|
name: '电影票', |
|
|
|
|
|
|
|
img: 'user/home2.png', |
|
|
|
|
|
|
|
src: '/pages/tabBar/order/order' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
id: 3, |
|
|
|
|
|
|
|
name: '肯德基', |
|
|
|
|
|
|
|
img: 'user/home3.png', |
|
|
|
|
|
|
|
src: '/pages/tabBar/order/order' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
id: 4, |
|
|
|
|
|
|
|
name: '话费充值', |
|
|
|
|
|
|
|
img: 'user/home4.png' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
], |
|
|
|
], |
|
|
|
//切换状态 |
|
|
|
//切换状态 |
|
|
|
cpStuats: 1 |
|
|
|
cpStuats: 1 |
|
|
@ -299,7 +278,7 @@ |
|
|
|
this.getCouponListArea(); |
|
|
|
this.getCouponListArea(); |
|
|
|
this.getCouponListgold(); |
|
|
|
this.getCouponListgold(); |
|
|
|
this.getCmsContent(); |
|
|
|
this.getCmsContent(); |
|
|
|
// this.getCmsAactibity(); |
|
|
|
this.getCmsContentcmshome(); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
onLoad() { |
|
|
|
onLoad() { |
|
|
@ -348,7 +327,18 @@ |
|
|
|
// #endif |
|
|
|
// #endif |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
|
|
|
|
//获取首页菜单 |
|
|
|
|
|
|
|
getCmsContentcmshome() { |
|
|
|
|
|
|
|
let params = { |
|
|
|
|
|
|
|
regionId: app.globalData.cityId, |
|
|
|
|
|
|
|
categoryCode: 'CMS_HOME_NAV' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
getCmsContent(params).then(res => { |
|
|
|
|
|
|
|
if (res.return_code == '000000') { |
|
|
|
|
|
|
|
this.categoryList = res.return_data; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
//获取弹出或者弹窗 |
|
|
|
//获取弹出或者弹窗 |
|
|
|
getCmsContent() { |
|
|
|
getCmsContent() { |
|
|
|
let params = { |
|
|
|
let params = { |
|
|
@ -430,6 +420,7 @@ |
|
|
|
uni.hideLoading(); |
|
|
|
uni.hideLoading(); |
|
|
|
that.getCmsContent(); |
|
|
|
that.getCmsContent(); |
|
|
|
that.getCmsAactibity(); |
|
|
|
that.getCmsAactibity(); |
|
|
|
|
|
|
|
that.getCmsContentcmshome(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
fail() { |
|
|
|
fail() { |
|
|
|
uni.hideLoading() |
|
|
|
uni.hideLoading() |
|
|
@ -685,11 +676,11 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
//跳转菜单 |
|
|
|
//跳转菜单 |
|
|
|
toCategory(item) { |
|
|
|
toCategory(item) { |
|
|
|
if (item.name == '在线加油') { |
|
|
|
if (item.title == '在线加油') { |
|
|
|
uni.navigateTo({ |
|
|
|
uni.navigateTo({ |
|
|
|
url: item.src |
|
|
|
url: item.ext1 |
|
|
|
}) |
|
|
|
}) |
|
|
|
} else if (item.name == '肯德基') { |
|
|
|
} else if (item.title == '肯德基') { |
|
|
|
if (!app.globalData.userInfo) { |
|
|
|
if (!app.globalData.userInfo) { |
|
|
|
uni.navigateTo({ |
|
|
|
uni.navigateTo({ |
|
|
|
url:'../../userLogin/userLogin' |
|
|
|
url:'../../userLogin/userLogin' |
|
|
@ -705,7 +696,7 @@ |
|
|
|
uni.navigateTo({ |
|
|
|
uni.navigateTo({ |
|
|
|
url: '/pages/tabBar/order/order?id=1' |
|
|
|
url: '/pages/tabBar/order/order?id=1' |
|
|
|
}) |
|
|
|
}) |
|
|
|
} else if (item.name == '电影票') { |
|
|
|
} else if (item.title == '电影票') { |
|
|
|
if (!app.globalData.userInfo) { |
|
|
|
if (!app.globalData.userInfo) { |
|
|
|
uni.navigateTo({ |
|
|
|
uni.navigateTo({ |
|
|
|
url:'../../userLogin/userLogin' |
|
|
|
url:'../../userLogin/userLogin' |
|
|
@ -721,7 +712,7 @@ |
|
|
|
uni.navigateTo({ |
|
|
|
uni.navigateTo({ |
|
|
|
url: '/pages/tabBar/order/order?id=2' |
|
|
|
url: '/pages/tabBar/order/order?id=2' |
|
|
|
}) |
|
|
|
}) |
|
|
|
} else if (item.name == '话费充值') { |
|
|
|
} else if (item.title == '话费充值') { |
|
|
|
if (!app.globalData.userInfo) { |
|
|
|
if (!app.globalData.userInfo) { |
|
|
|
uni.navigateTo({ |
|
|
|
uni.navigateTo({ |
|
|
|
url:'../../userLogin/userLogin' |
|
|
|
url:'../../userLogin/userLogin' |
|
|
|