Js数组操作 时间: 2021-04-08 | 分类: 笔记 | 阅读: 2786 字 ~ 6分钟 类型转换 字符串 大部分数据类型都可以使用toString()函数转换为字符串 console.log(([1,2,3]).toString()); //1,2,3 也可以使用函数String转换为字符串 console.log(String([1,2,3])); 或者使用join连接为 阅读全文 »
Node-Koa2之axios请求云之讯短信发送接口和soap请求WebService 时间: 2021-03-10 | 分类: 技术 | 阅读: 382 字 ~ 1分钟 axios请求云之讯短信接口实现短信发送 安装axios npm install axios --save 方法实现 static async sendMessage(ctx){ let param = Math.random().toString().substr(2, 4); //生成四位随机数 let phone = '157********'; const url = 'https://open.ucpaas.com/ol/sms/sendsms'; const axios = require('axios'); let sendRe = await axios({ method: 阅读全文 »
基于Koa框架的Lincms常用操作 时间: 2021-03-03 | 分类: 笔记 | 阅读: 366 字 ~ 1分钟 Sequelize事务操作 let transaction; //事务开始 try { transaction = await sequelize.transaction(); const replace_record = { p_code: v.get('path.p_code'), p_type: v.get('path.p_type') }; const { id: record_id } = await ReplaceRecordModel.create(replace_record, { transaction }); await WxReplacesheetsModel.create( { record_id, name: v.get('path.name'), phone: v.get('path.phone'), province: v.get('path.province'), city: v.get('path.city'), district: v.get('path.district'), question: v.get('path.question'), status: 1 }, { transaction } ); 阅读全文 »
Linux开启bbr加速 时间: 2021-02-09 | 分类: 技术 | 阅读: 166 字 ~ 1分钟 安装bbr加速 进入/usr/local/src目录,下载bbr.sh文件 cd /usr/local/src sudo wget --no-check-certificate https://github.com/teddysun/across/raw/master/bbr.sh 添加可执行权限 sudo chmod +x bbr.sh 执行该脚本文件,安装完成后提示按y 阅读全文 »
PHP&kuaidi.com实现快递查询 时间: 2021-01-26 | 分类: 技术 | 阅读: 604 字 ~ 2分钟 申请快递查询API授权key kuaidi.com SDK文件KDApi.php /** * 物流信息查询接口SDK */ class KDAPI{ private $_APPKEY = 'twde5d8ef***********'; //改为您自己的key private $_APIURL = "https://highapi.kuaidi.com/openapi-querycountordernumber.html?"; private $_show = 0; private $_muti 阅读全文 »
Linux-使用防火墙firewalld开放端口 时间: 2021-01-22 | 分类: 技术 | 阅读: 248 字 ~ 1分钟 查看当前开了哪些端口其实一个服务对应一个端口,每个服务对应/usr/lib/firewalld/services下面一个xml文件 firewall-cmd --list-services 通过f 阅读全文 »
使用Linux定时任务-Crontab 完成MySQL数据库的备份和表操作 时间: 2021-01-19 | 分类: 技术 | 阅读: 264 字 ~ 1分钟 crontab基本命令 crontab -l //查看定时任务 crontab -e //编辑定时任务 crontab -r //删除定时任务 crontab常用写法 每分钟执行 */1 * * * * command 每小时0分执行 阅读全文 »
SEO搜索引擎优化-常用的站长平台总结 时间: 2021-01-15 | 分类: 分享 | 阅读: 30 字 ~ 1分钟 百度: https://ziyuan.baidu.com 谷歌: https://analytics.google.com 腾讯: https://mta.qq.com 搜狗: http://zhanzhang.sogou.com 360: http://zhanzhang.so.com 必应: https://www.bing.com/webmasters/homepage 头条: https://zhanzhang.toutiao.com 神马: https://zhanzhang.sm.cn