浏览代码

feat: test

王亚超 1 年之前
父节点
当前提交
64a702fb80
共有 100 个文件被更改,包括 6333 次插入21 次删除
  1. 10 10
      server/.env
  2. 7 7
      server/.gitignore
  3. 1 0
      server/.htaccess
  4. 1 0
      server/.user.ini
  5. 26 0
      server/404.html
  6. 21 0
      server/api/config/main.php
  7. 100 0
      server/api/modules/v1/controllers/PolicyController.php
  8. 274 0
      server/api/modules/v1/controllers/SurveyController.php
  9. 1 0
      server/backend/controllers/ArticleController.php
  10. 182 0
      server/backend/controllers/IndustryController.php
  11. 184 0
      server/backend/controllers/PolicyController.php
  12. 211 0
      server/backend/controllers/SurveyController.php
  13. 71 0
      server/backend/models/search/SurveySearch.php
  14. 83 0
      server/backend/views/industry/_form.php
  15. 18 0
      server/backend/views/industry/create.php
  16. 73 0
      server/backend/views/industry/index.php
  17. 19 0
      server/backend/views/industry/update.php
  18. 39 0
      server/backend/views/industry/view.php
  19. 72 0
      server/backend/views/policy/_form.php
  20. 17 0
      server/backend/views/policy/create.php
  21. 28 0
      server/backend/views/policy/index.php
  22. 18 0
      server/backend/views/policy/update.php
  23. 25 0
      server/backend/views/policy/view.php
  24. 56 0
      server/backend/views/survey/_form.php
  25. 18 0
      server/backend/views/survey/create.php
  26. 39 0
      server/backend/views/survey/index.php
  27. 18 0
      server/backend/views/survey/update.php
  28. 25 0
      server/backend/views/survey/view.php
  29. 270 0
      server/common/models/Industry.php
  30. 114 0
      server/common/models/Policy.php
  31. 111 0
      server/common/models/Survey.php
  32. 1 0
      server/common/modules/config/backend/controllers/DefaultController.php
  33. 1 0
      server/common/modules/config/backend/views/default/index.php
  34. 1 0
      server/common/modules/rbac/models/Menu.php
  35. 2 0
      server/common/modules/user/backend/views/default/_search.php
  36. 22 0
      server/common/modules/user/backend/views/default/index.php
  37. 235 1
      server/common/modules/user/models/User.php
  38. 3890 0
      server/database/rencai_jiangzi_20231013.sql
  39. 39 0
      server/index.html
  40. 1 0
      server/web/.well-known/acme-challenge/GLCW9730tBb_Pncfblp3DWjHc5jPuUse_fdBVX1ij8o
  41. 1 0
      server/web/api/index.php
  42. 1 0
      server/web/index.php
  43. 1 1
      server/web/mobile/index.html
  44. 二进制
      server/web/mobile/mobile.zip
  45. 二进制
      server/web/mobile/static/images/list-bg.png
  46. 二进制
      server/web/mobile/static/images/tab_cal.png
  47. 二进制
      server/web/mobile/static/images/tab_cal_s.png
  48. 二进制
      server/web/mobile/static/images/tab_policy.png
  49. 二进制
      server/web/mobile/static/images/tab_policy_s.png
  50. 二进制
      server/web/mobile/static/images/type-1.png
  51. 二进制
      server/web/mobile/static/images/type-2.png
  52. 二进制
      server/web/mobile/static/images/type-3.png
  53. 二进制
      server/web/mobile/static/images/type-4.png
  54. 0 0
      server/web/mobile/static/index.97465e7b.css
  55. 0 0
      server/web/mobile/static/js/chunk-vendors.492ca56c.js
  56. 0 0
      server/web/mobile/static/js/index.eac3f4eb.js
  57. 0 0
      server/web/mobile/static/js/pages-feedback-feedback.d1c89335.js
  58. 0 0
      server/web/mobile/static/js/pages-index-index.a80406fe.js
  59. 0 0
      server/web/mobile/static/js/pages-index-index~pages-policy-index.eaf84287.js
  60. 0 0
      server/web/mobile/static/js/pages-index-index~pages-policy-index~pages-policy-list~pages-policy-score~pages-policy-search~pages-~9b2bfa63.6b031c63.js
  61. 0 0
      server/web/mobile/static/js/pages-index-index~pages-policy-search~pages-search-search~pages-talents-talents~pages-user-footprint.d79feb62.js
  62. 0 0
      server/web/mobile/static/js/pages-index-index~pages-talents-talents.f46e7d54.js
  63. 0 0
      server/web/mobile/static/js/pages-kanban-kanban.665c0c69.js
  64. 0 0
      server/web/mobile/static/js/pages-launch-launch.fdb51220.js
  65. 0 0
      server/web/mobile/static/js/pages-login-login.0a70f873.js
  66. 0 0
      server/web/mobile/static/js/pages-policy-detail.1a4af98c.js
  67. 0 0
      server/web/mobile/static/js/pages-policy-index.50ca94c0.js
  68. 0 0
      server/web/mobile/static/js/pages-policy-index~pages-policy-search~pages-policy-talent~pages-user-company.322b137a.js
  69. 0 0
      server/web/mobile/static/js/pages-policy-index~pages-policy-talent.a0ac3b8a.js
  70. 0 0
      server/web/mobile/static/js/pages-policy-list.8080ce23.js
  71. 0 0
      server/web/mobile/static/js/pages-policy-score.4a1f59b2.js
  72. 0 0
      server/web/mobile/static/js/pages-policy-search.4ece7981.js
  73. 0 0
      server/web/mobile/static/js/pages-policy-talent.3fc3d862.js
  74. 0 0
      server/web/mobile/static/js/pages-search-search.62824860.js
  75. 0 0
      server/web/mobile/static/js/pages-talents-detail.c0e77e2f.js
  76. 0 0
      server/web/mobile/static/js/pages-talents-talents.1a616164.js
  77. 0 0
      server/web/mobile/static/js/pages-user-company.cde4f033.js
  78. 0 0
      server/web/mobile/static/js/pages-user-footprint.7b26cffd.js
  79. 0 0
      server/web/mobile/static/js/pages-user-user.a9d06f0d.js
  80. 2 2
      server/web/pc/200.html
  81. 0 0
      server/web/pc/_nuxt/268699a.js
  82. 1 0
      server/web/pc/_nuxt/2b09d2c.js
  83. 0 0
      server/web/pc/_nuxt/5246472.js
  84. 1 0
      server/web/pc/_nuxt/565bd5b.js
  85. 0 0
      server/web/pc/_nuxt/7d1ff1a.js
  86. 0 0
      server/web/pc/_nuxt/9f43f41.js
  87. 0 0
      server/web/pc/_nuxt/a6f9317.js
  88. 1 0
      server/web/pc/_nuxt/a9dab19.js
  89. 0 0
      server/web/pc/_nuxt/adf2428.js
  90. 0 0
      server/web/pc/_nuxt/b674f24.js
  91. 0 0
      server/web/pc/_nuxt/c17869a.js
  92. 1 0
      server/web/pc/_nuxt/d811690.js
  93. 0 0
      server/web/pc/_nuxt/dbc3170.js
  94. 0 0
      server/web/pc/_nuxt/e9c2273.js
  95. 0 0
      server/web/pc/_nuxt/ea50ed5.js
  96. 二进制
      server/web/pc/_nuxt/fonts/element-icons.313f7da.woff
  97. 二进制
      server/web/pc/_nuxt/fonts/element-icons.4520188.ttf
  98. 二进制
      server/web/pc/_nuxt/fonts/iconfont.0708493.woff
  99. 二进制
      server/web/pc/_nuxt/fonts/iconfont.3932398.ttf
  100. 二进制
      server/web/pc/_nuxt/fonts/iconfont.851a0f6.woff2

+ 10 - 10
server/.env

@@ -1,20 +1,20 @@
 # Framework
 # ---------
-YII_DEBUG   = false
-YII_ENV     = PRODUCTION
+YII_DEBUG   = true
+YII_ENV     = dev
 
 # Databases
 # ---------
-DB_DSN           = mysql:host=192.168.51.99;port=3306;dbname=talent_map
-DB_USERNAME      = jinjianghc
-DB_PASSWORD      = l9cb9kWrGqjFMl^W
+DB_DSN           = mysql:host=127.0.0.1;port=3306;dbname=www_rencai_cn
+DB_USERNAME      = www_rencai_cn
+DB_PASSWORD      = 2EiPhybYpXEbp5pJ
 DB_TABLE_PREFIX  = dd_
 
 
 # Redis
 # --------
-REDIS_HOST=192.168.51.99
-REDIS_PASSWORD=jjhc2019
+REDIS_HOST=127.0.0.1
+REDIS_PASSWORD=
 REDIS_PORT=6379
 
 
@@ -32,15 +32,15 @@ MAIL_ENCRYPTION=tls
 # Other
 # -----
 
-FRONTEND_COOKIE_VALIDATION_KEY=nBa4QRtVCVKgsn2Optalent_map
-BACKEND_COOKIE_VALIDATION_KEY=JhNsIC4_rgh_tuZksCtalent_map
+FRONTEND_COOKIE_VALIDATION_KEY=nBa4QRtVCVKgsn2Oprencai_jiangzi_
+BACKEND_COOKIE_VALIDATION_KEY=JhNsIC4_rgh_tuZksCrencai_jiangzi_
 
 #后台开启rest 风格 url
 backend_enable_pretty_url=true
 
 # Urls
 # ----
-SITE_URL =https://rcmap.jucai.gov.cn
+SITE_URL =https://rencai.jiangzi.xin
 
 # 搜索驱动(xunsearch需要安装xunsearch服务端)
 SEARCH_ENGINE = local

+ 7 - 7
server/.gitignore

@@ -30,8 +30,8 @@ phpunit.phar
 dump.rdb
 
 
-# env 建议加入忽略列表
-#/.env
+# env
+/.env
 
 #web assets
 /web/admin/assets/
