Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web into main
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
9cb9478848
14
src/App.vue
14
src/App.vue
|
@ -81,7 +81,6 @@
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
<browserTip ref="browserTip" />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -92,7 +91,6 @@ import {
|
||||||
} from "@/api/dictionary/dictionary";
|
} from "@/api/dictionary/dictionary";
|
||||||
import Vue from "vue";
|
import Vue from "vue";
|
||||||
import i18n from "./lang";
|
import i18n from "./lang";
|
||||||
import browserTip from "@/views/dictionary/template/browser/tip.vue";
|
|
||||||
export default {
|
export default {
|
||||||
name: "App",
|
name: "App",
|
||||||
data() {
|
data() {
|
||||||
|
@ -104,21 +102,9 @@ export default {
|
||||||
arr: [],
|
arr: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
components: { browserTip },
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.show = process.env.VUE_APP_OSS_PATH === "/test/dist";
|
this.show = process.env.VUE_APP_OSS_PATH === "/test/dist";
|
||||||
},
|
},
|
||||||
watch: {
|
|
||||||
"$route.path": {
|
|
||||||
handler() {
|
|
||||||
if (this.$route.path === "/login") {
|
|
||||||
// this.$refs.browserTip.open();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
immediate: true,
|
|
||||||
deep: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
changeValue(target, attr, e) {
|
changeValue(target, attr, e) {
|
||||||
this.$set(target, attr, e);
|
this.$set(target, attr, e);
|
||||||
|
|
|
@ -15,6 +15,12 @@
|
||||||
>
|
>
|
||||||
<el-input v-model="form.Title" />
|
<el-input v-model="form.Title" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
:label="$t('dictionary:browser:form:exploreType')"
|
||||||
|
prop="ExploreType"
|
||||||
|
>
|
||||||
|
<el-input v-model="form.ExploreType" />
|
||||||
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:label="$t('dictionary:browser:form:version')"
|
:label="$t('dictionary:browser:form:version')"
|
||||||
prop="Version"
|
prop="Version"
|
||||||
|
@ -95,6 +101,7 @@ export default {
|
||||||
Version: null,
|
Version: null,
|
||||||
Title: null,
|
Title: null,
|
||||||
IsDeleted: true,
|
IsDeleted: true,
|
||||||
|
ExploreType: null,
|
||||||
DownloadUrl: null,
|
DownloadUrl: null,
|
||||||
Path: null,
|
Path: null,
|
||||||
FileName: null,
|
FileName: null,
|
||||||
|
@ -107,6 +114,13 @@ export default {
|
||||||
trigger: ["blur", "change"],
|
trigger: ["blur", "change"],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
ExploreType: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t("common:ruleMessage:specify"),
|
||||||
|
trigger: ["blur", "change"],
|
||||||
|
},
|
||||||
|
],
|
||||||
Version: [
|
Version: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
|
@ -114,6 +128,13 @@ export default {
|
||||||
trigger: ["blur", "change"],
|
trigger: ["blur", "change"],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
DownloadUrl: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t("common:ruleMessage:specify"),
|
||||||
|
trigger: ["blur", "change"],
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
fileList: [],
|
fileList: [],
|
||||||
loading: false,
|
loading: false,
|
||||||
|
|
|
@ -43,6 +43,12 @@
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
/>
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="ExploreType"
|
||||||
|
:label="$t('dictionary:browser:table:exploreType')"
|
||||||
|
show-overflow-tooltip
|
||||||
|
sortable="custom"
|
||||||
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="Version"
|
prop="Version"
|
||||||
:label="$t('dictionary:browser:table:version')"
|
:label="$t('dictionary:browser:table:version')"
|
||||||
|
|
|
@ -1,56 +1,18 @@
|
||||||
<template>
|
<template>
|
||||||
<base-model :config="config">
|
<div class="browserTip" v-if="visible">
|
||||||
<div slot="dialog-body">
|
<i class="el-icon-warning-outline"></i>
|
||||||
<el-form ref="form" :model="form" label-width="100px" size="small">
|
<span v-html="tip"></span>
|
||||||
<el-form-item
|
</div>
|
||||||
:label="$t('dictionary:browser:tip:form:title')"
|
|
||||||
prop="Title"
|
|
||||||
>
|
|
||||||
<span>{{ form.Title }}</span>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item
|
|
||||||
:label="$t('dictionary:browser:tip:form:version')"
|
|
||||||
prop="Version"
|
|
||||||
>
|
|
||||||
<span>{{ form.Version }}</span>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item
|
|
||||||
:label="$t('dictionary:browser:tip:form:downloadUrl')"
|
|
||||||
prop="DownloadUrl"
|
|
||||||
>
|
|
||||||
<a :href="form.DownloadUrl" target="_blank" style="color: #428bca">{{
|
|
||||||
form.DownloadUrl
|
|
||||||
}}</a>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item prop="FileName">
|
|
||||||
<a
|
|
||||||
:href="OSSclientConfig.basePath + form.Path"
|
|
||||||
target="_blank"
|
|
||||||
style="color: #428bca"
|
|
||||||
>
|
|
||||||
{{ form.FileName }}
|
|
||||||
</a>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
</base-model>
|
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getExploreRecommentInfo } from "@/api/dictionary";
|
import { getExploreRecommentInfo } from "@/api/dictionary";
|
||||||
import baseModel from "@/components/BaseModel";
|
|
||||||
export default {
|
export default {
|
||||||
name: "browserTip",
|
name: "browserTip",
|
||||||
components: { baseModel },
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
config: {
|
|
||||||
visible: false,
|
|
||||||
showClose: true,
|
|
||||||
width: "600px",
|
|
||||||
title: this.$t("dictionary:browser:tip:title"),
|
|
||||||
appendToBody: true,
|
|
||||||
},
|
|
||||||
form: {},
|
form: {},
|
||||||
|
tip: this.$t("browser:tip:changeBorwser"),
|
||||||
|
visible: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -68,16 +30,80 @@ export default {
|
||||||
},
|
},
|
||||||
async open() {
|
async open() {
|
||||||
try {
|
try {
|
||||||
|
let browserType = this.getExplore();
|
||||||
|
let type = browserType.split(": ")[0];
|
||||||
|
let No = browserType.split(": ")[1].split(".")[0];
|
||||||
|
console.log(type, No);
|
||||||
|
if (type !== "Chrome" && type !== "Edge") {
|
||||||
|
this.tip = this.$t("browser:tip:changeBorwser");
|
||||||
|
return (this.visible = true);
|
||||||
|
}
|
||||||
let res = await this.getInfo();
|
let res = await this.getInfo();
|
||||||
if (!res) return this.$t("dictionary:browser:tip:getError");
|
if (!res) return this.$t("dictionary:browser:tip:getError");
|
||||||
this.form = res;
|
let currentType = res.filter(
|
||||||
this.config.visible = true;
|
(item) => item.ExploreType.toLowerCase() === type.toLowerCase()
|
||||||
|
)[0];
|
||||||
|
if (No < currentType.Version) {
|
||||||
|
this.tip = `<span>${this.$t("browser:tip:borwserversionLow")}</span>`;
|
||||||
|
res.forEach((item, index) => {
|
||||||
|
this.tip += `<a href="${item.DownloadUrl}" target="_blank" style="color:#428bca">${item.Title}</a>`;
|
||||||
|
if (index < res.length - 1) {
|
||||||
|
this.tip += "、";
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return (this.visible = true);
|
||||||
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
getExplore() {
|
||||||
|
var Sys = {};
|
||||||
|
var ua = navigator.userAgent.toLowerCase();
|
||||||
|
var s;
|
||||||
|
(s = ua.match(/rv:([\d.]+)\) like gecko/))
|
||||||
|
? (Sys.ie = s[1])
|
||||||
|
: (s = ua.match(/msie ([\d\.]+)/))
|
||||||
|
? (Sys.ie = s[1])
|
||||||
|
: (s = ua.match(/edg\/([\d\.]+)/))
|
||||||
|
? (Sys.edge = s[1])
|
||||||
|
: (s = ua.match(/firefox\/([\d\.]+)/))
|
||||||
|
? (Sys.firefox = s[1])
|
||||||
|
: (s = ua.match(/(?:opera|opr).([\d\.]+)/))
|
||||||
|
? (Sys.opera = s[1])
|
||||||
|
: (s = ua.match(/chrome\/([\d\.]+)/))
|
||||||
|
? (Sys.chrome = s[1])
|
||||||
|
: (s = ua.match(/version\/([\d\.]+).*safari/))
|
||||||
|
? (Sys.safari = s[1])
|
||||||
|
: 0;
|
||||||
|
// 根据关系进行判断
|
||||||
|
if (Sys.ie) return "IE: " + Sys.ie;
|
||||||
|
if (Sys.edge) return "Edge: " + Sys.edge;
|
||||||
|
if (Sys.firefox) return "Firefox: " + Sys.firefox;
|
||||||
|
if (Sys.chrome) return "Chrome: " + Sys.chrome;
|
||||||
|
if (Sys.opera) return "Opera: " + Sys.opera;
|
||||||
|
if (Sys.safari) return "Safari: " + Sys.safari;
|
||||||
|
return "Unkonwn";
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.browserTip {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 40px;
|
||||||
|
background-color: rgba(250, 205, 145, 0.129411764705882);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 0 20px;
|
||||||
|
color: #555;
|
||||||
|
i {
|
||||||
|
color: red;
|
||||||
|
font-size: 24px;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
|
@ -185,6 +185,7 @@
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<browserTip ref="browserTip" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -193,10 +194,11 @@ import { mapGetters, mapMutations } from "vuex";
|
||||||
import TopLang from "./topLang";
|
import TopLang from "./topLang";
|
||||||
// import NoticeMarquee from '../trials/trials-layout/components/noticeMarquee'
|
// import NoticeMarquee from '../trials/trials-layout/components/noticeMarquee'
|
||||||
import Vcode from "vue-puzzle-vcode";
|
import Vcode from "vue-puzzle-vcode";
|
||||||
|
import browserTip from "@/views/dictionary/template/browser/tip.vue";
|
||||||
import Img1 from "@/assets/pic-2.png";
|
import Img1 from "@/assets/pic-2.png";
|
||||||
export default {
|
export default {
|
||||||
name: "Login",
|
name: "Login",
|
||||||
components: { TopLang, Vcode },
|
components: { TopLang, Vcode, browserTip },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
NODE_ENV: process.env.NODE_ENV,
|
NODE_ENV: process.env.NODE_ENV,
|
||||||
|
@ -262,6 +264,7 @@ export default {
|
||||||
// this.$updateDictionary()
|
// this.$updateDictionary()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.$refs.browserTip.open();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapMutations({ setLanguage: "lang/setLanguage" }),
|
...mapMutations({ setLanguage: "lang/setLanguage" }),
|
||||||
|
|
Loading…
Reference in New Issue