|
|
|
@ -35,8 +35,8 @@ |
|
|
|
|
<view v-for="(item,index) in homeCateList" :key="index"> |
|
|
|
|
<view class="height90 backcorltop mart50" v-if="item.type == 1"> |
|
|
|
|
<view class="category-list"> |
|
|
|
|
<view class="category" style="width: 25%;" v-for="(row, index) in item.childCategory" :key="index" |
|
|
|
|
@tap="toCategory(row)"> |
|
|
|
|
<view class="category" style="width: 25%;" v-for="(row, indexs) in item.childCategory" :key="indexs" |
|
|
|
|
@click="toCategory(row)"> |
|
|
|
|
<view class="img"> |
|
|
|
|
<image :src="imageUrl+row.imgData"></image> |
|
|
|
|
</view> |
|
|
|
@ -49,8 +49,8 @@ |
|
|
|
|
|
|
|
|
|
<!-- 顶部菜单 --> |
|
|
|
|
<view class="category-list backcorfff" style="margin-top: -5px;" v-if="item.type == 7"> |
|
|
|
|
<view class="category" style="width: 20%;" v-for="(row, index) in item.childCategory" :key="index" |
|
|
|
|
@tap="toCategory(row)"> |
|
|
|
|
<view class="category" style="width: 20%;" v-for="(row, indexc) in item.childCategory" :key="indexc" |
|
|
|
|
@click="toCategory(row)"> |
|
|
|
|
<view class="img"> |
|
|
|
|
<image :src="imageUrl+row.imgData"></image> |
|
|
|
|
</view> |
|
|
|
@ -89,7 +89,8 @@ |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<!-- 加油专区 ,天天好券--> |
|
|
|
|
<view class="width90 mart20 alijusstart" v-if="item.type == 6 || item.type == 9" @click="goGoodsList(item.jumpUrl)"> |
|
|
|
|
<view class="width90 mart20 alijusstart" v-if="item.type == 6 || item.type == 9" |
|
|
|
|
@click="goGoodsList(item.jumpUrl)"> |
|
|
|
|
<view class="width70 font18 fcor333"> |
|
|
|
|
{{item.name}} |
|
|
|
|
</view> |
|
|
|
@ -108,7 +109,8 @@ |
|
|
|
|
<view class="backcorfff spcarea" v-for="(goods,index) in item.childDate" :key="index"> |
|
|
|
|
<image mode="widthFix" class="width100" :src="imageUrl+goods.listImg"></image> |
|
|
|
|
<view class="width96 fcor333 font15 fontwig6">{{goods.title}}</view> |
|
|
|
|
<view class="width96 fcor999 font11" v-if="goods.effectiveTiem">{{goods.effectiveTiem | timeFormat('yyyy-mm-dd hh:mm:ss')}} |
|
|
|
|
<view class="width96 fcor999 font11" v-if="goods.effectiveTiem"> |
|
|
|
|
{{goods.effectiveTiem | timeFormat('yyyy-mm-dd hh:mm:ss')}} |
|
|
|
|
</view> |
|
|
|
|
<view class="width94 fcoreb5 font15 fontwig6">¥{{goods.price}}</view> |
|
|
|
|
</view> |
|
|
|
@ -120,11 +122,15 @@ |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<image class="width90 mart10" mode="widthFix" v-if="item.type == 5" |
|
|
|
|
:src="imageUrl+item.childCategory[0].imgData" @click="goGoodsList(imageUrl+item.childCategory[0].jumpUrl)"></image> |
|
|
|
|
:src="imageUrl+item.childCategory[0].imgData" |
|
|
|
|
@click="goGoodsList(item.childCategory[0].jumpUrl)"></image> |
|
|
|
|
<view class="width90 alijusstart mart10" v-if="item.type == 5"> |
|
|
|
|
<image :src="imageUrl+item.childCategory[1].imgData" mode="widthFix" class="width31" @click="goGoodsList(imageUrl+item.childCategory[1].jumpUrl)"></image> |
|
|
|
|
<image :src="imageUrl+item.childCategory[2].imgData" mode="widthFix" class="width31" @click="goGoodsList(imageUrl+item.childCategory[2].jumpUrl)"></image> |
|
|
|
|
<image :src="imageUrl+item.childCategory[3].imgData" mode="widthFix" class="width31" @click="goGoodsList(imageUrl+item.childCategory[3].jumpUrl)"></image> |
|
|
|
|
<image :src="imageUrl+item.childCategory[1].imgData" mode="widthFix" class="width31" |
|
|
|
|
@click="goGoodsList(item.childCategory[1].jumpUrl)"></image> |
|
|
|
|
<image :src="imageUrl+item.childCategory[2].imgData" mode="widthFix" class="width31" |
|
|
|
|
@click="goGoodsList(item.childCategory[2].jumpUrl)"></image> |
|
|
|
|
<image :src="imageUrl+item.childCategory[3].imgData" mode="widthFix" class="width31" |
|
|
|
|
@click="goGoodsList(item.childCategory[3].jumpUrl)"></image> |
|
|
|
|
</view> |
|
|
|
|
<!-- 天天好券 --> |
|
|
|
|
<!-- <view class="width90 mart20 alijusstart" v-if="item.type == 6"> |
|
|
|
@ -213,18 +219,10 @@ |
|
|
|
|
img: 'banner3.png' |
|
|
|
|
} |
|
|
|
|
], |
|
|
|
|
//猜你喜欢列表 |
|
|
|
|
productList: [], |
|
|
|
|
productListleg: '', |
|
|
|
|
goldproductList: [], |
|
|
|
|
goldproductListleg: '', |
|
|
|
|
unioncardproductList: [], |
|
|
|
|
unioncardproductListleg: '', |
|
|
|
|
loadingText: '正在加载...', |
|
|
|
|
pageNum: 1, |
|
|
|
|
pageSize: 6, |
|
|
|
|
// 分类菜单 |
|
|
|
|
categoryList: [], |
|
|
|
|
homeCateList: [], |
|
|
|
|
//切换状态 |
|
|
|
|
cpStuats: 1, |
|
|
|
@ -236,11 +234,6 @@ |
|
|
|
|
onShow() { |
|
|
|
|
if (app.globalData.cityName != '') { |
|
|
|
|
this.city = app.globalData.qianzhuCityName; |
|
|
|
|
// this.getCouponListArea(); |
|
|
|
|
// this.getCouponListgold(); |
|
|
|
|
// this.getunioncardCouponListgold(); |
|
|
|
|
// this.getCmsContent(); |
|
|
|
|
// this.getCmsContentcmshome(); |
|
|
|
|
this.getCmsContentcmsContent(); |
|
|
|
|
// if (app.globalData.userInfo.phone) { |
|
|
|
|
// this.getMembershipLevel(); |
|
|
|
@ -336,12 +329,7 @@ |
|
|
|
|
that.city = '重庆市'; |
|
|
|
|
app.globalData.cityName = '重庆市'; |
|
|
|
|
app.globalData.cityId = '500000'; |
|
|
|
|
// that.getCouponListArea(); |
|
|
|
|
// that.getCouponListgold(); |
|
|
|
|
// that.getunioncardCouponListgold(); |
|
|
|
|
// that.getCmsContent(); |
|
|
|
|
// that.getCmsAactibity(); |
|
|
|
|
// that.getCmsContentcmshome(); |
|
|
|
|
that.getCmsContentcmsContent(); |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
@ -405,49 +393,19 @@ |
|
|
|
|
} |
|
|
|
|
getMembershipLevel(params).then(res => {}); |
|
|
|
|
}, |
|
|
|
|
//获取首页菜单 |
|
|
|
|
getCmsContentcmshome() { |
|
|
|
|
let code; |
|
|
|
|
// #ifdef H5 |
|
|
|
|
code = 'CMS_H5_FAST' |
|
|
|
|
// #endif |
|
|
|
|
// #ifdef MP |
|
|
|
|
code = 'CMS_HOME_NAV' |
|
|
|
|
// #endif |
|
|
|
|
let params = { |
|
|
|
|
regionId: app.globalData.cityId, |
|
|
|
|
categoryCode: code |
|
|
|
|
} |
|
|
|
|
getCmsContent(params).then(res => { |
|
|
|
|
if (res.return_code == '000000') { |
|
|
|
|
this.categoryList = res.return_data; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
//获取弹出或者弹窗 |
|
|
|
|
getCmsContent() { |
|
|
|
|
let params = { |
|
|
|
|
regionId: app.globalData.cityId, |
|
|
|
|
categoryCode: 'CMS_WX_APPLETS_HOME_SLIDESHOW' |
|
|
|
|
} |
|
|
|
|
getCmsContent(params).then(res => { |
|
|
|
|
if (res.return_code == '000000') { |
|
|
|
|
this.swiperList = res.return_data; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
//弹窗 |
|
|
|
|
getCmsAactibity() { |
|
|
|
|
let code; |
|
|
|
|
// #ifdef H5 |
|
|
|
|
code = 'CMS_H5_ALERT' |
|
|
|
|
code = '2' |
|
|
|
|
// #endif |
|
|
|
|
// #ifdef MP |
|
|
|
|
code = 'CMS_WX_APPLETS_HOME_ACTIVITY' |
|
|
|
|
code = '1' |
|
|
|
|
// #endif |
|
|
|
|
let params = { |
|
|
|
|
regionId: app.globalData.cityId, |
|
|
|
|
categoryCode: code |
|
|
|
|
companyId: app.globalData.companyId, |
|
|
|
|
platform: code, |
|
|
|
|
categoryCode: '' |
|
|
|
|
} |
|
|
|
|
getCmsContent(params).then(res => { |
|
|
|
|
if (res.return_code == '000000' && res.return_data != '') { |
|
|
|
@ -570,12 +528,7 @@ |
|
|
|
|
}) |
|
|
|
|
// app.globalData.cityId = '500103'; |
|
|
|
|
if (res.return_data.regionId) { |
|
|
|
|
// that.getCouponListArea(); |
|
|
|
|
// that.getCouponListgold(); |
|
|
|
|
// that.getunioncardCouponListgold(); |
|
|
|
|
// that.getCmsContent(); |
|
|
|
|
// that.getCmsAactibity(); |
|
|
|
|
// that.getCmsContentcmshome(); |
|
|
|
|
that.getCmsContentcmsContent(); |
|
|
|
|
} |
|
|
|
|
uni.getStorage({ |
|
|
|
@ -700,71 +653,6 @@ |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
//赠券卡券列表 |
|
|
|
|
getCouponListArea() { |
|
|
|
|
let params = { |
|
|
|
|
regionId: app.globalData.cityId, |
|
|
|
|
pageNum: this.pageNum, |
|
|
|
|
pageSize: this.pageSize, |
|
|
|
|
displayArea: 1 |
|
|
|
|
} |
|
|
|
|
getCouponList(params).then(res => { |
|
|
|
|
if (res.return_code == '000000' && res.return_data.list) { |
|
|
|
|
this.productList = res.return_data.list; |
|
|
|
|
if (res.return_data.total > 4) { |
|
|
|
|
this.productListleg = 4; |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
this.productListleg = res.return_data.total; |
|
|
|
|
} else { |
|
|
|
|
this.productList = []; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
//积分卡券列表 |
|
|
|
|
getCouponListgold() { |
|
|
|
|
let params = { |
|
|
|
|
regionId: app.globalData.cityId, |
|
|
|
|
pageNum: this.pageNum, |
|
|
|
|
pageSize: this.pageSize, |
|
|
|
|
displayArea: 2 |
|
|
|
|
} |
|
|
|
|
getCouponList(params).then(res => { |
|
|
|
|
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) { |
|
|
|
|
this.goldproductListleg = 4; |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
this.goldproductListleg = res.return_data.total; |
|
|
|
|
} else { |
|
|
|
|
this.productList = []; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
//工会卡卡券列表 |
|
|
|
|
getunioncardCouponListgold() { |
|
|
|
|
let params = { |
|
|
|
|
regionId: app.globalData.cityId, |
|
|
|
|
pageNum: this.pageNum, |
|
|
|
|
pageSize: this.pageSize, |
|
|
|
|
displayArea: 5 |
|
|
|
|
} |
|
|
|
|
getCouponList(params).then(res => { |
|
|
|
|
if (res.return_code == '000000' && res.return_data.list) { |
|
|
|
|
this.unioncardproductList = res.return_data.list; |
|
|
|
|
this.unioncardproductListleg = res.return_data.total; |
|
|
|
|
if (res.return_data.total > 4) { |
|
|
|
|
this.unioncardproductListleg = 4; |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
this.unioncardproductListleg = res.return_data.total; |
|
|
|
|
} else { |
|
|
|
|
this.unioncardproductList = []; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
//轮播图指示器 |
|
|
|
|
swiperChange(event) { |
|
|
|
|
this.currentSwiper = event.detail.current; |
|
|
|
@ -834,7 +722,6 @@ |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
//跳转菜单 |
|
|
|
|
toCategory(item) { |
|
|
|
|
uni.navigateTo({ |
|
|
|
@ -850,13 +737,7 @@ |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
//单独跳转话费充值 |
|
|
|
|
jumphuafei(item) { |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: item.ext1 |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
//调整商品列表 |
|
|
|
|
//跳转商品列表 |
|
|
|
|
goGoodsList(item) { |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: item |
|
|
|
|