Merge branch 'feature_20250331_channel' of https://e.coding.yili.com/yldc/ylst/ylst-survey-web into feature_20250331_channel

This commit is contained in:
liu.huiying@ebiz-digits.com
2025-03-19 16:24:23 +08:00
4 changed files with 29 additions and 4 deletions

14
package-lock.json generated
View File

@@ -26,6 +26,7 @@
"element-plus": "2.1.4", "element-plus": "2.1.4",
"escape-html": "1.0.3", "escape-html": "1.0.3",
"js-base64": "3.7.2", "js-base64": "3.7.2",
"js-cookie": "^3.0.5",
"js-file-download": "0.4.12", "js-file-download": "0.4.12",
"less-loader": "6.0.0", "less-loader": "6.0.0",
"lodash": "4.17.21", "lodash": "4.17.21",
@@ -9542,6 +9543,14 @@
"version": "3.7.2", "version": "3.7.2",
"license": "BSD-3-Clause" "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": { "node_modules/js-file-download": {
"version": "0.4.12", "version": "0.4.12",
"license": "MIT" "license": "MIT"
@@ -23820,6 +23829,11 @@
"js-base64": { "js-base64": {
"version": "3.7.2" "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": { "js-file-download": {
"version": "0.4.12" "version": "0.4.12"
}, },

View File

@@ -32,6 +32,7 @@
"element-plus": "2.1.4", "element-plus": "2.1.4",
"escape-html": "1.0.3", "escape-html": "1.0.3",
"js-base64": "3.7.2", "js-base64": "3.7.2",
"js-cookie": "^3.0.5",
"js-file-download": "0.4.12", "js-file-download": "0.4.12",
"less-loader": "6.0.0", "less-loader": "6.0.0",
"lodash": "4.17.21", "lodash": "4.17.21",

View File

@@ -15,8 +15,8 @@
<a-form-item label="应用名称" name="appName"> <a-form-item label="应用名称" name="appName">
<a-input v-model:value="formState.appName" placeholder="请输入应用名称"/> <a-input v-model:value="formState.appName" placeholder="请输入应用名称"/>
</a-form-item> </a-form-item>
<a-form-item label="应用负责人" name="appId"> <a-form-item label="应用负责人" name="contactPerson">
<a-input v-model:value="formState.appId" placeholder="请输入应用负责人"/> <a-input v-model:value="formState.contactPerson" placeholder="请输入应用负责人"/>
</a-form-item> </a-form-item>
<div style="display: flex"> <div style="display: flex">
<a-button style="margin-right: 16px" type="primary" @click="onSubmit">查询</a-button> <a-button style="margin-right: 16px" type="primary" @click="onSubmit">查询</a-button>
@@ -53,7 +53,7 @@ const confirmLoading = ref(false);
const formRef = ref(); const formRef = ref();
const formState = ref({ const formState = ref({
appName: '', appName: '',
appId: '' contactPerson: ''
}); });
const labelCol = ref({ span: 7 }); const labelCol = ref({ span: 7 });
const wrapperCol = ref({ span: 16 }); const wrapperCol = ref({ span: 16 });

View File

@@ -39,11 +39,14 @@ import { defineProps, onMounted, ref, watch } from 'vue';
import { getTeamSigns, savePublish,getPublishDetail } from '@/api/accurate'; import { getTeamSigns, savePublish,getPublishDetail } from '@/api/accurate';
import { message } from 'ant-design-vue'; import { message } from 'ant-design-vue';
import { useRoute,useRouter } from 'vue-router'; import { useRoute,useRouter } from 'vue-router';
import Cookies from 'js-cookie';
const route = useRoute() const route = useRoute()
const router = useRouter() const router = useRouter()
const props = defineProps({ const props = defineProps({
channel: { type: [Number, String], default: '' } channel: { type: [Number, String], default: '' }
}); });
const formRef = ref(); const formRef = ref();
const addContactRef = ref(); const addContactRef = ref();
const formState = ref({ const formState = ref({
@@ -112,8 +115,15 @@ async function submitData(){
const res = await savePublish(params); const res = await savePublish(params);
if(res.data) { if(res.data) {
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; window.location.href = res.data[0].redirectUrl;
} }
}
message.success('提交成功'); message.success('提交成功');
// onCancel() // onCancel()
} }