Commit 8b5b0dc9 by wenyi.chen

线上

parent 91be88cc
...@@ -44,11 +44,11 @@ service.interceptors.response.use( ...@@ -44,11 +44,11 @@ service.interceptors.response.use(
if (res.code && res.code !== 200) { if (res.code && res.code !== 200) {
if (res.code === 401) { if (res.code === 401) {
Session.clear(); // 清除浏览器全部临时缓存 Session.clear(); // 清除浏览器全部临时缓存
window.location.href = '/'; // 去登录页 window.location.href = '/login'; // 去登录页
ElMessageBox.alert('你已被登出,请重新登录', '提示', {}) ElMessageBox.alert('你已被登出,请重新登录', '提示', {})
}else if (res.code ===99){ }else if (res.code ===99){
Session.clear(); // 清除浏览器全部临时缓存 Session.clear(); // 清除浏览器全部临时缓存
window.location.href = '/'; // 去登录页 window.location.href = '/login'; // 去登录页
ElMessageBox.alert('登陆失效', '提示', {}) ElMessageBox.alert('登陆失效', '提示', {})
}else if (res.code === 101){ }else if (res.code === 101){
ElMessageBox.alert('账户不存在', '提示', {}) ElMessageBox.alert('账户不存在', '提示', {})
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<el-select v-model="state.formItem.addItem.refer_type" placeholder="请选择信源等级"> <el-select v-model="state.formItem.addItem.refer_type" placeholder="请选择信源等级">
<el-option label="官网/政府" value="1"></el-option> <el-option label="官网/政府" value="1"></el-option>
<el-option label="权威媒体" value="2"></el-option> <el-option label="权威媒体" value="2"></el-option>
<el-option label="其他可信信源" value="3"></el-option> <el-option label=" " value="3"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="标题" :prop="'userFilled.' + index+ '.name'" v-for="(item, index) in state.formItem.userFilled" :key="index"> <el-form-item label="标题" :prop="'userFilled.' + index+ '.name'" v-for="(item, index) in state.formItem.userFilled" :key="index">
...@@ -121,7 +121,7 @@ const state = reactive({ ...@@ -121,7 +121,7 @@ const state = reactive({
reason:'', reason:'',
}, },
rules: { rules: {
refer_type: [{ required: true, message: '请输入选择信源类型', trigger: 'blur' }], // refer_type: [{ required: true, message: '请输入选择信源类型', trigger: 'blur' }],
}, },
dialog: { dialog: {
isShowDialog: false, isShowDialog: false,
...@@ -274,6 +274,11 @@ const onSubmit = () => { ...@@ -274,6 +274,11 @@ const onSubmit = () => {
state.formItem.editorContent = editor.getHtml() // 获取富文本内容 state.formItem.editorContent = editor.getHtml() // 获取富文本内容
let userFilledInfo = state.formItem.userFilled; let userFilledInfo = state.formItem.userFilled;
let apiIndex = 1; let apiIndex = 1;
if(state.formItem.addItem.refer_type == ""){
apiIndex++;
ElMessage.error('请选择信源类型!');
return 0;
}
for(let i=0;i<userFilledInfo.length;i++) for(let i=0;i<userFilledInfo.length;i++)
{ {
if (userFilledInfo[i].radio==1) { if (userFilledInfo[i].radio==1) {
...@@ -288,6 +293,7 @@ const onSubmit = () => { ...@@ -288,6 +293,7 @@ const onSubmit = () => {
apiIndex++; apiIndex++;
state.formItem.editorImgList = []; state.formItem.editorImgList = [];
ElMessage.error('只允许上传两张图片!'); ElMessage.error('只允许上传两张图片!');
return 0;
} }
if(apiIndex==1){ if(apiIndex==1){
claimTasksApi().normCollectsAdd(JSON.stringify(state.formItem)).then(res => { claimTasksApi().normCollectsAdd(JSON.stringify(state.formItem)).then(res => {
......
...@@ -37,8 +37,8 @@ const viteConfig = defineConfig((mode) => { ...@@ -37,8 +37,8 @@ const viteConfig = defineConfig((mode) => {
hmr: true, hmr: true,
proxy: { proxy: {
'/dev': { '/dev': {
// target: 'https://data-collect.raisound.com/smart-detection', target: 'https://data-collect.raisound.com/smart-detection',
target: 'http://192.168.10.168/data-collect-api', // target: 'http://192.168.10.168/data-collect-api',
ws: true, ws: true,
changeOrigin: true, changeOrigin: true,
rewrite: (path) => path.replace(/^\/dev/, ''), rewrite: (path) => path.replace(/^\/dev/, ''),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment