|
|
|
@ -8,7 +8,6 @@ const AV = require('./lib/av-live-query-weapp-min');
|
|
|
|
|
const Towxml = require('/towxml/main');
|
|
|
|
|
const login = require("./model/user");
|
|
|
|
|
|
|
|
|
|
//初始化
|
|
|
|
|
AV.init({
|
|
|
|
|
appId: 'eVHYNBdT5D2lDxNj5jtJXsWT-MdYXbMMI',
|
|
|
|
|
appKey: 'waM3bwf1ftpsMLjRBqqVyJIQ',
|
|
|
|
@ -53,11 +52,12 @@ App({
|
|
|
|
|
console.warn("app.js: get user info fail");
|
|
|
|
|
}
|
|
|
|
|
}).then(()=>{
|
|
|
|
|
login().then(user=>{
|
|
|
|
|
user.addUnique("edu_account_real_names", this.client.current_user.real_name);
|
|
|
|
|
user.addUnique("edu_account_names", this.client.current_user.name);
|
|
|
|
|
user.addUnique("edu_account_logins", this.client.current_user.login);
|
|
|
|
|
user.save();
|
|
|
|
|
login().then(localuser=>{
|
|
|
|
|
//save for autologin
|
|
|
|
|
localuser.addUnique("edu_account_real_names", this.client.current_user.real_name);
|
|
|
|
|
localuser.addUnique("edu_account_names", this.client.current_user.name);
|
|
|
|
|
localuser.addUnique("edu_account_logins", this.client.current_user.login);
|
|
|
|
|
localuser.set("cookies", this.client.session.cookies).save();
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|