Commit 219b0616 authored by wildfirecode13's avatar wildfirecode13

1

parent 216bf1f5
...@@ -21,6 +21,11 @@ const apiList = { ...@@ -21,6 +21,11 @@ const apiList = {
method:'get', method:'get',
isShowLoading: true isShowLoading: true
}, },
getVipInfo: {
handle: 'getVipInfo',
method:'get',
isShowLoading: true
},
login: { login: {
handle: 'login', handle: 'login',
method:'get', method:'get',
......
...@@ -22,18 +22,15 @@ Page({ ...@@ -22,18 +22,15 @@ Page({
this.getAuth(); this.getAuth();
console.info(`Page onLoad with query: ${JSON.stringify(query)}`); console.info(`Page onLoad with query: ${JSON.stringify(query)}`);
}, },
init() { async init() {
this.getActivityBaseInfoById(); const [activity, vipInfo] = await Promise.all([
}, API.getActivityBaseInfoById(),
async getActivityBaseInfoById() { API.getVipInfo(),
const { success, data } = await API.getActivityBaseInfoById().catch(res => { ]);
commonToast(res && res.message); if (vipInfo.isVip && activity.data.isUserJoin) {
}) || {}; my.redirectTo({ url: '/pages/pagehuo_dong_ye/pagehuo_dong_ye' });
} else {
if (success) { my.redirectTo({ url: '/pages/pageshou_ye/pageshou_ye' });
console.log('getActivityBaseInfoById 成功')
// my.redirectTo({url:'/pages/pageshou_ye/pageshou_ye'});
// my.redirectTo({url:'/pages/pagehuo_dong_ye/pagehuo_dong_ye'});
} }
}, },
onReady() { onReady() {
......
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