Files
xdd-uniapp-new/pages/shop/GoodsCon/qualifications.vue
T

58 lines
1.4 KiB
Vue

<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="widthFix" 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>