tp5数据库查询字段拼接concat
$data = Db::table('up_user')
->where($where)
->field([
'p_user_name', "CONCAT(p_year,'-', p_month) as ud_date"
])
->select(); $data = Db::table('up_user')
->where($where)
->field([
'p_user_name', "CONCAT(p_year,'-', p_month) as ud_date"
])
->select(); 只需要在wk.js里把这个uploadExcel里的onUploadSuccess修改下就行了
'onUploadSuccess': function(file, data, response) {
if(data.code == 200){
wk.success('导入成功!',excel_url);
}else{
layer.msg(data.msg,{icon:2,time:2000,shade:0.1},function(index){
location.reload()
});
}
},返回
return json(['code'=>0,'msg'=> '无此分类']);
or
return json(['code'=>200]); 在数据表格里加上:sort: true
然后public/footer.html里有排序的方法,里面sort(testReload)里的testReload跟你渲染数据表格里的保持一致就行(就是改成sort(testReload)就行,不是sort(test),要带上testReload)
$time = intval(($a - 25569) 3600 24); //转换成1970年以来的秒数($a是日期那栏的值)
$date = date('Y-m-d H:i:s', $time);
图片有点大,10M左右,超过十秒就报超时了,王编辑器里有个参(看public里引用的是哪个js),在引用的这个配置文件里有个参uploadImgTimeout,默认是1e4(毫秒的,10的四次方,即10秒),改为1e6即可(100秒)