作者 王智

修改

... ... @@ -96,9 +96,6 @@ class Index extends Api
{
$UserId = $this->IsToken($this->request->header());
$params = $this->request->param();
dump($params['Battery']);
var_dump($params['Battery']);
die;
if ($params['type'] == 1) {
$data = [
'user_id' => $UserId,
... ... @@ -112,7 +109,8 @@ class Index extends Api
'address_con' => $params['address_con'],
'mobile' => $params['mobile'],
'hours' => $params['hours'],
'Battery' => $params['Battery'],
// 'Battery' => $params['Battery'],
'Battery' => htmlspecialchars($params['Battery']),
];
$Res = Db::name('stor')->insert($data);
$StorID = Db::name('stor')->where('user_id', $UserId)->value('id');
... ... @@ -129,7 +127,7 @@ class Index extends Api
'address_con' => $params['address_con'],
'mobile' => $params['mobile'],
'hours' => $params['hours'],
'Battery' => $params['Battery'],
'Battery' => htmlspecialchars($params['Battery']),
];
$Res = Db::name('stor')->where('id', $params['id'])->update($data);
}
... ...