wx.showLoading一闪就没了
发布于 6 年前 作者 iliao 1747 次浏览 来自 问答

iO当前最新版本编辑器

调用wx.showLoading方法:模拟器没问题 不调用去除方法一直在,但是在真机 我没有调用去除loading方法一闪就没了,真机调试模式并没有报错,我给所有去除loading方法加了输出,也没有调用去除loading方法,那loading怎么就一闪就没了啊 求大佬指点迷津

10 回复

我感觉可能是苹果选择完照片 上传照片的时候有一个自带的loading和微信的loading冲突了是不是  有没有解决过这个问题的人啊

你好,问题已复现,我们会尽快进行修复。

没错我也调用了拍照的的功能。ios闪一下就没了,android没事

我刚才试了一下 我的安卓也没事儿  扎心了

wx.showLoading({

title: ‘请稍等…’,

mask: true

})

//开始上传

if (length == 0) {

//无图片的上传

// 上传参数

var params = {

coach_code: that.data.coach_code,

uc_code: uc_code,

tag_codes: that.data.tag_codes,

content: content,

imgs: [],

avatar:avatar,

name:name

};

that.onSending(params);

}else{

this.data.filePaths.forEach(function (value, index){

wx.uploadFile({

url: config.upload_url,

filePath: value,

name: config.upload_name,

sizeType: “compressed”,

success: function (res) {

count++;

clouds.push(JSON.parse(res.data).response.cloud);

if (count == length) {

// 上传参数

var params = {

coach_code: that.data.coach_code,

uc_code: uc_code,

tag_codes: that.data.tag_codes,

content: content,

imgs: clouds,

avatar:avatar,

name:name

};

that.onSending(params);

}

},

fail:function(fail){

wx.hideLoading();

wx.showModal({

title: ‘提示’,

content: ‘图片上传出错’,

showCancel:true

})

that.setData({

can_sub: true

});

}

});

});

}

},

上传图片也是,还没hideing 闪一下就没了

我刚才试了一下 wx.chooseimage前后写的wx.showLoading 苹果手机都会一闪就没了

wx.chooseImage({

     count: 1,

     sizeType: [‘original’, ‘compressed’],

     sourceType: [‘album’, ‘camera’],

     success: function (res) {

       wx.showLoading({

         title: ‘加载中’,

       })

     }

   })

chooseimage 选取图片后 添加的loading会一闪就没了 3楼你也是这样么

回到顶部