|  | @@ -272,7 +272,7 @@ export default defineComponent({
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  |          );
 | 
	
		
			
				|  |  |          // 默认选中商品
 | 
	
		
			
				|  |  | -        // studentRegisterStore.setVip(data.details || []);
 | 
	
		
			
				|  |  | +        studentRegisterStore.setVip(data.details || []);
 | 
	
		
			
				|  |  |          const details = deepClone(data.details || []);
 | 
	
		
			
				|  |  |          if (details.length > 0) {
 | 
	
		
			
				|  |  |            forms.giftVipDay = details[0].membershipDays;
 | 
	
	
		
			
				|  | @@ -305,11 +305,12 @@ export default defineComponent({
 | 
	
		
			
				|  |  |          originAmount += Number(vip.originalPrice);
 | 
	
		
			
				|  |  |        });
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -      const goodsList: any[] = studentRegisterStore.getGoods;
 | 
	
		
			
				|  |  | -      goodsList.forEach((good: any) => {
 | 
	
		
			
				|  |  | -        amount += Number(good.price) * good.quantity;
 | 
	
		
			
				|  |  | -        originAmount += Number(good.originalPrice) * good.quantity;
 | 
	
		
			
				|  |  | -      });
 | 
	
		
			
				|  |  | +      // const goodsList: any[] = studentRegisterStore.getGoods;
 | 
	
		
			
				|  |  | +      // goodsList.forEach((good: any) => {
 | 
	
		
			
				|  |  | +      //   amount += Number(good.price) * good.quantity;
 | 
	
		
			
				|  |  | +      //   originAmount += Number(good.originalPrice) * good.quantity;
 | 
	
		
			
				|  |  | +      // });
 | 
	
		
			
				|  |  | +      console.log(studentRegisterStore.getVip);
 | 
	
		
			
				|  |  |        return {
 | 
	
		
			
				|  |  |          amount,
 | 
	
		
			
				|  |  |          originAmount
 | 
	
	
		
			
				|  | @@ -429,42 +430,50 @@ export default defineComponent({
 | 
	
		
			
				|  |  |            };
 | 
	
		
			
				|  |  |            state.orderNo = result.data.orderNo;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -          const users = baseState.user.data;
 | 
	
		
			
				|  |  | -          // 判断是否需要实名认证, 姓名,卡号 - 参数设置可以控制
 | 
	
		
			
				|  |  | -          if (
 | 
	
		
			
				|  |  | -            forms.contract_sign &&
 | 
	
		
			
				|  |  | -            (!users?.account.realName || !users?.account.idCardNo)
 | 
	
		
			
				|  |  | -          ) {
 | 
	
		
			
				|  |  | -            state.authShow = true;
 | 
	
		
			
				|  |  | -            return;
 | 
	
		
			
				|  |  | -          }
 | 
	
		
			
				|  |  | -          const { data } = await request.post(
 | 
	
		
			
				|  |  | -            '/edu-app/userPaymentOrder/updateReceiveAddress',
 | 
	
		
			
				|  |  | -            {
 | 
	
		
			
				|  |  | -              // hideLoading: false,
 | 
	
		
			
				|  |  | -              data: {
 | 
	
		
			
				|  |  | -                orderNo: state.orderNo,
 | 
	
		
			
				|  |  | -                orderType: 'SCHOOL_REGISTER'
 | 
	
		
			
				|  |  | -              }
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -          );
 | 
	
		
			
				|  |  | -          state.pay_channel = data.paymentChannel;
 | 
	
		
			
				|  |  | -          if (data.status !== 'WAIT_PAY' && data.status !== 'PAYING') {
 | 
	
		
			
				|  |  | -            router.replace({
 | 
	
		
			
				|  |  | -              path: '/payment-result',
 | 
	
		
			
				|  |  | -              query: {
 | 
	
		
			
				|  |  | -                orderNo: state.orderNo
 | 
	
		
			
				|  |  | -              }
 | 
	
		
			
				|  |  | -            });
 | 
	
		
			
				|  |  | -          } else {
 | 
	
		
			
				|  |  | -            onCallback();
 | 
	
		
			
				|  |  | -          }
 | 
	
		
			
				|  |  | +          await lastSubmit();
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |        } catch (e: any) {
 | 
	
		
			
				|  |  |          console.log(e, 'any');
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      };
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    const lastSubmit = async () => {
 | 
	
		
			
				|  |  | +      try {
 | 
	
		
			
				|  |  | +        const users = baseState.user.data;
 | 
	
		
			
				|  |  | +        // 判断是否需要实名认证, 姓名,卡号 - 参数设置可以控制
 | 
	
		
			
				|  |  | +        if (
 | 
	
		
			
				|  |  | +          forms.contract_sign &&
 | 
	
		
			
				|  |  | +          (!users?.account.realName || !users?.account.idCardNo)
 | 
	
		
			
				|  |  | +        ) {
 | 
	
		
			
				|  |  | +          state.authShow = true;
 | 
	
		
			
				|  |  | +          return;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        const { data } = await request.post(
 | 
	
		
			
				|  |  | +          '/edu-app/userPaymentOrder/updateReceiveAddress',
 | 
	
		
			
				|  |  | +          {
 | 
	
		
			
				|  |  | +            // hideLoading: false,
 | 
	
		
			
				|  |  | +            data: {
 | 
	
		
			
				|  |  | +              orderNo: state.orderNo,
 | 
	
		
			
				|  |  | +              orderType: 'SCHOOL_REGISTER'
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +        );
 | 
	
		
			
				|  |  | +        state.pay_channel = data.paymentChannel;
 | 
	
		
			
				|  |  | +        if (data.status !== 'WAIT_PAY' && data.status !== 'PAYING') {
 | 
	
		
			
				|  |  | +          router.replace({
 | 
	
		
			
				|  |  | +            path: '/payment-result',
 | 
	
		
			
				|  |  | +            query: {
 | 
	
		
			
				|  |  | +              orderNo: state.orderNo
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +          });
 | 
	
		
			
				|  |  | +        } else {
 | 
	
		
			
				|  |  | +          onCallback();
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      } catch {
 | 
	
		
			
				|  |  | +        //
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +    };
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |      /**
 | 
	
		
			
				|  |  |       * @description 回调,判断是否有支付渠道,如果有则直接去支付
 | 
	
		
			
				|  |  |       * @returns void
 | 
	
	
		
			
				|  | @@ -505,6 +514,9 @@ export default defineComponent({
 | 
	
		
			
				|  |  |          orderNo: config.merOrderNo,
 | 
	
		
			
				|  |  |          userId: config.userId
 | 
	
		
			
				|  |  |        });
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      // console.log(params, state.config);
 | 
	
		
			
				|  |  | +      // return;
 | 
	
		
			
				|  |  |        if (val.payCode === 'payResult') {
 | 
	
		
			
				|  |  |          window.location.href =
 | 
	
		
			
				|  |  |            window.location.origin + '/classroom-app/#/payResult?' + params;
 | 
	
	
		
			
				|  | @@ -889,6 +901,37 @@ export default defineComponent({
 | 
	
		
			
				|  |  |            }}
 | 
	
		
			
				|  |  |          />
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +        <MDialog
 | 
	
		
			
				|  |  | +          title="提示"
 | 
	
		
			
				|  |  | +          v-model:show={forms.dialogStatus}
 | 
	
		
			
				|  |  | +          message={forms.dialogMessage}
 | 
	
		
			
				|  |  | +          allowHtml={true}
 | 
	
		
			
				|  |  | +          primaryColor="#FF8057"
 | 
	
		
			
				|  |  | +          confirmButtonText="继续支付"
 | 
	
		
			
				|  |  | +          onConfirm={async () => {
 | 
	
		
			
				|  |  | +            // const paymentConfig = forms.dialogConfig.paymentConfig;
 | 
	
		
			
				|  |  | +            // router.push({
 | 
	
		
			
				|  |  | +            //   path: '/order-detail',
 | 
	
		
			
				|  |  | +            //   query: {
 | 
	
		
			
				|  |  | +            //     pm: 1, // h5乐团报名
 | 
	
		
			
				|  |  | +            //     config: JSON.stringify(paymentConfig.paymentConfig),
 | 
	
		
			
				|  |  | +            //     orderNo: paymentConfig.orderNo
 | 
	
		
			
				|  |  | +            //   }
 | 
	
		
			
				|  |  | +            // });
 | 
	
		
			
				|  |  | +            console.log(forms.dialogConfig, 'dialogConfig');
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            countDown.pause();
 | 
	
		
			
				|  |  | +            const paymentConfig = forms.dialogConfig.paymentConfig;
 | 
	
		
			
				|  |  | +            state.config = paymentConfig?.paymentConfig;
 | 
	
		
			
				|  |  | +            state.orderNo = paymentConfig?.orderNo;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            await lastSubmit();
 | 
	
		
			
				|  |  | +          }}
 | 
	
		
			
				|  |  | +          onCancel={(val: any) => {
 | 
	
		
			
				|  |  | +            countDown.pause();
 | 
	
		
			
				|  |  | +          }}
 | 
	
		
			
				|  |  | +        />
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |          <Popup
 | 
	
		
			
				|  |  |            show={state.paymentStatus}
 | 
	
		
			
				|  |  |            closeOnClickOverlay={false}
 |