Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
dev
/
marubi-wish-list-mp
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
31666554
authored
2019-08-17 00:11:07 +0800
by
simon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
no message
1 parent
4f63187f
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
194 additions
and
42 deletions
src/component/empty-tips/empty-tips.js
src/component/empty-tips/empty-tips.wxml
src/component/tips-prize-comp/tips-prize-comp.js
src/component/use-notice-comp/use-notice-comp.wxml
src/const/custom-data.js
src/pages/index/index.js
src/pages/index/index.scss
src/pages/index/index.wxml
src/pages/poster/poster.js
src/pages/prize-detail/prize-detail.js
src/pages/prize-detail/prize-detail.scss
src/pages/prize-detail/prize-detail.wxml
src/pages/rank/rank.scss
src/pages/rank/rank.wxml
src/pages/user-table/user-table.scss
src/pages/user-table/user-table.wxml
src/pages/wish/wish.js
src/router/index.js
src/component/empty-tips/empty-tips.js
View file @
3166655
...
...
@@ -6,7 +6,7 @@ Component({
// 这里定义了innerText属性,属性值可以在组件使用时指定
innerText
:
{
type
:
String
,
value
:
'
default value
'
,
value
:
'
这里空空如也~
'
,
},
emptyVisible
:
{
type
:
Boolean
,
...
...
src/component/empty-tips/empty-tips.wxml
View file @
3166655
...
...
@@ -2,6 +2,7 @@
<view class="empty-tips">
<view class="tips">
<span class="iconfont iconempty"></span>
<view class="tips">这里空空如也~</view>
<view ></view>
<text class="tips">{{innerText}}</text>
</view>
</view>
...
...
src/component/tips-prize-comp/tips-prize-comp.js
View file @
3166655
...
...
@@ -35,7 +35,6 @@ Component({
},
/**
* 提交礼品领取方式
*/
queryWishbillAcceptTypeSubmit
(
acceptType
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
...
...
@@ -47,36 +46,43 @@ Component({
acceptType
:
acceptType
}
}).
then
((
result
)
=>
{
// 再查看奖品
app
.
post
({
url
:
app
.
api
.
wishbillGiftQuery
,
data
:
{
instanceCode
:
wishInfo
.
instanceCode
}
}).
then
((
result
)
=>
{
let
curData
=
app
.
globalData
.
giftData
curData
=
Object
.
assign
(
curData
,
result
);
app
.
globalData
.
giftData
=
curData
;
console
.
log
(
"app.globalData.giftData 333:"
,
app
.
globalData
.
giftData
);
console
.
log
(
JSON
.
stringify
(
app
.
globalData
.
giftData
));
resolve
(
result
)
})
})
});
},
// 自提
toSelfLiftHandler
()
{
this
.
queryWishbillAcceptTypeSubmit
(
2
).
then
((
result
)
=>
{
console
.
log
(
"prize-self-result:"
,
result
);
let
wishInfo
=
this
.
properties
.
wishInfo
;
let
query
=
Object
.
assign
(
wishInfo
,
result
);
console
.
log
(
"prize-self-query:"
,
query
);
this
.
hideMask
();
app
.
router
.
push
({
path
:
"prizeDetail"
,
query
:
query
})
})
},
// 邮寄
toUserTableHandler
()
{
this
.
queryWishbillAcceptTypeSubmit
(
1
).
then
((
result
)
=>
{
console
.
log
(
"prize-table-result:"
,
result
);
let
wishInfo
=
this
.
properties
.
wishInfo
;
let
query
=
Object
.
assign
(
wishInfo
,
result
);
console
.
log
(
"prize-table-query:"
,
query
);
this
.
hideMask
();
app
.
router
.
push
({
path
:
"userTable"
,
query
:
query
})
})
},
...
...
src/component/use-notice-comp/use-notice-comp.wxml
View file @
3166655
<view class="comp-item">
<image class="notice" mode="widthFix" src="../../image/oss/coupon-detail/cd-c3.png?ver=
1
" />
<image class="notice" mode="widthFix" src="../../image/oss/coupon-detail/cd-c3.png?ver=
2
" />
</view>
...
...
src/const/custom-data.js
View file @
3166655
...
...
@@ -183,6 +183,117 @@ let productMap = {
}
var
ttttt
=
{
"prizeDefineCode"
:
"P000000000000000000000000000008"
,
"price"
:
"398"
,
"commodityNo"
:
"11047004"
,
"instanceCode"
:
"e5e59a7aa9da46a2b2359ec2f85636b9"
,
"accessStatus"
:
2
,
"prizeName"
:
"丸美纯色之恋光透精华液30ml"
,
"prizePic"
:
""
,
"initialElasticValue"
:
98
,
"conditionElasticValue"
:
3980
,
"elasticValue"
:
8898
,
"storeRemain"
:
149
,
"name"
:
"丸美纯色之恋光透精华液30ml"
,
"tag"
:
2
,
"sence"
:
1
,
"point"
:
{
"left"
:
210
,
"top"
:
400
},
"tips"
:
{
"type"
:
"top-left"
,
"point"
:
{
"fixLeft"
:
-
188
,
"fixTop"
:
-
314
}
},
"progress"
:
100
,
"progressLeft"
:
169.00000000000003
,
"status"
:
1
,
"order"
:
{
"coupon"
:
{
"couponId"
:
"20839"
,
"couponCode"
:
"RLLA1BDJ"
,
"rule"
:
"RLLA1BDJ"
,
"startDate"
:
1565953849000
,
"endDate"
:
1568563199000
,
"type"
:
4
,
"name"
:
"眼部护理体验券-7月24日"
,
"state"
:
0
},
"status"
:
1
,
"orderSn"
:
"MW201908161910471000012"
,
"storeName"
:
""
,
"storeAddress"
:
""
,
"latitude"
:
0
,
"longitude"
:
0
,
"instanceCode"
:
"e5e59a7aa9da46a2b2359ec2f85636b9"
,
"storeCode"
:
""
,
"acceptType"
:
2
,
"prizeName"
:
"丸美纯色之恋光透精华液30ml"
,
"commodityNo"
:
"11047004"
},
"coupon"
:
null
}
var
qqq
=
{
"prizeDefineCode"
:
"P000000000000000000000000000008"
,
"price"
:
"398"
,
"commodityNo"
:
"11047004"
,
"instanceCode"
:
"d2ce21c064574899932b7747737c1493"
,
"accessStatus"
:
1
,
"prizeName"
:
"丸美纯色之恋光透精华液30ml"
,
"prizePic"
:
""
,
"initialElasticValue"
:
88
,
"conditionElasticValue"
:
3980
,
"elasticValue"
:
9988
,
"storeRemain"
:
149
,
"name"
:
"丸美纯色之恋光透精华液30ml"
,
"tag"
:
2
,
"sence"
:
1
,
"point"
:
{
"left"
:
210
,
"top"
:
400
},
"tips"
:
{
"type"
:
"top-left"
,
"point"
:
{
"fixLeft"
:
-
188
,
"fixTop"
:
-
314
}
},
"progress"
:
100
,
"progressLeft"
:
169.00000000000003
,
"status"
:
1
,
"order"
:
{
"coupon"
:
{
"couponId"
:
"20839"
,
"couponCode"
:
"RLL81B9M"
,
"rule"
:
"RLL81B9M"
,
"startDate"
:
1565955185000
,
"endDate"
:
1568563199000
,
"type"
:
4
,
"name"
:
"眼部护理体验券-7月24日"
,
"state"
:
0
},
"status"
:
1
,
"orderSn"
:
"MW201908161933021000015"
,
"storeName"
:
""
,
"storeAddress"
:
""
,
"latitude"
:
0
,
"longitude"
:
0
,
"instanceCode"
:
"d2ce21c064574899932b7747737c1493"
,
"storeCode"
:
""
,
"acceptType"
:
2
,
"prizeName"
:
"丸美纯色之恋光透精华液30ml"
,
"commodityNo"
:
"11047004"
},
"coupon"
:
null
}
module
.
exports
=
{
productMap
:
productMap
}
...
...
src/pages/index/index.js
View file @
3166655
...
...
@@ -13,7 +13,6 @@ Page({
})
},
onLoad
(
options
)
{
let
sessionId
=
app
.
store
.
getItem
(
'sessionId'
);
if
(
sessionId
)
{
app
.
queryIndex
({
...
...
src/pages/index/index.scss
View file @
3166655
...
...
@@ -14,7 +14,7 @@
position
:
absolute
;
width
:
750px
;
height
:
1303px
;
top
:
-130px
;
//
top: -130px;
}
}
...
...
@@ -25,7 +25,7 @@
position
:
absolute
;
width
:
160px
;
height
:
192px
;
top
:
0
;
top
:
-100px
;
left
:
0
;
}
...
...
@@ -40,7 +40,7 @@
.main
{
.top-space
{
height
:
1
04
2px
;
height
:
1
12
2px
;
}
.content
{
...
...
src/pages/index/index.wxml
View file @
3166655
<view class="page">
<view class="app__bgc bgc">
<image src="../../image/oss/index/index-c1.png" mode="scaleToFill" />
<image src="../../image/oss/index/index-c1.png
?ver=1
" mode="scaleToFill" />
</view>
<view class="app__bg bg">
<image src="../../image/oss/index/index-c2.png" mode="scaleToFill" />
<image src="../../image/oss/index/index-c2.png
?ver=1
" mode="scaleToFill" />
</view>
<view class="decoration">
<image class="d1" src="../../image/oss/index/index-c4.png" mode="widthFix" />
...
...
src/pages/poster/poster.js
View file @
3166655
...
...
@@ -33,7 +33,7 @@ Page({
}).
then
((
result
)
=>
{
console
.
log
(
"result:"
,
result
);
wx
.
showLoading
({
title
:
'海报
生成中
'
,
title
:
'海报
在修图中···”
'
,
});
this
.
initData
();
})
...
...
src/pages/prize-detail/prize-detail.js
View file @
3166655
import
{
getBindtapData
,
pxToRpx
,
...
...
@@ -44,7 +43,7 @@ Page({
let
couponInfo
=
wishInfo
.
coupon
;
// 设置二维码
let
qrSize
=
this
.
setCanvasSize
(
3
00
);
let
qrSize
=
this
.
setCanvasSize
(
4
00
);
console
.
log
(
"couponInfo:"
,
couponInfo
);
let
codeContent
=
couponInfo
.
couponCode
||
''
;
this
.
createQrCode
(
codeContent
,
'qrcanvas'
,
qrSize
.
w
,
qrSize
.
h
);
...
...
@@ -229,10 +228,11 @@ Page({
case
"_evt_submit_store_complete"
:
// 刷新状态
this
.
hideMask
();
app
.
post
({
url
:
app
.
api
.
wishbillGiftQuery
,
data
:
{
instanceCode
:
curData
.
instanceCode
instanceCode
:
this
.
data
.
wishInfo
.
instanceCode
}
}).
then
((
result
)
=>
{
...
...
src/pages/prize-detail/prize-detail.scss
View file @
3166655
...
...
@@ -81,18 +81,18 @@
// 二维码
.qrcode
{
width
:
3
00px
;
height
:
3
00px
;
margin
:
0
auto
;
width
:
4
00px
;
height
:
4
00px
;
margin
:
-28px
auto
-30px
;
image
{
width
:
3
00px
;
height
:
3
00px
;
width
:
4
00px
;
height
:
4
00px
;
}
canvas
{
width
:
3
00px
;
height
:
3
00px
;
width
:
4
00px
;
height
:
4
00px
;
}
}
...
...
@@ -182,8 +182,10 @@
.top
{
display
:
flex
;
margin
:
0
auto
36px
;
margin
:
0
auto
0
;
justify-content
:
center
;
position
:
relative
;
z-index
:
11
;
}
.display
{
...
...
src/pages/prize-detail/prize-detail.wxml
View file @
3166655
...
...
@@ -19,7 +19,7 @@
<image class="prod" mode="aspectFit" src="../../image/prize/prize-1.png" />
</view>
<view class="info">
<view class="name">{{
couponInfo.n
ame}}</view>
<view class="name">{{
wishInfo.prizeN
ame}}</view>
<view class="c1">手机号:{{userInfo.mobile}}</view>
<view class="c1">派券日期:{{couponInfo.startDateStr}}</view>
<view class="c1">有效日期:{{couponInfo.endDateStr}}</view>
...
...
src/pages/rank/rank.scss
View file @
3166655
...
...
@@ -218,14 +218,22 @@
.empty
{
text-align
:
center
;
// padding-top: 80px;
padding-top
:
260px
;
font-size
:
28px
;
color
:
#999999
;
.iconfont
{
font-size
:
100px
;
}
.logo
{
width
:
140px
;
height
:
140px
;
}
.tips
{
color
:
#333333
;
.tips
{
margin-top
:
24px
;
}
}
...
...
src/pages/rank/rank.wxml
View file @
3166655
...
...
@@ -55,7 +55,7 @@
</view>
</view>
<!-- 下方排行榜 -->
<view wx:if="{{downRank.length >
2
}}" class="rank">
<view wx:if="{{downRank.length >
0
}}" class="rank">
<view wx:for="{{downRank}}" wx:key="{{index}}" class="rank-item {{downRank.length-1 == index?'last':''}}">
<view class="no">NO.{{item.no}}</view>
<view class="portrait">
...
...
@@ -68,8 +68,9 @@
<view wx:else class="rank">
<view class="empty">
<!-- <image class="logo" src="../../image/logo.png" mode="aspectFit" /> -->
<span class="iconfont iconempty"></span>
<view class="tips">
<text
>活动火热进行中\n排名信息正在努力整理·····</text>
<text>活动火热进行中\n排名信息正在努力整理·····</text>
</view>
</view>
</view>
...
...
src/pages/user-table/user-table.scss
View file @
3166655
...
...
@@ -133,7 +133,7 @@ $iptHeight:80px;
width
:
$contentWidth
;
height
:
$iptHeight
;
border-radius
:
40px
;
border
:
solid
1
px
#b83138
;
border
:
solid
1
PX
#b83138
;
background-color
:
#ffffff
;
display
:
flex
;
margin-bottom
:
30px
;
...
...
@@ -195,9 +195,13 @@ $iptHeight:80px;
}
.textarea
{
height
:
$iptHeight
;
flex
:
1
;
min-height
:
160px
;
@extend
.bb
;
padding
:
24px
0
;
padding-right
:
24px
;
padding-top
:
4px
;
margin-left
:
-10px
;
}
}
...
...
src/pages/user-table/user-table.wxml
View file @
3166655
...
...
@@ -60,7 +60,7 @@
</view>
<view class="ipt ipt2">
<view class="label">地址</view>
<textarea value="{{receiverAddress}}" bindinput="bindAddressInput" class="
input
textarea" placeholder="请输入"></textarea>
<textarea value="{{receiverAddress}}" bindinput="bindAddressInput" class=" textarea" placeholder="请输入"></textarea>
</view>
</view>
<view bindtap="onSubmitHandler" class="submit-btn">确认提交</view>
...
...
src/pages/wish/wish.js
View file @
3166655
...
...
@@ -138,8 +138,28 @@ Page({
tipsPirzeVisible
:
true
,
status
:
curData
.
status
})
app
.
globalData
.
giftData
=
curData
;
// 再查看奖品
// app.post({
// url: app.api.wishbillGiftQuery,
// data: {
// instanceCode: curData.instanceCode
// }
// }).then((result) => {
// curData = Object.assign(curData, result);
// this.setData({
// curWish: curData,
// tipsPirzeVisible: true,
// status: curData.status
// })
// app.globalData.giftData = curData;
// console.log("app.globalData.giftData 222:", app.globalData.giftData);
// console.log(JSON.stringify(app.globalData.giftData));
// })
});
},
/**
* 查看我的奖品
* 点击领取
...
...
@@ -159,11 +179,12 @@ Page({
status
:
curData
.
status
})
app
.
globalData
.
giftData
=
curData
;
console
.
log
(
"app.globalData.giftData 111:"
,
app
.
globalData
.
giftData
);
console
.
log
(
JSON
.
stringify
(
app
.
globalData
.
giftData
));
// 领取状态
// 领取类型:0=未提交;1=邮寄(填写邮寄信息);2=自提(填门店预约信息)
let
acceptType
=
curData
.
order
.
acceptType
;
console
.
log
(
"acceptType:"
,
acceptType
);
if
(
acceptType
==
0
)
{
// 未提交,显示领取选择
this
.
setData
({
...
...
@@ -178,7 +199,7 @@ Page({
}
else
if
(
acceptType
==
2
)
{
// 已经选择自提
app
.
router
.
push
({
path
:
"prizeDetail"
path
:
"prizeDetail"
,
})
}
...
...
src/router/index.js
View file @
3166655
...
...
@@ -55,7 +55,6 @@ function push(path, option = {}) {
query
=
{},
openType
=
'navigate'
,
duration
=
0
}
=
option
;
// json 转换为 字符串拼接参数
console
.
log
(
"query:"
,
query
);
let
params
=
parse
(
query
)
// console.log("params:", params);
if
(
params
)
{
...
...
Please
register
or
sign in
to post a comment