lrf402788946 преди 4 години
родител
ревизия
d64214ea21
променени са 1 файла, в които са добавени 3 реда и са изтрити 1 реда
  1. 3 1
      src/layout/common/share.vue

+ 3 - 1
src/layout/common/share.vue

@@ -38,7 +38,9 @@ export default {
       const res = await this.jsAuth({ url });
       if (this.$checkRes(res)) {
         const { data } = res;
-        const shareUrl = 'http://broadcast.waityou24.cn/api/article/auth?redirect_uri=http://broadcast.waityou24.cn/articlemobile' + this.route;
+        const shareUrl = encodeURIComponent(
+          'http://broadcast.waityou24.cn/api/article/auth?redirect_uri=http://broadcast.waityou24.cn/articlemobile' + this.route
+        );
         wx.config({
           debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
           appId: data.appid, // 必填,公众号的唯一标识