Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
hello_taobao
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wildfirecode13
hello_taobao
Commits
d70bb176
Commit
d70bb176
authored
Sep 07, 2020
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
35c9e19b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
16 deletions
+12
-16
index.axml
dist/pages/index/index.axml
+2
-15
index.js
dist/pages/index/index.js
+10
-1
No files found.
dist/pages/index/index.axml
View file @
d70bb176
<view class="index-page">
<view class="index-rule-btn" onTap="showRuleModal">活动规则</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>
<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
<view>正在加载...</view>
</view>
\ No newline at end of file
dist/pages/index/index.js
View file @
d70bb176
...
...
@@ -23,7 +23,10 @@ Page({
console
.
info
(
`Page onLoad with query:
${
JSON
.
stringify
(
query
)}
`
);
},
init
()
{
this
.
getIndex
();
// this.getIndex();
my
.
redirectTo
({
url
:
'/pages/pageshou_ye/pageshou_ye'
});
// my.redirectTo({url:'/pages/pagehuo_dong_ye/pagehuo_dong_ye'});
},
onReady
()
{
// 页面加载完成
...
...
@@ -78,12 +81,18 @@ Page({
* 登录接口
*/
async
login
()
{
this
.
init
();
return
;
const
{
nickName
,
avatar
}
=
app
;
const
{
success
}
=
await
API
.
login
({
userNick
:
nickName
,
avatar
}).
catch
(
res
=>
{
console
.
log
(
'登录失败..'
)
commonToast
(
res
&&
res
.
message
);
})
||
{};
if
(
success
)
{
console
.
log
(
'登录成功,正在初始化'
)
this
.
init
();
}
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment