master
bibi 4 years ago
parent c9f437c3ee
commit d2fdae82e0

@ -1,6 +1,6 @@
import { axios } from './auth'
// 项目列表
// 接口
export const login = (params) => {
return axios({
url: '/login',

@ -1,5 +1,5 @@
export const imagePath = process.env.VUE_APP_URL + '/file/image'
export const filePath = process.env.VUE_APP_URL + '/file/file'
export const imagePath = process.env.VUE_APP_URL + '/file/image'// 图片上传拼接路径
export const filePath = process.env.VUE_APP_URL + '/file/file'// 文件上传拼接路径
export const cdnImage = (imagePath) => { return imagePath === '' ? '' : process.env.VUE_APP_CDN + imagePath }
export const upHeaders = () => {
return {

@ -3,7 +3,7 @@ import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
Vue.use(VueRouter)
// 配置路由
export const routes = [
{
path: '/',

@ -1,5 +1,5 @@
import { api } from '@/api'
// 配置工具类
export const utils = {
api: api,
formatDate: (time, fmt) => {

@ -5,6 +5,7 @@
</template>
<script>
import { api } from '@/api'
import { utils } from '@/utils'
export default ({
data () {
return {
@ -12,7 +13,11 @@ export default ({
}
},
created () {
api.basic.login({ userName: 'admin', password: '123456' }).then(res => {
//
const timeTest = utils.formatDate('1629360995', 'yyyy-MM-dd')
console.log(timeTest)
//
api.basic.login({ userName: 'admin', pwd: '123456' }).then(res => {
console.log(res)
})
}

Loading…
Cancel
Save