mirror of
https://gitee.com/java110/WechatOwnerService.git
synced 2026-02-23 13:26:40 +08:00
优化小程序没法上传头像bug
This commit is contained in:
parent
e89c2b3161
commit
808a3fab95
@ -15,10 +15,10 @@ const baseUrl = '/';
|
|||||||
|
|
||||||
// #ifndef H5
|
// #ifndef H5
|
||||||
//服务器域名 小程序 或者 app 时 后端地址
|
//服务器域名 小程序 或者 app 时 后端地址
|
||||||
const baseUrl = 'https://crsdt.cn/';
|
const baseUrl = 'https://wuye.beefuwu.com/';
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
let commonBaseUrl = 'https://crsdt.cn/';
|
let commonBaseUrl = 'https://wuye.beefuwu.com/';
|
||||||
|
|
||||||
//商城的url
|
//商城的url
|
||||||
let mallUrl = 'https://mallapp.crsdt.cn/';
|
let mallUrl = 'https://mallapp.crsdt.cn/';
|
||||||
|
|||||||
@ -76,8 +76,9 @@ export function translateH5(imgSrc, callback) {
|
|||||||
* @param callback 回调
|
* @param callback 回调
|
||||||
*/
|
*/
|
||||||
function translateMP(that, imageUrl, callback) {
|
function translateMP(that, imageUrl, callback) {
|
||||||
|
console.log(imageUrl)
|
||||||
uni.getImageInfo({
|
uni.getImageInfo({
|
||||||
src: imageUrl,
|
src: imageUrl[0],
|
||||||
success(imgData) {
|
success(imgData) {
|
||||||
const query = that.createSelectorQuery();
|
const query = that.createSelectorQuery();
|
||||||
query.select('#materCanvas').fields({
|
query.select('#materCanvas').fields({
|
||||||
|
|||||||
@ -59,7 +59,7 @@
|
|||||||
"quickapp" : {},
|
"quickapp" : {},
|
||||||
"mp-weixin" : {
|
"mp-weixin" : {
|
||||||
"usingComponents" : true,
|
"usingComponents" : true,
|
||||||
"appid" : "wx44c2329a271b1e29",
|
"appid" : "wxa2546d522c10515b",
|
||||||
"setting" : {
|
"setting" : {
|
||||||
"urlCheck" : false,
|
"urlCheck" : false,
|
||||||
"es6" : false
|
"es6" : false
|
||||||
|
|||||||
@ -81,6 +81,9 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<!--#ifdef MP-WEIXIN -->
|
||||||
|
<canvas canvas-id="materCanvas" style="display: none;" type="2d" id="materCanvas"></canvas>
|
||||||
|
<!--#endif -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -134,7 +137,7 @@
|
|||||||
});
|
});
|
||||||
var tempFilePaths = res.tempFilePaths
|
var tempFilePaths = res.tempFilePaths
|
||||||
console.log('头像地址', tempFilePaths);
|
console.log('头像地址', tempFilePaths);
|
||||||
TanslateImage.translate(this,tempFilePaths, (_baseInfo) => {
|
TanslateImage.translate(_that,tempFilePaths, (_baseInfo) => {
|
||||||
_that.headerImg = _baseInfo;
|
_that.headerImg = _baseInfo;
|
||||||
_that._uploadOwnerHeaderImg();
|
_that._uploadOwnerHeaderImg();
|
||||||
wx.hideLoading()
|
wx.hideLoading()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user