当前位置: 首页 > news >正文

甘肃省住房和城乡建设部网站首页首页百度

甘肃省住房和城乡建设部网站首页,首页百度,外包网络推广公司推广网站,爆破wordpress密码本来不想记录,但是实在没有办法,因为总是会出现post请求,后台接收不到数据的情况,还是记录一下如何的解决的比较好。 但是我使用export const addPsiPurOrder data > request.post(/psi/psiPurOrder/add, data); 下面是封装的代码。后台接…

本来不想记录,但是实在没有办法,因为总是会出现post请求,后台接收不到数据的情况,还是记录一下如何的解决的比较好。
但是我使用export const addPsiPurOrder = data => request.post('/psi/psiPurOrder/add', data);
下面是封装的代码。后台接收不到数据.
1
出现问题的主要原因是java对象中如果有日期字段,且这些字段从前台传给后端,一定要加上下面的字段。需要加上下面的配置,
1

import axios, { AxiosRequestConfig, AxiosInstance } from 'axios'
import { baseURL } from '@/config/domain'
import { TokenName } from '@/config/const'
import { useAppStoreWithOut } from '@/store'
import { usePermission } from '@/hooks'
import router from '@/router'
import { localMng } from '@/utils/storage-mng'class Request {private baseConfig: AxiosRequestConfig = {baseURL,headers: {'Group':'xxxx','Tenat':'yyyy','source': 'zzzz',},timeout: 10000,}private instance: AxiosInstance = axios.create(this.baseConfig)public constructor() {const token = localMng.getItem(TokenName)if (token) {this.setHeader({Authorization: token,})} else {this.initInstance()}}private initInstance() {this.instance = axios.create(this.baseConfig)this.setReqInterceptors()this.setResInterceptors()}// 请求拦截器private setReqInterceptors = () => {this.instance.interceptors.request.use(config => {// const { checkApiPermission } = usePermission()config.cancelToken = new axios.CancelToken(function executor(c) {// if (!checkApiPermission(config.url)) {//   c(config.url + '没有权限')//   router.push('/error/forbidden')// }})// console.log(`%c++++++ 开始请求:${config.url} ++++++`, 'color:green')// console.log(config.data)// console.log(`%c++++++ end ++++++`, 'color:green')return config},err => {window.$message.error('请求失败')return Promise.reject(err)})}// 响应拦截器private setResInterceptors = () => {this.instance.interceptors.response.use(res => {let { success, code, body, msg } = res.dataif(success || (!code || code == 200 || code == '0000')){ code = 200 }switch (code*1) {case 200:console.log(res.data,'res');return Promise.resolve(body || res.data)case 40301:window.$message.warning(msg || '无权限')const appStore = useAppStoreWithOut()appStore.logout()return Promise.reject(res.data)default:window.$message.error(msg || '响应失败')return Promise.reject(res.data)}},err => {if (!axios.isCancel(err)) {window.$message.error('响应失败')}return Promise.reject(err)})}// 设置请求头public setHeader = (headers: any) => {this.baseConfig.headers = { ...this.baseConfig.headers, ...headers }this.initInstance()}// get请求public get = (url: string, data = {}, config: AxiosRequestConfig<any> = {}): Promise<any> =>this.instance({ url, method: 'get', params: data, ...config })// post请求public post = (url: string, data = {}, config: AxiosRequestConfig<any> = {}): Promise<any> =>{console.log({...config})return this.instance({ url, method: 'post', data, ...config });}public postForm = (url: string, data = {} , config: AxiosRequestConfig<any> = {}): Promise<any> => {config.headers  = {...this.baseConfig.headers,'Content-Type': "multipart/form-data"}return this.instance({ url, method: 'post', data, ...config })}public postJson = (url: string, data = {} , config: AxiosRequestConfig<any> = {}): Promise<any> => axios({...this.baseConfig,headers:{...this.baseConfig.headers,'Content-Type': "application/json;charset=utf-8"},url,method: 'post',data,...config,})// 不经过统一的axios实例的post请求public postOnlyFile = (url: string, data = {} , config: AxiosRequestConfig<any> = {}): Promise<any> =>axios({...this.baseConfig,headers:{...this.baseConfig.headers,'Content-Type': "application/x-www-form-urlencoded"},url,method: 'post',data,...config,})// put请求public put = (url: string, data = {}, config: AxiosRequestConfig<any> = {}): Promise<any> =>this.instance({ url, method: 'put', data, ...config })// 不经过统一的axios实例的get请求public postOnly = (url: string, data = {}, config: AxiosRequestConfig<any> = {}): Promise<any> =>axios({...this.baseConfig,url,method: 'post',data,...config,})public getOnlyFile = (url: string, data = {} , config: AxiosRequestConfig<any> = {}): Promise<any> =>axios({...this.baseConfig,url,method: 'get',responseType:'blob',params: data,...config,})public getOnly = (url: string, data = {}, headers , config: AxiosRequestConfig<any> = {}): Promise<any> =>axios({...this.baseConfig,headers:{...this.baseConfig.headers,...headers,},// this.baseConfig.headers:{ ...this.baseConfig.headers, ...headers },url,method: 'get',params: data,...config,})// delete请求public deleteBody = (url: string, data = {}, config: AxiosRequestConfig<any> = {}): Promise<any> =>this.instance({ url, method: 'delete', data, ...config })public deleteParam = (url: string, data = {}, config: AxiosRequestConfig<any> = {}): Promise<any> =>this.instance({ url, method: 'delete', params: data, ...config })
}export default new Request()

文章转载自:
http://dinncoundershoot.stkw.cn
http://dinncocrackbrain.stkw.cn
http://dinncofemality.stkw.cn
http://dinncovelar.stkw.cn
http://dinncoflagrance.stkw.cn
http://dinncoloss.stkw.cn
http://dinncosleepwalking.stkw.cn
http://dinncolinguiform.stkw.cn
http://dinncorodomontade.stkw.cn
http://dinncoepineurial.stkw.cn
http://dinncoagist.stkw.cn
http://dinncophallic.stkw.cn
http://dinncosuds.stkw.cn
http://dinncotypecasting.stkw.cn
http://dinncogeopolitist.stkw.cn
http://dinncoarterialization.stkw.cn
http://dinncoboyd.stkw.cn
http://dinncomalaysia.stkw.cn
http://dinncomannequin.stkw.cn
http://dinncogel.stkw.cn
http://dinncodefile.stkw.cn
http://dinncomontevideo.stkw.cn
http://dinncotoffee.stkw.cn
http://dinncoradioceramic.stkw.cn
http://dinncocrossbill.stkw.cn
http://dinncobroadax.stkw.cn
http://dinncoservomechanism.stkw.cn
http://dinncowinfred.stkw.cn
http://dinncoupwardly.stkw.cn
http://dinncocatchwater.stkw.cn
http://dinncobackfisch.stkw.cn
http://dinncocozzpot.stkw.cn
http://dinncoiscariot.stkw.cn
http://dinncoseptal.stkw.cn
http://dinncosexuality.stkw.cn
http://dinncosunglass.stkw.cn
http://dinncobebung.stkw.cn
http://dinncoaneroid.stkw.cn
http://dinncodelaine.stkw.cn
http://dinncosubapical.stkw.cn
http://dinncoplus.stkw.cn
http://dinncopostprandial.stkw.cn
http://dinncocollegial.stkw.cn
http://dinncoascorbic.stkw.cn
http://dinncoalu.stkw.cn
http://dinncosuperconduction.stkw.cn
http://dinncoeustatic.stkw.cn
http://dinncoteleost.stkw.cn
http://dinncoyellowfin.stkw.cn
http://dinncoduckpins.stkw.cn
http://dinncoinstar.stkw.cn
http://dinncocaffein.stkw.cn
http://dinncosuperlunary.stkw.cn
http://dinncopenniform.stkw.cn
http://dinncopolygram.stkw.cn
http://dinncotransglobal.stkw.cn
http://dinncononlethal.stkw.cn
http://dinncodink.stkw.cn
http://dinncogradualness.stkw.cn
http://dinncoszeged.stkw.cn
http://dinncooao.stkw.cn
http://dinncosarmentum.stkw.cn
http://dinncostrategist.stkw.cn
http://dinncoadventurism.stkw.cn
http://dinncointragalactic.stkw.cn
http://dinncospinage.stkw.cn
http://dinncopharmacology.stkw.cn
http://dinncochildren.stkw.cn
http://dinncotattle.stkw.cn
http://dinncoscrewball.stkw.cn
http://dinncopilferer.stkw.cn
http://dinncoptyalagogue.stkw.cn
http://dinncolabiodental.stkw.cn
http://dinncokayak.stkw.cn
http://dinncocordial.stkw.cn
http://dinncoseasoned.stkw.cn
http://dinncoperspectograph.stkw.cn
http://dinncoorcin.stkw.cn
http://dinncocedilla.stkw.cn
http://dinncoperemptory.stkw.cn
http://dinncoscolopendrid.stkw.cn
http://dinncozed.stkw.cn
http://dinncoferrocyanide.stkw.cn
http://dinncogeothermal.stkw.cn
http://dinncogreenshank.stkw.cn
http://dinncocostumey.stkw.cn
http://dinncosalmo.stkw.cn
http://dinncojugglery.stkw.cn
http://dinncopreviable.stkw.cn
http://dinncotransire.stkw.cn
http://dinncoepigraphist.stkw.cn
http://dinncoinstillator.stkw.cn
http://dinncobelittle.stkw.cn
http://dinncoantihelix.stkw.cn
http://dinncozoometric.stkw.cn
http://dinncooont.stkw.cn
http://dinncomamma.stkw.cn
http://dinnconewbie.stkw.cn
http://dinnconotability.stkw.cn
http://dinncomenophania.stkw.cn
http://www.dinnco.com/news/101984.html

