no message
							parent
							
								
									66e28fc37c
								
							
						
					
					
						commit
						f5bcd26314
					
				| 
						 | 
					@ -1,7 +1,7 @@
 | 
				
			||||||
import request from '@/utils/request'
 | 
					import request from '@/utils/request'
 | 
				
			||||||
export function getTaskInfo(data) {
 | 
					export function getTaskInfo(data) {
 | 
				
			||||||
  return request({
 | 
					  return request({
 | 
				
			||||||
    url: '/zwwms/dcx/queryVueServlet',
 | 
					    url: '/api/zwwms/dcx/queryVueServlet',
 | 
				
			||||||
    method: 'post',
 | 
					    method: 'post',
 | 
				
			||||||
    data
 | 
					    data
 | 
				
			||||||
  })
 | 
					  })
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -5,7 +5,7 @@ import store from '../store'
 | 
				
			||||||
import { getToken } from '@/utils/auth'
 | 
					import { getToken } from '@/utils/auth'
 | 
				
			||||||
import Config from '@/settings'
 | 
					import Config from '@/settings'
 | 
				
			||||||
import Cookies from 'js-cookie'
 | 
					import Cookies from 'js-cookie'
 | 
				
			||||||
 | 
					import qs from 'qs'
 | 
				
			||||||
// 创建axios实例
 | 
					// 创建axios实例
 | 
				
			||||||
const service = axios.create({
 | 
					const service = axios.create({
 | 
				
			||||||
  baseURL: process.env.VUE_APP_BASE_API, // api 的 base_url
 | 
					  baseURL: process.env.VUE_APP_BASE_API, // api 的 base_url
 | 
				
			||||||
| 
						 | 
					@ -15,10 +15,14 @@ const service = axios.create({
 | 
				
			||||||
// request拦截器
 | 
					// request拦截器
 | 
				
			||||||
service.interceptors.request.use(
 | 
					service.interceptors.request.use(
 | 
				
			||||||
  config => {
 | 
					  config => {
 | 
				
			||||||
 | 
					    if (config.method === 'post' || config.method === 'POST') {
 | 
				
			||||||
 | 
					      config.data = qs.stringify(config.data)
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
    if (getToken()) {
 | 
					    if (getToken()) {
 | 
				
			||||||
      config.headers['Authorization'] = getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
 | 
					      config.headers['Authorization'] = getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    config.headers['Content-Type'] = 'application/json'
 | 
					    config.headers['Content-Type'] = 'application/json'
 | 
				
			||||||
 | 
					    config.headers['Access-Control-Allow-Origin'] = 'true'
 | 
				
			||||||
    return config
 | 
					    return config
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  error => {
 | 
					  error => {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -80,8 +80,7 @@ export default {
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    doInit() {
 | 
					    doInit() {
 | 
				
			||||||
      // const params = { methodType: 'kchzcx', viewCount: 100, currentPage: 1 }
 | 
					      const params = { methodType: 'kchzcx', viewCount: 100, currentPage: 1 }
 | 
				
			||||||
      const params = null
 | 
					 | 
				
			||||||
      getTaskInfo(params).then(res => {
 | 
					      getTaskInfo(params).then(res => {
 | 
				
			||||||
        this.data = res
 | 
					        this.data = res
 | 
				
			||||||
        this.loading = false
 | 
					        this.loading = false
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -22,17 +22,18 @@ module.exports = {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  devServer: {
 | 
					  devServer: {
 | 
				
			||||||
    port: port,
 | 
					    port: port,
 | 
				
			||||||
    open: true,
 | 
					    open: false,
 | 
				
			||||||
 | 
					    host: '0.0.0.0',
 | 
				
			||||||
    overlay: {
 | 
					    overlay: {
 | 
				
			||||||
      warnings: false,
 | 
					      warnings: false,
 | 
				
			||||||
      errors: true
 | 
					      errors: true
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    proxy: {
 | 
					    proxy: {
 | 
				
			||||||
      '/api': {
 | 
					      '/api': {
 | 
				
			||||||
        target: process.env.VUE_APP_BASE_API,
 | 
					        target: 'http://192.168.56.138:8080',
 | 
				
			||||||
        changeOrigin: true,
 | 
					        changeOrigin: true,
 | 
				
			||||||
        pathRewrite: {
 | 
					        pathRewrite: {
 | 
				
			||||||
          '^/api': 'api'
 | 
					          '/api': '/'
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      '/auth': {
 | 
					      '/auth': {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue