作者 sgj
1 个管道 的构建 通过 耗费 1 秒
@@ -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'];
此 diff 太大无法显示。
1 -{"expire_time":1554169110,"access_token":"20_Fv1cmUHz7yxF9qVVfLy8jDnmKGp0t3fDK7TPn9ALpQhwyH0vhjrgAwWSFzesnzZrgwX9gAL8n9zkIqRidrIi8_oqGBWcYGhRCwPhAsgLJN6p4ktq0_gdTcpFa18engJ_z5spZobGbGipEKIEUNObACACVW"}  
  1 +{"expire_time":1560574854,"access_token":"22_sRJ_WBjoNBnSRPhlL7Mi9Iyc430u6yTO6QNUOtXCzDvMNpO6lPXLg1W7RM4a0PbVKSQ-14Ho5ztPiiANxJWgv6hLHSBVuz1ZgHKng3rPqXOil1n6DE6Bzjd50ZxFToVv_TNiYxJrE3O3l7m1OBEeAEAZMP"}
1 -{"expire_time":1554169110,"jsapi_ticket":"HoagFKDcsGMVCIY2vOjf9pyFzo-WRmf981mGkqnXm7rAtLfX7VK5TnKnqCd9iD4g08BtdBsZbuzNLypPw7Wn2Q"}  
  1 +{"expire_time":1560574854,"jsapi_ticket":"HoagFKDcsGMVCIY2vOjf9pyFzo-WRmf981mGkqnXm7pbNNPi_-fei55KJn5hV-djv-WQg_ohiumwH-S7ipoP5w"}
@@ -27,7 +27,7 @@ try { @@ -27,7 +27,7 @@ try {
27 27
28 //测试专用 0.01 28 //测试专用 0.01
29 $fee = $deta['fe'] ? $deta['fe'] * 100 : 100; 29 $fee = $deta['fe'] ? $deta['fe'] * 100 : 100;
30 - $fee = 1; 30 + // $fee = 1;
31 $out_trade_no = $deta['ot'] ? $deta['ot'] : date('YmdHis') . uniqid(); 31 $out_trade_no = $deta['ot'] ? $deta['ot'] : date('YmdHis') . uniqid();
32 $body = $deta['sn'] ? $deta['sn'] : 'ceshi'; 32 $body = $deta['sn'] ? $deta['sn'] : 'ceshi';
33 $attach = $deta['at'] ? $deta['at'] : 'ceshi'; 33 $attach = $deta['at'] ? $deta['at'] : 'ceshi';
@@ -42,7 +42,7 @@ try { @@ -42,7 +42,7 @@ try {
42 $input->SetTime_start(date("YmdHis")); 42 $input->SetTime_start(date("YmdHis"));
43 $input->SetTime_expire(date("YmdHis", time() + 600)); 43 $input->SetTime_expire(date("YmdHis", time() + 600));
44 $input->SetGoods_tag("qnbug_tag"); 44 $input->SetGoods_tag("qnbug_tag");
45 -// $input->SetNotify_url("http://dm161xueche.qnbug.cn/paycenter/wechat/notify.php"); 45 + // $input->SetNotify_url("http://dm161xueche.qnbug.cn/paycenter/wechat/notify.php");
46 $input->SetNotify_url("http://wx.youlj.cn/paycenter/wechat/notify.php"); 46 $input->SetNotify_url("http://wx.youlj.cn/paycenter/wechat/notify.php");
47 $input->SetTrade_type("JSAPI"); 47 $input->SetTrade_type("JSAPI");
48 $input->SetOpenid($openId); 48 $input->SetOpenid($openId);
@@ -53,8 +53,7 @@ try { @@ -53,8 +53,7 @@ try {
53 Log::DEBUG(json_encode($deta, true)); 53 Log::DEBUG(json_encode($deta, true));
54 54
55 $jsApiParameters = $tools->GetJsApiParameters($order); 55 $jsApiParameters = $tools->GetJsApiParameters($order);
56 - dump($jsApiParameters);  
57 - exit; 56 +
58 //获取共享收货地址js函数参数 57 //获取共享收货地址js函数参数
59 $editAddress = $tools->GetEditAddressParameters(); 58 $editAddress = $tools->GetEditAddressParameters();
60 } catch (Exception $e) { 59 } catch (Exception $e) {
@@ -82,7 +81,7 @@ try { @@ -82,7 +81,7 @@ try {
82 <?php echo $jsApiParameters; ?>, 81 <?php echo $jsApiParameters; ?>,
83 function (res) { 82 function (res) {
84 WeixinJSBridge.log(res.err_msg); 83 WeixinJSBridge.log(res.err_msg);
85 - alert(res.err_code); 84 + // alert(res.err_code);
86 85
87 if (res.err_msg == 'get_brand_wcpay_request:ok') { 86 if (res.err_msg == 'get_brand_wcpay_request:ok') {
88 window.location.href = 'http://wx.youlj.cn/portal/index/pay_success.html'; 87 window.location.href = 'http://wx.youlj.cn/portal/index/pay_success.html';
@@ -118,7 +117,7 @@ try { @@ -118,7 +117,7 @@ try {
118 var value3 = res.addressCountiesThirdStageName; 117 var value3 = res.addressCountiesThirdStageName;
119 var value4 = res.addressDetailInfo; 118 var value4 = res.addressDetailInfo;
120 var tel = res.telNumber; 119 var tel = res.telNumber;
121 - alert(value1 + value2 + value3 + value4 + ":" + tel); 120 + /* alert(value1 + value2 + value3 + value4 + ":" + tel);*/
122 } 121 }
123 ); 122 );
124 } 123 }
@@ -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>