Quellcode durchsuchen

添加回到旧版确认提示

11wqe1 vor 3 Wochen
Ursprung
Commit
d992ae400d
5 geänderte Dateien mit 34 neuen und 15 gelöschten Zeilen
  1. 2 1
      src/lang/cn.json
  2. 2 1
      src/lang/en.json
  3. 2 1
      src/lang/hk.json
  4. 14 6
      src/views/HomeView.vue
  5. 14 6
      src/views/login/loginPage.vue

+ 2 - 1
src/lang/cn.json

@@ -137,5 +137,6 @@
 	"Summarypopular": "热门表单人数汇总",
 	"Totalforms": "表单总量",
 	"Formrate": "表单回收率",
-	"Intelfrequency": "智能回答次数"
+	"Intelfrequency": "智能回答次数",
+	"backoldversion":"确定回到旧版吗?"
 }

+ 2 - 1
src/lang/en.json

@@ -137,5 +137,6 @@
   "Summarypopular": "Summary of popular form participants",
   "Totalforms": "Total forms",
   "Formrate": "Form response rate",
-  "Intelfrequency": "Intelligent response frequency"
+  "Intelfrequency": "Intelligent response frequency",
+	"backoldversion":"Are you sure to go back to the old version?"
 }

+ 2 - 1
src/lang/hk.json

@@ -137,5 +137,6 @@
   "Summarypopular": "熱門表單人數匯總",
   "Totalforms": "表單總量",
   "Formrate": "表單回收率",
-  "Intelfrequency": "智能回答次數"
+  "Intelfrequency": "智能回答次數",
+  "backoldversion":"確定回到舊版嗎?"
 }

+ 14 - 6
src/views/HomeView.vue

@@ -213,12 +213,20 @@ export default {
 		},
 		// 返回旧版本
 		backVersion(){
-			console.log(this.$region);
-			if (this.$region == 'beta') {
-				window.topU.location.href = 'https://beta.cloud.cocorobo.cn/index.html'
-			}else{
-				window.topU.location.href = 'https://cloud.cocorobo.cn/index.html'
-			}
+			this.$confirm(this.lang.backoldversion, this.lang.tip, {
+				confirmButtonText: this.lang.confirm,
+				cancelButtonText: this.lang.Cancel,
+				type: "warning",
+			})
+			.then(() => {
+				console.log(this.$region);
+				if (this.$region == 'beta') {
+					window.topU.location.href = 'https://beta.cloud.cocorobo.cn/index.html'
+				}else{
+					window.topU.location.href = 'https://cloud.cocorobo.cn/index.html'
+				}
+			})
+			.catch(() => {});
 		},
 		// 打开平台应用工具
 		AddAppJson(val) {

+ 14 - 6
src/views/login/loginPage.vue

@@ -409,12 +409,20 @@ export default {
 		}),
 		// 返回旧版本
 		backVersion(){
-			console.log(this.$region);
-			if (this.$region == 'beta') {
-				window.topU.location.href = 'https://beta.cloud.cocorobo.cn/index.html'
-			}else{
-				window.topU.location.href = 'https://cloud.cocorobo.cn/index.html'
-			}
+			this.$confirm(this.lang.backoldversion, this.lang.tip, {
+				confirmButtonText: this.lang.confirm,
+				cancelButtonText: this.lang.Cancel,
+				type: "warning",
+			})
+			.then(() => {
+				console.log(this.$region);
+				if (this.$region == 'beta') {
+					window.topU.location.href = 'https://beta.cloud.cocorobo.cn/index.html'
+				}else{
+					window.topU.location.href = 'https://cloud.cocorobo.cn/index.html'
+				}
+			})
+			.catch(() => {});
 		},
 		// 获取组织后缀
 		async getSuffix() {