Browse Source

feat: 绑定上级

xiansin 2 years ago
parent
commit
64057e7f7d
1 changed files with 4 additions and 0 deletions
  1. 4 0
      mini/pages/index/index.vue

+ 4 - 0
mini/pages/index/index.vue

@@ -79,6 +79,10 @@ export default {
     })
     })
   },
   },
   onLoad(options) {
   onLoad(options) {
+    // 直接传递user_id
+    if (typeof options.user_id !== 'undefined' && options.user_id) {
+      Cache.set('parent_id', options.user_id)
+    }
     // 微信小程序 对应的二维码是 scene_code
     // 微信小程序 对应的二维码是 scene_code
     if (typeof options.scene !== 'undefined' && options.scene) {
     if (typeof options.scene !== 'undefined' && options.scene) {
       Cache.set('parent_id', options.scene)
       Cache.set('parent_id', options.scene)