|
|
|
@ -54,11 +54,12 @@ |
|
|
|
|
<view class="text">{{ row.name }}</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<image v-if='productList.length == 0' mode="widthFix" style="margin-top: 30px;width: 90%;margin-left: 5%;" @click="jumpTyou" :src="imagewxUrl+imgadres4"></image> |
|
|
|
|
<!-- 赠券 --> |
|
|
|
|
<view style="width: 91%;margin-left: 5%;" @click="goGoodsList(1)"> |
|
|
|
|
<view style="width: 91%;margin-left: 5%;" v-if='productList.length != 0' @click="goGoodsList(1)"> |
|
|
|
|
<image class="mart30 width100" mode="widthFix" :src="imagewxUrl+imgadres"></image> |
|
|
|
|
</view> |
|
|
|
|
<swiper class="orange-content" style="border: 2px solid #ff5836;" :display-multiple-items="productListleg"> |
|
|
|
|
<swiper class="orange-content" style="border: 2px solid #ff5836;" v-if='productList.length != 0' :display-multiple-items="productListleg"> |
|
|
|
|
<swiper-item class="swiper-hed" v-for="pro in productList" :key="pro.id" @click="toGoods(pro.id)"> |
|
|
|
|
<view class="swiper-item" :data-id="pro.id"> |
|
|
|
|
<image class="img" :src="imageUrl+pro.couponImg" mode="aspectFit"> |
|
|
|
@ -68,13 +69,14 @@ |
|
|
|
|
</view> |
|
|
|
|
</swiper-item> |
|
|
|
|
</swiper> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<image v-if='goldproductList.length == 0' mode="widthFix" style="margin-top: 30px;width: 90%;margin-left: 5%;" @click="jumphuafei" :src="imagewxUrl+imgadres5"></image> |
|
|
|
|
<!-- 金币 --> |
|
|
|
|
<view style="width: 90%;margin-left: 5%;" @click="goGoodsList(2)"> |
|
|
|
|
<view style="width: 90%;margin-left: 5%;" v-if='goldproductList.length != 0' @click="goGoodsList(2)"> |
|
|
|
|
<image class="mart30 width100" mode="widthFix" :src="imagewxUrl+imgadres1"></image> |
|
|
|
|
</view> |
|
|
|
|
<!-- v-if="goldproductList&&goldproductList.length>0" --> |
|
|
|
|
<swiper class="orange-content" :display-multiple-items="goldproductListleg" next-margin="50rpx"> |
|
|
|
|
<swiper class="orange-content" :display-multiple-items="goldproductListleg" v-if='goldproductList.length != 0' next-margin="50rpx"> |
|
|
|
|
<swiper-item class="swiper-hed" v-for="(item,index) in goldproductList" :key="index" |
|
|
|
|
@click="toGoods(item.id)"> |
|
|
|
|
<view class="swiper-item" :data-id="item.id"> |
|
|
|
@ -226,6 +228,8 @@ |
|
|
|
|
imgadres1: 'jbhed.png', |
|
|
|
|
imgadres2: 'jt.png', |
|
|
|
|
imgadres3: '', |
|
|
|
|
imgadres4:'homet.png', |
|
|
|
|
imgadres5:'homeh.png', |
|
|
|
|
webUrl:'', |
|
|
|
|
// 轮播图片 |
|
|
|
|
swiperList: [{ |
|
|
|
@ -359,7 +363,7 @@ |
|
|
|
|
categoryCode: 'CMS_WX_APPLETS_HOME_ACTIVITY' |
|
|
|
|
} |
|
|
|
|
getCmsContent(params).then(res => { |
|
|
|
|
if (res.return_code == '000000' && res.return_data) { |
|
|
|
|
if (res.return_code == '000000' && res.return_data !='') { |
|
|
|
|
//弹窗首页广告 |
|
|
|
|
this.showPopup(); |
|
|
|
|
this.imgadres3 = res.return_data[0].imgData; |
|
|
|
@ -582,7 +586,7 @@ |
|
|
|
|
displayArea: 1 |
|
|
|
|
} |
|
|
|
|
getCouponList(params).then(res => { |
|
|
|
|
if (res.return_code == '000000') { |
|
|
|
|
if (res.return_code == '000000' && res.return_data.list) { |
|
|
|
|
this.productList = res.return_data.list; |
|
|
|
|
if (res.return_data.total > 4) { |
|
|
|
|
this.productListleg = 4; |
|
|
|
@ -601,7 +605,7 @@ |
|
|
|
|
displayArea: 2 |
|
|
|
|
} |
|
|
|
|
getCouponList(params).then(res => { |
|
|
|
|
if (res.return_code == '000000') { |
|
|
|
|
if (res.return_code == '000000' && res.return_data.list) { |
|
|
|
|
this.goldproductList = res.return_data.list; |
|
|
|
|
this.goldproductListleg = res.return_data.total; |
|
|
|
|
if (res.return_data.total > 4) { |
|
|
|
@ -692,6 +696,12 @@ |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
//跳转团油 |
|
|
|
|
jumpTyou(){ |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '/pages/goods/refuel/refuel' |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
//跳转菜单 |
|
|
|
|
toCategory(item) { |
|
|
|
|
if (item.name == '团油') { |
|
|
|
@ -712,14 +722,33 @@ |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
} else if (item.name == '电影票') { |
|
|
|
|
if (app.globalData.userInfo) { |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '/pages/tabBar/order/order?id=2' |
|
|
|
|
}) |
|
|
|
|
} else { |
|
|
|
|
|
|
|
|
|
if (!app.globalData.userInfo) { |
|
|
|
|
this.getuserinfos(); |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
if(!app.globalData.userInfo.phone){ |
|
|
|
|
this.isShowAuth = true; |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '/pages/tabBar/order/order?id=2' |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else if (item.name == '话费充值') { |
|
|
|
|
if (!app.globalData.userInfo) { |
|
|
|
|
this.getuserinfos(); |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
if(!app.globalData.userInfo.phone){ |
|
|
|
|
this.isShowAuth = true; |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '/pages/tabBar/order/order?id=3' |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: '暂未开通', |
|
|
|
@ -727,6 +756,21 @@ |
|
|
|
|
duration: 2000 |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
//单独跳转话费充值 |
|
|
|
|
jumphuafei(){ |
|
|
|
|
if (!app.globalData.userInfo) { |
|
|
|
|
this.getuserinfos(); |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
if(!app.globalData.userInfo.phone){ |
|
|
|
|
this.isShowAuth = true; |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '/pages/tabBar/order/order?id=3' |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|