Commit abf0a4e9 authored by Edwise's avatar Edwise 🍷

123

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