作者 sgj
1 个管道 的构建 通过 耗费 1 秒
... ... @@ -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":1554169110,"access_token":"20_Fv1cmUHz7yxF9qVVfLy8jDnmKGp0t3fDK7TPn9ALpQhwyH0vhjrgAwWSFzesnzZrgwX9gAL8n9zkIqRidrIi8_oqGBWcYGhRCwPhAsgLJN6p4ktq0_gdTcpFa18engJ_z5spZobGbGipEKIEUNObACACVW"}
\ No newline at end of file
{"expire_time":1560574854,"access_token":"22_sRJ_WBjoNBnSRPhlL7Mi9Iyc430u6yTO6QNUOtXCzDvMNpO6lPXLg1W7RM4a0PbVKSQ-14Ho5ztPiiANxJWgv6hLHSBVuz1ZgHKng3rPqXOil1n6DE6Bzjd50ZxFToVv_TNiYxJrE3O3l7m1OBEeAEAZMP"}
\ No newline at end of file
... ...
{"expire_time":1554169110,"jsapi_ticket":"HoagFKDcsGMVCIY2vOjf9pyFzo-WRmf981mGkqnXm7rAtLfX7VK5TnKnqCd9iD4g08BtdBsZbuzNLypPw7Wn2Q"}
\ No newline at end of file
{"expire_time":1560574854,"jsapi_ticket":"HoagFKDcsGMVCIY2vOjf9pyFzo-WRmf981mGkqnXm7pbNNPi_-fei55KJn5hV-djv-WQg_ohiumwH-S7ipoP5w"}
\ No newline at end of file
... ...
... ... @@ -27,7 +27,7 @@ try {
//测试专用 0.01
$fee = $deta['fe'] ? $deta['fe'] * 100 : 100;
$fee = 1;
// $fee = 1;
$out_trade_no = $deta['ot'] ? $deta['ot'] : date('YmdHis') . uniqid();
$body = $deta['sn'] ? $deta['sn'] : 'ceshi';
$attach = $deta['at'] ? $deta['at'] : 'ceshi';
... ... @@ -42,7 +42,7 @@ try {
$input->SetTime_start(date("YmdHis"));
$input->SetTime_expire(date("YmdHis", time() + 600));
$input->SetGoods_tag("qnbug_tag");
// $input->SetNotify_url("http://dm161xueche.qnbug.cn/paycenter/wechat/notify.php");
// $input->SetNotify_url("http://dm161xueche.qnbug.cn/paycenter/wechat/notify.php");
$input->SetNotify_url("http://wx.youlj.cn/paycenter/wechat/notify.php");
$input->SetTrade_type("JSAPI");
$input->SetOpenid($openId);
... ... @@ -53,8 +53,7 @@ try {
Log::DEBUG(json_encode($deta, true));
$jsApiParameters = $tools->GetJsApiParameters($order);
dump($jsApiParameters);
exit;
//获取共享收货地址js函数参数
$editAddress = $tools->GetEditAddressParameters();
} catch (Exception $e) {
... ... @@ -82,7 +81,7 @@ try {
<?php echo $jsApiParameters; ?>,
function (res) {
WeixinJSBridge.log(res.err_msg);
alert(res.err_code);
// alert(res.err_code);
if (res.err_msg == 'get_brand_wcpay_request:ok') {
window.location.href = 'http://wx.youlj.cn/portal/index/pay_success.html';
... ... @@ -118,7 +117,7 @@ try {
var value3 = res.addressCountiesThirdStageName;
var value4 = res.addressDetailInfo;
var tel = res.telNumber;
alert(value1 + value2 + value3 + value4 + ":" + tel);
/* alert(value1 + value2 + value3 + value4 + ":" + tel);*/
}
);
}
... ...
... ... @@ -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>
... ...