ソースを参照

fix:微信签到appid修改

liujiayin 3 年 前
コミット
29a8415c70
2 ファイル変更82 行追加82 行削除
  1. 37 37
      src/views/component/qrcodeed.vue
  2. 45 45
      src/views/component/qrcodeeds.vue

+ 37 - 37
src/views/component/qrcodeed.vue

@@ -1,53 +1,53 @@
 <template>
- <div id="qrcode" ref="qrcode"></div>
+  <div id="qrcode" ref="qrcode"></div>
 </template>
 
 <script>
-  import QRCode from 'qrcodejs2' // 引入qrcode
-  export default {
-    name: "qrcode",
-    props: {
-      field: Object,
-      formData: {
-        type: Object,
-        default () {
-          return {}
-        }
-      },
-      readonly: {
-        type: Boolean,
-        default: false,
+import QRCode from 'qrcodejs2' // 引入qrcode
+export default {
+  name: "qrcode",
+  props: {
+    field: Object,
+    formData: {
+      type: Object,
+      default() {
+        return {}
       }
     },
+    readonly: {
+      type: Boolean,
+      default: false,
+    }
+  },
 
-    methods: {
-      qrcode() {
-        let qrcode = new QRCode('qrcode', {
-          width: 132,
-          height: 132,
-         text:`https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxf0aecf99696061a3&redirect_uri=https%3A%2F%2Fwww.mingjianlims.com%2F%23%2Fziliao&response_type=code&scope=snsapi_base&state=${this.formData.id}#wechat_redirect`,
-          colorDark: "#000000", //前景色
-          colorLight: "#FFFFFF", //背景色
+  methods: {
+    qrcode() {
+      let qrcode = new QRCode('qrcode', {
+        width: 132,
+        height: 132,
+        text: `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxea2c214ca5d25739&redirect_uri=https%3A%2F%2Fwww.mingjianlims.com%2F%23%2Fziliao&response_type=code&scope=snsapi_base&state=${this.formData.id}#wechat_redirect`,
+        colorDark: "#000000", //前景色
+        colorLight: "#FFFFFF", //背景色
 
-          correctLevel:QRCode.CorrectLevel.L,
+        correctLevel: QRCode.CorrectLevel.L,
 
 
-        })
-      },
-    },
-    mounted() {
-      this.$nextTick(() => {
-        setTimeout(() => {
-          this.qrcode();
-        }, 0)
       })
     },
-  }
+  },
+  mounted() {
+    this.$nextTick(() => {
+      setTimeout(() => {
+        this.qrcode();
+      }, 0)
+    })
+  },
+}
 </script>
 
 <style scoped>
-  #qrcode {
-    width: 100px;
-    height: 100px;
-  }
+#qrcode {
+  width: 100px;
+  height: 100px;
+}
 </style>

+ 45 - 45
src/views/component/qrcodeeds.vue

@@ -3,62 +3,62 @@
 </template>
 
 <script>
-  import QRCode from 'qrcodejs2' // 引入qrcode
-  export default {
-    name: "qrcode",
-    props: {
-      field: Object,
-      formData: {
-        type: Object,
-        default () {
-          return {}
-        }
-
-      },
-      readonly: {
-        type: Boolean,
-        default: false,
-      }
-    },
-    data() {
-      return {
-        flag: false, //标记二维码是否已经生成
+import QRCode from 'qrcodejs2' // 引入qrcode
+export default {
+  name: "qrcode",
+  props: {
+    field: Object,
+    formData: {
+      type: Object,
+      default() {
+        return {}
       }
+
     },
-    watch: {
-      formData(val) {
-        if (val.zongWaiJian != '') {
-          if (!this.flag) {
-            this.qrcode(val.zongWaiJian)
-            this.flag = true;
-          }
+    readonly: {
+      type: Boolean,
+      default: false,
+    }
+  },
+  data() {
+    return {
+      flag: false, //标记二维码是否已经生成
+    }
+  },
+  watch: {
+    formData(val) {
+      if (val.zongWaiJian != '') {
+        if (!this.flag) {
+          this.qrcode(val.zongWaiJian)
+          this.flag = true;
         }
       }
-    },
+    }
+  },
 
-    methods: {
+  methods: {
 
-      qrcode(zongWaiJian) {
-        console.log('执行生成二维码');
-        let qrcode = new QRCode('qrcode', {
-          width: 132,
-          height: 132,
-          text:`https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxf0aecf99696061a3&redirect_uri=https%3A%2F%2Fwww.mingjianlims.com%2F%23%2Fziliao&response_type=code&scope=snsapi_base&state=${zongWaiJian}#wechat_redirect`,
-          colorDark: "#000000", //前景色
-          colorLight: "#FFFFFF", //背景色
-          correctLevel: QRCode.CorrectLevel.L,
+    qrcode(zongWaiJian) {
+      console.log('执行生成二维码');
+      let qrcode = new QRCode('qrcode', {
+        width: 132,
+        height: 132,
+        text: `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxea2c214ca5d25739&redirect_uri=https%3A%2F%2Fwww.mingjianlims.com%2F%23%2Fziliao&response_type=code&scope=snsapi_base&state=${zongWaiJian}#wechat_redirect`,
+        colorDark: "#000000", //前景色
+        colorLight: "#FFFFFF", //背景色
+        correctLevel: QRCode.CorrectLevel.L,
 
 
-        })
-      },
+      })
     },
+  },
 
-  }
+}
 </script>
 
 <style scoped>
-  #qrcode {
-    width: 100px;
-    height: 100px;
-  }
+#qrcode {
+  width: 100px;
+  height: 100px;
+}
 </style>