- 全局的变量
global $_W,$_GPC;
$_W['siteroot'] http://bxy.x.com/
$_W['account']['name'] 公众号名称
$_W['isajax'] 是否ajax
$_W['ispost'] 是否POST
$_W['uniacid'] 公众号id
$_W['siteurl'] 当前页面地址
以下是微信端
$_W['attachurl'] http://bxy.x.com/attachment/
$_W['os'] => mobile
$_W["container"] => wechat 浏览器类型 wechat 微信浏览器 browser电脑端 web手机端 unknown
$uid = $_W['member']['uid']
$level = $_W['account']['level'] 公众号类型4是认证服务号
$key = $_W['account']['key'];
$secret = $_W['account']['secret'];
$wxid = $_W['account']['original'] ; 原始id
$openid = $_W['openid'] ;
$_W['fans']['nickname'] 昵称
$_W['fans']['follow'] 1是关注
$_W['fans']['followtime']
$_W['fans']['sex'] 1男2女0未知
$_W['fans']['avatar'] 头像
$_W['fans']['tag']
[tag] => Array
(
[subscribe] => 1
[openid] => ocUeXwINHvRqWPSldYZVO4dA_CzI
[nickname] => yoby
[sex] => 1
[language] => zh_CN
[city] => 朝阳
[province] => 北京
[country] => 中国
[subscribe_time] => 1514525087
[remark] =>
[groupid] => 0
[tagid_list] => Array
(
)
[avatar] => http://wx.qlogo.cn/mmopen/PZI7pLaVibDNJVyEfFlibpEQYbx35UG0ibIs3wYo9pWpIE1dGSrddWYZTJwaQPXv5uVcrtaKycLS3eWawibWQOwJNw/132132
)
$_W['member']
[member] => Array
(
[uid] => 13111
[realname] => 李白
[mobile] =>
[email] => c00c4665e89602a8acb8a640d2fa8e3d@we7.cc
[groupid] => 5
[credit1] => 0.00
[credit2] => 10001.00
[credit6] => 0.00
[groupname] => 默认会员组
)
分享签名
$wx = $_W['account']['jssdkconfig'];
Array
(
[appId] => wx6a37
[nonceStr] => Y4LolSN3oPLkPNgW
[timestamp] => 1515655232
[signature] => 57c90216f0b31835667b28423b948db3eb96c010
[url] => http://bxy.x.com
[string1] => jsapi_ticket=kgt8ON7yVITDhtdw
[name] => 公众号名称
)
{if $_W['isfounder']}
是管理员
{/if}
- 预定义常量
IA_ROOT E:/MicroEngine/pro 微擎目录 ATTACHMENT_ROOT F:/wamp/www/attachment/ 附件目录 MODULE_ROOT E:/MicroEngine/pro/addons/we7_store 当前模块目录 MODULE_URL http://bxy.x.com/addons/ewei_shopv2/ 模块url TIMESTAMP 时间戳 CLIENT_IP 客户IP IMS_VERSION 系统版本 $_W['current_module']['config']配置
- 读取配置参数
$g = $this->module['config']['g']; 方法二,在方法1失效下 $setting = pdo_get('uni_account_modules', array('module' => 'yoby_che', 'uniacid' => $params['uniacid'])); $arr = iunserializer($setting['settings']);
作者:Yoby 创建时间:2020-07-23 22:34
更新时间:2024-12-05 13:26
更新时间:2024-12-05 13:26