作者 何书鹏
1 个管道 的构建 通过 耗费 1 秒

隐私协议

... ... @@ -109,8 +109,20 @@ class Company extends Backend
// 修改角色为公司
\app\admin\model\User::where('id',$row->user_id)->setField('group_id',1);
$msg = '通过成功';
// 发送消息
\app\mobile\model\Message::create([
'user_id' => $row->user_id,
'title' => '注册企业-成功',
'content' => '您的加入企业申请已审核通过,您在本款APP的所有学习资料,您企业下的员工都可以免费使用哦。快去试试吧。'
]);
} else {
$msg = '拒绝成功';
// 发送消息
\app\mobile\model\Message::create([
'user_id' => $row->user_id,
'title' => '注册企业-失败',
'content' => '您的加入企业申请审核失败了,快去个人中心-账号管理中修改信息后重新申请吧。'
]);
}
$result = $row->save();
Db::commit();
... ...
... ... @@ -15,6 +15,12 @@
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">启动页用户协议及隐私协议:</label>
<div class="col-xs-12 col-sm-8">
<textarea id="c-agreement" class="form-control editor" rows="5" name="row[agreement]" cols="50">{$row.agreement|htmlentities}</textarea>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">用户注册协议:</label>
<div class="col-xs-12 col-sm-8">
<textarea id="c-user_agreement" class="form-control editor" rows="5" name="row[user_agreement]" cols="50">{$row.user_agreement|htmlentities}</textarea>
... ... @@ -27,6 +33,12 @@
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">隐私协议:</label>
<div class="col-xs-12 col-sm-8">
<textarea id="c-privacy_agreement" class="form-control editor" rows="5" name="row[privacy_agreement]" cols="50">{$row.privacy_agreement|htmlentities}</textarea>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">暂不登录提示:</label>
<div class="col-xs-12 col-sm-8">
<textarea id="c-no_login" class="form-control editor" rows="5" name="row[no_login]" cols="50">{$row.no_login|htmlentities}</textarea>
... ...
... ... @@ -290,4 +290,22 @@ class Index extends Api
}
$this->success('成功',compact('url'));
}
/**
* @ApiTitle (启动页用户协议及隐私协议)
* @ApiSummary (启动页用户协议及隐私协议)
* @ApiMethod (POST)
*
* @ApiReturn({
"code": 1,
"msg": "成功",
"time": "1599017563",
"data": "启动页用户协议及隐私协议内容" //协议内容
})
*/
public function agreement()
{
$content = Db::name('mobile_config')->where('id',1)->value('agreement');
$this->success('成功', $content);
}
}
\ No newline at end of file
... ...
... ... @@ -37,7 +37,7 @@ use Endroid\QrCode\QrCode;
*/
class User extends Api
{
protected $noNeedLogin = ['registerUser','agreementUser','registerCompany','agreementCompany','login','resetpwd','exam','noLogin','problemList','problemInfo'];
protected $noNeedLogin = ['registerUser','agreementUser','registerCompany','agreementCompany','agreementPrivacy','login','resetpwd','exam','noLogin','problemList','problemInfo'];
protected $noNeedRight = ['*'];
public function _initialize()
... ... @@ -213,6 +213,25 @@ class User extends Api
}
/**
* @ApiWeigh (93)
* @ApiTitle (隐私协议)
* @ApiSummary (隐私协议)
* @ApiMethod (POST)
*
* @ApiReturn({
"code": 1,
"msg": "成功",
"time": "1599017563",
"data": "隐私协议内容" //协议内容
})
*/
public function agreementPrivacy()
{
$content = Db::name('mobile_config')->where('id',1)->value('privacy_agreement');
$this->success('成功', $content);
}
/**
* @ApiWeigh (91)
* @ApiTitle (登录)
* @ApiSummary (登录)
... ...
此 diff 太大无法显示。