Parcourir la source

跳转小程序18

zhangyujun il y a 3 ans
Parent
commit
fbf6d669c5
1 fichiers modifiés avec 6 ajouts et 6 suppressions
  1. 6 6
      src/views/mini/index.vue

+ 6 - 6
src/views/mini/index.vue

@@ -18,8 +18,8 @@ export default defineComponent({
 	setup() {
 		openApi
 			.jspapi({
-				// url: encodeURIComponent(window.location.href.split('#')[0]+'/'),
-				url:'https://www.baidu.com/'
+				url: encodeURIComponent(window.location.href.split('#')[0]+'/'),
+		
 			})
 			.then((res) => {
 				let wxConfig = {
@@ -34,10 +34,10 @@ export default defineComponent({
 				console.log(wxConfig);
 				wx.config({
 					debug: true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印
-					appId: res.data.data.appId as string, // 必填,公众号的唯一标识
-					timestamp: res.data.data.timestamp as number, // 必填,生成签名的时间戳
-					nonceStr: res.data.data.nonceStr as string, // 必填,生成签名的随机串
-					signature: res.data.data.signature as string, // 必填,签名
+					appId: "wx67ca1b8c9816ef28", // 必填,公众号的唯一标识
+					timestamp: 1650272539, // 必填,生成签名的时间戳
+					nonceStr: "3umxscqz3mv", // 必填,生成签名的随机串
+					signature: "9900c1cef0dc805822a2aa5fc9f1b18c79c71a42", // 必填,签名
 					jsApiList: ["previewImage", "scanQRCode"], // 必填,需要使用的JS接口列表
 					openTagList: [], // 可选,需要使用的开放标签列表,例如['wx-open-launch-app']
 				});