|
@@ -11,6 +11,7 @@ import { state } from '@/state'
|
|
|
import ColPopup from '@/components/col-popup'
|
|
|
import UserAuth from '@/views/order-detail/userAuth'
|
|
|
import ColResult from '@/components/col-result'
|
|
|
+import { moneyFormat } from '@/helpers/utils'
|
|
|
export default defineComponent({
|
|
|
setup() {
|
|
|
const list = cartConfirm.cartPromotionItemList
|
|
@@ -25,7 +26,7 @@ export default defineComponent({
|
|
|
const address = cartConfirm.memberReceiveAddressList.length
|
|
|
? cartConfirm.memberReceiveAddressList.find(
|
|
|
(n: any) => n.defaultStatus
|
|
|
- ) || cartConfirm.memberReceiveAddressList[0]
|
|
|
+ ) || cartConfirm.memberReceiveAddressList[0] || {}
|
|
|
: {}
|
|
|
|
|
|
const agreeStatus = ref(false)
|
|
@@ -37,6 +38,10 @@ export default defineComponent({
|
|
|
})
|
|
|
// 提交
|
|
|
const onSubmit = () => {
|
|
|
+ if (!(address as any).id){
|
|
|
+ Toast('请选择收货地址')
|
|
|
+ return
|
|
|
+ }
|
|
|
if (!agreeStatus.value) {
|
|
|
Toast('请先阅读并同意《酷乐秀平台服务协议》')
|
|
|
return
|
|
@@ -103,9 +108,7 @@ export default defineComponent({
|
|
|
style={{ marginBottom: '10px' }}
|
|
|
>
|
|
|
<Card
|
|
|
- price={((item.price * item.quantity * 100) / 100).toFixed(
|
|
|
- 2
|
|
|
- )}
|
|
|
+ price={moneyFormat(item.price)}
|
|
|
desc={item.productAttr}
|
|
|
title={item.productName}
|
|
|
thumb={item.productPic}
|
|
@@ -118,14 +121,14 @@ export default defineComponent({
|
|
|
<Cell
|
|
|
border={false}
|
|
|
title="总额"
|
|
|
- value={'¥ ' + calcAmount.totalAmount}
|
|
|
+ value={'¥ ' + moneyFormat(calcAmount.totalAmount)}
|
|
|
></Cell>
|
|
|
<Cell
|
|
|
border={false}
|
|
|
title="运费"
|
|
|
- value={calcAmount.freightAmount}
|
|
|
+ value={moneyFormat(calcAmount.freightAmount)}
|
|
|
></Cell>
|
|
|
- <Cell border={false} title="优惠" value={'-¥ ' + calcAmount.promotionAmount}></Cell>
|
|
|
+ <Cell border={false} title="优惠" value={'-¥ ' + moneyFormat(calcAmount.promotionAmount)}></Cell>
|
|
|
{/* <Cell border={false} title="优惠卷" value="暂无可用优惠卷"></Cell>
|
|
|
<Cell border={false} title="乐乐币抵扣" value={"-¥" + calcAmount.promotionAmount}></Cell> */}
|
|
|
</CellGroup>
|
|
@@ -142,7 +145,7 @@ export default defineComponent({
|
|
|
>
|
|
|
<div class={styles.confirmBottom}>
|
|
|
合计{' '}
|
|
|
- <span class={styles['price-des']}>¥{(calcAmount.payAmount * 1000 / 1000).toFixed(2)}</span>
|
|
|
+ <span class={styles['price-des']}>¥{moneyFormat(calcAmount.payAmount)}</span>
|
|
|
</div>
|
|
|
</SubmitBar>
|
|
|
<div style={{ height: 'var(--van-submit-bar-height)' }}></div>
|