rabin 3 سال پیش
والد
کامیت
46ec2d5482
3فایلهای تغییر یافته به همراه87 افزوده شده و 0 حذف شده
  1. 1 0
      app/shop/database/info.php
  2. 16 0
      app/shop/src/Main.php
  3. 70 0
      main/database/sell_config.php

+ 1 - 0
app/shop/database/info.php

@@ -783,6 +783,7 @@ return array
                 'city' => 'yes',
                 'coupon_city' => 'yes',
                 'id' => 'yes',
+                'type' => 'yes',
                 'status' => 1,
                 'state' => 1,
             ),

+ 16 - 0
app/shop/src/Main.php

@@ -215,4 +215,20 @@ class Main extends Core
         $where['type'] = 10;
         return Dever::db('shop/info')->getDataByType($where);
     }
+
+    # 获取兑换页信息
+    public function duihuan()
+    {
+        $this->data['user'] = $this->user;
+        $this->data['config'] = Dever::db('main/sell_config')->find();
+        if ($this->data['config']['duihuan']) {
+            $this->data['config']['duihuan'] = Dever::array_decode($this->data['config']['duihuan']);
+
+            if (isset($this->data['config']['duihuan'][2]) && $this->data['config']['duihuan'][2]) {
+                $this->data['config']['duihuan'][2]['shop'] = Dever::db('shop/info')->getOne(array('type' => 10));
+            }
+        }
+        
+        return $this->data;
+    }
 }

+ 70 - 0
main/database/sell_config.php

@@ -6,6 +6,13 @@ $home_top_type = array
     2 => '不显示',
 );
 
+$duihuan = array
+(
+    1 => '第一步:授权登录',
+    2 => '第二步:绑定厨人E卡',
+    3 => '第三步:购买商品',
+);
+
 return array
 (
     # 表名
@@ -131,6 +138,69 @@ return array
             'update'    => 'text',
         ),
 
+        'duihuan'     => array
+        (
+            'type'      => 'text-255',
+            'name'      => '兑换页信息',
+            'default'   => '',
+            'desc'      => '兑换页信息',
+            'match'     => 'is_string',
+            'option'    => $duihuan,
+            'update'    => array
+            (
+                array
+                (
+                    'col'       => 'name',
+                    'name'      => '标题',
+                    'default'   => '',
+                    'desc'      => '标题',
+                    'match'     => 'is_string',
+                    'update'    => 'text',
+                ),
+
+                array
+                (
+                    'col'       => 'pic',
+                    'name'      => '图片-为空则不显示,一般为做好的帮助提示图片',
+                    'default'   => '',
+                    'desc'      => '图片',
+                    'match'     => 'is_string',
+                    'update'    => 'image',
+                    'key'       => 1,
+                ),
+
+                array
+                (
+                    'col'       => 'desc',
+                    'name'      => '描述-为空则不显示',
+                    'default'   => '',
+                    'desc'      => '描述',
+                    'match'     => 'is_string',
+                    'update'    => 'textarea',
+                ),
+
+                array
+                (
+                    'col'       => 'button',
+                    'name'      => '按钮文字',
+                    'default'   => '',
+                    'desc'      => '按钮文字',
+                    'match'     => 'is_string',
+                    'update'    => 'text',
+                ),
+            ),
+        ),
+
+        'duihuan_desc'      => array
+        (
+            'type'      => 'varchar-1000',
+            'name'      => '兑换页底部描述',
+            'default'   => '',
+            'desc'      => '兑换页底部描述',
+            'match'     => 'option',
+            'update'    => 'textarea',
+        ),
+
         'state'     => array
         (
             'type'      => 'tinyint-1',