edit-sylive-majia
This commit is contained in:
@@ -409,7 +409,7 @@ class Act extends Wx {
|
||||
$ret['nickname'] && $update['nickname'] = strval($ret['nickname']);
|
||||
$ret['headimgurl'] && $update['headimg'] = strval($ret['headimgurl']);
|
||||
$ret['unionid'] && $update['unionid'] = $ret['unionid'];
|
||||
$this->user_model->update($update,['userId'=>$this->uid]);
|
||||
$this->user_model->update($update,['userId'=>$this->uid,'openid'=>$ret['openid']]);
|
||||
$_SESSION[self::SESSION_KEY]['all_info'] =1;
|
||||
}
|
||||
$skey = $this->input->get('skey');
|
||||
|
||||
@@ -72,7 +72,7 @@ class Biz extends Admin{
|
||||
$ret['nickname'] && $update['nickname'] = strval($ret['nickname']);
|
||||
$ret['headimgurl'] && $update['headimg'] = strval($ret['headimgurl']);
|
||||
$ret['unionid'] && $update['unionid'] = $ret['unionid'];
|
||||
$this->user_model->update($update,['userId'=>$this->uid]);
|
||||
$this->user_model->update($update,['userId'=>$this->uid,'openid'=>$ret['openid']]);
|
||||
}
|
||||
$_SESSION[self::SESSION_KEY]['all_info'] =1;
|
||||
}
|
||||
|
||||
@@ -232,7 +232,7 @@ class Wx extends Common{
|
||||
$row_wechat = $this->groups_user_model->get($where);
|
||||
if(!$row_wechat){
|
||||
$row_wechat = $this->user_model->get(['status'=>0,'openid'=>$openid]);//普通用户角色
|
||||
}else{}
|
||||
}
|
||||
if(!$row_wechat){ //创建用户
|
||||
$add = array(
|
||||
"openid" => $openid,
|
||||
@@ -249,6 +249,16 @@ class Wx extends Common{
|
||||
}else{
|
||||
$this->uid = $row_wechat['userId'];
|
||||
}
|
||||
//判断是否有绑定马甲
|
||||
$ma_user = '';
|
||||
$user = $this->user_model->get(['userId'=>$this->uid,'maJiaId>'=>0]);
|
||||
$user['maJiaId'] && $ma_user = $this->user_model->get(['userId'=>$user['maJiaId'],'status'=>0]);
|
||||
if($ma_user){
|
||||
$where = ['activityId' => $param['a_id'], 'status' => 0, "userId" => $ma_user['userId']];
|
||||
$row_wechat = $this->groups_user_model->get($where); //管理员用户
|
||||
!$row_wechat && $row_wechat = $this->user_model->get(['status'=>0,'userId'=>$ma_user['userId']]);//普通用户角色
|
||||
$this->uid = $row_wechat['userId'];
|
||||
}
|
||||
$act_user = $this->act_user_model->get(['activityId'=>$param['a_id'],'userId'=>$this->uid]);
|
||||
if(!$act_user && $param['a_id']){
|
||||
$act_data = [
|
||||
|
||||
@@ -467,10 +467,13 @@ class Stic extends Admin{
|
||||
}
|
||||
$jsondata = json_decode($row['jsondata'],true);
|
||||
$info['banner'] = $jsondata['banner'] ? build_qiniu_image_url($jsondata['banner']) : Sylive_entity::DF_BANNER;
|
||||
$this->data['info'] = $info;
|
||||
$activityStart = strtotime($row['activityStart'])>0 ? strtotime($row['activityStart']) : strtotime($row['timeStart'])-7*24*60*60;
|
||||
$end_time = time()< strtotime($row['timeStart']) ? time() : strtotime($row['timeStart']);
|
||||
$diff_seconds = $end_time - $activityStart;
|
||||
$diff_days = ceil($diff_seconds/86400);
|
||||
$day_list = ['全部'];
|
||||
$timeEnd = strtotime($row['timeEnd']);//直播结束往前七天
|
||||
for($i=0;$i<8;$i++){
|
||||
for($i=0;$i<$diff_days;$i++){
|
||||
$day_list[] = date('Y-m-d',$timeEnd - $i*24*60*60);
|
||||
}
|
||||
$this->data['day_list'] = $day_list;
|
||||
@@ -491,6 +494,7 @@ class Stic extends Admin{
|
||||
$groups[] = ['value'=>'','type'=>'biz','title'=>'门店排名'];
|
||||
$groups[] = ['value'=>'','type'=>'user','title'=>'顾问排名'];
|
||||
$this->data['groups'] = $groups;
|
||||
$this->data['info'] = $info;
|
||||
//微信分享
|
||||
$wx_info = $this->share_info($row);
|
||||
$this->data['sign_package'] = $wx_info['sign_package'];
|
||||
@@ -572,9 +576,13 @@ class Stic extends Admin{
|
||||
if(!$row){
|
||||
throw new Hd_exception('参数错误',400);
|
||||
}
|
||||
$activityStart = strtotime($row['activityStart'])>0 ? strtotime($row['activityStart']) : strtotime($row['timeStart'])-7*24*60*60;
|
||||
$end_time = time()< strtotime($row['timeStart']) ? time() : strtotime($row['timeStart']);
|
||||
$diff_seconds = $end_time - $activityStart;
|
||||
$diff_days = ceil($diff_seconds/86400);
|
||||
$day_list = ['全部'];
|
||||
$timeEnd = strtotime($row['timeEnd']);//直播结束往前七天
|
||||
for($i=0;$i<8;$i++){
|
||||
for($i=0;$i<$diff_days;$i++){
|
||||
$day_list[] = date('Y-m-d',$timeEnd - $i*24*60*60);
|
||||
}
|
||||
$group_user = $this->groups_user_model->get(['activityId'=>$this->a_id,'userId'=>$this->uid]);
|
||||
|
||||
@@ -159,12 +159,12 @@ class User extends Admin
|
||||
if (!$userId) {
|
||||
$this->show_json('', 400, '参数错误');
|
||||
}
|
||||
$user = $this->user_model->get(['userId' => $userId]);
|
||||
// $user = $this->user_model->get(['userId' => $userId]);
|
||||
// if($user['openid'] && !$status){
|
||||
// $this->show_json('', 400, '操作失败,用户已绑定微信公众号');
|
||||
// }
|
||||
$this->user_model->update(['status' => $status], ['userId' => $userId]);
|
||||
if($status){
|
||||
if($status==-1){
|
||||
$day = date('Y-m-d H:i:s');
|
||||
$where = [
|
||||
'userId' => $userId,
|
||||
@@ -172,6 +172,12 @@ class User extends Admin
|
||||
"activityId in (select activityId from lc_market_sylive_activity where timeEnd>'{$day}' and status=0)" => null
|
||||
];
|
||||
$this->groups_user_model->update(['status'=>-1],$where);
|
||||
$where = [
|
||||
'userId' => $userId,
|
||||
'groupsId>=' => 0,
|
||||
"activityId in (select activityId from lc_market_sylive_activity where timeEnd>'{$day}' and status=0)" => null
|
||||
];
|
||||
$this->act_user_model->delete($where);
|
||||
}
|
||||
$this->show_json('', 200, '操作成功');
|
||||
}
|
||||
|
||||
@@ -11,6 +11,13 @@ class Welcome extends Admin {
|
||||
}
|
||||
|
||||
public function index(){
|
||||
//判断是否绑定马甲
|
||||
$ma_user = '';
|
||||
$user = $this->user_model->get(['mobile'=>$this->mobile,'maJiaId>'=>0]);
|
||||
$user['maJiaId'] && $ma_user = $this->user_model->get(['userId'=>$user['maJiaId'],"mobile != ''"=>null]);
|
||||
if($ma_user){
|
||||
$this->mobile = $_SESSION[self::SESSION_KEY]['mobile'] = $ma_user['mobile'];
|
||||
}
|
||||
$where = [
|
||||
'mobile' => $this->mobile,
|
||||
'organizationId>' => 0,
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
<!--直播阶段-->
|
||||
<div v-if="tabid==2">
|
||||
|
||||
<div class="mt30 bg-fff inner20 overflowhidden text-center font-24 color-666 ulib-r20">直播结算后6小时同步数据</div>
|
||||
<div class="mt30 bg-fff inner20 overflowhidden text-center font-24 color-666 ulib-r20">直播结束后6小时同步数据</div>
|
||||
|
||||
<div class="mt30 bts-4-333 bbs-4-ff9d47 bg-fff overflowhidden ulib-r20">
|
||||
<div class="relative fn-flex fn-flex-wrap text-center">
|
||||
|
||||
Reference in New Issue
Block a user