dever 6 years ago
parent
commit
d395490e66
42 changed files with 488 additions and 85 deletions
  1. 15 2
      code/database/config.php
  2. 21 1
      code/database/info.php
  3. 69 0
      code/database/seller.php
  4. 28 0
      code/lib/Core.php
  5. 13 23
      code/lib/Manage.php
  6. 1 1
      content/database/article.php
  7. 10 0
      journal/database/cate.php
  8. 3 3
      journal/database/content.php
  9. 1 1
      journal/database/info.php
  10. 24 4
      journal/database/order.php
  11. 19 1
      journal/lib/Pay.php
  12. 1 1
      main/lib/Core.php
  13. 15 7
      main/src/Journal.php
  14. 0 0
      service/assets/mobile/css/global.css
  15. 1 1
      service/assets/mobile/css/global.css.map
  16. 1 1
      service/assets/mobile/css/index.css
  17. 1 1
      service/assets/mobile/css/index.css.map
  18. 0 2
      service/assets/mobile/css/list.css
  19. 1 1
      service/assets/mobile/css/list.css.map
  20. 2 2
      service/assets/mobile/css/pay.css
  21. 1 1
      service/assets/mobile/css/pay.css.map
  22. 2 2
      service/assets/mobile/css/success.css
  23. 1 1
      service/assets/mobile/css/success.css.map
  24. 0 0
      service/assets/mobile/js/global.js
  25. 0 0
      service/assets/mobile/js/global.js.map
  26. 2 2
      service/assets/mobile/js/index.js
  27. 1 1
      service/assets/mobile/js/index.js.map
  28. 6 2
      service/assets/mobile/js/list.js
  29. 0 1
      service/assets/mobile/js/list.js.map
  30. 2 2
      service/assets/mobile/js/pay.js
  31. 1 1
      service/assets/mobile/js/pay.js.map
  32. 2 2
      service/assets/mobile/js/success.js
  33. 1 1
      service/assets/mobile/js/success.js.map
  34. 83 0
      service/assets/mobile/list_code.html
  35. 47 3
      service/src/Base.php
  36. 33 2
      service/src/Buy.php
  37. 1 2
      service/src/Data.php
  38. 58 0
      service/template/mobile/list_code.php
  39. 19 6
      source/database/info.php
  40. 0 2
      source/database/stat.php
  41. 1 1
      video/database/live.php
  42. 1 1
      video/database/vod.php

+ 15 - 2
code/database/config.php

@@ -1,5 +1,8 @@
 <?php
-
+$seller = function()
+{
+	return Dever::db('code/seller')->state();
+};
 return array
 (
 	# 表名
@@ -36,6 +39,17 @@ return array
             'update'    => 'select',
             'update_search' => 'journal/lib/manage.search_journal',
         ),
+
+        'seller_id'     => array
+        (
+            'type'      => 'int-11',
+            'name'      => '选择销售商',
+            'default'   => '1',
+            'desc'      => '选择销售商',
+            'match'     => 'option',
+            'update'    => 'select',
+          	'option'	=> $seller,
+        ),
 		
 		'num'		=> array
 		(
@@ -56,7 +70,6 @@ return array
 			'desc' 		=> '兑换本数',
 			'match' 	=> 'is_string',
 			'update'	=> 'text',
-			'value'		=> '',
 		),
 
 		'cdate'		=> array

+ 21 - 1
code/database/info.php

@@ -10,6 +10,11 @@ $type = array
 
 $product = Dever::load('journal/api.data');
 
+$seller = function()
+{
+	return Dever::db('code/seller')->state();
+};
+
 return array
 (
 	# 表名
@@ -93,6 +98,19 @@ return array
 			'list'		=> true,
 		),
 
+		'seller_id'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '销售商',
+			'default' 	=> '1',
+			'desc' 		=> '销售商',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'select',
+			'option'	=> $seller,
+			'search'	=> 'select',
+			'list'		=> true,
+		),
+
 		'uid'		=> array
 		(
 			'type' 		=> 'int-11',
@@ -100,7 +118,7 @@ return array
 			'default' 	=> '0',
 			'desc' 		=> '用户信息',
 			'match' 	=> 'is_numeric',
-			//'list'		=> 'Dever::load("code/lib/manage.showUserInfo", "{uid}", "{ldate}")',
+			'list'		=> 'Dever::load("code/lib/manage.showUserInfo", "{create_uid}",{uid}", "{ldate}")',
 		),
 
 		'state'		=> array
@@ -146,6 +164,8 @@ return array
         'button' => array
         (
             '新增兑换码' => array('fast', 1, 'config&where_id=1'),
+            '销售商列表' => array('list', 'seller&project=code&oper_parent=info&oper_project=code'),
+            '新增销售商' => array('fast', 1, 'seller'),
         ),
 	),
 );

+ 69 - 0
code/database/seller.php

@@ -0,0 +1,69 @@
+<?php
+
+return array
+(
+	# 表名
+	'name' => 'seller',
+	# 显示给用户看的名称
+	'lang' => '新增销售商',
+	'order' => 1,
+	'menu' => false,
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			'list'		=> true,
+		),
+		
+		'name'		=> array
+		(
+			'type' 		=> 'varchar-80',
+			'name' 		=> '销售商名称',
+			'default' 	=> '',
+			'desc' 		=> '销售商名称',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'list'		=> true,
+		),
+
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+		),
+
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '录入时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+		),
+	),
+
+	'manage' => array
+	(
+		
+	),
+
+	# 默认值
+	'default' => array
+	(
+		'col' => 'name,state,cdate',
+		'value' => array
+		(
+			'"官方",1,' . time(),
+		),
+	),
+);

+ 28 - 0
code/lib/Core.php

