- 博客(7)
- 收藏
- 关注
原创 发布订阅模式
// 发布订阅模式let Event = (function(){ let eventList = {}, listen, trigger, remove; listen = function(key,fn){//订阅 (eventList[key] || (eventList[key] = [])).push(fn) }; trigger = function(key,fn){//发布 .
2022-02-11 17:51:56 103
原创 vue-router4路由报警告[Vue Router warn]: No match found for location with path ““
在配置路由时参数时,后面接添加 '/:id' 就OK了
2021-11-20 16:04:40 6225 1
原创 微信网页授获取code
1.获取微信公众号的AppID和AppSecret2.配置授权回调的页面3. 用户授权并获取codehttps://open.weixin.qq.com/connect/oauth2/authorize?appid=wxf0e81c3bee622d60&redirect_uri=http%3A%2F%2Fnba.bluewebgame.com%2Foauth_response.php&response_type=code&scope=snsapi_userinfo&a.
2021-11-17 17:25:44 1858
原创 别名配置vue
module.exports={ configureWebpack:{ alias:{ //需要引入的文件名 'assets':'@assets', 'components':'@components', 'network':'@network', 'utils':'@utils', 'views':'@views' } }, publicPath:'./'}
2021-09-23 16:50:12 53
原创 常用验证方法
const detector = { //验证用户名 isUsername: (username) => { let u = /^[\u4e00-\u9fa5]{2,4}$/; if (!username) { return "uerr1"; } else { if (!u.test(username)) { return "uerr2"; .
2021-09-22 18:07:52 217
原创 axios
import axios from 'axios'const request = axios.create({ baseURL:'', timeout:5000})// 拦截器request.interceptors.request.use( config => { // 登录流程控制中,根据本地是否存在token判断用户的登录情况 // 但是即使token存在,也有可能token是过期的,所以在每次的请求头中携带token .
2021-07-08 22:45:26 73
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人