08 2019 档案

摘要:```js // 验证码 changeImg() { this.imgurl = '/api/changeCode?' + Math.random() }, login() { this.$refs.loginForm.validate(valid => { if (valid) { this.username = this.loginForm.username this.password = t 阅读全文
posted @ 2019-08-18 23:46 叶子玉 阅读(1643) 评论(0) 推荐(0) 编辑
摘要:```js import Vue from 'vue'; import Vuex from 'vuex'; Vue.use(Vuex); // 初始化时用sessionStore.getItem('token'),这样子刷新页面就无需重新登录 const state = { user: window.sessionStorage.getItem('user'), token: window.ses 阅读全文
posted @ 2019-08-18 23:40 叶子玉 阅读(2862) 评论(0) 推荐(0) 编辑
摘要:```js import Vue from 'vue' import VueRouter from 'vue-router' import login from '../pages/login/index' import Main from '../pages' import Register from '../pages/register/register' import noFound fro 阅读全文
posted @ 2019-08-18 23:24 叶子玉 阅读(13654) 评论(0) 推荐(1) 编辑
摘要:```css .star::before { content: "*"; color: #f56c6c; margin-right: 4px; } ``` 阅读全文
posted @ 2019-08-18 23:19 叶子玉 阅读(1621) 评论(0) 推荐(0) 编辑
摘要:```js import Vue from 'vue' // import App from './App.vue' import router from './router' import store from './store' import axios from 'axios' //添加自定义的全局方法 import globalFunc from "./utils/globalFunc" 阅读全文
posted @ 2019-08-18 23:16 叶子玉 阅读(3542) 评论(0) 推荐(0) 编辑
摘要:```js // const path = require('path') module.exports = { runtimeCompiler: true, devServer: { proxy: { '/mock': { target: 'https://easy mock.com/mock/e 阅读全文
posted @ 2019-08-18 23:13 叶子玉 阅读(2280) 评论(0) 推荐(0) 编辑