08 2020 档案
摘要:计算函数放到公共文件头部 <script> function getDistance(lat1, lon1, lat2, lon2) { var radLat1 = (lat1 * Math.PI) / 180; //将角度换算为弧度 var radLat2 = (lat2 * Math.PI) /
阅读全文
摘要: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=
阅读全文
摘要:composer 安装三方类:composer require alibabacloud/client 发送短信类 <?php namespace app\common\controller; use think\Controller; use AlibabaCloud\Client\Alibaba
阅读全文
摘要:<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>layui</title> <meta name="renderer" content="webkit"> <meta http-equiv="X-UA-Compatible" c
阅读全文
摘要:/** * 将数值金额转换为中文大写金额 * @param $amount float 金额(支持到分) * @param $type int 补整类型,0:到角补整;1:到元补整 * @return mixed 中文大写金额 */ public function convertAmountToCn
阅读全文
摘要:后台操作 public function login(){ $post = $this->request->param(); $url="https://api.weixin.qq.com/sns/jscode2session?appid=".$post['appid']."&secret=".$p
阅读全文
摘要:composer 安装JWT composer require firebase/php-jwt 首先在应用公共文件中引入JWT use Firebase\JWT\JWT; 创建token /** * 创建 token * @param array $data 必填 自定义参数数组 * @param
阅读全文
摘要://以下方法仅供参考1、返回上一页,不刷新history.html window.history.go(-1); javascript:window.history.go(-1) 2、返回上一页并刷新页面 avascript:location.replace(this.href);event.ret
阅读全文
摘要:allowField 也可以直接带更新条件来更新数据 $user = new User; // save方法第二个参数为更新条件 $user->save([ 'name' => 'thinkphp', 'email' => 'thinkphp@qq.com' ],['id' => 1]); 如果需要
阅读全文