Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
new_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
new_taobao
Commits
6a35ca75
Commit
6a35ca75
authored
Sep 30, 2020
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
d07987ea
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
21 deletions
+32
-21
api.js
taobao_mini/client/api.js
+5
-5
package.json
taobao_mini/client/package.json
+0
-1
index.js
taobao_mini/client/pages/index/index.js
+27
-15
No files found.
taobao_mini/client/api.js
View file @
6a35ca75
...
...
@@ -15,14 +15,14 @@ const apiList = {
login
:
{
handle
:
'login'
,
method
:
'get'
,
isShowLoading
:
tru
e
isShowLoading
:
fals
e
},
// 获取游戏信息
getGameInfo
:
{
handle
:
'getGameInfo'
,
method
:
'get'
,
isShowLoading
:
tru
e
isShowLoading
:
fals
e
},
// 埋点接口
...
...
@@ -36,7 +36,7 @@ const apiList = {
drawLotteryPrize
:
{
handle
:
'lottery'
,
method
:
'get'
,
isShowLoading
:
tru
e
isShowLoading
:
fals
e
},
// 获取大转盘所有奖品信息
...
...
@@ -50,14 +50,14 @@ const apiList = {
doJoin
:
{
handle
:
'doJoin'
,
method
:
'get'
,
isShowLoading
:
tru
e
isShowLoading
:
fals
e
},
// 完成游戏
gameOver
:
{
handle
:
'gameOver'
,
method
:
'get'
,
isShowLoading
:
tru
e
isShowLoading
:
fals
e
},
// 观看视频发放雅顿币
...
...
taobao_mini/client/package.json
View file @
6a35ca75
...
...
@@ -6,7 +6,6 @@
"dependencies"
:
{
"@tbmp/mp-cloud-sdk"
:
"*"
,
"fyge-tbmini"
:
"^1.3.7"
,
"mini-types"
:
"^0.1.4"
,
"tans_lottie"
:
"^1.0.4"
}
}
taobao_mini/client/pages/index/index.js
View file @
6a35ca75
...
...
@@ -12,7 +12,7 @@ const SHARE_CONFIG = {
Page
({
doShare
()
{
my
.
showSharePanel
();
},
doShare
()
{
my
.
showSharePanel
();
},
data
:
{
},
...
...
@@ -20,6 +20,7 @@ Page({
// 页面加载
this
.
getAuth
();
console
.
info
(
`Page onLoad with query:
${
JSON
.
stringify
(
query
)}
`
);
this
.
inviteId
=
query
.
inviteId
;
},
/**
* 获取用户授权信息
...
...
@@ -40,19 +41,30 @@ Page({
* 登录接口
*/
async
login
()
{
const
{
nickName
,
avatar
,
isFollow
}
=
app
;
const
{
success
,
data
}
=
await
API
.
login
({
userNick
:
nickName
,
avatar
,
isFollow
:
true
}).
catch
(
res
=>
{
const
{
nickName
,
avatar
,
isFollow
}
=
app
;
const
{
success
,
data
}
=
await
API
.
login
({
userNick
:
nickName
,
avatar
,
isFollow
:
true
}).
catch
(
res
=>
{
commonToast
(
res
&&
res
.
message
);
})
||
{};
if
(
success
)
{
const
{
openId
}
=
data
;
app
.
openId
=
openId
;
const
{
openId
}
=
data
;
app
.
openId
=
openId
;
this
.
init
();
}
},
init
()
{
console
.
log
(
'do init'
)
console
.
log
(
'do init'
);
//有的时候是首页弹出助力弹窗
//有的时候是有单独的落地页
//如果是首页弹出助力弹窗
if
(
this
.
inviteId
)
{
commonToast
(
'首页助力类型,这是被邀请人页面'
)
}
else
{
commonToast
(
'首页助力类型,这是邀请人页面'
)
}
//todo 如果需要弹出邀请结果弹窗
},
onReady
()
{
// 页面加载完成
...
...
@@ -121,5 +133,5 @@ Page({
...
rest
,
path
}
}
}
});
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