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
c9598a8f
Commit
c9598a8f
authored
Aug 07, 2022
by
songbingqi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成下单页面字段调整
parent
e8d508a0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
110 additions
and
16 deletions
+110
-16
mineSubPackage/pages/msg/index.vue
+10
-1
orderSubPackage/pages/orderInfo/index.vue
+72
-4
orderSubPackage/pages/settlement/index.vue
+28
-11
No files found.
mineSubPackage/pages/msg/index.vue
View file @
c9598a8f
...
@@ -43,11 +43,20 @@ export default {
...
@@ -43,11 +43,20 @@ export default {
}
}
},
},
async
toRead
(
item
)
{
async
toRead
(
item
)
{
const
{
id
}
=
item
const
{
id
,
targetId
,
type
}
=
item
const
res
=
await
Mine
.
read
({
id
,
isRead
:
2
})
const
res
=
await
Mine
.
read
({
id
,
isRead
:
2
})
if
(
res
)
{
if
(
res
)
{
this
.
getList
()
this
.
getList
()
}
}
if
(
type
==
1
)
{
uni
.
setStorageSync
(
'orderId'
,
targetId
);
let
url
=
'/orderSubPackage/pages/orderInfo/index'
uni
.
navigateTo
({
url
})
}
else
{
let
url
=
'/mineSubPackage/pages/coupon/index'
uni
.
navigateTo
({
url
})
}
},
},
goHome
()
{
goHome
()
{
uni
.
switchTab
({
url
:
'/pages/menu/menu'
});
uni
.
switchTab
({
url
:
'/pages/menu/menu'
});
...
...
orderSubPackage/pages/orderInfo/index.vue
View file @
c9598a8f
...
@@ -76,6 +76,14 @@
...
@@ -76,6 +76,14 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"coupon"
v-if=
"orderInfo.couponAmount"
>
<div
class=
"title"
>
HOOLOO券
</div>
<div
class=
"num-action"
>
<span
class=
"price"
>
-¥
{{
orderInfo
.
couponAmount
}}
</span>
</div>
</div>
<div
class=
"total"
>
<div
class=
"total"
>
<div
class=
"size"
>
共
{{
totalNum
}}
件商品
</div>
<div
class=
"size"
>
共
{{
totalNum
}}
件商品
</div>
<div
class=
"price"
>
<div
class=
"price"
>
...
@@ -704,6 +712,10 @@ export default {
...
@@ -704,6 +712,10 @@ export default {
}
}
}
}
}
}
.goods
:last-child
{
border-bottom
:
1
rpx
solid
#EEEEEE
;
padding-bottom
:
30
rpx
;
}
.discount
{
.discount
{
margin-top
:
24
rpx
;
margin-top
:
24
rpx
;
...
@@ -745,18 +757,74 @@ export default {
...
@@ -745,18 +757,74 @@ export default {
}
}
}
}
.coupon
{
display
:
flex
;
align-items
:
center
;
display
:
flex
;
justify-content
:
space-between
;
margin-top
:
24
rpx
;
padding-bottom
:
23.57
rpx
;
border-bottom
:
1
rpx
solid
#EEEEEE
;
.title
{
font-size
:
28
rpx
;
font-family
:
ArialMT
;
color
:
#333333
;
height
:
40
rpx
;
line-height
:
40
rpx
;
}
.num
{
font-size
:
28
rpx
;
height
:
40
rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
500
;
display
:
flex
;
align-items
:
center
;
color
:
#999999
;
height
:
40
rpx
;
line-height
:
40
rpx
;
.price
{
font-family
:
Futura-Medium
,
Futura
;
}
.arrow-right-select
{
width
:
15.27
rpx
;
height
:
19.68
rpx
;
margin-left
:
8
rpx
;
}
}
.num-action
{
font-size
:
28
rpx
;
height
:
40
rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
display
:
flex
;
align-items
:
center
;
color
:
#FF63BA
;
height
:
40
rpx
;
line-height
:
40
rpx
;
.price{
font-family
:
Futura-Medium
,
Futura
;
}
.arrow-right-select
{
width
:
15.27
rpx
;
height
:
19.68
rpx
;
margin-left
:
8
rpx
;
}
}
}
.total
{
.total
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
margin-top
:
32
rpx
;
//
margin-top
:
32
rpx
;
border-top
:
1
rpx
solid
#EEEEEE
;
padding-top
:
24
rpx
;
padding-top
:
23
rpx
;
.size
{
.size
{
height
:
40
rpx
;
height
:
40
rpx
;
line-height
:
52
rpx
;
line-height
:
40
rpx
;
font-size
:
28
rpx
;
font-size
:
28
rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
font-weight
:
400
;
...
...
orderSubPackage/pages/settlement/index.vue
View file @
c9598a8f
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
<div
class=
"coupon"
@
click=
"goCouponSelect"
>
<div
class=
"coupon"
@
click=
"goCouponSelect"
>
<div
class=
"title"
>
HOOLOO券
</div>
<div
class=
"title"
>
HOOLOO券
</div>
<div
:class=
"[ticketNum>0?'num-action':'num']"
>
<div
:class=
"[ticketNum>0?'num-action':'num']"
>
<span
v-if=
"select
Price"
class=
"price"
>
-¥
{{
selectPrice
}}
</span>
<span
v-if=
"select
Coupon.couponAmount"
class=
"price"
>
-¥
{{
selectCoupon
.
couponAmount
}}
</span>
<span
v-else
>
{{
ticketNum
>
0
?
ticketNum
+
'张可用'
:
'暂无可用优惠'
}}
</span>
<span
v-else
>
{{
ticketNum
>
0
?
ticketNum
+
'张可用'
:
'暂无可用优惠'
}}
</span>
<image
v-if=
"!ticketNum>0"
class=
"arrow-right-select"
:src=
"'../../../static/imgs/jiantouhei.png'"
/>
<image
v-if=
"!ticketNum>0"
class=
"arrow-right-select"
:src=
"'../../../static/imgs/jiantouhei.png'"
/>
<image
v-else
class=
"arrow-right-select"
:src=
"'../../../static/imgs/jiantoufen.jpg'"
/>
<image
v-else
class=
"arrow-right-select"
:src=
"'../../../static/imgs/jiantoufen.jpg'"
/>
...
@@ -95,6 +95,8 @@ import User from '@/request/user'
...
@@ -95,6 +95,8 @@ import User from '@/request/user'
import
Order
from
'@/request/order'
import
Order
from
'@/request/order'
export
default
{
export
default
{
onShow
()
{
onShow
()
{
if
(
this
.
goods
)
{
if
(
this
.
goods
)
{
Order
.
getWaitTine
({
Order
.
getWaitTine
({
shopId
:
uni
.
getStorageSync
(
'shopData'
).
id
,
shopId
:
uni
.
getStorageSync
(
'shopData'
).
id
,
...
@@ -107,8 +109,11 @@ export default {
...
@@ -107,8 +109,11 @@ export default {
this
.
TermsStatus
=
uni
.
getStorageSync
(
'TermsStatus'
)
||
false
this
.
TermsStatus
=
uni
.
getStorageSync
(
'TermsStatus'
)
||
false
},
},
onLoad
(
option
)
{
onLoad
(
option
)
{
console
.
log
(
123
)
// 清除优惠卷信息
// 清除优惠卷信息
this
.
$store
.
commit
(
"cleanInfo"
)
this
.
$store
.
commit
(
"cleanInfo"
,{})
if
(
!
this
.
userms
){
if
(
!
this
.
userms
){
User
.
wxLoginAndGetOpenid
(
true
).
then
(
loginInfo
=>
{
User
.
wxLoginAndGetOpenid
(
true
).
then
(
loginInfo
=>
{
...
@@ -184,12 +189,8 @@ export default {
...
@@ -184,12 +189,8 @@ export default {
}
}
},
},
computed
:
{
computed
:
{
selectPrice
()
{
selectCoupon
()
{
const
data
=
this
.
$store
.
state
.
order
.
selectTicket
.
couponAmount
const
data
=
this
.
$store
.
state
.
order
.
selectTicket
return
data
},
selectCouponId
()
{
const
data
=
this
.
$store
.
state
.
order
.
selectTicket
.
id
return
data
return
data
},
},
userms
()
{
userms
()
{
...
@@ -217,6 +218,16 @@ export default {
...
@@ -217,6 +218,16 @@ export default {
})
})
return
(
price
-
discountNum
).
toFixed
(
2
)
return
(
price
-
discountNum
).
toFixed
(
2
)
},
},
amountOld
()
{
let
totalPrice
=
0
;
this
.
goods
.
forEach
(
item
=>
{
const
sku
=
item
.
sku
;
item
.
flag
?
totalPrice
+=
(
item
.
num
*
sku
.
discount
)
:
(
totalPrice
+=
0
)
})
return
totalPrice
.
toFixed
(
2
)
},
totalPrice
()
{
totalPrice
()
{
let
totalPrice
=
0
;
let
totalPrice
=
0
;
...
@@ -225,7 +236,7 @@ export default {
...
@@ -225,7 +236,7 @@ export default {
item
.
flag
?
totalPrice
+=
(
item
.
num
*
sku
.
discount
)
:
(
totalPrice
+=
0
)
item
.
flag
?
totalPrice
+=
(
item
.
num
*
sku
.
discount
)
:
(
totalPrice
+=
0
)
})
})
totalPrice
-=
this
.
select
Price
||
0
totalPrice
-=
this
.
select
Coupon
.
couponAmount
||
0
return
totalPrice
.
toFixed
(
2
)
return
totalPrice
.
toFixed
(
2
)
}
}
...
@@ -336,15 +347,21 @@ export default {
...
@@ -336,15 +347,21 @@ export default {
let
res
=
await
Utils
.
AssemblyOrder
(
this
.
shopData
,
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
)
{
const
{
amount
,...
resule
}
=
res
const
sendData
=
{
const
sendData
=
{
...
res
,
...
resule
,
couponId
:
this
.
selectCouponId
||
''
,
amount
:
this
.
amountOld
,
paidAmount
:
amount
,
lat
,
lat
,
lng
,
lng
,
sendMsgFlag1
,
sendMsgFlag1
,
sendMsgFlag2
,
sendMsgFlag2
,
sendMsgFlag3
sendMsgFlag3
}
}
if
(
JSON
.
stringify
(
this
.
selectCoupon
)
!=
"{}"
){
sendData
.
couponId
=
this
.
selectCoupon
.
id
||
''
,
sendData
.
couponAmount
=
this
.
selectCoupon
.
couponAmount
||
0
}
let
orderInfo
=
await
Menu
.
saveReserve
(
sendData
);
let
orderInfo
=
await
Menu
.
saveReserve
(
sendData
);
if
(
orderInfo
&&
orderInfo
.
data
.
code
==
200
)
{
if
(
orderInfo
&&
orderInfo
.
data
.
code
==
200
)
{
await
Menu
.
requestPayment
(
orderInfo
.
data
.
data
,
res
,
this
.
buyType
);
await
Menu
.
requestPayment
(
orderInfo
.
data
.
data
,
res
,
this
.
buyType
);
...
...
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