商品详情中的店铺及店铺详情链接开发
This commit is contained in:
parent
a87b95dc0c
commit
38b2438ff7
|
|
@ -420,4 +420,12 @@ export default {
|
||||||
})
|
})
|
||||||
return res[1].data;
|
return res[1].data;
|
||||||
},
|
},
|
||||||
|
async getWorkerAllDetailById(params = {}) {
|
||||||
|
let res = await uni.request({
|
||||||
|
url: '/worker/getDetailById',
|
||||||
|
method: 'POST',
|
||||||
|
data: params
|
||||||
|
})
|
||||||
|
return res[1].data;
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -131,18 +131,19 @@
|
||||||
<view id="pageAnchor1" class="margin-lr-sm margin-top-sm bg-white">
|
<view id="pageAnchor1" class="margin-lr-sm margin-top-sm bg-white">
|
||||||
<view class="flex justify-between align-end padding">
|
<view class="flex justify-between align-end padding">
|
||||||
<view class="text-black text-lg">商品评价</view>
|
<view class="text-black text-lg">商品评价</view>
|
||||||
<view class="text-red text-sm">好评率95%<text class="text-bold text-gray cuIcon-right"></text></view>
|
<!-- <view class="text-red text-sm">好评率95%<text class="text-bold text-gray cuIcon-right"></text></view> -->
|
||||||
</view>
|
</view>
|
||||||
<comments-card :reviewers="reviewers"></comments-card>
|
<view class="text-center padding-bottom">开发中,敬请期待</view>
|
||||||
|
<!-- <comments-card :reviewers="reviewers"></comments-card> -->
|
||||||
</view>
|
</view>
|
||||||
<!-- 店家链接 -->
|
<!-- 店家链接 -->
|
||||||
<view class="margin-lr-sm margin-top-sm padding bg-white">
|
<view class="margin-lr-sm margin-top-sm padding bg-white">
|
||||||
<view class="flex justify-between align-center">
|
<view class="flex justify-between align-center">
|
||||||
<view class="flex justify-start align-center">
|
<view class="flex justify-start align-center">
|
||||||
<view class="cu-avatar round" :style="'background-image:url(' + shopInfo.avatarUrl + ');'"></view>
|
<view class="cu-avatar round" :style="'background-image:url(' + shopInfo.workerLogoUrl + ');'"></view>
|
||||||
<view class="content flex-sub margin-lr-sm">
|
<view class="content flex-sub margin-lr-sm">
|
||||||
<view class="text-black">{{shopInfo.shopName}}</view>
|
<view class="text-black">{{shopInfo.name}}</view>
|
||||||
<uni-rate :size="15" :readonly="true" allow-half :value="shopInfo.totalScore" />
|
<uni-rate :size="15" :readonly="true" allow-half :value="5" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="text-sm" @click="showShopDetail(shopInfo)">店铺查看<text class="text-bold text-gray cuIcon-right"></text></view>
|
<view class="text-sm" @click="showShopDetail(shopInfo)">店铺查看<text class="text-bold text-gray cuIcon-right"></text></view>
|
||||||
|
|
@ -246,11 +247,15 @@
|
||||||
this.detailPicList.forEach((picItem) => {
|
this.detailPicList.forEach((picItem) => {
|
||||||
this.picUrls.push(picItem.imgUrl);
|
this.picUrls.push(picItem.imgUrl);
|
||||||
})
|
})
|
||||||
|
let res = await this.$request.getWorkerAllDetailById({
|
||||||
|
workerId: this.productDetail.workerId
|
||||||
|
})
|
||||||
|
this.shopInfo = res.data;
|
||||||
|
|
||||||
this.guaranteeList = productDetailMock.guaranteeList;
|
this.guaranteeList = productDetailMock.guaranteeList;
|
||||||
this.productInfo = productDetailMock.productInfo;
|
this.productInfo = productDetailMock.productInfo;
|
||||||
this.reviewers = productDetailMock.reviewers;
|
this.reviewers = productDetailMock.reviewers;
|
||||||
this.shopInfo = productDetailMock.shopInfo;
|
// this.shopInfo = productDetailMock.shopInfo;
|
||||||
},
|
},
|
||||||
bindEvent() {
|
bindEvent() {
|
||||||
uni.$on('product-detail_add2Cart', this.add2Cart);
|
uni.$on('product-detail_add2Cart', this.add2Cart);
|
||||||
|
|
|
||||||
|
|
@ -55,8 +55,7 @@
|
||||||
<text>附加服务:</text>
|
<text>附加服务:</text>
|
||||||
<radio-group @change="changeAdditionalServId">
|
<radio-group @change="changeAdditionalServId">
|
||||||
<label class="radio margin-right-sm" v-for="(item, index) in additionalServ">
|
<label class="radio margin-right-sm" v-for="(item, index) in additionalServ">
|
||||||
<radio style="transform:scale(0.7)" class="main-color" :value="item.id"
|
<radio style="transform:scale(0.7)" class="main-color" :value="item.id" disabled/>
|
||||||
checked disabled/>
|
|
||||||
<text class="margin-left-xs">{{item.name}}</text>
|
<text class="margin-left-xs">{{item.name}}</text>
|
||||||
</label>
|
</label>
|
||||||
</radio-group>
|
</radio-group>
|
||||||
|
|
@ -133,12 +132,16 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
this.shopInfo = JSON.parse(decodeURIComponent(option.shopInfo));
|
const params = JSON.parse(decodeURIComponent(option.shopInfo));
|
||||||
this.loadData();
|
this.loadData(params);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async loadData() {
|
async loadData(params) {
|
||||||
// this.shopInfo = await this.$api.data('shopInfo');
|
// this.shopInfo = await this.$api.data('shopInfo');
|
||||||
|
let res = await this.$request.getWorkerAllDetailById({
|
||||||
|
workerId: params.workerId
|
||||||
|
})
|
||||||
|
this.shopInfo = res.data;
|
||||||
this.loadCategoryList();
|
this.loadCategoryList();
|
||||||
await this.loadRegionList();
|
await this.loadRegionList();
|
||||||
this.searchInfo.area = [this.areaList[0][0], this.areaList[1][0], this.areaList[2][0]]
|
this.searchInfo.area = [this.areaList[0][0], this.areaList[1][0], this.areaList[2][0]]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue