Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
groupPurchase-miniapp
Project
Project
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
彭佳妮(贵阳日报)
groupPurchase-miniapp
Commits
509ffcf3
Commit
509ffcf3
authored
Aug 10, 2024
by
张娇(东信)
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
de749fca
bb363da5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
746 additions
and
447 deletions
+746
-447
shop.js
src/api/assistingAgriculture/shop.js
+24
-0
ConfirmOrder.vue
src/pages/assistingAgriculture/cart/ConfirmOrder.vue
+718
-447
confirmOrder.vue
src/pages/shop/confirmOrder.vue
+4
-0
No files found.
src/api/assistingAgriculture/shop.js
View file @
509ffcf3
...
@@ -40,3 +40,27 @@ export function znsgyOrderCreate(data) {
...
@@ -40,3 +40,27 @@ export function znsgyOrderCreate(data) {
data
,
data
,
});
});
}
}
// 筑农首页-查询用户默认收货地址
export
function
useraddrDefaultUserAddr
(
data
)
{
return
request
({
url
:
`/sgyrdd/useraddr/defaultUserAddr`
,
method
:
'GET'
,
data
,
});
}
// 筑农首页-修改临时订单
export
function
previewOrderBasketUpdate
(
data
)
{
return
request
({
url
:
`/sgyrdd/previewOrder/basket/update`
,
method
:
'POST'
,
data
,
});
}
// 筑农首页-3、订单详情
export
function
sgyOrderOrderInfo
(
data
)
{
return
request
({
url
:
`/sgyrdd/sgyOrder/orderInfo`
,
method
:
'GET'
,
data
,
});
}
src/pages/assistingAgriculture/cart/ConfirmOrder.vue
View file @
509ffcf3
<
template
>
<
template
>
<view
class=
"confirm-order"
>
<view
class=
"confirm-order"
>
<view
class=
"information-view"
>
<wd-popup
<view
class=
"order-typers"
>
v-model=
"showpopup"
<view
class=
"home-delivery-service"
>
送货上门
</view>
position=
"bottom"
<view
class=
"hypotenuse-view"
></view>
custom-style=
"height: 50%;border-radius: 16rpx 16rpx 0 0 ;box-sizing:border-box;padding:20rpx;"
@
close=
"handleClose"
:safe-area-inset-bottom=
"true"
custom-class=
"popup"
>
<view
class=
"title-box"
>
<text
class=
"title"
>
选择优惠券
</text>
<wd-icon
@
click=
"showpopup = false"
color=
"#D8D8D8"
name=
"close-bold"
size=
"30rpx"
></wd-icon>
</view>
</view>
<view
class=
"location"
>
<view
class=
"popup-content"
>
<img
<view
class=
"location-pic"
class=
"ticket-item"
src=
"/src/static/assistingAgriculture/assets/location.png"
:class=
"activeCouponId === item.couponId ? 'active-ticket' : ''"
alt=
""
v-for=
"(item, index) in orderInfo.shopCoupon"
/>
:key=
"index"
<view
class=
"location-text"
>
贵州省贵阳市南明区花果园中环广场3号楼 1718
</view>
@
click
.
stop=
"selectShopCoupon(item)"
<img
>
class=
"location-icon"
<view
class=
"ticket-box"
>
src=
"/src/static/assistingAgriculture/assets/right-arrow.png"
<view
class=
"normal ticket-left"
>
alt=
""
<view
class=
"ticket-box"
>
/>
<view
class=
"ticket-price"
>
<view
class=
"customer-information"
>
<text
class=
"price"
>
¥
</text>
<view
class=
"customer-name"
>
张三
</view>
<text
class=
"num"
>
{{
item
.
reduceAmount
}}
</text>
<view
class=
"customer-phone"
>
187****5632
</view>
</view>
<view
class=
"ticket-desc"
>
<text
class=
"desc"
>
满
{{
item
.
cashCondition
}}
元可用
</text>
<text
class=
"desc"
>
数量:
{{
item
.
count
}}
</text>
</view>
</view>
</view>
<view
class=
"ticket-right"
>
<view
class=
"head"
>
<text
class=
"title"
>
{{
item
.
couponName
}}
</text>
<view
class=
"headbox"
>
<text
class=
"time"
>
{{
item
.
userEndTime
}}
过期
</text>
</view>
</view>
</view>
</view>
<view
class=
"detail"
v-if=
"item.showDetail"
>
<view
class=
"line"
></view>
<view
class=
"detail-box"
style=
"font-size: 16rpx"
>
{{
item
.
activityNotes
}}
</view>
</view>
</view>
</view>
<wd-status-tip
v-if=
"orderInfo.shopCoupon.length === 0"
image=
"content"
tip=
"暂无优惠券"
/>
</view>
</wd-popup>
<view
class=
"address-card"
>
<view
class=
"title"
>
<text
class=
"home-delivery-service"
>
送货上门
</text>
<view
class=
"icon"
></view>
</view>
<view
class=
"address-content"
@
click=
"jumpToAddressList"
>
<image
class=
"location-pic"
src=
"@/static/assistingAgriculture/assets/location.png"
></image>
<view
class=
"location-text"
>
{{
addressInfo
.
areaAddr
}}
{{
addressInfo
.
areaName
}}
</view>
<wd-icon
custom-class=
"my-icon"
color=
"#666"
name=
"arrow-right"
size=
"22px"
></wd-icon>
</view>
<view
class=
"address-user-info"
>
<text>
{{
addressInfo
.
receiver
}}
{{
addressInfo
.
mobiles
}}
</text>
</view>
</view>
<!--
<view
class=
"estimated-time-view"
>
<text
class=
"send-time"
>
立即送出
</text>
<view
class=
"estimated-time"
>
大约13:45送达
</view>
<view
class=
"estimated-icon"
></view>
<img
class=
"estimated-icon"
src=
"/src/static/assistingAgriculture/assets/right-arrow.png"
alt=
""
/>
</view>
-->
</view>
</view>
<view
class=
"commordity-information-view"
>
<view
class=
"prod-card"
>
<view
class=
"trade-name"
>
杨家黄焖鸡
</view>
<view
class=
"prod-shop-name"
>
{{
orderInfo
.
shopName
}}
</view>
<view
class=
"commordity-content"
>
<view
class=
"prod-list"
>
<view
class=
"commordity-details"
>
<view
class=
"prod-item"
v-for=
"(item, index) in orderInfo.orderItems"
:key=
"index"
>
<img
<image
mode=
"aspectFill"
:src=
"imgUrl + item.pic"
></image>
class=
"commodity-picture"
<view
class=
"center"
>
src=
"/src/static/assistingAgriculture/assets/img1.png"
<text
class=
"prod-name"
>
{{
item
.
prodName
}}
</text>
alt=
""
<view
class=
"tag-list"
>
/>
<wd-tag
color=
"#333333"
bg-color=
"#F2F2F2"
custom-class=
"space"
>
约1000克
</wd-tag>
<view
class=
"commodity-name"
>
招牌黄焖鸡+米饭(土豆+生菜)
</view>
</view>
<view
class=
"price-information"
>
<text
class=
"price-symbol"
>
¥
</text>
<text
class=
"price"
>
28.8
</text>
<text
class=
"conmmodity-amount"
>
x1
</text>
</view>
</view>
<view
class=
"label"
>
约1000克
</view>
<view
class=
"price-prod"
>
</view>
<text
class=
"prod-price"
>
¥
{{
item
.
price
}}
</text>
<view
class=
"commordity-details"
>
<text
class=
"prod-count"
>
x
{{
item
.
prodCount
}}
</text>
<img
class=
"commodity-picture"
src=
"/src/static/assistingAgriculture/assets/img1.png"
alt=
""
/>
<view
class=
"commodity-name"
>
招牌黄焖鸡+米饭(土豆+生菜)
</view>
<view
class=
"price-information"
>
<text
class=
"price-symbol"
>
¥
</text>
<text
class=
"price"
>
28.8
</text>
<text
class=
"conmmodity-amount"
>
x1
</text>
</view>
</view>
<view
class=
"label"
>
约1000克
</view>
</view>
</view>
</view>
</view>
<view
class=
"optional-view"
>
<view
class=
"merchant-coupons"
>
<view
class=
"discount-coupon-view"
>
<view
class=
"quan-icon"
>
券
</view>
<view
class=
"discount-coupon"
>
卷
</view>
商家优惠券
<view
class=
"discount-coupon-text"
>
商家优惠券
</view>
<view
class=
"view-coupons"
>
<view
class=
"discount-coupon-price"
>
¥0
</view>
<text
v-if=
"activeCouponInfo.reduceAmount"
>
¥
{{
activeCouponInfo
.
reduceAmount
}}
</text>
<img
<wd-icon
class=
"discount-coupon-icon"
@
click=
"showpopup = true"
src=
"/src/static/assistingAgriculture/assets/right-arrow.png"
color=
"#696969"
alt=
""
name=
"chevron-right"
/>
size=
"22px"
></wd-icon>
</view>
</view>
</view>
</view>
<view
class=
"freight-view"
>
<view
class=
"merchant-coupons"
>
<text>
运费
</text>
运费
<view
class=
"freight-price"
>
¥0
</view>
<view
class=
"view-coupons"
>
<text>
¥
{{
orderInfo
.
freightFee
}}
</text>
</view>
</view>
</view>
<view
class=
"
remark-view"
>
<view
class=
"
merchant-coupons"
>
备注
</view
>
<text>
备注
</text
>
<view
class=
"uni-textarea"
>
<view
class=
"
remark
"
>
<view
class=
"
textarea-box
"
>
<textarea
<textarea
class=
"content"
class=
"content"
placeholder=
"请输入你的问题"
placeholder=
"请输入你的问题"
maxlength=
"200"
maxlength=
"200"
placeholder-class=
"placeholder-style"
v-model=
"textInputs"
v-model=
"textInputs"
@
input=
"inputRemake"
@
input=
"inputRemake"
></textarea>
></textarea>
<view
class=
"current-word"
>
{{
inputLength
}}
/
{{
wordMax
}}
</view>
</view>
</view>
</view
>
<view
class=
"xj-content"
>
<view
class=
"total-prices-view"
>
<text
class=
"t"
>
已优惠¥
{{
orderInfo
.
reduceAmount
}}
小计
</text
>
<view
class=
"discounts"
>
已优惠¥0
 
小计
</view
>
<text
class=
"n"
>
¥
{{
orderInfo
.
actualTotal
}}
</text
>
<
view
class=
"total-prices"
>
¥86.4
<
/view>
</view>
</view>
</view>
</view>
</view>
<view
class=
"submit-order-view"
>
<view
class=
"foot"
>
<view
class=
"total-view"
>
<view
class=
"total"
>
<view
class=
"total"
>
合计:
</view>
<view
class=
"hj-box"
>
<view
class=
"total-price-symbol"
>
¥
</view>
<text>
合计:
</text>
<view
class=
"total-price"
>
86.4
</view>
<text
class=
"num"
>
¥
{{
orderInfo
.
actualTotal
}}
</text>
</view>
<view
class=
"total-price"
>
总共优惠 ¥
{{
orderInfo
.
reduceAmount
}}
</view>
</view>
</view>
<view
class=
"
total-discounts"
>
总共优惠
 
¥0.00
</view>
<view
class=
"
btn"
@
click=
"openZfType"
>
提交订单
</view>
</view>
</view>
<button
class=
"submit-button"
@
click=
"openZfType"
>
提交订单
</button>
<Payment
ref=
"PaymentRef"
@
payment=
"payNow"
></Payment>
<Payment
ref=
"PaymentRef"
@
payment=
"payNow"
></Payment>
</view>
</view>
</
template
>
</
template
>
...
@@ -115,25 +144,152 @@
...
@@ -115,25 +144,152 @@
<
script
setup
>
<
script
setup
>
import
{
ref
,
computed
}
from
'vue'
;
import
{
ref
,
computed
}
from
'vue'
;
import
Payment
from
'@/pages/order/components/Payment/index.vue'
;
import
Payment
from
'@/pages/order/components/Payment/index.vue'
;
import
{
sgyrddBasketConfirm
,
znsgyOrderCreate
}
from
'@/api/assistingAgriculture/shop'
;
import
{
const
wordMax
=
ref
(
200
);
sgyrddBasketConfirm
,
znsgyOrderCreate
,
useraddrDefaultUserAddr
,
previewOrderBasketUpdate
,
sgyOrderOrderInfo
,
}
from
'@/api/assistingAgriculture/shop'
;
const
imgUrl
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
;
const
textInputs
=
ref
(
''
);
const
textInputs
=
ref
(
''
);
const
basketIds
=
ref
([]);
const
basketIds
=
ref
([]);
const
activeCouponId
=
ref
(
''
);
const
changeAddress
=
ref
(
false
);
const
addressParams
=
ref
({});
const
showpopup
=
ref
(
false
);
const
outTradeNos
=
ref
(
null
);
const
inputLength
=
computed
(()
=>
{
const
inputLength
=
computed
(()
=>
{
return
textInputs
.
value
.
length
;
return
textInputs
.
value
.
length
;
});
});
onLoad
((
options
)
=>
{
onLoad
((
options
)
=>
{
const
{
ids
}
=
options
;
const
{
ids
}
=
options
;
basketIds
.
value
=
ids
.
split
(
','
);
basketIds
.
value
=
ids
.
split
(
','
);
sgyrddBasketConfirmFn
(
basketIds
.
value
);
sgyrddBasketConfirmFn
(
basketIds
.
value
).
then
(()
=>
{
useraddrDefaultUserAddrFn
().
then
(()
=>
{
groupBuyUpdateFn
();
});
});
});
onShow
(()
=>
{
if
(
changeAddress
.
value
)
{
sgyrddBasketConfirmFn
(
basketIds
.
value
).
then
(()
=>
{
useraddrDefaultUserAddrFn
().
then
(()
=>
{
groupBuyUpdateFn
();
});
});
}
if
(
outTradeNos
.
value
)
{
// 查询订单状态决定是否支付
sgyOrderOrderInfo
({
orderNumber
:
outTradeNos
.
value
}).
then
((
res
)
=>
{
// switch (res.data.baseOrder.subStatus) {
// case '1':
// xma.showToast({
// title: '支付失败',
// icon: 'error',
// duration: 2000,
// success() {
// groupBuyConfirmFn(prodIds.value, skuIds.value);
// },
// });
// break;
// case '2':
// xma.redirectTo({
// url: `/pages/shop/paymentSuccessful?outTradeNos=${outTradeNos.value}`,
// });
// break;
// case '3':
// xma.redirectTo({
// url: `/pages/shop/paymentSuccessful?outTradeNos=${outTradeNos.value}`,
// });
// break;
// default:
// break;
// }
});
}
});
});
const
orderInfo
=
ref
({});
const
sgyrddBasketConfirmFn
=
(
basketIds
)
=>
{
const
sgyrddBasketConfirmFn
=
(
basketIds
)
=>
{
sgyrddBasketConfirm
({
basketIds
,
orderType
:
'logistics'
}).
then
((
res
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
sgyrddBasketConfirm
({
basketIds
,
orderType
:
'logistics'
}).
then
((
res
)
=>
{
if
(
res
.
code
===
0
)
{
orderInfo
.
value
=
res
.
data
;
resolve
();
}
});
});
};
/**
* 选择优惠券
*/
const
activeCouponInfo
=
ref
({});
function
selectShopCoupon
(
item
)
{
if
(
item
.
cashCondition
<=
orderInfo
.
value
.
orderItems
[
0
].
price
)
{
activeCouponId
.
value
=
item
.
couponId
;
activeCouponInfo
.
value
=
item
;
showpopup
.
value
=
false
;
groupBuyUpdateFn
(
item
.
couponUserId
);
}
else
{
xma
.
showToast
({
title
:
'不满足优惠券使用条件'
,
icon
:
'none'
,
});
}
}
const
jumpToAddressList
=
()
=>
{
changeAddress
.
value
=
true
;
wx
.
navigateTo
({
url
:
'/pages/address/list'
,
});
};
function
groupBuyUpdateFn
(
couponUserId
)
{
const
{
receiverName
,
receiverMobile
,
receiverAddress
}
=
addressParams
.
value
;
console
.
log
(
'receiverName, receiverMobile, receiverAddress'
,
receiverName
,
receiverMobile
,
receiverAddress
,
);
previewOrderBasketUpdate
({
receiverName
,
receiverMobile
,
receiverAddress
,
key
:
orderInfo
.
value
.
key
,
couponUserId
,
}).
then
((
res
)
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
console
.
log
(
'11'
)
;
orderInfo
.
value
=
res
.
data
;
}
}
});
});
}
function
encryptPhoneNumber
(
phoneNumber
)
{
// 检查电话号码是否有效
if
(
typeof
phoneNumber
!==
'string'
||
phoneNumber
.
length
<
7
)
{
throw
new
Error
(
'无效的电话号码'
);
}
// 处理电话号码,保留前3位和后4位,中间替换为****
const
encryptedPhoneNumber
=
phoneNumber
.
slice
(
0
,
3
)
+
'****'
+
phoneNumber
.
slice
(
-
4
);
return
encryptedPhoneNumber
;
}
const
addressInfo
=
ref
({});
const
useraddrDefaultUserAddrFn
=
()
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
useraddrDefaultUserAddr
().
then
((
res
)
=>
{
if
(
res
.
code
===
0
)
{
res
.
data
.
mobiles
=
encryptPhoneNumber
(
res
.
data
.
mobile
);
addressInfo
.
value
=
res
.
data
;
addressParams
.
value
.
receiverName
=
res
.
data
.
receiver
;
addressParams
.
value
.
receiverMobile
=
res
.
data
.
mobile
;
addressParams
.
value
.
receiverAddress
=
res
.
data
.
areaAddr
;
resolve
();
}
});
});
};
};
const
inputRemake
=
(
e
)
=>
{
const
inputRemake
=
(
e
)
=>
{
const
{
value
}
=
e
.
detail
;
const
{
value
}
=
e
.
detail
;
...
@@ -151,28 +307,31 @@ const openZfType = () => {
...
@@ -151,28 +307,31 @@ const openZfType = () => {
PaymentRef
.
value
.
open
();
PaymentRef
.
value
.
open
();
};
};
const
payNow
=
async
(
data
)
=>
{
const
payNow
=
async
(
data
)
=>
{
params
.
value
.
id
=
data
.
orderNumber
;
params
.
value
.
id
=
orderInfo
.
value
.
key
;
params
.
value
.
tradeType
=
data
.
selectType
;
params
.
value
.
tradeType
=
data
.
selectType
;
params
.
value
.
basketIds
=
[];
params
.
value
.
basketIds
=
basketIds
.
value
;
const
res
=
await
znsgyOrderCreate
(
params
);
znsgyOrderCreate
(
params
.
value
).
then
((
res
)
=>
{
const
{
paymentUrl
,
outTradeNo
}
=
res
.
data
.
result
;
if
(
res
.
code
===
0
)
{
// 修改列表待付款订单号
const
{
paymentUrl
,
outTradeNo
}
=
res
.
data
.
result
;
dataList
.
value
[
changeIndex
.
value
].
orderNumber
=
outTradeNo
;
outTradeNos
.
value
=
outTradeNo
;
pendingPaymentOrder
.
value
=
outTradeNo
;
window
.
location
.
href
=
paymentUrl
;
window
.
location
.
href
=
paymentUrl
;
// 设置一个延时器
// 设置一个延时器
const
start
=
Date
.
now
();
const
start
=
Date
.
now
();
setTimeout
(()
=>
{
setTimeout
(()
=>
{
const
end
=
Date
.
now
();
const
end
=
Date
.
now
();
if
(
end
-
start
<
1200
)
{
if
(
end
-
start
<
1200
)
{
// 如果 iframe 加载时间小于 1.2 秒,说明应用没有安装
// 如果 iframe 加载时间小于 1.2 秒,说明应用没有安装
xma
.
showToast
({
xma
.
showToast
({
title
:
'未安装App'
,
title
:
'未安装App'
,
icon
:
'error'
,
icon
:
'error'
,
});
});
// 这里可以跳转到应用下载页面
// 这里可以跳转到应用下载页面
}
},
1600
);
}
else
{
groupBuyConfirmFn
(
prodIds
.
value
,
skuIds
.
value
);
}
}
}
,
1000
);
});
};
};
</
script
>
</
script
>
...
@@ -184,343 +343,455 @@ page {
...
@@ -184,343 +343,455 @@ page {
}
}
.confirm-order
{
.confirm-order
{
width
:
750rpx
;
width
:
750rpx
;
padding
:
20rpx
;
}
.information-view
{
width
:
710rpx
;
// height: 365rpx;
border-radius
:
16rpx
;
// display: flex;
overflow
:
hidden
;
background
:
#ffffff
;
}
.order-typers
{
width
:
710rpx
;
height
:
82rpx
;
}
.home-delivery-service
{
width
:
355rpx
;
height
:
82rpx
;
background
:
#ffffff
;
font-size
:
32rpx
;
line-height
:
82rpx
;
text-align
:
center
;
color
:
#333333
;
}
.hypotenuse-view
{
width
:
355rpx
;
height
:
82rpx
;
background
:
#ffebeb
;
// position: static;
margin-left
:
365rpx
;
margin-top
:
-82rpx
;
transform
:
skew
(
15deg
,
-0deg
);
}
.location
{
width
:
695rpx
;
height
:
166rpx
;
margin-left
:
15rpx
;
padding-top
:
20rpx
;
display
:
flex
;
}
.location-pic
{
width
:
35rpx
;
height
:
35rpx
;
}
.location-text
{
width
:
595rpx
;
height
:
64rpx
;
font-size
:
32rpx
;
line-height
:
32rpx
;
color
:
#333333
;
}
.location-icon
{
width
:
32rpx
;
height
:
32rpx
;
margin-left
:
25rpx
;
margin-top
:
5rpx
;
}
.customer-information
{
width
:
400rpx
;
height
:
60rpx
;
margin-top
:
70rpx
;
margin-left
:
-650rpx
;
display
:
flex
;
}
.customer-name
{
width
:
56rpx
;
height
:
28rpx
;
font-size
:
28rpx
;
line-height
:
28rpx
;
color
:
#999999
;
margin-top
:
14rpx
;
}
.customer-phone
{
width
:
250rpx
;
height
:
28rpx
;
font-size
:
24rpx
;
line-height
:
28rpx
;
color
:
#999999
;
margin-top
:
14rpx
;
margin-left
:
19rpx
;
}
.estimated-time-view
{
width
:
710rpx
;
height
:
150rpx
;
margin-left
:
15rpx
;
display
:
flex
;
}
.send-time
{
font-size
:
28rpx
;
line-height
:
28rpx
;
color
:
#333333
;
margin-top
:
30rpx
;
}
.estimated-time
{
width
:
178rpx
;
height
:
24rpx
;
font-size
:
24rpx
;
line-height
:
24rpx
;
margin-left
:
353rpx
;
margin-top
:
30rpx
;
color
:
#f12a2a
;
}
.estimated-icon
{
width
:
32rpx
;
height
:
32rpx
;
margin-left
:
-10rpx
;
margin-top
:
25rpx
;
}
.commordity-information-view
{
width
:
691rpx
;
height
:
auto
;
border-radius
:
16rpx
;
padding-left
:
19rpx
;
padding-top
:
23rpx
;
padding-bottom
:
40rpx
;
margin-top
:
26rpx
;
background
:
#ffffff
;
}
.trade-name
{
width
:
140rpx
;
height
:
28rpx
;
font-size
:
28rpx
;
line-height
:
28rpx
;
color
:
#333333
;
}
.commordity-content
{
width
:
691rpx
;
height
:
auto
;
border-top
:
1px
solid
#f2f2f2
;
margin-top
:
19rpx
;
}
.commordity-details
{
width
:
691rpx
;
height
:
128rpx
;
margin-top
:
20rpx
;
display
:
flex
;
}
.commodity-picture
{
width
:
129rpx
;
height
:
128rpx
;
border-radius
:
8rpx
;
border
:
1px
solid
#f6f6f6
;
}
.commodity-name
{
width
:
407rpx
;
height
:
28rpx
;
font-size
:
28rpx
;
line-height
:
28rpx
;
color
:
#333333
;
margin-left
:
21rpx
;
}
.price-information
{
width
:
88rpx
;
height
:
66rpx
;
font-size
:
32rpx
;
line-height
:
32rpx
;
color
:
#f12a2a
;
margin-left
:
38rpx
;
display
:
flex
;
}
.price-symbol
{
font-weight
:
400
;
font-size
:
24rpx
;
}
.price
{
font-weight
:
400
;
font-size
:
32rpx
;
}
.conmmodity-amount
{
font-size
:
24rpx
;
margin-top
:
40rpx
;
margin-left
:
-20rpx
;
color
:
#999999
;
}
.label
{
width
:
125rpx
;
height
:
40rpx
;
border-radius
:
8rpx
;
background
:
#f2f2f2
;
font-size
:
24rpx
;
line-height
:
40rpx
;
text-align
:
center
;
color
:
#333333
;
margin-left
:
-535rpx
;
margin-top
:
52rpx
;
}
.discount-coupon-view
{
width
:
691rpx
;
height
:
24rpx
;
margin-top
:
62rpx
;
display
:
flex
;
}
.discount-coupon
{
width
:
24rpx
;
height
:
24rpx
;
border-radius
:
5rpx
;
background
:
#fc2828
;
font-size
:
16rpx
;
line-height
:
24rpx
;
text-align
:
center
;
color
:
#ffffff
;
}
.discount-coupon-text
{
width
:
120rpx
;
height
:
24rpx
;
font-size
:
24rpx
;
line-height
:
24rpx
;
color
:
#333333
;
margin-left
:
10rpx
;
}
.discount-coupon-price
{
width
:
38rpx
;
font-size
:
24rpx
;
line-height
:
24rpx
;
color
:
#333333
;
margin-left
:
450rpx
;
}
.discount-coupon-icon
{
width
:
32rpx
;
height
:
32rpx
;
margin-left
:
10rpx
;
margin-top
:
-5rpx
;
}
.freight-view
{
width
:
691rpx
;
height
:
24rpx
;
margin-top
:
31rpx
;
display
:
flex
;
font-size
:
24rpx
;
line-height
:
24rpx
;
color
:
#333333
;
}
.freight-price
{
margin-left
:
590rpx
;
}
.remark-view
{
width
:
691rpx
;
height
:
24rpx
;
margin-top
:
31rpx
;
font-size
:
24rpx
;
line-height
:
24rpx
;
color
:
#333333
;
}
.remark
{
width
:
674rpx
;
height
:
243rpx
;
border-radius
:
12rpx
;
background
:
#fafafa
;
font-size
:
24rpx
;
line-height
:
24rpx
;
color
:
#999999
;
margin-top
:
20rpx
;
}
.content
{
width
:
640rpx
;
height
:
180rpx
;
font-size
:
24rpx
;
font-weight
:
500
;
color
:
#77818f
;
top
:
23rpx
;
margin-left
:
22rpx
;
}
.current-word
{
width
:
120rpx
;
height
:
50rpx
;
line-height
:
50rpx
;
font-size
:
28rpx
;
color
:
gray
;
margin-top
:
12rpx
;
margin-left
:
540rpx
;
}
.total-prices-view
{
width
:
691rpx
;
height
:
32rpx
;
margin-top
:
310rpx
;
display
:
flex
;
line-height
:
32rpx
;
text-align
:
center
;
}
.discounts
{
font-weight
:
400
;
font-size
:
28rpx
;
color
:
#333333
;
margin-left
:
356rpx
;
}
.total-prices
{
font-weight
:
400
;
font-size
:
32rpx
;
}
.submit-order-view
{
width
:
750rpx
;
height
:
131rpx
;
padding-left
:
18rpx
;
padding-top
:
21rpx
;
margin-top
:
15%
;
background
:
#ffffff
;
margin-left
:
-20rpx
;
}
.total-view
{
width
:
142rpx
;
height
:
32rpx
;
line-height
:
32rpx
;
text-align
:
center
;
display
:
flex
;
display
:
flex
;
}
flex-direction
:
column
;
.total
{
align-items
:
center
;
font-weight
:
400
;
padding-bottom
:
200rpx
;
font-size
:
24rpx
;
.title-box
{
color
:
#333333
;
display
:
flex
;
}
align-items
:
center
;
.total-price-symbol
{
justify-content
:
space-between
;
font-weight
:
400
;
background
:
#fff
;
font-size
:
24rpx
;
position
:
relative
;
color
:
#f12a2a
;
top
:
0
;
}
width
:
100%
;
.total-price
{
.title
{
font-weight
:
400
;
font-size
:
15
*
2rpx
;
font-size
:
32rpx
;
font-weight
:
bold
;
color
:
#f12a2a
;
color
:
#3d3d3d
;
}
}
.total-discounts
{
}
width
:
200rpx
;
.popup-content
{
height
:
24rpx
;
width
:
100%
;
font-size
:
24rpx
;
display
:
flex
;
line-height
:
24rpx
;
flex-direction
:
column
;
color
:
#999999
;
align-items
:
center
;
margin-top
:
15rpx
;
margin-top
:
20rpx
;
}
.ticket-item
{
.submit-button
{
width
:
100%
;
width
:
188rpx
;
background-color
:
#fff
;
height
:
75rpx
;
border-radius
:
16rpx
;
border-radius
:
40rpx
;
display
:
flex
;
background
:
linear-gradient
(
90deg
,
#f73f3f
1%
,
#ec1a1a
98%
);
flex-direction
:
column
;
font-size
:
28rpx
;
margin-top
:
12rpx
;
line-height
:
75rpx
;
border
:
1
*
2rpx
solid
#f3f3f3
;
text-align
:
center
;
.ticket-box
{
color
:
#ffffff
;
display
:
flex
;
margin-left
:
520rpx
;
margin-top
:
-120rpx
;
.normal
{
background
:
url('../../static/ticket/ticket-normal.png')
no-repeat
;
background-size
:
100%
100%
;
}
.past
{
background
:
url('../../static/ticket/ticket-past.png')
no-repeat
;
background-size
:
100%
100%
;
}
.ticket-left
{
width
:
200rpx
;
height
:
200rpx
;
.ticket-box
{
width
:
94%
;
height
:
100%
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
gap
:
30rpx
;
.ticket-price
{
display
:
flex
;
align-items
:
last
baseline
;
text
{
font-size
:
24rpx
;
line-height
:
24rpx
;
font-family
:
PingFang
SC
;
color
:
#fff
;
}
.num
{
font-size
:
52rpx
;
}
}
.ticket-desc
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
gap
:
24rpx
;
.desc
{
font-size
:
24rpx
;
line-height
:
24rpx
;
font-family
:
PingFang
SC
;
color
:
#fff
;
}
}
}
}
.ticket-right
{
display
:
flex
;
flex-direction
:
column
;
width
:
504rpx
;
position
:
relative
;
.img
{
width
:
126rpx
;
height
:
94rpx
;
position
:
absolute
;
right
:
28rpx
;
top
:
26rpx
;
}
.head
{
display
:
flex
;
flex-direction
:
column
;
padding
:
30rpx
22rpx
26rpx
32rpx
;
gap
:
4rpx
;
.title
{
font-family
:
PingFang
SC
Heavy-Regular
;
font-size
:
32rpx
;
color
:
#333333
;
line-height
:
32rpx
;
}
.headbox
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
end
;
height
:
50rpx
;
.time
{
font-family
:
PingFang
SC
Heavy-Regular
;
font-size
:
20rpx
;
color
:
#999999
;
line-height
:
20rpx
;
}
.btn
{
padding
:
20rpx
;
box-sizing
:
border-box
;
border-radius
:
26rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
background
:
linear-gradient
(
90deg
,
#ff7051
0%
,
#ff382e
100%
);
color
:
#fff
;
font-size
:
24rpx
;
line-height
:
24rpx
;
}
}
}
.foot
{
display
:
flex
;
flex-direction
:
column
;
padding
:
0
22rpx
14rpx
32rpx
;
gap
:
14rpx
;
.line
{
border-top
:
2rpx
solid
#f2f2f2
;
}
.footbox
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
.more
{
margin-left
:
auto
;
font-size
:
8
*
2rpx
;
color
:
#abaaaa
;
}
.desc
{
font-family
:
PingFang
SC
Heavy-Regular
;
font-size
:
20rpx
;
color
:
#999999
;
line-height
:
20rpx
;
}
}
}
}
}
.detail
{
display
:
flex
;
flex-direction
:
column
;
padding
:
24rpx
0rpx
56rpx
0rpx
;
gap
:
30rpx
;
.line
{
border-top
:
2rpx
solid
#e7e7e7
;
}
.detail-box
{
display
:
flex
;
flex-direction
:
column
;
gap
:
40rpx
;
padding
:
0
40rpx
0
22rpx
;
.rowbox
{
display
:
flex
;
flex-direction
:
row
;
gap
:
48rpx
;
text
{
font-family
:
PingFang
SC
Regular
;
font-size
:
28rpx
;
color
:
#666666
;
line-height
:
28rpx
;
}
.desc
{
width
:
476rpx
;
}
}
}
}
}
.active-ticket
{
width
:
100%
;
background-color
:
#fff
;
border-radius
:
16rpx
;
display
:
flex
;
flex-direction
:
column
;
margin-top
:
12rpx
;
border
:
1
*
2rpx
solid
#fa5151
;
}
}
.address-card
{
width
:
710rpx
;
background
:
#fff
;
border-radius
:
16rpx
;
margin-top
:
20rpx
;
.title
{
width
:
100%
;
text-align
:
center
;
box-sizing
:
border-box
;
display
:
flex
;
align-content
:
center
;
justify-content
:
space-between
;
overflow
:
hidden
;
.home-delivery-service
{
width
:
50%
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
background
:
#ffffff
;
font-size
:
32rpx
;
font-weight
:
bold
;
color
:
#333333
;
}
.icon
{
width
:
50%
;
height
:
82rpx
;
background
:
#ffebeb
;
transform
:
skew
(
15deg
,
-0deg
);
position
:
relative
;
right
:
-6rpx
;
}
}
.address-content
{
box-sizing
:
border-box
;
padding
:
0
30rpx
;
margin-top
:
40rpx
;
display
:
flex
;
align-items
:
flex-start
;
.location-pic
{
width
:
35rpx
;
height
:
35rpx
;
flex-shrink
:
0
;
}
.location-text
{
font-size
:
32rpx
;
line-height
:
32rpx
;
color
:
#333333
;
font-weight
:
bold
;
margin-left
:
10rpx
;
}
.my-icon
{
margin-left
:
auto
;
}
}
.address-user-info
{
width
:
100%
;
display
:
flex
;
align-content
:
center
;
box-sizing
:
border-box
;
padding
:
34rpx
68rpx
;
font-size
:
28rpx
;
color
:
#999999
;
}
}
.prod-card
{
width
:
710rpx
;
box-sizing
:
border-box
;
background
:
#fff
;
border-radius
:
16rpx
;
margin-top
:
26rpx
;
.prod-shop-name
{
width
:
100%
;
padding-top
:
23rpx
;
padding-left
:
19rpx
;
padding-bottom
:
19rpx
;
box-sizing
:
border-box
;
font-size
:
28rpx
;
font-weight
:
bold
;
color
:
#333333
;
border-bottom
:
1rpx
solid
#f2f2f2
;
}
.prod-list
{
width
:
100%
;
box-sizing
:
border-box
;
padding
:
20rpx
;
.prod-item
{
width
:
100%
;
display
:
flex
;
margin-top
:
20rpx
;
image
{
width
:
129rpx
;
height
:
128rpx
;
border-radius
:
8rpx
;
box-sizing
:
border-box
;
border
:
1rpx
solid
#f6f6f6
;
flex-shrink
:
0
;
}
.center
{
display
:
flex
;
flex-direction
:
column
;
margin-left
:
21rpx
;
.prod-name
{
font-size
:
28rpx
;
font-weight
:
bold
;
color
:
#333333
;
}
.tag-list
{
display
:
flex
;
flex-wrap
:
wrap
;
}
}
.price-prod
{
display
:
flex
;
flex-direction
:
column
;
margin-left
:
auto
;
.prod-price
{
font-weight
:
900
;
font-size
:
32rpx
;
}
.prod-count
{
font-size
:
24rpx
;
color
:
#999999
;
}
}
}
}
.merchant-coupons
{
display
:
flex
;
width
:
100%
;
box-sizing
:
border-box
;
padding
:
20rpx
;
align-items
:
center
;
font-weight
:
bold
;
font-size
:
24rpx
;
.quan-icon
{
border-radius
:
5
*
2rpx
;
padding
:
8rpx
;
background
:
#fc2828
;
opacity
:
1
;
font-size
:
8
*
2rpx
;
color
:
#ffffff
;
margin-right
:
6px
;
}
.view-coupons
{
margin-left
:
auto
;
display
:
flex
;
align-items
:
center
;
font-size
:
24rpx
;
color
:
#333333
;
}
}
.uni-textarea
{
margin
:
0
auto
;
width
:
674rpx
;
border-radius
:
12rpx
;
font-size
:
24rpx
;
margin-top
:
20rpx
;
.textarea-box
{
background
:
#fafafa
;
box-sizing
:
border-box
;
padding
:
20rpx
;
.content
{
font-size
:
24rpx
;
font-weight
:
500
;
max-height
:
243rpx
;
background
:
#fafafa
;
color
:
#77818f
;
box-sizing
:
border-box
;
border-radius
:
12rpx
;
margin
:
0
auto
;
}
}
.xj-content
{
display
:
flex
;
align-items
:
center
;
margin-top
:
56rpx
;
justify-content
:
flex-end
;
padding-bottom
:
40rpx
;
.t
{
font-size
:
28rpx
;
color
:
#333333
;
}
.n
{
font-weight
:
700
;
font-size
:
32rpx
;
color
:
#f12a2a
;
}
}
}
}
.foot
{
width
:
100%
;
position
:
fixed
;
display
:
flex
;
align-items
:
center
;
bottom
:
0
;
box-sizing
:
border-box
;
background
:
#fff
;
padding
:
20rpx
18rpx
;
.total
{
display
:
flex
;
flex-direction
:
column
;
.hj-box
{
display
:
flex
;
align-items
:
center
;
font-weight
:
400
;
font-size
:
24rpx
;
color
:
#333333
;
.num
{
font-weight
:
700
;
font-size
:
32rpx
;
color
:
#f12a2a
;
}
}
.total-price
{
font-size
:
24rpx
;
color
:
#999999
;
}
}
}
.btn
{
box-sizing
:
border-box
;
padding
:
23rpx
38rpx
;
border-radius
:
40rpx
;
margin-left
:
auto
;
font-size
:
28rpx
;
color
:
#ffffff
;
background
:
linear-gradient
(
90deg
,
#f73f3f
1%
,
#ec1a1a
98%
);
}
}
}
</
style
>
</
style
>
src/pages/shop/confirmOrder.vue
View file @
509ffcf3
...
@@ -231,6 +231,10 @@ function groupBuyConfirmFn(prodId, skuId) {
...
@@ -231,6 +231,10 @@ function groupBuyConfirmFn(prodId, skuId) {
res
.
data
.
orderItems
[
0
].
pic
=
imgUrl
+
res
.
data
.
orderItems
[
0
].
pic
;
res
.
data
.
orderItems
[
0
].
pic
=
imgUrl
+
res
.
data
.
orderItems
[
0
].
pic
;
orderInfo
.
value
=
res
.
data
;
orderInfo
.
value
=
res
.
data
;
resolve
(
res
.
data
.
shopId
);
resolve
(
res
.
data
.
shopId
);
}
else
{
wx
.
showToast
({
title
:
res
.
msg
})
}
}
});
});
});
});
...
...
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