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

后台修改

... ... @@ -42,6 +42,12 @@ class User extends Backend
{
if ($this->request->isPost()) {
$params = $this->request->post("row/a");
$product_id = null;
if(isset($params['product_id']) && !empty($params['product_id'])){
$product_id = $params['product_id'];
unset($params['product_id']);
}
if ($params) {
if ($this->dataLimit && $this->dataLimitFieldAutoFill) {
$params[$this->dataLimitField] = $this->auth->id;
... ... @@ -66,8 +72,7 @@ class User extends Backend
$result = $this->model->allowField(true)->insert($params,false,true);
if ($result !== false) {
if(isset($params['product_id']) && !empty($params['product_id'])){
if($product_id){
$product = new \app\admin\model\Product();
$product = $product->where(['id'=>$params['product_id']])->find();
if(!empty($product)){
... ...
... ... @@ -15,6 +15,8 @@ return [
'Area' => '所在地区',
'Address' => '详细地址',
'Detail' => '订单管理',
'Product_id' => '产品',
'Level' => '等级',
... ...