提交 f6854e90 编写于 作者: 李光春's avatar 李光春

- 更新请求门面(增加判断是否为微信小程序访问)

上级 e40e69cd
......@@ -25,7 +25,7 @@ use think\db\exception\ModelNotFoundException;
/**
* 定义当前版本
*/
const VERSION = '6.0.76';
const VERSION = '6.0.77';
if (!function_exists('get_ip_info')) {
......
......@@ -36,6 +36,7 @@ use think\Facade;
* @method static bool isAjax() 判断是否为Ajax方式
* @method static bool isMobile() 判断是否为移动端访问
* @method static bool isWeXin() 判断是否微信内置浏览器访问
* @method static bool isWeXinMp() 判断是否为微信小程序访问
* @method static bool isAliPay() 判断是否支付宝内置浏览器访问
* @method static bool isQQ() 判断是否QQ内置浏览器访问
* @method static bool isQQBrowser() 判断是否QQ浏览器访问
......
......@@ -134,6 +134,16 @@ class Requests
return false;
}
/**
* 判断是否为微信小程序访问
* @return bool
*/
public function isWeXinMp(): bool
{
if (strpos(request()->server('HTTP_USER_AGENT'), 'miniProgram') !== false) return true;
return false;
}
/**
* 判断是否支付宝内置浏览器访问
* @return bool
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册