@@ -43,6 +43,9 @@ return [
'Updatetime' => '更新时间',
'Token' => 'Token',
'Status' => '状态',
+ 'Normal' => '正常',
+ 'Hidden' => '封禁',
+ 'Cancel' => '取消',
'Is_cool' => '靓号',
'Is_cool 0' => '否',
'Is_cool 1' => '是',
@@ -168,7 +168,7 @@ class RecharOrder extends Model
public function getPlatformList()
{
- return ['1' => __('Platform 1'), '2' => __('Platform 2'), '3' => __('Platform 3')];
+ return ['1' => __('Platform 1'), '2' => __('Platform 2')];
}
@@ -64,7 +64,7 @@ class User extends Model
public function getStatusList()
- return ['normal' => __('Normal'), 'hidden' => __('Hidden')];
+ return ['normal' => __('Normal'), 'hidden' => __('Hidden'), 'cancel' => __('Cancel')];
public function getNeedCheckList()
@@ -72,7 +72,11 @@
<div class="form-group">
<label for="content" class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
<div class="col-xs-12 col-sm-8">
- {:build_radios('row[status]', ['normal'=>__('Normal'), 'hidden'=>__('Hidden')], $row['status'])}
+ <div class="radio">
+ {foreach name="statusList" item="vo"}
+ <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label>
+ {/foreach}
+ </div>
</div>
<div class="form-group layer-footer">
@@ -1886,26 +1886,4 @@ class Money extends Common
- /**
- * 支付超时关闭
- * @return void
- */
- public function recharOrderCancel()
- {
- try {
- $maxTime = 1;
- $createTimeEnd = time() - (60 * $maxTime);
- $where['createtime'] = ['elt',$createTimeEnd];
- $where['status'] = 0;
- $recharOrder = model('RecharOrder')->where($where)->count();
- $recharOrderRes = 0;
- if (!empty($recharOrder)) {
- $recharOrderRes = model('RecharOrder')->where($where)->update(['status' => -1]);
- }
- $this->success('操作成功',$recharOrderRes);
- } catch (Exception $e) {
- $this->error($e->getMessage());
-
@@ -1189,10 +1189,10 @@ class Party extends Common
// 获取用户信息
$userInfo = \app\common\model\User::field("noble,avatar,nickname,gender,level")->where(["id"=>$user_id])->find();
if(!$userInfo) $this->error("用户信息获取失败!");
- // 国王防踢。
- $noble_no = \app\common\model\NobleLevel::where(["id"=>$userInfo->noble])->value("level_no");
- if(($item == 3 || $item == 4) && $noble_no == "p08PCcNB") {
- $this->error("对方已开通国王贵族,踢出房间失败!");
+ // 贵族防踢。
+ $nobleLevel = \app\common\model\NobleLevel::where(["id"=>$userInfo->noble])->find();
+ if(($item == 3 || $item == 4) && $nobleLevel['fjft'] == 1) {
+ $this->error("对方已开通".$nobleLevel['name']."贵族,踢出房间失败!");
$redis = new Redis();
@@ -96,8 +96,14 @@ class Auth
$this->setError('Account not exist');
return false;
- if (!in_array($user['status'],['normal','new'])) {
- $this->setError('Account is locked');
+ if (!in_array($user['status'],['normal'])) {
+ if ($user['status'] == 'hidden') {
+ $this->setError('Account is locked');
+ } else if ($user['status'] == 'cancel') {
+ $this->setError('账号已注销');
+ } else {
+ $this->setError('账号状态异常');
+ }
@@ -0,0 +1,38 @@
+<?php
+
+namespace app\index\controller;
+use think\Controller;
+use think\Exception;
+class TaskList extends Controller
+{
+ /**
+ * 支付超时关闭
+ * @return void
+ */
+ public function recharOrderCancel()
+ {
+ $result = [
+ 'code' => 1,
+ 'msg' => 'success',
+ 'data' => [],
+ ];
+ try {
+ $maxTime = 1;//处理1分钟前的数据
+ $createTimeEnd = time() - (60 * $maxTime);
+ $where['createtime'] = ['elt',$createTimeEnd];
+ $where['status'] = 0;
+ $recharOrder = model('RecharOrder')->where($where)->count();
+ $recharOrderRes = 0;
+ if (!empty($recharOrder)) {
+ $recharOrderRes = model('RecharOrder')->where($where)->update(['status' => -1]);
+ $result['data'] = $recharOrderRes;
+ } catch (Exception $e) {
+ $result['code'] = 0;
+ $result['msg'] = $e->getMessage();
+ echo json_encode($result);
+}