Feat(商品详情):新增商家资质页
This commit is contained in:
@@ -139,6 +139,13 @@
|
|||||||
"navigationBarTextStyle": "white"
|
"navigationBarTextStyle": "white"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/shop/GoodsCon/qualifications",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "商家资质",
|
||||||
|
"navigationBarTextStyle": "black"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/user/address/AddAddress/index",
|
"path": "pages/user/address/AddAddress/index",
|
||||||
"style": {
|
"style": {
|
||||||
|
|||||||
@@ -194,13 +194,25 @@
|
|||||||
<uni-icons type="right" size="13" color="#707070"></uni-icons>
|
<uni-icons type="right" size="13" color="#707070"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
|
<view class="cell flex jc-between ai-center" @click="toQualifications">
|
||||||
|
<view class="flex ai-center">
|
||||||
|
<view class="after-title v12-dark-text v12-font-28 v12-align-center">
|
||||||
|
<image class="logo" :src="webUrl+'/orderIcon/资质认证.png'" mode="" style="margin-right:0; width: 32rpx; height:32rpx"/>
|
||||||
|
<text class="v12-ml-1 v12-font-28">资质</text>
|
||||||
|
</view>
|
||||||
|
<view class="title v12-secondary-dark-text">{{ storeInfo.merName }}</view>
|
||||||
|
</view>
|
||||||
|
<view class="value v12-justify-end v12-align-center">
|
||||||
|
<!-- <text class=" v12-dark1-text v12-font-24">库存:{{ attr.productSelect.stock }}</text> -->
|
||||||
|
<uni-icons type="right" size="16" color="#707070"></uni-icons>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<view class="cell flex jc-between ai-center" @click="selecAttrTap">
|
<view class="cell flex jc-between ai-center" @click="selecAttrTap">
|
||||||
<view class="flex ai-center">
|
<view class="flex ai-center">
|
||||||
<view class="after-title v12-dark-text v12-font-28 v12-align-center">
|
<view class="after-title v12-dark-text v12-font-28 v12-align-center">
|
||||||
<image class="logo" :src="webUrl+'/orderIcon/items.png'" mode="" style="margin-right:0; width: 32rpx; height:32rpx"/>
|
<image class="logo" :src="webUrl+'/orderIcon/items.png'" mode="" style="margin-right:0; width: 32rpx; height:32rpx"/>
|
||||||
<text class="v12-ml-1 v12-font-28">选择</text>
|
<text class="v12-ml-1 v12-font-28">选择</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="title attr-bg v12-primary-text">{{ attrValue }}</view>
|
<view class="title attr-bg v12-primary-text">{{ attrValue }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="value v12-justify-end v12-align-center">
|
<view class="value v12-justify-end v12-align-center">
|
||||||
@@ -564,7 +576,8 @@ export default {
|
|||||||
uniqueId: null,
|
uniqueId: null,
|
||||||
isFavorite: false,
|
isFavorite: false,
|
||||||
pageKeyId: '',
|
pageKeyId: '',
|
||||||
couponListLimit2ToShow: []
|
couponListLimit2ToShow: [],
|
||||||
|
qualifications: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: mapGetters(["isLogin", "location", "userInfo"]),
|
computed: mapGetters(["isLogin", "location", "userInfo"]),
|
||||||
@@ -715,6 +728,15 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
toQualifications() {
|
||||||
|
const merInfo = {
|
||||||
|
name: this.storeInfo.merName,
|
||||||
|
qualifications: this.qualifications
|
||||||
|
}
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/pages/shop/GoodsCon/qualifications?mer=' + JSON.stringify(merInfo),
|
||||||
|
})
|
||||||
|
},
|
||||||
goRoom() {
|
goRoom() {
|
||||||
const params = {
|
const params = {
|
||||||
goodsId: this.productId,
|
goodsId: this.productId,
|
||||||
@@ -968,6 +990,7 @@ export default {
|
|||||||
const { data } = res
|
const { data } = res
|
||||||
this.$set(this, 'storeInfo', data.storeInfo)
|
this.$set(this, 'storeInfo', data.storeInfo)
|
||||||
this.isWenwan = data.isWenwan
|
this.isWenwan = data.isWenwan
|
||||||
|
this.qualifications = data.qualifications || []
|
||||||
// 给 attr 赋值,将请求回来的规格赋值给 attr
|
// 给 attr 赋值,将请求回来的规格赋值给 attr
|
||||||
if (this.source !== 'pre' && this.source !== 'day' && this.source !== 'kill' && this.source !== 'spe') {
|
if (this.source !== 'pre' && this.source !== 'day' && this.source !== 'kill' && this.source !== 'spe') {
|
||||||
this.$set(this.attr, 'productAttr', data.productAttr)
|
this.$set(this.attr, 'productAttr', data.productAttr)
|
||||||
|
|||||||
@@ -0,0 +1,58 @@
|
|||||||
|
<template>
|
||||||
|
<view class="v12-px-3 v12-py-5 qua-card ">
|
||||||
|
<view class="v12-white v12-radius-16">
|
||||||
|
<view class="v12-justify-between v12-pa-3">
|
||||||
|
<text class="v12-font-32 v12-dark-text">
|
||||||
|
商家名称
|
||||||
|
</text>
|
||||||
|
<text class="v12-font-32 v12-dark-text v12-font-bold">
|
||||||
|
{{ merInfo.name }}
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
<view class="v12-my-3 v12-justify-center v12-pb-3" v-for="(item , i) in merInfo.qualifications" :key="i">
|
||||||
|
<image @tap="previewImage(i)" class="img" :src="item.image" :data-src="item.image" mode="scaleToFill" lazy-load="true" v-if="more || i === 0"></image>
|
||||||
|
</view>
|
||||||
|
<view class="v12-align-center v12-justify-center v12-font-24 v12-pb-3" @click="showMore" v-if="!more && merInfo.qualifications.length > 1">
|
||||||
|
<text class="v12-dark1-text">查看更多</text>
|
||||||
|
<u-icon name="arrow-down"></u-icon>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
merInfo: {
|
||||||
|
qualifications: []
|
||||||
|
},
|
||||||
|
more: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(opts) {
|
||||||
|
this.merInfo = JSON.parse(opts.mer)
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
previewImage (i) {
|
||||||
|
uni.previewImage({
|
||||||
|
current: i,
|
||||||
|
urls: this.merInfo.qualifications
|
||||||
|
})
|
||||||
|
},
|
||||||
|
showMore() {
|
||||||
|
this.more = !this.more
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less">
|
||||||
|
.qua-card {
|
||||||
|
}
|
||||||
|
.img{
|
||||||
|
width: 662rpx;
|
||||||
|
height: 360rpx;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user