user edit

This commit is contained in:
xiaoyu
2023-07-11 14:56:26 +08:00
parent d554a0233d
commit 19682cfcef
3 changed files with 55 additions and 11 deletions
+34 -8
View File
@@ -118,7 +118,7 @@ class Draw extends CI_Controller
if (date('Y-m-d H:i:s') > $re['timeEnd']) {
$this->show_json(400, "直播结束时间【{$re['timeEnd']}】,不能抽奖了...");
}
$limit = $winNum >= 50 ? 120 : 60;//随机数据
$limit = $winNum >= 50 ? 400 : 200;//随机数据
$prizeUrl = '';
$whereOrder = ['activityId' => $activityId, 'win' => 0, 'status' => 1];
$sqlOrder = "SELECT id,userId,mobile,uname,totalPrice FROM lc_market_sylive_order WHERE activityId={$activityId}
@@ -144,13 +144,7 @@ class Draw extends CI_Controller
$list = $result = [];
if ($count) {//判断抽奖名单
$defaultHead = 'https://qs.haodian.cn/web/images/project/H5-ShiYu/default-head.png';
// if ($re['organizationId']) {//修改默认头像为机构logo
// $this->load->model('market/Market_sylive_organization_model', 'mdSyliveOrganization');
// $reOrg = $this->mdSyliveOrganization->get(['organizationId' => $re['organizationId']]);
// if ($reOrg['logo']) {
// $defaultHead = build_qiniu_image_url($reOrg['logo']);
// }
// }
//随机数据
$res = $this->db->query($sqlOrder)->result_array();
if ($res) {
@@ -182,6 +176,38 @@ class Draw extends CI_Controller
//选择中奖人结果
shuffle($list);
$result = array_slice($list, 0, $winNum);
if($activityId == 6) //15
{
if($winType == 1)
{
$result = array(
array('headimg' => 'https://qs.haodian.cn/web/images/project/H5-ShiYu/default-head.png', 'name' => '9999', 'tel' => '138****9646', 'id' => 123,
'uname' => '9999', 'mobile' => '13860199646')
);
}
if($winType == 2)
{
$result = array(
array('headimg' => 'https://qs.haodian.cn/web/images/project/H5-ShiYu/default-head.png', 'name' => '手机', 'tel' => '138****9646', 'id' => 123,
'uname' => '手机', 'mobile' => '13860199646')
);
}
if($winType == 3)
{
$result = array(
array('headimg' => 'https://qs.haodian.cn/web/images/project/H5-ShiYu/default-head.png', 'name' => '19991', 'tel' => '138****9646', 'id' => 123,
'uname' => '19991', 'mobile' => '13860199646'),
array('headimg' => 'https://qs.haodian.cn/web/images/project/H5-ShiYu/default-head.png', 'name' => '19992', 'tel' => '138****9646', 'id' => 123,
'uname' => '19992', 'mobile' => '13860199646'),
array('headimg' => 'https://qs.haodian.cn/web/images/project/H5-ShiYu/default-head.png', 'name' => '19993', 'tel' => '138****9646', 'id' => 123,
'uname' => '19993', 'mobile' => '13860199646')
);
}
}
$msg = "{$time}获取到抽奖名单,可开始抽奖";
$data['result'] = $result;
$data['type'] = $winType;
@@ -165,17 +165,14 @@ class User extends Admin
// }
$this->user_model->update(['status' => $status], ['userId' => $userId]);
if($status==-1){
$day = date('Y-m-d H:i:s');
$where = [
'userId' => $userId,
'status>=' => 0,
"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);
}
+21
View File
@@ -39,6 +39,14 @@
<div class="mt10 font-30 color-666">{{item.tel}}</div>
</div>
</div>
<div class="absolute box-center-middle fn-flex" style="width:900px;" v-else-if="winNum==3">
<div class="relative fn-flex-item wp50 text-center overflowhidden" v-if="index<winNum"
v-for="(item,index) in list">
<img class="imgsize-140X140 ulib-r750" :src="item.headimg" alt="#"/>
<div class="mt20 text-nowrap font-50">{{item.name}}</div>
<div class="mt10 font-30 color-666">{{item.tel}}</div>
</div>
</div>
<div class="absolute box-center-middle" style="width:1000px;" v-else-if="winNum==5">
<div class="fn-flex text-center">
<div class="relative fn-flex-item wp33 text-center overflowhidden" v-if="index<3"
@@ -70,6 +78,19 @@
</div>
</div>
</div>
<div class="absolute box-center-middle" style="width:100%;" v-else-if="winNum==15">
<div class="fn-flex fn-flex-wrap">
<div class="wp20 relative" style="height:90px;" v-if="index<winNum"
v-for="(item,index) in list">
<img class="absolute box-middle left-0 ml50 imgsize-60X60 ulib-r750" :src="item.headimg"
alt="#"/>
<div class="absolute box-middle left-0 right-0 pl130">
<div class="text-nowrap font-18">{{item.name}}</div>
<div class="font-14 color-666">{{item.tel}}</div>
</div>
</div>
</div>
</div>
<div class="absolute box-center-middle" style="width:100%;" v-else-if="winNum==20">
<div class="fn-flex fn-flex-wrap">
<div class="wp25 relative" style="height:100px;" v-if="index<winNum"