显示 loading 提示框
uni.showLoading中的参数success调用成功的回调函数里的this问题,解决如下:
let _this = this;
uni.showLoading({
title: '加载中',
mask: true,
success: function(){
let data ={
..._this.maAssessmentDetailList
}
_this.$api.home.saveFormEval(data).then((res)=>{
if(res.result == MsgType.SUCCESS){
let __this = _this;
setTimeout(function(){
__this.goBack();
},1000)
}
uni.hideLoading();
}).catch(error =>{
uni.hideLoading();
})
}
});