Browse Source

修改支付

lex 1 year ago
parent
commit
f3f9ad77d1
2 changed files with 19 additions and 37 deletions
  1. 17 35
      src/student/member-center/index.tsx
  2. 2 2
      vite.config.ts

+ 17 - 35
src/student/member-center/index.tsx

@@ -32,7 +32,8 @@ export default defineComponent({
       functionList: [] as any,
       selectMember: {} as any,
       users: {} as any,
-      memberStatus: false
+      memberStatus: false,
+      paymentType: ''
     }
   },
   computed: {
@@ -54,44 +55,11 @@ export default defineComponent({
     try {
       const userInfo = await request.get('/api-student/student/member')
       this.users = userInfo.data || {}
-      // this.functionList = [
-      //   {
-      //     title: '五线谱<br />跟播',
-      //     icon: getAssetsHomeFile(`1.png`)
-      //   },
-      //   {
-      //     title: '演奏指法<br />跟播',
-      //     icon: getAssetsHomeFile(`2.png`)
-      //   },
-      //   {
-      //     title: '原声/伴奏<br />切换',
-      //     icon: getAssetsHomeFile(`3.png`)
-      //   },
-      //   {
-      //     title: '播放速度<br />调整',
-      //     icon: getAssetsHomeFile(`4.png`)
-      //   },
-      //   {
-      //     title: '五线谱选段<br />播放',
-      //     icon: getAssetsHomeFile(`5.png`)
-      //   },
-      //   {
-      //     title: '智能评测',
-      //     icon: getAssetsHomeFile(`6.png`)
-      //   },
-      //   {
-      //     title: '评测报告',
-      //     icon: getAssetsHomeFile(`7.png`)
-      //   },
-      //   {
-      //     title: '评测音视频<br />云储存',
-      //     icon: getAssetsHomeFile(`8.png`)
-      //   }
-      // ]
 
       const { data } = await request.post(`/api-student/cityFeeSetting/member`)
       this.selectMember = data
 
+      this.sysParamConfig()
       this.paymentOrderUnpaid()
     } catch {
       //
@@ -99,6 +67,19 @@ export default defineComponent({
     //
   },
   methods: {
+    // 获取支付渠道
+    async sysParamConfig() {
+      try {
+        const { data } = await request.get('/api-student/sysParamConfig/queryByParamName', {
+          params: {
+            paramName: 'vip_payment_service_provider'
+          }
+        })
+        this.paymentType = data.paramValue || ''
+      } catch {
+        //
+      }
+    },
     // 查询未支付订单
     async paymentOrderUnpaid() {
       try {
@@ -166,6 +147,7 @@ export default defineComponent({
         // 创建订单
         const { data } = await request.post('/api-student/userPaymentOrder/executeOrder', {
           data: {
+            paymentType: this.paymentType,
             orderType: 'VIP',
             paymentCashAmount: this.selectMember.salePrice || 0,
             paymentCouponAmount: 0,

+ 2 - 2
vite.config.ts

@@ -11,8 +11,8 @@ function resolve(dir: string) {
 }
 // https://vitejs.dev/config/
 // https://github.com/vitejs/vite/issues/1930 .env
-const proxyUrl = 'https://online.lexiaoya.cn/'
-// const proxyUrl = 'https://test.lexiaoya.cn/'
+// const proxyUrl = 'https://online.lexiaoya.cn/'
+const proxyUrl = 'https://test.lexiaoya.cn/'
 // const proxyUrl = 'https://dev.lexiaoya.cn/'
 // const proxyUrl = 'http://47.98.131.38:8989/'
 // const proxyUrl = 'http://192.168.3.20:8989/' // 邹旋