提交 d307d61d 编写于 作者: guangjun.yang's avatar guangjun.yang

1、接口超时提示优化

2、所有页面增加加载loading
3、部分样式优化
上级 e43dc65e
......@@ -59,20 +59,20 @@ export default {
height: 100%;
left: 0;
top: 0;
z-index: 1000000015;
z-index: 1000000017;
font-size: 20px;
.mask {
position: absolute;
background: rgba(0, 0, 0, 0.5);
width: 100%;
height: 100%;
z-index: 1000000016;
z-index: 1000000018;
}
.content {
position: absolute;
left: 50%;
top: 50%;
z-index: 1000000017;
z-index: 1000000019;
width: 300px;
// height: 185px;
margin: -150px 0 0 -150px;
......
......@@ -34,20 +34,20 @@
<style lang="scss" scoped>
.common-loader {
&-mask {
.loader-mask {
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: 100;
background: rgba(0, 0, 0, 0.5);
z-index: 1000000020;
background: rgba(0, 0, 0, 0.1);
}
svg {
position: absolute;
top: 280px;
position: fixed;
top: 300px;
left: 172px;
z-index: 101;
z-index: 1000000021;
}
}
......
......@@ -22,7 +22,7 @@ export default {
position: fixed;
width: 100%;
left: 0;
top: 74px;
top: 73px;
z-index: 1;
height: 44px;
line-height: 44px;
......
......@@ -59,7 +59,7 @@ export default {
position: fixed;
width: 100%;
left: 0;
top: 74px;
top: 73px;
z-index: 1001;
height: 44px;
line-height: 44px;
......
......@@ -4,6 +4,7 @@
<CommonTitleWithDropdown :dataList="dropdownList" :title="title" :needRightBtn="needRightBtn" @selectSortItem="selectSortItem"></CommonTitleWithDropdown>
<ExamScoreList class="pdt-50" :dataList="dataList"></ExamScoreList>
<CommonNoMore v-if="dataList.length >= 10" class="mt-10"></CommonNoMore>
<Loading v-show="isShowLoading"></Loading>
</section>
</template>
<script>
......@@ -14,10 +15,19 @@ import CommonHeader from "@/components/common/common-header";
import CommonTitleWithDropdown from "@/components/common/common-title-with-dropdown";
import CommonNoMore from "@/components/common/common-no-more";
import ExamScoreList from "@/components/bussiness/exam-score-list";
import Loading from "@/components/common/common-loading";
export default {
components: {
CommonHeader,
CommonTitleWithDropdown,
CommonNoMore,
ExamScoreList,
Loading
},
data() {
return {
isShowLoading: true,
title: "共0条数据",
needRightBtn: true,
token: "",
......@@ -50,15 +60,8 @@ export default {
desc: '10分',
type: 3
}],
};
},
components: {
CommonHeader,
CommonTitleWithDropdown,
CommonNoMore,
ExamScoreList
},
created() {
if (process.client) {
if(this.$route && this.$route.query) {
......@@ -80,6 +83,7 @@ export default {
async getGeneralExam(queryData) {
await getGeneralExam(queryData).then(res => {
if (res.code === "000000") {
this.isShowLoading = false;
this.allData = res.data;
this.dataList = res.data.examScoreList;
this.title = `共${this.dataList.length}条数据`;
......@@ -101,7 +105,7 @@ export default {
</script>
<style lang="less" scoped>
.pdt-50 {
padding-top: 49px;
padding-top: 50px;
}
.mt-10 {
margin-top: 10px !important;
......
......@@ -4,6 +4,7 @@
<CommonTitleMini :title="title" :needRightBtn="needRightBtn"></CommonTitleMini>
<ExamTimesList class="pdt-50" :dataList="dataList"></ExamTimesList>
<CommonNoMore v-if="dataList.length >= 10" class="mt-10"></CommonNoMore>
<Loading v-show="isShowLoading"></Loading>
</section>
</template>
<script>
......@@ -14,10 +15,19 @@ import CommonHeader from "@/components/common/common-header";
import CommonTitleMini from "@/components/common/common-title-mini";
import CommonNoMore from "@/components/common/common-no-more";
import ExamTimesList from "@/components/bussiness/exam-times-list";
import Loading from "@/components/common/common-loading";
export default {
components: {
CommonHeader,
CommonTitleMini,
CommonNoMore,
ExamTimesList,
Loading
},
data() {
return {
isShowLoading: true,
title: "共0条数据",
needRightBtn: false,
token: "",
......@@ -41,13 +51,6 @@ export default {
dataList: []
};
},
components: {
CommonHeader,
CommonTitleMini,
CommonNoMore,
ExamTimesList
},
created() {
if (process.client) {
if(this.$route && this.$route.query) {
......@@ -69,6 +72,7 @@ export default {
async getGeneralExam(queryData) {
await getGeneralExam(queryData).then(res => {
if (res.code === "000000") {
this.isShowLoading = false;
this.dataList = res.data.examTimesList;
this.title = `共${this.dataList.length}条数据`
}
......@@ -79,7 +83,7 @@ export default {
</script>
<style lang="less" scoped>
.pdt-50 {
padding-top: 49px;
padding-top: 50px;
}
.mt-10 {
margin-top: 10px !important;
......
此差异已折叠。
......@@ -86,6 +86,7 @@
<PicaOrg v-show="isShowOrg" @confirm="orgConfirm" @cancel="orgCancel"></PicaOrg>
<CommonLoading v-show="false"></CommonLoading>
<PopTips :tipsContent="tipsContent" @clickTips="clickTips" v-show="isShowTips"></PopTips>
<Loading v-show="isShowLoading"></Loading>
</section>
</template>
......@@ -141,6 +142,8 @@ import OrgDoctorList from "@/components/bussiness/org-doctor-list";
import ExamList from "@/components/bussiness/exam-list";
import PopTips from "@/components/bussiness/pop-tips";
import CommonCard from "@/components/common/common-card";
import Loading from "@/components/common/common-loading";
import {
getGeneralData
} from "@/service/index";
......@@ -178,9 +181,11 @@ export default {
ChartColumnVerticalScore,
PopTips,
CommonTitleWithWhat,
Loading
},
data() {
return {
isShowLoading: true,
isScroll: false,
isShowArea: false,
isShowOrg: false,
......@@ -455,6 +460,7 @@ export default {
getGeneralPersonal(params) {
getGeneralPersonal(params).then(res => {
if (res.code === "000000") {
this.isShowLoading = false;
this.allData = res.data;
this.studyRankList = this.allData.studyRank || [];
this.costRankList = this.allData.costRank || [];
......@@ -473,6 +479,7 @@ export default {
getGeneralData(queryData) {
getGeneralData(queryData).then(res => {
if (res.code === "000000") {
this.isShowLoading = false;
this.allData = res.data;
this.studyRankList = this.allData.studyRank || []
this.costRankList = this.allData.costRank || [];
......
......@@ -4,6 +4,7 @@
<TitleKLGPoint :title="title"></TitleKLGPoint>
<TipsInfo :content="tipsContent"></TipsInfo>
<ChartColumnHorizontalTCLong :dataList="knowledgeEffectList" class="mt-10"></ChartColumnHorizontalTCLong>
<Loading v-show="isShowLoading"></Loading>
</section>
</template>
<script>
......@@ -14,10 +15,19 @@ import CommonHeader from "@/components/common/common-header";
import TitleKLGPoint from "@/components/bussiness/title-klg-point";
import TipsInfo from '@/components/bussiness/tips-info'
import ChartColumnHorizontalTCLong from "@/components/bussiness/charts/chart-column-horizontal-tc-long";
import Loading from "@/components/common/common-loading";
export default {
components: {
CommonHeader,
TitleKLGPoint,
ChartColumnHorizontalTCLong,
TipsInfo,
Loading
},
data() {
return {
isShowLoading: true,
title: "共0个知识点",
token: '',
queryGDParams: {
......@@ -40,12 +50,6 @@ export default {
knowledgeEffectList: [],
};
},
components: {
CommonHeader,
TitleKLGPoint,
ChartColumnHorizontalTCLong,
TipsInfo
},
created() {
if (process.client) {
......@@ -65,6 +69,7 @@ export default {
async getStudyEffect(params) {
await getStudyEffect(params).then(res => {
if (res.code === "000000") {
this.isShowLoading = false;
this.knowledgeEffectList = res.data.knowledgeEffectList || [];
this.title = `共${this.knowledgeEffectList.length}个知识点`;
}
......
<template>
<section>
<CommonHeader title="完成天数排名"></CommonHeader>
<CommonTitleMiniWithDropdown :title="listTitle" @selectSortItem="selectSortItem"></CommonTitleMiniWithDropdown>
<CommonTitleWithDropdown :title="listTitle" @selectSortItem="selectSortItem"></CommonTitleWithDropdown>
<RankingItemDays class="pdt-50" :rankList="rankList"></RankingItemDays>
<CommonNoMore v-if="rankList.length >= 10" class="mt-10"></CommonNoMore>
<Loading v-show="isShowLoading"></Loading>
</section>
</template>
<script>
......@@ -11,13 +12,22 @@ const cookies = require("cookie-universal")();
import { getStudyTimeData } from "@/service";
import CommonHeader from "@/components/common/common-header";
import CommonTitleMiniWithDropdown from "@/components/common/common-title-with-dropdown";
import CommonTitleWithDropdown from "@/components/common/common-title-with-dropdown";
import RankingItemDays from "@/components/bussiness/ranking-item-days";
import CommonNoMore from "@/components/common/common-no-more";
import Loading from "@/components/common/common-loading";
export default {
components: {
CommonHeader,
CommonTitleWithDropdown,
RankingItemDays,
CommonNoMore,
Loading
},
data() {
return {
isShowLoading: true,
listTitle: '共0条数据',
rankList: [],
queryGDParams: {
......@@ -37,12 +47,6 @@ export default {
},
};
},
components: {
CommonHeader,
CommonTitleMiniWithDropdown,
RankingItemDays,
CommonNoMore
},
created() {
if (process.client) {
......@@ -62,6 +66,7 @@ export default {
async getStudyTimeData(params) {
await getStudyTimeData(params).then(res => {
if (res.code === "000000") {
this.isShowLoading = false;
this.rankList = res.data.costRank;
// this.listTitle = `共${this.rankList.length}个省`
this.listTitle = `共${this.rankList.length}条数据`
......@@ -78,7 +83,7 @@ export default {
</script>
<style lang="less" scoped>
.pdt-50 {
padding-top: 49px;
padding-top: 50px;
}
.mt-10 {
margin-top: 10px !important;
......
......@@ -4,6 +4,7 @@
<CommonTitleWithDropdown :dataList="dropdownList" :title="title" :needRightBtn="needRightBtn" @selectSortItem="selectSortItem"></CommonTitleWithDropdown>
<RankingList class="pdt-50" :certFlag="certFlag" :rankList="rankList"></RankingList>
<CommonNoMore v-if="rankList.length >= 10" class="mt-10"></CommonNoMore>
<Loading v-show="isShowLoading"></Loading>
</section>
</template>
<script>
......@@ -14,10 +15,19 @@ import CommonHeader from "@/components/common/common-header";
import CommonTitleWithDropdown from "@/components/common/common-title-with-dropdown";
import CommonNoMore from "@/components/common/common-no-more";
import RankingList from "@/components/bussiness/ranking-item";
import Loading from "@/components/common/common-loading";
export default {
components: {
CommonHeader,
CommonTitleWithDropdown,
CommonNoMore,
RankingList,
Loading
},
data() {
return {
isShowLoading: true,
title: '共0条数据',
rankList: [],
needRightBtn: true,
......@@ -49,12 +59,6 @@ export default {
certFlag: 0
};
},
components: {
CommonHeader,
CommonTitleWithDropdown,
CommonNoMore,
RankingList
},
created() {
if(process.client) {
if(this.$route && this.$route.query) {
......@@ -86,6 +90,7 @@ export default {
async getStudyRankData(params) {
await getStudyRankData(params).then(res => {
if (res.code === "000000") {
this.isShowLoading = false;
this.rankList = res.data.studyRank;
this.title = `共${this.rankList.length}条数据`
}
......@@ -101,7 +106,7 @@ export default {
</script>
<style lang="less" scoped>
.pdt-50 {
padding-top: 49px;
padding-top: 50px;
}
.mt-10 {
margin-top: 10px !important;
......
......@@ -22,6 +22,7 @@ Axios.interceptors.request.use(
// config.headers.token = '3EB9111164E84A45B5B00428D52BC966';
config.headers.token = cookies.get('lreporttoken') || '8F88F86408314155B6840723FAB7DAEC' || '299F66567E7C48C78ADE418B364C5A35' || 'F24CD42F1CFA46829639228E9CFE1E3D' || 'C284B868425D494386EAEF6C9AE99937';
}
// config.timeout = 30000;
return config;
},
error => {
......@@ -30,7 +31,8 @@ Axios.interceptors.request.use(
error.code === 'ECONNABORTED' &&
error.message.indexOf('timeout') !== -1
) {
VUE_ENV === 'client' && Toast({ message: '请求超时', duration: 1000 });
VUE_ENV === 'client' && Toast({ message: '系统繁忙,请稍后重新进入页面查询', duration: 1000 });
// VUE_ENV === 'client' && Toast({ message: '请求超时', duration: 1000 });
}
return Promise.reject(error);
}
......@@ -46,7 +48,7 @@ export default function(options) {
return new Promise((resolve, reject) => {
Axios(options)
.then(res => {
.then(res => {
const { status, data } = res;
if (status !== 200) {
let cmsg = REPONSE_CODE[status];
......@@ -59,12 +61,14 @@ export default function(options) {
if (data.code != '000000') {
// 如果要是有其他特殊需求在此处添加
console.log(`调用后台接口报错,CODE: ${data.code},MESSAGE: ${data.message}。`);
// console.log(`调用后台接口报错,CODE: ${data.code},MESSAGE: ${data.message}。`);
}
resolve(res.data);
})
.catch(error => {
console.log('axios catch error: ', error.message);
VUE_ENV === 'client' && Toast({ message: error.message, duration: 1000 });
// console.log('axios catch error: ', error.message);
VUE_ENV === 'client' && Toast({ message: '系统繁忙,请稍后重新进入页面查询', duration: 1000 });
// VUE_ENV === 'client' && Toast({ message: error.message, duration: 1000 });
// reject(error);
})
})
......
......@@ -2,7 +2,8 @@ const { NUXT_ENV_APP } = process.env;
export const BASE_URL = {
// dev: 'https://dev-sc.yunqueyi.com',
dev: 'https://uat-sc.yunqueyi.com',
// dev: 'https://uat-sc.yunqueyi.com',
dev: 'https://sc.yunqueyi.com',
test: 'https://test1-sc.yunqueyi.com',
uat: 'https://uat-sc.yunqueyi.com',
prod: 'https://sc.yunqueyi.com'
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册