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