From 18bc56d4176b90ab5a1afceddcfa3ce55da5e070 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Fri, 13 Aug 2021 12:34:28 +0800
Subject: [PATCH] 配置文件更改

---
 manifest.json    |   20 ++++++++++++++++++--
 template.h5.html |    9 ++++++++-
 store/actions.js |   14 ++++++++------
 3 files changed, 34 insertions(+), 9 deletions(-)

diff --git a/manifest.json b/manifest.json
index 24d9a51..ade1423 100644
--- a/manifest.json
+++ b/manifest.json
@@ -22,7 +22,10 @@
             "delay" : 0
         },
         /* 模块配置 */
-        "modules" : {},
+        "modules" : {
+            "Geolocation" : {},
+            "Maps" : {}
+        },
         /* 应用发布信息 */
         "distribute" : {
             /* android打包配置 */
@@ -56,7 +59,20 @@
             "ios" : {},
             /* SDK配置 */
             "sdkConfigs" : {
-                "ad" : {}
+                "ad" : {},
+                "geolocation" : {
+                    "baidu" : {
+                        "__platform__" : [ "ios", "android" ],
+                        "appkey_ios" : "T7RBZ-62U3X-RSQ4P-ZZVCB-WE7JT-HRBOG",
+                        "appkey_android" : "T7RBZ-62U3X-RSQ4P-ZZVCB-WE7JT-HRBOG"
+                    }
+                },
+                "maps" : {
+                    "baidu" : {
+                        "appkey_ios" : "T7RBZ-62U3X-RSQ4P-ZZVCB-WE7JT-HRBOG",
+                        "appkey_android" : "T7RBZ-62U3X-RSQ4P-ZZVCB-WE7JT-HRBOG"
+                    }
+                }
             },
             "icons" : {
                 "android" : {
diff --git a/store/actions.js b/store/actions.js
index a98501b..ee020c1 100644
--- a/store/actions.js
+++ b/store/actions.js
@@ -4,8 +4,7 @@
 
 const getLocationData = (userId) => {
 
-	var geolocation = new qq.maps.Geolocation("T7RBZ-62U3X-RSQ4P-ZZVCB-WE7JT-HRBOG", "mapqq");
-
+	var geolocation = new qq.maps.Geolocation("T7RBZ-62U3X-RSQ4P-ZZVCB-WE7JT-HRBOG", "myapp");
 	var positionNum = 0;
 	var options = {
 		timeout: 8000
@@ -88,7 +87,6 @@
 			// 	// dataType: 'JSON',
 			success: (res) => {
 				if (res.statusCode == 200) {
-					console.log(res)
 					if (res.data.error_code == "400") {
 						uni.showToast({
 							title: '密码错误,请重试',
@@ -98,7 +96,6 @@
 						return;
 					}
 					store.commit('getUserData', res.data)
-					// console.log(res.data,123542);
 					data.isit = true;
 					data.userName = res.data.nick_name; //警袁姓名
 					data.userID = res.data.user_id; //警袁id
@@ -106,8 +103,13 @@
 					data.accounts = data.name;
 					data.pass = data.pass;
 					// data.userPhon = res.user_id;
-
-
+					uni.getLocation({
+						type: 'wgs84',
+						geocode: true,
+						success: (res) => {
+						}
+					})
+					getLocationData(res.data.user_id)
 					setInterval(function() {
 							getLocationData(res.data.user_id);
 						},
diff --git a/template.h5.html b/template.h5.html
index a2ba1f1..cd00d1d 100644
--- a/template.h5.html
+++ b/template.h5.html
@@ -9,6 +9,7 @@
 		<title>
 			<%= htmlWebpackPlugin.options.title %>
 		</title>
+		<link rel="stylesheet" href="<%= BASE_URL %>static/index.css" />
 		<script>
 			document.addEventListener('DOMContentLoaded', function() {
 				document.documentElement.style.fontSize = document.documentElement.clientWidth / 20 + 'px'
@@ -17,7 +18,13 @@
 		<!-- 百度地图api -->
 		<script type="text/javascript" src="https://mapapi.qq.com/web/mapComponents/geoLocation/v/geolocation.min.js">
 		</script>
-		<link rel="stylesheet" href="<%= BASE_URL %>static/index.css" />
+		<!-- 微信支持 -->
+		<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
+		<!-- <script src="./js/wx.js"></script> -->
+
+		<!-- uni 的 SDK -->
+		<script type="text/javascript" src="https://js.cdn.aliyun.dcloud.net.cn/dev/uni-app/uni.webview.1.5.2.js">
+		</script>
 	</head>
 	<body>
 		<noscript>

--
Gitblit v1.9.3