@@ -49,10 +49,10 @@ install.php
 /web/*.txt
 
 
-#本地配置文件 建议加入忽略列表
-#*main-local.php
-#*params-local.php
+#本地配置文件
+*main-local.php
+*params-local.php
+*TestController.php
 
-
-#数据库脚本备份文件  建议加入忽略列表
+#数据库脚本备份文件
 #*.sql

+ 1 - 0
server/.htaccess

@@ -0,0 +1 @@
+ 

+ 1 - 0
server/.user.ini

@@ -0,0 +1 @@
+open_basedir=/www/wwwroot/www.rencai.cn/:/tmp/

+ 26 - 0
server/404.html

@@ -0,0 +1,26 @@
+<!doctype html>
+<html>
+<head>
+<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
+<title>404</title>
+<style>
+	body{
+		background-color:#444;
+		font-size:14px;
+	}
+	h3{
+		font-size:60px;
+		color:#eee;
+		text-align:center;
+		padding-top:30px;
+		font-weight:normal;
+	}
+</style>
+</head>
+
+<body>
+<h3>404,您请求的文件不存在!</h3>
+</body>
+</html>

+ 21 - 0
server/api/config/main.php

@@ -70,6 +70,27 @@ return [
                         'GET version' => 'version',
                     ],
                 ],
+                [
+                    'class' => 'yii\rest\UrlRule',
+                    'pluralize' => false,
+                    'controller' => 'v1/survey',
+                    'extraPatterns' => [
+                        'GET survey' => 'survey',
+                        'GET captcha' => 'captcha',
+                        'POST submit' => 'submit',
+                        'POST enterprise' => 'enterprise',
+                    ],
+                ],
+                [
+                    'class' => 'yii\rest\UrlRule',
+                    'pluralize' => false,
+                    'controller' => 'v1/policy',
+                    'extraPatterns' => [
+                        'GET policy' => 'policy',
+                        'GET category' => 'category',
+                        'GET details' => 'details',
+                    ],
+                ]
             ],
         ],
         'request' => [

+ 100 - 0
server/api/modules/v1/controllers/PolicyController.php

@@ -0,0 +1,100 @@
+<?php
+
+
+namespace api\modules\v1\controllers;
+
+
+use api\common\controllers\Controller;
+use common\modules\config\models\Config;
+use common\models\Policy;
+use yii\helpers\ArrayHelper;
+use api\common\behaviors\QueryParamAuth;
+
+use Yii;
+use yii\base\Exception;
+use yii\data\ActiveDataProvider;
+use yii\web\NotFoundHttpException;
+
+class PolicyController extends Controller {
+
+    public function behaviors()
+    {
+        return ArrayHelper::merge(parent::behaviors(), [
+            [
+                'class' => QueryParamAuth::className(),
+                'tokenParam' => 'token',
+                'optional' => ['index','category','details']
+            ]
+        ]);
+    }
+
+  
+    
+    public function actionIndex()
+    {
+        
+        $params = request()->get();
+        $query = Policy::find()->select('id,title,author,created_at');
+        
+        if(!empty($params)){
+            $arr = [];
+       
+            foreach ($params as $key=>$value) {
+                if($key == 'page' || $key == 'page_no'){
+                    continue;
+                }
+    		    if($value){
+    		         $fd = $key.'_' . $value;
+    		         $query->orWhere(new \yii\db\Expression('FIND_IN_SET("'.$fd.'", filter)'));
+    		    }
+    		}
+        }
+        
+        
+        return new ActiveDataProvider([
+            'query' => $query,
+            'pagination' => [
+                'pageParam' => 'page_no',
+                'pageSizeParam' => 'page_size',
+            ],
+            'sort' => [
+                'defaultOrder' => [
+                    'created_at' => SORT_ASC,
+                ]
+            ]
+        ]);
+    }
+    
+    public function actionCategory()
+    {
+        $lists = Config::find()->select(['name','value','extra','description','type'])->where(['group' => 'policy'])->asArray()->all();
+        foreach ($lists as &$value) {
+            
+            $arr = [];
+            $val = explode("\r\n",$value['value']);
+			$extra = explode("\r\n",$value['extra']);
+			
+			foreach($extra as $k => $v){
+			    $arr[] = [
+			        'name'=>$v,
+			        'value'=>$val[$k]
+			     ];
+			}
+			
+            $value['data'] = $arr;
+			unset($value['extra'],$value['value'],$value['type']);
+        }
+
+        return ['data' => $lists];
+    }
+
+ 
+    public function actionDetails($id)
+    {
+        $model = Policy::find()->where(['id' => $id])->select('id,content,author,created_at,title')->one();
+
+        return ['data' => $model];
+    }
+
+
+}

+ 274 - 0
server/api/modules/v1/controllers/SurveyController.php

@@ -0,0 +1,274 @@
+<?php
+
+
+namespace api\modules\v1\controllers;
+
+
+use api\common\controllers\Controller;
+use common\modules\config\models\Config;
+use common\models\Survey;
+use yii\helpers\ArrayHelper;
+use api\common\behaviors\QueryParamAuth;
+use yii\captcha\CaptchaAction;
+use common\enums\CodeEnum;
+use common\models\Policy;
+
+class SurveyController extends Controller {
+
+    public function behaviors()
+    {
+        return ArrayHelper::merge(parent::behaviors(), [
+            [
+                'class' => QueryParamAuth::className(),
+                'tokenParam' => 'token',
+                'optional' => ['index','submit','enterprise','captcha']
+            ]
+        ]);
+    }
+    
+    
+    public function actionCaptcha()
+    {
+     
+        $obj = new CaptchaAction(\Yii::$app->controller->id,\Yii::$app->controller);
+     
+        $obj->width = 100;
+        $obj->minLength = 3;
+        $obj->maxLength = 3;
+        $obj->offset   = 3;
+        $code = $obj->getVerifyCode(true);
+      //echo $code;die;
+        // 生成图片
+        echo  $obj->run();
+        die;
+    }
+
+    /**
+     * @api {get} /v1/survey 列表
+     * @apiVersion 1.0.0
+     * @apiName index
+     * @apiGroup Survey
+     *
+     *
+     */
+    public function actionIndex()
+    {
+        $type = request()->get('type');
+        if(empty($type)) $type = 'industry';
+        
+        $lists = Config::find()->select(['name','value','extra','description','type'])->where(['group' => $type])->all();
+
+		foreach ($lists as &$value) {
+			$value['value'] = explode("\r\n",$value['extra']);
+			foreach($value['value'] as &$val){
+				$val = trim($val);
+			}
+
+			unset($value['extra']);
+        }
+
+        return ['data' => $lists];
+    }
+
+	public function actionEnterprise()
+    {
+		$params = request()->post();
+  
+       
+// 		$params = [
+// 			'name'=>'企业名称1',
+// 			'address'=>'企业注册地',
+// 			'estdate'=>'2023-10-23',
+// 			'busAddress'=>'企业实际经营地',
+// 			'propertyNumber'=>1, //企业有效l类知识产权数
+// 			'propertyNumber2'=>2, //有效、高企认定中未使用过的II类知识产权数
+// 			'propertyMode'=>1, //知识产权获取方式 1:自主研发 2:仅有受让、受赠和并购等
+//  			'isStandard'=>0, //企业参与编制国家标准、行业标准、检测方法、技术规范的情况  1:是 0:否
+// 			'achievementNumber'=>1, //科技成果数,
+
+// 			'manageLevel1'=>1, //定制了企业研究开发组织管理制度
+// 			'manageLevel2'=>1, //建立了研发投入核算体系
+// 			'manageLevel3'=>1,  //编制了研发费用辅助帐
+// 			'manageLevel4'=>1,  //设立了内部科技技术研究开发机构并具备相应的科研条件
+// 			'manageLevel5'=>1,  //与国内外研究开发机构开展多种形式的产学研合作
+// 			'manageLevel6'=>1,  //建立了科技成果转化的组织实施与激励奖励制度
+// 			'manageLevel7'=>1,  //建立开放式的创新创业平台
+// 			'manageLevel8'=>1,  //建立了科技人员的培养进修制度
+//             'manageLevel9'=>1,  //建立了职工技能培训制度
+            
+// 			'netAssets1'=>111, //第1年   净资产
+// 			'netAssets2'=>222, //第2年   净资产
+// 			'netAssets3'=>333, //第3年   净资产
+// 			'saleRevenue1'=>444, //第1年  销售收入
+// 			'saleRevenue2'=>555, //第2年  销售收入
+// 			'saleRevenue3'=>666 //第3年  销售收入
+// 		];
+        
+        //知识产权数量
+        $numberScore = 0;
+        if($params['propertyNumber2'] == 1 || $params['propertyNumber2'] == 2) $numberScore = 2;
+        if($params['propertyNumber2'] == 3 || $params['propertyNumber2'] == 4) $numberScore = 4;
+        if($params['propertyNumber2'] >= 5) $numberScore = 6;
+        if($params['propertyNumber'] > 1) $numberScore = 8;
+        
+        //知识产权获得方式
+        $modeScore = 0;
+        if($params['propertyMode'] == 1) $numberScore = 6;
+        if($params['propertyMode'] == 2) $numberScore = 3;
+        
+        //企业参与编制国家标准、行业标准、检测方法、技术规范的情况
+        $standardScore = 0;
+        if($params['isStandard'] == 1) $standardScore = 2;
+        
+        //科技成果转化能力
+        $techniquesAchieveScore = 0;
+        if($params['achievementNumber'] == 1) $techniquesAchieveScore = 6;
+        if($params['achievementNumber'] == 2) $techniquesAchieveScore = 12;
+        if($params['achievementNumber'] == 3) $techniquesAchieveScore = 18;
+        if($params['achievementNumber'] == 4) $techniquesAchieveScore = 25;
+        if($params['achievementNumber'] >= 5) $techniquesAchieveScore = 30;
+        
+        //研究开发组织管理水平
+        $manageLevelScore = 0;
+        if($params['manageLevel1'] == 1) $manageLevelScore += 2;
+        if($params['manageLevel2'] == 1) $manageLevelScore += 2;
+        if($params['manageLevel3'] == 1) $manageLevelScore += 2;
+        if($params['manageLevel4'] == 1) $manageLevelScore += 3;
+        if($params['manageLevel5'] == 1) $manageLevelScore += 3;
+        if($params['manageLevel6'] == 1) $manageLevelScore += 2;
+        if($params['manageLevel7'] == 1) $manageLevelScore += 2;
+        if($params['manageLevel8'] == 1) $manageLevelScore += 2;
+        if($params['manageLevel9'] == 1) $manageLevelScore += 2;
+        
+        //净资产增长率
+        $growthRate = (0.5 * ($params['netAssets2'] / $params['netAssets1'] + $params['netAssets3'] / $params['netAssets2']) - 1) * 100;
+        
+        $growthRateScore = 0;
+        if($growthRate > 0) $growthRateScore = 2;
+        if($growthRate > 5) $growthRateScore = 4;
+        if($growthRate > 10) $growthRateScore = 6;
+        if($growthRate > 20) $growthRateScore = 9;
+        
+        //销售收入增长率
+        $saleRate = (0.5 * ($params['saleRevenue2'] / $params['saleRevenue1'] + $params['saleRevenue3'] / $params['saleRevenue2']) - 1) * 100;
+        
+        $saleRateScore = 0;
+        if($saleRate > 0) $saleRateScore = 2;
+        if($saleRate > 10) $saleRateScore = 4;
+        if($saleRate > 20) $saleRateScore = 6;
+        if($saleRate > 30) $saleRateScore = 7;
+        
+        
+		$result = [ 
+			'totalScore'=>8 + 8 + $numberScore + $modeScore + $standardScore + $knowledgeTotalScore +  $numberScore + $modeScore + $standardScore + $techniquesAchieveScore + $manageLevelScore + $growthRateScore + $saleRateScore, //企业评测总得分	
+			'basic'=>[
+				'name'=>$params['name'],
+				'address'=>$params['address'],
+				'estdate'=>$params['estdate'],
+				'busAddress'=>$params['busAddress'],
+				'propertyNumber'=>$params['propertyNumber'],
+				'propertyNumber2'=>$params['propertyNumber2'],
+				'propertyMode'=>$params['propertyMode'],
+				'isStandard'=>$params['isStandard'],
+				'achievementNumber'=>$params['achievementNumber'],
+			],
+			'knowledgeVo'=>[
+				'knowledgeTotalScore'=>$numberScore + $modeScore + $standardScore + 8 + 8, //知识产权
+				'techniquesScore'=>8, //技术的先进程度  
+				'effectScore'=>8, //对主要产品(服务)在技术上发挥核心支持作用(8分)
+				'numberScore'=>$numberScore, //知识产权数量
+				'modeScore'=>$modeScore, //知识产权获得方式
+				'standardScore'=>$standardScore  //企业参与编制国家标准、行业标准、检测方法、技术规范的情况
+			],
+			'techniquesAchieveScore'=>$techniquesAchieveScore, //科技成果转化能力
+			'manageLevelScore'=>$manageLevelScore,  //研究开发组织管理水平
+			'enterpriseGrowthVo'=>[
+				'totalScore'=>$growthRateScore + $saleRateScore, //企业成长性
+				'growthRateScore'=>$growthRateScore, //净资产增长率得分
+				'saleRateScore'=>$saleRateScore, //销售收入增长率得分
+				
+			]
+		];
+	
+        return ['data' => $result];
+    }
+
+	public function actionSubmit()
+    {
+		
+		$data = request()->post();
+		$type = request()->get('type');
+        if(empty($type)) $type = 'industry';
+        
+		$survey = Survey::find()->where(['type' => $type])->all();
+		
+		$captcha = new CaptchaAction(\Yii::$app->controller->id,\Yii::$app->controller);
+       
+        $result = $captcha->validate($data['code'], false);
+        
+        // if(!$result){
+        //     return ['errcode' => CodeEnum::CODE_ERROR, 'errmsg' => '验证码错误'];
+        // }
+        
+      
+		$list = [];
+		foreach ($survey as $key=>$value) {
+		    $filter = json_decode($value['filter'],true);
+			foreach ($filter as $key=>$value1) {
+
+			    if(!empty($value1)){
+			        $str = join('|',(array)$value1);
+		        
+    		        if(strpos($str,$data[$key]) > -1){
+                        $list[] = [
+                            'id'=>$value['id'],
+        					'title'=>$value['title'],
+        					'content'=>$value['content']
+        				];
+        				continue;
+    		        }
+			    }
+			}
+		}
+        
+        //去重复
+		$cengci = [];      
+        foreach ($list as $value) {       
+            if(isset($cengci[$value['id']])){
+                unset($value['id']);
+            }else{
+                $cengci[$value['id']] = $value;
+            }  
+        }
+        $cengci = array_values($cengci);
+   
+        $query = Policy::find()->select('id,title,author,content,created_at');
+        
+        if(!empty($cengci)){
+            foreach ($cengci as $value) {
+		         $query->orWhere(new \yii\db\Expression('FIND_IN_SET("'.$value['title'].'", cengci)'));
+    		}
+        }
+        
+        $list = $query->all(); 
+
+        return ['data'=>$list,'cengci'=>$cengci];
+
+    }
+
+    /**
+     * @api {get} /v1/category/id:\d+ 分类详情
+     * @apiVersion 1.0.0
+     * @apiName view
+     * @apiGroup Category
+     *
+     */
+    public function actionView($id)
+    {
+        $model = Category::find()->where(['id' => $id])->one();
+
+        return ['data' => $model];
+    }
+
+
+}

+ 1 - 0
server/backend/controllers/ArticleController.php

