Merge remote-tracking branch 'origin/dev-nx' into dev-nx
This commit is contained in:
commit
b70753ec60
|
|
@ -21,7 +21,7 @@ var proxyUrl = (module.exports = {
|
|||
// target: 'http://112.29.103.165:21626',//重庆
|
||||
// target: 'http://192.168.0.14:21624',//测试
|
||||
// target: 'http://112.29.103.165:21624/', //宁夏
|
||||
target: 'http://192.168.2.136:28080',
|
||||
target: 'http://192.168.2.127:28080',
|
||||
changeOrigin: true,
|
||||
// secure: true, //如果是https接口,需要配置这个参数
|
||||
pathRewrite: {
|
||||
|
|
|
|||
|
|
@ -26,6 +26,18 @@ export default {
|
|||
resize: true,
|
||||
})
|
||||
},
|
||||
|
||||
watch: {
|
||||
$route: {
|
||||
handler(newValue) {
|
||||
console.log(newValue, '路由监听--')
|
||||
if (newValue.query.token) {
|
||||
localStorage.setItem('token', newValue.query.token)
|
||||
}
|
||||
},
|
||||
deep: true,
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="less">
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
* axios全局配置
|
||||
*/
|
||||
import axios from 'axios'
|
||||
import { Message } from 'element-ui'
|
||||
axios.defaults.timeout = 30000
|
||||
|
||||
// 默认配置
|
||||
|
|
@ -29,6 +30,9 @@ axios.interceptors.response.use(
|
|||
(response) => {
|
||||
if (response.data) {
|
||||
if (response.data.code === 401) {
|
||||
Message({ message: '当前登录状态已过期,请重新登录', type: 'error' })
|
||||
localStorage.clear()
|
||||
location.href = '/bigScrap/login/index'
|
||||
} else if (response.data.code === 200) {
|
||||
return Promise.resolve(response.data)
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -685,12 +685,12 @@ export default {
|
|||
this.mapEcharts.on('click', function (params) {
|
||||
if (params.data && params.data.a > 0) {
|
||||
_this.$router.push({
|
||||
path: '/home-new',
|
||||
path: '/bigScrap/home-new',
|
||||
query: { province: params.data.name, location: params.data.value },
|
||||
})
|
||||
} else if (params.region.count > 0) {
|
||||
_this.$router.push({
|
||||
path: '/home-new',
|
||||
path: '/bigScrap/home-new',
|
||||
query: { province: params.name, location: params.region.value },
|
||||
})
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -12,12 +12,12 @@ const Layout = () => import('@/views/layout')
|
|||
const Home = () => import('@/views/Home/index')
|
||||
const Login = () => import('@/views/new-login/index.vue')
|
||||
const routes = [
|
||||
// {
|
||||
// path: '*',
|
||||
// redirect: '/home-old',
|
||||
// },
|
||||
{
|
||||
path: '*',
|
||||
redirect: '/home-old',
|
||||
},
|
||||
{
|
||||
path: '/login/index',
|
||||
path: '/bigScrap/login/index',
|
||||
component: Login,
|
||||
name: 'Login',
|
||||
meta: {
|
||||
|
|
@ -26,12 +26,12 @@ const routes = [
|
|||
},
|
||||
},
|
||||
{
|
||||
path: '/home-new',
|
||||
path: '/bigScrap/home-new',
|
||||
name: 'home-new',
|
||||
component: () => import('@/views/newHome/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/home-old',
|
||||
path: '/bigScrap/home-old',
|
||||
name: 'home-old',
|
||||
component: () => import('@/views/oldHome/index.vue'),
|
||||
},
|
||||
|
|
@ -83,7 +83,7 @@ const routes = [
|
|||
const router = new Router({
|
||||
mode: 'history',
|
||||
routes,
|
||||
base: '/bigScrap',
|
||||
// base: '/bigScrap',
|
||||
})
|
||||
|
||||
router.beforeEach(async (to, from, next) => {
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@ export default {
|
|||
loginCodeApi(params).then((res) => {
|
||||
if (res.code == 200) {
|
||||
localStorage.setItem('token', res.data.access_token)
|
||||
this.$router.push('./Home/index')
|
||||
this.$router.push('/bigScrap/home-old')
|
||||
} else {
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,9 +26,9 @@ export default {
|
|||
methods: {
|
||||
openNewWindow() {
|
||||
window.open(
|
||||
`${
|
||||
this.jumpUrl
|
||||
}/bigScrap/index01.html?token=${localStorage.getItem('token')}`,
|
||||
`${this.jumpUrl}/bigScrap/home-old?token=${localStorage.getItem(
|
||||
'token',
|
||||
)}`,
|
||||
'_blank',
|
||||
)
|
||||
},
|
||||
|
|
|
|||
|
|
@ -12,20 +12,20 @@ export default {
|
|||
props: {
|
||||
className: {
|
||||
type: String,
|
||||
default: 'chart'
|
||||
default: 'chart',
|
||||
},
|
||||
width: {
|
||||
type: String,
|
||||
default: '100%'
|
||||
default: '100%',
|
||||
},
|
||||
height: {
|
||||
type: String,
|
||||
default: '300px'
|
||||
}
|
||||
default: '300px',
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chart: null
|
||||
chart: null,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
|
@ -47,12 +47,18 @@ export default {
|
|||
this.chart.setOption({
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
formatter: '{a} <br/>{b} : {c} ({d}%)'
|
||||
formatter: '{a} <br/>{b} : {c} ({d}%)',
|
||||
},
|
||||
legend: {
|
||||
left: 'center',
|
||||
bottom: '10',
|
||||
data: ['Industries', 'Technology', 'Forex', 'Gold', 'Forecasts']
|
||||
data: [
|
||||
'Industries',
|
||||
'Technology',
|
||||
'Forex',
|
||||
'Gold',
|
||||
'Forecasts',
|
||||
],
|
||||
},
|
||||
series: [
|
||||
{
|
||||
|
|
@ -66,14 +72,14 @@ export default {
|
|||
{ value: 240, name: 'Technology' },
|
||||
{ value: 149, name: 'Forex' },
|
||||
{ value: 100, name: 'Gold' },
|
||||
{ value: 59, name: 'Forecasts' }
|
||||
{ value: 59, name: 'Forecasts' },
|
||||
],
|
||||
animationEasing: 'cubicInOut',
|
||||
animationDuration: 2600
|
||||
}
|
||||
]
|
||||
animationDuration: 2600,
|
||||
},
|
||||
],
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ module.exports = {
|
|||
// target: `https://test-cc.zhgkxt.com`,//线上环境-南网
|
||||
// target: `https://z.csgmall.com.cn`,
|
||||
|
||||
target: `http://192.168.2.152:28080`, //超
|
||||
target: `http://192.168.2.127:28080`, //超
|
||||
// target: `http://10.40.92.81:28080`, //韩/
|
||||
// target: `http://192.168.2.82:28080`,//旭/
|
||||
// target: `http://192.168.2.248:28080`, //帅
|
||||
|
|
@ -112,7 +112,7 @@ module.exports = {
|
|||
})
|
||||
.end()
|
||||
|
||||
config.when(process.env.NODE_ENV !== 'development', config => {
|
||||
config.when(process.env.NODE_ENV !== 'development', (config) => {
|
||||
config
|
||||
.plugin('ScriptExtHtmlWebpackPlugin')
|
||||
.after('html')
|
||||
|
|
|
|||
Loading…
Reference in New Issue