ソースを参照

add some debug message

张延森 3 年 前
コミット
278c3431a2
共有2 個のファイルを変更した8 個の追加3 個の削除を含む
  1. 7
    2
      src/utils/initial.js
  2. 1
    1
      vue.config.js

+ 7
- 2
src/utils/initial.js ファイルの表示

@@ -24,6 +24,8 @@ function initSDK (url) {
24 24
         signature: res.signature, // 必填,签名
25 25
         jsApiList // 必填,需要使用的JS接口列表
26 26
       })
27
+
28
+      window.wx.error(e => console.error(e))
27 29
     })
28 30
 }
29 31
 // Vue.use(Vuex)
@@ -38,7 +40,7 @@ export function share (opt = {}) {
38 40
   const url=origin+pathname
39 41
   const defaultImg = `${url}img/share.jpg`
40 42
 
41
-  const link = origin + pathname // window.location.href
43
+  const link = window.location.href.split('#')[0]
42 44
   const imgUrl = defaultImg
43 45
 
44 46
   initSDK(link)
@@ -51,7 +53,10 @@ export function share (opt = {}) {
51 53
           title:'为岸线圆梦,摩天轮圆满大作战!', // 分享标题
52 54
           link, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
53 55
           imgUrl, // 分享图标
54
-          desc: '快来助力华侨城欢乐滨江摩天轮挂轿厢'
56
+          desc: '快来助力华侨城欢乐滨江摩天轮挂轿厢',
57
+          success: () => {
58
+            console.log(apiName + ' 执行成功')
59
+          }
55 60
         })
56 61
       }
57 62
     })

+ 1
- 1
vue.config.js ファイルの表示

@@ -5,7 +5,7 @@ module.exports = defineConfig({
5 5
   devServer: {
6 6
     proxy: {
7 7
       '/api': {
8
-        target: "http://roundabout-service.honghe.njyunzhi.com/",
8
+        target: "http://192.168.89.147:9000/",
9 9
         // ws: true,
10 10
         changeOrigin: true,
11 11
         // pathRewrite: {