|
@@ -23,6 +23,7 @@ import { CountUp } from 'countup.js'
|
|
|
import OPopup from '@/components/o-popup'
|
|
|
import MemberBao from '../../member-bao'
|
|
|
import GoodsDetail from '../../goods-detail'
|
|
|
+import ODialog from '@/components/o-dialog'
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'payment',
|
|
@@ -46,7 +47,11 @@ export default defineComponent({
|
|
|
memberBaoStatus: false, // 团练宝详情状态
|
|
|
goodsStatus: false, //
|
|
|
selectGoodsId: null as any,
|
|
|
- currentPrice: 0
|
|
|
+ currentPrice: 0,
|
|
|
+ selectGoodsInfo: {} as any,
|
|
|
+ dialogStatus: false,
|
|
|
+ dialogMessage: '',
|
|
|
+ dialogConfig: {} as any
|
|
|
})
|
|
|
|
|
|
// 查询未支付订单
|
|
@@ -55,29 +60,9 @@ export default defineComponent({
|
|
|
const { data } = await request.get('/api-student/userPaymentOrder/unpaid')
|
|
|
// 判断是否有待支付订单
|
|
|
if (data.id) {
|
|
|
- showConfirmDialog({
|
|
|
- message: '您有待支付的订单,是否继续支付',
|
|
|
- cancelButtonText: '取消订单',
|
|
|
- confirmButtonText: '继续支付'
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- const paymentConfig = data.paymentConfig
|
|
|
- router.push({
|
|
|
- path: '/orderDetail',
|
|
|
- query: {
|
|
|
- pm: 1, // h5乐团报名
|
|
|
- config: JSON.stringify(paymentConfig.paymentConfig),
|
|
|
- orderNo: paymentConfig.orderNo
|
|
|
- }
|
|
|
- })
|
|
|
- })
|
|
|
- .catch(async () => {
|
|
|
- try {
|
|
|
- await request.post('/api-student/userPaymentOrder/cancelPayment/' + data.orderNo)
|
|
|
- } catch {
|
|
|
- //
|
|
|
- }
|
|
|
- })
|
|
|
+ state.dialogMessage = '您有待支付的订单,是否继续支付'
|
|
|
+ state.dialogStatus = true
|
|
|
+ state.dialogConfig = data
|
|
|
}
|
|
|
} catch {
|
|
|
//
|
|
@@ -285,7 +270,6 @@ export default defineComponent({
|
|
|
2、所有参与乐团的学生免费赠送选报声部教材,教材随乐器一同发放,若您自备乐器,则需承担教材运费。
|
|
|
</p>
|
|
|
</div>
|
|
|
-
|
|
|
<CheckboxGroup
|
|
|
v-model={state.check}
|
|
|
style={{ paddingBottom: '20px' }}
|
|
@@ -331,11 +315,24 @@ export default defineComponent({
|
|
|
e.stopPropagation()
|
|
|
state.selectGoodsId = state.goodsInfo.goodsId
|
|
|
state.currentPrice = state.goodsInfo.currentPrice
|
|
|
+ state.selectGoodsInfo = {
|
|
|
+ showFree: true,
|
|
|
+ originalPrice: state.repaireInfo.originalPrice
|
|
|
+ }
|
|
|
state.goodsStatus = true
|
|
|
}}
|
|
|
/>
|
|
|
<div class={styles.sectionContent}>
|
|
|
- <h2>{state.goodsInfo.goodsName}</h2>
|
|
|
+ <h2
|
|
|
+ onClick={(e: any) => {
|
|
|
+ e.stopPropagation()
|
|
|
+ state.selectGoodsId = state.goodsInfo.goodsId
|
|
|
+ state.currentPrice = state.goodsInfo.currentPrice
|
|
|
+ state.goodsStatus = true
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ {state.goodsInfo.goodsName}
|
|
|
+ </h2>
|
|
|
<Tag
|
|
|
color="linear-gradient(135deg, #FF8C4A 0%, #FF531C 100%)"
|
|
|
textColor="#fff"
|
|
@@ -428,11 +425,22 @@ export default defineComponent({
|
|
|
e.stopPropagation()
|
|
|
state.selectGoodsId = state.textBookInfo.goodsId
|
|
|
state.currentPrice = state.textBookInfo.currentPrice
|
|
|
+ state.selectGoodsInfo = {}
|
|
|
state.goodsStatus = true
|
|
|
}}
|
|
|
/>
|
|
|
<div class={styles.sectionContent}>
|
|
|
- <h2>{state.textBookInfo.goodsName}</h2>
|
|
|
+ <h2
|
|
|
+ onClick={(e: any) => {
|
|
|
+ e.stopPropagation()
|
|
|
+ state.selectGoodsId = state.textBookInfo.goodsId
|
|
|
+ state.currentPrice = state.textBookInfo.currentPrice
|
|
|
+ state.selectGoodsInfo = {}
|
|
|
+ state.goodsStatus = true
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ {state.textBookInfo.goodsName}
|
|
|
+ </h2>
|
|
|
<Tag
|
|
|
color="linear-gradient(135deg, #FF8C4A 0%, #FF531C 100%)"
|
|
|
textColor="#fff"
|
|
@@ -522,7 +530,14 @@ export default defineComponent({
|
|
|
}}
|
|
|
/>
|
|
|
<div class={styles.sectionContent}>
|
|
|
- <h2>{state.vipInfo.goodsName}</h2>
|
|
|
+ <h2
|
|
|
+ onClick={(e: any) => {
|
|
|
+ e.stopPropagation()
|
|
|
+ state.memberBaoStatus = true
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ {state.vipInfo.goodsName}
|
|
|
+ </h2>
|
|
|
<Tag
|
|
|
color="linear-gradient(135deg, #FF8C4A 0%, #FF531C 100%)"
|
|
|
textColor="#fff"
|
|
@@ -563,7 +578,6 @@ export default defineComponent({
|
|
|
</>
|
|
|
)}
|
|
|
</CheckboxGroup>
|
|
|
-
|
|
|
<OSticky position="bottom" background="white">
|
|
|
<div class={styles.paymentContainer}>
|
|
|
<div class={styles.payemntPrice}>
|
|
@@ -591,16 +605,46 @@ export default defineComponent({
|
|
|
</div>
|
|
|
</div>
|
|
|
</OSticky>
|
|
|
-
|
|
|
<OPopup v-model:modelValue={state.memberBaoStatus} position="right">
|
|
|
<MemberBao />
|
|
|
</OPopup>
|
|
|
-
|
|
|
<OPopup v-model:modelValue={state.goodsStatus} position="right" destroy>
|
|
|
{state.goodsStatus && (
|
|
|
- <GoodsDetail id={state.selectGoodsId} groupPrice={state.currentPrice} />
|
|
|
+ <GoodsDetail
|
|
|
+ id={state.selectGoodsId}
|
|
|
+ groupPrice={state.currentPrice}
|
|
|
+ goodsInfo={state.selectGoodsInfo}
|
|
|
+ />
|
|
|
)}
|
|
|
</OPopup>
|
|
|
+ <ODialog
|
|
|
+ title="提示"
|
|
|
+ v-model:show={state.dialogStatus}
|
|
|
+ message={state.dialogMessage}
|
|
|
+ confirmButtonText="继续支付"
|
|
|
+ cancelButtonText="取消订单"
|
|
|
+ showCancelButton
|
|
|
+ onConfirm={() => {
|
|
|
+ const paymentConfig = state.dialogConfig.paymentConfig
|
|
|
+ router.push({
|
|
|
+ path: '/orderDetail',
|
|
|
+ query: {
|
|
|
+ pm: 1, // h5乐团报名
|
|
|
+ config: JSON.stringify(paymentConfig.paymentConfig),
|
|
|
+ orderNo: paymentConfig.orderNo
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }}
|
|
|
+ onCancel={async () => {
|
|
|
+ try {
|
|
|
+ await request.post(
|
|
|
+ '/api-student/userPaymentOrder/cancelPayment/' + state.dialogConfig.orderNo
|
|
|
+ )
|
|
|
+ } catch {
|
|
|
+ //
|
|
|
+ }
|
|
|
+ }}
|
|
|
+ />
|
|
|
</>
|
|
|
)
|
|
|
}
|