list change
This commit is contained in:
parent
efb48126f8
commit
021b63bc2a
|
|
@ -7,22 +7,10 @@ export {}
|
||||||
|
|
||||||
declare module 'vue' {
|
declare module 'vue' {
|
||||||
export interface GlobalComponents {
|
export interface GlobalComponents {
|
||||||
ElButton: typeof import('element-plus/es')['ElButton']
|
|
||||||
ElCarousel: typeof import('element-plus/es')['ElCarousel']
|
ElCarousel: typeof import('element-plus/es')['ElCarousel']
|
||||||
ElCarouselItem: typeof import('element-plus/es')['ElCarouselItem']
|
ElCarouselItem: typeof import('element-plus/es')['ElCarouselItem']
|
||||||
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
|
ElIcon: typeof import('element-plus/es')['ElIcon']
|
||||||
ElDialog: typeof import('element-plus/es')['ElDialog']
|
|
||||||
ElForm: typeof import('element-plus/es')['ElForm']
|
|
||||||
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
|
||||||
ElInput: typeof import('element-plus/es')['ElInput']
|
|
||||||
ElMenu: typeof import('element-plus/es')['ElMenu']
|
|
||||||
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
|
|
||||||
ElOption: typeof import('element-plus/es')['ElOption']
|
|
||||||
ElPagination: typeof import('element-plus/es')['ElPagination']
|
ElPagination: typeof import('element-plus/es')['ElPagination']
|
||||||
ElRadio: typeof import('element-plus/es')['ElRadio']
|
|
||||||
ElSelect: typeof import('element-plus/es')['ElSelect']
|
|
||||||
ElTable: typeof import('element-plus/es')['ElTable']
|
|
||||||
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
|
|
||||||
ElTag: typeof import('element-plus/es')['ElTag']
|
ElTag: typeof import('element-plus/es')['ElTag']
|
||||||
RouterLink: typeof import('vue-router')['RouterLink']
|
RouterLink: typeof import('vue-router')['RouterLink']
|
||||||
RouterView: typeof import('vue-router')['RouterView']
|
RouterView: typeof import('vue-router')['RouterView']
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
VITE_ENV = 'development'
|
VITE_ENV = 'development'
|
||||||
|
|
||||||
VITE_BUILD_MODE = 'dev'
|
VITE_BUILD_MODE = 'dev'
|
||||||
|
|
||||||
# 开发环境接口地址
|
# 开发环境接口地址
|
||||||
VITE_API_URL = 'http://10.40.92.66:9206/dev-api'
|
VITE_API_URL = '/proxyApi'
|
||||||
|
# 开发环境接口地址
|
||||||
|
VITE_proxyTarget = 'http://10.40.92.66:9206'
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { post,get } from '../index'
|
import { post,get } from '../index'
|
||||||
|
|
||||||
export const getList = () => {
|
export const getList = () => {
|
||||||
return get('/equip/dev/list',{})
|
return get('/dev/list',{})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { post } from '../index'
|
import { get, post } from '../index'
|
||||||
|
|
||||||
export function apiTest() {
|
export function apiTest1() {
|
||||||
return post('/userms/ut/userCardInfo/getCardInfo/v1', {})
|
return post('system/user/getInfo', {})
|
||||||
}
|
}
|
||||||
|
|
@ -15,7 +15,7 @@ const service = axios.create({
|
||||||
|
|
||||||
service.interceptors.request.use(
|
service.interceptors.request.use(
|
||||||
(config) => {
|
(config) => {
|
||||||
|
config.headers['Authorization'] = "eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX2tleSI6Ijc5MjRkNDc1LTRjMmUtNGViYy05ZDU0LTA2NzNmNWU0MDhiMyIsInVzZXJuYW1lIjoiYWRtaW4ifQ.M3H9jHnfFAKJ3szdiDb79hIHfiS8AWvaI51mP65l01Q2G0jcLSTvjlub8FykYV3A27If7V6GBRo83u8spRDquw"
|
||||||
return config
|
return config
|
||||||
},
|
},
|
||||||
(error) => {
|
(error) => {
|
||||||
|
|
@ -28,7 +28,7 @@ service.interceptors.response.use(
|
||||||
return res.data
|
return res.data
|
||||||
},
|
},
|
||||||
(error) => {
|
(error) => {
|
||||||
|
|
||||||
console.log('error-异常', error)
|
console.log('error-异常', error)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
@ -40,7 +40,8 @@ export function get(url: string, params: any) {
|
||||||
.get(url, { params })
|
.get(url, { params })
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
NProgress.done()
|
NProgress.done()
|
||||||
if (res.code == '0000') {
|
console.log("res-get",res)
|
||||||
|
if (res.code == '200') {
|
||||||
resolve(res.data)
|
resolve(res.data)
|
||||||
} else {
|
} else {
|
||||||
reject(res.data)
|
reject(res.data)
|
||||||
|
|
@ -62,10 +63,10 @@ export function post(url: string, params: any) {
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
NProgress.done()
|
NProgress.done()
|
||||||
console.log('---------------------------', res)
|
console.log('---------------------------', res)
|
||||||
if (res.code == '0000') {
|
if (res.code == '200') {
|
||||||
resolve(res.data)
|
resolve(res.data)
|
||||||
} else {
|
} else {
|
||||||
reject(res)
|
reject(res.data)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
|
|
@ -89,7 +90,7 @@ export function upload(url: string, params: any) {
|
||||||
})
|
})
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
NProgress.done()
|
NProgress.done()
|
||||||
if (res.code == '0000') {
|
if (res.code == '200') {
|
||||||
resolve(res.data)
|
resolve(res.data)
|
||||||
} else {
|
} else {
|
||||||
reject(res.data)
|
reject(res.data)
|
||||||
|
|
|
||||||
|
|
@ -73,16 +73,21 @@ const routes: Array<RouteRecordRaw> = [
|
||||||
},
|
},
|
||||||
// 自选直租
|
// 自选直租
|
||||||
{
|
{
|
||||||
path: '/equip',
|
path: '/equipList',
|
||||||
name: 'equip',
|
name: 'equipList',
|
||||||
redirect: '/equip/list',
|
component: () => import('views/equip/list.vue'),
|
||||||
children: [
|
meta: {
|
||||||
{
|
title: ''
|
||||||
path: 'list',
|
}
|
||||||
name: 'equipList',
|
},
|
||||||
component: () => import('views/equip/list.vue')
|
//装备详情
|
||||||
}
|
{
|
||||||
]
|
path: '/equipDetail/:id',
|
||||||
|
name: 'equipDetail',
|
||||||
|
component: () => import('views/equip/detail.vue'),
|
||||||
|
meta: {
|
||||||
|
title: ''
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 资讯详情
|
// 资讯详情
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -377,6 +377,7 @@ init()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.equipList {
|
.equipList {
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,6 @@ import vueJsx from '@vitejs/plugin-vue-jsx'
|
||||||
import Components from 'unplugin-vue-components/vite'
|
import Components from 'unplugin-vue-components/vite'
|
||||||
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
|
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
|
||||||
import { createHtmlPlugin } from 'vite-plugin-html'
|
import { createHtmlPlugin } from 'vite-plugin-html'
|
||||||
import moment from 'moment'
|
|
||||||
import { env } from 'node:process'
|
|
||||||
|
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
|
|
@ -70,8 +68,8 @@ export default ({ mode }: any) => {
|
||||||
preprocessorOptions: {
|
preprocessorOptions: {
|
||||||
scss: {
|
scss: {
|
||||||
// 两种方式都可以
|
// 两种方式都可以
|
||||||
additionalData:
|
additionalData:''
|
||||||
"@import '@/style/scss/variable.scss';@import '@/style/scss/mixin.scss';@import '@/style/scss/vantReset.scss';"
|
// "@import '@/style/scss/index.scss';"
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -82,42 +80,42 @@ export default ({ mode }: any) => {
|
||||||
// open: envInfo.VITE_OPEN,
|
// open: envInfo.VITE_OPEN,
|
||||||
proxy: {
|
proxy: {
|
||||||
'/proxyApi': {
|
'/proxyApi': {
|
||||||
target: 'https://test.com',
|
target: envInfo.VITE_proxyTarget,
|
||||||
secure: false,
|
secure: false,
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (path) => path.replace(/^\/proxyApi/, ''),
|
rewrite: (path) => path.replace(/^\/proxyApi/, ''),
|
||||||
configure: (proxy, _options) => {
|
configure: (proxy, _options) => {
|
||||||
proxy.on('error', (err, _req, _res) => {
|
proxy.on('error', (err, _req, _res) => {
|
||||||
console.log('proxy error', err)
|
// console.log('proxy error', err)
|
||||||
})
|
})
|
||||||
|
|
||||||
proxy.on('start', (req, res, target) => {
|
proxy.on('start', (req, res, target) => {
|
||||||
console.log(
|
// console.log(
|
||||||
'Proxy Start:',
|
// 'Proxy Start:',
|
||||||
req.method,
|
// req.method,
|
||||||
req.url,
|
// req.url,
|
||||||
req.headers,
|
// req.headers,
|
||||||
_options
|
// _options
|
||||||
)
|
// )
|
||||||
})
|
})
|
||||||
proxy.on('proxyReq', (proxyReq, req, _res) => {
|
proxy.on('proxyReq', (proxyReq, req, _res) => {
|
||||||
console.log(
|
// console.log(
|
||||||
'Sending Request to the Target:',
|
// 'Sending Request to the Target:',
|
||||||
req.method,
|
// req.method,
|
||||||
req.url,
|
// req.url,
|
||||||
req.headers,
|
// req.headers,
|
||||||
_options
|
// _options
|
||||||
)
|
// )
|
||||||
proxyReq.removeHeader('origin')
|
proxyReq.removeHeader('origin')
|
||||||
// 跨域解决
|
// 跨域解决
|
||||||
})
|
})
|
||||||
proxy.on('proxyRes', (proxyRes, req, _res) => {
|
proxy.on('proxyRes', (proxyRes, req, _res) => {
|
||||||
console.log(
|
// console.log(
|
||||||
'Received Response from the Target:',
|
// 'Received Response from the Target:',
|
||||||
proxyRes.statusCode,
|
// proxyRes.statusCode,
|
||||||
proxyRes.headers,
|
// proxyRes.headers,
|
||||||
req.url
|
// req.url
|
||||||
)
|
// )
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -128,7 +126,7 @@ export default ({ mode }: any) => {
|
||||||
},
|
},
|
||||||
envDir: 'env',
|
envDir: 'env',
|
||||||
build: {
|
build: {
|
||||||
outDir: 'dist/' + pjson.name,
|
outDir: 'dist/' + pjson.name +'-'+envInfo.VITE_BUILD_MODE,
|
||||||
emptyOutDir: true,
|
emptyOutDir: true,
|
||||||
terserOptions: {
|
terserOptions: {
|
||||||
compress: {
|
compress: {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue