Эх сурвалжийг харах

feat:调整32寸大屏产生两个页面的问题

xianna.liang 8 сар өмнө
parent
commit
410c04ea3c
5 өөрчлөгдсөн 74 нэмэгдсэн , 18 устгасан
  1. 2 2
      App.vue
  2. 45 13
      manifest.json
  3. 21 1
      package-lock.json
  4. 2 1
      package.json
  5. 4 1
      until/request.js

+ 2 - 2
App.vue

@@ -15,12 +15,12 @@
 				}
 			})
 			if (screenHeight == 720 && screenWidth == 1280) {
-				uni.navigateTo({
+				uni.redirectTo({
 					url: '/pages/index15/index15'
 				})
 			}
 			if (screenHeight == 1920 && screenWidth == 1080) {
-				uni.navigateTo({
+				uni.redirectTo({
 					url: '/pages/index32/index32'
 				})
 			}

+ 45 - 13
manifest.json

@@ -1,5 +1,5 @@
 {
-    "name" : "Chat",
+    "name" : "睿宝AI",
     "appid" : "__UNI__E15E1AD",
     "description" : "",
     "versionName" : "1.0.0",
@@ -7,18 +7,18 @@
     "transformPx" : false,
     /* 5+App特有相关 */
     "app-plus" : {
-		"orientation": [
-					//竖屏正方向
-					"portrait-primary",
-					//竖屏反方向
-					"portrait-secondary",
-					//横屏正方向
-					"landscape-primary",
-					//横屏反方向
-					"landscape-secondary",
-					//自然方向
-					"default"
-				],
+        "orientation" : [
+            //竖屏正方向
+            "portrait-primary",
+            //竖屏反方向
+            "portrait-secondary",
+            //横屏正方向
+            "landscape-primary",
+            //横屏反方向
+            "landscape-secondary",
+            //自然方向
+            "default"
+        ],
         "usingComponents" : true,
         "nvueStyleCompiler" : "uni-app",
         "compilerVersion" : 3,
@@ -60,6 +60,38 @@
             /* SDK配置 */
             "sdkConfigs" : {
                 "ad" : {}
+            },
+            "icons" : {
+                "android" : {
+                    "hdpi" : "unpackage/res/icons/72x72.png",
+                    "xhdpi" : "unpackage/res/icons/96x96.png",
+                    "xxhdpi" : "unpackage/res/icons/144x144.png",
+                    "xxxhdpi" : "unpackage/res/icons/192x192.png"
+                },
+                "ios" : {
+                    "appstore" : "unpackage/res/icons/1024x1024.png",
+                    "ipad" : {
+                        "app" : "unpackage/res/icons/76x76.png",
+                        "app@2x" : "unpackage/res/icons/152x152.png",
+                        "notification" : "unpackage/res/icons/20x20.png",
+                        "notification@2x" : "unpackage/res/icons/40x40.png",
+                        "proapp@2x" : "unpackage/res/icons/167x167.png",
+                        "settings" : "unpackage/res/icons/29x29.png",
+                        "settings@2x" : "unpackage/res/icons/58x58.png",
+                        "spotlight" : "unpackage/res/icons/40x40.png",
+                        "spotlight@2x" : "unpackage/res/icons/80x80.png"
+                    },
+                    "iphone" : {
+                        "app@2x" : "unpackage/res/icons/120x120.png",
+                        "app@3x" : "unpackage/res/icons/180x180.png",
+                        "notification@2x" : "unpackage/res/icons/40x40.png",
+                        "notification@3x" : "unpackage/res/icons/60x60.png",
+                        "settings@2x" : "unpackage/res/icons/58x58.png",
+                        "settings@3x" : "unpackage/res/icons/87x87.png",
+                        "spotlight@2x" : "unpackage/res/icons/80x80.png",
+                        "spotlight@3x" : "unpackage/res/icons/120x120.png"
+                    }
+                }
             }
         }
     },

+ 21 - 1
package-lock.json

@@ -9,7 +9,8 @@
       "version": "1.0.0",
       "license": "ISC",
       "dependencies": {
-        "axios": "^1.7.7"
+        "axios": "^1.7.7",
+        "axios-adapter-uniapp": "^0.1.4"
       }
     },
     "node_modules/asynckit": {
@@ -29,6 +30,25 @@
         "proxy-from-env": "^1.1.0"
       }
     },
+    "node_modules/axios-adapter-uniapp": {
+      "version": "0.1.4",
+      "resolved": "https://registry.npmmirror.com/axios-adapter-uniapp/-/axios-adapter-uniapp-0.1.4.tgz",
+      "integrity": "sha512-4je5JcWGrrTjPEJXVXJZnOkv+BsnYn/fKbQmjxzdCGFyoQw1gq3tfQ4/WhLzy+Gi9cQJl3K8EH26G7U0BK3wcw==",
+      "license": "ISC",
+      "dependencies": {
+        "axios": "^0.27.2"
+      }
+    },
+    "node_modules/axios-adapter-uniapp/node_modules/axios": {
+      "version": "0.27.2",
+      "resolved": "https://registry.npmmirror.com/axios/-/axios-0.27.2.tgz",
+      "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==",
+      "license": "MIT",
+      "dependencies": {
+        "follow-redirects": "^1.14.9",
+        "form-data": "^4.0.0"
+      }
+    },
     "node_modules/combined-stream": {
       "version": "1.0.8",
       "resolved": "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz",

+ 2 - 1
package.json

@@ -10,6 +10,7 @@
   "license": "ISC",
   "description": "",
   "dependencies": {
-    "axios": "^1.7.7"
+    "axios": "^1.7.7",
+    "axios-adapter-uniapp": "^0.1.4"
   }
 }

+ 4 - 1
until/request.js

@@ -1,11 +1,14 @@
 import Axios from 'axios'
+import axiosAdapterUniapp from 'axios-adapter-uniapp'
+
 // 创建axios
 const axios = Axios.create({
 	headers: {
 		'Content-Type': 'application/json'
 	},
 	timeout: 600000, // 超时
-	baseURL: 'http://192.168.0.166:5000' // 请求接口地址,这里使用本项目地址,因为我们是前后端分离,后面需要在vue.config.js里面配置代理,实际请求得地址不是这个。
+	baseURL: 'http://192.168.0.166:5000' ,
+	adapter: axiosAdapterUniapp
 })
 
 // 请求拦截