Commit 8bec3030 authored by 黄奎's avatar 黄奎

页面修改

parent 6872ffca
...@@ -13,7 +13,9 @@ ...@@ -13,7 +13,9 @@
"build": "node build/build.js" "build": "node build/build.js"
}, },
"dependencies": { "dependencies": {
"axios": "^0.19.2",
"element-ui": "^2.13.1", "element-ui": "^2.13.1",
"js-md5": "^0.7.3",
"vue": "^2.5.2", "vue": "^2.5.2",
"vue-router": "^3.0.1" "vue-router": "^3.0.1"
}, },
......
// The Vue build version to load with the `import` command // The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias. // (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue' import Vue from 'vue'
import axios from 'axios'
import App from './App' import App from './App'
import router from './router' import router from './router'
import ajaxPlug from './plug/index' import ajaxPlug from './plug/index'
...@@ -9,6 +10,7 @@ import 'element-ui/lib/theme-chalk/index.css'; ...@@ -9,6 +10,7 @@ import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI); Vue.use(ElementUI);
Vue.config.productionTip = false Vue.config.productionTip = false
Vue.http = Vue.prototype.$http = axios
Vue.use(ajaxPlug) Vue.use(ajaxPlug)
/* eslint-disable no-new */ /* eslint-disable no-new */
new Vue({ new Vue({
......
...@@ -71,7 +71,7 @@ export default { ...@@ -71,7 +71,7 @@ export default {
}, },
//浏览器缓存 //浏览器缓存
Vue.prototype.getLocalStorage = function () { Vue.prototype.getLocalStorage = function () {
var localStorageData = window.localStorage["userInfo"]; var localStorageData = window.localStorage["mall_userInfo"];
if (localStorageData !== undefined && localStorageData != 'undefined') { if (localStorageData !== undefined && localStorageData != 'undefined') {
return JSON.parse(localStorageData); return JSON.parse(localStorageData);
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment