|
|
@ -14,7 +14,7 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<!-- 搜索框 --> |
|
|
|
<!-- 搜索框 --> |
|
|
|
<view class="input-box"> |
|
|
|
<view class="input-box"> |
|
|
|
<input placeholder="搜索卡券" placeholder-style="color:#c0c0c0;" @tap="toSearch()" /> |
|
|
|
<input placeholder="搜索门店" placeholder-style="color:#c0c0c0;" @tap="toSearch()" /> |
|
|
|
<view class="icon search"></view> |
|
|
|
<view class="icon search"></view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<!-- 右侧图标按钮 --> |
|
|
|
<!-- 右侧图标按钮 --> |
|
|
@ -54,12 +54,14 @@ |
|
|
|
<view class="text">{{ row.name }}</view> |
|
|
|
<view class="text">{{ row.name }}</view> |
|
|
|
</view> |
|
|
|
</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> |
|
|
|
<image mode="widthFix" style="margin-top: 30px;width: 90%;margin-left: 5%;" |
|
|
|
|
|
|
|
@click="jumpTyou" :src="imagewxUrl+imgadres4"></image> |
|
|
|
<!-- 赠券 --> |
|
|
|
<!-- 赠券 --> |
|
|
|
<view style="width: 91%;margin-left: 5%;" v-if='productList.length != 0' @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> |
|
|
|
<image class="mart30 width100" mode="widthFix" :src="imagewxUrl+imgadres"></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<swiper class="orange-content" style="border: 2px solid #ff5836;" v-if='productList.length != 0' :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)"> |
|
|
|
<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"> |
|
|
|
<view class="swiper-item" :data-id="pro.id"> |
|
|
|
<image class="img" :src="imageUrl+pro.couponImg" mode="aspectFit"> |
|
|
|
<image class="img" :src="imageUrl+pro.couponImg" mode="aspectFit"> |
|
|
@ -70,13 +72,15 @@ |
|
|
|
</swiper-item> |
|
|
|
</swiper-item> |
|
|
|
</swiper> |
|
|
|
</swiper> |
|
|
|
|
|
|
|
|
|
|
|
<image v-if='goldproductList.length == 0' mode="widthFix" style="margin-top: 30px;width: 90%;margin-left: 5%;" @click="jumphuafei" :src="imagewxUrl+imgadres5"></image> |
|
|
|
<image mode="widthFix" style="margin-top: 30px;width: 90%;margin-left: 5%;" |
|
|
|
|
|
|
|
@click="jumphuafei" :src="imagewxUrl+imgadres5"></image> |
|
|
|
<!-- 金币 --> |
|
|
|
<!-- 金币 --> |
|
|
|
<view style="width: 90%;margin-left: 5%;" v-if='goldproductList.length != 0' @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> |
|
|
|
<image class="mart30 width100" mode="widthFix" :src="imagewxUrl+imgadres1"></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<!-- v-if="goldproductList&&goldproductList.length>0" --> |
|
|
|
<!-- v-if="goldproductList&&goldproductList.length>0" --> |
|
|
|
<swiper class="orange-content" :display-multiple-items="goldproductListleg" v-if='goldproductList.length != 0' 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" |
|
|
|
<swiper-item class="swiper-hed" v-for="(item,index) in goldproductList" :key="index" |
|
|
|
@click="toGoods(item.id)"> |
|
|
|
@click="toGoods(item.id)"> |
|
|
|
<view class="swiper-item" :data-id="item.id"> |
|
|
|
<view class="swiper-item" :data-id="item.id"> |
|
|
@ -180,8 +184,7 @@ |
|
|
|
<view class='bottom flex'> |
|
|
|
<view class='bottom flex'> |
|
|
|
<view class='item' @click='close'>随便逛逛</view> |
|
|
|
<view class='item' @click='close'>随便逛逛</view> |
|
|
|
<!-- #ifdef MP --> |
|
|
|
<!-- #ifdef MP --> |
|
|
|
<button class='item grant' open-type="getPhoneNumber" |
|
|
|
<button class='item grant' open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">去授权</button> |
|
|
|
@getphonenumber="getPhoneNumber">去授权</button> |
|
|
|
|
|
|
|
<!-- #endif --> |
|
|
|
<!-- #endif --> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -228,9 +231,9 @@ |
|
|
|
imgadres1: 'jbhed.png', |
|
|
|
imgadres1: 'jbhed.png', |
|
|
|
imgadres2: 'jt.png', |
|
|
|
imgadres2: 'jt.png', |
|
|
|
imgadres3: '', |
|
|
|
imgadres3: '', |
|
|
|
imgadres4:'homet.png', |
|
|
|
imgadres4: 'homet.png', |
|
|
|
imgadres5:'homeh.png', |
|
|
|
imgadres5: 'homeh.png', |
|
|
|
webUrl:'', |
|
|
|
webUrl: '', |
|
|
|
// 轮播图片 |
|
|
|
// 轮播图片 |
|
|
|
swiperList: [{ |
|
|
|
swiperList: [{ |
|
|
|
id: 1, |
|
|
|
id: 1, |
|
|
@ -297,6 +300,8 @@ |
|
|
|
this.city = app.globalData.cityName; |
|
|
|
this.city = app.globalData.cityName; |
|
|
|
this.getCouponListArea(); |
|
|
|
this.getCouponListArea(); |
|
|
|
this.getCouponListgold(); |
|
|
|
this.getCouponListgold(); |
|
|
|
|
|
|
|
this.getCmsContent(); |
|
|
|
|
|
|
|
this.getCmsAactibity(); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
onLoad() { |
|
|
|
onLoad() { |
|
|
@ -363,8 +368,8 @@ |
|
|
|
categoryCode: 'CMS_WX_APPLETS_HOME_ACTIVITY' |
|
|
|
categoryCode: 'CMS_WX_APPLETS_HOME_ACTIVITY' |
|
|
|
} |
|
|
|
} |
|
|
|
getCmsContent(params).then(res => { |
|
|
|
getCmsContent(params).then(res => { |
|
|
|
if (res.return_code == '000000' && res.return_data !='') { |
|
|
|
if (res.return_code == '000000' && res.return_data != '') { |
|
|
|
//弹窗首页广告 |
|
|
|
//弹窗首页广告 |
|
|
|
this.showPopup(); |
|
|
|
this.showPopup(); |
|
|
|
this.imgadres3 = res.return_data[0].imgData; |
|
|
|
this.imgadres3 = res.return_data[0].imgData; |
|
|
|
this.webUrl = res.return_data[0].ext1; |
|
|
|
this.webUrl = res.return_data[0].ext1; |
|
|
@ -376,7 +381,7 @@ |
|
|
|
this.$refs.popup.show(); |
|
|
|
this.$refs.popup.show(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
close() { |
|
|
|
close() { |
|
|
|
this.isShowAuth = false; |
|
|
|
this.isShowAuth = false; |
|
|
|
}, |
|
|
|
}, |
|
|
|
//关闭弹窗 |
|
|
|
//关闭弹窗 |
|
|
|
closePopup() { |
|
|
|
closePopup() { |
|
|
@ -412,9 +417,9 @@ |
|
|
|
/** |
|
|
|
/** |
|
|
|
* 跳转外链 |
|
|
|
* 跳转外链 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
jumpWeb(){ |
|
|
|
jumpWeb() { |
|
|
|
uni.navigateTo({ |
|
|
|
uni.navigateTo({ |
|
|
|
url: '../order/webUrl/webUrl?url='+ this.webUrl |
|
|
|
url: '../order/webUrl/webUrl?url=' + this.webUrl |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.closePopup(); |
|
|
|
this.closePopup(); |
|
|
|
}, |
|
|
|
}, |
|
|
@ -438,17 +443,17 @@ |
|
|
|
',' + res.longitude + '&key=7UMBZ-HFEHX-HSD4Q-Z3QY6-OQKN7-2QBDB', |
|
|
|
',' + res.longitude + '&key=7UMBZ-HFEHX-HSD4Q-Z3QY6-OQKN7-2QBDB', |
|
|
|
data: {}, |
|
|
|
data: {}, |
|
|
|
success: function(res) { |
|
|
|
success: function(res) { |
|
|
|
that.city = res.data.result.address_component.city.replace(/市/g, |
|
|
|
// that.city = res.data.result.address_component.city.replace(/市/g, |
|
|
|
''); |
|
|
|
// ''); |
|
|
|
app.globalData.cityName = res.data.result.address_component.city |
|
|
|
that.city = res.data.result.address_component.province; |
|
|
|
.replace(/市/g, ''); |
|
|
|
app.globalData.cityName = res.data.result.address_component.province; |
|
|
|
app.globalData.cityId = res.data.result.ad_info.adcode; |
|
|
|
app.globalData.cityId = res.data.result.ad_info.adcode; |
|
|
|
// app.globalData.cityId = '500100'; |
|
|
|
// app.globalData.cityId = '500100'; |
|
|
|
that.getCouponListArea(); |
|
|
|
that.getCouponListArea(); |
|
|
|
that.getCouponListgold(); |
|
|
|
that.getCouponListgold(); |
|
|
|
uni.hideLoading(); |
|
|
|
uni.hideLoading(); |
|
|
|
that.getCmsContent(); |
|
|
|
that.getCmsContent(); |
|
|
|
that.getCmsAactibity() |
|
|
|
that.getCmsAactibity(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
fail() { |
|
|
|
fail() { |
|
|
|
uni.hideLoading() |
|
|
|
uni.hideLoading() |
|
|
@ -697,7 +702,7 @@ |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
//跳转团油 |
|
|
|
//跳转团油 |
|
|
|
jumpTyou(){ |
|
|
|
jumpTyou() { |
|
|
|
uni.navigateTo({ |
|
|
|
uni.navigateTo({ |
|
|
|
url: '/pages/goods/refuel/refuel' |
|
|
|
url: '/pages/goods/refuel/refuel' |
|
|
|
}) |
|
|
|
}) |
|
|
@ -713,7 +718,7 @@ |
|
|
|
this.getuserinfos(); |
|
|
|
this.getuserinfos(); |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
if(!app.globalData.userInfo.phone){ |
|
|
|
if (!app.globalData.userInfo.phone) { |
|
|
|
this.isShowAuth = true; |
|
|
|
this.isShowAuth = true; |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
@ -727,7 +732,7 @@ |
|
|
|
this.getuserinfos(); |
|
|
|
this.getuserinfos(); |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
if(!app.globalData.userInfo.phone){ |
|
|
|
if (!app.globalData.userInfo.phone) { |
|
|
|
this.isShowAuth = true; |
|
|
|
this.isShowAuth = true; |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
@ -741,7 +746,7 @@ |
|
|
|
this.getuserinfos(); |
|
|
|
this.getuserinfos(); |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
if(!app.globalData.userInfo.phone){ |
|
|
|
if (!app.globalData.userInfo.phone) { |
|
|
|
this.isShowAuth = true; |
|
|
|
this.isShowAuth = true; |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
@ -758,12 +763,12 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
//单独跳转话费充值 |
|
|
|
//单独跳转话费充值 |
|
|
|
jumphuafei(){ |
|
|
|
jumphuafei() { |
|
|
|
if (!app.globalData.userInfo) { |
|
|
|
if (!app.globalData.userInfo) { |
|
|
|
this.getuserinfos(); |
|
|
|
this.getuserinfos(); |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
if(!app.globalData.userInfo.phone){ |
|
|
|
if (!app.globalData.userInfo.phone) { |
|
|
|
this.isShowAuth = true; |
|
|
|
this.isShowAuth = true; |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|