砍价海报生成问题修复

This commit is contained in:
吴昊天 2023-02-22 12:15:02 +08:00
parent 132005ee2e
commit 3e881944f5

View File

@ -168,7 +168,8 @@
let userData = await getUserInfo()
this.uid = userData.data.uid
let goods_img, mp_code, resData, arr, mpUrl
// #ifdef MP
// #ifdef MP
// #endif
uni.showLoading({
title: that.$t(`海报生成中`),
@ -198,7 +199,8 @@
let imgData = await this.imgToBase(resData.image, resData.url)
arr = [this.posterBag, imgData.image, imgData.code || this.codeSrc]
// #endif
// #ifdef MP
// #ifdef MP
resData.image = that.setDomain(resData.image);
mpUrl = resData.url ? await this.downloadFilestoreImage(resData.url) : await this
.downloadFilestoreImage(this.mpUrl)
arr = [this.posterBag, await this.downloadFilestoreImage(resData.image), mpUrl]
@ -235,7 +237,7 @@
})
},
//替换安全域名
setDomain: function(image, url) {
setDomain: function(url) {
url = url ? url.toString() : '';
//本地调试打开,生产请注销
if (url.indexOf('https://') > -1) return url;