149 lines
2.8 KiB
Plaintext
149 lines
2.8 KiB
Plaintext
<style lang="less">
|
|
|
|
.bg {
|
|
z-index: -1;
|
|
height: 100%;
|
|
position: fixed;
|
|
width: 200rpx;
|
|
background-color: #AC1630;
|
|
}
|
|
|
|
.winery-item {
|
|
|
|
width: 400rpx;
|
|
height: 60px;
|
|
|
|
margin-bottom: 20px;
|
|
box-shadow: 4px 4px 10px #cccccc;
|
|
border: #ffffff 1px solid;
|
|
border-radius: 20px;
|
|
|
|
background-color: white;
|
|
padding: 15px 70rpx;
|
|
|
|
}
|
|
|
|
.winery-item-icon {
|
|
position: absolute;
|
|
width: 60px;
|
|
height: 60px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-items: center;
|
|
justify-content: center;
|
|
text-align: center;
|
|
background-color: white;
|
|
box-shadow: 4px 4px 10px #cccccc;
|
|
margin-top: 10px;
|
|
margin-left: -40rpx;
|
|
border: #ffffff 1px solid;
|
|
border-radius: 50%;
|
|
}
|
|
|
|
.winery-item-arrow {
|
|
|
|
position: absolute;
|
|
width: 45px;
|
|
height: 45px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-items: center;
|
|
justify-content: center;
|
|
background-color: white;
|
|
box-shadow: 4px 4px 10px #cccccc;
|
|
margin-top: 18.5px;
|
|
margin-left: 500rpx;
|
|
border: #ffffff 1px solid;
|
|
border-radius: 50%;
|
|
|
|
}
|
|
|
|
|
|
</style>
|
|
|
|
<wxs module="filters" lang="babel">
|
|
const parseImage = (imageKey) => {
|
|
return 'https://winery-1257413599.cos.ap-beijing.myqcloud.com/' + imageKey
|
|
}
|
|
module.exports.parseImage = parseImage;
|
|
</wxs>
|
|
<template>
|
|
|
|
|
|
<nav-bar title="酒庄信息" />
|
|
<van-loading v-if="!wineryItem" style="margin-top: 20px;" />
|
|
<div v-else style="margin-bottom: 80px;">
|
|
<image :src="filters.parseImage(wineryItem.avatar)" style="width: 100%;height: 750rpx;" mode="aspectFit" />
|
|
<div style="margin: 10px 15px;display: flex;flex-direction: column;">
|
|
<div style="font-size: 20px;font-weight: bold;">{{wineryItem.mchName}}</div>
|
|
<div style="font-size: 14px;color: #999999;">{{wineryItem.subtitle}}</div>
|
|
|
|
<span style="margin-top: 20px;font-weight: bold;">酒庄简介</span>
|
|
<div style="margin-top: 10px;width:100%;">
|
|
<rich-text :nodes="wineryItem.mchDesc" />
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
import wepy from '@wepy/core'
|
|
import store from '@/store'
|
|
import { mapActions, mapState } from '@wepy/x'
|
|
import defaultMix from '../../mixins/defaultMix'
|
|
import merchanApis from '../../apis/merchanApis'
|
|
|
|
wepy.page({
|
|
store,
|
|
hooks: {},
|
|
|
|
mixins: [defaultMix],
|
|
data: {
|
|
wineryItem: null
|
|
},
|
|
|
|
computed: {
|
|
...mapState({
|
|
'imageDefine': state => state.imageDefine
|
|
})
|
|
},
|
|
|
|
methods: {
|
|
...mapActions([]),
|
|
async init(id) {
|
|
merchanApis.getMerchantInfo(id).then(r => {
|
|
this.wineryItem = r.data
|
|
})
|
|
},
|
|
|
|
async initByDept(deptId) {
|
|
merchanApis.getMerchantInfoByDeptId(deptId).then(r => {
|
|
this.wineryItem = r.data
|
|
})
|
|
}
|
|
},
|
|
|
|
onLoad(options) {
|
|
|
|
if (options.id) {
|
|
this.init(options.id)
|
|
} else if (options.deptId) {
|
|
this.initByDept(options.deptId)
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
})
|
|
</script>
|
|
<config>
|
|
{
|
|
navigationBarTitleText: '',
|
|
usingComponents: {
|
|
|
|
}
|
|
}
|
|
</config>
|