|
@@ -16,11 +16,12 @@
|
|
<span class="font-size-13">¥</span>
|
|
<span class="font-size-13">¥</span>
|
|
<span class="font-size-30">{{ cost }}</span>
|
|
<span class="font-size-30">{{ cost }}</span>
|
|
</div>
|
|
</div>
|
|
- <radioGroupUI
|
|
|
|
- :modelValue="payType"
|
|
|
|
- :item="payTypeItem"
|
|
|
|
- @change="val => payTypeChange(val)"
|
|
|
|
- ></radioGroupUI>
|
|
|
|
|
|
+ <v-chip-group v-model="payType" selected-class="text-primary" mandatory @update:modelValue="payTypeChange">
|
|
|
|
+ <v-chip filter v-for="k in payTypeList" :key="k.code" :value="k.code" class="mr-3" label>
|
|
|
|
+ {{ k.name }}
|
|
|
|
+ <svg-icon v-if="k.icon" class="ml-1" :name="k.icon" :size="k.size"></svg-icon>
|
|
|
|
+ </v-chip>
|
|
|
|
+ </v-chip-group>
|
|
<div class="pa-5">
|
|
<div class="pa-5">
|
|
<!-- 支付 -->
|
|
<!-- 支付 -->
|
|
<div v-if="isWalletPay">
|
|
<div v-if="isWalletPay">
|
|
@@ -56,7 +57,6 @@
|
|
<script setup>
|
|
<script setup>
|
|
defineOptions({ name: 'pay-index'})
|
|
defineOptions({ name: 'pay-index'})
|
|
import { computed, onUnmounted, ref } from 'vue'
|
|
import { computed, onUnmounted, ref } from 'vue'
|
|
-import radioGroupUI from '@/components/FormUI/radioGroup'
|
|
|
|
import QrCode from '@/components/QrCode'
|
|
import QrCode from '@/components/QrCode'
|
|
import { definePayTypeList, qrCodePay, walletPay } from './until/payType'
|
|
import { definePayTypeList, qrCodePay, walletPay } from './until/payType'
|
|
import { getEnableCodeList, getUnpaidOrder, payOrderSubmit, getOrderPayStatus } from '@/api/common'
|
|
import { getEnableCodeList, getUnpaidOrder, payOrderSubmit, getOrderPayStatus } from '@/api/common'
|
|
@@ -99,12 +99,12 @@ const balanceNotEnough = computed(() => {
|
|
// 支付方式
|
|
// 支付方式
|
|
const isWalletPay = ref(true)
|
|
const isWalletPay = ref(true)
|
|
const isQrCodePay = ref(false)
|
|
const isQrCodePay = ref(false)
|
|
-const payTypeChange = (val) => {
|
|
|
|
- payType.value = val
|
|
|
|
|
|
+const payTypeChange = (value) => {
|
|
|
|
+ payType.value = value
|
|
isQrCodePay.value = qrCodePay.includes(payType.value)
|
|
isQrCodePay.value = qrCodePay.includes(payType.value)
|
|
isWalletPay.value = walletPay.includes(payType.value)
|
|
isWalletPay.value = walletPay.includes(payType.value)
|
|
if (isQrCodePay.value) initPayQrCode() // 生成二维码内容
|
|
if (isQrCodePay.value) initPayQrCode() // 生成二维码内容
|
|
- emit('payTypeChange', val, balanceNotEnough)
|
|
|
|
|
|
+ emit('payTypeChange', value, balanceNotEnough)
|
|
}
|
|
}
|
|
// 支付方式
|
|
// 支付方式
|
|
const payType = ref('')
|
|
const payType = ref('')
|
|
@@ -174,15 +174,6 @@ getUnpaidOrderList() // getUnpaidOrder
|
|
const payLoading = ref(false)
|
|
const payLoading = ref(false)
|
|
const payQrCodeTet = ref('')
|
|
const payQrCodeTet = ref('')
|
|
|
|
|
|
-const payTypeItem = {
|
|
|
|
- label: '',
|
|
|
|
- width: 1,
|
|
|
|
- hideDetails: true,
|
|
|
|
- itemText: 'name',
|
|
|
|
- itemValue: 'code',
|
|
|
|
- items: payTypeList.value
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
// 钱包支付(余额支付)
|
|
// 钱包支付(余额支付)
|
|
const walletPaySubmit = () => {
|
|
const walletPaySubmit = () => {
|
|
// emit('paySubmit', payType.value)
|
|
// emit('paySubmit', payType.value)
|