Commit 3bdaf5be authored by jiangjiantao's avatar jiangjiantao

通知后屏登录成功

parent 1b0a4998
......@@ -35,4 +35,7 @@ export const ACTION_GET_ACCOUNT = "ACTION_GET_ACCOUNT";
export const ACTION_DIRECT_PAYMENT = "ACTION_DIRECT_PAYMENT";
//兑换券
export const ACTION_CONVERT_COUPON = "ACTION_CONVERT_COUPON";
\ No newline at end of file
export const ACTION_CONVERT_COUPON = "ACTION_CONVERT_COUPON";
//登录完成
export const ACTION_LOGIN_OK = "ACTION_LOGIN_OK";
\ No newline at end of file
import { ACTION_LOGIN_OK } from '../../const/actioncmd'
Page({
data: {
name: "",
......@@ -34,11 +35,11 @@ Page({
console.log("localLoginInfo==>" + JSON.stringify(localLoginInfo));
if (localLoginInfo.success != false && localLoginInfo.data != null) {
//赋值
this.setData({
name: localLoginInfo.data.name,
password: localLoginInfo.data.password,
sn: localLoginInfo.data.sn
})
// this.setData({
// name: localLoginInfo.data.name,
// password: localLoginInfo.data.password,
// sn: localLoginInfo.data.sn
// })
}
},
onNameClear() {
......@@ -157,6 +158,10 @@ Page({
content: '登录成功',
duration: 3000
});
//通知后屏登录成功
this.sendLoginOkToBackScreen();
this.setData({
errHidden: true
});
......@@ -174,6 +179,28 @@ Page({
errHidden: false
});
}
}
},
// 登录完成通知后屏
sendLoginOkToBackScreen(){
let context = this;
var commonRequest = {
action:ACTION_LOGIN_OK,
data:null
};
my.ix.sendBuddyMessage({
target: getApp().globalData.backScreenAppId,
data: commonRequest,
success: (res) => {
console.log("登录成功通知后屏 成功 ===》"+JSON.stringify(res));
},
fail: (res) => {
console.log("登录成功通知后屏 失败 ===》 "+JSON.stringify(res));
//发送失败重试
context.sendLoginOkToBackScreen();
}
})
}
});
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