Commit 219b0616 authored by wildfirecode13's avatar wildfirecode13

1

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