DESKTOP-SVI9JE1\muzen 1 ano atrás
pai
commit
15d1674a04
6 arquivos alterados com 56 adições e 15 exclusões
  1. 2 2
      common/config.js
  2. 12 10
      components/navbar/navbar.vue
  3. 11 2
      manifest.json
  4. 27 0
      package-lock.json
  5. 3 0
      package.json
  6. 1 1
      pages/main/index.vue

+ 2 - 2
common/config.js

@@ -1,8 +1,8 @@
 const env = process.env
 const dev = process.env.NODE_ENV === 'development'
 // 改成自己的IP  hhhhhh
-const baseUrl = dev ? 'https://chatapi.radio1964.com/api' : 'https://chatapi.radio1964.com/api'
-const wssUrl = dev ? 'ws://chatapi.radio1964.com/api' : 'wss://chatapi.radio1964.com/api'
+const baseUrl = dev ? 'http://chatapi.radio1964.com/api' : 'http://chatapi.radio1964.com/api'
+const wssUrl = dev ? 'ws://chatapi.radio1964.com/api' : 'ws://chatapi.radio1964.com/api'
 
 // console.log(`\n %c API URL %c ${baseUrl} \n\n`, 'color: #ffffff; background: #f37b1d; padding:5px 0;', 'color: #f37b1d;background: #ffffff; padding:5px 0;');
 

+ 12 - 10
components/navbar/navbar.vue

@@ -78,15 +78,17 @@
 				this.list = []
 				const dateArr = this.$squni.getStorageSync('chatHistory')
 				let arr = []
-				dateArr.forEach(i => {
-					arr[i.date.substr(0, 10)] = arr[i.date.substr(0, 10)] || []
-					arr[i.date.substr(0, 10)].push(i)
-				})
-				for (let key in arr) {
-					let obj = {}
-					obj.date = key
-					obj.children = arr[key]
-					this.list.unshift(obj)
+				if (dateArr.length > 0) {
+					dateArr.forEach(i => {
+						arr[i.date.substr(0, 10)] = arr[i.date.substr(0, 10)] || []
+						arr[i.date.substr(0, 10)].push(i)
+					})
+					for (let key in arr) {
+						let obj = {}
+						obj.date = key
+						obj.children = arr[key]
+						this.list.unshift(obj)
+					}
 				}
 			},
 
@@ -126,7 +128,7 @@
 		transition: width 0.2s;
 	}
 
-	.history-list{
+	.history-list {
 		height: calc(100% - 130px);
 		overflow-y: auto;
 	}

+ 11 - 2
manifest.json

@@ -24,7 +24,8 @@
         "nvueCompiler" : "uni-app",
         "compilerVersion" : 3,
         "modules" : {
-            "Webview-x5" : {}
+            "Webview-x5" : {},
+            "Geolocation" : {}
         },
         "distribute" : {
             "android" : {
@@ -58,7 +59,15 @@
                 "idfa" : false
             },
             "sdkConfigs" : {
-                "ad" : {}
+                "ad" : {},
+                "geolocation" : {
+                    "amap" : {
+                        "name" : "amapBQgwpRpe",
+                        "__platform__" : [ "ios", "android" ],
+                        "appkey_ios" : "",
+                        "appkey_android" : ""
+                    }
+                }
             },
             "icons" : {
                 "android" : {

+ 27 - 0
package-lock.json

@@ -4,6 +4,9 @@
 	"requires": true,
 	"packages": {
 		"": {
+			"dependencies": {
+				"caniuse-lite": "^1.0.30001641"
+			},
 			"devDependencies": {
 				"eslint": "^8.2.0",
 				"eslint-config-airbnb": "^19.0.0",
@@ -376,6 +379,25 @@
 				"node": ">=6"
 			}
 		},
+		"node_modules/caniuse-lite": {
+			"version": "1.0.30001641",
+			"resolved": "https://mirrors.cloud.tencent.com/npm/caniuse-lite/-/caniuse-lite-1.0.30001641.tgz",
+			"integrity": "sha512-Phv5thgl67bHYo1TtMY/MurjkHhV4EDaCosezRXgZ8jzA/Ub+wjxAvbGvjoFENStinwi5kCyOYV3mi5tOGykwA==",
+			"funding": [
+				{
+					"type": "opencollective",
+					"url": "https://opencollective.com/browserslist"
+				},
+				{
+					"type": "tidelift",
+					"url": "https://tidelift.com/funding/github/npm/caniuse-lite"
+				},
+				{
+					"type": "github",
+					"url": "https://github.com/sponsors/ai"
+				}
+			]
+		},
 		"node_modules/chalk": {
 			"version": "4.1.2",
 			"resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz",
@@ -2737,6 +2759,11 @@
 			"integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
 			"dev": true
 		},
+		"caniuse-lite": {
+			"version": "1.0.30001641",
+			"resolved": "https://mirrors.cloud.tencent.com/npm/caniuse-lite/-/caniuse-lite-1.0.30001641.tgz",
+			"integrity": "sha512-Phv5thgl67bHYo1TtMY/MurjkHhV4EDaCosezRXgZ8jzA/Ub+wjxAvbGvjoFENStinwi5kCyOYV3mi5tOGykwA=="
+		},
 		"chalk": {
 			"version": "4.1.2",
 			"resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz",

+ 3 - 0
package.json

@@ -7,5 +7,8 @@
 		"eslint": "^8.2.0",
 		"eslint-config-airbnb": "^19.0.0",
 		"eslint-plugin-vue": "^9.15.1"
+	},
+	"dependencies": {
+		"caniuse-lite": "^1.0.30001641"
 	}
 }

+ 1 - 1
pages/main/index.vue

@@ -42,7 +42,7 @@
 					<!-- 报错信息 -->
 					<view v-if="x.type === 'error'" class="chat-item">
 						<view class="chat-content flex gap item-center">
-							<text class="cuIcon-roundclosefill text-red"></text> {{ x.msg }}
+							<text class="cuIcon-roundclosefill text-red">{{ x.msg }}</text>
 						</view>
 					</view>
 				</block>