瀏覽代碼

feat: 绑定上级

xiansin 2 年之前
父節點
當前提交
64057e7f7d
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      mini/pages/index/index.vue

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

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