摘要: HTML部分 (lay-filter="demo") <div class="layui-form-item layui-hide"> <label class="layui-form-label">动物级别</label> <div class="layui-input-inline"> <sel 阅读全文
posted @ 2020-09-09 10:34 孤陌 阅读(10170) 评论(0) 推荐(0) 编辑
摘要: 计算函数放到公共文件头部 <script> function getDistance(lat1, lon1, lat2, lon2) { var radLat1 = (lat1 * Math.PI) / 180; //将角度换算为弧度 var radLat2 = (lat2 * Math.PI) / 阅读全文
posted @ 2020-08-29 11:09 孤陌 阅读(2884) 评论(0) 推荐(0) 编辑
摘要: 1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <title>道德地图定位</title> 6 <meta name="renderer" content="webkit"> 7 <meta name= 阅读全文
posted @ 2020-08-26 10:44 孤陌 阅读(777) 评论(0) 推荐(0) 编辑
摘要: composer 安装三方类:composer require alibabacloud/client 发送短信类 <?php namespace app\common\controller; use think\Controller; use AlibabaCloud\Client\Alibaba 阅读全文
posted @ 2020-08-08 23:41 孤陌 阅读(298) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>layui</title> <meta name="renderer" content="webkit"> <meta http-equiv="X-UA-Compatible" c 阅读全文
posted @ 2020-08-06 23:13 孤陌 阅读(1148) 评论(1) 推荐(0) 编辑
摘要: /** * 将数值金额转换为中文大写金额 * @param $amount float 金额(支持到分) * @param $type int 补整类型,0:到角补整;1:到元补整 * @return mixed 中文大写金额 */ public function convertAmountToCn 阅读全文
posted @ 2020-08-06 09:25 孤陌 阅读(1078) 评论(0) 推荐(0) 编辑
摘要: 后台操作 public function login(){ $post = $this->request->param(); $url="https://api.weixin.qq.com/sns/jscode2session?appid=".$post['appid']."&secret=".$p 阅读全文
posted @ 2020-08-06 09:20 孤陌 阅读(657) 评论(0) 推荐(0) 编辑
摘要: composer 安装JWT composer require firebase/php-jwt 首先在应用公共文件中引入JWT use Firebase\JWT\JWT; 创建token /** * 创建 token * @param array $data 必填 自定义参数数组 * @param 阅读全文
posted @ 2020-08-05 19:04 孤陌 阅读(3758) 评论(0) 推荐(0) 编辑
摘要: //以下方法仅供参考1、返回上一页,不刷新history.html window.history.go(-1); javascript:window.history.go(-1) 2、返回上一页并刷新页面 avascript:location.replace(this.href);event.ret 阅读全文
posted @ 2020-08-05 18:47 孤陌 阅读(3004) 评论(0) 推荐(0) 编辑
摘要: allowField 也可以直接带更新条件来更新数据 $user = new User; // save方法第二个参数为更新条件 $user->save([ 'name' => 'thinkphp', 'email' => 'thinkphp@qq.com' ],['id' => 1]); 如果需要 阅读全文
posted @ 2020-08-05 18:44 孤陌 阅读(1109) 评论(0) 推荐(0) 编辑