Commit 91e88fcb authored by pengguangpu's avatar pengguangpu

自动登录;添加onback事件回调;

parent dfdf1a77
...@@ -18,7 +18,9 @@ Page({ ...@@ -18,7 +18,9 @@ Page({
}, },
//回退到上一个页面 //回退到上一个页面
events: {
onBack(e) { onBack(e) {
console.log('onBack触发');
my.ix.sendBuddyMessage({ my.ix.sendBuddyMessage({
// 填入目标小程序的 AppID // 填入目标小程序的 AppID
target: getApp().globalData.backScreenAppId, target: getApp().globalData.backScreenAppId,
...@@ -33,8 +35,10 @@ Page({ ...@@ -33,8 +35,10 @@ Page({
console.info(`sendBuddyMessage failed: ${JSON.stringify(res)}`); console.info(`sendBuddyMessage failed: ${JSON.stringify(res)}`);
} }
}); });
}
}, },
onReady() { onReady() {
if (my.canIUse('hideBackHome')) { if (my.canIUse('hideBackHome')) {
my.hideBackHome(); my.hideBackHome();
......
...@@ -43,11 +43,11 @@ Page({ ...@@ -43,11 +43,11 @@ Page({
console.log("localLoginInfo==>" + JSON.stringify(localLoginInfo)); console.log("localLoginInfo==>" + JSON.stringify(localLoginInfo));
if (localLoginInfo.success != false && localLoginInfo.data != null) { if (localLoginInfo.success != false && localLoginInfo.data != null) {
//赋值 //赋值
// this.setData({ this.setData({
// name: localLoginInfo.data.name, name: localLoginInfo.data.name,
// password: localLoginInfo.data.password, password: localLoginInfo.data.password,
// sn: localLoginInfo.data.sn sn: localLoginInfo.data.sn
// }) })
} }
}, },
onNameClear() { onNameClear() {
......
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