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
b32a8b99
Commit
b32a8b99
authored
Sep 26, 2020
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
9572f489
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
577 additions
and
38 deletions
+577
-38
tmallCat.getMyPrizeList.json
.../src/canvas/game/mock/miniTb/tmallCat.getMyPrizeList.json
+499
-0
app.js
taobao_mini/client/app.js
+1
-1
prizeModal.acss
taobao_mini/client/components/prizeModal/prizeModal.acss
+6
-6
myprize.js
taobao_mini/client/pages/myprize/myprize.js
+68
-28
pagecanvas.js
taobao_mini/client/pages/pagecanvas/pagecanvas.js
+3
-3
No files found.
project/src/canvas/game/mock/miniTb/tmallCat.getMyPrizeList.json
0 → 100644
View file @
b32a8b99
This diff is collapsed.
Click to expand it.
taobao_mini/client/app.js
View file @
b32a8b99
...
...
@@ -9,7 +9,7 @@ cloud.init({
App
({
env
,
requestType
:
'cloud'
,
// yapi,cloud: 云函数
//
requestType: 'local', // yapi,cloud: 云函数
requestType
:
'local'
,
// yapi,cloud: 云函数
cloudName
:
'tmallCat'
,
// 主云函数项目名 tmallCat
// cloudName: 'bubbleSurviva', // 主云函数项目名 tmallCat
cloud
,
...
...
taobao_mini/client/components/prizeModal/prizeModal.acss
View file @
b32a8b99
...
...
@@ -17,10 +17,10 @@
}
.my-prize-page .my-prize-label {
width:
286
rpx;
height:
49
rpx;
margin:
140rpx auto 40rpx
;
background: url('//yun.duiba.com.cn/aurora/assets/
a15fe07a819f3f6deb271725b37468030523dc05
.png') no-repeat;
width:
171
rpx;
height:
50
rpx;
margin:
40rpx auto
;
background: url('//yun.duiba.com.cn/aurora/assets/
2f075d102e58cd42fa938d6e23cb6ffd4a2a9486
.png') no-repeat;
background-size: 100% 100%;
}
...
...
@@ -46,8 +46,8 @@
width: 700rpx;
height: 161rpx;
background-color: #ffffff;
border-color:
rgb(255, 63, 38)
;
border-width:
1
rpx;
border-color:
#7f674e
;
border-width:
5
rpx;
border-style: solid;
/* box-shadow: 2rpx 3rpx 18rpx 0 rgb(255, 63, 38); */
border-radius: 10rpx;
...
...
taobao_mini/client/pages/myprize/myprize.js
View file @
b32a8b99
...
...
@@ -16,16 +16,16 @@ Page({
endTime
:
null
,
//到期时间
task
:
{
image
:
{
bg
:
'//yun.duiba.com.cn/aurora/assets/
7283d715cc5c7d13a5f498d15f5f5b9f4d9c29e5
.jpg'
,
//背景图
copyIcon
:
'//yun.dui
88.com/duiba-components-c-myprizemyprize_copy_code
.png'
,
//复制
addressBth
:
'//yun.duiba.com.cn/aurora/assets/
82cc3c6d8861334ebaf128c98e3341b687bdc007
.png'
,
//填写地址(实物奖品)
getBth
:
'//yun.dui
88.com/duiba-components-c-myprizeget_now
.png'
,
//立即领取(除实物奖品外)
bg
:
'//yun.duiba.com.cn/aurora/assets/
8fa7cea57cc7071bcc1cbada32f5bfaeb2203981
.jpg'
,
//背景图
copyIcon
:
'//yun.dui
ba.com.cn/aurora/assets/721e5319d26a4edbb0282558fb87d9bda1de4887
.png'
,
//复制
addressBth
:
'//yun.duiba.com.cn/aurora/assets/
7ff6342492c2ce1a94ccfce39c88983b296b35fb
.png'
,
//填写地址(实物奖品)
getBth
:
'//yun.dui
ba.com.cn/aurora/assets/0725f0f5569ad12d37853ad5c40d163fbe247abf
.png'
,
//立即领取(除实物奖品外)
logisticsBth
:
'//yun.duiba.com.cn/aurora/assets/661f86ff3392cb3b56922b048acf74bebc07bb23.png'
,
//查看物流
useBtn
:
'//yun.duiba.com.cn/aurora/assets/0829f92f771c5e9fdb05a258a46b2d038d3a9997.png'
,
//去使用(除实物奖品外)
gotBtn
:
'//yun.duiba.com.cn/aurora/assets/
1120dd6b6ce4abe2666e877e3ae33eb99a778009
.png'
,
//已领取(优惠券)
getAgainBtn
:
'//yun.duiba.com.cn/aurora/assets/
716f0a388144945b169554a30ff4a16f7bcb95ab
.png'
,
//重新领取
invalidBtn
:
'//yun.duiba.com.cn/
spark/assets/914ba8643c8abb8d710a3126ec312aecf6c4daf0
.png'
,
//已失效
failBth
:
'//yun.duiba.com.cn/
spark/assets/8267375232058a6d0140270b1594427fb08d6ae3
.png'
,
//领取失败
gotBtn
:
'//yun.duiba.com.cn/aurora/assets/
30fa200ba1dcd345247f957c16a03a9706895112
.png'
,
//已领取(优惠券)
getAgainBtn
:
'//yun.duiba.com.cn/aurora/assets/
f2bc6220c3b210a4b315ab1bfcc4ebeffcf854ba
.png'
,
//重新领取
invalidBtn
:
'//yun.duiba.com.cn/
aurora/assets/2790bbc504bd94bd7914771e5ba1202e9f011a1a
.png'
,
//已失效
failBth
:
'//yun.duiba.com.cn/
aurora/assets/7bdd43b0b86094c3cf121abb204824985a13035b
.png'
,
//领取失败
},
logisticsImage
:
{
shipped
:
'//yun.duiba.com.cn/aurora/assets/3a7b68ec171ee339ce619d19f6ae3f9c1e6d801a.png'
,
// 已发货物理弹窗
...
...
@@ -33,8 +33,8 @@ Page({
copyIcon
:
'//yun.dui88.com/duiba-components-c-myprizemyprize_copy_code.png'
,
//复制
},
btnStyle
:
{
// 按钮自定义样式
width
:
'15
0
rpx'
,
height
:
'4
1
rpx'
,
width
:
'15
4
rpx'
,
height
:
'4
9
rpx'
,
}
}
},
...
...
@@ -100,23 +100,63 @@ Page({
// 领取积分
if
(
item
.
type
===
PRIZE_TYPE_MAP
.
INTEGRATION
)
return
this
.
handleGetIntergation
(
e
)
},
/**
* 发奖
*/
async
cloudTBIssue
(
params
)
{
const
{
cloud
}
=
app
;
return
new
Promise
((
resolve
,
reject
)
=>
{
my
.
authorize
({
scopes
:
"scope.latourBenefit"
,
success
:
async
()
=>
{
const
result
=
await
cloud
.
topApi
.
invoke
({
api
:
"alibaba.latour.strategy.issue"
,
data
:
{
channel
:
params
.
channel
||
""
,
strategy_code
:
params
.
strategyCode
||
""
,
selected_benefit_code
:
params
.
code
||
""
,
},
})
.
catch
((
err
)
=>
{
console
.
log
(
"alibaba.latour.strategy.issue------catch"
,
err
);
});
console
.
log
(
result
,
"result"
);
resolve
(
result
);
},
fail
:
(
err
)
=>
{
console
.
log
(
"scope.latourBenefit----fail"
,
err
);
reject
(
err
);
},
});
})
},
// 优惠券
async
handleGetEquity
(
e
)
{
if
(
flag
)
{
return
}
flag
=
true
;
const
{
activityId
}
=
app
;
const
{
item
}
=
e
.
target
.
dataset
;
console
.
log
(
item
,
'领取权益'
)
const
{
success
,
data
,
message
}
=
await
API
.
receiveEnamePrize
({
activityId
,
_id
:
item
.
_id
}).
catch
(
res
=>
{
this
.
getMyPrize
(
'noLoading'
)
commonToast
(
res
&&
res
.
message
)
})
||
{};
if
(
success
&&
data
)
{
commonToast
(
'领取成功'
)
this
.
getMyPrize
()
}
const
{
item
:{
strategyCode
,
code
}
}
=
e
.
target
.
dataset
;
this
.
cloudTBIssue
({
strategyCode
,
code
})
// const { activityId } = app;
// console.log(item, '领取权益')
// const { success, data, message } = await API.receiveEnamePrize({ activityId, _id: item._id }).catch(res => {
// this.getMyPrize('noLoading')
// commonToast(res && res.message)
// }) || {};
// if (success && data) {
// commonToast('领取成功')
// this.getMyPrize()
// }
setTimeout
(()
=>
{
flag
=
false
},
500
)
...
...
@@ -130,9 +170,9 @@ Page({
flag
=
true
;
const
{
activityId
}
=
app
;
const
{
item
}
=
e
.
target
.
dataset
;
const
userAddress
=
await
getUserAddress
({
joinTag
:
" "
}).
catch
((
data
)
=>
{
const
userAddress
=
await
getUserAddress
({
joinTag
:
" "
}).
catch
((
data
)
=>
{
flag
=
false
console
.
log
(
'getUserAddress出错了,错误信息是'
,
data
);
console
.
log
(
'getUserAddress出错了,错误信息是'
,
data
);
})
// my.hideLoading();
if
(
!
userAddress
)
return
...
...
@@ -140,15 +180,15 @@ Page({
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
,
...
...
@@ -186,7 +226,7 @@ Page({
commonToast
(
message
)
}
this
.
getMyPrize
()
},
(
rej
)
=>
{
},
(
rej
)
=>
{
commonToast
(
rej
.
message
)
});
},
...
...
taobao_mini/client/pages/pagecanvas/pagecanvas.js
View file @
b32a8b99
...
...
@@ -104,9 +104,9 @@ Page({
this
.
main
&&
this
.
main
.
dispatchGlobalEvent
(
"UPDATE_USERINFO"
)
}
//
setTimeout(() => {
//
my.__pageTo__('myprize')
// }, 20
00);
setTimeout
(()
=>
{
my
.
__pageTo__
(
'myprize'
)
},
1
00
);
},
initCanvas
()
{
...
...
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