作者 王晓刚
1 个管道 的构建 通过 耗费 1 秒

我的分享

@@ -36,6 +36,8 @@ class Server extends WechatBase @@ -36,6 +36,8 @@ class Server extends WechatBase
36 dump(cache('user_data')); 36 dump(cache('user_data'));
37 dump(cache('userId')); 37 dump(cache('userId'));
38 dump(cache('row')); 38 dump(cache('row'));
  39 + dump(cache('a'));
  40 + dump(cache('b'));
39 } 41 }
40 public function responseMsg() 42 public function responseMsg()
41 { 43 {
@@ -125,6 +127,7 @@ class Server extends WechatBase @@ -125,6 +127,7 @@ class Server extends WechatBase
125 public function new_user($wechat_user,$openid,$appId,$share_id) { 127 public function new_user($wechat_user,$openid,$appId,$share_id) {
126 $currentTime = time(); 128 $currentTime = time();
127 $ip = $this->request->ip(0, true); 129 $ip = $this->request->ip(0, true);
  130 + cache('a',"a");
128 $userId = Db::name("user")->insertGetId([ 131 $userId = Db::name("user")->insertGetId([
129 'status' => 'normal', 132 'status' => 'normal',
130 'gender' => $wechat_user['original']['sex'], 133 'gender' => $wechat_user['original']['sex'],
@@ -140,7 +143,7 @@ class Server extends WechatBase @@ -140,7 +143,7 @@ class Server extends WechatBase
140 'parent_id' => $share_id, 143 'parent_id' => $share_id,
141 ]); 144 ]);
142 cache('userId',$userId); 145 cache('userId',$userId);
143 - 146 + cache('b',"b");
144 $row=Db::name("third")->insert([ 147 $row=Db::name("third")->insert([
145 'openid' => $openid, 148 'openid' => $openid,
146 'user_id' => $userId, 149 'user_id' => $userId,