修复group_id 错误

This commit is contained in:
mkm 2023-03-20 10:51:49 +08:00
parent bde85d8244
commit de79f989a2
2 changed files with 4 additions and 13 deletions

View File

@ -610,16 +610,7 @@ class User extends BaseController
// 修改user表
$ddd['is_admin'] = 1;
$ddd['group_id'] = $params['group_id'];
// Db::table('fa_user')->where('id', $params['id'])->update($ddd);
Db::connect('shop')->table('eb_user')->where('uid',$params['id'])->update($ddd);
// 修改商城关系表
// $nk_user['n_user_id'] = $params['id'];
// $is_nk_user = Db::connect('shop')->name('nk_user')->where($nk_user)->find();
// if ($is_nk_user) {
// $nk_data['group_id'] = $params['group_id'];
// Db::connect('shop')->name('nk_user')->where($nk_user)->update($nk_data);
// }
// 修改用户详细地址
$u_msg['address_name'] = $address_name;
$u_msg['area_id'] = $params['area_id'];
@ -639,10 +630,10 @@ class User extends BaseController
$salt = set_salt(20);
$data = [
'user_id' => $params['id'],
'username' => $user['mobile'],
'username' => $user['phone'],
'nickname' => $user['nickname'],
'thumb' => $user['avatar'],
'mobile' => $user['mobile'],
'mobile' => $user['phone'],
'did' => 1,
'position_id' => 3,
'salt' => $salt,
@ -652,7 +643,7 @@ class User extends BaseController
Db::startTrans();
try {
$w['user_id'] = $params['id'];
$is_have = Db::table('fa_szxc_information_useraddress')->where($w)->find();
// $is_have = Db::table('fa_szxc_information_useraddress')->where($w)->find();
// 创建管理员账号
$admin_id = Db::name('Admin')->insertGetId($data);
// 写入权限组

View File

@ -85,7 +85,7 @@
<div class="layui-input-block">
<select name="group_id" lay-verify="required">
{volist name='user_group' id='vo'}
<option value="{$vo.id}" {if $vo.id==$user['group_id']} selected {/if}>{$vo.name}</option>
<option value="{$vo.group_id}" {if $vo.group_id==$user['group_id']} selected {/if}>{$vo.group_name}</option>
{/volist}
</select>
</div>