刘洋 1 år sedan
förälder
incheckning
8a9e9ec8cd
3 ändrade filer med 53 tillägg och 6 borttagningar
  1. 16 2
      src/pages/login.vue
  2. 35 3
      src/pages/tab-pages/reservation.vue
  3. 2 1
      vite.config.js

+ 16 - 2
src/pages/login.vue

@@ -81,8 +81,22 @@ const onSubmit = () => {
   });
 };
 const exit = () => {
-  window.location.href = "about:blank";
-  window.close();
+  WeixinJSBridge.call("closeWindow");
+
+  // var userAgent = navigator.userAgent;
+  // if (userAgent.indexOf("Firefox") != -1 || userAgent.indexOf("Chrome") != -1) {
+  //   window.location.href = "about:blank";
+  // } else if (
+  //   userAgent.indexOf("Android") > -1 ||
+  //   userAgent.indexOf("Linux") > -1
+  // ) {
+  //   window.opener = null;
+  //   window.open("about:blank", "_self", "").close();
+  // } else {
+  //   window.pener = null;
+  //   window.open("about:blank", "_self");
+  //   window.close();
+  // }
 };
 </script>
 <style lang="less" scoped>

+ 35 - 3
src/pages/tab-pages/reservation.vue

@@ -51,7 +51,12 @@
         />
       </van-cell-group>
 
-      <van-popup v-model:show="cityStates.show" round position="bottom">
+      <van-popup
+        teleport="body"
+        v-model:show="cityStates.show"
+        round
+        position="bottom"
+      >
         <van-picker
           v-model="cityStates.value"
           :columns="cityStates.columns"
@@ -59,7 +64,12 @@
           @confirm="cityStates.onConfirm"
         />
       </van-popup>
-      <van-popup v-model:show="teachStates.show" round position="bottom">
+      <van-popup
+        teleport="body"
+        v-model:show="teachStates.show"
+        round
+        position="bottom"
+      >
         <van-picker
           v-model="teachStates.value"
           :columns="teachStates.columns"
@@ -67,7 +77,12 @@
           @confirm="teachStates.onConfirm"
         />
       </van-popup>
-      <van-popup v-model:show="dateStates.show" round position="bottom">
+      <van-popup
+        teleport="body"
+        v-model:show="dateStates.show"
+        round
+        position="bottom"
+      >
         <van-picker
           v-model="dateStates.value"
           :columns="dateStates.columns"
@@ -77,6 +92,7 @@
       </van-popup>
 
       <van-popup
+        teleport="body"
         v-model:show="showSites"
         round
         position="bottom"
@@ -230,6 +246,22 @@ function _getCategoryList() {
       text: item.name,
       value: item.id,
     }));
+    if (cityStates.columns?.length) {
+      params.aaa = {
+        text: cityStates.columns[0].text,
+        value: cityStates.columns[0].value,
+      };
+      teachStates.columns = treeData.value
+        .find((item) => item.id == params.aaa.value)
+        .subNodes.map((item) => ({ text: item.name, value: item.id }));
+      if (teachStates.columns?.length) {
+        params.bbb = {
+          text: teachStates.columns[0].text,
+          value: teachStates.columns[0].value,
+        };
+        _getSiteList();
+      }
+    }
   });
 }
 _getCategoryList();

+ 2 - 1
vite.config.js

@@ -26,7 +26,8 @@ export default defineConfig(({ mode }) => {
       cors: true,
       proxy: {
         "/api": {
-          target: "http://192.168.10.41:8080",
+          // target: "http://192.168.10.41:8080",
+          target: "http://apply.qmth.com.cn",
           changeOrigin: true,
           // rewrite: (path) => path.replace(new RegExp(`^${envConfig.proxy}`), ''),
         },