mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-13 20:12:48 +00:00
no message
This commit is contained in:
parent
0d6fd903f1
commit
77e08aa048
@ -1185,12 +1185,13 @@ class UsersController extends AbstractController
|
|||||||
'alias' => $data['alias'],
|
'alias' => $data['alias'],
|
||||||
'platform' => Base::platform(),
|
'platform' => Base::platform(),
|
||||||
];
|
];
|
||||||
|
$isNotified = trim($data['isNotified']) === 'true' || $data['isNotified'] === true ? 1 : intval($data['isNotified']);
|
||||||
$row = UmengAlias::where($inArray);
|
$row = UmengAlias::where($inArray);
|
||||||
if ($row->exists()) {
|
if ($row->exists()) {
|
||||||
$row->update([
|
$row->update([
|
||||||
'ua' => $data['userAgent'],
|
'ua' => $data['userAgent'],
|
||||||
'device' => $data['deviceModel'],
|
'device' => $data['deviceModel'],
|
||||||
'is_notified' => intval($data['isNotified']),
|
'is_notified' => $isNotified,
|
||||||
'updated_at' => Carbon::now()
|
'updated_at' => Carbon::now()
|
||||||
]);
|
]);
|
||||||
return Base::retSuccess('别名已存在');
|
return Base::retSuccess('别名已存在');
|
||||||
@ -1198,7 +1199,7 @@ class UsersController extends AbstractController
|
|||||||
$row = UmengAlias::createInstance(array_merge($inArray, [
|
$row = UmengAlias::createInstance(array_merge($inArray, [
|
||||||
'ua' => $data['userAgent'],
|
'ua' => $data['userAgent'],
|
||||||
'device' => $data['deviceModel'],
|
'device' => $data['deviceModel'],
|
||||||
'is_notified' => intval($data['isNotified']),
|
'is_notified' => $isNotified,
|
||||||
]));
|
]));
|
||||||
if ($row->save()) {
|
if ($row->save()) {
|
||||||
return Base::retSuccess('添加成功');
|
return Base::retSuccess('添加成功');
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user