3 Commits 1f61bf6fc9 ... df51fae69a

Author SHA1 Message Date
  ming df51fae69a 测试域名更改+微信端h5去除双标题 5 months ago
  gez 33e29979fe Merge branch 'ming' of uskycloud/usky-web-mobile into master 5 months ago
  gez c4c6bb5ab8 Merge branch 'ming' of uskycloud/usky-web-mobile into master 5 months ago
4 changed files with 36 additions and 2 deletions
  1. 1 1
      src/config.js
  2. 5 0
      src/main.js
  3. 1 1
      src/pages/login.vue
  4. 29 0
      src/utils/hideHead.js

+ 1 - 1
src/config.js

@@ -9,7 +9,7 @@ export default {
   //#endif
 
   //#ifdef H5
-  baseUrl: import.meta.env.MODE === "production" ? `https://${window.location.host}/prod-api` : `http://192.168.123.165:801/dev-api`,
+  baseUrl: import.meta.env.MODE === "production" ? `https://${window.location.host}/prod-api` : `http://192.168.10.165:801/dev-api`,
   //#endif
 
   websiteUrl: "https://qhome.usky.cn",

+ 5 - 0
src/main.js

@@ -22,8 +22,13 @@ import oaTransForm from "@/components/oa-transForm/index"
 import oaTtsAudio from "@/components/oa-ttsAudio/index"
 import oaWeather from "@/components/oa-weather/index"
 
+
+import hideHead from "./utils/hideHead.js";
+
 export function createApp() {
   const app = createSSRApp(App);
+  app.mixin(hideHead);// 隐藏头部双重标题
+
 
   //挂载全局组件
   app.component('oa-calendar', oaCalendar)

+ 1 - 1
src/pages/login.vue

@@ -183,7 +183,7 @@ function init() {
 
   if (window.location.host) {
     linkUrl.value = window.location.host;
-    // linkUrl.value = "192.168.123.165:13200";
+    // linkUrl.value = "192.168.10.165:13200";
     // linkUrl.value = "localhost:81";
     useStore.GetMobileTenantConfig({ url: linkUrl.value });
   }

+ 29 - 0
src/utils/hideHead.js

@@ -0,0 +1,29 @@
+export default {
+	mounted() {
+		if (this.isWeiXinBrowser() || this.isQQBrowser()) {
+			this.navTitle()
+		}
+	},
+	methods: {
+		isWeiXinBrowser() { //判断是否为微信
+			let ua = navigator.userAgent.toLowerCase()
+			return ua.indexOf('micromessenger') != -1
+		},
+		isQQBrowser() { //判断是否为qq
+			var ua = navigator.userAgent.toLowerCase()
+			if (ua.match(/QQ/i) == "qq") {
+				return true
+			} else {
+				return false
+			}
+		},
+		navTitle() {
+			this.$nextTick(() => {
+				let navTitleDom = document.getElementsByTagName('uni-page-head')
+				if (navTitleDom.length) {
+					navTitleDom[0].style.display = 'none'
+				}
+			})
+		},
+	}
+}