直接看代码
根据后台要的格式发送这个是我公司后台要的格式
因为乙方公司名称和乙方公司ID比较多直接发送一个数组或者字符串后端太懒不接收这样的参数 没办法只能按照他的要求来发送给他 当前用户ID 当前公司名称因为每个只有一条 所以只能给们循环然后遍历出来
//发起签署
createContractsAndPublish(){
let _this = this
for(let i = 0; i< this.dataList.length; i++ ){
_this.pcContInfoVOS.push({
contName:this.stencil,
createUserCompany:this.$cookie.get('currentCompanyId'),//当前公司ID
firstCompanyName:this.$cookie.get('currentCompanyName'),//当前公司名称
secondCompanyName:this.dataList[i].partnerCompanyName, //乙方公司名称
secondId:this.dataList[i].partnerCompanyCode, //乙方公司ID
});
}
this.$axios({
url:'地址',
method: 'post',
data: {
param:JSON.stringify({
templateId :'226a0d306504498db437256f02ed5b05',
pcContInfoVOS: _this.pcContInfoVOS
})
},
headers:{
Authorization:this.$cookie.get('token')
}
}).then(result =>{
}).catch((error)=>{
});
}