Commit a8bce5b4 authored by wildfirecode13's avatar wildfirecode13

1

parent d70bb176
...@@ -16,6 +16,10 @@ const apiList = { ...@@ -16,6 +16,10 @@ const apiList = {
handle: 'index', handle: 'index',
isShowLoading: true isShowLoading: true
}, },
getActivityBaseInfoById: {
handle: 'getActivityBaseInfoById',
isShowLoading: true
},
login: 'login' login: 'login'
}; };
......
...@@ -7,7 +7,7 @@ cloud.init({ ...@@ -7,7 +7,7 @@ cloud.init({
App({ App({
requestType: 'cloud', // ams:ams接口,cloud: 云函数 requestType: 'cloud', // ams:ams接口,cloud: 云函数
cloudName: 'bubbleSurviva', // 主云函数项目名 base clientTemplate2C cloudName: 'floor', // 主云函数项目名 base clientTemplate2C
cloud, cloud,
tbcc, tbcc,
onLaunch(options) { onLaunch(options) {
......
...@@ -23,10 +23,18 @@ Page({ ...@@ -23,10 +23,18 @@ Page({
console.info(`Page onLoad with query: ${JSON.stringify(query)}`); console.info(`Page onLoad with query: ${JSON.stringify(query)}`);
}, },
init() { init() {
// this.getIndex(); this.getActivityBaseInfoById();
},
async getActivityBaseInfoById() {
const { success, data } = await API.getActivityBaseInfoById().catch(res => {
commonToast(res && res.message);
}) || {};
my.redirectTo({url:'/pages/pageshou_ye/pageshou_ye'}); if (success) {
console.log('getActivityBaseInfoById 成功')
// my.redirectTo({url:'/pages/pageshou_ye/pageshou_ye'});
// my.redirectTo({url:'/pages/pagehuo_dong_ye/pagehuo_dong_ye'}); // my.redirectTo({url:'/pages/pagehuo_dong_ye/pagehuo_dong_ye'});
}
}, },
onReady() { onReady() {
// 页面加载完成 // 页面加载完成
...@@ -81,12 +89,8 @@ Page({ ...@@ -81,12 +89,8 @@ Page({
* 登录接口 * 登录接口
*/ */
async login() { async login() {
this.init();
return;
const { nickName, avatar } = app; const { nickName, avatar } = app;
const { success } = await API.login({ userNick:nickName, avatar }).catch(res => { const { success } = await API.login({ userNick: nickName, avatar }).catch(res => {
console.log('登录失败..') console.log('登录失败..')
commonToast(res && res.message); commonToast(res && res.message);
}) || {}; }) || {};
......
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