后端修改:
if (!isset($res)) {
$nickname = User::where('uid', $this->uid)->value('nickname');
$nick = ['phone' => $phone, 'account' => $phone];
if(check_phone($nickname)) $nick['nickname'] = $phone;
User::update($nick, ['uid' => $this->uid]);
PhoneUser::update(['phone' => $phone, 'nickname' => $phone], ['uid' => $this->uid]);
}
if (!isset($res)) {
$nickname = User::where('uid', $this->uid)->value('nickname');
$nick = ['phone' => $phone, 'account' => $phone];
if(check_phone($nickname)) $nick['nickname'] = $phone;
User::update($nick, ['uid' => $this->uid]);
PhoneUser::update(['phone' => $phone, 'nickname' => $phone], ['uid' => $this->uid]);
}
前端修改:
下载附件,解压替换对应的文件。