Procházet zdrojové kódy

获取地理位置调整

sangwenwei před 8 měsíci
rodič
revize
8f75ccdef3

+ 2 - 2
api/flowable/actCategoryService.js

@@ -3,11 +3,11 @@ import { FLOW_PATH as prefix } from "../AppPath";
 
 export default {
 
-	getSignature: function (extId) {
+	getSignature: function (urlData) {
 		return request({
 			url: prefix + "/app/getSignature",
 			method: "get",
-			params: {  },
+			params: {url:urlData  },
 		});
 	},
 

+ 4 - 2
pages/test/local/LocationDemo.vue

@@ -123,12 +123,14 @@
 			},
 			async initWeixin() {
 				try {
+					let urlData = window.location.href.split('#')[0]
+					console.log('123',urlData)
 					// 从后端获取签名参数
-					let res = await actCategoryService.getSignature();
+					let res = await actCategoryService.getSignature(urlData);
 					console.log('res', res);
 
 					// 初始化参数
-					const appId = 'wxa79f618dcaf992f7';
+					const appId = 'wx96885ba58675d910';
 					const timestamp = res.timestamp;
 					const nonceStr = res.nonceStr;
 					const signature = res.signature;