dever 6 years ago
parent
commit
0ac47db114
4 changed files with 71 additions and 14 deletions
  1. 38 13
      journal/database/cate.php
  2. 18 0
      journal/lib/Pay.php
  3. 14 0
      main/lib/Core.php
  4. 1 1
      main/src/View.php

+ 38 - 13
journal/database/cate.php

@@ -34,6 +34,42 @@ return array
             'search'    => 'fulltext',
             'list'      => true,
         ),
+
+        'title'      => array
+        (
+            'type'      => 'varchar-32',
+            'name'      => '页面title-公众号支付中的页面标题',
+            'default'   => '',
+            'desc'      => '页面title',
+            'match'     => 'is_string',
+            'update'    => 'text',
+            'search'    => 'fulltext',
+           // 'list'      => true,
+        ),
+
+        'cover'     => array
+        (
+            'type'      => 'varchar-150',
+            'name'      => '封面图-公众号支付中的封面图,图片尺寸460*759px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
+            'default'   => '',
+            'desc'      => '封面图',
+            'match'     => 'option',
+            'update'  => 'image',
+            'key'       => '1',
+            'place'     => '150',
+        ),
+
+        'logo'     => array
+        (
+            'type'      => 'varchar-150',
+            'name'      => 'logo图-公众号支付中的logo图,图片尺寸100*100px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
+            'default'   => '',
+            'desc'      => 'logo图',
+            'match'     => 'option',
+            'update'  => 'image',
+            'key'       => '1',
+            'place'     => '150',
+        ),
         
         'reorder'       => array
         (
@@ -82,19 +118,8 @@ return array
 
     'manage' => array
     (
-        'insert' => false,
-        'edit' => false,
-
-        # 自定义快捷新增和编辑
-        'button' => array
-        (
-            '新增' => array('fast'),
-        ),
-        # 快捷更新
-        'list_button' => array
-        (
-            'edit' => array('编辑'),
-        ),
+        //'insert' => false,
+        //'edit' => false,
     ),
 
     'request' => array

+ 18 - 0
journal/lib/Pay.php

@@ -50,6 +50,24 @@ class Pay
                 $journal = Dever::db('journal/info')->one($order['product_id']);
                 Dever::load('message/lib/data')->push(-1, $uid, '购买提醒', '购买成功,您获得了 '.$journal['name'].' 的阅读资格!', $type = 1);
 
+                # 发模板消息
+                /*
+                $send['key'] = 'pay';
+                $send['project_id'] = 1;
+                $send['touser'] = 'pay';
+                $send['page'] = 'page';
+                $send['data'] = array
+                (
+                    'keyword1' => array('value', 1),
+                );
+                $send['form_id'] = 'pay';
+
+                Dever::load('wechat_applet/msg.send', $send);
+                */
+
+                # 发短信
+
+
             } else {
                 Dever::db('journal/order')->update(array('where_id' => $order['id'], 'status' => 3));
             }

+ 14 - 0
main/lib/Core.php

@@ -134,4 +134,18 @@ class Core
         $url = Dever::url();
         Dever::log($url . '||' . $input, 'request');
     }
+
+    protected function writeFormId()
+    {
+        $form_id = Dever::input('form_id');
+        if ($product_id > 0 && $form_id) {
+            $update = array();
+            $update['form_id'] = $form_id;
+            $update['uid'] = $this->data['uid'];
+            
+            $id = Dever::upinto('act/form_id', $update, $update);
+        }
+
+        return 'ok';
+    }
 }

+ 1 - 1
main/src/View.php

@@ -99,7 +99,7 @@ class View extends Core
                 $this->data['user_act']['note'] = 2;
             }
 
-            if (isset($this->data['info']['statue']) && $this->data['info']['statue'] == 2) {
+            if (isset($this->data['info']['status']) && $this->data['info']['status'] == 2) {
                 # 直播中
                 Dever::load('act/lib/watch')->submit($this->data['uid'], $id, $type);
             }