@@ -0,0 +1,28 @@
+<?php
+
+namespace Code\Lib;
+
+use Dever;
+
+class Core
+{
+	public function createCode($product_id, $seller_id, $product_num = 1, $create_uid = -1)
+	{
+		$code = Dever::rand(8, 0);
+		$data['code'] = $code;
+		$total = Dever::db('code/info')->total($data);
+		if ($total > 0) {
+			return $this->createCode($product_id, $seller_id, $product_num, $create_uid);
+		}
+		
+		$data['product_id'] = $product_id;
+		$data['seller_id'] = $seller_id;
+		$data['product_num'] = $product_num;
+		$data['type'] = 1;
+		if ($create_uid > 0) {
+			$data['create_uid'] = $create_uid;
+		}
+		Dever::db('code/info')->insert($data);
+		return $code;
+	}
+}

+ 13 - 23
code/lib/Manage.php

@@ -11,20 +11,23 @@ class Manage
 	 *
 	 * @return mixed
 	 */
-	public function showUserInfo($uid, $ldate = false)
+	public function showUserInfo($create_uid, $uid, $ldate = false)
 	{
-		if ($uid) {
+		$table = array();
+		if ($create_uid > 0) {
+			$user = Dever::load('passport/user.info', $create_uid);
+			$table['创建人'] = $user['username'];
+		}
+		if ($uid > 0) {
 			$user = Dever::load('passport/user.info', $uid);
 			if ($user) {
-				$table = array();
-				$table['用户名'] = $user['username'];
+				$table['领取人'] = $user['username'];
 				$table['手机号'] = $user['mobile'];
 				$table['领取时间'] = date('Y-m-d H:i:s', $ldate);
-				return Dever::table($table);
 			}
-		} else {
-			return '';
 		}
+
+		return Dever::table($table);
 	}
 
     /**
@@ -37,30 +40,17 @@ class Manage
 		$code = Dever::param('num', $param);
 		$product_num = Dever::param('product_num', $param);
 		$product_id = Dever::param('product_id', $param);
+		$seller_id = Dever::param('seller_id', $param);
 
 		//$total = Dever::db('code/info')->total(array('product_id' => $product_id, 'type' => 1));
 		$total = 0;
+		$core = Dever::load('code/lib/core');
 		if ($code > 0 && $code > $total) {
 			$num = $code - $total;
 
 			for ($i = 0; $i < $num; $i++) {
-				$this->createCode($product_id, $product_num);
+				$core->createCode($product_id, $seller_id, $product_num);
 			}
 		}
 	}
-
-	private function createCode($product_id, $product_num = 1)
-	{
-		$code = Dever::rand(8, 0);
-		$data['product_id'] = $product_id;
-		$data['code'] = $code;
-		$total = Dever::db('code/info')->total($data);
-		if ($total > 0) {
-			return $this->createCode($product_id, $id);
-		}
-		$data['product_num'] = $product_num;
-		$data['type'] = 1;
-		Dever::db('code/info')->insert($data);
-		return $code;
-	}
 }

+ 1 - 1
content/database/article.php

@@ -73,7 +73,7 @@ return array
 			# 更新另外一个表的字段 => 本表的字段
 			'where' => array('data_id' => 'id', 'type' => 1),
 			# 要更新的数据
-			'update' => array('data_id' => 'id', 'type' => 1, 'pdate' => 'pdate', 'reorder' => 'reorder', 'name' => 'name', 'audit' => 'audit', 'status' => 'status', 'cate_id' => 'cate_id'),
+			'update' => array('data_id' => 'id', 'type' => 1, 'pdate' => 'pdate', 'reorder' => 'reorder', 'name' => 'name', 'audit' => 'audit', 'status' => 'status', 'cate_id' => 'cate_id', 'state' => 'state'),
 		)
 	),
 

+ 10 - 0
journal/database/cate.php

@@ -95,6 +95,16 @@ return array
             'edit'      => true,
         ),
 
+        'code_desc'     => array
+        (
+            'type'      => 'text-255',
+            'name'      => '兑换说明',
+            'default'   => '',
+            'desc'      => '兑换说明',
+            'match'     => 'option',
+            'update'    => 'editor',
+        ),
+
         'state'     => array
         (
             'type'      => 'tinyint-1',

+ 3 - 3
journal/database/content.php

@@ -7,9 +7,9 @@ $type = array
     1 => '全屏图',
     2 => '长图',
     # 2018-12-11 增加3个类型
-    4 => '全屏视频',
-    5 => '留言视频',
-    6 => '留言音频',
+    //4 => '全屏视频',
+    //5 => '留言视频',
+    //6 => '留言音频',
 
     # 关联类型 > 10
     11 => '关联图文',

+ 1 - 1
journal/database/info.php

@@ -62,7 +62,7 @@ return array
 			# 更新另外一个表的字段 => 本表的字段
 			'where' => array('data_id' => 'id', 'type' => 4),
 			# 要更新的数据
-			'update' => array('data_id' => 'id', 'type' => 4, 'pdate' => 'pdate', 'reorder' => 'reorder', 'name' => 'name', 'audit' => 'audit'),
+			'update' => array('data_id' => 'id', 'type' => 4, 'pdate' => 'pdate', 'reorder' => 'reorder', 'name' => 'name', 'audit' => 'audit', 'state' => 'state'),
 		)
 	),
 	*/

+ 24 - 4
journal/database/order.php

@@ -2,8 +2,9 @@
 
 $type = array
 (
-    1 => '购买',
-    2 => '兑换',
+    1 => '购买小刊',
+    2 => '兑换小刊',
+    3 => '购买兑换码',
 );
 
 # 系统
@@ -18,7 +19,6 @@ $system = array
 # 渠道
 $source = function()
 {
-    return array();
     return Dever::db('source/info')->state();
 };
 
@@ -41,6 +41,11 @@ $buy = function()
     return Dever::db('journal/buy_num')->state();
 };
 
