1 Star 0 Fork 74

shushu / 人人商城文档

forked from yoby / 人人商城文档 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
常用函数解析.md 2.10 KB
一键复制 编辑 原始数据 按行查看 历史
yoby 提交于 2017-11-18 14:28 . ok
  • 写入日志
 load()->func('logging');
 logging_run('时间戳:'.time());
  • 获取参数设置
$trade = m('common')->getSysset('trade', $_W['uniacid']);
array (size=29)
  'credittext' => string '积分' (length=6)
  'moneytext' => string '米额' (length=6)
  'set_realname' => string '0' (length=1)
  'set_mobile' => string '0' (length=1)
  'closeorder' => int 1
  'willcloseorder' => int 30
  'receive' => string '7' (length=1)
  'refunddays' => string '' (length=0)
  'refundcontent' => string '请详细说明退款理由' (length=27)
  'closerecharge' => string '0' (length=1)
  'money' => string '' (length=0)
  'credit' => string '' (length=0)
  'minimumcharge' => float 0
  'withdraw' => string '0' (length=1)
  'withdrawmoney' => string '' (length=0)
  'withdrawcharge' => string '' (length=0)
  'withdrawbegin' => float 0
  'withdrawend' => float 0
  'maxcredit' => string '0' (length=1)
  'closecomment' => string '0' (length=1)
  'closecommentshow' => string '0' (length=1)
  'commentchecked' => string '0' (length=1)
  'shareaddress' => string '0' (length=1)
  'istimetext' => string '限时购' (length=9)
  'nodispatchareas' => string 's:0:"";' (length=7)
  'nodispatchareas_code' => string 's:0:"";' (length=7)
  'withdrawcashweixin' => int 0
  'withdrawcashalipay' => int 0
  'withdrawcashcard' => int 0
  • m函数,调用模型的方法,模型路径ewei_shopv2\core\model
m('member')->getMember($_W['openid']);//获取用户信息
$ordersn = m('common')->createNO('order', 'ordersn', 'ME');//生成订单号,参数1是表名,参数2是字段名,参数3是前缀
  • plugin_run,调用插件下方法
plugin_run('seckill::getSeckill', $g['goodsid'], $g['optionid'], true, $_W['openid']);
  • 设备判断 is_weixin() 是否微信 is_h5app() 是否h5应用 is_ios() 是否苹果手机或ipad is_mobile() 是否移动设备
  • 生成微信端url和web端url
mobileUrl($do = '', $query = NULL, $full = false);
webUrl($do = '', $query = array(), $full = true);
  • dump($arr) 打印参数
  • 在商品订单表ewei_shop_order中 merchid=0为自营商户,此字段意思是是商户id
PHP
1
https://gitee.com/shuyue/eshop.git
git@gitee.com:shuyue/eshop.git
shuyue
eshop
人人商城文档
master

搜索帮助