作者 xwp
1 个管道 的构建 通过 耗费 1 秒

后台修改

@@ -42,6 +42,12 @@ class User extends Backend @@ -42,6 +42,12 @@ class User extends Backend
42 { 42 {
43 if ($this->request->isPost()) { 43 if ($this->request->isPost()) {
44 $params = $this->request->post("row/a"); 44 $params = $this->request->post("row/a");
  45 + $product_id = null;
  46 + if(isset($params['product_id']) && !empty($params['product_id'])){
  47 + $product_id = $params['product_id'];
  48 + unset($params['product_id']);
  49 + }
  50 +
45 if ($params) { 51 if ($params) {
46 if ($this->dataLimit && $this->dataLimitFieldAutoFill) { 52 if ($this->dataLimit && $this->dataLimitFieldAutoFill) {
47 $params[$this->dataLimitField] = $this->auth->id; 53 $params[$this->dataLimitField] = $this->auth->id;
@@ -66,8 +72,7 @@ class User extends Backend @@ -66,8 +72,7 @@ class User extends Backend
66 72
67 $result = $this->model->allowField(true)->insert($params,false,true); 73 $result = $this->model->allowField(true)->insert($params,false,true);
68 if ($result !== false) { 74 if ($result !== false) {
69 - if(isset($params['product_id']) && !empty($params['product_id'])){  
70 - 75 + if($product_id){
71 $product = new \app\admin\model\Product(); 76 $product = new \app\admin\model\Product();
72 $product = $product->where(['id'=>$params['product_id']])->find(); 77 $product = $product->where(['id'=>$params['product_id']])->find();
73 if(!empty($product)){ 78 if(!empty($product)){
@@ -15,6 +15,8 @@ return [ @@ -15,6 +15,8 @@ return [
15 'Area' => '所在地区', 15 'Area' => '所在地区',
16 'Address' => '详细地址', 16 'Address' => '详细地址',
17 'Detail' => '订单管理', 17 'Detail' => '订单管理',
  18 + 'Product_id' => '产品',
  19 +
18 20
19 21
20 'Level' => '等级', 22 'Level' => '等级',