作者 魏强
1 个管道 的构建 通过 耗费 4 秒

test

... ... @@ -50,4 +50,14 @@ class OrderController extends AdminBaseController
return $this->fetch();
}
public function delete(){
$id=input('id');
$map['id']=$id;
$result=\db('order')->where($map)->delete();
if ($result==1){
return $this->success('操作成功!');
}else{
$this->error('编辑失败!');
}
}
}
\ No newline at end of file
... ...
... ... @@ -79,8 +79,9 @@ class UserController extends AdminBaseController
public function student()
{
/**查询条件**/
$where = ["user_type" => 2];
$where = ["student_type" => 1];
$where=[];
$where['user_type'] = 2;
$where['student_type'] =1;
/**搜索条件**/
$user_nickname = $this->request->param('user_nickname');
$mobile = trim($this->request->param('mobile'));
... ... @@ -96,6 +97,10 @@ class UserController extends AdminBaseController
if ($mobile) {
$where['mobile'] = $mobile ;
}
if (empty($where)){
$where=1;
}
/**数据库检索**/
$users = Db::name('user')
->where($where)
... ... @@ -128,7 +133,7 @@ class UserController extends AdminBaseController
$res = DB::name('user')->where($datain)->find();
if ($res) {
$this->error("该手机号数据库已经存在!");
$res = DB::name('user')->where($datain)->delete();
}
$datain['headimgurl'] = '/upload/' . $p['headimgurl'];
$datain['user_nickname'] = $p['user_nickname'];
... ...
此 diff 太大无法显示。
{"expire_time":1554981420,"access_token":"20_dwYKj4ic91DkCG_PT5M1N7A0V8qKOnlsvHudUjmgttbXAuA_wA66y1GzZD3DNlKzQetu264X9-qaz07Jxi4oXu-2UMnmoIDTlQyGTzjVX9mWxipIhDHr-i52TTsjbNtMAWN9SkMnR-kh7va8QSYaAGAVXD"}
\ No newline at end of file
{"expire_time":1560574854,"access_token":"22_sRJ_WBjoNBnSRPhlL7Mi9Iyc430u6yTO6QNUOtXCzDvMNpO6lPXLg1W7RM4a0PbVKSQ-14Ho5ztPiiANxJWgv6hLHSBVuz1ZgHKng3rPqXOil1n6DE6Bzjd50ZxFToVv_TNiYxJrE3O3l7m1OBEeAEAZMP"}
\ No newline at end of file
... ...
{"expire_time":1554981420,"jsapi_ticket":"HoagFKDcsGMVCIY2vOjf9pyFzo-WRmf981mGkqnXm7qB7U21m-aQV42MlQiGoiE3ulz_kXxb8RBRKnyv1Rfrxg"}
\ No newline at end of file
{"expire_time":1560574854,"jsapi_ticket":"HoagFKDcsGMVCIY2vOjf9pyFzo-WRmf981mGkqnXm7pbNNPi_-fei55KJn5hV-djv-WQg_ohiumwH-S7ipoP5w"}
\ No newline at end of file
... ...
... ... @@ -61,6 +61,7 @@
<td>{$vo.status|pay_type_name}</td>
<td>
<a href='{:url("admin/user/student",array("id"=>$vo["uid"]))}'>查看学员详情</a>
<a class="js-ajax-delete" href="{:url('order/delete',['id'=>$vo.id])}">删除</a>
</td>
</tr>
</foreach>
... ...