Explorar el Código

添加支付方式

lex hace 1 año
padre
commit
4c171121fc
Se han modificado 1 ficheros con 10 adiciones y 8 borrados
  1. 10 8
      src/student/music-group/pre-apply/component/payment.tsx

+ 10 - 8
src/student/music-group/pre-apply/component/payment.tsx

@@ -34,6 +34,7 @@ export default defineComponent({
     const router = useRouter()
     const state = reactive({
       paymentType: 'wxpay',
+      musicPaymentType: '', // 乐团中对应支付方式
       check: [] as any, // 选中的数据
       checkboxRefs: [] as any,
       details: [] as any, //
@@ -92,6 +93,7 @@ export default defineComponent({
           '/api-student/orchestraRegister/registerGoods/' + route.query.id
         )
 
+        state.musicPaymentType = data.paymentServiceProvider || ''
         // 获取已经购买商品信息
         const paymentOrderDetails = data.paymentOrderDetails || []
         paymentOrderDetails.forEach((item: any) => {
@@ -237,18 +239,18 @@ export default defineComponent({
           })
         }
 
-        console.log({
-          bizId: route.query.id, // 乐团编号
-          orderType: 'ORCHESTRA',
-          paymentCashAmount: state.orderInfo.needPrice || 0,
-          paymentCouponAmount: 0,
-          goodsInfos: params
-        })
+        // console.log({
+        //   bizId: route.query.id, // 乐团编号
+        //   orderType: 'ORCHESTRA',
+        //   paymentCashAmount: state.orderInfo.needPrice || 0,
+        //   paymentCouponAmount: 0,
+        //   goodsInfos: params
+        // })
         // 创建订单
         const { data } = await request.post('/api-student/userPaymentOrder/executeOrder', {
           hideLoading: false,
           data: {
-            paymentType: state.paymentType,
+            paymentType: state.musicPaymentType || state.paymentType,
             bizId: route.query.id, // 乐团编号
             orderType: 'ORCHESTRA',
             paymentCashAmount: state.orderInfo.needPrice || 0,