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
a8bce5b4
Commit
a8bce5b4
authored
Sep 07, 2020
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
d70bb176
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
9 deletions
+17
-9
api.js
dist/api.js
+4
-0
app.js
dist/app.js
+1
-1
index.js
dist/pages/index/index.js
+12
-8
No files found.
dist/api.js
View file @
a8bce5b4
...
...
@@ -16,6 +16,10 @@ const apiList = {
handle
:
'index'
,
isShowLoading
:
true
},
getActivityBaseInfoById
:
{
handle
:
'getActivityBaseInfoById'
,
isShowLoading
:
true
},
login
:
'login'
};
...
...
dist/app.js
View file @
a8bce5b4
...
...
@@ -7,7 +7,7 @@ cloud.init({
App
({
requestType
:
'cloud'
,
// ams:ams接口,cloud: 云函数
cloudName
:
'
bubbleSurviva
'
,
// 主云函数项目名 base clientTemplate2C
cloudName
:
'
floor
'
,
// 主云函数项目名 base clientTemplate2C
cloud
,
tbcc
,
onLaunch
(
options
)
{
...
...
dist/pages/index/index.js
View file @
a8bce5b4
...
...
@@ -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'
});
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
);
})
||
{};
...
...
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