Fix:5689 【礼品集采中心小程序】【我的订单-联系商家】向商家发送图片时,页面图片显示为纯白色
This commit is contained in:
@@ -11,7 +11,7 @@
|
|||||||
<view class="name one-t">{{ item.username }}</view>
|
<view class="name one-t">{{ item.username }}</view>
|
||||||
<text class="msg" v-if="item.msg_type===0">{{ item.msg_content }}</text>
|
<text class="msg" v-if="item.msg_type===0">{{ item.msg_content }}</text>
|
||||||
<view class="msg" v-if="item.msg_type===1">
|
<view class="msg" v-if="item.msg_type===1">
|
||||||
<image class="img" :src="item.msg_content" @click="preview(item.msg_content)"></image>
|
<image class="img" :src="imgUrl(item.msg_content)" @click="preview(imgUrl(item.msg_content))"></image>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
<view class="name one-t">{{ item.username }}</view>
|
<view class="name one-t">{{ item.username }}</view>
|
||||||
<text class="msg" v-if="item.msg_type===0">{{ item.msg_content }}</text>
|
<text class="msg" v-if="item.msg_type===0">{{ item.msg_content }}</text>
|
||||||
<view class="msg" v-if="item.msg_type===1">
|
<view class="msg" v-if="item.msg_type===1">
|
||||||
<image class="img" :src="item.msg_content" @click="preview(item.msg_content)"></image>
|
<image class="img" :src="imgUrl(item.msg_content)" @click="preview(imgUrl(item.msg_content))"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="msg v12-d-flex" style="box-sizing: content-box" v-if="item.msg_type===2" @click="toGoods(item)">
|
<view class="msg v12-d-flex" style="box-sizing: content-box" v-if="item.msg_type===2" @click="toGoods(item)">
|
||||||
<view class="goods-logo">
|
<view class="goods-logo">
|
||||||
@@ -179,6 +179,12 @@ export default {
|
|||||||
wsJson(json) {
|
wsJson(json) {
|
||||||
return JSON.parse(json)
|
return JSON.parse(json)
|
||||||
},
|
},
|
||||||
|
// 拼接图片完整地址:七牛上传后消息里只存 key,需要补上资源域名;http 统一转 https
|
||||||
|
imgUrl(content) {
|
||||||
|
if (!content) return ''
|
||||||
|
if (/^https?:\/\//i.test(content)) return content.replace(/^http:\/\//i, 'https://')
|
||||||
|
return this.webUrl + '/' + content
|
||||||
|
},
|
||||||
getUploadToken() {
|
getUploadToken() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user