轮播图及视频调整;产品列表查询字段补充;选择品类第一级去掉全部选项
This commit is contained in:
parent
9e8e906ece
commit
0a2a568a12
|
|
@ -85,7 +85,9 @@ export default {
|
|||
}
|
||||
},
|
||||
async getCurArea() {
|
||||
try{
|
||||
let curLocation = uni.getStorageSync('curLocation');
|
||||
console.log(curLocation)
|
||||
if (curLocation && curLocation.updateTimes) {
|
||||
let curTimes = new Date().getTime();
|
||||
let deltaSeconds = curTimes - Number(curLocation.updateTimes);
|
||||
|
|
@ -101,6 +103,9 @@ export default {
|
|||
if (curLocation && curLocation.area) {
|
||||
return curLocation.area;
|
||||
}
|
||||
}catch(e){
|
||||
console.error(e)
|
||||
}
|
||||
return null;
|
||||
},
|
||||
async baiduGetLoacation(latitude, longitude) {
|
||||
|
|
|
|||
|
|
@ -16,19 +16,29 @@
|
|||
<text class="text-price text-red text-bold text-xl">{{product.goodsPrice}}</text>
|
||||
</view>
|
||||
<view v-else-if="product.goodsStandardList && product.goodsStandardList.length > 0">
|
||||
<view v-if="product.goodsStandardList[0].discountPrice" class="flex justify-start align-center">
|
||||
<view v-if="product.goodsStandardList[0].discountPrice">
|
||||
<text class="text-price text-red text-bold text-xl">{{product.goodsStandardList[0].discountPrice}}</text>
|
||||
<text class="text-del" v-if="product.goodsPrice">¥{{product.goodsStandardList[0].goodsPrice}}</text>
|
||||
<text class="margin-left-xs">/</text>
|
||||
<text>{{product.goodsUnit}}</text>
|
||||
</view>
|
||||
<view v-else-if="product.goodsStandardList[0].goodsPrice" class="flex justify-start align-center">
|
||||
<view v-else-if="product.goodsStandardList[0].goodsPrice">
|
||||
<text class="text-price text-red text-bold text-xl">{{product.goodsStandardList[0].goodsPrice}}</text>
|
||||
<text class="margin-left-xs">/</text>
|
||||
<text>{{product.goodsUnit}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else-if="product.payMoney" class="flex justify-start align-center">
|
||||
<text class="text-price text-red text-bold text-xl">{{product.payMoney}}</text>
|
||||
</view>
|
||||
<view class="padding-xs" v-if="product.type">
|
||||
<view class='cu-tag light bg-blue'>{{product.type}}</view>
|
||||
<view class="padding-xs">
|
||||
<view class='cu-tag light bg-blue'>
|
||||
<text v-if="product.parGoodsCategoryName">
|
||||
{{product.parGoodsCategoryName}}
|
||||
<text class="margin-lr-xs">/</text>
|
||||
</text>
|
||||
<text>{{product.deptGoodsCategoryName}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="ifShowServArea">
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@
|
|||
async loadData() {
|
||||
this.initBasicData();
|
||||
// 加载区域信息
|
||||
this.loadRegionList();
|
||||
await this.loadRegionList();
|
||||
await this.getCurAreaArr();
|
||||
// 加载热门类目
|
||||
let hotCategoryRes = await this.$request.getHotCategory({
|
||||
|
|
@ -169,7 +169,7 @@
|
|||
this.searchInfo.area = areaArr;
|
||||
} else {
|
||||
// 默认选中第一个
|
||||
this.searchInfo.area = [regionList[0], subRegionList[0], subSubRegionList[0]];
|
||||
this.searchInfo.area = [this.areaList[0][0], this.areaList[1][0], this.areaList[2][0]];
|
||||
}
|
||||
},
|
||||
async loadCategoryList() {
|
||||
|
|
|
|||
|
|
@ -184,19 +184,25 @@
|
|||
type: 1
|
||||
});
|
||||
typeList = typeList.data;
|
||||
// let col1Id = idArr ? idArr[0] : typeList[0].goodsCategoryId;
|
||||
// let subTypeList = await this.$request.listByStepWithAllNode({
|
||||
// goodsCategoryId: col1Id
|
||||
// });
|
||||
// subTypeList = subTypeList.data;
|
||||
// let col2Id = idArr ? idArr[1] : subTypeList[0].goodsCategoryId;
|
||||
// let subSubTypeList = await this.$request.listByStepWithAllNode({
|
||||
let subTypeList = [];
|
||||
let subSubTypeList = [];
|
||||
if (typeList && typeList.length) {
|
||||
let col1Id = typeList[0].goodsCategoryId;
|
||||
subTypeList = await this.$request.listByStepWithAllNode({
|
||||
goodsCategoryId: col1Id
|
||||
});
|
||||
subTypeList = subTypeList.data;
|
||||
}
|
||||
// if (subTypeList && subTypeList.length) {
|
||||
// let col2Id = subTypeList[0].goodsCategoryId;
|
||||
// subSubTypeList = await this.$request.listByStepWithAllNode({
|
||||
// goodsCategoryId: col2Id
|
||||
// });
|
||||
// subSubTypeList = subSubTypeList.data;
|
||||
// }
|
||||
this.categoryList.push(typeList);
|
||||
this.categoryList.push([]);
|
||||
this.categoryList.push([]);
|
||||
this.categoryList.push(subTypeList);
|
||||
this.categoryList.push(subSubTypeList);
|
||||
},
|
||||
async loadRegionList() {
|
||||
let regionList = await this.$request.areaListByStep();
|
||||
|
|
|
|||
|
|
@ -235,19 +235,25 @@
|
|||
type: 1
|
||||
});
|
||||
typeList = typeList.data;
|
||||
// let col1Id = idArr ? idArr[0] : typeList[0].goodsCategoryId;
|
||||
// let subTypeList = await this.$request.listByStepWithAllNode({
|
||||
// goodsCategoryId: col1Id
|
||||
// });
|
||||
// subTypeList = subTypeList.data;
|
||||
// let col2Id = idArr ? idArr[1] : subTypeList[0].goodsCategoryId;
|
||||
// let subSubTypeList = await this.$request.listByStepWithAllNode({
|
||||
let subTypeList = [];
|
||||
let subSubTypeList = [];
|
||||
if (typeList && typeList.length) {
|
||||
let col1Id = typeList[0].goodsCategoryId;
|
||||
subTypeList = await this.$request.listByStepWithAllNode({
|
||||
goodsCategoryId: col1Id
|
||||
});
|
||||
subTypeList = subTypeList.data;
|
||||
}
|
||||
// if (subTypeList && subTypeList.length) {
|
||||
// let col2Id = subTypeList[0].goodsCategoryId;
|
||||
// subSubTypeList = await this.$request.listByStepWithAllNode({
|
||||
// goodsCategoryId: col2Id
|
||||
// });
|
||||
// subSubTypeList = subSubTypeList.data;
|
||||
// }
|
||||
this.categoryList.push(typeList);
|
||||
this.categoryList.push([]);
|
||||
this.categoryList.push([]);
|
||||
this.categoryList.push(subTypeList);
|
||||
this.categoryList.push(subSubTypeList);
|
||||
},
|
||||
async loadRegionList() {
|
||||
let regionList = await this.$request.areaListByStep();
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
<swiper :class="changeSwiperHeight ? 'sm-screen-swiper' : 'sm-screen-swiper lg-screen-swiper'" @change="changeSwiper">
|
||||
<swiper-item v-if="productDetail.goodsVideoUrl">
|
||||
<video style="width: 100%; height: 100%;" id="productVideo" :src="productDetail.goodsVideoUrl" :controls="true" :autoplay="false"
|
||||
:show-center-play-btn="true" :show-fullscreen-btn="false" @click="clickSwiper($event, item, 0)"></video>
|
||||
:show-center-play-btn="true" :show-fullscreen-btn="true"></video>
|
||||
</swiper-item>
|
||||
<swiper-item v-for="(item,index) in swiperList" :key="item.goodsImgsId" @click="clickSwiper($event, item, 1)">
|
||||
<image style="width: 100%; height: 100%;" :src="item.imgUrl" mode="aspectFit"></image>
|
||||
|
|
@ -405,7 +405,7 @@
|
|||
}
|
||||
|
||||
.lg-screen-swiper {
|
||||
height: 130vw;
|
||||
height: 115vw;
|
||||
transition: all 0.5s ease-in-out;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Reference in New Issue