作者 郭文星

'213'

@@ -23,8 +23,7 @@ class Client extends Api @@ -23,8 +23,7 @@ class Client extends Api
23 $this->postParam = $postParam; 23 $this->postParam = $postParam;
24 24
25 parent::_initialize(); 25 parent::_initialize();
26 - print_r($this->auth->id);return;  
27 - $this->auth->id = 1;//测试用 26 + $this->auth->id ;//测试用
28 $postParam = $this->request->param(); 27 $postParam = $this->request->param();
29 $this->postParam = $postParam; 28 $this->postParam = $postParam;
30 if (empty($postParam['code'])) { 29 if (empty($postParam['code'])) {
@@ -45,6 +44,8 @@ class Client extends Api @@ -45,6 +44,8 @@ class Client extends Api
45 * 1、获取活动 44 * 1、获取活动
46 */ 45 */
47 public function getactivity(){ 46 public function getactivity(){
  47 + print_r($this->auth->id);
  48 + return;
48 //根据门店查询活动 49 //根据门店查询活动
49 $time=time(); 50 $time=time();
50 $where["closetime"] = [">", $time]; 51 $where["closetime"] = [">", $time];
@@ -183,6 +183,9 @@ class Wechat extends Api @@ -183,6 +183,9 @@ class Wechat extends Api
183 $user = Db::name('user')->where($w)->find(); 183 $user = Db::name('user')->where($w)->find();
184 //登录成功 存储服务器本地 184 //登录成功 存储服务器本地
185 $res=$this->auth->direct($user['id']); 185 $res=$this->auth->direct($user['id']);
  186 + $res=new Client();
  187 + $row=$res->getactivity();
  188 + print_r($row);
186 $this->prepare_order(123); 189 $this->prepare_order(123);
187 //返回给前端 190 //返回给前端
188 $user_id = $user['id']; 191 $user_id = $user['id'];