bzkf3 2 年之前
父节点
当前提交
1e36da3c6d
共有 3 个文件被更改,包括 11 次插入9 次删除
  1. 2 0
      src/components.d.ts
  2. 3 1
      src/main.js
  3. 6 8
      src/pages/stxk/jz/kcxq.vue

+ 2 - 0
src/components.d.ts

@@ -13,6 +13,7 @@ declare module '@vue/runtime-core' {
     RouterView: typeof import('vue-router')['RouterView']
     VanButton: typeof import('vant/es')['Button']
     VanCard: typeof import('vant/es')['Card']
+    VanCascader: typeof import('vant/es')['Cascader']
     VanCellGroup: typeof import('vant/es')['CellGroup']
     VanCheckbox: typeof import('vant/es')['Checkbox']
     VanCheckboxGroup: typeof import('vant/es')['CheckboxGroup']
@@ -34,6 +35,7 @@ declare module '@vue/runtime-core' {
     VanLoading: typeof import('vant/es')['Loading']
     VanNavBar: typeof import('vant/es')['NavBar']
     VanOverlay: typeof import('vant/es')['Overlay']
+    VanPopup: typeof import('vant/es')['Popup']
     VanPullRefresh: typeof import('vant/es')['PullRefresh']
     VanRadio: typeof import('vant/es')['Radio']
     VanRadioGroup: typeof import('vant/es')['RadioGroup']

+ 3 - 1
src/main.js

@@ -2,7 +2,9 @@ import { createApp } from 'vue'
 import user from '~/store/user'
 import 'default-passive-events'
 import 'virtual:windi.css';
-import 'vconsole';
+import VConsole from 'vconsole';
+
+const vConsole = new VConsole();
 
 import App from './App.vue'
 import router from './router/index';

+ 6 - 8
src/pages/stxk/jz/kcxq.vue

@@ -104,10 +104,10 @@ function onBridgeReady(data) {
             showSuccessToast("支付成功");
             return resolve(true);
           case "get_brand_wcpay_request:cancel":
-            showFailToast("取消支付");
+            showFailToast("取消支付,请稍后再试");
             return resolve(false);
           case "get_brand_wcpay_request:fail":
-            showFailToast("支付失败");
+            showFailToast("支付失败,请稍后再试");
             return resolve(false);
           default:
             return resolve(false);
@@ -136,6 +136,7 @@ if (code) {
     .then((res) => {
       if (res.code === "1") {
         // orderStatus = false
+        orderStatus = 1;
         if (typeof WeixinJSBridge == "undefined") {
           console.log("WeixinJSBridge is not ready");
           document.addEventListener(
@@ -154,7 +155,6 @@ if (code) {
           location.search = "";
 
           /* todo: 支付成功 */
-          orderStatus = 1;
           // router.replace('/stsk/jz/wd')
           const t1 = Date.now()
 
@@ -178,9 +178,7 @@ if (code) {
                     orderStatus = 0;
                     resolve(0)
                   }
-                  else if (detailInfo.khfw_kcbmxx.kjf_zfzt === "1") {
-                    orderStatus = 1;
-                  } else if (_detailInfo.khfw_kcbmxx.kjf_zfzt === "2") {
+                  else if (_detailInfo.khfw_kcbmxx.kjf_zfzt === "2") {
                     orderStatus = 2;
                     resolve(2)
                   }
@@ -277,8 +275,8 @@ const orderStatusText = computed(() => {
             </div>
             <div>{{ item.intro }}</div>
             <!-- <ul class="list-disc list-inside">
-                                  <li>{{ detailInfo.kk_teacher.intro }}</li>
-                                </ul> -->
+                                    <li>{{ detailInfo.kk_teacher.intro }}</li>
+                                  </ul> -->
           </div>
         </div>
         <div v-else>暂无数据</div>