123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- <?php
- $message = function()
- {
- $array = array(-1 => array('name' => '不选择消息'));
- $data = Dever::load('weixin/content-get_2');
- if($data)
- {
- $array += $data;
- }
- return $array;
- };
- # 时效类型
- $type = array
- (
- 'QR_SCENE' => '临时二维码(有效期7天)',
- 'QR_LIMIT_SCENE' => '永久二维码',
- );
- $code = 'https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=';
- return array
- (
- # 表名
- 'name' => 'code',
- # 显示给用户看的名称
- 'lang' => '二维码管理',
- 'order' => 15,
- 'end' => array
- (
- # 生成二维码
- 'insert' => 'weixin/code.update',
- ),
-
- # 数据结构
- 'struct' => array
- (
- 'id' => array
- (
- 'type' => 'int-11',
- 'name' => 'ID',
- 'default' => '',
- 'desc' => '',
- 'match' => 'is_numeric',
- //'search' => 'order',
- //'list' => true,
- ),
-
- 'site' => array
- (
- 'type' => 'int-11',
- 'name' => '站点',
- 'default' => '',
- 'desc' => '请输入站点',
- 'match' => 'is_numeric',
- ),
-
- 'name' => array
- (
- 'type' => 'varchar-32',
- 'name' => '二维码渠道描述',
- 'default' => '',
- 'desc' => '请输入二维码渠道描述',
- 'match' => 'is_string',
- 'update' => 'text',
- 'search' => 'order,fulltext',
- 'list' => true,
- ),
-
- 'ticket' => array
- (
- 'type' => 'varchar-100',
- 'name' => '二维码',
- 'default' => '',
- 'desc' => '请输入二维码',
- 'match' => 'option',
- //'update' => 'text',
- 'list' => '"<a href='.$code.'".urlencode(\'{ticket}\')." target=_blank><img width=100 height=100 src='.$code.'".urlencode(\'{ticket}\')."></a>"',
- ),
- 'type' => array
- (
- 'type' => 'varchar-15',
- 'name' => '时效类型',
- 'default' => 'QR_LIMIT_SCENE',
- 'desc' => '请选择时效类型',
- 'match' => 'is_string',
- 'option' => $type,
- 'update' => 'select',
- 'list' => true,
- 'show' => 'yes',
- ),
-
- 'message' => array
- (
- 'type' => 'int-11',
- 'name' => '回复消息(选填)',
- 'default' => '',
- 'desc' => '回复消息',
- 'match' => 'option',
- 'update' => 'select',
- 'list' => '{message} > 0 ? Dever::load("weixin/content-one#keywords", {message}) : "未选择消息"',
- 'option' => $message,
- 'show' => 'yes',
- ),
-
- 'expire' => array
- (
- 'type' => 'varchar-20',
- 'name' => '有效时间',
- 'default' => '',
- 'desc' => '请输入有效时间',
- 'match' => 'option',
- ),
-
- 'url' => array
- (
- 'type' => 'varchar-150',
- 'name' => '源地址',
- 'default' => '',
- 'desc' => '请输入源地址',
- 'match' => 'option',
- 'list' => 'table',
- 'modal' => '查看详情',
- ),
-
- 'cdate' => array
- (
- 'type' => 'int-11',
- 'name' => '录入时间',
- 'match' => array('is_numeric', time()),
- 'desc' => '',
- # 只有insert时才生效
- 'insert' => true,
- 'list' => 'date("Y-m-d H:i:s", {cdate})',
- ),
- ),
-
- 'auth' => 'site',
- 'manage' => array
- (
- 'desc' => '1、临时二维码,是有过期时间的,最长可以设置为在二维码生成后的7天(即604800秒)后过期,但能够生成较多数量。临时二维码主要用于帐号绑定等不要求二维码永久保存的业务场景
- <br />2、永久二维码,是无过期时间的,但数量较少(目前为最多10万个)。永久二维码主要用于适用于帐号绑定、用户来源统计等场景。<br />注意:在扫描二维码订阅时,不选择回复消息,系统将默认使用“订阅消息回复”规则',
- ),
- );
|