修改字段预处理方式

wysf
Wayne 11 months ago
parent 7f671b4c57
commit 5d088dede6
  1. 6
      app/store/model/store/Shop.php

@ -88,7 +88,6 @@ class Shop extends ShopModel
if (!$this->validateForm($data)) {
return false;
}
$data['remark'] = json_encode($data['remark'], JSON_UNESCAPED_UNICODE);
return $this->save($this->createData($data));
}
@ -102,7 +101,6 @@ class Shop extends ShopModel
if (!$this->validateForm($data)) {
return false;
}
$data['remark'] = json_encode($data['remark'], JSON_UNESCAPED_UNICODE);
return $this->save($this->createData($data)) !== false;
}
@ -148,6 +146,10 @@ class Shop extends ShopModel
[$data['province_id'], $data['city_id'], $data['region_id']] = $data['cascader'];
// 当前商城ID
$data['store_id'] = self::$storeId;
$data['remark'] = json_encode($data['remark'], JSON_UNESCAPED_UNICODE);
$data['history'] = json_encode($data['history'], JSON_UNESCAPED_UNICODE);
return $data;
}

Loading…
Cancel
Save