Browse Source

提交问卷时,agencyId传参改为body

dev_itemshow_fix
wxz 2 years ago
parent
commit
785d0190bb
  1. 12
      src/views/form/write/index.vue

12
src/views/form/write/index.vue

@ -95,7 +95,8 @@ export default {
orgType: '',//(:agency;:dept;:grid) orgType: '',//(:agency;:dept;:grid)
realName: '',// realName: '',//
accessKey: '', accessKey: '',
anonymous:'' anonymous:'',
agencyId: ''
} }
}, },
metaInfo: { metaInfo: {
@ -118,7 +119,10 @@ export default {
console.log('微信传入token') console.log('微信传入token')
const token = this.$route.query.token const token = this.$route.query.token
const agencyId = this.$route.query.agencyId const agencyId = this.$route.query.agencyId
this.anonymous = this.$route.query.anonymous this.anonymous = this.$route.query.anonymous
this.agencyId = agencyId;
console.log('anonymous',this.anonymous); console.log('anonymous',this.anonymous);
if (token) { if (token) {
this.$store.dispatch('user/setTokens', token) this.$store.dispatch('user/setTokens', token)
@ -314,8 +318,9 @@ export default {
console.log('提交获取agencyId',this.$store.state.agencyId); console.log('提交获取agencyId',this.$store.state.agencyId);
// //
let inActiveTime = document.getElementById('inActiveTime').innerText let inActiveTime = document.getElementById('inActiveTime').innerText
let url = this.anonymous == '1'?`/user/project/result/createAnonymously?`:`/user/project/result/create?access_key=${this.accessKey}&` let url = this.anonymous == '1'?`/user/project/result/createAnonymously`:`/user/project/result/create?access_key=${this.accessKey}&`
await this.$api.post(`${process.env.VUE_APP_API_ROOT_TDUCK}${url}agencyId=${this.$route.query.agencyId}`, {
await this.$api.post(`${process.env.VUE_APP_API_ROOT_TDUCK}${url}`, {
'completeTime': inActiveTime, 'completeTime': inActiveTime,
'projectKey': this.projectConfig.projectKey, 'projectKey': this.projectConfig.projectKey,
'submitOs': ua.os.name, 'submitOs': ua.os.name,
@ -330,6 +335,7 @@ export default {
'orgName': this.orgName,//--- 'orgName': this.orgName,//---
'orgType': this.orgType,//(:agency;:dept;:grid) 'orgType': this.orgType,//(:agency;:dept;:grid)
'realName': this.realName,// 'realName': this.realName,//
'agencyId': this.agencyId
//'accessKey':this.accessKey //'accessKey':this.accessKey
}).then((res) => { }).then((res) => {
if(res.code==0){ if(res.code==0){

Loading…
Cancel
Save