Commit d70bb176 authored by wildfirecode13's avatar wildfirecode13

1

parent 35c9e19b
<view class="index-page"> <view class="index-page">
<view class="index-rule-btn" onTap="showRuleModal">活动规则</view> <view>正在加载...</view>
<navigator open-type="navigate" url="/pages/myprize/myprize" class="index-myprize-btn">我的奖品</navigator>
<view class="index-page__title">{{title}}</view>
<view class="index-page__content">{{content}}</view>
<view class="index-page__tips">AM接口只支持PC端预览,手机淘宝预览需要使用云函数模式</view>
<view class="index-start-btn" onTap="doStart">开始</view>
<navigator open-type="navigate" url="/pages/tbccDemo/tbccDemo" class="index-tbcc-btn">tbcc demo</navigator>
</view> </view>
\ No newline at end of file
<rule-modal a:if="{{ruleModalVisible}}" onModalClose="closeRuleModal"><text>{{rule}}</text></rule-modal>
<common-modal a:if="{{commonModalVisible}}" data="{{commonModalData}}" onModalClose="closeCommonModal" onModalConfirm="confirmCommonModal" />
<end-modal a:if="{{false}}" />
\ No newline at end of file
...@@ -23,7 +23,10 @@ Page({ ...@@ -23,7 +23,10 @@ Page({
console.info(`Page onLoad with query: ${JSON.stringify(query)}`); console.info(`Page onLoad with query: ${JSON.stringify(query)}`);
}, },
init() { init() {
this.getIndex(); // this.getIndex();
my.redirectTo({url:'/pages/pageshou_ye/pageshou_ye'});
// my.redirectTo({url:'/pages/pagehuo_dong_ye/pagehuo_dong_ye'});
}, },
onReady() { onReady() {
// 页面加载完成 // 页面加载完成
...@@ -78,12 +81,18 @@ Page({ ...@@ -78,12 +81,18 @@ 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('登录失败..')
commonToast(res && res.message); commonToast(res && res.message);
}) || {}; }) || {};
if (success) { if (success) {
console.log('登录成功,正在初始化')
this.init(); this.init();
} }
}, },
......
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