From e9d90e9ea68a2ee82869124ff092dc21f329f2b0 Mon Sep 17 00:00:00 2001
From: yj <2077506045@qq.com>
Date: 星期四, 27 十一月 2025 11:00:22 +0800
Subject: [PATCH] 移动端不显示关闭按钮与相应文字
---
src/lang/th.js | 3 +++
src/lang/zh.js | 2 ++
src/views/exam/paper/finish.vue | 16 +++++++++++-----
src/lang/en.js | 3 +++
src/views/exam/paper/personality.vue | 17 ++++++++++++-----
5 files changed, 31 insertions(+), 10 deletions(-)
diff --git a/src/lang/en.js b/src/lang/en.js
index 9d38d3f..c3e7e60 100644
--- a/src/lang/en.js
+++ b/src/lang/en.js
@@ -63,6 +63,9 @@
partRemailTime: 'Remaining Time:',
finishIntelligenceInfo: 'You have completed the cognitive ability test questionnaire, the data has been successfully uploaded to the server, and has been saved. Thank you.',
finishPersonalityInfo: 'You have completed the personality questionnaire, and the data has been successfully uploaded to the server and saved. ',
+ finishPersonalityInfo_mobile: 'You have completed the personality questionnaire, and the data has been successfully uploaded to the server and saved. ',
+ finishPersonalityInfo_apifan: 'You have completed the personality questionnaire, and the data has been successfully uploaded to the server and saved. ',
+ finishPersonalityInfo_apifan_mobile: 'You have completed the personality questionnaire, and the data has been successfully uploaded to the server and saved. ',
finishCareerInterestsInfo: 'You have completed the Career Interests questionnaire, and the data has been successfully uploaded to the server and saved. ',
finishPersonalityDownInfo: 'You may click the button below to download your test report.',
finishViewReportInfo: 'You can click on the button below to view your result report.',
diff --git a/src/lang/th.js b/src/lang/th.js
index 462fc77..36fa026 100644
--- a/src/lang/th.js
+++ b/src/lang/th.js
@@ -63,6 +63,9 @@
partRemailTime: 'Remaining Time:',
finishIntelligenceInfo: 'You have completed the cognitive ability test questionnaire, the data has been successfully uploaded to the server, and has been saved. Thank you.',
finishPersonalityInfo: 'You have completed the personality quetionnaire, and the data has been successfully uploaded to the server and saved. ',
+ finishPersonalityInfo_mobile: 'You have completed the personality quetionnaire, and the data has been successfully uploaded to the server and saved. ',
+ finishPersonalityInfo_apifan: 'You have completed the personality quetionnaire, and the data has been successfully uploaded to the server and saved. ',
+ finishPersonalityInfo_apifan_mobile: 'You have completed the personality quetionnaire, and the data has been successfully uploaded to the server and saved. ',
finishCareerInterestsInfo: 'You have completed the Career Interests quetionnaire, and the data has been successfully uploaded to the server and saved. ',
finishPersonalityDownInfo: 'You may click the button below to download your test report.',
finishViewReportInfo: 'You can click on the button below to view your result report.',
diff --git a/src/lang/zh.js b/src/lang/zh.js
index 269013e..55637cd 100644
--- a/src/lang/zh.js
+++ b/src/lang/zh.js
@@ -63,7 +63,9 @@
partRemailTime: '鍓╀綑鏃堕棿:',
finishIntelligenceInfo: '鎮ㄥ凡缁忓畬鎴愪簡璁ょ煡鑳藉姏娴嬭瘯闂嵎锛屾暟鎹凡缁忔垚鍔熷湴涓婁紶鑷虫湇鍔″櫒锛屽苟宸茬粡淇濆瓨濂姐�傝阿璋€��',
finishPersonalityInfo: '鎮ㄥ凡缁忓畬鎴愪簡浜烘牸娴嬭瘯闂嵎锛屾暟鎹凡缁忔垚鍔熷湴涓婁紶鑷虫湇鍔″櫒锛屽苟宸茬粡淇濆瓨濂姐�傜幇鍦ㄦ偍鍙互鐐瑰嚮涓嬮潰鐨勨�滃叧闂�濇寜閽叧闂〉闈�',
+ finishPersonalityInfo_mobile: '鎮ㄥ凡缁忓畬鎴愪簡浜烘牸娴嬭瘯闂嵎锛屾暟鎹凡缁忔垚鍔熷湴涓婁紶鑷虫湇鍔″櫒锛屽苟宸茬粡淇濆瓨濂姐��',
finishPersonalityInfo_apifan: '鎮ㄥ凡缁忓畬鎴愪簡浜烘牸娴嬭瘯闂嵎锛屾暟鎹凡缁忔垚鍔熷湴涓婁紶鑷虫湇鍔″櫒锛屽凡缁忎繚瀛樺ソ銆傜幇鍦ㄦ偍鍙互鐐瑰嚮涓嬮潰鐨勨�滃叧闂�濇寜閽叧闂〉闈€��',
+ finishPersonalityInfo_apifan_mobile: '鎮ㄥ凡缁忓畬鎴愪簡浜烘牸娴嬭瘯闂嵎锛屾暟鎹凡缁忔垚鍔熷湴涓婁紶鑷虫湇鍔″櫒锛屽凡缁忎繚瀛樺ソ銆�',
finishCareerInterestsInfo: '鎮ㄥ凡缁忓畬鎴愪簡鑱屼笟鍏磋叮闂嵎锛屾暟鎹凡缁忔垚鍔熷湴涓婁紶鑷虫湇鍔″櫒锛屽苟宸茬粡淇濆瓨濂姐��',
finishPersonalityDownInfo: '鎮ㄥ彲浠ョ偣鍑讳笅闈㈡寜閽笅杞芥偍鐨勭粨鏋滄姤鍛娿��',
finishViewReportInfo: '鎮ㄥ彲浠ョ偣鍑讳笅闈㈡寜閽煡鐪嬫偍鐨勭粨鏋滄姤鍛娿��',
diff --git a/src/views/exam/paper/finish.vue b/src/views/exam/paper/finish.vue
index b0ff0d9..76b20af 100644
--- a/src/views/exam/paper/finish.vue
+++ b/src/views/exam/paper/finish.vue
@@ -6,7 +6,7 @@
<el-main class="align-center">
<H2 v-if="content!==null && content.trim()!==''">{{content}}</H2>
<H2 v-else>{{$t('finishMsg')}}</H2>
- <el-button type="danger" @click="closePage" round>{{$t('close')}}</el-button>
+ <el-button class="close-page" type="danger" @click="closePage" round>{{$t('close')}}</el-button>
<!-- 鏂板涓嬭浇鎶ュ憡鎻愮ず璇� -->
<H2 v-if ="downDisable">{{$t('finishPersonalityDownInfo')}}</H2>
<el-button type="success" v-if ="downDisable" @click="downReport" round>{{$t('down')}}</el-button>
@@ -85,11 +85,11 @@
viewReportH5: function () {
let _this = this
_this.$router.push({ path: '/report/h5', query: { tokenId: _this.tokenId } })
- },
- isMobile () {
- let flag = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)
- return flag
}
+ // isMobile () {
+ // let flag = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)
+ // return flag
+ // }
},
computed: {
}
@@ -113,4 +113,10 @@
padding-left: 25px;
padding-right: 25px;
}
+
+ @media (max-width: 1024px) {
+ .close-page {
+ display: none;
+ }
+}
</style>
diff --git a/src/views/exam/paper/personality.vue b/src/views/exam/paper/personality.vue
index 0a0e3ef..7563f2a 100644
--- a/src/views/exam/paper/personality.vue
+++ b/src/views/exam/paper/personality.vue
@@ -493,16 +493,20 @@
} else {
_this.answer.verifyStatus = 1
_this.answer.finish = 1
+ let text = _this.$t('finishPersonalityInfo')
+ if (_this.isMobile()) {
+ text = _this.$t('finishPersonalityInfo_mobile')
+ }
if (this.form) {
let productType = this.form.productType
if (productType === 'API_Fan') {
- _this.submitAnswer(_this.$t('finishPersonalityInfo_apifan'))
- } else {
- _this.submitAnswer(_this.$t('finishPersonalityInfo'))
+ text = _this.$t('finishPersonalityInfo_apifan')
+ if (_this.isMobile()) {
+ text = _this.$t('finishPersonalityInfo_apifan_mobile')
+ }
}
- } else {
- _this.submitAnswer(_this.$t('finishPersonalityInfo'))
}
+ _this.submitAnswer(text)
}
},
startDo: function () {
@@ -593,6 +597,9 @@
let _this = this
return _this.form.titleItems[0].questionItems[_this.order].partOrder !== _this.form.titleItems[0].questionItems[_this.order - 1].partOrder
},
+ isMobile: function () {
+ return window.innerWidth < 1025
+ },
...mapMutations('user', ['setLangType']),
...mapMutations('user', ['setLangFlag']),
...mapMutations('user', ['getFormDo']),
--
Gitblit v1.9.1