Pārlūkot izejas kodu

feat: 优化抖音二位码生成问题

xiansin 2 gadi atpakaļ
vecāks
revīzija
70fe2f7a36
2 mainītis faili ar 2 papildinājumiem un 4 dzēšanām
  1. 1 3
      mini/pages/index/index.vue
  2. 1 1
      server/app/Helper/ByteDance.php

+ 1 - 3
mini/pages/index/index.vue

xqd
@@ -79,15 +79,13 @@ export default {
   },
   onLoad(options) {
     console.log('-->index data', options)
+    this.isLogin && this.getHomeColumn()
     this.scene_code = typeof options.user_id !== 'undefined' ? options.scene : ''
     this.parent_id = typeof options.user_id !== 'undefined' ? options.user_id : 0
     if ((this.parent_id || this.scene_code) && !this.userInfo.parent_id) {
       this.isLogin && this.bindParent()
     }
   },
-  onShow() {
-    this.isLogin && this.getHomeColumn()
-  },
   methods: {
     handleSearch() {
       if (!this.keywords) {

+ 1 - 1
server/app/Helper/ByteDance.php

xqd
@@ -183,7 +183,7 @@ class ByteDance extends BaseUniPlatform
         return $this->post($this->API::CREATE_QRCODE, [
             'appname'      => 'douyin',
             'access_token' => $this->accessToken,
-            'path'         =>urlencode('/pages/index/index?'."{user_id:{$userId}}"),
+            'path'         =>urlencode('/pages/index/index?'."user_id=$userId"),
             'width'        => 600,
         ]);
     }