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