正在显示
7 个修改的文件
包含
21 行增加
和
5 行删除
@@ -50,4 +50,14 @@ class OrderController extends AdminBaseController | @@ -50,4 +50,14 @@ class OrderController extends AdminBaseController | ||
50 | return $this->fetch(); | 50 | return $this->fetch(); |
51 | } | 51 | } |
52 | 52 | ||
53 | + public function delete(){ | ||
54 | + $id=input('id'); | ||
55 | + $map['id']=$id; | ||
56 | + $result=\db('order')->where($map)->delete(); | ||
57 | + if ($result==1){ | ||
58 | + return $this->success('操作成功!'); | ||
59 | + }else{ | ||
60 | + $this->error('编辑失败!'); | ||
61 | + } | ||
62 | + } | ||
53 | } | 63 | } |
@@ -79,8 +79,9 @@ class UserController extends AdminBaseController | @@ -79,8 +79,9 @@ class UserController extends AdminBaseController | ||
79 | public function student() | 79 | public function student() |
80 | { | 80 | { |
81 | /**查询条件**/ | 81 | /**查询条件**/ |
82 | - $where = ["user_type" => 2]; | ||
83 | - $where = ["student_type" => 1]; | 82 | + $where=[]; |
83 | + $where['user_type'] = 2; | ||
84 | + $where['student_type'] =1; | ||
84 | /**搜索条件**/ | 85 | /**搜索条件**/ |
85 | $user_nickname = $this->request->param('user_nickname'); | 86 | $user_nickname = $this->request->param('user_nickname'); |
86 | $mobile = trim($this->request->param('mobile')); | 87 | $mobile = trim($this->request->param('mobile')); |
@@ -96,6 +97,10 @@ class UserController extends AdminBaseController | @@ -96,6 +97,10 @@ class UserController extends AdminBaseController | ||
96 | if ($mobile) { | 97 | if ($mobile) { |
97 | $where['mobile'] = $mobile ; | 98 | $where['mobile'] = $mobile ; |
98 | } | 99 | } |
100 | + | ||
101 | + if (empty($where)){ | ||
102 | + $where=1; | ||
103 | + } | ||
99 | /**数据库检索**/ | 104 | /**数据库检索**/ |
100 | $users = Db::name('user') | 105 | $users = Db::name('user') |
101 | ->where($where) | 106 | ->where($where) |
@@ -128,7 +133,7 @@ class UserController extends AdminBaseController | @@ -128,7 +133,7 @@ class UserController extends AdminBaseController | ||
128 | 133 | ||
129 | $res = DB::name('user')->where($datain)->find(); | 134 | $res = DB::name('user')->where($datain)->find(); |
130 | if ($res) { | 135 | if ($res) { |
131 | - $this->error("该手机号数据库已经存在!"); | 136 | + $res = DB::name('user')->where($datain)->delete(); |
132 | } | 137 | } |
133 | $datain['headimgurl'] = '/upload/' . $p['headimgurl']; | 138 | $datain['headimgurl'] = '/upload/' . $p['headimgurl']; |
134 | $datain['user_nickname'] = $p['user_nickname']; | 139 | $datain['user_nickname'] = $p['user_nickname']; |
data/runtime/log/201808/24.log
已删除
100644 → 0
此 diff 太大无法显示。
1 | -{"expire_time":1554981420,"access_token":"20_dwYKj4ic91DkCG_PT5M1N7A0V8qKOnlsvHudUjmgttbXAuA_wA66y1GzZD3DNlKzQetu264X9-qaz07Jxi4oXu-2UMnmoIDTlQyGTzjVX9mWxipIhDHr-i52TTsjbNtMAWN9SkMnR-kh7va8QSYaAGAVXD"} | ||
1 | +{"expire_time":1560574854,"access_token":"22_sRJ_WBjoNBnSRPhlL7Mi9Iyc430u6yTO6QNUOtXCzDvMNpO6lPXLg1W7RM4a0PbVKSQ-14Ho5ztPiiANxJWgv6hLHSBVuz1ZgHKng3rPqXOil1n6DE6Bzjd50ZxFToVv_TNiYxJrE3O3l7m1OBEeAEAZMP"} |
此 diff 太大无法显示。
@@ -61,6 +61,7 @@ | @@ -61,6 +61,7 @@ | ||
61 | <td>{$vo.status|pay_type_name}</td> | 61 | <td>{$vo.status|pay_type_name}</td> |
62 | <td> | 62 | <td> |
63 | <a href='{:url("admin/user/student",array("id"=>$vo["uid"]))}'>查看学员详情</a> | 63 | <a href='{:url("admin/user/student",array("id"=>$vo["uid"]))}'>查看学员详情</a> |
64 | + <a class="js-ajax-delete" href="{:url('order/delete',['id'=>$vo.id])}">删除</a> | ||
64 | </td> | 65 | </td> |
65 | </tr> | 66 | </tr> |
66 | </foreach> | 67 | </foreach> |
-
请 注册 或 登录 后发表评论