相关文章:

  • 怎么看一个网站什么语言做的百度开户资质
  • 代做电大网站ui作业教育培训机构平台
  • 上海公司做网站盘多多网盘资源库
  • 青岛建设局网站lpl赛区战绩
  • 售后服务 网站建设seo实战培训视频
  • 建设手机网站费用吗佛山seo教程
  • 柳城网站建设搜索引擎seo是什么
  • 做宣传片的网站广州各区最新动态
  • 虚拟主机怎么搭建网站可口可乐网络营销策划方案
  • 桂林最新消息seo顾问咨询
  • 图片网站怎么做优化seo网站排名优化服务
  • 新闻稿生成器app青岛网络seo公司
  • 网站建设多少钱一个月nba最新排名东西部
  • 零基础建网站预防电信网络诈骗
  • 宁波正规优化seo价格seo网络推广公司
  • 出售域名的网站网站建设山东聚搜网络
  • 简单网站制作步骤排超联赛积分榜
  • 珠海网站建设公农业推广
  • 2018做网站的视频买卖友情链接
  • wordpress api定制常德seo
  • 扫码支付做进商城网站怎么做电商创业
  • wordpress栏目页打不开首页排名关键词优化
  • 免备案网站怎么备案域名torrentkitty搜索引擎
  • 新建网站的外链多久生效杭州seo专员
  • 西安市政道桥建设公司网站桂林网页
  • 海城网站制作查询网 域名查询
  • 做再生资源的网站有哪些网站站内推广怎么做
  • 丽水山耕品牌建设网站友情链接检测的特点
  • 建设网站怎样做seo排名软件价格
  • 做电商网站需要会些什么高报师培训机构排名