From 375513370cc01fcd976987d07797249600b0bb3e Mon Sep 17 00:00:00 2001
From: 杨磊 <505174330@qq.com>
Date: 星期四, 07 八月 2025 17:15:09 +0800
Subject: [PATCH] 'first'

---
 src/App.vue |  109 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 109 insertions(+), 0 deletions(-)

diff --git a/src/App.vue b/src/App.vue
new file mode 100644
index 0000000..e714576
--- /dev/null
+++ b/src/App.vue
@@ -0,0 +1,109 @@
+<template>
+  <div id="app">
+    <router-view />
+  </div>
+</template>
+
+<script>
+import { watch } from "vue";
+import { setSessionGuid, setNewView, storage } from "./assets/js/userAction";
+import tool from "./assets/js/toolClass";
+
+export default {
+  name: "App",
+  data() {
+    return {
+      imgsrc: require("@/assets/images/officialAccount.jpg"),
+    };
+  },
+  created() {
+    // 鍦ㄧЩ鍔ㄧ鎵撳紑Pc缃戠珯鏃剁殑鎻愮ず
+    if (
+      window.navigator.userAgent.match(
+        /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i
+      )
+    ) {
+      this.$alert(
+        "<p style='text-align:left;'>璇峰湪PC绔墦寮�姝ょ綉椤碉紝鎴栨壂鎻忎笅鏂逛簩缁寸爜鍏虫敞鎴戠ぞ鍏紬鍙凤紝鍗曞嚮鑿滃崟鏍忎腑鐨勨�滄暀瀛︽湇鍔♀�濇祻瑙堢浉鍏充俊鎭�佺敵璇锋牱涔︽垨涓嬭浇鏁欐潗閰嶅鐨勮祫婧愩��</p><img src='" +
+          this.imgsrc +
+          "'>",
+        "鎻愮ず",
+        {
+          dangerouslyUseHTMLString: true,
+          center: true,
+          customClass: "msgbox",
+        }
+      );
+    }
+
+    //鍦ㄩ〉闈㈠姞杞芥椂璇诲彇sessionStorage閲岀殑鐘舵�佷俊鎭�
+    if (sessionStorage.getItem("store")) {
+      this.$store.replaceState(
+        Object.assign(
+          {},
+          this.$store.state,
+          JSON.parse(sessionStorage.getItem("store"))
+        )
+      );
+      sessionStorage.removeItem("store");
+    }
+
+    //鍦ㄩ〉闈㈠埛鏂版椂灏唙uex閲岀殑淇℃伅淇濆瓨鍒皊essionStorage閲�
+    window.addEventListener("beforeunload", () => {
+      sessionStorage.setItem("store", JSON.stringify(this.$store.state));
+    });
+  },
+  watch: {
+    $route(to, from) {
+      // if (to.path.indexOf("AdminLogin") == -1 && from.path.indexOf("AdminLogin") == -1) {
+      //   const detailList = ["/bookStore/detail", "teachingServices/detail"];
+      //   if (detailList.includes(to.path)) {
+      //     if (to.path == "/bookStore/detail") {
+      //       setNewView("productId", to.query.id);
+      //     } else {
+      //       setNewView("cmsItemId", to.query.id);
+      //     }
+      //   }
+      //   let sessionGuid = storage.get("sessionGuid");
+      //   const token = tool.getCookie("websiteFrontToken");
+      //   if (!sessionGuid) {
+      //     setSessionGuid();
+      //   }
+      //   sessionStorage.setItem("fromPath", from.fullPath.substring(1));
+      //   sessionStorage.setItem("toPath", to.fullPath.substring(1));
+      // }
+    },
+  },
+};
+</script>
+
+<style lang="less">
+@import "~@/assets/css/base.css";
+@import "~@/assets/css/common.css";
+
+html,
+body,
+#app {
+  width: 100%;
+  height: 100%;
+  background-color: #f1f8f4;
+  .msgbox {
+    width: 380px !important;
+  }
+}
+</style>
+<style lang="less">
+// 瀵屾枃鏈鍣紝淇濈暀瀵屾枃鏈粯璁ゆ牱寮忥紝鎵�瑙佸嵆鎵�寰�
+.richTextBox {
+  line-height: 1.4;
+  font-size: 14px;
+  * {
+    margin: revert;
+    padding: revert;
+    border: revert;
+    font: revert;
+    vertical-align: revert;
+  }
+}
+</style>
+<style lang="less" scoped></style>

--
Gitblit v1.9.1