mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/student-h5.git
synced 2025-12-06 17:36:45 +08:00
Merge branch 'zcwy-zsx' into dev0731
This commit is contained in:
24
src/App.vue
24
src/App.vue
@@ -22,7 +22,8 @@
|
|||||||
import {onMounted} from "vue";
|
import {onMounted} from "vue";
|
||||||
import {useStore} from "vuex";
|
import {useStore} from "vuex";
|
||||||
import {boeRequest, request} from "@/api/request";
|
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";
|
import {USER_INFO} from "@/api/api";
|
||||||
|
|
||||||
@@ -34,20 +35,29 @@ onMounted(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
function getUserInfo() {
|
function getUserInfo() {
|
||||||
|
console.log("开始身份验证")
|
||||||
if (
|
if (
|
||||||
import.meta.env.MODE === "development" ||
|
import.meta.env.MODE === "development" ||
|
||||||
import.meta.env.MODE === "test"
|
import.meta.env.MODE === "test"
|
||||||
) {
|
) {
|
||||||
|
console.log("开始test身份验证")
|
||||||
request(USER_INFO, {}).then((res) => {
|
request(USER_INFO, {}).then((res) => {
|
||||||
store.commit("SET_USER", res.data);
|
store.commit("SET_USER", res.data);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
boeRequest(GET_USER_INFO).then((res) => {
|
console.log("开始pre身份验证")
|
||||||
res.result.avatar =
|
// 修改生产环境验证 GET_USER_INFO 接口不存在 选择GET_USER_LIST
|
||||||
res.result.avatar || "/800e23f7-b58c-4192-820d-0c6a2b7544cc.png";
|
// boeRequest(GET_USER_INFO).then((res) => {
|
||||||
store.commit("SET_USER", res.result);
|
// 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>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
export const BASE = 'https://u-pre.boe.com'
|
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`
|
||||||
@@ -220,6 +220,23 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</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">
|
<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">
|
<div style="text-align: center;font-size:12px;"> <span style="color:black">
|
||||||
@@ -241,7 +258,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<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 checkbox from "@/assets/image/checkbox.png";
|
||||||
import checkbox2 from "@/assets/image/checkbox2.png";
|
import checkbox2 from "@/assets/image/checkbox2.png";
|
||||||
import { useRoute, useRouter } from "vue-router/dist/vue-router";
|
import { useRoute, useRouter } from "vue-router/dist/vue-router";
|
||||||
@@ -377,7 +394,19 @@ function orderArr(a, b) {
|
|||||||
}
|
}
|
||||||
return arrs;
|
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 centerDialogVisible = ref(false);
|
||||||
const open = () => {
|
const open = () => {
|
||||||
centerDialogVisible.value = true;
|
centerDialogVisible.value = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user