From 887ff236462f8db8b2d2ef31b5ca45808e87b92b Mon Sep 17 00:00:00 2001 From: 王晓刚 <wxg@bronet.cn> Date: Fri, 23 Aug 2019 19:01:41 +0800 Subject: [PATCH] bug --- app/portal/controller/TestController.php | 34 ++++++++++++++++++++++++++++++++++ public/themes/simpleboot3/public/assets/css/reset.css | 1 + simplewind/cmf/controller/WeChatBaseController.php | 2 +- 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 app/portal/controller/TestController.php diff --git a/app/portal/controller/TestController.php b/app/portal/controller/TestController.php new file mode 100644 index 0000000..2b6997b --- /dev/null +++ b/app/portal/controller/TestController.php @@ -0,0 +1,34 @@ +<?php +/** + * Created by PhpStorm. + * User: Administrator + * Date: 2019/8/21 + * Time: 19:08 + */ + +namespace app\portal\controller; + + +use cmf\controller\HomeBaseController; +use think\Db; + +class TestController extends HomeBaseController +{ + /** + * 恢复父级id + * @throws \think\Exception + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\ModelNotFoundException + * @throws \think\exception\DbException + * @throws \think\exception\PDOException + */ + public function test(){ + $data = Db::name('my_user')->where(['status'=>3,'inviter_phone'=>['neq','']])->select()->toArray(); + foreach($data as $key => $vo){ + $result = Db::name('my_user')->where(['phone'=>$vo['inviter_phone']])->value('id'); + if(!empty($result)){ + Db::name('my_user')->where(['id'=>$vo['id']])->update(['pid'=>$result]); + } + } + } +} \ No newline at end of file diff --git a/public/themes/simpleboot3/public/assets/css/reset.css b/public/themes/simpleboot3/public/assets/css/reset.css index 802a13a..6b2e388 100755 --- a/public/themes/simpleboot3/public/assets/css/reset.css +++ b/public/themes/simpleboot3/public/assets/css/reset.css @@ -185,6 +185,7 @@ a:hover { ul, ol { list-style: none; + margin-top: 50px; } h1, diff --git a/simplewind/cmf/controller/WeChatBaseController.php b/simplewind/cmf/controller/WeChatBaseController.php index f616757..b28f6f6 100644 --- a/simplewind/cmf/controller/WeChatBaseController.php +++ b/simplewind/cmf/controller/WeChatBaseController.php @@ -204,7 +204,7 @@ class WeChatBaseController extends BaseController */ public function checkWeChatUserLogin() { -// $user = Db::name('user')->where('id',436)->find(); +// $user = Db::name('user')->where('id',6)->find(); // cmf_update_current_user($user); // session('user',null); $userId = cmf_get_current_user_id(); -- libgit2 0.24.0