@@ -210,6 +210,7 @@ class ArticleController extends Controller
      */
     public function actionUpdate($id, $module = null)
     {
+      
         $model = Article::find()->where(['id' => $id])->one();
         if ($module) {
             $model->module = $module;

+ 182 - 0
server/backend/controllers/IndustryController.php

@@ -0,0 +1,182 @@
+<?php
+
+namespace backend\controllers;
+
+use common\enums\StatusEnum;
+use common\models\Industry;
+use Yii;
+use yii\data\ActiveDataProvider;
+use yii\helpers\Url;
+use yii\filters\VerbFilter;
+use yii\web\Controller;
+use yii\web\NotFoundHttpException;
+use yii\web\Response;
+
+/**
+ * CaetgoryController implements the CRUD actions for Industry model.
+ */
+class IndustryController extends Controller
+{
+    public function behaviors()
+    {
+        return [
+            'verbs' => [
+                'class' => VerbFilter::className(),
+                'actions' => [
+                    'delete' => ['post'],
+                ],
+            ],
+        ];
+    }
+
+    public function actions()
+    {
+        return [
+            'ajax-update-field' => [
+                'class' => 'common\\actions\\AjaxUpdateFieldAction',
+                'allowFields' => ['status'],
+                'findModel' => [$this, 'findModel']
+            ],
+            'switcher' => [
+                'class' => 'backend\widgets\grid\SwitcherAction'
+            ],
+            'position' => [
+                'class' => 'backend\\actions\\Position',
+                'returnUrl' => Url::current()
+            ]
+        ];
+    }
+    /**
+     * Lists all Industry models.
+     *
+     * @return mixed
+     */
+    public function actionIndex()
+    {
+        $dataProvider = new ActiveDataProvider(['query' => Industry::find()->active()->orderBy('sort asc'),  'pagination' => false]);
+        return $this->render('index', [
+            'dataProvider' => $dataProvider,
+            'pagination' => false
+        ]);
+    }
+    /**
+     * Displays a single Industry model.
+     *
+     * @param int $id
+     *
+     * @return mixed
+     */
+    public function actionView($id)
+    {
+        return $this->render('view', [
+            'model' => $this->findModel($id),
+        ]);
+    }
+
+    /**
+     * Creates a new Industry model.
+     * If creation is successful, the browser will be redirected to the 'view' page.
+     * @param integer $id
+     * @return mixed
+     */
+    public function actionCreate($id = 0)
+    {
+        $model = new Industry();
+        $model->loadDefaultValues();
+        $model->pid = $id;
+        if ($model->load(Yii::$app->request->post()) && $model->save()) {
+            return $this->redirect(['index']);
+        } else {
+
+            //二级分类id列表
+            $childCateList = Industry::find()->where(['type' => 0])->andWhere(['!=', 'pid', 0])->select('id')->column();
+
+            return $this->render('create', [
+                'model' => $model,
+                'childCateList' => $childCateList,
+            ]);
+        }
+    }
+
+    /**
+     * Updates an existing Industry model.
+     * If update is successful, the browser will be redirected to the 'view' page.
+     *
+     * @param int $id
+     *
+     * @return mixed
+     */
+    public function actionUpdate($id)
+    {
+        $model = $this->findModel($id);
+
+        if ($model->load(Yii::$app->request->post()) && $model->save()) {
+            return $this->redirect(['index']);
+        } else {
+            //二级分类id列表
+            $childCateList = Industry::find()->where(['type' => 0])->andWhere(['!=', 'pid', 0])->select('id')->column();
+            return $this->render('update', [
+                'model' => $model,
+                'childCateList' => $childCateList,
+            ]);
+        }
+    }
+
+    /**
+     * Deletes an existing Industry model.
+     * If deletion is successful, the browser will be redirected to the 'index' page.
+     *
+     * @param int $id
+     *
+     * @return mixed
+     */
+    public function actionDelete($id)
+    {
+        $this->findModel($id)->softDelete();
+        Yii::$app->cache->flush();
+        Yii::$app->session->setFlash('success', '操作成功');
+
+        return $this->redirect(['index']);
+    }
+
+    /**
+     * Finds the Industry model based on its primary key value.
+     * If the model is not found, a 404 HTTP exception will be thrown.
+     *
+     * @param int $id
+     *
+     * @return Industry the loaded model
+     *
+     * @throws NotFoundHttpException if the model cannot be found
+     */
+    public function findModel($id)
+    {
+        if (($model = Industry::findOne($id)) !== null) {
+            return $model;
+        } else {
+            throw new NotFoundHttpException('The requested page does not exist.');
+        }
+    }
+
+    /**
+     * 产业链列表
+     * @param $id
+     * @return array
+     * @author jiang
+     */
+    public function actionChain($id = null)
+    {
+        $where = [];
+        if (!empty($id)) {
+            //二级分类
+            $ids = Industry::find()->where(['pid' => $id, 'type' => 0])->select('id')->column();
+            $ids[] = $id;
+            $where = ['in', 'pid', $ids];
+        }
+
+        $list = Industry::find()->where(['type' => 1])->active()->andWhere($where)->orderBy('sort asc')->select('title')->column();
+        Yii::$app->response->format = Response::FORMAT_JSON;
+
+        return ['data' => $list];
+    }
+}

+ 184 - 0
server/backend/controllers/PolicyController.php

@@ -0,0 +1,184 @@
+<?php
+
+namespace backend\controllers;
+
+use common\models\Policy;
+use Yii;
+use yii\data\ActiveDataProvider;
+use yii\filters\VerbFilter;
+use yii\web\Controller;
+use yii\web\NotFoundHttpException;
+use common\modules\config\models\Config;
+
+/**
+ * PolicyController implements the CRUD actions for Survey model.
+ */
+class PolicyController extends Controller
+{
+    public function behaviors()
+    {
+        return [
+            'verbs' => [
+                'class' => VerbFilter::className(),
+                'actions' => [
+                    'delete' => ['post'],
+                ],
+            ],
+        ];
+    }
+    /**
+     * Lists all Policy models.
+     *
+     * @return mixed
+     */
+    public function actionIndex()
+    {
+        $dataProvider = new ActiveDataProvider([
+            'query' => Policy::find(),
+        ]);
+
+        return $this->render('index', [
+            'dataProvider' => $dataProvider,
+        ]);
+    }
+
+    /**
+     * Displays a single Policy model.
+     *
+     * @param int $id
+     *
+     * @return mixed
+     */
+    public function actionView($id)
+    {
+        return $this->render('view', [
+            'model' => $this->findModel($id),
+        ]);
+    }
+
+    /**
+     * Creates a new Survey model.
+     * If creation is successful, the browser will be redirected to the 'view' Survey.
+     *
+     * @return mixed
+     */
+    public function actionCreate()
+    {
+        $model = new Policy();
+        $editor = request('editor') ? : config('page_editor_type');
+        $model->markdown = $editor == 'markdown' ? 1 : 0;
+
+		$configModels = Config::find()->select(['name','value','extra','description','type'])->where(['group' => 'policy'])->all();
+		
+		if (Yii::$app->request->isPost) {
+			$data = Yii::$app->request->post();
+		
+			$arr = [];
+			foreach ($data as $key=>$value) {
+				if($key == '_csrfBackend' || $key == 'Policy' || $key == 'cengci'){
+					continue;
+				}
+				if($value) $arr[] = $key.'_' . $value;
+			}
+
+			$data['Policy']['filter'] = join(',',$arr);
+			$data['Policy']['cengci'] = join(',',$data['cengci']);
+
+			$model->load($data);
+			$model->save();
+			return $this->redirect(['index']);
+		}
+    
+		return $this->render('create', [
+			'model' => $model,
+			'configModels' => $configModels,
+		]);
+
+    }
+
+    /**
+     * Updates an existing Survey model.
+     * If update is successful, the browser will be redirected to the 'view' Survey.
+     *
+     * @param int $id
+     *
+     * @return mixed
+     */
+    public function actionUpdate($id)
+    {
+        $model = $this->findModel($id);
+        
+		$configModels = Config::find()->select(['name','value','extra','description','type'])->where(['group' => 'policy'])->all();
+		
+		if (Yii::$app->request->isPost) {
+			$data = Yii::$app->request->post();
+
+			$arr = [];
+			foreach ($data as $key=>$value) {
+				if($key == '_csrfBackend' || $key == 'Policy' || $key == 'cengci'){
+					continue;
+				}
+				
+				if($value) $arr[] = $key.'_' . $value;
+			}
+		
+			$data['Policy']['filter'] = join(',',$arr);
+			$data['Policy']['cengci'] = join(',',$data['cengci']);
+//
+			$model->load($data);
+			$model->save();
+			return $this->redirect(['index']);
+		}
+		
+		$filterArr = [];
+		$filter = explode(',',$model->filter);
+		if(!empty($filter)){
+		    foreach ($filter as $key=>$value) {
+    		    $arr = explode('_',$value);
+    		    $filterArr[$arr[0]] = $arr[1];
+    		}
+		}
+	
+	    $model->cengci = explode(',',$model->cengci);
+	    
+		$model->filter = $filterArr;
+		return $this->render('update', [
+			'model' => $model,
+			'configModels' => $configModels,
+		]);
+    }
+
+    /**
+     * Deletes an existing Survey model.
+     * If deletion is successful, the browser will be redirected to the 'index' Survey.
+     *
+     * @param int $id
+     *
+     * @return mixed
+     */
+    public function actionDelete($id)
+    {
+        $this->findModel($id)->delete();
+
+        return $this->redirect(['index']);
+    }
+
+    /**
+     * Finds the Survey model based on its primary key value.
+     * If the model is not found, a 404 HTTP exception will be thrown.
+     *
+     * @param int $id
+     *
+     * @return Survey the loaded model
+     *
+     * @throws NotFoundHttpException if the model cannot be found
+     */
+    protected function findModel($id)
+    {
+        if (($model = Policy::findOne($id)) !== null) {
+            return $model;
+        } else {
+            throw new NotFoundHttpException('The requested page does not exist.');
+        }
+    }
+}

+ 211 - 0
server/backend/controllers/SurveyController.php

@@ -0,0 +1,211 @@
+<?php
+
+namespace backend\controllers;
+
+use common\models\Survey;
+use Yii;
+use yii\data\ActiveDataProvider;
+use yii\filters\VerbFilter;
+use yii\web\Controller;
+use yii\web\NotFoundHttpException;
+use common\modules\config\models\Config;
+
+/**
+ * SurveyController implements the CRUD actions for Survey model.
+ */
+class SurveyController extends Controller
+{
+    public function behaviors()
+    {
+        return [
+            'verbs' => [
+                'class' => VerbFilter::className(),
+                'actions' => [
+                    'delete' => ['post'],
+                ],
+            ],
+        ];
+    }
+    /**
+     * Lists all Survey models.
+     *
+     * @return mixed
+     */
+    public function actionIndex()
+    {
+        $dataProvider = new ActiveDataProvider([
+            'query' => Survey::find(),
+        ]);
+
+        return $this->render('index', [
+            'dataProvider' => $dataProvider,
+        ]);
+    }
+
+    /**
+     * Displays a single Survey model.
+     *
+     * @param int $id
+     *
+     * @return mixed
+     */
+    public function actionView($id)
+    {
+        return $this->render('view', [
+            'model' => $this->findModel($id),
+        ]);
+    }
+    
+    
+
+    /**
+     * Creates a new Survey model.
+     * If creation is successful, the browser will be redirected to the 'view' Survey.
+     *
+     * @return mixed
+     */
+    public function actionCreate()
+    {
+        $model = new Survey();
+        $editor = request('editor') ? : config('page_editor_type');
+        $model->markdown = $editor == 'markdown' ? 1 : 0;
+        $type = Yii::$app->request->get('type','industry');
+        $type = empty($type) ? 'industry' : $type;
+        $model->type = $type;
+        
+        $typeDesc = '';
+        switch ($type) {
+            case 'industry':
+                $typeDesc = '现代产业';
+                break;
+            case 'education':
+                $typeDesc = '高等教育';
+                break;
+            case 'medical':
+                $typeDesc = '医疗卫生';
+                break;
+            case 'circuit':
+                $typeDesc = '集成电路';
+                break;
+        }
+      
+		$configModels = Config::find()->select(['name','value','extra','description','type'])->where(['group' => $type])->all();
+		
+		if (Yii::$app->request->isPost) {
+			$data = Yii::$app->request->post();
+			
+			$arr = [];
+			foreach ($data as $key=>$value) {
+				if($key == '_csrfBackend' || $key == 'Survey'){
+					continue;
+				}
+				$arr[$key] = $value;
+			}
+
+			$data['Survey']['filter'] = json_encode($arr,JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
+            $data['Survey']['type'] = $type;
+            
+			$model->load($data);
+			$model->save();
+			return $this->redirect(['index']);
+		}
+    
+		return $this->render('create', [
+			'model' => $model,
+			'type'=>$typeDesc,
+			'configModels' => $configModels,
+		]);
+
+    }
+
+    /**
+     * Updates an existing Survey model.
+     * If update is successful, the browser will be redirected to the 'view' Survey.
+     *
+     * @param int $id
+     *
+     * @return mixed
+     */
+    public function actionUpdate($id)
+    {
+        $model = $this->findModel($id);
+
+        $typeDesc = '';
+        switch ($model['type']) {
+            case 'industry':
+                $typeDesc = '现代产业';
+                break;
+            case 'education':
+                $typeDesc = '高等教育';
+                break;
+            case 'medical':
+                $typeDesc = '医疗卫生';
+                break;
+            case 'circuit':
+                $typeDesc = '集成电路';
+                break;
+        }
+        
+		$configModels = Config::find()->select(['name','value','extra','description','type'])->where(['group' => $model['type']])->all();
+		
+		if (Yii::$app->request->isPost) {
+			$data = Yii::$app->request->post();
+			
+			$arr = [];
+			foreach ($data as $key=>$value) {
+				if($key == '_csrfBackend' || $key == 'Survey'){
+					continue;
+				}
+				$arr[$key] = $value;
+			}
+
+			$data['Survey']['filter'] = json_encode($arr,JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
+          
+			$model->load($data);
+			$model->save();
+			return $this->redirect(['index']);
+		}
+		
+		$model->filter = json_decode($model->filter,true);
+		return $this->render('update', [
+			'model' => $model,
+			'type'=>$typeDesc,
+			'configModels' => $configModels,
+		]);
+    }
+
+    /**
+     * Deletes an existing Survey model.
+     * If deletion is successful, the browser will be redirected to the 'index' Survey.
+     *
+     * @param int $id
+     *
+     * @return mixed
+     */
+    public function actionDelete($id)
+    {
+        $this->findModel($id)->delete();
+
+        return $this->redirect(['index']);
+    }
+
+    /**
+     * Finds the Survey model based on its primary key value.
+     * If the model is not found, a 404 HTTP exception will be thrown.
+     *
+     * @param int $id
+     *
+     * @return Survey the loaded model
+     *
+     * @throws NotFoundHttpException if the model cannot be found
+     */
+    protected function findModel($id)
+    {
+        if (($model = Survey::findOne($id)) !== null) {
+            
+            return $model;
+        } else {
+            throw new NotFoundHttpException('The requested page does not exist.');
+        }
+    }
+}

+ 71 - 0
server/backend/models/search/SurveySearch.php

@@ -0,0 +1,71 @@
+<?php
+
+namespace backend\models\search;
+
+use common\models\Survey;
+use yii\base\Model;
+use yii\data\ActiveDataProvider;
+
+/**
+ * SurveySearch represents the model behind the search form about `common\models\Survey`.
+ */
+class SurveySearch extends Survey
+{
+    /**
+     * {@inheritdoc}
+     */
+    public function rules()
+    {
+        return [
+            [['id', 'category_id', 'created_at', 'updated_at', 'status'], 'integer'],
+            [['title', 'category', 'cover', 'module'], 'string'],
+        ];
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function scenarios()
+    {
+        // bypass scenarios() implementation in the parent class
+        return Model::scenarios();
+    }
+
+    /**
+     * Creates data provider instance with search query applied.
+     *
+     * @param array $params
+     *
+     * @return ActiveDataProvider
+     */
+    public function search($params)
+    {
+        $query = Survey::find();
+
+        $dataProvider = new ActiveDataProvider([
+            'query' => $query,
+            'sort' => [
+                'defaultOrder' => [
+                    'id' => SORT_ASC
+                ]
+            ]
+        ]);
+
+        $this->load($params);
+
+        if (!$this->validate()) {
+            // uncomment the following line if you do not want to return any records when validation fails
+            // $query->where('0=1');
+            return $dataProvider;
+        }
+        $query->andFilterWhere([
+            'id' => $this->id,
+            'status' => $this->status,
+            'module' => $this->module,
+        ]);
+
+        $query->andFilterWhere(['like', 'title', $this->title]);
+
+        return $dataProvider;
+    }
+}

+ 83 - 0
server/backend/views/industry/_form.php

@@ -0,0 +1,83 @@
+<?php
+
+use backend\widgets\ActiveForm;
+use backend\widgets\meta\MetaForm;
+use common\helpers\Tree;
+use yii\helpers\Html;
+use common\models\Category;
+
+/* @var $this yii\web\View */
+/* @var $model common\models\Category */
+/* @var $childCateList [] */
+/* @var $form backend\widgets\ActiveForm */
+
+$cssString = "
+ select[readonly] {
+        cursor: no-drop;
+    }
+    select[readonly] option {
+        display: none;
+    }
+";
+$this->registerCss($cssString);
+
+?>
+
+<div class="box box-primary">
+    <div class="box-body">
+        <?php $form = ActiveForm::begin(); ?>
+
+        <!--        --><? //= $form->field($model, 'pid')->dropDownList(Category::getDropDownList(Category::lists()), ['prompt' => '请选择']) ?>
+        <?= $form->field($model, 'pid')->dropDownList(Category::getDropDownList(Tree::build(Category::listsByType(0))), ['prompt' => '请选择']) ?>
+
+        <?= $form->field($model, 'type')->dropDownList(Category::getTypeEnum(), ['readonly' => true]) ?>
+
+        <?= $form->field($model, 'title')->textInput(['maxlength' => true]) ?>
+
+        <!--        --><? //= $form->field($model, 'slug')->textInput(['maxlength' => true]) ?>
+
+        <?= $form->field($model, 'sort')->textInput() ?>
+
+        <?= $form->field($model, 'description')->textarea(['maxlength' => true]) ?>
+
+        <!--        --><? //= $form->field($model, 'module')->checkboxList(\common\models\ArticleModule::getTypeEnum()) ?>
+
+
+        <!--        --><? //= $form->boxField($model, 'meta',["collapsed"=>true])->widget(MetaForm::className())->header("SEO"); ?>
+
+        <div class="form-group">
+            <?= Html::submitButton($model->isNewRecord ? '创建' : '更新', ['class' => $model->isNewRecord ? 'btn btn-success  btn-block' : 'btn btn-primary  btn-block']) ?>
+        </div>
+
+        <?php ActiveForm::end(); ?>
+    </div>
+</div>
+
+
+<?php
+$childCateList = \yii\helpers\Json::htmlEncode($childCateList);
+$js = <<<JS
+
+    function pidToggle() {
+        let pid = $('#category-pid').val();
+      if ($childCateList.indexOf(pid) != -1) {
+          //产业链
+            $('#category-type').val(1);
+        } else {
+            $('#category-type').val(0);
+        }
+    }
+    
+    $('#category-pid').change(function(e) {
+        pidToggle();
+    });
+       
+    //初始化调用
+    pidToggle();
+    
+    
+JS;
+$this->registerJs($js);
+?>
+
+

+ 18 - 0
server/backend/views/industry/create.php

@@ -0,0 +1,18 @@
+<?php
+
+/* @var $this yii\web\View */
+/* @var $model common\models\Category */
+/* @var $childCateList [] */
+
+$this->title = '添加分类';
+$this->params['breadcrumbs'][] = ['label' => '分类', 'url' => ['index']];
+$this->params['breadcrumbs'][] = $this->title;
+?>
+<div class="category-create">
+
+    <?= $this->render('_form', [
+        'model' => $model,
+        'childCateList' => $childCateList,
+    ]) ?>
+
+</div>

+ 73 - 0
server/backend/views/industry/index.php

@@ -0,0 +1,73 @@
+<?php
+
+use yii\grid\GridView;
+use yii\helpers\Html;
+
+/* @var $this yii\web\View */
+/* @var $dataProvider yii\data\ActiveDataProvider */
+
+$this->title = '行业分类';
+$this->params['breadcrumbs'][] = $this->title;
+?>
+<?php $this->beginBlock('content-header') ?>
+<?= $this->title . ' ' . Html::a('新建分类', ['create'], ['class' => 'btn btn-primary ']) ?>
+<?php $this->endBlock() ?>
+
+<div class="box box-primary">
+    <div class="box-body">
+        <?= \backend\widgets\grid\TreeGrid::widget([
+            'dataProvider' => $dataProvider,
+            'keyColumnName' => 'id',
+            'parentColumnName' => 'pid',
+            'parentRootValue' => 0, //first parentId value
+            'pluginOptions' => [
+                'initialState' => 'expanded',
+            ],
+            'columns' => [
+
+                'title',
+                'id',
+                [
+                    'attribute' => 'type',
+                    'value' => function ($model) {
+                        return $model->getTypeEnum()[$model->type];
+                    }
+                ],
+//                'slug',
+//                'article',
+                [
+                    'attribute' => 'module',
+                    'value' => function ($model) {
+                        return $model->renderModule();
+                    }
+                ],
+                [
+                    'class' => 'backend\widgets\grid\PositionColumn',
+                    'attribute' => 'sort'
+                ],
+                [
+                    'class' => 'backend\widgets\grid\SwitcherColumn',
+                    'attribute' => 'status'
+                ],
+
+                [
+                    'class' => 'yii\grid\ActionColumn',
+                    'template' => '{create} {view} {update} {delete}',
+                    'buttons' => [
+                        'create' => function ($url, $model, $key) {
+                            //一级分类添加子分类
+                            if ($model->type == 0 and $model->pid == 0) {
+                                return Html::a('<i class="fa fa-plus"></i>', ['create', 'id' => $model->id], ['class' => 'btn btn-xs btn-default', 'data-toggle' => 'tooltip', 'title' => '添加子分类']);
+                            }
+                            //二级分类添加产业链
+                            if ($model->type == 0 and $model->pid != 0) {
+                                return Html::a('<i class="fa fa-plus"></i>', ['create', 'id' => $model->id], ['class' => 'btn btn-xs btn-default', 'data-toggle' => 'tooltip', 'title' => '添加产业链']);
+                            }
+
+                        }
+                    ]
+                ],
+            ],
+        ]); ?>
+    </div>
+</div>

+ 19 - 0
server/backend/views/industry/update.php

@@ -0,0 +1,19 @@
+<?php
+
+/* @var $this yii\web\View */
+/* @var $model common\models\Category */
+/* @var $childCateList [] */
+
+$this->title = '更新分类11: '.' '.$model->title;
+$this->params['breadcrumbs'][] = ['label' => '分类', 'url' => ['index']];
+$this->params['breadcrumbs'][] = ['label' => $model->title, 'url' => ['view', 'id' => $model->id]];
+$this->params['breadcrumbs'][] = '更新';
+?>
+<div class="category-update">
+
+    <?= $this->render('_form', [
+        'model' => $model,
+        'childCateList' => $childCateList,
+    ]) ?>
+
+</div>

+ 39 - 0
server/backend/views/industry/view.php

@@ -0,0 +1,39 @@
+<?php
+
+use yii\helpers\Html;
+use yii\widgets\DetailView;
+
+/* @var $this yii\web\View */
+/* @var $model common\models\Category */
+
+$this->title = $model->title;
+$this->params['breadcrumbs'][] = ['label' => '分类', 'url' => ['index']];
+$this->params['breadcrumbs'][] = $this->title;
+?>
+<div class="category-view">
+
+    <p>
+        <?= Html::a('Update', ['update', 'id' => $model->id], ['class' => 'btn btn-primary ']) ?>
+        <?= Html::a('Delete', ['delete', 'id' => $model->id], [
+            'class' => 'btn btn-danger ',
+            'data' => [
+                'confirm' => 'Are you sure you want to delete this item?',
+                'method' => 'post',
+            ],
+        ]) ?>
+    </p>
+
+    <?= DetailView::widget([
+        'model' => $model,
+        'attributes' => [
+            'id',
+            'title',
+            'pid',
+            'created_at:datetime',
+            'updated_at:datetime',
+            'slug',
+            'sort'
+        ],
+    ]) ?>
+
+</div>

+ 72 - 0
server/backend/views/policy/_form.php

@@ -0,0 +1,72 @@
+<?php
+
+use yii\helpers\Html;
+use yii\widgets\ActiveForm;
+
+/* @var $this yii\web\View */
+/* @var $model common\models\Page */
+/* @var $form yii\widgets\ActiveForm */
+?>
+
+<div class="box box-success">
+    <div class="box-body">
+        <?php $form = ActiveForm::begin(['enableClientValidation'=>false]); ?>
+
+        <?= $form->field($model, 'title')->textInput(['maxlength' => true]) ?>
+        <?= $form->field($model, 'author')->textInput(['maxlength' => true]) ?>
+		<?php
+
+        foreach ($configModels as $index => $configModel) {
+	
+			$value = explode("\r\n",$configModel['extra']);
+            $value1 = explode("\r\n",$configModel['value']);
+            
+            if($configModel['name'] == 'cengci'){
+                $arr = [];
+    			foreach($value as &$val){
+    				$val = trim($val);
+    				$arr[$val] = $val;
+    			}
+    
+                echo $form->field($model, 'id')->checkboxList($arr,[
+    				'name'=>'cengci',
+    				'value'=>$model->cengci
+    			])->label($configModel['description']);
+            }else{
+                $arr = [];
+    			foreach($value as $key=>&$val){
+    				$k = trim($value1[$key]);
+    				$arr[$k] = trim($val);
+    			}
+ 
+                echo $form->field($model, 'id')->radioList($arr,[
+    				'name'=>$configModel['name'],
+    				'value'=>$model->filter[$configModel['name']]
+    			])->label($configModel['description']);
+            }
+      
+			
+        }
+    
+        ?>
+
+        <?= $form->field($model, 'content')->widget(\common\widgets\EditorWidget::className(), $model->isNewRecord ? ['type' => request('editor') ?: config('page_editor_type')] : ['isMarkdown' => $model->markdown]) ?>
+
+        <div class="form-group form-submit">
+            <?= Html::submitButton($model->isNewRecord ? '创建' : '更新', ['class' => 'btn btn-flat bg-maroon btn-block']) ?>
+        </div>
+
+
+        <?php ActiveForm::end(); ?>
+    </div>
+</div>
+<?php $this->beginBlock('js') ?>
+<script>
+    $(document).on('change', '#choose-editor', function () {
+        var url = '<?= \yii\helpers\Url::to(['create']) ?>';
+        var type = $(this).val();
+        url = url.addQueryParams({editor: type});
+        location.href = url;
+    })
+</script>
+<?php $this->endBlock() ?>

+ 17 - 0
server/backend/views/policy/create.php

@@ -0,0 +1,17 @@
+<?php
+
+/* @var $this yii\web\View */
+/* @var $model common\models\Page */
+
+$this->title = '新增政策';
+$this->params['breadcrumbs'][] = ['label' => '政策管理', 'url' => ['index']];
+$this->params['breadcrumbs'][] = $this->title;
+?>
+<div class="page-create">
+
+    <?= $this->render('_form', [
+        'model' => $model,
+		'configModels' => $configModels,
+    ]) ?>
+
+</div>

+ 28 - 0
server/backend/views/policy/index.php

@@ -0,0 +1,28 @@
+<?php
+
+use yii\grid\GridView;
+use yii\helpers\Html;
+
+/* @var $this yii\web\View */
+/* @var $dataProvider yii\data\ActiveDataProvider */
+
+$this->title = '政策列表';
+$this->params['breadcrumbs'][] = $this->title;
+?>
+<?php $this->beginBlock('content-header'); ?>
+<?= $this->title . ' ' . Html::a(Yii::t('common', '新增政策'), ['create'], ['class' => 'btn btn-success']) ?>
+<?php $this->endBlock(); ?>
+<div class="box box-success">
+    <div class="box-body">
+    <?= GridView::widget([
+        'dataProvider' => $dataProvider,
+        'columns' => [
+            'id',
+            'title',
+            'author',
+            'created_at:datetime',
+            ['class' => 'common\helpers\DiyActionColumn'],
+        ],
+    ]); ?>
+    </div>
+</div>

+ 18 - 0
server/backend/views/policy/update.php

@@ -0,0 +1,18 @@
+<?php
+
+/* @var $this yii\web\View */
+/* @var $model common\models\Page */
+
+$this->title = '编辑政策: '.' '.$model->title;
+$this->params['breadcrumbs'][] = ['label' => '政策列表', 'url' => ['index']];
+$this->params['breadcrumbs'][] = ['label' => $model->title, 'url' => ['view', 'id' => $model->id]];
+$this->params['breadcrumbs'][] = 'Update';
+?>
+<div class="page-update">
+
+    <?= $this->render('_form', [
+        'model' => $model,
+		'configModels' => $configModels,
+    ]) ?>
+
+</div>

+ 25 - 0
server/backend/views/policy/view.php

@@ -0,0 +1,25 @@
+<?php
+
+use yii\widgets\DetailView;
+
+/* @var $this yii\web\View */
+/* @var $model common\models\Page */
+
+$this->title = $model->title;
+$this->params['breadcrumbs'][] = ['label' => '页面管理', 'url' => ['index']];
+$this->params['breadcrumbs'][] = $this->title;
+?>
+<div class="page-view">
+
+    <?= DetailView::widget([
+        'model' => $model,
+        'attributes' => [
+            'id',
+            'use_layout',
+            'content:ntext',
+            'title',
+            'slug'
+        ],
+    ]) ?>
+
+</div>

+ 56 - 0
server/backend/views/survey/_form.php

@@ -0,0 +1,56 @@
+<?php
+
+use yii\helpers\Html;
+use yii\widgets\ActiveForm;
+
+/* @var $this yii\web\View */
+/* @var $model common\models\Page */
+/* @var $form yii\widgets\ActiveForm */
+?>
+
+<div class="box box-success">
+    <div class="box-body">
+        <?php $form = ActiveForm::begin(['enableClientValidation'=>false]); ?>
+
+        <?= $form->field($model, 'title')->textInput(['maxlength' => true]) ?>
+        <?= $form->field($model, 'type',['options'=>['class'=>'hide']])->textInput(['maxlength' => true]) ?>
+		<?php
+	
+        foreach ($configModels as $index => $configModel) {
+
+			$value = explode("\r\n",$configModel['extra']);
+
+			$arr = [];
+			foreach($value as &$val){
+				$val = trim($val);
+				$arr[$val] = $val;
+			}
+
+            echo $form->field($model, 'id')->checkboxList($arr,[
+				'name'=>$configModel['name'],
+				'value'=>$model->filter[$configModel['name']]
+			])->label($configModel['description']);
+        }
+    
+        ?>
+
+        <?= $form->field($model, 'content')->widget(\common\widgets\EditorWidget::className(), $model->isNewRecord ? ['type' => request('editor') ?: config('page_editor_type')] : ['isMarkdown' => $model->markdown]) ?>
+
+        <div class="form-group form-submit">
+            <?= Html::submitButton($model->isNewRecord ? '创建' : '更新', ['class' => 'btn btn-flat bg-maroon btn-block']) ?>
+        </div>
+
+
+        <?php ActiveForm::end(); ?>
+    </div>
+</div>
+<?php $this->beginBlock('js') ?>
+<script>
+    $(document).on('change', '#choose-editor', function () {
+        var url = '<?= \yii\helpers\Url::to(['create']) ?>';
+        var type = $(this).val();
+        url = url.addQueryParams({editor: type});
+        location.href = url;
+    })
+</script>
+<?php $this->endBlock() ?>

+ 18 - 0
server/backend/views/survey/create.php

@@ -0,0 +1,18 @@
+<?php
+
+/* @var $this yii\web\View */
+/* @var $model common\models\Page */
+
+$this->title = '新增 - ' . $type;
+$this->params['breadcrumbs'][] = ['label' => '人才计算器', 'url' => ['index']];
+$this->params['breadcrumbs'][] = $this->title;
+?>
+<div class="page-create">
+
+    <?= $this->render('_form', [
+        'model' => $model,
+        'type' => $type,
+		'configModels' => $configModels,
+    ]) ?>
+
+</div>

+ 39 - 0
server/backend/views/survey/index.php

@@ -0,0 +1,39 @@
+<?php
+
+use yii\grid\GridView;
+use yii\helpers\Html;
+
+/* @var $this yii\web\View */
+/* @var $dataProvider yii\data\ActiveDataProvider */
+
+$this->title = '人才计算器';
+$this->params['breadcrumbs'][] = $this->title;
+?>
+<?php $this->beginBlock('content-header'); ?>
+<?= $this->title . ' ' . Html::a(Yii::t('common', '现代产业'), ['create?type=industry'], ['class' => 'btn btn-success']) ?>
+<?= Html::a(Yii::t('common', '高等教育'), ['create?type=education'], ['class' => 'btn btn-success','style'=>'margin-left:10px']) ?>
+<?= Html::a(Yii::t('common', '医疗卫生'), ['create?type=medical'], ['class' => 'btn btn-success','style'=>'margin-left:10px']) ?>
+<?= Html::a(Yii::t('common', '集成电路'), ['create?type=circuit'], ['class' => 'btn btn-success','style'=>'margin-left:10px']) ?>
+<?php $this->endBlock(); ?>
+<div class="box box-success">
+    <div class="box-body">
+    <?= GridView::widget([
+        'dataProvider' => $dataProvider,
+        'columns' => [
+
+            'id',
+//            [
+//                'attribute' => 'use_layout',
+//                'value' => function ($model) {
+//                    $arr = ['不使用', '使用'];
+//                    return $arr[$model->use_layout];
+//                },
+//            ],
+            'title',
+            'slug',
+
+            ['class' => 'common\helpers\DiyActionColumn'],
+        ],
+    ]); ?>
+    </div>
+</div>

+ 18 - 0
server/backend/views/survey/update.php

@@ -0,0 +1,18 @@
+<?php
+
+/* @var $this yii\web\View */
+/* @var $model common\models\Page */
+
+$this->title = $type.' - '.$model->title;
+$this->params['breadcrumbs'][] = ['label' => '人才计算器', 'url' => ['index']];
+$this->params['breadcrumbs'][] = ['label' => $model->title, 'url' => ['view', 'id' => $model->id]];
+$this->params['breadcrumbs'][] = 'Update';
+?>
+<div class="page-update">
+
+    <?= $this->render('_form', [
+        'model' => $model,
+		'configModels' => $configModels,
+    ]) ?>
+
+</div>

+ 25 - 0
server/backend/views/survey/view.php

@@ -0,0 +1,25 @@
+<?php
+
+use yii\widgets\DetailView;
+
+/* @var $this yii\web\View */
+/* @var $model common\models\Page */
+
+$this->title = $model->title;
+$this->params['breadcrumbs'][] = ['label' => '页面管理', 'url' => ['index']];
+$this->params['breadcrumbs'][] = $this->title;
+?>
+<div class="page-view">
+
+    <?= DetailView::widget([
+        'model' => $model,
+        'attributes' => [
+            'id',
+            'use_layout',
+            'content:ntext',
+            'title',
+            'slug'
+        ],
+    ]) ?>
+
+</div>

+ 270 - 0
server/common/models/Industry.php

@@ -0,0 +1,270 @@
+<?php
+
+namespace common\models;
+
+use common\behaviors\PositionBehavior;
+use common\behaviors\CacheInvalidateBehavior;
+use common\behaviors\MetaBehavior;
+use common\behaviors\SoftDeleteBehavior;
+use common\enums\StatusEnum;
+use common\helpers\Tree;
+use common\models\behaviors\CategoryBehavior;
+use common\models\query\CategoryQuery;
+use Yii;
+use yii\behaviors\TimestampBehavior;
+use yii\caching\TagDependency;
+use yii\db\Expression;
+
+/**
+ * This is the model class for table "{{%category}}".
+ *
+ * @property int $id
+ * @property int $pid
+ * @property string $title
+ * @property string $slug
+ * @property string $description
+ * @property integer $status
+ * @property int $created_at
+ * @property int $updated_at
+ * @property string $module
+ * @property string $cover
+ * @property int $allow_publish
+ * @property int $type
+ * @property int $is_del
+ */
+class Industry extends \yii\db\ActiveRecord
+{
+    /**
+     * {@inheritdoc}
+     */
+    public static function tableName()
+    {
+        return '{{%industry}}';
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function rules()
+    {
+        return [
+            [['title'], 'required'],
+            //中文没法自动生成slug,又没必要必填
+            [
+                'slug', 'default', 'value' => function ($model) {
+                return $model->title;
+            }
+            ],
+            ['module', 'safe'],
+            [['pid', 'sort', 'allow_publish', 'type', 'status'], 'integer'],
+            ['pid', 'default', 'value' => 0],
+            [['sort', 'is_del'], 'default', 'value' => 0],
+            ['status', 'default', 'value' => StatusEnum::STATUS_ON],
+        ];
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function attributeLabels()
+    {
+        return [
+            'id' => 'ID',
+            'title' => '名称',
+            'slug' => '标识',
+            'pid' => '上级分类',
+            'ptitle' => '上级分类', // 非表字段,方便后台显示
+            'description' => '分类介绍',
+            'article' => '文章数', //冗余字段,方便查询
+            'sort' => '排序',
+            'module' => '支持的人才模型',
+            'allow_publish' => '是否允许发布内容',
+            'type' => '类型',
+            'created_at' => '创建时间',
+            'updated_at' => '更新时间',
+            'status' => Yii::t('common', '状态'),
+        ];
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function behaviors()
+    {
+        return [
+            [
+                'class' => SoftDeleteBehavior::className(),
+                'softDeleteAttributeValues' => [
+                    'updated_at' => time(),
+                    'is_del' => StatusEnum::STATUS_ON,
+                    'status' => StatusEnum::STATUS_OFF,
+                ],
+                'invokeDeleteEvents' => false // 不触发删除相关事件
+            ],
+            TimestampBehavior::className(),
+            [
+                'class' => MetaBehavior::className(),
+            ],
+            CategoryBehavior::className(),
+            'positionBehavior' => [
+                'class' => PositionBehavior::className(),
+                'positionAttribute' => 'sort',
+                'groupAttributes' => [
+                    'pid'
+                ],
+            ],
+            [
+                'class' => CacheInvalidateBehavior::className(),
+                'tags' => [
+                    'categoryList'
+                ]
+
+            ]
+        ];
+    }
+
+    public function getMetaData()
+    {
+        $model = $this->getMetaModel();
+
+        $title = $model->title ?: $this->title;
+        $keywords = $model->keywords;
+        $description = $model->description ?: $this->description;
+
+        return [$title, $keywords, $description];
+    }
+
+    /**
+     * 获取分类名
+     */
+    public function getPtitle()
+    {
+        return static::find()->select('title')->where(['id' => $this->pid])->scalar();
+    }
+
+    public static function lists($module = null)
+    {
+        $list = Yii::$app->cache->get(['categoryList', $module]);
+        if ($list === false) {
+            $query = static::find()->active();
+            if ($module) {
+                $query->andWhere(new Expression("FIND_IN_SET('{$module}', module) "));
+            }
+            $list = $query->asArray()->all();
+            Yii::$app->cache->set(['categoryList', $module], $list, 0, new TagDependency(['tags' => ['categoryList']]));
+        }
+        return $list;
+    }
+
+    public static function listsByType($type = null)
+    {
+        $list = Yii::$app->cache->get(['categoryListByType', $type]);
+        if ($list === false) {
+            $query = static::find()->active();
+            if (isset($type)) {
+                $query->andWhere(['type' => $type]);
+            }
+            $list = $query->asArray()->all();
+            Yii::$app->cache->set(['categoryListByType', $type], $list, 0, new TagDependency(['tags' => ['categoryListByType']]));
+        }
+        return $list;
+    }
+    public static function getDropDownList($tree = [], &$result = [], $deep = 0, $separator = '--')
+
+    {
+        $deep++;
+        foreach ($tree as $list) {
+            $result[$list['id']] = str_repeat($separator, $deep - 1) . $list['title'];
+            if (isset($list['children'])) {
+                self::getDropDownList($list['children'], $result, $deep);
+            }
+        }
+        return $result;
+    }
+
+    public function getCategoryNameById($id)
+    {
+        $list = $this->lists();
+
+        return isset($list[$id]) ? $list[$id] : null;
+    }
+
+    public static function getIdByName($name)
+    {
+        $list = self::lists();
+
+        return array_search($name, $list);
+    }
+
+    public static function findByIdOrSlug($id)
+    {
+        if (intval($id) == 0) {
+            $condition = ["slug" => $id];
+        } else {
+            $condition = [
+                $id
+            ];
+        }
+
+        return static::findOne($condition);
+    }
+
+    public static function getAllowPublishEnum()
+    {
+        return [
+            '不允许',
+            '只允许后台',
+            '允许前后台'
+        ];
+    }
+    public static function getTypeEnum()
+    {
+        return [
+            '分类',
+            '产业链',
+        ];
+    }
+
+    public function beforeSave($insert)
+    {
+        if (parent::beforeSave($insert)) {
+            if (!empty($this->module)) {
+                $this->module = implode(',', $this->module);
+            }
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    public function afterSave($insert, $changedAttributes)
+    {
+        parent::afterSave($insert, $changedAttributes);
+//        Yii::$app->getCache()->delete('categoryList');
+//        Yii::$app->getCache()->delete('categoryListByType');
+        Yii::$app->cache->flush();
+        return true;
+    }
+
+    public function afterFind()
+    {
+        parent::afterFind();
+        $this->module = explode(',', $this->module);
+    }
+
+    public function renderModule($separator = ',')
+    {
+        return join($separator, array_map(function ($val) {
+            return array_get(ArticleModule::getTypeEnum(), $val);
+        }, $this->module));
+    }
+
+    /**
+     * @inheritdoc
+     * @return CategoryQuery the newly created [[ActiveQuery]] instance.
+     */
+    public static function find()
+    {
+        return Yii::createObject(CategoryQuery::className(), [get_called_class()]);
+    }
+}

+ 114 - 0
server/common/models/Policy.php

@@ -0,0 +1,114 @@
+<?php
+
+namespace common\models;
+use common\behaviors\CommentBehavior;
+use common\behaviors\MetaBehavior;
+use yii\behaviors\TimestampBehavior;
+use yii\helpers\HtmlPurifier;
+use yii\helpers\StringHelper;
+
+/**
+ * This is the model class for table "{{%policy}}".
+ *
+ * @property int $id
+ * @property int $use_layout
+ * @property string $content
+ * @property string $title
+ * @property integer $markdown
+ */
+class Policy extends \yii\db\ActiveRecord
+{
+    /**
+     * {@inheritdoc}
+     */
+    public static function tableName()
+    {
+        return '{{%policy}}';
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function rules()
+    {
+        return [
+            [['content', 'title'], 'required'],
+            [['content'], 'string'],
+			[['filter'], 'string'],
+            ['markdown', 'default', 'value' => $this->getIsMarkdown()],
+            [['use_layout'], 'in', 'range' => [0, 1]],
+            [['title'], 'string', 'max' => 50],
+            [['author'], 'string', 'max' => 50],
+            ['content', 'filterHtml']
+        ];
+    }
+
+    public function filterHtml($attribute)
+    {
+        $this->$attribute = HtmlPurifier::process($this->$attribute, function ($config) {
+            $config->set('HTML.Allowed', 'p[style],a[href|title],img[src|title|alt|class],h3,ul,ol,li,span,b,strong,hr,code,table,tbody,tr,td');
+            // 清除空标签
+            $config->set('AutoFormat.RemoveEmpty', true);
+        });
+    }
+
+    /**
+     * 没有指定markdown情况下默认编辑器是否为markdown
+     * @return int
+     */
+    public function getIsMarkdown()
+    {
+        return \Yii::$app->config->get('article_editor_type') == 'markdown' ? 1 : 0;
+    }
+
+    public function getProcessedContent()
+    {
+        return $this->markdown ? \yii\helpers\Markdown::process($this->content) : $this->content;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function attributeLabels()
+    {
+        return [
+            'id' => 'ID',
+            'use_layout' => '是否使用布局',
+            'content' => '内容',
+            'title' => '标题',
+            'author'=>'作者',
+            'created_at'=>'发布时间'
+        ];
+    }
+
+    public function attributeHints()
+    {
+        return [
+            'name' => '(影响url)'
+        ];
+    }
+
+    public function behaviors()
+    {
+        return [
+            TimestampBehavior::className(),
+            [
+                'class' => MetaBehavior::className(),
+            ],
+            [
+                'class' => CommentBehavior::className()
+            ]
+        ];
+    }
+
+    public function getMetaData()
+    {
+        $model = $this->getMetaModel();
+
+        $title = $model->title ?  : $this->title;
+        $author = $model->author ?  : $this->author;
+        $description = $model->description ?  : StringHelper::truncate(strip_tags($this->content), 150);
+
+        return [$title, $author, $description, $model->keywords];
+    }
+}

+ 111 - 0
server/common/models/Survey.php

@@ -0,0 +1,111 @@
+<?php
+
+namespace common\models;
+use common\behaviors\CommentBehavior;
+use common\behaviors\MetaBehavior;
+use yii\behaviors\TimestampBehavior;
+use yii\helpers\HtmlPurifier;
+use yii\helpers\StringHelper;
+
+/**
+ * This is the model class for table "{{%survey}}".
+ *
+ * @property int $id
+ * @property int $use_layout
+ * @property string $content
+ * @property string $title
+ * @property integer $markdown
+ */
+class Survey extends \yii\db\ActiveRecord
+{
+    /**
+     * {@inheritdoc}
+     */
+    public static function tableName()
+    {
+        return '{{%survey}}';
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function rules()
+    {
+        return [
+            [['content', 'title'], 'required'],
+            [['content'], 'string'],
+			[['filter'], 'string'],
+            ['markdown', 'default', 'value' => $this->getIsMarkdown()],
+            [['use_layout'], 'in', 'range' => [0, 1]],
+            [['title'], 'string', 'max' => 50],
+            ['content', 'filterHtml']
+        ];
+    }
+
+    public function filterHtml($attribute)
+    {
+        $this->$attribute = HtmlPurifier::process($this->$attribute, function ($config) {
+            $config->set('HTML.Allowed', 'p[style],a[href|title],img[src|title|alt|class],h3,ul,ol,li,span,b,strong,hr,code,table,tbody,tr,td');
+            // 清除空标签
+            $config->set('AutoFormat.RemoveEmpty', true);
+        });
+    }
+
+    /**
+     * 没有指定markdown情况下默认编辑器是否为markdown
+     * @return int
+     */
+    public function getIsMarkdown()
+    {
+        return \Yii::$app->config->get('article_editor_type') == 'markdown' ? 1 : 0;
+    }
+
+    public function getProcessedContent()
+    {
+        return $this->markdown ? \yii\helpers\Markdown::process($this->content) : $this->content;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function attributeLabels()
+    {
+        return [
+            'id' => 'ID',
+            'use_layout' => '是否使用布局',
+            'content' => '内容',
+            'title' => '标题'
+        ];
+    }
+
+    public function attributeHints()
+    {
+        return [
+            'name' => '(影响url)'
+        ];
+    }
+
+    public function behaviors()
+    {
+        return [
+            TimestampBehavior::className(),
+            [
+                'class' => MetaBehavior::className(),
+            ],
+            [
+                'class' => CommentBehavior::className()
+            ]
+        ];
+    }
+
+    public function getMetaData()
+    {
+        $model = $this->getMetaModel();
+
+        $title = $model->title ?  : $this->title;
+
+        $description = $model->description ?  : StringHelper::truncate(strip_tags($this->content), 150);
+
+        return [$title, $description, $model->keywords];
+    }
+}

+ 1 - 0
server/common/modules/config/backend/controllers/DefaultController.php

@@ -20,6 +20,7 @@ class DefaultController extends Controller
         $groups = Yii::$app->config->get('config_group');
         $group = Yii::$app->request->get('group', current(array_keys($groups)));
         $configModels = Config::find()->where(['group' => $group])->all();
+
         return $this->render('index', [
             'groups' => $groups,
             'group' => $group,

+ 1 - 0
server/common/modules/config/backend/views/default/index.php

@@ -19,6 +19,7 @@ $this->params['breadcrumbs'][] = $this->title;
     <div class="tab-content">
         <?php
         $form = ActiveForm::begin(['action' => ['store', 'group' => $group]]);
+	
         foreach ($configModels as $index => $configModel) {
             echo $form->field($configModel, "[$index]value")->label($configModel->description)->widget(\common\widgets\dynamicInput\DynamicInputWidget::className(),[
                 'data' => $configModel->extra,

+ 1 - 0
server/common/modules/rbac/models/Menu.php

@@ -137,6 +137,7 @@ class Menu extends \yii\db\ActiveRecord
      */
     public static function getSavedRoutes()
     {
+       
         $result = [];
         foreach (Yii::$app->getAuthManager()->getPermissions() as $name => $value) {
             if ($name[0] === '/' && substr($name, -1) != '*') {

+ 2 - 0
server/common/modules/user/backend/views/default/_search.php

@@ -34,6 +34,8 @@ use yii\widgets\ActiveForm;
         <?= $form->field($model, 'nickname') ?>
 
         <?= $form->field($model, 'tel') ?>
+        <!--分销等级-->
+<!--        --><?//= $form->field($model, 'level_id')->dropDownList(ArrayHelper::map(ShareLevel::find()->all(), 'id', 'title'), ['prompt' => '请选择']) ?>
 
         <div class="form-group">
             <?= Html::submitButton(Yii::t('common', 'Search'), ['class' => 'btn btn-success']) ?>

+ 22 - 0
server/common/modules/user/backend/views/default/index.php

@@ -36,6 +36,28 @@ $this->params['breadcrumbs'][] = $this->title;
                         ]
                     ]
                 ],
+//                'dataCount[0][count]:text:日课',
+                [
+                    'label' => '日课',
+                    'format' => 'raw',
+                    'value' => function ($model) {
+                        return $model->dataCount[0]['count'];
+                    },
+                ],
+                [
+                    'label' => '总课',
+                    'format' => 'raw',
+                    'value' => function ($model) {
+                        return $model->dataCount[1]['count'];
+                    },
+                ],
+                [
+                    'label' => '辅助课',
+                    'format' => 'raw',
+                    'value' => function ($model) {
+                        return $model->dataCount[2]['count'];
+                    },
+                ],
                 'allRoleDesc:text:角色',
                 'tel',
                 'email',

+ 235 - 1
server/common/modules/user/models/User.php

@@ -52,13 +52,21 @@ use yii\web\ServerErrorHttpException;
  * @property int $blocked_at
  * @property int $login_at
  * @property int $type
+ * @property int $level_id
+ * @property int $is_vip
+ * @property int $vip_time
  * @property string $password write-only password
  * @property Profile $profile
+ * @property UserCar $car
  * @property string $privilege
  * @property string $openid
  * @property string $unionid
  * @property string $nickname
  * @property Module $module
+ * @property Store $store
+ * @property ShareLevel $shareLevel
+ * @property Attachment $qrcode
+ * @property array $dataCount
  */
 class User extends ActiveRecord implements IdentityInterface
 {
@@ -86,6 +94,11 @@ class User extends ActiveRecord implements IdentityInterface
     {
         return [
             TimestampBehavior::className(),
+            [
+                'class' => UploadBehavior::className(),
+                'attribute' => 'qrcode',
+                'entity' => __CLASS__
+            ],
         ];
     }
 
@@ -96,7 +109,7 @@ class User extends ActiveRecord implements IdentityInterface
             'register' => ['username', 'openid', 'password', 'email', 'tel', 'pid'],
             'connect' => ['username', 'email'],
             'create' => ['jucai_id', 'email', 'tel'],
-            'update' => ['username', 'password', 'email', 'tel', 'nickname', 'pid'],
+            'update' => ['username', 'password', 'email', 'tel', 'nickname', 'level_id', 'pid'],
             'settings' => ['username', 'password', 'email', 'tel'],
             'resetPassword' => ['password']
         ]);
@@ -115,6 +128,7 @@ class User extends ActiveRecord implements IdentityInterface
             [['email'], 'match', 'pattern' => Regexp::$email],
             [['privilege'], 'string', 'max' => 255],
 
+            [['qrcode', 'dataCount'], 'safe'],
         ];
     }
 
@@ -135,6 +149,11 @@ class User extends ActiveRecord implements IdentityInterface
             'type' => '用户类型',
             'privilege' => '特权',//微信用户属性
             'unionid' => '联合ID',//微信用户属性
+            'level_id' => '分销等级',//微信用户属性
+            'qrcode' => '分销码',         //小程序码
+            'is_vip' => '是否vip',        //是否vip
+            'vip_time' => 'vip有效期',        //是否vip
+            'dataCount' => '数据统计',
         ];
     }
 
@@ -739,6 +758,14 @@ class User extends ActiveRecord implements IdentityInterface
     public static function lists()
     {
         if (Yii::$app->user->identity->getIsAdmin()) {
+            //已经使用的用户ids
+//            $usedUserIds = Company::find()->select('user_id')->distinct()->asArray()->indexBy('user_id')->column();
+//            //去掉当前包含的当前公司id
+//            if (!empty($this->user_id) && isset($usedUserIds[$this->user_id])) {
+//                unset($usedUserIds[$this->user_id]);
+//            }
+//            return User::find()->where(['not in', 'id', $usedUserIds])->asArray()->indexBy('id')->all();
+
             $lists = User::find()->indexBy('id')->all();
             $lists = ArrayHelper::map($lists, 'id', 'nickname');
 
@@ -750,4 +777,211 @@ class User extends ActiveRecord implements IdentityInterface
         }
 
     }
+
+    /**
+     * 获取用户的供应商
+     * @return \yii\db\ActiveQuery
+     * @author nodelog
+     */
+    public function getStore()
+    {
+        return $this->hasOne(Store::className(), ['user_id' => 'id']);
+    }
+
+    /**
+     * 查询后对数据处理
+     * @author nodelog
+     */
+    public function afterFind()
+    {
+        parent::afterFind();
+//        $this->nickname = $this->formatNickname();
+
+        //更新vip状态
+//        $this->isVip();
+    }
+
+
+    /**
+     * 获取分销等级
+     * @return \yii\db\ActiveQuery
+     * @author nodelog
+     */
+    public function getShareLevel()
+    {
+        return $this->hasOne(ShareLevel::className(), ['id' => 'level_id']);
+    }
+
+    /**
+     * 分销海报
+     *
+     * @param bool $force
+     * @return bool|mixed|string
+     * @throws ServerErrorHttpException
+     * @author nodelog
+     */
+    public function generateQrcode($force = false)
+    {
+        //海报存在直接返回
+        if ($this->qrcode && !$force) {
+            return $this->qrcode->url;
+        }
+
+        //小程序码中  scene 放入用户id
+        $scene = 'pid:' . \Yii::$app->user->id;
+        $hash = md5($scene);
+        $qrcodeFile = \Yii::getAlias('@storagePath/upload/qrcode/' . $hash . '.png');//path
+        $qrcodeUrl = \Yii::getAlias('@storageUrl/upload/qrcode/' . $hash . '.png');//path
+
+        try {
+            ini_set('memory_limit', '256M');
+            $editor = Grafika::createEditor(GrafikaHelper::getSupportEditorLib());
+            //背景图
+            $editor->open($userPoster, Yii::$app->storage->getPath(\Yii::$app->config->get('share_poster_bg')));
+
+            //生成推广码
+            /* @var Qrcode $qrcode */
+            $qrcode = (new Application())->driver("mini.qrcode");
+            //小程序码 buffer,宽度220
+            $qrcodeStream = $qrcode->unLimit($scene, 'pages/index/index', $extra = []);//buffer
+            $tempFile = \Yii::getAlias('@storagePath/upload/thumb/' . $hash . '.png');
+            if (!file_exists(dirname($tempFile))) {
+                @mkdir(dirname($tempFile), 0755, true);
+            }
+            file_put_contents($tempFile, $qrcodeStream);
+//            Yii::$app->storage->put($tempFile, $qrcodeStream);
+            $editor->open($wxappQrcode, $tempFile);
+            //测试二维码
+//            $editor->open($wxappQrcode, Yii::$app->storage->getPath('https://es.jiangzi.xin/storage/upload/20220408/OGGUn-K8HxojZfSesNv0OuVuAhRLYPzSJX0zEiyE.png'));
+
+            $avatarPath = Yii::$app->storage->getPath($this->getAvatar(540));
+            if (strpos($avatarPath, 'http') !== false) {
+                $avatarPath = Yii::$app->storage->thumbnail(\Yii::$app->config->get('share_image'), 540, 540);
+                $editor->open($avatar, Yii::$app->storage->getPath($avatarPath));
+            } else {
+
+                $editor->open($avatar, $avatarPath);
+            }
+
+
+//            $editor->resizeFill($goodsCover, 750, 750);
+            $editor->resizeExactWidth($avatar, 540);
+            //附加头像
+            $editor->blend($userPoster, $avatar, 'normal', 1.0, 'top-left', 105, 4900);
+
+            //写入文字
+            $fontFile = Yii::getAlias('@root/web/assets/fonts/st-heiti-light.ttc');
+            //加用户昵称
+            $editor->text($userPoster, mb_substr($this->nickname, 0, 12), 100, 750, 5000, new Color('#ffffff'), $fontFile, 0);
+            $editor->text($userPoster, Yii::$app->config->get('share_poster_text'), 70, 750, 5250, new Color('#ffffff'), $fontFile, 0);
+
+            //调整小程序码图片
+            $editor->resizeExactWidth($wxappQrcode, 660);
+            //附加小程序码图片
+            $editor->blend($userPoster, $wxappQrcode, 'normal', 1.0, 'top-right', -105, 4800);
+            //保存图片
+            $editor->save($userPoster, $qrcodeFile, 85);
+
+            //删除临时图片
+            unlink($tempFile);
+
+            //上传分销码
+            list($attachment, $error) = Attachment::uploadFromFile('qrcode', $qrcodeFile);
+            if ($error == null) {
+                $this->qrcode = [
+                    'id' => $attachment->id,
+                    'name' => $attachment->name,
+                    'hash' => $attachment->hash,
+                    'url' => $attachment->url,
+                    'path' => $attachment->path,
+                    'extension' => $attachment->extension,
+                    'type' => $attachment->type,
+                    'size' => $attachment->size
+                ];
+                if ($this->save(false)) {
+                    return ArrayHelper::getValue($this, 'qrcode.url', '');
+                }
+            }
+
+
+        } catch (Exception $e) {
+            throw new ServerErrorHttpException($e->getMessage());
+        }
+
+        return $qrcodeUrl;
+    }
+
+    /**
+     * 用户是否vip,并且未过期
+     * @author nodelog
+     */
+    public function isVip()
+    {
+        //vip自动过期
+        if ($this->is_vip) {
+            $vip = VipUser::find()->where(['user_id' => $this->id])->orderBy(['end_time' => SORT_DESC])->one();
+            if (!empty($vip) && $vip->isExpire()) {
+                $this->is_vip = StatusEnum::STATUS_OFF;
+                $this->save(false);
+
+            }
+        }
+
+        return $this->is_vip;
+
+    }
+
+    /**
+     * 获取当前vip
+     * @author nodelog
+     */
+    public function getCurrentVip()
+    {
+        $now = time();
+        return VipUser::find()->where(['user_id' => $this->id])->andWhere(['and', ['<=', 'start_time', $now], ['>', 'end_time', $now]])->one();
+    }
+
+//
+//    public function fields() {
+//        $fields = parent::fields();
+//
+//        $fields[] = 'dataCount';
+//        return $fields;
+//    }
+
+
+    /**
+     * 数据统计
+     * @author nodelog
+     */
+    public function getDataCount()
+    {
+        $data = [
+            [
+                'text' => '日课',
+                'count' => 0
+            ],
+            [
+                'text' => '总课',
+                'count' => 0
+            ],
+            [
+                'text' => '辅助课',
+                'count' => 0
+            ],
+        ];
+
+        //每日功课
+//        $data[0]['count'] = Data::find()->active()->andWhere(['user_id' => $this->id])->today()->count();
+        //累积功课
+//        $data[1]['count'] = Data::find()->active()->andWhere(['user_id' => $this->id])->count();
+        //辅助功课
+//        $userIds = VipUser::find()->active()->andWhere(['pay_user_id' => $this->id])->andWhere(['!=', 'user_id', $this->id])->select(['user_id'])->distinct()->column();
+//        $data[2]['count'] = Data::find()->active()->andWhere(['in', 'user_id', $userIds])->count();
+        //直接获取辅助榜数据
+//        $helpCount = DataRank::find()->active()->andWhere(['user_id' => $this->id, 'level' => DataTypeEnum::TYPE_HELP])->total()->select(['count'])->scalar();
+//        $data[2]['count'] = $helpCount ? $helpCount : 0;
+
+        return $data;
+    }
 }

文件差异内容过多而无法显示
+ 3890 - 0
server/database/rencai_jiangzi_20231013.sql


+ 39 - 0
server/index.html

@@ -0,0 +1,39 @@
+<!doctype html>
+<html>
+<head>
+    <meta charset="utf-8">
+    <title>恭喜,站点创建成功!</title>
+    <style>
+        .container {
+            width: 60%;
+            margin: 10% auto 0;
+            background-color: #f0f0f0;
+            padding: 2% 5%;
+            border-radius: 10px
+        }
+
+        ul {
+            padding-left: 20px;
+        }
+
+            ul li {
+                line-height: 2.3
+            }
+
+        a {
+            color: #20a53a
+        }
+    </style>
+</head>
+<body>
+    <div class="container">
+        <h1>恭喜, 站点创建成功!</h1>
+        <h3>这是默认index.html,本页面由系统自动生成</h3>
+        <ul>
+            <li>本页面在FTP根目录下的index.html</li>
+            <li>您可以修改、删除或覆盖本页面</li>
+            <li>FTP相关信息,请到“面板系统后台 > FTP” 查看</li>
+        </ul>
+    </div>
+</body>
+</html>

+ 1 - 0
server/web/.well-known/acme-challenge/GLCW9730tBb_Pncfblp3DWjHc5jPuUse_fdBVX1ij8o

@@ -0,0 +1 @@
+GLCW9730tBb_Pncfblp3DWjHc5jPuUse_fdBVX1ij8o.xdg7TRqYQvNrGk9eVoqLj9y5Wf_kTqYCijFj-Y-LiGE

+ 1 - 0
server/web/api/index.php

@@ -12,5 +12,6 @@ $config = yii\helpers\ArrayHelper::merge(
     require(__DIR__ . '/../../api/config/main.php')
 );
 
+
 $application = new yii\web\Application($config);
 $application->run();

+ 1 - 0
server/web/index.php

@@ -4,6 +4,7 @@ if (is_mobile()) {
     $url = "/mobile";
 }
 
+
 /**
  * 是否为移动端
  */

+ 1 - 1
server/web/mobile/index.html

@@ -1,2 +1,2 @@
 <!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>加载中</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
-            document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/mobile/static/index.5841170f.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/mobile/static/js/chunk-vendors.82988338.js></script><script src=/mobile/static/js/index.f8ed7df9.js></script></body></html>
+            document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/mobile/static/index.97465e7b.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/mobile/static/js/chunk-vendors.492ca56c.js></script><script src=/mobile/static/js/index.eac3f4eb.js></script></body></html>

二进制
server/web/mobile/mobile.zip


二进制
server/web/mobile/static/images/list-bg.png


二进制
server/web/mobile/static/images/tab_cal.png


二进制
server/web/mobile/static/images/tab_cal_s.png


二进制
server/web/mobile/static/images/tab_policy.png


二进制
server/web/mobile/static/images/tab_policy_s.png


二进制
server/web/mobile/static/images/type-1.png


二进制
server/web/mobile/static/images/type-2.png


二进制
server/web/mobile/static/images/type-3.png


二进制
server/web/mobile/static/images/type-4.png


文件差异内容过多而无法显示
+ 0 - 0
server/web/mobile/static/index.97465e7b.css


文件差异内容过多而无法显示
+ 0 - 0
server/web/mobile/static/js/chunk-vendors.492ca56c.js


文件差异内容过多而无法显示
+ 0 - 0
server/web/mobile/static/js/index.eac3f4eb.js


文件差异内容过多而无法显示
+ 0 - 0
server/web/mobile/static/js/pages-feedback-feedback.d1c89335.js


文件差异内容过多而无法显示
+ 0 - 0
server/web/mobile/static/js/pages-index-index.a80406fe.js


文件差异内容过多而无法显示
+ 0 - 0
server/web/mobile/static/js/pages-index-index~pages-policy-index.eaf84287.js


文件差异内容过多而无法显示
+ 0 - 0
server/web/mobile/static/js/pages-index-index~pages-policy-index~pages-policy-list~pages-policy-score~pages-policy-search~pages-~9b2bfa63.6b031c63.js


文件差异内容过多而无法显示
+ 0 - 0
server/web/mobile/static/js/pages-index-index~pages-policy-search~pages-search-search~pages-talents-talents~pages-user-footprint.d79feb62.js


文件差异内容过多而无法显示
+ 0 - 0
server/web/mobile/static/js/pages-index-index~pages-talents-talents.f46e7d54.js


文件差异内容过多而无法显示
+ 0 - 0
server/web/mobile/static/js/pages-kanban-kanban.665c0c69.js


文件差异内容过多而无法显示
+ 0 - 0
server/web/mobile/static/js/pages-launch-launch.fdb51220.js


文件差异内容过多而无法显示
+ 0 - 0
server/web/mobile/static/js/pages-login-login.0a70f873.js


文件差异内容过多而无法显示
+ 0 - 0
server/web/mobile/static/js/pages-policy-detail.1a4af98c.js


文件差异内容过多而无法显示
+ 0 - 0
server/web/mobile/static/js/pages-policy-index.50ca94c0.js


文件差异内容过多而无法显示
+ 0 - 0
server/web/mobile/static/js/pages-policy-index~pages-policy-search~pages-policy-talent~pages-user-company.322b137a.js


文件差异内容过多而无法显示
+ 0 - 0
server/web/mobile/static/js/pages-policy-index~pages-policy-talent.a0ac3b8a.js


文件差异内容过多而无法显示
+ 0 - 0
server/web/mobile/static/js/pages-policy-list.8080ce23.js


文件差异内容过多而无法显示
+ 0 - 0
server/web/mobile/static/js/pages-policy-score.4a1f59b2.js


文件差异内容过多而无法显示
+ 0 - 0
server/web/mobile/static/js/pages-policy-search.4ece7981.js


文件差异内容过多而无法显示
+ 0 - 0
server/web/mobile/static/js/pages-policy-talent.3fc3d862.js


文件差异内容过多而无法显示
+ 0 - 0
server/web/mobile/static/js/pages-search-search.62824860.js


文件差异内容过多而无法显示
+ 0 - 0
server/web/mobile/static/js/pages-talents-detail.c0e77e2f.js


文件差异内容过多而无法显示
+ 0 - 0
server/web/mobile/static/js/pages-talents-talents.1a616164.js


文件差异内容过多而无法显示
+ 0 - 0
server/web/mobile/static/js/pages-user-company.cde4f033.js


文件差异内容过多而无法显示
+ 0 - 0
server/web/mobile/static/js/pages-user-footprint.7b26cffd.js


文件差异内容过多而无法显示
+ 0 - 0
server/web/mobile/static/js/pages-user-user.a9d06f0d.js


+ 2 - 2
server/web/pc/200.html

@@ -1,9 +1,9 @@
 <!doctype html>
 <html lang="zh" data-n-head="%7B%22lang%22:%7B%221%22:%22zh%22%7D%7D">
   <head>
-    <meta data-n-head="1" charset="utf-8"><meta data-n-head="1" name="viewport" content="width=device-width,initial-scale=1"><meta data-n-head="1" data-hid="description" name="description" content=""><meta data-n-head="1" name="format-detection" content="telephone=no"><link data-n-head="1" rel="icon" type="image/x-icon" href="/favicon.ico"><base href="/pc/"><link rel="preload" href="/pc/_nuxt/137d949.js" as="script"><link rel="preload" href="/pc/_nuxt/6d99d61.js" as="script"><link rel="preload" href="/pc/_nuxt/ce3df0b.js" as="script"><link rel="preload" href="/pc/_nuxt/a0f51a8.js" as="script">
+    <meta data-n-head="1" charset="utf-8"><meta data-n-head="1" name="viewport" content="width=device-width,initial-scale=1"><meta data-n-head="1" data-hid="description" name="description" content=""><meta data-n-head="1" name="format-detection" content="telephone=no"><link data-n-head="1" rel="icon" type="image/x-icon" href="/favicon.ico"><base href="/pc/"><link rel="preload" href="/pc/_nuxt/9f43f41.js" as="script"><link rel="preload" href="/pc/_nuxt/2b09d2c.js" as="script"><link rel="preload" href="/pc/_nuxt/a9dab19.js" as="script"><link rel="preload" href="/pc/_nuxt/ea50ed5.js" as="script">
   </head>
   <body>
     <div id="__nuxt"><style>#nuxt-loading{background:#fff;visibility:hidden;opacity:0;position:absolute;left:0;right:0;top:0;bottom:0;display:flex;justify-content:center;align-items:center;flex-direction:column;animation:nuxtLoadingIn 10s ease;-webkit-animation:nuxtLoadingIn 10s ease;animation-fill-mode:forwards;overflow:hidden}@keyframes nuxtLoadingIn{0%{visibility:hidden;opacity:0}20%{visibility:visible;opacity:0}100%{visibility:visible;opacity:1}}@-webkit-keyframes nuxtLoadingIn{0%{visibility:hidden;opacity:0}20%{visibility:visible;opacity:0}100%{visibility:visible;opacity:1}}#nuxt-loading>div,#nuxt-loading>div:after{border-radius:50%;width:5rem;height:5rem}#nuxt-loading>div{font-size:10px;position:relative;text-indent:-9999em;border:.5rem solid #f5f5f5;border-left:.5rem solid #dd4250;-webkit-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0);-webkit-animation:nuxtLoading 1.1s infinite linear;animation:nuxtLoading 1.1s infinite linear}#nuxt-loading.error>div{border-left:.5rem solid #ff4500;animation-duration:5s}@-webkit-keyframes nuxtLoading{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes nuxtLoading{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}</style> <script>window.addEventListener("error",function(){var e=document.getElementById("nuxt-loading");e&&(e.className+=" error")})</script> <div id="nuxt-loading" aria-live="polite" role="status"><div>Loading...</div></div> </div><script>window.__NUXT__={config:{_app:{basePath:"/pc/",assetsPath:"/pc/_nuxt/",cdnURL:null}}}</script>
-  <script src="/pc/_nuxt/137d949.js"></script><script src="/pc/_nuxt/6d99d61.js"></script><script src="/pc/_nuxt/ce3df0b.js"></script><script src="/pc/_nuxt/a0f51a8.js"></script></body>
+  <script src="/pc/_nuxt/9f43f41.js"></script><script src="/pc/_nuxt/2b09d2c.js"></script><script src="/pc/_nuxt/a9dab19.js"></script><script src="/pc/_nuxt/ea50ed5.js"></script></body>
 </html>

文件差异内容过多而无法显示
+ 0 - 0
server/web/pc/_nuxt/268699a.js


文件差异内容过多而无法显示
+ 1 - 0
server/web/pc/_nuxt/2b09d2c.js


文件差异内容过多而无法显示
+ 0 - 0
server/web/pc/_nuxt/5246472.js


+ 1 - 0
server/web/pc/_nuxt/565bd5b.js

@@ -0,0 +1 @@
+(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{513:function(t,e,n){"use strict";n.r(e);n(302),n(67),n(65),n(12),n(50),n(31),n(87);var r=6e4,o=36e5,m=24*o;function h(t){return(0+t.toString()).slice(-2)}var c={components:{},props:{isSlot:{type:Boolean,default:!1},time:{type:Number,default:0},format:{type:String,default:"hh:mm:ss"},autoStart:{type:Boolean,default:!0}},watch:{time:{immediate:!0,handler:function(t){t&&this.reset()}}},data:function(){return{timeObj:{},formateTime:0}},created:function(){},computed:{},methods:{createTimer:function(t){return setTimeout(t,100)},isSameSecond:function(t,e){return Math.floor(t)===Math.floor(e)},start:function(){this.counting||(this.counting=!0,this.endTime=Date.now()+1e3*this.remain,this.setTimer())},setTimer:function(){var t=this;this.tid=this.createTimer((function(){var e=t.getRemain();t.isSameSecond(e,t.remain)&&0!==e||t.setRemain(e),0!==t.remain&&t.setTimer()}))},getRemain:function(){return Math.max(this.endTime-Date.now(),0)},pause:function(){this.counting=!1,clearTimeout(this.tid)},reset:function(){this.pause(),this.remain=this.time,this.setRemain(this.remain),this.autoStart&&this.start()},setRemain:function(t){var e=this.format;this.remain=t;var time,n=(time=t,{days:Math.floor(time/m),hours:h(Math.floor(time%m/o)),minutes:h(Math.floor(time%o/r)),seconds:h(Math.floor(time%r/1e3))});this.formateTime=function(t,e){var n=e.days,r=e.hours,o=e.minutes,m=e.seconds;return-1!==t.indexOf("dd")&&(t=t.replace("dd",n)),-1!==t.indexOf("hh")&&(t=t.replace("hh",h(r))),-1!==t.indexOf("mm")&&(t=t.replace("mm",h(o))),-1!==t.indexOf("ss")&&(t=t.replace("ss",h(m))),t}(e,n),this.$emit("change",n),0===t&&(this.pause(),this.$emit("finish"))}}},f=n(8),component=Object(f.a)(c,(function(){var t=this,e=t._self._c;return t.time>=0?e("div",[e("client-only",[t.isSlot?t._t("default"):e("span",[t._v(t._s(t.formateTime))])],2)],1):t._e()}),[],!1,null,null,null);e.default=component.exports}}]);

文件差异内容过多而无法显示
+ 0 - 0
server/web/pc/_nuxt/7d1ff1a.js


文件差异内容过多而无法显示
+ 0 - 0
server/web/pc/_nuxt/9f43f41.js


文件差异内容过多而无法显示
+ 0 - 0
server/web/pc/_nuxt/a6f9317.js


文件差异内容过多而无法显示
+ 1 - 0
server/web/pc/_nuxt/a9dab19.js


文件差异内容过多而无法显示
+ 0 - 0
server/web/pc/_nuxt/adf2428.js


文件差异内容过多而无法显示
+ 0 - 0
server/web/pc/_nuxt/b674f24.js


文件差异内容过多而无法显示
+ 0 - 0
server/web/pc/_nuxt/c17869a.js


+ 1 - 0
server/web/pc/_nuxt/d811690.js

@@ -0,0 +1 @@
+(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{494:function(t,e,l){var content=l(498);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,l(14).default)("1e01d57a",content,!0,{sourceMap:!1})},497:function(t,e,l){"use strict";l(494)},498:function(t,e,l){var n=l(13)((function(i){return i[1]}));n.push([t.i,".null-data[data-v-93598fb0]{padding:100px}.null-data .img-null[data-v-93598fb0]{height:150px;width:150px}",""]),n.locals={},t.exports=n},500:function(t,e,l){"use strict";l.r(e);var n={components:{},props:{img:{type:String},text:{type:String,default:"暂无数据"},imgStyle:{type:String,default:""}},methods:{}},o=(l(497),l(8)),component=Object(o.a)(n,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"bg-white flex-col col-center null-data"},[e("img",{staticClass:"img-null",style:t.imgStyle,attrs:{src:t.img,alt:""}}),t._v(" "),e("div",{staticClass:"muted mt8"},[t._v(t._s(t.text))])])}),[],!1,null,"93598fb0",null);e.default=component.exports}}]);

文件差异内容过多而无法显示
+ 0 - 0
server/web/pc/_nuxt/dbc3170.js


文件差异内容过多而无法显示
+ 0 - 0
server/web/pc/_nuxt/e9c2273.js


文件差异内容过多而无法显示
+ 0 - 0
server/web/pc/_nuxt/ea50ed5.js


二进制
server/web/pc/_nuxt/fonts/element-icons.313f7da.woff


二进制
server/web/pc/_nuxt/fonts/element-icons.4520188.ttf


二进制
server/web/pc/_nuxt/fonts/iconfont.0708493.woff


二进制
server/web/pc/_nuxt/fonts/iconfont.3932398.ttf


二进制
server/web/pc/_nuxt/fonts/iconfont.851a0f6.woff2


部分文件因为文件数量过多而无法显示