作者 景龙
1 个管道 的构建 通过 耗费 1 秒

总领导去掉消息审批模块

@@ -663,4 +663,73 @@ class PersonController extends RestBaseController @@ -663,4 +663,73 @@ class PersonController extends RestBaseController
663 return $os_str; 663 return $os_str;
664 } 664 }
665 665
  666 + /**
  667 + * @title 获取联系客服
  668 + * @description 接口说明
  669 + * @author 开发者
  670 + * @url /api/admin/person/getServiceMobile
  671 + * @method get
  672 + * @header name:token type:string require:1 default: other: desc:header
  673 + *
  674 + * @return service_mobile:联系客服
  675 + *
  676 + */
  677 + public function getServiceMobile(){
  678 + if($this->request->isGet()){
  679 + $res = $this->getAboutUs('service_mobile');
  680 + $this->success('成功',$res);
  681 + }else{
  682 + $this->error('请求方式错误!');
  683 + }
  684 + }
  685 +
  686 + /**
  687 + * @title 获取使用说明
  688 + * @description 接口说明
  689 + * @author 开发者
  690 + * @url /api/admin/person/getExplain
  691 + * @method get
  692 + * @header name:token type:string require:1 default: other: desc:header
  693 + *
  694 + * @return platform_explain:使用说明
  695 + *
  696 + */
  697 + public function getExplain(){
  698 + if($this->request->isGet()){
  699 + $res = $this->getAboutUs('platform_explain');
  700 + $this->success('成功',$res);
  701 + }else{
  702 + $this->error('请求方式错误!');
  703 + }
  704 + }
  705 +
  706 + /**
  707 + * @title 获取平台介绍
  708 + * @description 接口说明
  709 + * @author 开发者
  710 + * @url /api/admin/person/getIntroduce
  711 + * @method get
  712 + * @header name:token type:string require:1 default: other: desc:header
  713 + *
  714 + * @return introduce:平台介绍
  715 + *
  716 + */
  717 + public function getIntroduce(){
  718 + if($this->request->isGet()){
  719 + $res = $this->getAboutUs('introduce');
  720 + $this->success('成功',$res);
  721 + }else{
  722 + $this->error('请求方式错误!');
  723 + }
  724 + }
  725 +
  726 + private function getAboutUs($field){
  727 + $res = Db::name('about_us')
  728 + ->where('id',1)
  729 + ->field($field)
  730 + ->find();
  731 + return $res;
  732 + }
  733 +
  734 +
