WIN-2308041133\Administrator 20 saat önce
ebeveyn
işleme
2ab84da7f1

+ 5 - 1
app/api/controller/User.php

@@ -1490,7 +1490,11 @@ class User extends BaseController
         $uid = UtilService::getMore([
             ['uid', 0],
         ], $request);
-        $uid = $uid['uid'];
+        if($uid==0){
+            $uid = $request->param('uid', 0);
+        }else{
+            $uid = $uid['uid'];
+        }
 //        $uid = $post['uid'];
         $time = time();
         $info = (new UserContractRecordModel)->where("id", $post["contract_id"])->find();

+ 2 - 4
app/system/controller/Product.php

@@ -52,19 +52,18 @@ class Product extends BaseController
             ['cate_name', '', 'empty', '请输入分类名称'],
             ['pid', 0],
             ['sort', 0],
-            ['status', 1],
         ], $request);
 
         $data = [
             'cate_name' => $post['cate_name'],
             'pid' => $post['pid'],
             'sort' => $post['sort'],
-            'status' => $post['status'] == 1 ? 1 : 0,
         ];
 
         if ($post['id'] > 0) {
             $result = Db::name('store_category')->where('id', $post['id'])->update($data);
         } else {
+            $data['add_time'] = time();
             $result = Db::name('store_category')->insertGetId($data);
         }
 
@@ -140,19 +139,18 @@ class Product extends BaseController
             ['brand_name', '', 'empty', '请输入品牌名称'],
             ['brand_logo', ''],
             ['sort', 0],
-            ['status', 1],
         ], $request);
 
         $data = [
             'brand_name' => $post['brand_name'],
             'brand_logo' => $post['brand_logo'],
             'sort' => $post['sort'],
-            'status' => $post['status'] == 1 ? 1 : 0,
         ];
 
         if ($post['id'] > 0) {
             $result = Db::name('store_brand')->where('id', $post['id'])->update($data);
         } else {
+            $data['add_time'] = time();
             $result = Db::name('store_brand')->insertGetId($data);
         }