首页热门类目调整
This commit is contained in:
parent
36a322928b
commit
3918dc9fbf
|
|
@ -11,9 +11,9 @@ export default {
|
|||
title: '加载中'
|
||||
})
|
||||
// request 触发前拼接 url
|
||||
args.url = 'https://www.opsoul.com:8881' + args.url;
|
||||
// args.url = 'https://www.opsoul.com:8881' + args.url;
|
||||
// args.url = 'http://192.168.2.60:80' + args.url;
|
||||
// args.url = 'http://127.0.0.1:80' + args.url;
|
||||
args.url = 'http://127.0.0.1:80' + args.url;
|
||||
if (args.data && Object.prototype && Object.prototype.toString.call(args.data) === '[object Object]') {
|
||||
args.data.deptId = globalData.deptId;
|
||||
args.data.from = globalData.from;
|
||||
|
|
|
|||
|
|
@ -51,15 +51,23 @@
|
|||
</view>
|
||||
</view>
|
||||
<!-- 热门细类 -->
|
||||
<view class="cu-list grid no-border hot-sub-category" :class="['col-5']">
|
||||
<view class="cu-item" v-for="(item,index) in subCategories" :key="index" v-if="index < 5"
|
||||
<view class="cu-list grid no-border hot-sub-category" :class="['col-5']" :style="'padding-top: 10rpx'">
|
||||
<view class="cu-item align-center" v-for="(item,index) in hotServCategory" :key="index" v-if="tabCur === 0 && index < 5"
|
||||
@click="chooseCategory(item)">
|
||||
<view class="hot-sub-category-icon" :class="['cuIcon-' + item.cuIcon,'text-' + item.color]">
|
||||
<!-- <view class="cu-tag badge" v-if="item.badge!=0">
|
||||
<!-- <view class="hot-sub-category-icon" :class="['cuIcon-' + item.cuIcon,'text-' + item.color]">
|
||||
<view class="cu-tag badge" v-if="item.badge!=0">
|
||||
<block v-if="item.badge!=1">{{item.badge}}</block>
|
||||
</view> -->
|
||||
</view>
|
||||
<text>{{item.goodsCategoryName}}</text>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="cu-avatar round"
|
||||
:style="'width: 100rpx; height: 100rpx; background-image:url(' + item.cover + ');'"></view>
|
||||
<text>{{item.simpleGoodsCategoryName}}</text>
|
||||
</view>
|
||||
<view class="cu-item align-center" v-for="(item,index) in hotFittingsCategory" :key="index" v-if="tabCur === 1 && index < 5"
|
||||
@click="chooseCategory(item)">
|
||||
<view class="cu-avatar round"
|
||||
:style="'width: 100rpx; height: 100rpx; background-image:url(' + item.cover + ');'"></view>
|
||||
<text>{{item.simpleGoodsCategoryName}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 细类 -->
|
||||
|
|
@ -78,7 +86,7 @@
|
|||
<!-- <vertical-goods-card ref="discountGoodsCard" :goodsInfos="discountGoods.goodsInfos"
|
||||
:title="discountGoods.title"></vertical-goods-card> -->
|
||||
<!-- 热门服务 -->
|
||||
<vertical-card :list="hotCategory" :multiPicMode="true" title="大家都在买"></vertical-card>
|
||||
<vertical-card :list="hotServCategory" :multiPicMode="true" title="大家都在买"></vertical-card>
|
||||
</view>
|
||||
<!-- 当前城市服务列表 -->
|
||||
<view>
|
||||
|
|
@ -113,7 +121,8 @@
|
|||
tabCur: 0,
|
||||
categories: [],
|
||||
subCategories: [],
|
||||
hotCategory: [],
|
||||
hotServCategory: [],
|
||||
hotFittingsCategory: [],
|
||||
discountGoods: {},
|
||||
InputBottom: 0,
|
||||
searchInfo: {},
|
||||
|
|
@ -140,11 +149,16 @@
|
|||
// 加载区域信息
|
||||
await this.loadRegionList();
|
||||
await this.getCurAreaArr();
|
||||
// 加载热门类目
|
||||
let hotCategoryRes = await this.$request.getHotCategory({
|
||||
// 加载服务商城热门类目
|
||||
let hotServCategoryRes = await this.$request.getHotCategory({
|
||||
type: 1
|
||||
});
|
||||
this.hotCategory = hotCategoryRes.data;
|
||||
});
|
||||
this.hotServCategory = hotServCategoryRes.data;
|
||||
// 加载配件商城热门类目
|
||||
let hotFittingsCategoryRes = await this.$request.getHotCategory({
|
||||
type: 2
|
||||
});
|
||||
this.hotFittingsCategory = hotFittingsCategoryRes.data;
|
||||
// 加载品类
|
||||
this.loadCategoryList();
|
||||
// 加载当前定位城市的服务列表
|
||||
|
|
|
|||
Loading…
Reference in New Issue