优化代码

This commit is contained in:
wuxw 2024-09-26 14:19:42 +08:00
parent 9cf406636e
commit d76efe7ccf
3 changed files with 6 additions and 22 deletions

View File

@ -156,17 +156,10 @@
that.imgList.push(tempFilePaths); that.imgList.push(tempFilePaths);
that.$forceUpdate(); that.$forceUpdate();
//#ifdef H5 TanslateImage.translate(this,tempFilePaths, (url) => {
TanslateImage.translate(tempFilePaths, (url) => {
that.photos.push(url); that.photos.push(url);
}) })
//#endif
//#ifdef MP-WEIXIN
factory.base64.urlTobase64(tempFilePaths).then(function(_res) {
that.photos.push(_res);
});
//#endif
} }
}); });
}, },

View File

@ -15,13 +15,13 @@ const baseUrl = '/';
// #ifndef H5 // #ifndef H5
//服务器域名 小程序 或者 app 时 后端地址 //服务器域名 小程序 或者 app 时 后端地址
const baseUrl = 'https://wuye.yunxiaowuye.com/'; const baseUrl = 'https://pms.x2wl.com/';
// #endif // #endif
let commonBaseUrl = 'https://wuye.yunxiaowuye.com/'; let commonBaseUrl = 'https://pms.x2wl.com/';
//商城的url //商城的url
let mallUrl = 'https://mallapp.yunxiaowuye.com/'; let mallUrl = 'https://mallapp.x2wl.com/';
//商城小程序ID //商城小程序ID
let mallMinAppId = "wxa4211361ca1e1bfb"; let mallMinAppId = "wxa4211361ca1e1bfb";

View File

@ -132,20 +132,11 @@
}); });
var tempFilePaths = res.tempFilePaths var tempFilePaths = res.tempFilePaths
console.log('头像地址', tempFilePaths); console.log('头像地址', tempFilePaths);
//#ifdef H5 TanslateImage.translate(this,tempFilePaths, (_baseInfo) => {
TanslateImage.translate(tempFilePaths, (_baseInfo) => {
_that.headerImg = _baseInfo; _that.headerImg = _baseInfo;
_that._uploadOwnerHeaderImg(); _that._uploadOwnerHeaderImg();
wx.hideLoading() wx.hideLoading()
}) })
//#endif
//#ifdef MP-WEIXIN
factory.base64.urlTobase64(tempFilePaths[0]).then(function(_baseInfo) {
_that.headerImg = _baseInfo;
_that._uploadOwnerHeaderImg();
wx.hideLoading()
});
//#endif
} }
}) })
}, },