|  | @@ -6,6 +6,7 @@ import { Button, Cell, CellGroup, Icon, showToast } from 'vant'
 | 
	
		
			
				|  |  |  import { defineComponent, onMounted, reactive } from 'vue'
 | 
	
		
			
				|  |  |  import { useRoute } from 'vue-router'
 | 
	
		
			
				|  |  |  import styles from './index.module.less'
 | 
	
		
			
				|  |  | +import ODialog from '@/components/o-dialog'
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  export default defineComponent({
 | 
	
		
			
				|  |  |    name: 'pay-define',
 | 
	
	
		
			
				|  | @@ -24,7 +25,9 @@ export default defineComponent({
 | 
	
		
			
				|  |  |        orderNo: route.query.orderNo as any,
 | 
	
		
			
				|  |  |        userId: route.query.userId as any,
 | 
	
		
			
				|  |  |        payInfo: {} as any,
 | 
	
		
			
				|  |  | -      isYeePay: false // 是否为易宝支付
 | 
	
		
			
				|  |  | +      isYeePay: false, // 是否为易宝支付
 | 
	
		
			
				|  |  | +      dialogStatus: false,
 | 
	
		
			
				|  |  | +      dialogMessage: ''
 | 
	
		
			
				|  |  |      })
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      const getPayment = async () => {
 | 
	
	
		
			
				|  | @@ -44,16 +47,21 @@ export default defineComponent({
 | 
	
		
			
				|  |  |          //   payMap.code = state.code
 | 
	
		
			
				|  |  |          // }
 | 
	
		
			
				|  |  |          console.log(payMap, 'payMap')
 | 
	
		
			
				|  |  | -        const { data } = await request.post('/api-student/open/userOrder/executePayment', {
 | 
	
		
			
				|  |  | +        const res = await request.post('/api-student/open/userOrder/executePayment', {
 | 
	
		
			
				|  |  |            hideLoading: false,
 | 
	
		
			
				|  |  |            data: {
 | 
	
		
			
				|  |  |              ...payMap
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  |          })
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        state.isYeePay = data.paymentVender?.indexOf('yeepay') !== -1
 | 
	
		
			
				|  |  | -        console.log(data, 'payment')
 | 
	
		
			
				|  |  | -        scanCodePay(data.reqParams)
 | 
	
		
			
				|  |  | +        if (res.code === 999) {
 | 
	
		
			
				|  |  | +          state.dialogStatus = true
 | 
	
		
			
				|  |  | +          state.dialogMessage = res.message
 | 
	
		
			
				|  |  | +        } else {
 | 
	
		
			
				|  |  | +          state.isYeePay = res.data.paymentVender?.indexOf('yeepay') !== -1
 | 
	
		
			
				|  |  | +          console.log(res.data, 'payment')
 | 
	
		
			
				|  |  | +          scanCodePay(res.data.reqParams)
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |        } catch (e) {
 | 
	
		
			
				|  |  |          //
 | 
	
		
			
				|  |  |          console.log(e)
 | 
	
	
		
			
				|  | @@ -255,6 +263,18 @@ export default defineComponent({
 | 
	
		
			
				|  |  |              </div>
 | 
	
		
			
				|  |  |            </div>
 | 
	
		
			
				|  |  |          )}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        <ODialog
 | 
	
		
			
				|  |  | +          title="提示"
 | 
	
		
			
				|  |  | +          v-model:show={state.dialogStatus}
 | 
	
		
			
				|  |  | +          message={state.dialogMessage}
 | 
	
		
			
				|  |  | +          confirmButtonText="确定"
 | 
	
		
			
				|  |  | +          onConfirm={() => {
 | 
	
		
			
				|  |  | +            window.location.replace(
 | 
	
		
			
				|  |  | +              location.origin + '/orchestra-student/#/payment-result?orderNo=' + state.orderNo
 | 
	
		
			
				|  |  | +            )
 | 
	
		
			
				|  |  | +          }}
 | 
	
		
			
				|  |  | +        />
 | 
	
		
			
				|  |  |        </div>
 | 
	
		
			
				|  |  |      )
 | 
	
		
			
				|  |  |    }
 |