Merge branch 'zcwy-zsx' into dev0731

This commit is contained in:
zhangsir
2024-02-22 15:52:48 +08:00
3 changed files with 53 additions and 13 deletions

View File

@@ -22,7 +22,8 @@
import {onMounted} from "vue";
import {useStore} from "vuex";
import {boeRequest, request} from "@/api/request";
import {GET_USER_INFO} from "@/api/ThirdApi";
import {GET_USER_INFO, GET_USER_LIST} from "@/api/ThirdApi";
import {USER_INFO} from "@/api/api";
@@ -34,20 +35,29 @@ onMounted(() => {
});
function getUserInfo() {
console.log("开始身份验证")
if (
import.meta.env.MODE === "development" ||
import.meta.env.MODE === "test"
import.meta.env.MODE === "development" ||
import.meta.env.MODE === "test"
) {
console.log("开始test身份验证")
request(USER_INFO, {}).then((res) => {
store.commit("SET_USER", res.data);
});
} else {
boeRequest(GET_USER_INFO).then((res) => {
res.result.avatar =
res.result.avatar || "/800e23f7-b58c-4192-820d-0c6a2b7544cc.png";
store.commit("SET_USER", res.result);
console.log("开始pre身份验证")
// 修改生产环境验证 GET_USER_INFO 接口不存在 选择GET_USER_LIST
// boeRequest(GET_USER_INFO).then((res) => {
// res.result.avatar =
// res.result.avatar || "/800e23f7-b58c-4192-820d-0c6a2b7544cc.png";
// store.commit("SET_USER", res.result);
// });
boeRequest(GET_USER_LIST, {}).then((res) => {
store.commit("SET_USER", res.data);
});
}
console.log("------结束身份验证")
}
</script>
<style lang="scss">

View File

@@ -1,5 +1,6 @@
export const BASE = 'https://u-pre.boe.com'
export const GET_USER_LIST = `/admin/CheckUser/userInfo`
export const GET_USER_INFO = `/admin/thirdApi/user/searchList`
export const GET_USER_LIST = `/manageApi/admin/CheckUser/userInfo`
export const GET_USER_INFO = `/manageApi/admin/thirdApi/user/searchList`
// export const GET_USER_LIST = `/admin/CheckUser/userInfo`
// export const GET_USER_INFO = `/admin/thirdApi/user/searchList`

View File

@@ -220,6 +220,23 @@
</div>
</div>
</div>
<el-dialog v-model="centerDialogVisible" title="" width="70%" center :show-close="false" :align-center="true">
<div style="text-align: center;font-size:16px;"> <span style="color:black">
您已完成评估
</span></div>
<template #footer>
<span class="dialog-footer">
<el-button class="cancel"
style="color: #387DF7; border: 1px solid #387DF7;padding: 8px 32px; border-radius: 4px;"
@click="centerDialogVisible = false">取消</el-button>
<el-button class="back"
style="background: #387DF7;box-shadow: 1px 2px 15px 1px rgba(56,125,247,0.34);border: 0px;padding: 8px 32px;"
type="primary" @click="centerDialogVisible = false">
确定
</el-button>
</span>
</template>
</el-dialog>
<!-- 提示用户有未填选项 -->
<el-dialog v-model="isEmptyValue" title="" width="70%" center :show-close="false" :align-center="true">
<div style="text-align: center;font-size:12px;"> <span style="color:black">
@@ -241,7 +258,7 @@
</template>
<script setup>
import { ref, reactive, toRefs, watch } from "vue";
import { ref, reactive, toRefs, watch,onMounted } from "vue";
import checkbox from "@/assets/image/checkbox.png";
import checkbox2 from "@/assets/image/checkbox2.png";
import { useRoute, useRouter } from "vue-router/dist/vue-router";
@@ -264,7 +281,7 @@ const {
type,
chapterOrStageId,
projectStatus,
projectEndTime,
projectEndTime,
},
} = useRoute();
const router = useRouter();
@@ -377,7 +394,19 @@ function orderArr(a, b) {
}
return arrs;
}
onMounted(() => {
useRequest(
ASSESSMENT_QUERY(courseId),{
id: courseId,
type,
chapterOrStageId,
targetId: infoId ? infoId : 0,
},(res)=>{
if (res.data.isSubmit) {
open();
}
})
});
const centerDialogVisible = ref(false);
const open = () => {
centerDialogVisible.value = true;