Commit 29a186a3 authored by 任建锋's avatar 任建锋

--

parent 17e31709
...@@ -16,6 +16,9 @@ let time1,time2 ...@@ -16,6 +16,9 @@ let time1,time2
let disableEvent; let disableEvent;
let updateIndexEvent; let updateIndexEvent;
//第一次进入
let firstUser=true
//读取云存储资源 //读取云存储资源
async function loadCloud(url, onLoad, onError) { async function loadCloud(url, onLoad, onError) {
if (url.indexOf("cloud://") == 0) { if (url.indexOf("cloud://") == 0) {
...@@ -60,7 +63,11 @@ Page({ ...@@ -60,7 +63,11 @@ Page({
// showWinLists:[] // showWinLists:[]
// }) // })
events.emit("ON_SHOW") events.emit("ON_SHOW")
this.updateData() if(!firstUser){
//this.updateData()
this.getAuth();
}
}, },
onLoad(query) { onLoad(query) {
this.inviteId = query.inviteId; this.inviteId = query.inviteId;
...@@ -104,9 +111,11 @@ Page({ ...@@ -104,9 +111,11 @@ Page({
* 获取用户授权信息 * 获取用户授权信息
*/ */
async getAuth() { async getAuth() {
console.log("开始授权")
const userInfo = await getAuthUserInfo().catch(err => { const userInfo = await getAuthUserInfo().catch(err => {
console.log('未授权成功', err); console.log('未授权成功', err);
}); });
firstUser=false;
if (userInfo) { if (userInfo) {
console.log('userInfo', userInfo); console.log('userInfo', userInfo);
const { nickName, avatar } = userInfo; const { nickName, avatar } = userInfo;
......
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