作者 刘朕
1 个管道 的构建 失败 耗费 22 秒

新增用户仅可查看一个视频播放功能逻辑

... ... @@ -19,7 +19,7 @@ class Set extends Backend
*/
protected $model = null;
// 允许批量修改字段
protected $multiFields = 'switch,fast_switch,status';
protected $multiFields = 'switch,fast_switch,status,only_switch';
public function _initialize()
{
... ...
... ... @@ -4,5 +4,6 @@ return [
'Id' => 'id',
'Stopnum' => '多久暂停一次',
'Switch' => '是否开启',
'Only_switch'=> '用户是否仅可查看一个视频开关',
'Createtime' => '创建时间'
];
... ...
... ... @@ -31,5 +31,6 @@ return [
'Status' => '状态',
'Study_id' => '考试科目id',
'Periodtime' => '考试有效期',
'View_status' => '是否正在观看视频',
'Leave password blank if dont want to change' => '不修改密码请留空',
];
... ...
... ... @@ -2,6 +2,7 @@
namespace app\api\controller;
use app\admin\model\Set;
use app\common\controller\Api;
use function fast\e;
use think\Cache;
... ... @@ -29,6 +30,8 @@ class User extends Api
{
protected $noNeedLogin = ['video_list'];
protected $noNeedRight = ['*'];
// 允许批量修改字段
protected $multiFields = 'view_status';
/**
* @ApiTitle (我的资料)
... ... @@ -284,6 +287,11 @@ class User extends Api
}else{
$third_study['periodtime'] < time() && $this->error('学习期限已过,无法观看视频');
}
// 判断用户查看视频状态
$admin_option = Set::get(1);
if($admin_option['only_switch'] == 1 && $this->auth->view_status == 1) {
$this->error('当前用户正在观看视频,无法查看其他视频');
}
//查看播放秒数
$class_detail = Db::name('class_detail')
... ... @@ -326,6 +334,59 @@ class User extends Api
}
/**
* @ApiTitle (记录用户播放状态)
* @ApiSummary (记录用户播放状态)
* @ApiMethod (POST)
* @ApiRoute (/api/user/change_view_status)
*
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
* @ApiParams (name="view_status", type="int", required=true, description="观看视频状态:0=结束观看,1=开始观看")
* @ApiParams (name="view_id", type="int", required=true, description="培训课程id")
*
* @ApiReturn({
"code": 1,
"msg": "成功",
"time": "1571492001"
})
*/
public function change_view_status()
{
$user_id = $this->auth->id;
$view_status = $this->request->param('view_status',0);
$id = $this->request->param('view_id');
if(empty($id)){
$this->error('缺少必要参数');
}
$user_info = Db::name('user')->where('id',$user_id)->find();
if(empty($user_info['image'])){
$this->error('请先完善个人头像信息');
}
$data = Db::name('classes')
->alias('a')
->join('study b','a.study_id = b.id')
->where('a.id',$id)
->field('a.*,b.expirationtime')
->find();
// 查看用户是否有权限
$third_study = Db::name('third_study')->where('third_id',$user_id)->where('study_id',$data['study_id'])->find();
if(empty($third_study)){
$this->error('您没有该场考试的权限,无法观看视频');
}else{
$third_study['periodtime'] < time() && $this->error('学习期限已过,无法观看视频');
}
$user_update = [
'view_status' => $view_status,
'view_id' => $view_status == 1 ? $id : 0
];
if($view_status == 0 || $id != $this->auth->view_id) {
// 修改用户观看视频状态
$res = \app\common\model\User::update($user_update,['id'=>$user_id]);
if(!$res) $this->error('修改失败');
}
$this->success('修改成功');
}
/**
* @ApiTitle (记录播放时间)
* @ApiSummary (记录播放时间)
* @ApiMethod (POST)
... ...
... ... @@ -26,7 +26,7 @@ class Auth
//默认配置
protected $config = [];
protected $options = [];
protected $allowFields = ['id', 'username', 'nickname', 'mobile', 'avatar', 'score'];
protected $allowFields = ['id', 'username', 'nickname', 'mobile', 'avatar', 'score', 'view_status', 'view_id'];
public function __construct($options = [])
{
... ... @@ -306,6 +306,7 @@ class Auth
$this->_user = $user;
$this->_token = Random::uuid();
Token::clear($user->id);
Token::set($this->_token, $user->id, $this->keeptime);
$this->_logined = true;
... ...
... ... @@ -208,13 +208,14 @@
<a href="javascript:;" data-id="50" class="list-group-item">修改我的资料</a>
<a href="javascript:;" data-id="51" class="list-group-item">培训课程列表</a>
<a href="javascript:;" data-id="52" class="list-group-item">培训课程详情</a>
<a href="javascript:;" data-id="53" class="list-group-item">记录播放时间</a>
<a href="javascript:;" data-id="54" class="list-group-item">加入学习计划</a>
<a href="javascript:;" data-id="55" class="list-group-item">加入学习计划-批量</a>
<a href="javascript:;" data-id="56" class="list-group-item">移除学习计划</a>
<a href="javascript:;" data-id="57" class="list-group-item">我的考试</a>
<a href="javascript:;" data-id="58" class="list-group-item">查看证书</a>
<a href="javascript:;" data-id="59" class="list-group-item"></a>
<a href="javascript:;" data-id="53" class="list-group-item">记录用户播放状态</a>
<a href="javascript:;" data-id="54" class="list-group-item">记录播放时间</a>
<a href="javascript:;" data-id="55" class="list-group-item">加入学习计划</a>
<a href="javascript:;" data-id="56" class="list-group-item">加入学习计划-批量</a>
<a href="javascript:;" data-id="57" class="list-group-item">移除学习计划</a>
<a href="javascript:;" data-id="58" class="list-group-item">我的考试</a>
<a href="javascript:;" data-id="59" class="list-group-item">查看证书</a>
<a href="javascript:;" data-id="60" class="list-group-item"></a>
</div>
</div>
</div>
... ... @@ -7063,7 +7064,7 @@
<div class="panel-heading" id="heading-53">
<h4 class="panel-title">
<span class="label label-primary">POST</span>
<a data-toggle="collapse" data-parent="#accordion53" href="#collapseOne53"> 记录播放时间 <span class="text-muted">/api/user/bofang</span></a>
<a data-toggle="collapse" data-parent="#accordion53" href="#collapseOne53"> 记录用户播放状态 <span class="text-muted">/api/user/change_view_status</span></a>
</h4>
</div>
<div id="collapseOne53" class="panel-collapse collapse">
... ... @@ -7081,7 +7082,7 @@
<div class="tab-pane active" id="info53">
<div class="well">
记录播放时间 </div>
记录用户播放状态 </div>
<div class="panel panel-default">
<div class="panel-heading"><strong>Headers</strong></div>
<div class="panel-body">
... ... @@ -7119,16 +7120,16 @@
</thead>
<tbody>
<tr>
<td>id</td>
<td>view_status</td>
<td>int</td>
<td></td>
<td>培训课程id</td>
<td>观看视频状态:0=结束观看,1=开始观看</td>
</tr>
<tr>
<td>duration</td>
<td>view_id</td>
<td>int</td>
<td></td>
<td>播放时间</td>
<td>培训课程id</td>
</tr>
</tbody>
</table>
... ... @@ -7158,14 +7159,14 @@
<div class="panel panel-default">
<div class="panel-heading"><strong>参数</strong></div>
<div class="panel-body">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/user/bofang" method="POST" name="form53" id="form53">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/user/change_view_status" method="POST" name="form53" id="form53">
<div class="form-group">
<label class="control-label" for="id">id</label>
<input type="int" class="form-control input-sm" id="id" required placeholder="培训课程id" name="id">
<label class="control-label" for="view_status">view_status</label>
<input type="int" class="form-control input-sm" id="view_status" required placeholder="观看视频状态:0=结束观看,1=开始观看" name="view_status">
</div>
<div class="form-group">
<label class="control-label" for="duration">duration</label>
<input type="int" class="form-control input-sm" id="duration" required placeholder="播放时间" name="duration">
<label class="control-label" for="view_id">view_id</label>
<input type="int" class="form-control input-sm" id="view_id" required placeholder="培训课程id" name="view_id">
</div>
<div class="form-group">
<button type="submit" class="btn btn-success send" rel="53">提交</button>
... ... @@ -7201,9 +7202,7 @@
<pre id="sample_response53">{
"code": 1,
"msg": "成功",
"time": "1571492001",
"data": {
}
"time": "1571492001"
}</pre>
</div>
</div>
... ... @@ -7217,7 +7216,7 @@
<div class="panel-heading" id="heading-54">
<h4 class="panel-title">
<span class="label label-primary">POST</span>
<a data-toggle="collapse" data-parent="#accordion54" href="#collapseOne54"> 加入学习计划 <span class="text-muted">/api/user/join</span></a>
<a data-toggle="collapse" data-parent="#accordion54" href="#collapseOne54"> 记录播放时间 <span class="text-muted">/api/user/bofang</span></a>
</h4>
</div>
<div id="collapseOne54" class="panel-collapse collapse">
... ... @@ -7235,7 +7234,7 @@
<div class="tab-pane active" id="info54">
<div class="well">
加入学习计划 </div>
记录播放时间 </div>
<div class="panel panel-default">
<div class="panel-heading"><strong>Headers</strong></div>
<div class="panel-body">
... ... @@ -7278,6 +7277,12 @@
<td></td>
<td>培训课程id</td>
</tr>
<tr>
<td>duration</td>
<td>int</td>
<td></td>
<td>播放时间</td>
</tr>
</tbody>
</table>
</div>
... ... @@ -7306,12 +7311,16 @@
<div class="panel panel-default">
<div class="panel-heading"><strong>参数</strong></div>
<div class="panel-body">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/user/join" method="POST" name="form54" id="form54">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/user/bofang" method="POST" name="form54" id="form54">
<div class="form-group">
<label class="control-label" for="id">id</label>
<input type="int" class="form-control input-sm" id="id" required placeholder="培训课程id" name="id">
</div>
<div class="form-group">
<label class="control-label" for="duration">duration</label>
<input type="int" class="form-control input-sm" id="duration" required placeholder="播放时间" name="duration">
</div>
<div class="form-group">
<button type="submit" class="btn btn-success send" rel="54">提交</button>
<button type="reset" class="btn btn-info" rel="54">重置</button>
</div>
... ... @@ -7361,7 +7370,7 @@
<div class="panel-heading" id="heading-55">
<h4 class="panel-title">
<span class="label label-primary">POST</span>
<a data-toggle="collapse" data-parent="#accordion55" href="#collapseOne55"> 加入学习计划-批量 <span class="text-muted">/api/user/joinBatch</span></a>
<a data-toggle="collapse" data-parent="#accordion55" href="#collapseOne55"> 加入学习计划 <span class="text-muted">/api/user/join</span></a>
</h4>
</div>
<div id="collapseOne55" class="panel-collapse collapse">
... ... @@ -7379,7 +7388,7 @@
<div class="tab-pane active" id="info55">
<div class="well">
加入学习计划-批量 </div>
加入学习计划 </div>
<div class="panel panel-default">
<div class="panel-heading"><strong>Headers</strong></div>
<div class="panel-body">
... ... @@ -7417,10 +7426,10 @@
</thead>
<tbody>
<tr>
<td>ids</td>
<td>string</td>
<td>id</td>
<td>int</td>
<td></td>
<td>培训课程id集合(多个id用英文逗号隔开)</td>
<td>培训课程id</td>
</tr>
</tbody>
</table>
... ... @@ -7450,10 +7459,10 @@
<div class="panel panel-default">
<div class="panel-heading"><strong>参数</strong></div>
<div class="panel-body">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/user/joinBatch" method="POST" name="form55" id="form55">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/user/join" method="POST" name="form55" id="form55">
<div class="form-group">
<label class="control-label" for="ids">ids</label>
<input type="string" class="form-control input-sm" id="ids" required placeholder="培训课程id集合(多个id用英文逗号隔开)" name="ids">
<label class="control-label" for="id">id</label>
<input type="int" class="form-control input-sm" id="id" required placeholder="培训课程id" name="id">
</div>
<div class="form-group">
<button type="submit" class="btn btn-success send" rel="55">提交</button>
... ... @@ -7487,10 +7496,11 @@
<div class="row">
<div class="col-md-12">
<pre id="sample_response55">{
"code": 1,
"msg": "成功",
"time": "1571492001",
"data": null
"code": 1,
"msg": "成功",
"time": "1571492001",
"data": {
}
}</pre>
</div>
</div>
... ... @@ -7504,7 +7514,7 @@
<div class="panel-heading" id="heading-56">
<h4 class="panel-title">
<span class="label label-primary">POST</span>
<a data-toggle="collapse" data-parent="#accordion56" href="#collapseOne56"> 移除学习计划 <span class="text-muted">/api/user/del_join</span></a>
<a data-toggle="collapse" data-parent="#accordion56" href="#collapseOne56"> 加入学习计划-批量 <span class="text-muted">/api/user/joinBatch</span></a>
</h4>
</div>
<div id="collapseOne56" class="panel-collapse collapse">
... ... @@ -7522,7 +7532,7 @@
<div class="tab-pane active" id="info56">
<div class="well">
移除学习计划 </div>
加入学习计划-批量 </div>
<div class="panel panel-default">
<div class="panel-heading"><strong>Headers</strong></div>
<div class="panel-body">
... ... @@ -7560,10 +7570,10 @@
</thead>
<tbody>
<tr>
<td>id</td>
<td>int</td>
<td>ids</td>
<td>string</td>
<td></td>
<td>培训课程id</td>
<td>培训课程id集合(多个id用英文逗号隔开)</td>
</tr>
</tbody>
</table>
... ... @@ -7593,10 +7603,10 @@
<div class="panel panel-default">
<div class="panel-heading"><strong>参数</strong></div>
<div class="panel-body">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/user/del_join" method="POST" name="form56" id="form56">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/user/joinBatch" method="POST" name="form56" id="form56">
<div class="form-group">
<label class="control-label" for="id">id</label>
<input type="int" class="form-control input-sm" id="id" required placeholder="培训课程id" name="id">
<label class="control-label" for="ids">ids</label>
<input type="string" class="form-control input-sm" id="ids" required placeholder="培训课程id集合(多个id用英文逗号隔开)" name="ids">
</div>
<div class="form-group">
<button type="submit" class="btn btn-success send" rel="56">提交</button>
... ... @@ -7630,11 +7640,10 @@
<div class="row">
<div class="col-md-12">
<pre id="sample_response56">{
"code": 1,
"msg": "成功",
"time": "1571492001",
"data": {
}
"code": 1,
"msg": "成功",
"time": "1571492001",
"data": null
}</pre>
</div>
</div>
... ... @@ -7648,7 +7657,7 @@
<div class="panel-heading" id="heading-57">
<h4 class="panel-title">
<span class="label label-primary">POST</span>
<a data-toggle="collapse" data-parent="#accordion57" href="#collapseOne57"> 我的考试 <span class="text-muted">/api/user/myexam</span></a>
<a data-toggle="collapse" data-parent="#accordion57" href="#collapseOne57"> 移除学习计划 <span class="text-muted">/api/user/del_join</span></a>
</h4>
</div>
<div id="collapseOne57" class="panel-collapse collapse">
... ... @@ -7666,7 +7675,7 @@
<div class="tab-pane active" id="info57">
<div class="well">
我的考试 </div>
移除学习计划 </div>
<div class="panel panel-default">
<div class="panel-heading"><strong>Headers</strong></div>
<div class="panel-body">
... ... @@ -7707,7 +7716,7 @@
<td>id</td>
<td>int</td>
<td></td>
<td>学习系统id</td>
<td>培训课程id</td>
</tr>
</tbody>
</table>
... ... @@ -7737,10 +7746,10 @@
<div class="panel panel-default">
<div class="panel-heading"><strong>参数</strong></div>
<div class="panel-body">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/user/myexam" method="POST" name="form57" id="form57">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/user/del_join" method="POST" name="form57" id="form57">
<div class="form-group">
<label class="control-label" for="id">id</label>
<input type="int" class="form-control input-sm" id="id" required placeholder="学习系统id" name="id">
<input type="int" class="form-control input-sm" id="id" required placeholder="培训课程id" name="id">
</div>
<div class="form-group">
<button type="submit" class="btn btn-success send" rel="57">提交</button>
... ... @@ -7778,6 +7787,150 @@
"msg": "成功",
"time": "1571492001",
"data": {
}
}</pre>
</div>
</div>
</div><!-- #sample -->
</div><!-- .tab-content -->
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading" id="heading-58">
<h4 class="panel-title">
<span class="label label-primary">POST</span>
<a data-toggle="collapse" data-parent="#accordion58" href="#collapseOne58"> 我的考试 <span class="text-muted">/api/user/myexam</span></a>
</h4>
</div>
<div id="collapseOne58" class="panel-collapse collapse">
<div class="panel-body">
<!-- Nav tabs -->
<ul class="nav nav-tabs" id="doctab58">
<li class="active"><a href="#info58" data-toggle="tab">基础信息</a></li>
<li><a href="#sandbox58" data-toggle="tab">在线测试</a></li>
<li><a href="#sample58" data-toggle="tab">返回示例</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div class="tab-pane active" id="info58">
<div class="well">
我的考试 </div>
<div class="panel panel-default">
<div class="panel-heading"><strong>Headers</strong></div>
<div class="panel-body">
<table class="table table-hover">
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th>必选</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>token</td>
<td>string</td>
<td></td>
<td>请求的Token</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading"><strong>参数</strong></div>
<div class="panel-body">
<table class="table table-hover">
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th>必选</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>id</td>
<td>int</td>
<td></td>
<td>学习系统id</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading"><strong>正文</strong></div>
<div class="panel-body">
</div>
</div>
</div><!-- #info -->
<div class="tab-pane" id="sandbox58">
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading"><strong>Headers</strong></div>
<div class="panel-body">
<div class="headers">
<div class="form-group">
<label class="control-label" for="token">token</label>
<input type="string" class="form-control input-sm" id="token" required placeholder="请求的Token - Ex: " name="token">
</div>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading"><strong>参数</strong></div>
<div class="panel-body">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/user/myexam" method="POST" name="form58" id="form58">
<div class="form-group">
<label class="control-label" for="id">id</label>
<input type="int" class="form-control input-sm" id="id" required placeholder="学习系统id" name="id">
</div>
<div class="form-group">
<button type="submit" class="btn btn-success send" rel="58">提交</button>
<button type="reset" class="btn btn-info" rel="58">重置</button>
</div>
</form>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading"><strong>响应输出</strong></div>
<div class="panel-body">
<div class="row">
<div class="col-md-12" style="overflow-x:auto">
<pre id="response_headers58"></pre>
<pre id="response58"></pre>
</div>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading"><strong>返回参数</strong></div>
<div class="panel-body">
</div>
</div>
</div>
</div>
</div><!-- #sandbox -->
<div class="tab-pane" id="sample58">
<div class="row">
<div class="col-md-12">
<pre id="sample_response58">{
"code": 1,
"msg": "成功",
"time": "1571492001",
"data": {
"exam":[
"id"://id,
"examname"://考试名称
... ... @@ -7810,26 +7963,26 @@
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading" id="heading-58">
<div class="panel-heading" id="heading-59">
<h4 class="panel-title">
<span class="label label-primary">POST</span>
<a data-toggle="collapse" data-parent="#accordion58" href="#collapseOne58"> 查看证书 <span class="text-muted">/api/user/certificate</span></a>
<a data-toggle="collapse" data-parent="#accordion59" href="#collapseOne59"> 查看证书 <span class="text-muted">/api/user/certificate</span></a>
</h4>
</div>
<div id="collapseOne58" class="panel-collapse collapse">
<div id="collapseOne59" class="panel-collapse collapse">
<div class="panel-body">
<!-- Nav tabs -->
<ul class="nav nav-tabs" id="doctab58">
<li class="active"><a href="#info58" data-toggle="tab">基础信息</a></li>
<li><a href="#sandbox58" data-toggle="tab">在线测试</a></li>
<li><a href="#sample58" data-toggle="tab">返回示例</a></li>
<ul class="nav nav-tabs" id="doctab59">
<li class="active"><a href="#info59" data-toggle="tab">基础信息</a></li>
<li><a href="#sandbox59" data-toggle="tab">在线测试</a></li>
<li><a href="#sample59" data-toggle="tab">返回示例</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div class="tab-pane active" id="info58">
<div class="tab-pane active" id="info59">
<div class="well">
查看证书 </div>
<div class="panel panel-default">
... ... @@ -7885,7 +8038,7 @@
</div>
</div><!-- #info -->
<div class="tab-pane" id="sandbox58">
<div class="tab-pane" id="sandbox59">
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
... ... @@ -7902,14 +8055,14 @@
<div class="panel panel-default">
<div class="panel-heading"><strong>参数</strong></div>
<div class="panel-body">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/user/certificate" method="POST" name="form58" id="form58">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/user/certificate" method="POST" name="form59" id="form59">
<div class="form-group">
<label class="control-label" for="id">id</label>
<input type="int" class="form-control input-sm" id="id" required placeholder="考试记录id" name="id">
</div>
<div class="form-group">
<button type="submit" class="btn btn-success send" rel="58">提交</button>
<button type="reset" class="btn btn-info" rel="58">重置</button>
<button type="submit" class="btn btn-success send" rel="59">提交</button>
<button type="reset" class="btn btn-info" rel="59">重置</button>
</div>
</form>
</div>
... ... @@ -7919,8 +8072,8 @@
<div class="panel-body">
<div class="row">
<div class="col-md-12" style="overflow-x:auto">
<pre id="response_headers58"></pre>
<pre id="response58"></pre>
<pre id="response_headers59"></pre>
<pre id="response59"></pre>
</div>
</div>
</div>
... ... @@ -7935,10 +8088,10 @@
</div>
</div><!-- #sandbox -->
<div class="tab-pane" id="sample58">
<div class="tab-pane" id="sample59">
<div class="row">
<div class="col-md-12">
<pre id="sample_response58">{
<pre id="sample_response59">{
"code": 1,
"msg": "成功",
"time": "1571492001",
... ... @@ -7956,26 +8109,26 @@
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading" id="heading-59">
<div class="panel-heading" id="heading-60">
<h4 class="panel-title">
<span class="label label-success">GET</span>
<a data-toggle="collapse" data-parent="#accordion59" href="#collapseOne59"> <span class="text-muted">/api/user/get_video_first_image</span></a>
<a data-toggle="collapse" data-parent="#accordion60" href="#collapseOne60"> <span class="text-muted">/api/user/get_video_first_image</span></a>
</h4>
</div>
<div id="collapseOne59" class="panel-collapse collapse">
<div id="collapseOne60" class="panel-collapse collapse">
<div class="panel-body">
<!-- Nav tabs -->
<ul class="nav nav-tabs" id="doctab59">
<li class="active"><a href="#info59" data-toggle="tab">基础信息</a></li>
<li><a href="#sandbox59" data-toggle="tab">在线测试</a></li>
<li><a href="#sample59" data-toggle="tab">返回示例</a></li>
<ul class="nav nav-tabs" id="doctab60">
<li class="active"><a href="#info60" data-toggle="tab">基础信息</a></li>
<li><a href="#sandbox60" data-toggle="tab">在线测试</a></li>
<li><a href="#sample60" data-toggle="tab">返回示例</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div class="tab-pane active" id="info59">
<div class="tab-pane active" id="info60">
<div class="well">
</div>
<div class="panel panel-default">
... ... @@ -7997,19 +8150,19 @@
</div>
</div><!-- #info -->
<div class="tab-pane" id="sandbox59">
<div class="tab-pane" id="sandbox60">
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading"><strong>参数</strong></div>
<div class="panel-body">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/user/get_video_first_image" method="get" name="form59" id="form59">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/user/get_video_first_image" method="get" name="form60" id="form60">
<div class="form-group">
</div>
<div class="form-group">
<button type="submit" class="btn btn-success send" rel="59">提交</button>
<button type="reset" class="btn btn-info" rel="59">重置</button>
<button type="submit" class="btn btn-success send" rel="60">提交</button>
<button type="reset" class="btn btn-info" rel="60">重置</button>
</div>
</form>
</div>
... ... @@ -8019,8 +8172,8 @@
<div class="panel-body">
<div class="row">
<div class="col-md-12" style="overflow-x:auto">
<pre id="response_headers59"></pre>
<pre id="response59"></pre>
<pre id="response_headers60"></pre>
<pre id="response60"></pre>
</div>
</div>
</div>
... ... @@ -8035,10 +8188,10 @@
</div>
</div><!-- #sandbox -->
<div class="tab-pane" id="sample59">
<div class="tab-pane" id="sample60">
<div class="row">
<div class="col-md-12">
<pre id="sample_response59"></pre>
<pre id="sample_response60"></pre>
</div>
</div>
</div><!-- #sample -->
... ... @@ -8053,7 +8206,7 @@
<div class="row mt0 footer">
<div class="col-md-6" align="left">
Generated on 2021-12-20 16:16:43 </div>
Generated on 2022-07-20 17:34:05 </div>
<div class="col-md-6" align="right">
<a href="./" target="_blank">企智帮</a>
</div>
... ...
... ... @@ -28,6 +28,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
{field: 'stopnum', title: __('多久暂停一次(单位分)')},
{field: 'switch', title: __('Switch'), table: table, formatter: Table.api.formatter.toggle},
{field: 'fast_switch', title: __('快进开关'), table: table, formatter: Table.api.formatter.toggle},
{field: 'only_switch', title: __('Only_switch'), table: table, formatter: Table.api.formatter.toggle},
{field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: function (value, row, index) {
var that = $.extend({}, this);
... ...
... ... @@ -83,6 +83,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
{field: 'status', title: __('Status'), formatter: Table.api.formatter.status, searchList: {normal: __('Normal'), hidden: __('Hidden')}},
{field: 'mobile', title: __('手机号')},
{field: 'group_id', title: __('角色'), searchList: {"0":"普通用户","1":"企业管理员"},formatter: Table.api.formatter.flag},
{field: 'view_status', title: __('View_status'), table: table, formatter: Table.api.formatter.toggle},
{field: 'createtime', title: __('注册时间'), formatter: Table.api.formatter.datetime, operate: 'RANGE', addclass: 'datetimerange', sortable: true},
{field: 'user.mobile_exam_ids', title: __('参加的考试'), operate: 'FIND_IN_SET', searchList: Config.mobileExamList,formatter: Table.api.formatter.flag},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
... ...