Compare commits

..

3 Commits

Author SHA1 Message Date
28fbc40f70 绑定更换手机号 2025-08-15 14:06:05 +08:00
ea881adbd2 后台增加 礼盒配置 title 标题字段 2025-08-15 11:53:48 +08:00
314e519937 后台赠送装扮修改 2025-08-14 18:47:31 +08:00
4 changed files with 9 additions and 6 deletions

View File

@@ -498,6 +498,7 @@ class Activities extends adminApi
$meet = input('meet','');
$num = input('num', 0);
$content = input('content', 0);
$title = input('title', "");
if($gift_bag_id==""){
return V(0,"请选择礼包类型");
}
@@ -516,6 +517,7 @@ class Activities extends adminApi
'num' => $num
];
$data['ext'] = json_encode($ext);
$data['title'] = $title;
$res = db::name($this->table)->where(['id'=>$gift_bag_id])->update($data);
if(!$res){
return V(0,"失败");

View File

@@ -374,10 +374,11 @@ class Decorate extends adminApi
$user_id = input('user_id', '');
$decorate_id = input('decorate_id', '');
$day = input('day', '');
$user = db::name('user')->where(['id'=>$user_id])->find();
$user = db::name('user')->where(['user_code'=>$user_id])->find();
if(!$user){
return V(0,"用户不存在");
}
$user_id = $user['id'];
$decorate = db::name('vs_decorate')->where(['did'=>$decorate_id])->find();
if(!$decorate){
return V(0,"装扮不存在");

View File

@@ -26,8 +26,8 @@ class Sms extends Model
if($type == 1 || $type == 2){
//查询手机号绑定的数量
$map = [];
$map[] = ['mobile', '=', $mobile];
$map[] = ['status', '=', 1];
$map['mobile'] = $mobile;
$map['status'] = 1;
$user_info = db::name('user')->where($map)->count();
if($user_info >= 4){
return ['code' => 0, 'msg' => '该手机号已达绑定上线','data' =>null];

View File

@@ -252,7 +252,7 @@ class UserData extends Model
public function modify_mobile($new_mobile,$user_id)
{
//查询旧手机号
$mobile = db::name('user')->where(['id' => $user_id])->value('user_name');
$mobile = db::name('user')->where(['id' => $user_id])->value('username');
//查询是否实名
$is_real = db::name('user_auth')->where(['mobile' => $mobile,'is_real' => 1])->find();
if($is_real){
@@ -260,7 +260,7 @@ class UserData extends Model
db::startTrans();
//修改实名手机号
$red = db::name('user_auth')->where(['id' => $is_real['id']])->update(['mobile' => $new_mobile]);
$reslut = db::name('user')->where(['id' => $user_id])->update(['user_name' => $new_mobile]);
$reslut = db::name('user')->where(['id' => $user_id])->update(['username' => $new_mobile]);
if ($reslut && $red) {
Db::commit();
return ['code' => 1, 'msg' => '修改成功','data' =>null];
@@ -269,7 +269,7 @@ class UserData extends Model
return ['code' => 0, 'msg' => '修改失败','data' =>null];
}
}else{
$reslut = db::name('user')->where(['id' => $user_id])->update(['user_name' => $new_mobile]);
$reslut = db::name('user')->where(['id' => $user_id])->update(['username' => $new_mobile]);
if ($reslut) {
return ['code' => 1, 'msg' => '修改成功','data' =>null];
}