123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230 |
- <?php
- $type = array
- (
- 1 => '平台购买',
- 2 => '门店购买',
- );
- $shop_type = Dever::db('shop/info')->config['config_type'];
- $city_type = array
- (
- 1 => '全国可用',
- 2 => '所选城市可用',
- );
- $city = function() {
- return Dever::load('shop/lib/info')->getCity();
- };
- return array
- (
- # 表名
- 'name' => 'type',
- # 显示给用户看的名称
- 'lang' => '类型配置',
- # 后台菜单排序
- 'order' => -1,
- # 数据结构
- 'struct' => array
- (
- 'id' => array
- (
- 'type' => 'int-11',
- 'name' => 'ID',
- 'default' => '',
- 'desc' => '',
- 'match' => 'is_numeric',
- 'search' => 'order',
- 'list' => true,
- 'order' => 'desc',
- ),
-
- 'name' => array
- (
- 'type' => 'varchar-200',
- 'name' => '类型名称',
- 'default' => '',
- 'desc' => '类型名称',
- 'match' => 'is_string',
- 'update' => 'text',
- 'search' => 'fulltext',
- 'list' => true,
- ),
- 'desc' => array
- (
- 'type' => 'varchar-800',
- 'name' => '类型描述',
- 'default' => '',
- 'desc' => '类型描述',
- 'match' => 'is_string',
- 'update' => 'textarea',
- ),
- 'type' => array
- (
- 'type' => 'int-11',
- 'name' => '购买方式',
- 'default' => '1',
- 'desc' => '购买方式',
- 'match' => 'is_numeric',
- 'update' => 'select',
- 'option' => $type,
- 'search' => 'radio',
- 'list' => true,
- ),
- 'shop_type' => array
- (
- 'type' => 'varchar-200',
- 'name' => '可用门店类型',
- 'default' => '',
- 'desc' => '可用门店类型',
- 'match' => 'is_string',
- 'update' => 'checkbox',
- 'option' => $shop_type,
- 'list' => true,
- ),
- 'city_type' => array
- (
- 'type' => 'int-11',
- 'name' => '可用范围',
- 'default' => '1',
- 'desc' => '可用范围',
- 'match' => 'is_numeric',
- 'update' => 'radio',
- 'option' => $city_type,
- 'list' => true,
- 'control' => 'city_type',
- ),
- 'city' => array
- (
- 'type' => 'varchar-2000',
- 'name' => '选择城市',
- 'default' => '',
- 'desc' => '选择城市',
- 'match' => 'is_string',
- 'update' => 'checkbox',
- 'option' => $city,
- 'show' => 'city_type=2',
- ),
- 'cover' => array
- (
- 'type' => 'varchar-150',
- 'name' => '封面图',
- 'default' => '',
- 'desc' => '封面图',
- 'match' => 'option',
- 'update' => 'image',
- 'key' => '1',
- 'place' => '672*386',
- ),
- 'icon' => array
- (
- 'type' => 'varchar-150',
- 'name' => '图标',
- 'default' => '',
- 'desc' => '图标',
- 'match' => 'option',
- 'update' => 'image',
- 'key' => '1',
- 'place' => '150*150',
- ),
- 'bgpic' => array
- (
- 'type' => 'varchar-150',
- 'name' => '背景图',
- 'default' => '',
- 'desc' => '背景图',
- 'match' => 'option',
- 'update' => 'image',
- 'key' => '1',
- 'place' => '686*160',
- ),
- 'content' => array
- (
- 'type' => 'text-255',
- 'name' => '购买使用须知',
- 'default' => '',
- 'desc' => '购买使用须知',
- 'match' => 'is_string',
- 'update' => 'textarea',
- 'key' => '1',
- ),
- 'reorder' => array
- (
- 'type' => 'int-11',
- 'name' => '排序-数值越大越靠前,相当于置顶',
- 'default' => '1',
- 'desc' => '请输入排序',
- 'match' => 'option',
- //'update' => 'text',
- 'search' => 'order',
- 'list' => true,
- 'order' => 'desc',
- 'edit' => 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,
- 'list' => 'date("Y-m-d H:i:s", {cdate})',
- ),
- ),
- 'default' => array
- (
- 'col' => 'id,name,type,shop_type,city_type,reorder,state,cdate',
- 'value' => array
- (
- '1,"通用卡", 1, "1,2,10", 1, 10, 1,' . DEVER_TIME,
- '2,"商超卡", 1, "2", 1, 9, 1,' . DEVER_TIME,
- '3,"城市卡", 1, "1,2", 2, 8, 1,' . DEVER_TIME,
- '4,"体验卡", 2, "1", 1, 7, 1,' . DEVER_TIME,
- '5,"门店卡", 2, "1,2", 1, 6, 1,' . DEVER_TIME,
- '6,"平台店专用卡", 2, "10", 1, 5, 1,' . DEVER_TIME,
- ),
- ),
- 'manage' => array
- (
- 'delete' => false,
- ),
- 'request' => array
- (
- 'getAll' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'type' => 'yes',
- 'state' => 1,
- ),
- 'type' => 'all',
- 'col' => '*',
- ),
- ),
- );
|