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
7ebf4441
Commit
7ebf4441
authored
Jun 20, 2022
by
宋冰琦
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://140.143.224.240:8100/hooloo/mp/user
parents
c0cb8258
26b589a3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
11 deletions
+11
-11
orderSubPackage/pages/orderInfo/index.vue
+3
-3
orderSubPackage/pages/settlement/index.vue
+4
-4
pages/order/order.vue
+2
-2
utils/utils.js
+2
-2
No files found.
orderSubPackage/pages/orderInfo/index.vue
View file @
7ebf4441
...
@@ -105,7 +105,7 @@ export default {
...
@@ -105,7 +105,7 @@ export default {
onLoad
()
{
onLoad
()
{
const
resData
=
uni
.
getStorageSync
(
'orderInfo'
);
const
resData
=
uni
.
getStorageSync
(
'orderInfo'
);
this
.
orderInfo
=
resData
this
.
orderInfo
=
resData
const
isBuild
=
[
'4'
,
'5'
,
'7'
].
indexOf
(
this
.
orderInfo
.
state
)
>=
0
;
const
isBuild
=
[
'4'
,
'5'
].
indexOf
(
this
.
orderInfo
.
state
)
>=
0
;
if
(
isBuild
)
{
if
(
isBuild
)
{
new
QRCode
(
'myQrcode'
,
{
new
QRCode
(
'myQrcode'
,
{
text
:
this
.
orderInfo
.
pickCode
,
text
:
this
.
orderInfo
.
pickCode
,
...
@@ -188,7 +188,7 @@ export default {
...
@@ -188,7 +188,7 @@ export default {
},
},
qrShow
()
{
qrShow
()
{
console
.
log
(
this
.
orderInfo
.
orderDetails
);
console
.
log
(
this
.
orderInfo
.
orderDetails
);
return
[
'2'
,
'3'
,
'4'
,
'5'
,
'7'
].
indexOf
(
this
.
orderInfo
.
state
)
>=
0
;
return
[
'2'
,
'3'
,
'4'
,
'5'
].
indexOf
(
this
.
orderInfo
.
state
)
>=
0
;
},
},
// 1 未支付
// 1 未支付
// 2 已支付
// 2 已支付
...
@@ -215,11 +215,11 @@ export default {
...
@@ -215,11 +215,11 @@ export default {
case
'3'
:
case
'3'
:
return
'制作中'
return
'制作中'
case
'4'
:
case
'4'
:
case
'7'
:
return
'待取餐'
return
'待取餐'
case
'5'
:
case
'5'
:
return
'取餐中'
return
'取餐中'
case
'6'
:
case
'6'
:
case
'7'
:
return
'已完成'
return
'已完成'
case
'8'
:
case
'8'
:
case
'9'
:
case
'9'
:
...
...
orderSubPackage/pages/settlement/index.vue
View file @
7ebf4441
...
@@ -119,13 +119,13 @@ export default {
...
@@ -119,13 +119,13 @@ export default {
// 微信扫码进入
// 微信扫码进入
this
.
option
=
JSON
.
stringify
(
option
)
this
.
option
=
JSON
.
stringify
(
option
)
const
{
q
}
=
option
;
const
{
q
}
=
option
;
console
.
log
(
q
);
//
console.log(q);
if
(
q
)
{
if
(
q
)
{
User
.
getLocation
((
state
,
params
)
=>
{
User
.
getLocation
((
state
,
params
)
=>
{
uni
.
removeStorageSync
(
'shopCarInfo'
);
uni
.
removeStorageSync
(
'shopCarInfo'
);
$EventBus
.
$emit
(
'updateCar'
);
$EventBus
.
$emit
(
'updateCar'
);
//
let id = decodeURIComponent(q).split('?')[1].split('=')[1];
let
id
=
decodeURIComponent
(
q
).
split
(
'?'
)[
1
].
split
(
'='
)[
1
];
let
id
=
q
;
//
let id = q;
Menu
.
getScreenShopCar
(
id
,
params
).
then
(
res
=>
{
Menu
.
getScreenShopCar
(
id
,
params
).
then
(
res
=>
{
const
data
=
JSON
.
parse
(
res
.
data
.
data
);
const
data
=
JSON
.
parse
(
res
.
data
.
data
);
console
.
log
(
data
);
console
.
log
(
data
);
...
@@ -244,7 +244,7 @@ export default {
...
@@ -244,7 +244,7 @@ export default {
}
else
{
}
else
{
list
=
uni
.
getStorageSync
(
'goodsList'
).
filter
((
v
)
=>
v
.
flag
==
true
);
list
=
uni
.
getStorageSync
(
'goodsList'
).
filter
((
v
)
=>
v
.
flag
==
true
);
}
}
let
res
=
await
Utils
.
AssemblyOrder
(
this
.
totalPrice
,
this
.
totalNum
,
this
.
buyType
,
list
);
let
res
=
await
Utils
.
AssemblyOrder
(
this
.
shopData
,
this
.
totalPrice
,
this
.
totalNum
,
this
.
buyType
,
list
);
if
(
res
)
{
if
(
res
)
{
// 发起订单
// 发起订单
let
orderInfo
=
await
Menu
.
saveReserve
(
res
);
let
orderInfo
=
await
Menu
.
saveReserve
(
res
);
...
...
pages/order/order.vue
View file @
7ebf4441
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
</view>
</view>
</view>
</view>
</view>
</view>
<view
v-if=
"item.state == 2 || item.state == 3 || item.state == 4 || item.state == 5
|| item.state == 7
"
class=
"qr_code"
>
<view
v-if=
"item.state == 2 || item.state == 3 || item.state == 4 || item.state == 5"
class=
"qr_code"
>
<image
class=
"qr_code_img"
src=
"/static/imgs/icon-barcode.png"
></image>
<image
class=
"qr_code_img"
src=
"/static/imgs/icon-barcode.png"
></image>
<view
class=
"qr_text"
>
点击二维码取单
</view>
<view
class=
"qr_text"
>
点击二维码取单
</view>
</view>
</view>
...
@@ -106,11 +106,11 @@ export default {
...
@@ -106,11 +106,11 @@ export default {
case
'3'
:
case
'3'
:
return
'制作中'
return
'制作中'
case
'4'
:
case
'4'
:
case
'7'
:
return
'待取餐'
return
'待取餐'
case
'5'
:
case
'5'
:
return
'取餐中'
return
'取餐中'
case
'6'
:
case
'6'
:
case
'7'
:
return
'已完成'
return
'已完成'
case
'8'
:
case
'8'
:
case
'9'
:
case
'9'
:
...
...
utils/utils.js
View file @
7ebf4441
...
@@ -4,7 +4,7 @@ import { $EventBus } from './EventBus';
...
@@ -4,7 +4,7 @@ import { $EventBus } from './EventBus';
export
default
{
export
default
{
// 组装提交订单数据
// 组装提交订单数据
AssemblyOrder
(
totalPrice
,
totalNum
,
buyType
,
shopCarInfo
)
{
AssemblyOrder
(
shopData
,
totalPrice
,
totalNum
,
buyType
,
shopCarInfo
)
{
if
(
shopCarInfo
&&
totalPrice
>
0
&&
totalNum
>
0
)
{
if
(
shopCarInfo
&&
totalPrice
>
0
&&
totalNum
>
0
)
{
let
orderDetails
=
[];
let
orderDetails
=
[];
for
(
let
i
=
0
;
i
<
shopCarInfo
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
shopCarInfo
.
length
;
i
++
)
{
...
@@ -25,7 +25,7 @@ export default {
...
@@ -25,7 +25,7 @@ export default {
orderDetails
.
push
(
res
);
orderDetails
.
push
(
res
);
}
}
const
shopData
=
uni
.
getStorageSync
(
'shopData'
);
//
const shopData = uni.getStorageSync('shopData');
let
DAta
=
{
let
DAta
=
{
amount
:
totalPrice
,
//商品总金额
amount
:
totalPrice
,
//商品总金额
goodsNum
:
totalNum
,
//商品总数量
goodsNum
:
totalNum
,
//商品总数量
...
...
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