wupengfei 2 年之前
父節點
當前提交
fb321f58b5
共有 1 個文件被更改,包括 3 次插入22 次删除
  1. 3 22
      application/mall/controller/CouponConfig.php

+ 3 - 22
application/mall/controller/CouponConfig.php

@@ -113,31 +113,12 @@ class  CouponConfig extends Controller
     protected function _form_filter(&$data)
     {
         if($this->request->isPost()){
-            if($data['time_type']==1){
-                if(empty($data['time'])){
-                    $this->error('请选择优惠券限定日期');
-                }
-                $time=explode('~',$data['time']);
-                $data['start_tm']=$time[0];
-                $data['end_tm']=$time[1];
-            }
-
-            if($data['coupon_type']==1){
-                if(empty($data['goods_id'])){
-                    $this->error('请选择优惠券商品');
-                }
+            if( $data['low_amount']<=0){
+                $data['low_amount']= $data['amount']+0.01;
             }
-
-            if($data['low_amount']<=0){
-                $data['low_amount']=$data['amount']+0.01;
-            }
-
             if($data['amount']>$data['low_amount']){
                 $this->error('对不起,优惠金额不能大于限制金额');
             }
-
-        }else{
-            $this->goods=Db::name('store_goods')->where('is_deleted',0)->where('status',1)->field('id,name')->select();
         }
     }
 
@@ -174,7 +155,7 @@ class  CouponConfig extends Controller
      */
     public function remove()
     {
-        $this->_delete($this->table);
+        $this->_save($this->table, ['is_deleted' => '1']);
     }