diff --git a/src/assets/css/globel.css b/src/assets/css/globel.css
index f49681b..5ebaad7 100644
--- a/src/assets/css/globel.css
+++ b/src/assets/css/globel.css
@@ -19,4 +19,10 @@ html,body,#app{
}
.el-pagination {
margin-top: 15px;
+}
+.el-steps{
+ margin-top: 10px;
+}
+.el-step__title{
+ font-size: 13px;
}
\ No newline at end of file
diff --git a/src/components/goods/edit.vue b/src/components/goods/edit.vue
new file mode 100644
index 0000000..4329ea1
--- /dev/null
+++ b/src/components/goods/edit.vue
@@ -0,0 +1,210 @@
+
+
+
+ 首页
+ 商品管理
+ 添加商品
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 点击上传
+ 只能上传jpg/png文件,且不超过500kb
+
+
+ 商品内容
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/goods/goods.vue b/src/components/goods/goods.vue
index 0f2fe1e..a9ba965 100644
--- a/src/components/goods/goods.vue
+++ b/src/components/goods/goods.vue
@@ -1,12 +1,124 @@
-
+
+ 首页
+ 商品管理
+ 商品列表
+
+
+
+
+
+
+
+
+
+
+
+ 添加商品
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{scope.row.add_time*1000 | dataFormat}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main.js b/src/main.js
index 2980fa1..c23fb8b 100644
--- a/src/main.js
+++ b/src/main.js
@@ -10,10 +10,23 @@ import axios from 'axios'
Vue.component('table-tree', tableTree)
axios.defaults.baseURL = 'http://127.0.0.1:8888/api/private/v1/'
+// 为每个请求头挂一个 token
axios.interceptors.request.use(config => {
config.headers.Authorization = sessionStorage.getItem('token')
return config
})
+
+Vue.filter('dataFormat', (time) => {
+ const dt = (new Date(time))
+ const y = dt.getFullYear()
+ const m = (dt.getMonth() + 1 + '').padStart(2, '0')
+ const d = (dt.getDate() + '').padStart(2, '0')
+ const H = dt.getHours().toString().padStart(2, '0')
+ const i = dt.getMinutes().toString().padStart(2, '0')
+ const s = dt.getSeconds().toString().padStart(2, '0')
+ return `${y}-${m}-${d} ${H}:${i}:${s}`
+})
+
Vue.prototype.$http = axios
Vue.use(ElementUI)
diff --git a/src/router/router.js b/src/router/router.js
index 234ae82..b23cb84 100644
--- a/src/router/router.js
+++ b/src/router/router.js
@@ -8,6 +8,8 @@ import access from '../components/access/access'
import roles from '../components/access/roles'
import categories from '../components/goods/categories'
import params from '../components/goods/params'
+import goods from '../components/goods/goods'
+import goodsEdit from '../components/goods/edit'
Vue.use(VueRouter)
@@ -24,7 +26,9 @@ const routes = [
{ path: '/rights', component: access },
{ path: '/roles', component: roles },
{ path: '/categories', component: categories },
- { path: '/params', component: params }
+ { path: '/params', component: params },
+ { path: '/goods', component: goods },
+ { path: '/goods/add', component: goodsEdit }
]
}
]