摘要: 消息订阅与发布机制 工具库: PubSubJS 安装: yarn add pubsub-js 引入: import PubSub from 'pubsub-js' 使用方法: * 在需要接收消息的地方进行,消息订阅 ```javascript // 组件挂载完毕后 componentDidMount 阅读全文
posted @ 2021-02-09 15:18 ShanCe-刘勇 阅读(50) 评论(0) 推荐(0) 编辑
摘要: function upload_oss(file, all_file, accessKeyId, accessKeySecret, bucket, layer){ // 创建客户端 var client = new OSS.Wrapper({ region: 'oss-cn-beijing',//你 阅读全文
posted @ 2021-02-06 20:07 ShanCe-刘勇 阅读(1385) 评论(0) 推荐(0) 编辑
摘要: 常用命令: crontab参数 -u:这个参数可以让我们去编辑其他人的crontab,如果没有加上这个参数的话就会开启自己的crontab crontab -u 使用者名称 -l:可以列出crontab的内容 -r:可以移除crontab -e:可以使用系统预设的编辑器,开启crontab -i:可 阅读全文
posted @ 2021-02-03 19:15 ShanCe-刘勇 阅读(94) 评论(0) 推荐(0) 编辑
摘要: 需要引入 <script src="http://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script> <script src="http://cdnjs.cloudflare.com/ajax/libs/mobile-detect/1.4.1/ 阅读全文
posted @ 2021-02-03 11:54 ShanCe-刘勇 阅读(1557) 评论(0) 推荐(0) 编辑
摘要: 这里只是简单介绍缓存: 官网: https://flask-caching.readthedocs.io/en/latest/ 一个写的很不错的: https://www.cnblogs.com/cwp-bg/p/9687005.html 何时使用话缓存: 1. 存储需要短暂存储的数据, 可以以键值 阅读全文
posted @ 2021-01-29 13:57 ShanCe-刘勇 阅读(395) 评论(0) 推荐(0) 编辑
摘要: nginx.conf # 主文件 在 /etc/nginx/nginx.conf user www-data; worker_processes auto; pid /run/nginx.pid; include /etc/nginx/modules-enabled/*.conf; events { 阅读全文
posted @ 2021-01-29 11:06 ShanCe-刘勇 阅读(319) 评论(0) 推荐(0) 编辑
摘要: dash-gun.pyaccesslog = "./log/dash_acess.log" # 请求 errorlog = './log/dash_error.log' # 错误 loglevel = 'debug' # debug 模式 reload = True # 修改代码自动重启 运行(我运 阅读全文
posted @ 2021-01-21 10:59 ShanCe-刘勇 阅读(1403) 评论(0) 推荐(0) 编辑
摘要: arr1 = [1,3,5,7,9] arr2 = [2,4,6,8,10] console.log(...arr1) // 展开数组 let arr3 = [...arr1, ...arr2] // 连接数组 传参 function sum(...number){ return numbers.r 阅读全文
posted @ 2021-01-15 19:37 ShanCe-刘勇 阅读(66) 评论(0) 推荐(0) 编辑
摘要: class Person{ constructor(name, age){ // 构造器 this.name = name; this.age = age; } // 一般方法 speak(){ console.log('我叫${this.name}, 年龄${this.age}') } } cla 阅读全文
posted @ 2021-01-15 17:39 ShanCe-刘勇 阅读(52) 评论(0) 推荐(0) 编辑
摘要: http://www.cnplugins.com/down/down.php?fn=1504/www.cnplugins.com_fmkadmapgofadopljbjfkapdkoienihi_0_13_0_.crx&aid=41118&typeid=16 # 这个链接版本太老,建议用下面的或者可 阅读全文
posted @ 2021-01-15 16:34 ShanCe-刘勇 阅读(278) 评论(0) 推荐(0) 编辑