Pārlūkot izejas kodu

去掉测试代码

harryYao 2 gadi atpakaļ
vecāks
revīzija
857c67a2bf
1 mainītis faili ar 26 papildinājumiem un 25 dzēšanām
  1. 26 25
      src/App.vue

+ 26 - 25
src/App.vue

@@ -9,9 +9,9 @@
           <span v-if="isVIP">会员有效期至: {{ expireTime ? dateFormat(expireTime, 'yyyy-MM-dd') : '-'}}</span>
         </div> -->
       </div>
-			<div>{{chatToken}}</div>
+			<!-- <div>{{chatToken}}</div>
 			<div>{{step}}</div>
-			<div>{{error}}</div>
+			<div>{{error}}</div> -->
 			<div class="vip-info vip-rights">
 				<div class="title-view">
 					<div class="tabitem" :class="{active: ctype == 1}" @click="ctype = 1">
@@ -70,25 +70,25 @@ export default {
     return {
 			chatToken: '',
       ctype: 1,
-				list2: [
-					'1、购买AI能量包立刻获得算力。',
-					'2、多个AI能量包可重复可叠加购买,算力永不过期。'
-				],
-				curIndex: 0,
-				vipTypes: [
-					{ type: PAY_TYPE.MONTHLY, typename: '1个月VIP',  op: '¥30', desc: '给程序员买杯咖啡'},
-					{ type: PAY_TYPE.SEASONALLY, typename: '3个月VIP',  op: '¥90', desc: '请程序员喝个小酒'},
-					{ type: PAY_TYPE.YEARLY, typename: '12个月VIP', op: '¥360', desc: '请程序员吃顿大餐'}
-				],
-				timesTypes: [
-					{ type: PAY_TYPE.S_PLUS, typename: '小能量包',  op: '¥15', desc: '200点算力'},
-					{ type: PAY_TYPE.M_PLUS, typename: '中能量包',  op: '¥30', desc: '400点算力'},
-					{ type: PAY_TYPE.L_PLUS, typename: '大能量包',  op: '¥45', desc: '600点算力'}
-				],
-				orderList: [],
-				page: 1,
-				step: 1,
-				error: ''
+			list2: [
+				'1、购买AI能量包立刻获得算力。',
+				'2、多个AI能量包可重复可叠加购买,算力永不过期。'
+			],
+			curIndex: 0,
+			vipTypes: [
+				{ type: PAY_TYPE.MONTHLY, typename: '1个月VIP',  op: '¥30', desc: '给程序员买杯咖啡'},
+				{ type: PAY_TYPE.SEASONALLY, typename: '3个月VIP',  op: '¥90', desc: '请程序员喝个小酒'},
+				{ type: PAY_TYPE.YEARLY, typename: '12个月VIP', op: '¥360', desc: '请程序员吃顿大餐'}
+			],
+			timesTypes: [
+				{ type: PAY_TYPE.S_PLUS, typename: '小能量包',  op: '¥15', desc: '200点算力'},
+				{ type: PAY_TYPE.M_PLUS, typename: '中能量包',  op: '¥30', desc: '400点算力'},
+				{ type: PAY_TYPE.L_PLUS, typename: '大能量包',  op: '¥45', desc: '600点算力'}
+			],
+			orderList: [],
+			page: 1,
+			step: 1,
+			error: ''
     }
   },
   created() {
@@ -120,6 +120,10 @@ export default {
 			}
   },
   methods: {
+		
+		changeChargeType(index) {
+			this.curIndex = index
+		},
     async handlePay() {
 			const type = this.typelist[this.curIndex].id
 			const {data: res} = await axios({
@@ -181,14 +185,11 @@ export default {
             //res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠。
             alert("支付成功");
           }
-          // that.closePage();
+          that.closePage();
         }
       );
     },
 		
-		changeChargeType(index) {
-			this.curIndex = index
-		},
 		async getProducts() {
 			const {data: res} = await axios({
 					url: baseurl + 'user/products',