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
2cc2b8f4
Commit
2cc2b8f4
authored
Oct 16, 2020
by
Edwise
🍷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
111
parent
0b78ea6b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2284 additions
and
230 deletions
+2284
-230
comunlockstepmodal.js
...lient/components/comunlockstepmodal/comunlockstepmodal.js
+2
-2
myprize.js
taobao_jn/client/pages/myprize/myprize.js
+302
-228
debug.log
taobao_jn/debug.log
+1980
-0
No files found.
taobao_jn/client/components/comunlockstepmodal/comunlockstepmodal.js
View file @
2cc2b8f4
...
...
@@ -30,8 +30,8 @@ Component({
},
didMount
(){
const
{
unLockStep
,
warms
}
=
this
.
props
.
gameOverData
;
let
str
=
unLockStep
==
2
?
'恭喜您解锁5系赛段
,获得30温暖值'
:
'恭喜您解锁7系赛段,,获得50温暖值
'
;
let
str1
=
unLockStep
==
2
?
'进入三人场
'
:
'进入四人场
'
;
let
str
=
unLockStep
==
2
?
'恭喜您解锁5系赛段
'
:
'恭喜您解锁7系赛段
'
;
let
str1
=
unLockStep
==
2
?
'进入三人场
,获得30温暖值'
:
'进入四人场,获得50温暖值
'
;
this
.
setData
({
unLockStep
:
unLockStep
,
title1
:
str
,
...
...
taobao_jn/client/pages/myprize/myprize.js
View file @
2cc2b8f4
'use strict'
;
import
API
from
"/api"
;
import
{
SHARE_CONFIG
}
from
'/tbcc-sdk/lib/constants'
;
import
{
SHARE_CONFIG
}
from
'/tbcc-sdk/lib/constants'
;
const
app
=
getApp
();
const
{
tbcc
}
=
app
;
const
{
commonToast
,
navigateToOutside
,
getUserAddress
,
setClipboard
}
=
tbcc
.
tb
;
const
{
PRIZE_TYPE_MAP
,
PRIZE_DRAW_STATUS_MAP
}
=
tbcc
.
constants
;
const
{
tbcc
}
=
app
;
const
{
commonToast
,
navigateToOutside
,
getUserAddress
,
setClipboard
}
=
tbcc
.
tb
;
const
{
PRIZE_TYPE_MAP
,
PRIZE_DRAW_STATUS_MAP
}
=
tbcc
.
constants
;
let
flag
=
false
;
...
...
@@ -13,7 +25,7 @@ Page({
PRIZE_TYPE_MAP
,
PRIZE_DRAW_STATUS_MAP
,
myPrizeList
:
null
,
//我的奖品
endTime
:
null
,
//到期时间
endTime
:
null
,
//到期时间
task
:
{
image
:
{
bg
:
'//yun.duiba.com.cn/spark/assets/myprizeBg.1f636c459b0a7e272f3cc65c80c7bc2a88bc2833.jpg'
,
//背景图
...
...
@@ -56,9 +68,9 @@ Page({
const
t1
=
`
${
yy
}
年
${
mm
}
月
${
dd
}
日`
;
// console.log(new Date(endTime).toLocaleDateString())
// const t1 = new Date(endTime).toLocaleDateString() + '';//获取年月日
const
t2
=
new
Date
(
endTime
).
getHours
()
+
''
;
//获取时
const
t3
=
new
Date
(
endTime
).
getMinutes
()
+
''
;
//获取分
const
t4
=
new
Date
(
endTime
).
getMilliseconds
()
+
''
;
//获取秒
const
t2
=
new
Date
(
endTime
).
getHours
()
+
''
;
//获取时
const
t3
=
new
Date
(
endTime
).
getMinutes
()
+
''
;
//获取分
const
t4
=
new
Date
(
endTime
).
getMilliseconds
()
+
''
;
//获取秒
console
.
log
(
endTime
,
new
Date
(
endTime
+
48
*
60
*
60
*
1000
).
toLocaleString
(),
'endTime'
);
this
.
setData
({
endTime
:
t1
+
""
+
t2
.
padStart
(
2
,
'0'
)
+
":"
+
t3
.
padStart
(
2
,
'0'
)
+
":"
+
t4
.
padStart
(
2
,
'0'
)
...
...
@@ -70,11 +82,19 @@ Page({
* @param {string} type 是否展示loading
*/
async
getMyPrize
(
type
)
{
const
{
activityId
}
=
app
;
const
{
activityId
}
=
app
;
if
(
type
!=
'noLoading'
)
{
my
.
showLoading
();
}
const
{
success
,
data
,
message
}
=
await
API
.
getMyPrizeList
({
activityId
}).
catch
(
res
=>
{
const
{
success
,
data
,
message
}
=
await
API
.
getMyPrizeList
({
activityId
}).
catch
(
res
=>
{
this
.
setData
({
myPrizeList
:
[]
})
...
...
@@ -92,8 +112,10 @@ Page({
//领取奖品
async
handleClick
(
e
)
{
console
.
log
(
"领取奖品"
,
e
)
const
{
item
}
=
e
.
target
.
dataset
;
console
.
log
(
"领取奖品"
,
e
)
const
{
item
}
=
e
.
target
.
dataset
;
// 领取权益
if
(
item
.
type
===
PRIZE_TYPE_MAP
.
EQUITY
)
return
this
.
handleGetEquity
(
e
)
// 领取实物
...
...
@@ -107,10 +129,20 @@ Page({
return
}
flag
=
true
;
const
{
activityId
}
=
app
;
const
{
item
}
=
e
.
target
.
dataset
;
const
{
activityId
}
=
app
;
const
{
item
}
=
e
.
target
.
dataset
;
console
.
log
(
item
,
'领取权益'
)
const
{
success
,
data
,
message
}
=
await
API
.
receiveEnamePrize
({
_id
:
item
.
_id
}).
catch
(
res
=>
{
const
{
success
,
data
,
message
}
=
await
API
.
receiveEnamePrize
({
id
:
item
.
_id
}).
catch
(
res
=>
{
this
.
getMyPrize
(
'noLoading'
)
commonToast
(
res
&&
res
.
message
)
})
||
{};
...
...
@@ -129,31 +161,46 @@ Page({
}
// my.showLoading();
flag
=
true
;
setTimeout
(()
=>
{
setTimeout
(()
=>
{
flag
=
false
},
500
)
},
500
)
console
.
log
(
'领取实物'
)
const
{
activityId
}
=
app
;
const
{
item
}
=
e
.
target
.
dataset
;
const
userAddress
=
await
getUserAddress
({
joinTag
:
" "
}).
catch
((
data
)
=>
{
const
{
activityId
}
=
app
;
const
{
item
}
=
e
.
target
.
dataset
;
const
userAddress
=
await
getUserAddress
({
joinTag
:
" "
}).
catch
((
data
)
=>
{
flag
=
false
console
.
log
(
'getUserAddress出错了,错误信息是'
,
data
);
console
.
log
(
'getUserAddress出错了,错误信息是'
,
data
);
})
// my.hideLoading();
if
(
!
userAddress
)
return
// commonToast(' getUserAddress =>'+JSON.stringify( userAddress))
const
{
name
,
telNumber
,
provinceName
,
cityName
,
cityCode
,
countyName
,
detailInfo
,
streetName
}
=
userAddress
||
{};
const
{
name
,
telNumber
,
provinceName
,
cityName
,
cityCode
,
countyName
,
detailInfo
,
streetName
}
=
userAddress
||
{};
const
params
=
{
activityId
,
area
:
countyName
,
addressDetail
:
detailInfo
,
area
:
countyName
,
addressDetail
:
detailInfo
,
name
,
phone
:
telNumber
,
detailInfo
,
cityCode
,
cityName
,
city
:
cityName
,
province
:
provinceName
,
city
:
cityName
,
province
:
provinceName
,
provinceName
,
countyName
,
streetName
,
...
...
@@ -167,7 +214,9 @@ Page({
cancelButtonText
:
'取消'
,
success
:
(
result
)
=>
{
console
.
log
(
result
)
const
{
confirm
}
=
result
;
const
{
confirm
}
=
result
;
if
(
confirm
)
{
this
.
receiveObjectPrize
(
params
);
...
...
@@ -184,14 +233,18 @@ Page({
// commonToast(JSON.stringify(res))
// }, 5000);
const
{
success
,
data
,
message
}
=
res
;
const
{
success
,
data
,
message
}
=
res
;
if
(
success
&&
data
)
{
commonToast
(
'领取成功'
)
}
else
{
commonToast
(
message
)
}
this
.
getMyPrize
()
},(
rej
)
=>
{
},
(
rej
)
=>
{
commonToast
(
rej
.
message
)
});
},
...
...
@@ -204,7 +257,10 @@ Page({
console
.
log
(
item
,
'领取积分'
)
// 判断是否为会员
await
this
.
getUserInfo
()
const
{
isVip
,
vipLink
}
=
app
;
const
{
isVip
,
vipLink
}
=
app
;
if
(
!
isVip
)
{
commonToast
(
'立即加入会员,即可领取奖品'
,
2000
);
setTimeout
(()
=>
{
...
...
@@ -213,10 +269,20 @@ Page({
flag
=
false
return
}
const
{
activityId
}
=
app
;
const
{
item
}
=
e
.
target
.
dataset
;
const
{
activityId
}
=
app
;
const
{
item
}
=
e
.
target
.
dataset
;
console
.
log
(
item
,
'领取积分'
)
const
{
success
,
data
,
message
}
=
await
API
.
receiveEnamePrize
({
activityId
,
_id
:
item
.
_id
})
||
{};
const
{
success
,
data
,
message
}
=
await
API
.
receiveEnamePrize
({
id
:
item
.
_id
})
||
{};
if
(
success
&&
data
)
{
commonToast
(
'领取成功'
)
}
else
{
...
...
@@ -228,8 +294,16 @@ Page({
//获取用户vip信息
async
getUserInfo
()
{
const
{
activityId
}
=
app
;
const
{
success
,
data
,
message
}
=
await
API
.
getVipInfo
({
activityId
})
||
{};
const
{
activityId
}
=
app
;
const
{
success
,
data
,
message
}
=
await
API
.
getVipInfo
({
activityId
})
||
{};
console
.
log
(
data
,
'用户vip信息'
);
if
(
success
&&
data
)
{
app
.
isVip
=
(
data
&&
data
.
isVip
)
||
false
;
...
...
taobao_jn/debug.log
View file @
2cc2b8f4
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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