Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
user
Overview
Overview
Details
Activity
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
hooloo
mp
user
Commits
6c4f074f
Commit
6c4f074f
authored
Jun 10, 2022
by
weijiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
3572496b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
85 additions
and
24 deletions
+85
-24
components/OrderQrCode/index.vue
+70
-16
components/menuAssembly/index.vue
+4
-4
pages/menu/menu.vue
+11
-4
No files found.
components/OrderQrCode/index.vue
View file @
6c4f074f
...
...
@@ -3,11 +3,14 @@
<u-popup
:show=
"show"
:round=
"10"
closeable
mode=
"bottom"
@
close=
"close"
>
<div
class=
"order_flow"
>
<div
class=
"code"
>
取单码
{{
orderInfo
.
orderNum
}}
</div>
<image
mode=
"scaleToFill"
:src=
"qrCode"
class=
"qr_code"
></image>
<!--
<image
mode=
"scaleToFill"
:src=
"qrCode"
class=
"qr_code"
></image>
-->
<div
class=
"qr_code"
>
<image
mode=
"scaleToFill"
:src=
"qrCode"
class=
"qr"
></image>
<view
class=
"status_text"
>
{{
orderStatusText
}}
</view>
</div>
<div
class=
"flow_describe"
>
<h3>
扫码流程
</h3>
<image
:mode=
"'aspectFit'"
width=
"600px"
class=
"flow_img"
src=
"/static/imgs/order_flow.png"
>
</image>
<h3>
扫码流程
</h3>
<image
:mode=
"'aspectFit'"
width=
"600px"
class=
"flow_img"
src=
"/static/imgs/order_flow.png"
></image>
</div>
<div
class=
"flow_describe"
>
<h3>
注意事项
</h3>
...
...
@@ -29,24 +32,57 @@ export default {
orderInfo
:
{},
qrCode
:
''
,
show
:
false
,
}
},
computed
:
{
// 0 创建未校验
// 1 未支付
// 2 已支付
// 3 支付制作中
// 4 制作完成未取
// 5 取餐中
// 6 正常完成
// 7 待取超时
// 8 未支付取消
// 9 支付后制作前取消
// 10 制作中取消
// 11 制作完成取消
// 12 退款中
// 13 退款失败
// 14 部分退款
// 15 已退款
// 50 其他人工干预状态
showMask
()
{
return
[
'2'
,
'3'
].
indexOf
(
this
.
orderInfo
.
state
)
!=
-
1
},
orderStatusText
()
{
switch
(
this
.
orderInfo
.
state
)
{
case
'2'
:
return
'已支付'
case
'3'
:
return
'等待中'
default
:
return
''
}
}
},
onLoad
()
{
},
methods
:
{
close
()
{
this
.
show
=
false
this
.
show
=
false
;
},
open
(
data
,
path
)
{
this
.
show
=
true
this
.
show
=
true
;
this
.
orderInfo
=
data
;
this
.
qrCode
=
path
console
.
log
(
"order:"
+
JSON
.
stringify
(
this
.
orderInfo
));
if
(
this
.
showMask
)
{
this
.
qrCode
=
'/static/imgs/noQr.png'
;
}
else
{
this
.
qrCode
=
path
;
}
},
jsonParse
(
json
)
{
return
JSON
.
parse
(
json
)
...
...
@@ -127,13 +163,31 @@ export default {
text-align
:
center
;
}
.qr_code
{
width
:
3
08
rpx
;
height
:
3
10
rpx
;
width
:
5
08
rpx
;
height
:
5
10
rpx
;
display
:
block
;
margin
:
25
rpx
auto
;
background-color
:
#ccc
;
position
:
relative
;
.status_text
{
font-size
:
48
rpx
;
font-family
:
PingFangSC-Semibold
,
PingFang
SC
;
font-weight
:
600
;
color
:
#FFFFFF
;
line-height
:
66
rpx
;
position
:
absolute
;
top
:
50%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
}
.qr
{
width
:
100%
;
height
:
100%
;
}
}
.flow_describe
{
...
...
components/menuAssembly/index.vue
View file @
6c4f074f
...
...
@@ -55,7 +55,9 @@ export default {
methods
:
{
getSku
(
data
)
{
const
{
skus
}
=
data
;
if
(
!
skus
&&
skus
.
length
==
0
)
return
{
discount
:
data
.
discount
,
price
:
data
.
price
};
if
(
!
skus
||
skus
.
length
==
0
)
{
return
{
discount
:
data
.
discount
,
price
:
data
.
price
};
}
const
sku
=
data
.
skus
.
find
(
v
=>
v
.
isDefault
==
1
&&
v
.
state
==
1
)
||
data
.
skus
.
find
(
v
=>
v
.
state
==
1
)
||
data
.
skus
.
find
(
v
=>
v
.
isDefault
==
1
)
...
...
@@ -64,7 +66,7 @@ export default {
},
createList
(
data
)
{
this
.
classifyData
=
data
;
console
.
log
(
this
.
classifyData
)
//
console.log(this.classifyData)
this
.
$nextTick
(()
=>
{
const
query
=
uni
.
createSelectorQuery
().
in
(
this
);
query
.
selectAll
(
'.box'
).
boundingClientRect
(
data
=>
{
...
...
@@ -416,7 +418,6 @@ export default {
}
.tags
{
margin-top
:
-10
rpx
;
.tag-item
{
height
:
24
rpx
;
border-radius
:
4
rpx
;
...
...
@@ -445,7 +446,6 @@ export default {
}
.mon
{
margin-top
:
-10
rpx
;
.discount
{
display
:
inline-block
;
height
:
32
rpx
;
...
...
pages/menu/menu.vue
View file @
6c4f074f
...
...
@@ -26,15 +26,15 @@
</view>
</view>
<view
class=
"order-banner"
v-if=
"buied"
>
<view
class=
"order-banner"
v-if=
"buied"
@
click=
"openQrcode"
>
<view
class=
"info"
>
<view
class=
"first"
>
取单码:
{{
orderInfo
.
orderNum
}}
</view>
<view
class=
"second"
>
请您耐心等候,剩余等候时间
<text
class=
"time"
>
{{
orderInfo
.
waitTime
}}
</text>
分钟
</view>
</view>
<view
class=
"line"
></view>
<view
class=
"barCode-box"
>
<view
@
click=
"openQrcode"
class=
"barCode"
>
<image
:src=
"'
../..
/static/imgs/icon-barcode.png'"
></image>
<view
class=
"barCode"
>
<image
:src=
"'/static/imgs/icon-barcode.png'"
></image>
</view>
<view
class=
"barCode-dis"
>
点击二维码取单
</view>
</view>
...
...
@@ -99,6 +99,8 @@ export default {
const
res
=
await
Order
.
getHomeOrder
()
const
data
=
res
?.
data
if
(
data
?.
data
)
{
// this.$set(data.data, 'state', '2');
console
.
log
(
"getHomeOrder:"
+
JSON
.
stringify
(
data
.
data
));
this
.
buied
=
true
;
this
.
orderInfo
=
data
.
data
}
else
{
...
...
@@ -107,6 +109,11 @@ export default {
},
methods
:
{
openQrcode
()
{
// 不生成二维码
if
([
'2'
,
'3'
].
indexOf
(
this
.
orderInfo
.
state
)
!=
-
1
){
this
.
$refs
.
OrderQrCode
.
open
(
this
.
orderInfo
,
""
);
return
;
}
new
QRCode
(
'myQrcode2'
,
{
text
:
this
.
orderInfo
.
pickCode
,
width
:
141
,
//canvas 画布的宽
...
...
@@ -145,7 +152,7 @@ export default {
const
{
value
}
=
res
;
const
shops
=
value
[
2
].
shops
;
this
.
show
=
false
;
console
.
log
(
shops
);
//
console.log(shops);
uni
.
setStorageSync
(
'shops'
,
shops
);
uni
.
navigateTo
({
url
:
'/menuSubPackage/pages/areaSelect/areaSelect'
})
},
...
...
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