Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mallapp
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
viitto
mallapp
Commits
5868267a
Commit
5868267a
authored
Mar 07, 2022
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2
parent
a3737bf2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
73 additions
and
29 deletions
+73
-29
buy.vue
pages/coffee/buy.vue
+51
-14
confirmOrder.vue
pages/coffee/confirmOrder.vue
+2
-2
index.vue
pages/coffee/index.vue
+20
-13
No files found.
pages/coffee/buy.vue
View file @
5868267a
...
...
@@ -3,7 +3,7 @@
<view
class=
"topBox"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/coffee/banner2.png"
mode=
"widthFix"
class=
"bg"
></image>
<u-sticky
>
<u-sticky>
<view
class=
"nav"
:style=
"
{paddingTop:`${statusNavBar}px`}">
<u-icon
name=
"arrow-left"
size=
"40"
color=
"#fff"
@
click=
"back"
></u-icon>
<view
class=
"title"
>
...
...
@@ -24,7 +24,7 @@
<view
class=
"GiveAway"
v-if=
"item.GiveAwayNum>0"
>
买
{{
item
.
BuyNum
}}
杯赠
{{
item
.
GiveAwayNum
}}
杯
</view>
</view>
<view
class=
"itemInfo2"
>
<view
class=
"money"
>
...
...
@@ -55,36 +55,73 @@
export
default
{
data
()
{
return
{
showPage
:
false
,
showPage
:
false
,
statusNavBar
:
0
,
pageData
:
{},
menuList
:
[{
name
:
"馥芮白 "
,
english
:
"Flat White"
menuList
:
[
{
name
:
"意式浓缩"
,
english
:
"Espresso"
},
{
name
:
"浓郁玛奇朵"
,
english
:
"Rich Macchiato"
},
{
name
:
"卡布奇诺"
,
english
:
"Cappucino"
},
{
name
:
"
拿铁
"
,
english
:
"
Cafte Laf
te"
name
:
"
馥芮白
"
,
english
:
"
Flat Whi
te"
},
{
name
:
"美式"
,
english
:
"Cafte Americano"
},
{
name
:
"
摩卡
"
,
english
:
"
Mocha
"
name
:
"
拿铁
"
,
english
:
"
Cafte Lafte
"
},
{
name
:
"拿铁玛奇朵"
,
english
:
"Latte Macchiato"
},
{
name
:
"巧克力饮品"
,
english
:
"Classic Chocolate"
name
:
"摩卡"
,
english
:
"Mocha"
},
{
name
:
"热巧克力"
,
english
:
"hot chocolate"
},
{
name
:
"冰美式咖啡"
,
english
:
"Iced Americano"
},
{
name
:
"冰拿铁咖啡"
,
english
:
"Iced Cafe Latte"
},
{
name
:
"冰拿铁玛奇朵"
,
english
:
"Iced Latte Macchiato"
},
{
name
:
"冰摩卡咖啡"
,
english
:
"Ice Mocha"
},
{
name
:
"冰巧克力"
,
english
:
"Ice chocolate"
},
{
name
:
"冰馥芮白"
,
english
:
"Iced Flat White"
},
{
name
:
"冰卡布其诺"
,
english
:
"Iced Cappuccino"
},
]
}
...
...
@@ -96,7 +133,7 @@
data
:
{}
},
res
=>
{
this
.
showPage
=
true
this
.
showPage
=
true
this
.
pageData
=
res
.
data
}
);
...
...
@@ -186,7 +223,7 @@
font-size
:
32rpx
;
font-weight
:
500
;
color
:
#000000
;
}
.GiveAway
{
...
...
pages/coffee/confirmOrder.vue
View file @
5868267a
...
...
@@ -17,7 +17,7 @@
<view
class=
"num"
>
星巴克咖啡
{{
item
.
BuyNum
||
0
}}
杯
</view>
<view
class=
"give"
>
<view
class=
"give"
v-if=
"item.GiveAwayNum>0"
>
买
{{
item
.
BuyNum
||
0
}}
杯赠送
{{
item
.
GiveAwayNum
||
0
}}
杯
</view>
<view
class=
"tip"
>
...
...
@@ -33,7 +33,7 @@
<view
class=
"label"
>
购买数量
</view>
<view
class=
"value"
>
{{
item
.
BuyNum
||
0
}}
杯
</view>
</view>
<view
class=
"row2"
>
<view
class=
"row2"
v-if=
"item.GiveAwayNum>0"
>
<view
class=
"label"
>
赠送数量
</view>
<view
class=
"value"
>
{{
item
.
GiveAwayNum
||
0
}}
杯
</view>
</view>
...
...
pages/coffee/index.vue
View file @
5868267a
...
...
@@ -60,7 +60,7 @@
<text>
立即购买
</text>
<view
class=
"tipBox"
v-if=
"pageData.GiveAwayList&&pageData.GiveAwayList.length>0"
>
<view
class=
"tipText"
>
买
{{
pageData
.
GiveAwayList
[
1
].
BuyNum
}}
赠
{{
pageData
.
GiveAwayList
[
1
]
.
GiveAwayNum
}}
买
{{
getGive
().
BuyNum
}}
赠
{{
getGive
()
.
GiveAwayNum
}}
</view>
<view
class=
"tipIcon"
></view>
</view>
...
...
@@ -85,16 +85,11 @@
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/coffee/cup3.png"
mode=
"widthFix"
style=
"width:546rpx;height:auto;display: block;"
></image>
<view
class=
"viewBox"
>
<view
class=
"cup"
>
1杯
</view>
<view
class=
"successText"
>
消费
成功
使用
成功
</view>
<view
class=
"user"
>
<image
:src=
"headImg"
style=
"width: 66rpx;height: 66rpx;border-radius: 50%;margin-right: 6rpx;"
>
</image>
{{
username
}}
<view
class=
"cup"
>
1杯
</view>
</view>
<view
class=
"closeIcon"
@
click=
"closePopup"
>
...
...
@@ -120,10 +115,11 @@
qrData
:
''
,
// 要生成的二维码值
isShowQrcode
:
false
,
headImg
:
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/coffee/cup.png"
,
pageData
:
{},
pageData
:
{
GiveAwayList
:[]
},
isShowSuccess
:
false
,
timer
:
null
,
username
:
""
,
flag
:
false
,
//是否继续请求扫码结果
}
},
...
...
@@ -134,12 +130,23 @@
if
(
userInfo
.
Photo
)
{
this
.
headImg
=
userInfo
.
Photo
}
this
.
username
=
userInfo
.
Name
this
.
UserId
=
userInfo
.
UserId
this
.
getData
()
},
onHide
(){
this
.
flag
=
false
},
methods
:
{
getGive
(){
let
res
=
{}
for
(
let
i
=
0
;
i
<
this
.
pageData
.
GiveAwayList
.
length
;
i
++
){
if
(
this
.
pageData
.
GiveAwayList
[
i
].
GiveAwayNum
>
0
){
res
=
this
.
pageData
.
GiveAwayList
[
i
]
break
}
}
return
res
},
async
showPopup
()
{
this
.
timestamp
=
new
Date
().
getTime
()
this
.
qrData
=
encodeURIComponent
(
JSON
.
stringify
({
...
...
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