dever 6 年之前
父节点
当前提交
be683a9c05
共有 8 个文件被更改,包括 102 次插入50 次删除
  1. 31 1
      config/base.php
  2. 1 1
      feature/lib/Info.php
  3. 45 0
      manage/config/base.php
  4. 2 2
      push/database/data.php
  5. 1 1
      push/database/info.php
  6. 5 3
      push/lib/Data.php
  7. 17 6
      push/lib/Manage.php
  8. 0 36
      service/config/base.php

+ 31 - 1
config/base.php

@@ -24,7 +24,7 @@ $config['base'] = array
 		2 => '视频',
 		3 => '直播',
 		4 => '小刊',
-		5 => '小刊音视频留言',
+		//5 => '小刊音视频留言',
 		6 => '专题',
 		7 => '小程序',
 		//8 => '商品',
@@ -124,4 +124,34 @@ $config['base'] = array
 	# 支付成功后,调用的接口
 	'pay_notify' => 'service/lib/pay.act',
 );
+
+
+# 前台通用配置
+$config['template'] = array
+(
+    # 静态页面目录
+    'assets' => 'mobile',
+
+    # 模板编译器目录
+    'template' => 'mobile',
+
+    # 模板html文件的所在目录,默认为html
+    'path' => '',
+
+    'replace' => array
+    (
+        'css' => 'css/',
+        'js' => 'js/',
+        'images' => 'images/',
+    ),
+
+    # 编译器与模板对应关系目录,定义之后,代表可以完全不改动前端的代码,可以为空,为空则一一对应,参考manage
+    'relation' => array
+    (
+        # 首页启动屏幕
+        'home' => 'index',
+        'page' => 'rule',
+    ),
+    
+);
 return $config;

+ 1 - 1
feature/lib/Info.php

@@ -1,6 +1,6 @@
 <?php
 
-namespace Content\Lib;
+namespace Feature\Lib;
 
 use Dever;
 

+ 45 - 0
manage/config/base.php

@@ -1,10 +1,55 @@
 <?php
 
+$url = function()
+{
+	$url = Dever::input('loading') ? 'loading=1' : '';
+	$url .= Dever::input('ms') ? '&ms=' . Dever::input('ms') : '';
+
+	return $url;
+};
+
+# 一些基本配置
+$config['base'] = array
+(
+	'url' => $url(),
+
+	# 针对管理系统的配置,开启这个则每次刷新都读取admin的最新数据,测试功能
+	'getAdmin' => true,
+
+	# 开启批量更新
+	'mul_type' => 1,
+
+	# 地图配置
+	'map' => array
+	(
+		'url' => 'https://webapi.amap.com/maps?v=1.4.8&key=b51a0d5f8f977726eeaa070a30bcf3cd',
+	),
+);
+
 # 模板配置
 $config['template'] = array
 (
 	# 使用的模板 注意:定义这个之后,将会强制将本项目模板变成这个
 	'assets' => 'layadmin',
+	'template' => 'layadmin',
+
+	'replace' => array
+	(
+		'css' => '../css/',
+		'lib' => '../lib/',
+		'img' => '../img/',
+		'images' => '../images/',
+		'js' => '../js/',
+		'script' => '../script/',
+
+		# 以下的替换主要用于合并操作(host里的merge项)
+		'font' => '../fonts/',
+	),
+
+	'path' => 'html',
+	'layout' => '',
+
+	'relation' => array(),
 );
 
 return $config;

+ 2 - 2
push/database/data.php

@@ -303,7 +303,7 @@ return array
             'type' => 'all',
             'order' => array('reorder' => 'desc', 'id' => 'desc'),
             'limit' => '0,10',
-            'col' => 'name,pic,olink as link,type,article_id,vod_id,live_id,journal_id,cdate',
+            'col' => 'name,pic,olink as link,type,article_id,vod_id,live_id,journal_id,feature_id,applet_id,cdate',
         ),
 
         # 获取列表页 带有分页的
@@ -319,7 +319,7 @@ return array
             'type' => 'all',
             'order' => array('reorder' => 'desc', 'id' => 'desc'),
             'page' => array(10, 'list'),
