- 博客(27)
- 资源 (1)
- 收藏
- 关注
原创 php firebase/php-jwt token验证
JWT于各服务器、客户端传递信息签名验证。服务端签发Tokenuse \Firebase\JWT\JWT; //导入JWTclass MainController extends Controller{ //签发Token public function lssue() { $key = '344'; //key $time = time(); //当前时间 $token = [ 'iss' => 'http://www.helloweb.
2022-07-25 16:07:47
706
原创 JS获取上传视频第一帧图片与视频时长
/** * 将秒转换为 分:秒 * s int 秒数 */ function s_to_hs(s){ //计算分钟 //算法:将秒数除以60,然后下舍入,既得到分钟数 var h; h ...
2022-04-29 09:42:57
812
原创 Pimple 容器使用
Pimpl是php社区中比较流行的容器。代码不是很多,详见 https://github.com/silexphp/Pimple一个基于Pimple开发简单的例子:创建应用<?phpnamespace Always\TencentIm;use Pimple\Container;/** * Class TencentIm * @author always <302611431@qq.com> * * @property \Always\TencentIm\se
2022-03-29 10:37:22
544
原创 composer init
$ composer initDo not run Composer as root/super user! See https://getcomposer.org/root for details Welcome to the Composer config generator This command will guide you through creating your composer.json config.# 1. 输入项目命名空间# 注意<vendor>/&l
2022-03-28 09:48:26
411
原创 nginx 代理部署wss
nginx 配置location ^~ /websocket { proxy_redirect off; proxy_pass http://127.0.0.1:8180; #转发 proxy_set_header Host $host; proxy_set_header X-Real_IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr:$remote_port; proxy_http_version 1.1;.
2022-03-12 12:03:51
5752
原创 element-ui 获取 table中选中的行的两种方式
Element获取table中选中的行的两种方式<el-table :data="data" style="width: 100%" border @selection-change="selectionLineChangeHandle" ref="multipleTable"></el-table>// methods 添加方法 selectionLineChangeHandle (val) { this.dataonLineListSe
2022-03-10 10:09:45
13162
原创 element-ui 使用整理
⼀定要给⽗级 el-dialog 加上modal-append-to-body="false"嵌套的⼦级 el-dialog 也加上append-to-body="true"含义:modal-append-to-body 遮罩层是否插⼊⾄ body 元素上,若为 false,则遮罩层会插⼊⾄ Dialog的⽗元素上append-to-body Dialog ⾃身是否插⼊⾄ body 元素上。嵌套的 Dialog 必须指定定该属性并赋值为true...
2022-03-08 15:14:20
1267
原创 js input搜索防抖与Vue.js 中的 v-cloak 指令
new Vue({ el: '#app', data: function() { return { } }, created() { }, methods: { codeInput(val) { // 等待扫码结果输入输入框后搜索用户 this.debounce(this.getUser, 500); },
2022-03-04 15:38:00
341
原创 Excel 导出导入
<?phpnamespace app\common\library;use PhpOffice\PhpSpreadsheet\IOFactory;use PhpOffice\PhpSpreadsheet\Writer\Xlsx;use PhpOffice\PhpSpreadsheet\Spreadsheet;class Excel{ /** * @param array $title 表头单元格内容 * @param array $data 从第二行开始写
2022-03-03 17:53:16
148
原创 uniapp 文件分片上传
<template> <view class="content"> <view @click="change">分片上传</view> <view>上传进度{{percent}}%</view> <view v-if="fileurl">{{fileurl}}</view> </view></template><script> export defaul
2022-03-02 14:44:59
5496
10
原创 TP6 文件分片上传、断点续传
<?phpnamespace app\controller;use app\BaseController;class Index extends BaseController{ public function upload() { $filename = 'file'; $path = 'common'; try { $file = request()->file($filename);
2022-03-02 14:41:22
1546
原创 mysql 数据库主从复制
主库设置rpl_semi_sync_master_enabled=1rpl_semi_sync_master_timeout=1000 #此单位是毫秒log-bin=mysql-bin #打开日志(主机需要打开)server-id=1 #服务器idlog-bin-index=mysql-bin.indexsync_binlog=1#给从机同步的库,可以多个binlog-do-db=tp #从库的数据库名称binlog-ignore-db=mysqlbinlog-ignore-db=p
2022-03-02 14:35:07
447
原创 redis持久化AOF与RDB配置
修改 redis.conf 配置文件 自动触发保存# save 设置数据保存到数据文件中的save规则save 900 1:表示900 秒内如果至少有 1 个 key 的值变化,则保存save 300 10:表示300 秒内如果至少有 10 个 key 的值变化,则保存save 60 10000:表示60 秒内如果至少有 10000 个 key 的值变化,则保存# 数据rdb压缩设置dbcompression yes #指定存储至本地数据库时是否压缩数据,默认是yes,redis采用LZ.
2022-02-22 10:27:08
196
原创 fastAdmin 引入第三方js 与使用vue表单提交处理
public/assets/js/require-backend.js 文件paths添加引入文件
2022-02-12 09:57:47
1469
原创 fastAdmin 添加TAB与绑定TAB事件
controller$this->view->assign('typeList', ['1' => '状态1', '2' => '状态2']);index.html <div class="panel-heading"> {:build_heading(null,FALSE)} <ul class="nav nav-tabs"> <li class="active"><a
2022-02-12 09:49:22
1839
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人