|
|
@@ -89,12 +89,12 @@
|
|
|
|
|
|
<view class="intro-section" v-if="product.intro">
|
|
|
<text class="section-title">商品介绍</text>
|
|
|
- <mp-html :content="product.intro" />
|
|
|
+ <mp-html :content="product.intro" :domain="apiBaseUrl" />
|
|
|
</view>
|
|
|
|
|
|
<view class="desc-section" v-if="product.description">
|
|
|
<text class="section-title">商品详情</text>
|
|
|
- <mp-html :content="product.description" />
|
|
|
+ <mp-html :content="product.description" :domain="apiBaseUrl" />
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
<view v-else class="empty-wrap">
|
|
|
@@ -150,6 +150,9 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
+ apiBaseUrl: function() {
|
|
|
+ return config.API_BASE_URL
|
|
|
+ },
|
|
|
typeLabel() {
|
|
|
const map = {
|
|
|
activity: '活动',
|
|
|
@@ -275,21 +278,21 @@ export default {
|
|
|
// 实时查询会员身份,用于会员价展示和实付价计算
|
|
|
this.loadMembership()
|
|
|
},
|
|
|
- loadMembership: function() {
|
|
|
- var that = this
|
|
|
- getMyMembership().then(function(res) {
|
|
|
- if (res && res.code === 200 && res.data) {
|
|
|
- var lvl = res.data.memberLevel || 'FREE'
|
|
|
- that.memberLevel = lvl
|
|
|
- that.isMember = lvl !== 'FREE' && lvl !== ''
|
|
|
- }
|
|
|
- }).catch(function() {
|
|
|
- // 查询失败按非会员处理,不阻塞页面
|
|
|
- that.isMember = false
|
|
|
- that.memberLevel = 'FREE'
|
|
|
- })
|
|
|
- },
|
|
|
methods: {
|
|
|
+ loadMembership: function() {
|
|
|
+ var that = this
|
|
|
+ getMyMembership().then(function(res) {
|
|
|
+ if (res && res.code === 200 && res.data) {
|
|
|
+ var lvl = res.data.memberLevel || 'FREE'
|
|
|
+ that.memberLevel = lvl
|
|
|
+ that.isMember = lvl !== 'FREE' && lvl !== ''
|
|
|
+ }
|
|
|
+ }).catch(function() {
|
|
|
+ // 查询失败按非会员处理,不阻塞页面
|
|
|
+ that.isMember = false
|
|
|
+ that.memberLevel = 'FREE'
|
|
|
+ })
|
|
|
+ },
|
|
|
getImageUrl: function(path) {
|
|
|
if (!path) return '/static/default-product.png'
|
|
|
if (path.startsWith('http') || path.startsWith('/static/')) return path
|