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)