Commit abf0a4e9 authored by Edwise's avatar Edwise 🍷

123

parent 4532d46b
......@@ -61,7 +61,7 @@ Component({
this.onSelectCatOk();
} else {
console.log("ergerg")
my.showToast({content: adoptCat?adoptCat.message:null})
my.showToast({content:adoptCat.message||'网络异常,请稍后重试~'})
}
}
console.log(this.props.catName)
......
......@@ -20,15 +20,16 @@ Component({
console.log('onModalClose')
},
onPostSelectCat() {
const userInfo = API.getUserInfo();
const userInfo = API.getUserInfo().catch(res=>{
my.showToast({content:userInfo?userInfo.message:null})
});
if(userInfo&&userInfo.success){
const {
onPostSelectCat
} = this.props;
console.log("领养完毕")
this.onModalClose();
onPostSelectCat && onPostSelectCat(userInfo);
}else{
my.showToast(userInfo?userInfo.message:null)
}
}
},
......
......@@ -38,7 +38,7 @@ Page({
selectcatModalVisible: false,
catnameModalVisible: false,
recallcatModalVisible: false,
recallcatModalData:{},
recallcatModalData: {},
getcatModalVisible: false,
getcatModalData: {},
catbackbedModalVisible: false,
......@@ -72,7 +72,7 @@ Page({
my.__getdata__ = (key) => {
my.__onMessage__({
data: {
netName: 'tmallCat.'+key
netName: 'tmallCat.' + key
}
})
}
......@@ -98,6 +98,10 @@ Page({
}
});
}
my.__updateUserInfo__ = () => {
console.log("通知canvas刷新用户信息")
this.main && this.main.dispatchGlobalEvent("UPDATE_USERINFO")
}
},
init() {
......@@ -169,7 +173,7 @@ Page({
//接口名字
let netName = e.data.netName; //接口参数
let parameter = e.data.parameter||{};
let parameter = e.data.parameter || {};
//定制的授权
if (netName.indexOf("mine") == 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment