123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
- namespace app\protocol\controller;
- use app\admin\model\Protocol;
- use think\Controller;
- class Index extends Controller
- {
- /**
- * app端协议
- */
- public function privacy($t=1): string
- {
- $info = Protocol::where('type', $t)->find();
- $content = '';
- if($info) {
- $content = $info->content??'';
- }
- switch($t) {
- case 1:
- case 4:
- $title = 'APP服务协议';
- break;
- case 2:
- case 3:
- $title = 'APP隐私协议';
- break;
- case 5:
- $title = '关于我们';
- break;
- case 6:
- $title = '用户注册协议';
- break;
- default:
- $title = '其它政策协议';
- }
- $this->view->assign('content', $content);
- $this->view->assign('title', $title);
- return $this->view->fetch('index/privacy');
- }
- }
|