From 318ac74f72c808e37cc149b0bcac775128ba3806 Mon Sep 17 00:00:00 2001 From: lccsw <805383944@qq.com> Date: Tue, 13 Dec 2022 14:38:47 +0800 Subject: [PATCH] edit-sylive-item_limit --- api/controllers/plan/Temp.php | 7 ++++++- home/controllers/h5/market/sylive2/Item.php | 7 +++++++ home/views/h5/market/sylive2/item/detail.php | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/api/controllers/plan/Temp.php b/api/controllers/plan/Temp.php index 15683906..94af161f 100644 --- a/api/controllers/plan/Temp.php +++ b/api/controllers/plan/Temp.php @@ -1423,12 +1423,17 @@ class Temp extends HD_Controller $this->load->library('market/sylive2_entity'); $page = $this->input->get('page'); $size = $this->input->get('size'); + $o_id = $this->input->get('o_id'); !$page && $page = 1; !$size && $size = 20; $where = [ 'activityId' => 6, - 'id<=' => 7750 ]; + if($o_id){ + $where['id'] = $o_id; + }else{ + $where['id<='] = 7750; + } $rows = $this->market_sylive_order_model->select($where,'id desc',$page,$size); if($rows){ foreach ($rows as $key => $val) { diff --git a/home/controllers/h5/market/sylive2/Item.php b/home/controllers/h5/market/sylive2/Item.php index fa623a8b..5f6cfdcd 100644 --- a/home/controllers/h5/market/sylive2/Item.php +++ b/home/controllers/h5/market/sylive2/Item.php @@ -233,9 +233,16 @@ class Item extends Wx{ public function get_code(){ $mobile = $this->input->post('mobile'); $a_id = $this->input->post('a_id'); + $item_id = $this->input->post('item_id'); if(!mobile_valid($mobile)){ $this->show_json('',400,'请输入正确的手机号码'); } + if($item_id==8){ //特殊处理需要先购买权益商品 + $where = ['itemId'=>10,'userId'=>$this->uid]; + if(!$this->market_sylive_order_model->count($where)){ + $this->show_json('',400,'请先购买权益'); + } + } $act = $this->market_sylive_activity_model->get(['activityId'=>$a_id]); $jsondata = json_decode($act['jsondata'],true); if($jsondata['blacklist']){ diff --git a/home/views/h5/market/sylive2/item/detail.php b/home/views/h5/market/sylive2/item/detail.php index 4a3e3563..d0416935 100644 --- a/home/views/h5/market/sylive2/item/detail.php +++ b/home/views/h5/market/sylive2/item/detail.php @@ -273,7 +273,7 @@ } else { //按钮倒计时 var that = this - $.post('/h5/market/sylive2/item/get_code',{'mobile':that.telPhone,'a_id':that.info.a_id},function (response){ + $.post('/h5/market/sylive2/item/get_code',{'mobile':that.telPhone,'a_id':that.info.a_id,'item_id':that.info.itemId},function (response){ mDialog.msg({ duration: 250, pause: 2000,