Compare commits
3 Commits
3fc247e8e5
...
28fbc40f70
| Author | SHA1 | Date | |
|---|---|---|---|
| 28fbc40f70 | |||
| ea881adbd2 | |||
| 314e519937 |
@@ -498,6 +498,7 @@ class Activities extends adminApi
|
|||||||
$meet = input('meet','');
|
$meet = input('meet','');
|
||||||
$num = input('num', 0);
|
$num = input('num', 0);
|
||||||
$content = input('content', 0);
|
$content = input('content', 0);
|
||||||
|
$title = input('title', "");
|
||||||
if($gift_bag_id==""){
|
if($gift_bag_id==""){
|
||||||
return V(0,"请选择礼包类型");
|
return V(0,"请选择礼包类型");
|
||||||
}
|
}
|
||||||
@@ -516,6 +517,7 @@ class Activities extends adminApi
|
|||||||
'num' => $num
|
'num' => $num
|
||||||
];
|
];
|
||||||
$data['ext'] = json_encode($ext);
|
$data['ext'] = json_encode($ext);
|
||||||
|
$data['title'] = $title;
|
||||||
$res = db::name($this->table)->where(['id'=>$gift_bag_id])->update($data);
|
$res = db::name($this->table)->where(['id'=>$gift_bag_id])->update($data);
|
||||||
if(!$res){
|
if(!$res){
|
||||||
return V(0,"失败");
|
return V(0,"失败");
|
||||||
|
|||||||
@@ -374,10 +374,11 @@ class Decorate extends adminApi
|
|||||||
$user_id = input('user_id', '');
|
$user_id = input('user_id', '');
|
||||||
$decorate_id = input('decorate_id', '');
|
$decorate_id = input('decorate_id', '');
|
||||||
$day = input('day', '');
|
$day = input('day', '');
|
||||||
$user = db::name('user')->where(['id'=>$user_id])->find();
|
$user = db::name('user')->where(['user_code'=>$user_id])->find();
|
||||||
if(!$user){
|
if(!$user){
|
||||||
return V(0,"用户不存在");
|
return V(0,"用户不存在");
|
||||||
}
|
}
|
||||||
|
$user_id = $user['id'];
|
||||||
$decorate = db::name('vs_decorate')->where(['did'=>$decorate_id])->find();
|
$decorate = db::name('vs_decorate')->where(['did'=>$decorate_id])->find();
|
||||||
if(!$decorate){
|
if(!$decorate){
|
||||||
return V(0,"装扮不存在");
|
return V(0,"装扮不存在");
|
||||||
|
|||||||
@@ -26,8 +26,8 @@ class Sms extends Model
|
|||||||
if($type == 1 || $type == 2){
|
if($type == 1 || $type == 2){
|
||||||
//查询手机号绑定的数量
|
//查询手机号绑定的数量
|
||||||
$map = [];
|
$map = [];
|
||||||
$map[] = ['mobile', '=', $mobile];
|
$map['mobile'] = $mobile;
|
||||||
$map[] = ['status', '=', 1];
|
$map['status'] = 1;
|
||||||
$user_info = db::name('user')->where($map)->count();
|
$user_info = db::name('user')->where($map)->count();
|
||||||
if($user_info >= 4){
|
if($user_info >= 4){
|
||||||
return ['code' => 0, 'msg' => '该手机号已达绑定上线','data' =>null];
|
return ['code' => 0, 'msg' => '该手机号已达绑定上线','data' =>null];
|
||||||
|
|||||||
@@ -252,7 +252,7 @@ class UserData extends Model
|
|||||||
public function modify_mobile($new_mobile,$user_id)
|
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();
|
$is_real = db::name('user_auth')->where(['mobile' => $mobile,'is_real' => 1])->find();
|
||||||
if($is_real){
|
if($is_real){
|
||||||
@@ -260,7 +260,7 @@ class UserData extends Model
|
|||||||
db::startTrans();
|
db::startTrans();
|
||||||
//修改实名手机号
|
//修改实名手机号
|
||||||
$red = db::name('user_auth')->where(['id' => $is_real['id']])->update(['mobile' => $new_mobile]);
|
$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) {
|
if ($reslut && $red) {
|
||||||
Db::commit();
|
Db::commit();
|
||||||
return ['code' => 1, 'msg' => '修改成功','data' =>null];
|
return ['code' => 1, 'msg' => '修改成功','data' =>null];
|
||||||
@@ -269,7 +269,7 @@ class UserData extends Model
|
|||||||
return ['code' => 0, 'msg' => '修改失败','data' =>null];
|
return ['code' => 0, 'msg' => '修改失败','data' =>null];
|
||||||
}
|
}
|
||||||
}else{
|
}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) {
|
if ($reslut) {
|
||||||
return ['code' => 1, 'msg' => '修改成功','data' =>null];
|
return ['code' => 1, 'msg' => '修改成功','data' =>null];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user