作者 王智

修改

... ... @@ -109,13 +109,23 @@ class Index extends Api
'address_con' => $params['address_con'],
'mobile' => $params['mobile'],
'hours' => $params['hours'],
// 'Battery' => $params['Battery'],
'Battery' =>htmlspecialchars_decode($params['Battery']),
'Battery' => htmlspecialchars_decode($params['Battery']),
];
$Res = Db::name('stor')->insert($data);
$StorID = Db::name('stor')->where('user_id', $UserId)->value('id');
$this->NameCarQrCode('storID' . $StorID, $params['url'] . '?stor_id=' . $StorID);
Db::name('stor')->where('user_id', $UserId)->where('id', $StorID)->update(['stor_image' => '/images/storID' . $StorID . '.png']);
Db::name('stor')->where('user_id', $UserId)->where(['user_id' => $UserId,
'createtime' => time(),
'updatetime' => time(),
'avatar' => $params['avatar'],
'name' => $params['name'],
'address' => $params['address'],
'lng' => $params['lng'],
'lat' => $params['lat'],
'address_con' => $params['address_con'],
'mobile' => $params['mobile'],
'hours' => $params['hours'],
'Battery' => htmlspecialchars_decode($params['Battery']),])->update(['stor_image' => '/images/storID' . $StorID . '.png']);
} else {
$data = [
'updatetime' => time(),
... ...