666 } 735 }
@@ -103,7 +103,7 @@ class CommonController extends RestBaseController @@ -103,7 +103,7 @@ class CommonController extends RestBaseController
103 } 103 }
104 104
105 //查找企业拥有的服务权限 105 //查找企业拥有的服务权限
106 - public function getRule($res,$mark=''){ 106 + public function getRule($res,$mark='',$leaders=''){
107 $rule = Db::name('service_rule') 107 $rule = Db::name('service_rule')
108 ->alias('r') 108 ->alias('r')
109 ->join('service s','r.s_id = s.id','LEFT') 109 ->join('service s','r.s_id = s.id','LEFT')
@@ -133,13 +133,16 @@ class CommonController extends RestBaseController @@ -133,13 +133,16 @@ class CommonController extends RestBaseController
133 } 133 }
134 $identity = $this->user['identity']; 134 $identity = $this->user['identity'];
135 if($identity != 0){ 135 if($identity != 0){
136 - $information = [  
137 - 'id' => 101,  
138 - 'name' => '消息审批',  
139 - 'english_name' => 'Message approval',  
140 - 'icon' => $host.'/uploads/20190626/4404bf86c659e82c3d22e5587865bdc4.png'  
141 - ];  
142 - array_push($rule,$information); 136 + if(empty($leaders)){
  137 + //不是总领导,即领导
  138 + $information = [
  139 + 'id' => 101,
  140 + 'name' => '消息审批',
  141 + 'english_name' => 'Message approval',
  142 + 'icon' => $host.'/uploads/20190626/4404bf86c659e82c3d22e5587865bdc4.png'
  143 + ];
  144 + array_push($rule,$information);
  145 + }
143 } 146 }
144 return $rule; 147 return $rule;
145 } 148 }
@@ -93,7 +93,7 @@ class IndexController extends RestBaseController @@ -93,7 +93,7 @@ class IndexController extends RestBaseController
93 $i+=0; 93 $i+=0;
94 //查找企业拥有的服务 94 //查找企业拥有的服务
95 $data['c_id'] = $value['id']; 95 $data['c_id'] = $value['id'];
96 - $rule = $common->getRule($data); 96 + $rule = $common->getRule($data,'',1);
97 $value['service'] = $rule; 97 $value['service'] = $rule;
98 foreach($value['service'] as &$value1){ 98 foreach($value['service'] as &$value1){
99 if($value1['id'] != 101 && $value1['id'] != 102){ 99 if($value1['id'] != 101 && $value1['id'] != 102){
  1 +<?php
  2 +// +----------------------------------------------------------------------
  3 +// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
  4 +// +----------------------------------------------------------------------
  5 +// | Copyright (c) 2013-2019 http://www.thinkcmf.com All rights reserved.
  6 +// +----------------------------------------------------------------------
  7 +// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  8 +// +----------------------------------------------------------------------
  9 +// | Author: 小夏 < 449134904@qq.com>
  10 +// +----------------------------------------------------------------------
  11 +namespace app\admin\controller;
  12 +
  13 +use cmf\controller\AdminBaseController;
  14 +use app\admin\model\AboutUsModel;
  15 +use think\Db;
  16 +use app\portal\model\PortalPostModel;
  17 +//使用说明
  18 +class SysExplainController extends AdminBaseController
  19 +{
  20 + //编辑页面
  21 + public function edit(){
  22 + $res = Db::name('about_us')->where(['id'=>1])->field('id,platform_explain')->find();
  23 + $contentModel = new PortalPostModel();
  24 + $res['platform_explain'] = $contentModel->getPostContentAttr($res['platform_explain']);
  25 + $this->assign('post', $res);
  26 + return $this->fetch();
  27 + }
  28 +
  29 + //编辑保存页面
  30 + public function editPost(){
  31 + $data = $this->request->param();
  32 + $AboutUsModel = new AboutUsModel();
  33 + $contentModel = new PortalPostModel();
  34 + $data['platform_explain'] = $contentModel->setPostContentAttr($data['platform_explain']);
  35 + $AboutUsModel->allowField(true)->isUpdate(true)->save($data);
  36 + $this->success("保存成功!");
  37 + }
  38 +}
  1 +<?php
  2 +// +----------------------------------------------------------------------
  3 +// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
  4 +// +----------------------------------------------------------------------
  5 +// | Copyright (c) 2013-2019 http://www.thinkcmf.com All rights reserved.
  6 +// +----------------------------------------------------------------------
  7 +// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  8 +// +----------------------------------------------------------------------
  9 +// | Author: 小夏 < 449134904@qq.com>
  10 +// +----------------------------------------------------------------------
  11 +namespace app\admin\controller;
  12 +
  13 +use cmf\controller\AdminBaseController;
  14 +use app\admin\model\AboutUsModel;
  15 +use think\Db;
  16 +use app\portal\model\PortalPostModel;
  17 +//平台介绍
  18 +class SysIntroduceController extends AdminBaseController
  19 +{
  20 + //编辑页面
  21 + public function edit(){
  22 + $res = Db::name('about_us')->where(['id'=>1])->field('id,introduce')->find();
  23 + $contentModel = new PortalPostModel();
  24 + $res['introduce'] = $contentModel->getPostContentAttr($res['introduce']);
  25 + $this->assign('post', $res);
  26 + return $this->fetch();
  27 + }
  28 +
  29 + //编辑保存页面
  30 + public function editPost(){
  31 + $data = $this->request->param();
  32 + $AboutUsModel = new AboutUsModel();
  33 + $contentModel = new PortalPostModel();
  34 + $data['introduce'] = $contentModel->setPostContentAttr($data['introduce']);
  35 + $AboutUsModel->allowField(true)->isUpdate(true)->save($data);
  36 + $this->success("保存成功!");
  37 + }
  38 +}
@@ -93,7 +93,9 @@ return array ( @@ -93,7 +93,9 @@ return array (
93 'ADMIN_SLIDEITEM_LISTORDER' => '幻灯片页面排序', 93 'ADMIN_SLIDEITEM_LISTORDER' => '幻灯片页面排序',
94 'ADMIN_STORAGE_INDEX' => '文件存储', 94 'ADMIN_STORAGE_INDEX' => '文件存储',
95 'ADMIN_STORAGE_SETTINGPOST' => '文件存储设置提交', 95 'ADMIN_STORAGE_SETTINGPOST' => '文件存储设置提交',
  96 + 'ADMIN_SYSEXPLAIN_EDIT' => '使用说明',
96 'ADMIN_SYSINFORMATION_EDIT' => '系统消息', 97 'ADMIN_SYSINFORMATION_EDIT' => '系统消息',
  98 + 'ADMIN_SYSINTRODUCE_EDIT' => '平台介绍',
97 'ADMIN_SYSSERVICE_EDIT' => '联系客服', 99 'ADMIN_SYSSERVICE_EDIT' => '联系客服',
98 'ADMIN_THEME_ACTIVE' => '启用模板', 100 'ADMIN_THEME_ACTIVE' => '启用模板',
99 'ADMIN_THEME_DATASOURCE' => '模板文件设置数据源', 101 'ADMIN_THEME_DATASOURCE' => '模板文件设置数据源',
  1 +<include file="public@header"/>
  2 +<style type="text/css">
  3 + .pic-list li {
  4 + margin-bottom: 5px;
  5 + }
  6 +</style>
  7 +</head>
  8 +<body>
  9 +<div class="wrap js-check-wrap">
  10 + <ul class="nav nav-tabs">
  11 + <li class="active"><a href="#">编辑使用说明</a></li>
  12 + </ul>
  13 + <form action="{:url('SysExplain/editPost')}" method="post" class="form-horizontal js-ajax-form margin-top-20">
  14 + <div class="row">
  15 + <div class="col-md-9">
  16 + <table class="table table-bordered">
  17 + <tr>
  18 + <th width="100">使用说明<span class="form-required">*</span></th>
  19 + <td>
  20 + <input id="post-id" type="hidden" name="id" value="{$post.id}">
  21 + <script type="text/plain" id="content" name="platform_explain">{$post.platform_explain}</script>
  22 + </td>
  23 + </tr>
  24 + </table>
  25 + </div>
  26 + </div>
  27 + <div class="form-group">
  28 + <div class="col-sm-offset-2 col-sm-10">
  29 + <button type="submit" class="btn btn-primary js-ajax-submit">{:lang('SAVE')}</button>
  30 + </div>
  31 + </div>
  32 + </form>
  33 +</div>
  34 +<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
  35 +<script type="text/javascript">
  36 + //编辑器路径定义
  37 + var editorURL = GV.WEB_ROOT;
  38 +</script>
  39 +<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.config.js"></script>
  40 +<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.all.min.js"></script>
  41 +<script>
  42 + $(function(){
  43 + editorcontent = new baidu.editor.ui.Editor();
  44 + editorcontent.render('content');
  45 + try {
  46 + editorcontent.sync();
  47 + } catch (err) {
  48 + }
  49 + });
  50 +</script>
  51 +</body>
  52 +</html>
  1 +<include file="public@header"/>
  2 +<style type="text/css">
  3 + .pic-list li {
  4 + margin-bottom: 5px;
  5 + }
  6 +</style>
  7 +</head>
  8 +<body>
  9 +<div class="wrap js-check-wrap">
  10 + <ul class="nav nav-tabs">
  11 + <li class="active"><a href="#">编辑平台介绍</a></li>
  12 + </ul>
  13 + <form action="{:url('SysIntroduce/editPost')}" method="post" class="form-horizontal js-ajax-form margin-top-20">
  14 + <div class="row">
  15 + <div class="col-md-9">
  16 + <table class="table table-bordered">
  17 + <tr>
  18 + <th width="100">平台介绍<span class="form-required">*</span></th>
  19 + <td>
  20 + <input id="post-id" type="hidden" name="id" value="{$post.id}">
  21 + <script type="text/plain" id="content" name="introduce">{$post.introduce}</script>
  22 + </td>
  23 + </tr>
  24 + </table>
  25 + </div>
  26 + </div>
  27 + <div class="form-group">
  28 + <div class="col-sm-offset-2 col-sm-10">
  29 + <button type="submit" class="btn btn-primary js-ajax-submit">{:lang('SAVE')}</button>
  30 + </div>
  31 + </div>
  32 + </form>
  33 +</div>
  34 +<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
  35 +<script type="text/javascript">
  36 + //编辑器路径定义
  37 + var editorURL = GV.WEB_ROOT;
  38 +</script>
  39 +<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.config.js"></script>
  40 +<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.all.min.js"></script>
  41 +<script>
  42 + $(function(){
  43 + editorcontent = new baidu.editor.ui.Editor();
  44 + editorcontent.render('content');
  45 + try {
  46 + editorcontent.sync();
  47 + } catch (err) {
  48 + }
  49 + });
  50 +</script>
  51 +</body>
  52 +</html>
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 <div class="wrap"> 4 <div class="wrap">
5 <ul class="nav nav-tabs"> 5 <ul class="nav nav-tabs">
6 <li class="active"><a>服务管理</a></li> 6 <li class="active"><a>服务管理</a></li>
7 - <li><a href="{:url('AdminService/add')}">添加服务</a></li> 7 + <!--<li><a href="{:url('AdminService/add')}">添加服务</a></li>-->
8 </ul> 8 </ul>
9 <form class="well form-inline margin-top-20" method="post" action="{:url('AdminService/index')}"> 9 <form class="well form-inline margin-top-20" method="post" action="{:url('AdminService/index')}">
10 服务名称: 10 服务名称: