lrf402788946 4 anni fa
parent
commit
b9cc508c19
2 ha cambiato i file con 5 aggiunte e 5 eliminazioni
  1. 0 3
      package.json
  2. 5 2
      src/layout/common/share.vue

+ 0 - 3
package.json

@@ -13,17 +13,14 @@
     "core-js": "^3.6.4",
     "echarts": "^5.0.2",
     "element-ui": "^2.13.2",
-    "flv.js": "^1.5.0",
     "jsonwebtoken": "^8.5.1",
     "lodash": "^4.17.21",
     "moment": "^2.26.0",
     "naf-core": "^0.1.2",
-    "trtc-js-sdk": "^4.4.0",
     "vant": "^2.8.5",
     "vue": "^2.6.11",
     "vue-meta": "^2.3.4",
     "vue-router": "^3.3.2",
-    "vue-video-player": "^5.0.2",
     "vuex": "^3.1.3",
     "weixin-js-sdk": "^1.6.0"
   },

+ 5 - 2
src/layout/common/share.vue

@@ -23,7 +23,7 @@ export default {
   methods: {
     ...weixin(['jsAuth']),
     async init() {
-      console.log(this.$router);
+      // 处理参数
       const { path, query } = this.$route;
       const { openid, ...others } = query;
       let uri = `${path}`;
@@ -34,6 +34,8 @@ export default {
       }
       // const url = encodeURIComponent(`${this.host}${process.env.VUE_APP_ROUTER}${uri}`);
       const url = encodeURIComponent(location.href.split('#')[0]);
+      console.log(url);
+      console.log(encodeURIComponent(`${this.host}${process.env.VUE_APP_ROUTER}${uri}`));
       const res = await this.jsAuth({ url });
       if (this.$checkRes(res)) {
         const { data } = res;
@@ -58,11 +60,12 @@ export default {
       }
     },
     toShare() {
+      const url = encodeURIComponent(location.href.split('#')[0]);
       this.wx.updateAppMessageShareData({
         title: '测试分享',
         desc: '测试',
         // imgUrl:''
-        link: 'http://free.waityou24.cn/',
+        link: url,
         success: res => {
           console.log('in function:share success');
           console.log(res);