+$seller = function()
+{
+    return Dever::db('code/seller')->state();
+};
+
 return array
 (
     # 表名
@@ -171,7 +176,7 @@ return array
         'source'      => array
         (
             'type'      => 'int-11',
-            'name'      => '来源',
+            'name'      => '渠道来源',
             'default'   => '1',
             'desc'      => '支付方式',
             'match'     => 'is_numeric',
@@ -181,6 +186,19 @@ return array
             //'list'        => true,
         ),
 
+        'seller_id'     => array
+        (
+            'type'      => 'int-11',
+            'name'      => '销售商',
+            'default'   => '1',
+            'desc'      => '销售商',
+            'match'     => 'is_numeric',
+            'update'    => 'select',
+            'option'    => $seller,
+            'search'    => 'select',
+            //'list'      => true,
+        ),
+
         'notice'        => array
         (
             'type'      => 'int-11',
@@ -338,6 +356,8 @@ return array
             # 匹配的正则或函数 选填项
             'option' => array
             (
+                'type' => 'yes',
+                'create_uid' => 'yes',
                 'status' => array('1', '!='),
                 'uid' => 'yes',
                 'state' => 1,

+ 19 - 1
journal/lib/Pay.php

@@ -28,7 +28,25 @@ class Pay
             $order = Dever::db('journal/order')->one(array('order_id' => $order_id, 'uid' => $uid));
 
             if ($send['pay_status'] == 2 && $order) {
-                Dever::db('journal/order')->update(array('where_id' => $order['id'], 'status' => 2));
+                
+                $update = array();
+                $update['where_id'] = $order['id'];
+                $update['status'] = 2;
+                if ($order['type'] == 3) {
+                    # 购买兑换码
+                    $product_num = 1;
+                    if ($order['buy_id'] > 0) {
+                        $buy = Dever::db('journal/buy_num')->one($order['buy_id']);
+                        $product_num = $buy['num'];
+                    }
+                    $update['code'] = Dever::load('code/lib/core')->createCode($order['product_id'], $order['seller_id'], $product_num, $uid);
+                }
+
+                Dever::db('journal/order')->update($update);
+
+                if ($order['type'] != 1) {
+                    return;
+                }
 
                 # 订阅
                 Dever::load('act/lib/subscribe')->submit($uid, $order['product_id'], 1);

+ 1 - 1
main/lib/Core.php

@@ -45,7 +45,7 @@ class Core
 
     public function replacePic($pic, $type = 't1')
     {
-        //$pic = Dever::pic($pic, $type);
+        $pic = Dever::pic($pic, $type);
 
         if (strstr($pic, 'http://')) {
             $pic = str_replace('http://', 'https://', $pic);

+ 15 - 7
main/src/Journal.php

@@ -505,9 +505,11 @@ class Journal extends Core
             } else {
                 $order_data['system'] = 4;
             }
+            $account_id = 3;
         } else {
             $method = 'applet';
             $order_data['system'] = 1;
+            $account_id = 1;
         }
 
         $order_id = $this->createOrder('JP');
@@ -534,6 +536,10 @@ class Journal extends Core
         if ($source) {
             $order_data['source'] = $source;
         }
+        $seller = Dever::input('seller');
+        if ($seller) {
+            $order_data['seller_id'] = $seller;
+        }
 
         $id = Dever::db('journal/order')->insert($order_data);
 
@@ -544,13 +550,13 @@ class Journal extends Core
         //$param参数
         $param = array
         (
-            'account_id' => 1,
+            'account_id' => $account_id,
             'project_id' => 1,
             'uid' => $this->data['uid'],
             'username' => $user['username'],
             'name' => $order_data['name'],
             'cash' => $order_data['cash'],
-            //'cash' => '0.01',
+            'cash' => '0.01',
             'openid' => $wechat['openid'],
             'product_id' => $journal_id . '-' . $buy_id,
             'order_id' => $order_id,
@@ -558,10 +564,12 @@ class Journal extends Core
 
         $this->data['pay'] = Dever::load('pay/api.' . $method, $param);
 
-        if (isset($this->data['pay']['prepay_id'])) {
-            Dever::load('act/lib/form')->submit($this->data['uid'], $this->data['pay']['prepay_id'], 2);
-        } else {
-            Dever::alert('支付失败');
+        if ($order_data['system'] == 1) {
+            if (isset($this->data['pay']['prepay_id'])) {
+                Dever::load('act/lib/form')->submit($this->data['uid'], $this->data['pay']['prepay_id'], 2);
+            } else {
+                Dever::alert('支付失败');
+            }
         }
 
         return $this->data;
@@ -641,7 +649,7 @@ class Journal extends Core
                 //Dever::alert('兑换码已被领取');
             }
 
-            $order = Dever::db('journal/order')->one(array('product_id' => $journal_id, 'code' => $code, 'uid' => $this->data['uid']));
+            $order = Dever::db('journal/order')->one(array('product_id' => $journal_id, 'code' => $code, 'type' => 2, 'uid' => $this->data['uid']));
 
             if ($order) {
                 Dever::alert('您已经使用过该兑换码');

File diff suppressed because it is too large
+ 0 - 0
service/assets/mobile/css/global.css


+ 1 - 1
service/assets/mobile/css/global.css.map

@@ -1 +1 @@
-{"version":3,"sources":[],"names":[],"mappings":"","file":"css/global.css?v=d5a4df90","sourceRoot":""}
+{"version":3,"sources":[],"names":[],"mappings":"","file":"css/global.css?v=76949729","sourceRoot":""}

+ 1 - 1
service/assets/mobile/css/index.css

@@ -1,2 +1,2 @@
 .content{margin-bottom:1.0267rem;box-shadow:0 .04rem 0 #f3f3f3;padding-top:1.0267rem}.content .iphone,.content img{display:block;width:6.1333rem;height:10.12rem;margin:0 auto}.title{margin:0 .6667rem .4267rem;font-size:.48rem}.title,.txt{text-align:center}.txt{margin:0 .6667rem .5333rem;color:#999;font-size:.3467rem}
-/*# sourceMappingURL=index.css.map?v=d5a4df90*/
+/*# sourceMappingURL=index.css.map?v=76949729*/

+ 1 - 1
service/assets/mobile/css/index.css.map

@@ -1 +1 @@
-{"version":3,"sources":[],"names":[],"mappings":"","file":"css/index.css?v=d5a4df90","sourceRoot":""}
+{"version":3,"sources":[],"names":[],"mappings":"","file":"css/index.css?v=76949729","sourceRoot":""}

File diff suppressed because it is too large
+ 0 - 2
service/assets/mobile/css/list.css


+ 1 - 1
service/assets/mobile/css/list.css.map

@@ -1 +1 @@
-{"version":3,"sources":[],"names":[],"mappings":"","file":"css/list.css?v=d5a4df90","sourceRoot":""}
+{"version":3,"sources":[],"names":[],"mappings":"","file":"css/list.css?v=76949729","sourceRoot":""}

+ 2 - 2
service/assets/mobile/css/pay.css

@@ -1,2 +1,2 @@
-.container{padding:0 .4rem;-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.h1{font-size:.4rem;line-height:.64rem;padding:.6533rem 0}.list .item{height:1.3333rem;border-radius:.1333rem;border:.0267rem solid #000;margin-bottom:.4rem;box-sizing:border-box;padding:0 .4rem;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;font-size:.4rem;color:#000}.list .item.active{background-color:#cc1619;border-color:#cc1619;color:#fff}.buytip{font-size:.32rem;color:#999;text-align:center;text-decoration:underline;padding-bottom:.8rem}.p{text-align:justify;display:block;box-sizing:border-box}.layer .title,.p{font-size:.4rem;line-height:.64rem;margin-bottom:.4rem}.layer .title{text-align:center}.richtext{margin-bottom:.5333rem}.button{width:4rem}
-/*# sourceMappingURL=pay.css.map?v=d5a4df90*/
+.container{padding:0 .4rem;-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between}.h1{font-size:.4rem;line-height:.64rem;padding:.6533rem 0}.list .item{height:1.3333rem;border-radius:.1333rem;border:.0267rem solid #000;margin-bottom:.4rem;box-sizing:border-box;padding:0 .4rem;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;font-size:.4rem;color:#000}.list .item.active{background-color:#cc1619;border-color:#cc1619;color:#fff}.buytip{font-size:.32rem;color:#999;text-align:center;text-decoration:underline;padding-bottom:.8rem}.p{text-align:justify;display:block;box-sizing:border-box}.layer .title,.p{font-size:.4rem;line-height:.64rem;margin-bottom:.4rem}.layer .title{text-align:center}.layer .richtext{margin-bottom:.5333rem}.layer .button{width:4rem}
+/*# sourceMappingURL=pay.css.map?v=76949729*/

+ 1 - 1
service/assets/mobile/css/pay.css.map

@@ -1 +1 @@
-{"version":3,"sources":[],"names":[],"mappings":"","file":"css/pay.css?v=d5a4df90","sourceRoot":""}
+{"version":3,"sources":[],"names":[],"mappings":"","file":"css/pay.css?v=76949729","sourceRoot":""}

+ 2 - 2
service/assets/mobile/css/success.css

@@ -1,2 +1,2 @@
-.code{background:url(../images/code.png) no-repeat top #eee;background-size:4.8rem 4.8133rem;height:3.1067rem;padding-bottom:.533333rem;padding-top:1.7067rem;margin-bottom:.5333rem}.code img{width:2.7467rem;height:2.7467rem;display:block;margin:0 auto}.success{background:url(../images/success.png) no-repeat top;background-size:2.0667rem 1.5733rem;width:2.0667rem;height:1.5733rem;margin:0 auto .506667rem}.txt{margin:0 1.6rem .533333rem;font-size:.3733rem}.txt span{color:#d1171a}.download{margin-bottom:.333333rem;font-size:.373333rem;text-align:center}.download *{border-bottom:.026667rem solid #d1171a;color:#d1171a}.tip{margin-bottom:.5333rem;text-align:center;color:#999;font-size:.32rem}.read{margin-bottom:1.066667rem;position:relative;height:.9333rem}.read p{left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);background:url(../images/].png) no-repeat 100% 0;background-size:.2667rem .9333rem;padding:0 .4rem;color:#d1171a;font-size:.3733rem;line-height:.933333rem}.read p,.read P:before{position:absolute;top:0;height:.9333rem}.read P:before{left:0;background:url(../images/[.png) no-repeat 0 0;background-size:.2667rem .9333rem;padding-right:.4rem;content:""}.btn{margin:0 .6rem}.btn .button{float:right;width:4rem}.btn .button.opposite{float:left}
-/*# sourceMappingURL=success.css.map?v=d5a4df90*/
+.code{background:url(../images/code.png) no-repeat top #eee;background-size:4.8rem 4.8133rem;height:3.1067rem;padding-bottom:.533333rem;padding-top:1.7067rem;margin-bottom:.5333rem}.code img{width:2.7467rem;height:2.7467rem;display:block;margin:0 auto}.success{background:url(../images/success.png) no-repeat top;background-size:2.0667rem 1.5733rem;width:2.0667rem;height:1.5733rem;margin:0 auto .506667rem}.txt{margin:0 1.6rem .533333rem;font-size:.3733rem}.txt span{color:#d1171a}.download{margin-bottom:.333333rem;font-size:.373333rem;text-align:center}.download *{border-bottom:.026667rem solid #d1171a;color:#d1171a}.tip{margin-bottom:.5333rem;text-align:center;color:#999;font-size:.32rem}.read{margin-bottom:1.066667rem;position:relative;height:.9333rem}.read p{left:50%;transform:translateX(-50%);background:url(../images/].png) no-repeat 100% 0;background-size:.2667rem .9333rem;padding:0 .4rem;color:#d1171a;font-size:.3733rem;line-height:.933333rem}.read p,.read P:before{position:absolute;top:0;height:.9333rem}.read P:before{left:0;background:url(../images/[.png) no-repeat 0 0;background-size:.2667rem .9333rem;padding-right:.4rem;content:""}.btn{margin:0 .6rem}.btn .button{float:right;width:4rem}.btn .button.opposite{float:left}
+/*# sourceMappingURL=success.css.map?v=76949729*/

+ 1 - 1
service/assets/mobile/css/success.css.map

@@ -1 +1 @@
-{"version":3,"sources":[],"names":[],"mappings":"","file":"css/success.css?v=d5a4df90","sourceRoot":""}
+{"version":3,"sources":[],"names":[],"mappings":"","file":"css/success.css?v=76949729","sourceRoot":""}

File diff suppressed because it is too large
+ 0 - 0
service/assets/mobile/js/global.js


File diff suppressed because it is too large
+ 0 - 0
service/assets/mobile/js/global.js.map


+ 2 - 2
service/assets/mobile/js/index.js

@@ -1,2 +1,2 @@
-webpackJsonp([3],{1:function(n,t,c){"use strict";c(0),c(8)},13:function(n,t,c){n.exports=c(1)},8:function(n,t){}},[13]);
-//# sourceMappingURL=index.js.map?v=51ba158e
+webpackJsonp([3],{1:function(n,t,c){"use strict";c(0),c(10)},10:function(n,t){},15:function(n,t,c){n.exports=c(1)}},[15]);
+//# sourceMappingURL=index.js.map?v=76949729

+ 1 - 1
service/assets/mobile/js/index.js.map

@@ -1 +1 @@
-{"version":3,"sources":["webpack:///js","webpack:///./mobile/src/router/index.js"],"names":["webpackJsonp","1","module","exports","__webpack_require__","13","8"],"mappings":"AAAAA,cAAc,IAERC,EACA,SAAUC,EAAQC,EAASC,GAEjC,YCLAA,GAAA,GACAA,EAAA,IDaMC,GACA,SAAUH,EAAQC,EAASC,GAEjCF,EAAOC,QAAUC,EAAoB,IAK/BE,EACA,SAAUJ,EAAQC,OAMrB","file":"js/index.js?v=51ba158e","sourcesContent":["webpackJsonp([3],{\n\n/***/ 1:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n__webpack_require__(0);\n\n__webpack_require__(8);\n\n/***/ }),\n\n/***/ 13:\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(1);\n\n\n/***/ }),\n\n/***/ 8:\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ })\n\n},[13]);\n\n\n// WEBPACK FOOTER //\n// js?v=51ba158e","import './global';\nimport '../css/index.css';\n\n\n\n// WEBPACK FOOTER //\n// ./mobile/src/router/index.js"],"sourceRoot":""}
+{"version":3,"sources":["webpack:///js","webpack:///./mobile/src/router/index.js"],"names":["webpackJsonp","1","module","exports","__webpack_require__","10","15"],"mappings":"AAAAA,cAAc,IAERC,EACA,SAAUC,EAAQC,EAASC,GAEjC,YCLAA,GAAA,GACAA,EAAA,KDaMC,GACA,SAAUH,EAAQC,KAMlBG,GACA,SAAUJ,EAAQC,EAASC,GAEjCF,EAAOC,QAAUC,EAAoB,MAKlC","file":"js/index.js?v=76949729","sourcesContent":["webpackJsonp([3],{\n\n/***/ 1:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n__webpack_require__(0);\n\n__webpack_require__(10);\n\n/***/ }),\n\n/***/ 10:\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ }),\n\n/***/ 15:\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(1);\n\n\n/***/ })\n\n},[15]);\n\n\n// WEBPACK FOOTER //\n// js?v=76949729","import './global';\r\nimport '../css/index.css';\r\n\n\n\n// WEBPACK FOOTER //\n// ./mobile/src/router/index.js"],"sourceRoot":""}

File diff suppressed because it is too large
+ 6 - 2
service/assets/mobile/js/list.js


File diff suppressed because it is too large
+ 0 - 1
service/assets/mobile/js/list.js.map


+ 2 - 2
service/assets/mobile/js/pay.js

@@ -1,2 +1,2 @@
-webpackJsonp([1],{10:function(n,e){},15:function(n,e,o){n.exports=o(3)},3:function(n,e,o){"use strict";o(0),o(10),$(document).on("touchend",'[bind-id="item"]',function(){$(this).addClass("active").siblings(".item").removeClass("active")}),$("#open").on("touchend",function(){$("#layer").removeClass("fn-hide")}),$("#close").on("touchend",function(){$("#layer").addClass("fn-hide")})}},[15]);
-//# sourceMappingURL=pay.js.map?v=51ba158e
+webpackJsonp([2],{12:function(n,e){},17:function(n,e,o){n.exports=o(3)},3:function(n,e,o){"use strict";o(0),o(12),$(document).on("touchend",'[bind-id="item"]',function(){$(this).addClass("active").siblings(".item").removeClass("active")}),$("#open").on("touchend",function(){$("#layer").removeClass("fn-hide")}),$("#close").on("touchend",function(){$("#layer").addClass("fn-hide")})}},[17]);
+//# sourceMappingURL=pay.js.map?v=76949729

+ 1 - 1
service/assets/mobile/js/pay.js.map

@@ -1 +1 @@
-{"version":3,"sources":["webpack:///js/pay.js","webpack:///./mobile/src/router/pay.js"],"names":["webpackJsonp","10","module","exports","15","__webpack_require__","3","$","document","on","this","addClass","siblings","removeClass"],"mappings":"AAAAA,cAAc,IAERC,GACA,SAAUC,EAAQC,KAMlBC,GACA,SAAUF,EAAQC,EAASE,GAEjCH,EAAOC,QAAUE,EAAoB,IAK/BC,EACA,SAAUJ,EAAQC,EAASE,GAEjC,YCpBAA,GAAA,GACAA,EAAA,IAEAE,EAAEC,UAAUC,GAAG,WAAY,mBAAoB,WAC3CF,EAAEG,MAAMC,SAAS,UAAUC,SAAS,SAASC,YAAY,YAG7DN,EAAE,SAASE,GAAG,WAAW,WACrBF,EAAE,UAAUM,YAAY,aAG5BN,EAAE,UAAUE,GAAG,WAAW,WACtBF,EAAE,UAAUI,SAAS,gBD6BtB","file":"js/pay.js?v=51ba158e","sourcesContent":["webpackJsonp([1],{\n\n/***/ 10:\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ }),\n\n/***/ 15:\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(3);\n\n\n/***/ }),\n\n/***/ 3:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n__webpack_require__(0);\n\n__webpack_require__(10);\n\n$(document).on('touchend', '[bind-id=\"item\"]', function () {\n    $(this).addClass('active').siblings('.item').removeClass('active');\n});\n\n$('#open').on('touchend', function () {\n    $('#layer').removeClass('fn-hide');\n});\n\n$('#close').on('touchend', function () {\n    $('#layer').addClass('fn-hide');\n});\n\n/***/ })\n\n},[15]);\n\n\n// WEBPACK FOOTER //\n// js/pay.js?v=51ba158e","import './global';\nimport '../css/pay.css';\n\n$(document).on('touchend', '[bind-id=\"item\"]', function(){\n    $(this).addClass('active').siblings('.item').removeClass('active');\n});\n\n$('#open').on('touchend',function(){\n    $('#layer').removeClass('fn-hide');\n});\n\n$('#close').on('touchend',function(){\n    $('#layer').addClass('fn-hide');\n});\n\n\n\n// WEBPACK FOOTER //\n// ./mobile/src/router/pay.js"],"sourceRoot":""}
+{"version":3,"sources":["webpack:///js/pay.js","webpack:///./mobile/src/router/pay.js"],"names":["webpackJsonp","12","module","exports","17","__webpack_require__","3","$","document","on","this","addClass","siblings","removeClass"],"mappings":"AAAAA,cAAc,IAERC,GACA,SAAUC,EAAQC,KAMlBC,GACA,SAAUF,EAAQC,EAASE,GAEjCH,EAAOC,QAAUE,EAAoB,IAK/BC,EACA,SAAUJ,EAAQC,EAASE,GAEjC,YCpBAA,GAAA,GACAA,EAAA,IAEAE,EAAEC,UAAUC,GAAG,WAAY,mBAAoB,WAC3CF,EAAEG,MAAMC,SAAS,UAAUC,SAAS,SAASC,YAAY,YAG7DN,EAAE,SAASE,GAAG,WAAW,WACrBF,EAAE,UAAUM,YAAY,aAG5BN,EAAE,UAAUE,GAAG,WAAW,WACtBF,EAAE,UAAUI,SAAS,gBD6BtB","file":"js/pay.js?v=76949729","sourcesContent":["webpackJsonp([2],{\n\n/***/ 12:\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ }),\n\n/***/ 17:\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(3);\n\n\n/***/ }),\n\n/***/ 3:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n__webpack_require__(0);\n\n__webpack_require__(12);\n\n$(document).on('touchend', '[bind-id=\"item\"]', function () {\n    $(this).addClass('active').siblings('.item').removeClass('active');\n});\n\n$('#open').on('touchend', function () {\n    $('#layer').removeClass('fn-hide');\n});\n\n$('#close').on('touchend', function () {\n    $('#layer').addClass('fn-hide');\n});\n\n/***/ })\n\n},[17]);\n\n\n// WEBPACK FOOTER //\n// js/pay.js?v=76949729","import './global';\r\nimport '../css/pay.css';\r\n\r\n$(document).on('touchend', '[bind-id=\"item\"]', function(){\r\n    $(this).addClass('active').siblings('.item').removeClass('active');\r\n});\r\n\r\n$('#open').on('touchend',function(){\r\n    $('#layer').removeClass('fn-hide');\r\n});\r\n\r\n$('#close').on('touchend',function(){\r\n    $('#layer').addClass('fn-hide');\r\n});\r\n\n\n\n// WEBPACK FOOTER //\n// ./mobile/src/router/pay.js"],"sourceRoot":""}

+ 2 - 2
service/assets/mobile/js/success.js

@@ -1,2 +1,2 @@
-webpackJsonp([0],{11:function(n,t){},16:function(n,t,c){n.exports=c(4)},4:function(n,t,c){"use strict";c(0),c(11)}},[16]);
-//# sourceMappingURL=success.js.map?v=51ba158e
+webpackJsonp([1],{13:function(n,t){},18:function(n,t,c){n.exports=c(4)},4:function(n,t,c){"use strict";c(0),c(13)}},[18]);
+//# sourceMappingURL=success.js.map?v=76949729

+ 1 - 1
service/assets/mobile/js/success.js.map

@@ -1 +1 @@
-{"version":3,"sources":["webpack:///js/success.js","webpack:///./mobile/src/router/success.js"],"names":["webpackJsonp","11","module","exports","16","__webpack_require__","4"],"mappings":"AAAAA,cAAc,IAERC,GACA,SAAUC,EAAQC,KAMlBC,GACA,SAAUF,EAAQC,EAASE,GAEjCH,EAAOC,QAAUE,EAAoB,IAK/BC,EACA,SAAUJ,EAAQC,EAASE,GAEjC,YCpBAA,GAAA,GACAA,EAAA,OD4BG","file":"js/success.js?v=51ba158e","sourcesContent":["webpackJsonp([0],{\n\n/***/ 11:\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ }),\n\n/***/ 16:\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(4);\n\n\n/***/ }),\n\n/***/ 4:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n__webpack_require__(0);\n\n__webpack_require__(11);\n\n/***/ })\n\n},[16]);\n\n\n// WEBPACK FOOTER //\n// js/success.js?v=51ba158e","import './global';\nimport '../css/success.css';\n\n\n\n// WEBPACK FOOTER //\n// ./mobile/src/router/success.js"],"sourceRoot":""}
+{"version":3,"sources":["webpack:///js/success.js","webpack:///./mobile/src/router/success.js"],"names":["webpackJsonp","13","module","exports","18","__webpack_require__","4"],"mappings":"AAAAA,cAAc,IAERC,GACA,SAAUC,EAAQC,KAMlBC,GACA,SAAUF,EAAQC,EAASE,GAEjCH,EAAOC,QAAUE,EAAoB,IAK/BC,EACA,SAAUJ,EAAQC,EAASE,GAEjC,YCpBAA,GAAA,GACAA,EAAA,OD4BG","file":"js/success.js?v=76949729","sourcesContent":["webpackJsonp([1],{\n\n/***/ 13:\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ }),\n\n/***/ 18:\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(4);\n\n\n/***/ }),\n\n/***/ 4:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n__webpack_require__(0);\n\n__webpack_require__(13);\n\n/***/ })\n\n},[18]);\n\n\n// WEBPACK FOOTER //\n// js/success.js?v=76949729","import './global';\r\nimport '../css/success.css';\r\n\n\n\n// WEBPACK FOOTER //\n// ./mobile/src/router/success.js"],"sourceRoot":""}

+ 83 - 0
service/assets/mobile/list_code.html

@@ -0,0 +1,83 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
+    <title>精美时尚</title>
+<link href="css/global.css?v=76949729" rel="stylesheet"><link href="css/list.css?v=76949729" rel="stylesheet"></head>
+
+<body>
+    <h2 class="title">Jstyle精美电子刊·	订阅</h2>
+    <div class="logo">Jstyle精美</div>
+    <div class="info-txt">这里加一行简介</div>
+    <div class="tab" node-id="tab">
+        <div class="li active"><span>预购杂志</span></div>
+        <div class="li"><span>兑换码</span></div>
+    </div>
+    <div class="list" node-id="list">
+        <div class="item">
+            <img class="default" />
+            <div class="info">
+                <h2>段宜恩电子刊段宜恩电子刊段宜恩电子刊</h2>
+                <p class="clearfix">
+                    <span class="price">¥6.00</span>
+                    <span class="num">销量:5221</span>
+                </p>
+            </div>
+            <button class="button">购买兑换</button>
+        </div>
+        <div class="item">
+            <img class="default" />
+            <div class="info">
+                <h2>段宜恩电子刊段宜恩电子刊段宜恩电子刊</h2>
+                <p class="clearfix">
+                    <span class="price">¥6.00</span>
+                    <span class="num">销量:5221</span>
+                </p>
+            </div>
+            <button class="button">购买兑换</button>
+        </div>
+        
+    </div>
+
+    <div class="list fn-hide" node-id="list">
+        <div class="item2 clearfix">
+            <div class="cover"><img class="default" /></div>
+            <div class="info">
+                <h2>段宜恩电子刊段宜恩电子刊段宜恩电子刊</h2>
+                <p class="code">阅读码:15421DBHJS</p>
+            </div>
+            <button class="button opposite" node-id="rule">使用说明</button>
+            <button class="button" node-id="copy">复制<span>asdfasdfasdf</span></button>
+        </div>
+        <div class="item2 clearfix">
+            <div class="cover"><img class="default" /></div>
+            <div class="info">
+                <h2>段宜恩电子刊段宜恩电子刊段宜恩电子刊</h2>
+                <p class="code">阅读码:1512DBHJS</p>
+            </div>
+            <button class="button opposite" node-id="rule">使用说明</button>
+            <button class="button" node-id="copy">复制<span>2341234234</span></button>
+        </div>
+    </div>
+
+    <div class="mask fn-hide" id="layer">
+        <div class="layer ">
+            <h3 class="title">使用说明</h3>
+            <div class="richtext">asdfsdf</div>
+            <div class="btn-wrapper">
+                <div class="button opposite" id="close">我知道了</div>
+            </div>
+        </div>
+    </div>
+
+    <div class="success fn-hide" id="success">复制成功</div>
+<script type="text/javascript" src="js/global.js?v=76949729"></script><script type="text/javascript" src="js/list.js?v=76949729"></script></body>
+</html>
+<script>
+function pay(url)
+{
+    location.href = url;
+}
+</script>

+ 47 - 3
service/src/Base.php

@@ -4,11 +4,48 @@ use Dever;
 
 class Base
 {
+    private $key = 'jmbuybuybuy';
+
 	public function __construct()
+    {
+        $p = Dever::input('p');
+        if ($p) {
+            $this->config = Dever::json_decode(Dever::decode($p, $this->key));
+        }
+        # 小刊分类
+        $this->cate = $this->getConfig('cate', 1);
+        # 渠道
+        $this->source = $this->getConfig('source', 1);
+        # 类型 1为直接购买 2为购买兑换码
+        $this->type = $this->getConfig('type', 1);
+        # 销售商
+        $this->seller = $this->getConfig('seller', 1);
+        # 用户信息
+        $this->user = Dever::load('passport/user')->data();
+    }
+
+    # 创建url
+    public function createUrl()
     {
         $this->cate = Dever::input('cate', 1);
+        # 渠道
         $this->source = Dever::input('source', 1);
-        $this->user = Dever::load('passport/user')->data();
+        # 类型 1为直接购买 2为购买兑换码
+        $this->type = Dever::input('type', 1);
+        # 销售商
+        $this->seller = Dever::input('seller', 1);
+        
+        $url = $this->url('home');
+
+        return $url;
+    }
+
+    private function getConfig($key, $value)
+    {
+        if (isset($this->config[$key]) && $this->config[$key]) {
+            return $this->config[$key];
+        }
+        return $value;
     }
 
     # 获取基本配置
@@ -28,8 +65,15 @@ class Base
     # 生成url
     protected function url($uri, $param = array())
     {
-    	$param['cate'] = $this->cate;
-    	$param['source'] = $this->source;
+        if ($uri == 'list' && $this->type == 2) {
+            $uri = 'list_code';
+        }
+    	$send['cate'] = $this->cate;
+    	$send['source'] = $this->source;
+        $send['type'] = $this->type;
+        $send['seller'] = $this->seller;
+        $param['p'] = Dever::encode(Dever::json_encode($send), $this->key);
+
     	$param = http_build_query($param);
     	$url = Dever::url($uri . '?' . $param, 'service');
 

+ 33 - 2
service/src/Buy.php

@@ -12,13 +12,15 @@ class Buy extends Base
     	if (!$this->user) {
     		return $this->location('home');
     	}
-
-    	# 记录渠道数
     }
     
     # 列表页
     public function lists()
     {
+        # 记录渠道pv、uv数
+        if (Dever::project('source')) {
+            Dever::load('source/lib/core')->save($this->user['id'], $this->source);
+        }
         $where['cate_id'] = $this->cate;
         $where['buy'] = 1;
         $data = Dever::db('journal/info')->getAll($where);
@@ -40,6 +42,26 @@ class Buy extends Base
         return $data;
     }
 
+    # 列表页 我已购买的兑换码
+    public function lists_code()
+    {
+        $where['create_uid'] = $this->user['id'];
+        $where['type'] = 3;
+        $data = Dever::db('journal/order')->getAll($where);
+
+        if ($data) {
+            foreach ($data as $k => $v) {
+                $info = Dever::db('journal/info')->one($v['product_id']);
+
+                $data[$k]['code_string'] = '阅读码:' . $v['code'];
+
+                $data[$k]['name'] = $info['name'];
+            }
+        }
+
+        return $data;
+    }
+
     # 详细信息
     public function info()
     {
@@ -169,6 +191,15 @@ class Buy extends Base
         	$order_data['source'] = $this->source;
         }
 
+        if ($this->seller) {
+            $order_data['seller_id'] = $this->seller;
+        }
+
+        if ($this->type == 2) {
+            # 购买兑换码
+            $order_data['type'] = 3;
+        }
+
         $id = Dever::db('journal/order')->insert($order_data);
 
         if (!$id) {

+ 1 - 2
service/src/Data.php

@@ -8,12 +8,11 @@ class Data extends Base
     public function __construct()
     {
         parent::__construct();
-
-        # 记录渠道数
     }
 
     public function checkLogin()
     {
+        //return $this->location('list');
         if ($this->user) {
             return $this->location('list');
         }

+ 58 - 0
service/template/mobile/list_code.php

@@ -0,0 +1,58 @@
+<?php
+
+$view
+
+->set('name', 'list')
+
+->import('inc/head')
+
+->fetch('.title', 'service/base.config#title')
+
+->fetch('.logo@style', 'service/base.config#bglogo')
+
+->fetch('.info-txt', 'service/base.config#desc')
+
+->fetch('.richtext', 'service/base.config#code_desc')
+
+# 循环
+->loop
+(
+    '.item',
+    'service/buy.lists',
+    array
+    (
+        'h2' => '$v.name',
+        '.price' => '$v.price',
+
+        '.num' => '$v.ding',
+
+        'img' => array
+        (
+            'src' => '$v.pic_gd',
+        ),
+
+        '.button' => array
+        (
+            'onclick' => 'pay(\'<{$v.pay_url}>\')',
+        )
+        
+    )
+)
+
+->loop
+(
+    '.item2',
+    'service/buy.lists_code',
+    array
+    (
+        'h2' => '$v.name',
+        '.code' => '$v.code_string',
+
+        'span' => '$v.code',
+        
+    )
+)
+
+->import('inc/foot')
+
+->display();

+ 19 - 6
source/database/info.php

@@ -2,7 +2,10 @@
 
 $link = function()
 {
-	$array = array();
+	$array = array
+	(
+		-1 => array('id' => -1, 'name' => '通用'),
+	);
 	$info = Dever::db('source/link')->state();
 	if($info)
 	{
@@ -46,7 +49,7 @@ return array
 		(
 			'type' 		=> 'int-11',
 			'name' 		=> '推广链接',
-			'default' 	=> '1',
+			'default' 	=> '-1',
 			'desc' 		=> '推广链接',
 			'match' 	=> 'is_numeric',
 			'update'	=> 'select',
@@ -61,9 +64,9 @@ return array
 			'name' 		=> '渠道二维码',
 			'default' 	=> '',
 			'desc' 		=> '渠道二维码',
-			'match' 	=> 'is_string',
-			'update'	=> 'textarea',
-			'list'		=> 'Dever::load("source/lib/manage.show", "{id}")',
+			'match' 	=> 'option',
+			//'update'	=> 'textarea',
+			//'list'		=> 'Dever::load("source/lib/manage.show", "{id}")',
 		),
 
 		'state'		=> array
@@ -86,12 +89,22 @@ return array
 		),
 	),
 
+	# 默认值
+	'default' => array
+	(
+		'col' => 'name,link_id,state,cdate',
+		'value' => array
+		(
+			'"官方",-1,1,' . time(),
+		),
+	),
+
 	'manage' => array
 	(
 		'delete' => false,
 		'edit' => false,
 		# 列表
-		'list_button' => array
+		'list_buttons' => array
 		(
 			'list' => array('渠道统计', '"stat&search_option_info_id={id}&oper_parent=info"'),
 		),

+ 0 - 2
source/database/stat.php

@@ -71,8 +71,6 @@ return array
 			'desc' 		=> '统计时间',
 			'match' 	=> 'is_numeric',
 			'update'	=> 'select',
-			'option'	=> $action,
-			'search'	=> 'select',
 			'list'		=> true,
 		),
 

+ 1 - 1
video/database/live.php

@@ -77,7 +77,7 @@ return array
 			# 更新另外一个表的字段 => 本表的字段
 			'where' => array('data_id' => 'id', 'type' => 3),
 			# 要更新的数据
-			'update' => array('data_id' => 'id', 'type' => 3, 'pdate' => 'pdate', 'reorder' => 'reorder', 'name' => 'name', 'audit' => 'audit', 'status' => 'status', 'cate_id' => 'cate_id'),
+			'update' => array('data_id' => 'id', 'type' => 3, 'pdate' => 'pdate', 'reorder' => 'reorder', 'name' => 'name', 'audit' => 'audit', 'status' => 'status', 'cate_id' => 'cate_id', 'state' => 'state'),
 		)
 	),
 	# 数据结构

+ 1 - 1
video/database/vod.php

@@ -64,7 +64,7 @@ return array
 			# 更新另外一个表的字段 => 本表的字段
 			'where' => array('data_id' => 'id', 'type' => 2),
 			# 要更新的数据
-			'update' => array('data_id' => 'id', 'type' => 2, 'pdate' => 'pdate', 'reorder' => 'reorder', 'name' => 'name', 'audit' => 'audit', 'status' => 'status', 'cate_id' => 'cate_id'),
+			'update' => array('data_id' => 'id', 'type' => 2, 'pdate' => 'pdate', 'reorder' => 'reorder', 'name' => 'name', 'audit' => 'audit', 'status' => 'status', 'cate_id' => 'cate_id', 'state' => 'state'),
 		)
 	),
 	# 数据结构

Some files were not shown because too many files changed in this diff