上一页 1 2 3 4 5 6 7 8 9 10 ··· 13 下一页
摘要: $count = model('tableName')->count('DISTINCT 字段名'); 阅读全文
posted @ 2020-03-15 20:52 一颗糊涂淡 阅读(1483) 评论(0) 推荐(0)
摘要: setLocalStorage:function(key,val){ var exp=new Date().getTime()+2*24*60*60*100; //令牌过期时间 var obj={ val:val, exp:exp }; localStorage.setItem(key,JSON.s 阅读全文
posted @ 2020-03-10 17:16 一颗糊涂淡 阅读(253) 评论(0) 推荐(0)
摘要: obj = JSON.parse('json字符串'); json字符串 = JSON.stringify(obj); 阅读全文
posted @ 2020-03-10 16:17 一颗糊涂淡 阅读(646) 评论(0) 推荐(0)
摘要: arr=[1,2]; arr1=[3,4]; arr3=arr.push(arr1); console.log(arr); console.log(arr1); console.log(arr3); result: [1,2,[3,4]] [3,4] 3 arr=[1,2]; arr1=[3,4]; 阅读全文
posted @ 2020-03-09 20:31 一颗糊涂淡 阅读(1313) 评论(0) 推荐(0)
摘要: function curl_get($url, $httpCode = 0) { //初始化curl会话 $ch = curl_init(); //需要获取的 URL 地址 curl_setopt($ch, CURLOPT_URL, $url); //将curl会话执行的结果不输出,以数据流的形式保 阅读全文
posted @ 2020-03-09 16:56 一颗糊涂淡 阅读(164) 评论(0) 推荐(0)
摘要: $(document).on('keydown', document, function (e) { var e = event || window.event || arguments.callee.caller.arguments[0]; if (e && e.keyCode == 13) { 阅读全文
posted @ 2020-03-09 14:22 一颗糊涂淡 阅读(123) 评论(0) 推荐(0)
摘要: 在控制器类里面定义前置方法 protected $beforeActionList = [ 'first' => ['only' => 'second,third'] ]; 不管是在调用second()还是调用third()方法,都会在执行之前调用first()方法 protected functi 阅读全文
posted @ 2020-02-23 14:27 一颗糊涂淡 阅读(574) 评论(0) 推荐(0)
摘要: 重写Handel的render()方法 <?php namespace app\lib\exception; use Exception; use think\exception\Handle; use think\facade\Log; class ExceptionHandle extends 阅读全文
posted @ 2020-02-21 11:18 一颗糊涂淡 阅读(2035) 评论(0) 推荐(0)
摘要: 当前有两个版本 路由设置 Route::get('api/:version/banner/:id', 'api/:version.Banner/getBanner'); Version:1 地址 zerg.so/api/v1/banner/1 返回 "this is v1 version" Vers 阅读全文
posted @ 2020-02-17 15:11 一颗糊涂淡 阅读(781) 评论(0) 推荐(0)
摘要: <?php namespace app\index\controller; class Index { public function userlist() { $list = model('User')->paginate( 2, false, [ 'type' => 'Bootstrap', ' 阅读全文
posted @ 2020-02-12 21:50 一颗糊涂淡 阅读(558) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 10 ··· 13 下一页