github API 调用
github API 调用
[[toc]]
基本访问curl https://api.github.com/users/hzfvictory
个人主要信息https://api.github.com/users/用户名
个人所有repo。https://api.github.com/users/用 ...
Flutter基础
Flutter基础
[[toc]]
待总结
Electron基础
Electron基础
[[toc]]
简介Electron 是一个由 GitHub 开发的开源库,通过将 Chromium) 和Node.js 组合并使用 HTML,CSS 和 JavaScript 进行构建 Mac,Windows,和 Linux 跨平台桌面应用程序。
优点:
方便快捷的开发桌面 ...
Taro一些配置
Taro一些配置
[[toc]]
/*获取当前页url*/export const getCurrentPageUrl = (): string => { if (process.env.TARO_ENV === 'h5') { return windo ...
单元测试框架Jest学习总结
单元测试框架Jest学习总结
[[toc]]
测试框架Mocha+chai(断言库)yarn add mocha chai -D
Jestyarn add jest -D
适合场景
业务比较复杂
公司非常注重代码质量,想尽一切办法杜绝线上出bug
需要长期维护的项目。它们需要测试来保障代码可维护性、 ...
Node生成模板
Node生成模板
[[toc]]
基于nodejs编写自动生成路由需要的文件
/** * pages模版快速生成脚本,执行命令 npm run tep `文件名` */const fs = require('fs');const dirName = process.argv[2];if (!dirN ...
项目目录
项目目录
[[toc]]
以Taro为栗子
├─config -- 配置文件(插件等) │ dev.js --开发项目配置│ index.js --适用于开发和生产│ prod.js --生产项目配置│ template.js --node写的 ...
Taro基本用法
Taro基本用法
[[toc]]
常用的小方法//运行时的尺寸转换Taro.pxTransform(10) // 小程序:rpx,H5:rem//tabbar右上角的数字Taro.setTabBarBadge({ index ...
TypeScript 误区
TypeScr 误区
[[toc]]
Object vs object vs {}TypeScript 2.2 引入了被称为 object 类型的新类型,它用于表示非原始类型。在 JavaScript 中以下类型被视为原始类型:string、boolean、number、bigint、symbol ...
Mongoose使用
Mongoose使用
[[toc]]
链接mongo/** @ use 数据库连接*/const mongoose = require('mongoose');const config = require('../../config/common');const dbConfig = config[ ...