소스 검색

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)