diff --git a/package-lock.json b/package-lock.json index 4b86cb44..7091c612 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,6 +26,7 @@ "element-plus": "2.1.4", "escape-html": "1.0.3", "js-base64": "3.7.2", + "js-cookie": "^3.0.5", "js-file-download": "0.4.12", "less-loader": "6.0.0", "lodash": "4.17.21", @@ -9542,6 +9543,14 @@ "version": "3.7.2", "license": "BSD-3-Clause" }, + "node_modules/js-cookie": { + "version": "3.0.5", + "resolved": "https://registry.npmmirror.com/js-cookie/-/js-cookie-3.0.5.tgz", + "integrity": "sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw==", + "engines": { + "node": ">=14" + } + }, "node_modules/js-file-download": { "version": "0.4.12", "license": "MIT" @@ -23820,6 +23829,11 @@ "js-base64": { "version": "3.7.2" }, + "js-cookie": { + "version": "3.0.5", + "resolved": "https://registry.npmmirror.com/js-cookie/-/js-cookie-3.0.5.tgz", + "integrity": "sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw==" + }, "js-file-download": { "version": "0.4.12" }, diff --git a/package.json b/package.json index 5b98a7cf..38b5ab53 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "element-plus": "2.1.4", "escape-html": "1.0.3", "js-base64": "3.7.2", + "js-cookie": "^3.0.5", "js-file-download": "0.4.12", "less-loader": "6.0.0", "lodash": "4.17.21", diff --git a/src/views/Publish/accurate/channel/ContactAdd.vue b/src/views/Publish/accurate/channel/ContactAdd.vue index a725bab5..b73e99dc 100644 --- a/src/views/Publish/accurate/channel/ContactAdd.vue +++ b/src/views/Publish/accurate/channel/ContactAdd.vue @@ -15,8 +15,8 @@ - - + +
查询 @@ -53,7 +53,7 @@ const confirmLoading = ref(false); const formRef = ref(); const formState = ref({ appName: '', - appId: '' + contactPerson: '' }); const labelCol = ref({ span: 7 }); const wrapperCol = ref({ span: 16 }); diff --git a/src/views/Publish/accurate/channel/Wechat.vue b/src/views/Publish/accurate/channel/Wechat.vue index c2fe5e0f..e4f2740b 100644 --- a/src/views/Publish/accurate/channel/Wechat.vue +++ b/src/views/Publish/accurate/channel/Wechat.vue @@ -39,11 +39,14 @@ import { defineProps, onMounted, ref, watch } from 'vue'; import { getTeamSigns, savePublish,getPublishDetail } from '@/api/accurate'; import { message } from 'ant-design-vue'; import { useRoute,useRouter } from 'vue-router'; +import Cookies from 'js-cookie'; const route = useRoute() const router = useRouter() + const props = defineProps({ channel: { type: [Number, String], default: '' } }); + const formRef = ref(); const addContactRef = ref(); const formState = ref({ @@ -112,7 +115,14 @@ async function submitData(){ const res = await savePublish(params); if(res.data) { - window.location.href = res.data[0].redirectUrl; + if (props.channel.appCategory === 'YIP'){ + +// 获取指定 Cookie + const token = Cookies.get('_idp_session'); + window.location.href = res.data[0].redirectUrl +'&idp_token_id='+token._idp_session; + }else{ + window.location.href = res.data[0].redirectUrl; + } } message.success('提交成功'); // onCancel()