Commit 3bdaf5be authored by jiangjiantao's avatar jiangjiantao

通知后屏登录成功

parent 1b0a4998
...@@ -36,3 +36,6 @@ export const ACTION_DIRECT_PAYMENT = "ACTION_DIRECT_PAYMENT"; ...@@ -36,3 +36,6 @@ export const ACTION_DIRECT_PAYMENT = "ACTION_DIRECT_PAYMENT";
//兑换券 //兑换券
export const ACTION_CONVERT_COUPON = "ACTION_CONVERT_COUPON"; 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({ Page({
data: { data: {
name: "", name: "",
...@@ -34,11 +35,11 @@ Page({ ...@@ -34,11 +35,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() {
...@@ -157,6 +158,10 @@ Page({ ...@@ -157,6 +158,10 @@ Page({
content: '登录成功', content: '登录成功',
duration: 3000 duration: 3000
}); });
//通知后屏登录成功
this.sendLoginOkToBackScreen();
this.setData({ this.setData({
errHidden: true errHidden: true
}); });
...@@ -174,6 +179,28 @@ Page({ ...@@ -174,6 +179,28 @@ Page({
errHidden: false 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