From 1e0185a45152f5dba6ff8a9bf2e935d405f10aa1 Mon Sep 17 00:00:00 2001 From: lccsw <805383944@qq.com> Date: Sat, 8 Oct 2022 18:49:35 +0800 Subject: [PATCH] edit-market-sylive2 --- home/controllers/h5/market/sylive/Act.php | 9 +- home/views/h5/market/sylive/act/item.php | 104 ++++++++++++++++------ home/views/h5/market/sylive/login.php | 2 +- home/views/h5/market/sylive/stic/area.php | 38 ++++---- 4 files changed, 108 insertions(+), 45 deletions(-) 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 @@
已支付 - 立即支付 + 立即支付
- + +
+
+
+
+
+ +
+ +
+ +
+ +
+
+ + +
+
+
+ diff --git a/home/views/h5/market/sylive/stic/area.php b/home/views/h5/market/sylive/stic/area.php index cdddf524..e050433b 100644 --- a/home/views/h5/market/sylive/stic/area.php +++ b/home/views/h5/market/sylive/stic/area.php @@ -18,6 +18,17 @@
+ +
+
我的
+ +
+
-
@@ -90,6 +93,17 @@
直播结束后2小时同步数据
+ + +