摘要: <?php $arr = array(25,133,452,364,5876,293,607,365,8745,534,18,33); function quick_sort($arr) { // 判断是否需要继续 if (count($arr) <= 1) { return $arr; } $mi 阅读全文
posted @ 2019-09-05 21:04 able-woman 阅读(196) 评论(0) 推荐(0) 编辑
摘要: 1、需要微信开放平台、微信商户平台、微信公众号的账号。 2、将这三个平台建立绑定关系。①微信开放平台需关联微信商户平台,设置关联可获取unionid ②微信公众号需关联微信商品平台 ③微信商户平台上需设置公众号支付授权目录,目录精确到某个控制器例如:http://ios.m.huisou.com/a 阅读全文
posted @ 2019-05-16 10:11 able-woman 阅读(1047) 评论(0) 推荐(0) 编辑
摘要: public function qrcode() { // 二维码链接 $href = 'http://' . $_SERVER['HTTP_HOST'] . '/?g=diapp&m=register&a=index_member&type=1&wxref=mp.weixin.qq.com'; / 阅读全文
posted @ 2019-04-25 16:21 able-woman 阅读(197) 评论(0) 推荐(0) 编辑
摘要: class Wxfollow { protected $appid = 'wxf1d959b99f33b156'; protected $secret = '248f3a560604555ec96215c085cb2723'; protected $url = ""; protected $acce 阅读全文
posted @ 2019-04-25 16:15 able-woman 阅读(844) 评论(1) 推荐(0) 编辑
摘要: 方法一: <?php $access_token = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=XXXXXXXXXXXXXXXXXX&secret=XXXXXXXXXXXXXXXXXXXXX 阅读全文
posted @ 2019-04-25 16:10 able-woman 阅读(1049) 评论(0) 推荐(0) 编辑
摘要: <?php class JSSDK { private $appId; private $appSecret; public function __construct($appId, $appSecret) { $this->appId = $appId; $this->appSecret = $a 阅读全文
posted @ 2019-04-25 16:07 able-woman 阅读(433) 评论(0) 推荐(0) 编辑
摘要: 以下是项目代码(公众号,使用积分进行抽奖活动),只可做参考: 阅读全文
posted @ 2019-03-29 15:50 able-woman 阅读(3311) 评论(0) 推荐(0) 编辑
摘要: 说明:在价格处理方面,往往是两位小数换算成分,如18.90换算成分1890,直接乘以100也就行了,但是又使用了一个转换为整数类型的函数intval() 这下子结果就不对了。 这是因为浮点类型的数字不能在不丢失一点儿精度的情况下通过内部二进制转换得到结果的,换句话说就是浮点类型的计算都会丢失精度的。 阅读全文
posted @ 2019-01-29 15:43 able-woman 阅读(230) 评论(0) 推荐(0) 编辑
摘要: // 获取7月前的时间$time = date('Y-m',strtotime("-0 year -7 month -0 day" ));$where['created_at'] = ['>', $time]; // 统计近7月数据$trend = DB::table('service_orders 阅读全文
posted @ 2019-01-29 15:39 able-woman 阅读(198) 评论(0) 推荐(0) 编辑
摘要: /** * 计算经纬度的距离 * @param $lat1 [纬度1] * @param $lng1 [经度1] * @param $lat2 [纬度2] * @param $lng2 [经度2] * @return int */public function getDistance($lat1, 阅读全文
posted @ 2019-01-29 15:33 able-woman 阅读(432) 评论(0) 推荐(0) 编辑