-            'col' => 'name,pic,olink as link,type,article_id,vod_id,live_id,journal_id,cdate',
+            'col' => 'name,pic,olink as link,type,article_id,vod_id,live_id,journal_id,feature_id,applet_id,cdate',
         ),
     ),
 );

+ 1 - 1
push/database/info.php

@@ -173,7 +173,7 @@ return array
         (
             'type'      => 'varchar-30',
             'name'      => '启用的功能',
-            'default'   => '1,2,3,4,10',
+            'default'   => '1,2,3,4,6,7,10',
             'desc'      => '启用的功能',
             'match'     => 'is_string',
             'option'    => $function,

+ 5 - 3
push/lib/Data.php

@@ -86,9 +86,7 @@ class Data
                     if (isset($data['name']) && $data['name'] && !$info['name']) {
                         $info['name'] = $data['name'];
                     }
-                    if (isset($data['appid']) && $data['appid'] && !$info['appid']) {
-                        $info['appid'] = $data['appid'];
-                    }
+
                     if (isset($data['pic_cover']) && $data['pic_cover'] && !$info['pic']) {
                         $info['pic'] = $data['pic_cover'];
                     }
@@ -117,6 +115,10 @@ class Data
                         $author = Dever::db('content/author')->one($data['author_id']);
                         $info['author_name'] = $author['name'];
                     }
+
+                    if (isset($data['appid']) && $data['appid']) {
+                        $info['appid'] = $data['appid'];
+                    }
                 }
             }
         } else {

+ 17 - 6
push/lib/Manage.php

@@ -17,18 +17,29 @@ class Manage
 
         if ($info['type'] < 10) {
             $table = Dever::config('base')->type_table[$info['type']];
+            $audit = array
+            (
+                //'audit' => 2,
+                //'status' => 2,
+                'state' => 1,
+            );
             if ($info['type'] == 1) {
-                $data = Dever::db($table)->one($info['article_id']);
+                $audit['id'] = $info['article_id'];
+                $data = Dever::db($table)->one($audit);
             } elseif ($info['type'] == 2) {
-                $data = Dever::db($table)->one($info['vod_id']);
+                $audit['id'] = $info['vod_id'];
+                $data = Dever::db($table)->one($audit);
             } elseif ($info['type'] == 3) {
-                $data = Dever::db($table)->one($info['live_id']);
+                $audit['id'] = $info['live_id'];
+                $data = Dever::db($table)->one($audit);
             } elseif ($info['type'] == 4) {
-                $data = Dever::db($table)->one($info['journal_id']);
+                $audit['id'] = $info['journal_id'];
+                $data = Dever::db($table)->one($audit);
             } elseif ($info['type'] == 6) {
-                $data = Dever::db($table)->one($info['feature_id']);
+                $audit['id'] = $info['feature_id'];
+                $data = Dever::db($table)->one($audit);
             } elseif ($info['type'] == 7) {
-                $data = Dever::db($table)->one($info['applet_id']);
+                $data = Dever::db($table)->one(array('state' => 1, 'id' => $info['applet_id']));
             }
 
             if (isset($data) && $data && isset($data['name'])) {

+ 0 - 36
service/config/base.php

@@ -1,36 +0,0 @@
-<?php
-
-# 一些基本配置
-$config['base'] = array
-(
-    
-);
-
-$config['template'] = array
-(
-    # 静态页面目录
-    'assets' => 'mobile',
-
-    # 模板编译器目录
-    'template' => 'mobile',
-
-    # 模板html文件的所在目录,默认为html
-    'path' => '',
-
-    'replace' => array
-    (
-        'css' => 'css/',
-        'js' => 'js/',
-        'images' => 'images/',
-    ),
-
-    # 编译器与模板对应关系目录,定义之后,代表可以完全不改动前端的代码,可以为空,为空则一一对应,参考manage
-    'relation' => array
-    (
-        # 首页启动屏幕
-        'home' => 'index',
-    ),
-    
-);
-
-return $config;