diff --git a/home/controllers/h5/market/sylive/Act.php b/home/controllers/h5/market/sylive/Act.php index 60b583d9..f5a9e773 100644 --- a/home/controllers/h5/market/sylive/Act.php +++ b/home/controllers/h5/market/sylive/Act.php @@ -256,12 +256,17 @@ class Act extends Wx { //支付 public function post_pay(){ $skey = $this->input->post('skey'); + $name = $this->input->post('name'); + $mobile = $this->input->post('telPhone'); $param = $this->myencryption->base64url_decode($skey); $a_id = intval($param['a_id']);//活动id $row = $this->market_sylive_activity_model->get(['activityId'=>$a_id]); if(!$row){ $this->show_json('',400,'参数错误'); } + if(!mobile_valid($mobile)){ + $this->show_json('',400,'请输入正确手机号'); + } $jsondata = json_decode($row['jsondata'],true); $item = $jsondata['item'] ? $jsondata['item'] : []; //判断是否已支付 @@ -285,13 +290,15 @@ class Act extends Wx { 'expire_time' => time()+24*60*60,//订单过期时间 'createTime' => date('Y-m-d H:i:s') ]; + $name && $unpay['uname'] = $name; + $mobile && $unpay['mobile'] = $mobile; $oid = $this->market_sylive_order_model->add($unpay); if(!is_numeric($oid)){ $this->show_json('',400,'创建订单失败'); } } $user = $this->user_model->get(['userId'=>$this->uid]); - $notify_url = http_host_com('home').'//h5/market/sylive/notify'; + $notify_url = http_host_com('home').'/h5/market/sylive/notify'; $result = $this->pay($unpay['sid'],$unpay['total_price'],$user['openid'],$unpay['item_title'],$notify_url,$unpay['expire_time']); if(!$result['code']){ $this->show_json('',400,$result['msg']); diff --git a/home/views/h5/market/sylive/act/item.php b/home/views/h5/market/sylive/act/item.php index e69cee3f..86e39947 100644 --- a/home/views/h5/market/sylive/act/item.php +++ b/home/views/h5/market/sylive/act/item.php @@ -29,10 +29,32 @@
- + +