Commit a8bce5b4 authored by wildfirecode13's avatar wildfirecode13

1

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