From b15a997e95d715c41df3a76aecbf58ec1141ab53 Mon Sep 17 00:00:00 2001 From: qiyunfeng-create <1940665526@qq.com> Date: 星期四, 21 八月 2025 18:37:17 +0800 Subject: [PATCH] 个人中心-接口测试 --- src/App.vue | 108 +++--------------------------------------------------- 1 files changed, 6 insertions(+), 102 deletions(-) diff --git a/src/App.vue b/src/App.vue index 7917f9c..24f73b1 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,109 +1,13 @@ -<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 setup> +import { RouterView } from 'vue-router' </script> -<style lang="less"> -@import "~@/assets/css/base.css"; -@import "~@/assets/css/common.css"; +<template> + <RouterView /> +</template> -html, -body, +<style scoped> #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