diff --git a/package.json b/package.json
index 184fbe2..be15904 100644
--- a/package.json
+++ b/package.json
@@ -32,9 +32,11 @@
"lodash": "^4.17.21",
"nprogress": "0.2.0",
"pinia": "2.0.14",
+ "pinia-plugin-persistedstate": "^3.1.0",
"qrcode.vue": "^3.3.3",
"vue": "3.2.37",
"vue-cropper": "1.0.3",
+ "vue-i18n": "9",
"vue-router": "4.0.14"
},
"devDependencies": {
@@ -43,7 +45,7 @@
"prettier": "^2.8.8",
"sass": "1.52.1",
"unplugin-auto-import": "0.8.5",
- "vite": "2.9.14",
+ "vite": "2.9.16",
"vite-plugin-compression": "0.5.1",
"vite-plugin-svg-icons": "2.0.1",
"vite-plugin-vue-setup-extend": "0.4.0"
diff --git a/src/App.vue b/src/App.vue
index bf23c9f..9e5a4df 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -1,10 +1,37 @@
-
+
+
+
@@ -244,6 +274,7 @@ getCookie();
display: flex;
flex-direction: column;
background: #b1ccff;
+
.content {
// padding: 0 250px;
// padding: 0 30px;
@@ -260,6 +291,7 @@ getCookie();
height: 458px;
}
}
+
.foot {
text-align: center;
padding: 20px;
@@ -270,6 +302,7 @@ getCookie();
color: #666666;
}
}
+
.title {
margin: 0px auto 30px auto;
text-align: center;
@@ -283,6 +316,7 @@ getCookie();
background: #ffffff;
box-sizing: border-box;
padding: 30px 33px;
+
.tit {
padding: 30px 0;
text-align: center;
@@ -291,26 +325,33 @@ getCookie();
font-weight: bold;
color: #333333;
}
+
.el-tab-pane {
padding-top: 10px;
}
+
.el-input {
height: 38px;
+
input {
height: 38px;
}
}
+
.input-icon {
height: 39px;
width: 14px;
margin-left: 2px;
}
+
:deep(.el-tabs__active-bar) {
background-color: #0054ff;
}
+
:deep(.el-tabs__item) {
color: #666666;
font-size: 16px;
+
&.is-active {
font-weight: 500;
color: #0054ff;
@@ -318,6 +359,7 @@ getCookie();
}
}
}
+
.login-tip {
font-size: 13px;
text-align: center;
@@ -330,15 +372,18 @@ getCookie();
justify-content: space-between;
align-items: center;
}
+
.login-code {
width: 30%;
height: 38px;
float: right;
+
img {
cursor: pointer;
vertical-align: middle;
}
}
+
.el-login-footer {
height: 40px;
line-height: 40px;
@@ -351,11 +396,14 @@ getCookie();
font-size: 12px;
letter-spacing: 1px;
}
+
.login-code-img {
height: 36px;
}
+
.text_col {
color: #999999;
+
img {
width: 30px;
margin: 10px 0 0 10px;
diff --git a/src/views/website/register/index.vue b/src/views/website/register/index.vue
index 46ceca5..8737df6 100644
--- a/src/views/website/register/index.vue
+++ b/src/views/website/register/index.vue
@@ -5,18 +5,18 @@
:rules="registerRules"
class="register-form"
>
-
注册
+ {{ t("register.register") }}
-
+
+
+
@@ -24,12 +24,12 @@
v-model="registerForm.password"
type="password"
auto-complete="off"
- placeholder="密码"
+ :placeholder="t('input.password')"
@keyup.enter="handleRegister"
>
-
+
+
+
@@ -37,25 +37,25 @@
v-model="registerForm.repeat_pass"
type="password"
auto-complete="off"
- placeholder="确认密码"
+ :placeholder="t('input.confirmPassword')"
@keyup.enter="handleRegister"
>
-
+
+
+
-
+
+
+
- 勾选即同意《协议》
+ {{ t("register.agree") }}《{{ t("register.registerAgreement") }}》
@@ -79,15 +81,17 @@
style="width: 100%"
@click.prevent="handleRegister"
>
- 注 册
- 注 册 中...
+ {{ t("register.register") }}
+
+ {{ t("register.registering") }}
+
登录{{ t("common.login") }}
@@ -99,11 +103,12 @@ import { ElMessageBox } from "element-plus";
import { register, getCodeImg } from "@/api/login";
// import webGetCode from "@/components/webGetCode";
import md5 from "js-md5";
+import { useI18n } from "vue-i18n";
const props = defineProps({
isLogin: Number,
});
-
+const { t } = useI18n();
const emit = defineEmits();
function handleLogin() {
@@ -126,14 +131,14 @@ const registerForm = ref({
const equalToPassword = (rule, value, callback) => {
if (registerForm.value.password !== value) {
- callback(new Error("两次输入的密码不一致"));
+ callback(new Error(t("input.passwordInconsistent")));
} else {
callback();
}
};
const isCheck = (rule, value, callback) => {
if (!value) {
- callback(new Error("请阅读并勾选"));
+ callback(new Error(t("register.readAndCheck")));
} else {
callback();
}
@@ -147,27 +152,33 @@ const getCaptchImage = async () => {
getCaptchImage();
const registerRules = {
username: [
- { required: true, message: "手机号不能为空", trigger: "blur" },
+ { required: true, message: t("input.inputPhone"), trigger: "blur" },
{
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
- message: "请输入正确的手机号码",
+ message: t("input.phoneFormatError"),
trigger: "blur",
},
],
password: [
- { required: true, trigger: "blur", message: "请输入您的密码" },
+ { required: true, trigger: "blur", message: t("input.inputPassword") },
{
min: 5,
max: 20,
- message: "用户密码长度必须介于 5 和 20 之间",
+ message: t("input.passwordLengthError"),
trigger: "blur",
},
],
repeat_pass: [
- { required: true, trigger: "blur", message: "请再次输入您的密码" },
+ { required: true, trigger: "blur", message: t("input.inputPasswordAgain") },
{ required: true, validator: equalToPassword, trigger: "blur" },
],
- code: [{ required: true, trigger: "change", message: "请输入验证码" }],
+ code: [
+ {
+ required: true,
+ trigger: "change",
+ message: t("input.inputVerificationCode"),
+ },
+ ],
isCheck: [{ required: true, validator: isCheck, trigger: "change" }],
};
@@ -185,10 +196,13 @@ function handleRegister() {
.then((res) => {
const username = formData.username;
ElMessageBox.alert(
- "恭喜你,您的账号 " +
+ "" +
+ t("register.registerSuccessDescription") +
username +
- " 注册成功!",
- "系统提示",
+ t("register.registerSuccess") +
+ " ",
+
+ t("common.systemPrompt"),
{
dangerouslyUseHTMLString: true,
type: "success",
@@ -221,21 +235,25 @@ function handleRegister() {
.register-form {
.el-input {
height: 38px;
+
input {
height: 38px;
}
}
+
.input-icon {
height: 39px;
width: 14px;
margin-left: 2px;
}
}
+
.register-tip {
font-size: 13px;
text-align: center;
color: #bfbfbf;
}
+
.el-register-footer {
height: 40px;
line-height: 40px;
@@ -248,6 +266,7 @@ function handleRegister() {
font-size: 12px;
letter-spacing: 1px;
}
+
:deep(.captcha-input .el-form-item__content) {
display: flex;
justify-content: space-between;
diff --git a/src/views/website/retrieve/index.vue b/src/views/website/retrieve/index.vue
index 8711132..8017c18 100644
--- a/src/views/website/retrieve/index.vue
+++ b/src/views/website/retrieve/index.vue
@@ -16,30 +16,35 @@
>
- 找回密码
+
+ {{ t("retrieve.retrievePassword") }}
+
-
+
+
+
-
+
+
+
@@ -68,18 +73,18 @@
- 找回密码
+ {{ t("retrieve.retrievePassword") }}
-
+
+
+
@@ -87,11 +92,11 @@
v-model="retrieveForm.repeat_pass"
type="password"
auto-complete="off"
- placeholder="确认密码"
+ :placeholder="t('input.confirmPassword')"
>
-
+
+
+
@@ -102,7 +107,9 @@
style="width: 100%"
@click.prevent="handleRetrieve"
>
- 完 成
+
+ {{ t("common.complete") }}
+
@@ -113,6 +120,7 @@
import { ElMessageBox } from "element-plus";
import { getCodeImg, resetPassword } from "@/api/login";
import WebGetCode from "@/components/webGetCode";
+import { useI18n } from "vue-i18n";
const props = defineProps({
isLogin: Number,
@@ -124,6 +132,7 @@ function handleLogin() {
emit("update:isLogin", 1);
}
+const { t } = useI18n();
const router = useRouter();
const { proxy } = getCurrentInstance();
@@ -137,7 +146,7 @@ const retrieveForm = ref({
const equalToPassword = (rule, value, callback) => {
if (retrieveForm.value.password !== value) {
- callback(new Error("两次输入的密码不一致"));
+ callback(new Error(t("input.passwordInconsistent")));
} else {
callback();
}
@@ -145,27 +154,33 @@ const equalToPassword = (rule, value, callback) => {
const mobileRules = {
mobile: [
- { required: true, message: "手机号不能为空", trigger: "blur" },
+ { required: true, message: t("input.inputPhone"), trigger: "blur" },
{
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
- message: "请输入正确的手机号码",
+ message: t("input.phoneFormatError"),
trigger: "blur",
},
],
- captcha: [{ required: true, trigger: "change", message: "请输入验证码" }],
+ captcha: [
+ {
+ required: true,
+ trigger: "change",
+ message: t("input.inputVerificationCode"),
+ },
+ ],
};
const passRules = {
password: [
- { required: true, trigger: "blur", message: "请输入您的密码" },
+ { required: true, trigger: "blur", message: t("input.inputPassword") },
{
min: 5,
max: 20,
- message: "用户密码长度必须介于 5 和 20 之间",
+ message: t("input.passwordLengthError"),
trigger: "blur",
},
],
repeat_pass: [
- { required: true, trigger: "blur", message: "请再次输入您的新密码" },
+ { required: true, trigger: "blur", message: t("input.inputPasswordAgain") },
{ required: true, validator: equalToPassword, trigger: "blur" },
],
};
@@ -195,10 +210,12 @@ function handleRetrieve() {
.then((res) => {
const mobile = formData.mobile;
ElMessageBox.alert(
- "恭喜你,您的账号 " +
+ "" +
+ t("common.congratulations") +
mobile +
- " 修改密码成功!",
- "系统提示",
+ t("retrieve.changePasswordSuccess") +
+ " !",
+ t("common.systemPrompt"),
{
dangerouslyUseHTMLString: true,
type: "success",
@@ -224,9 +241,11 @@ function handleRetrieve() {
color: #333333;
font-size: 20px;
font-weight: bold;
+
.el-icon {
text-align: left;
}
+
span {
flex: 1;
text-align: center;
@@ -236,21 +255,25 @@ function handleRetrieve() {
.retrieve-form {
.el-input {
height: 38px;
+
input {
height: 38px;
}
}
+
.input-icon {
height: 39px;
width: 14px;
margin-left: 2px;
}
}
+
.register-tip {
font-size: 13px;
text-align: center;
color: #bfbfbf;
}
+
.el-register-footer {
height: 40px;
line-height: 40px;
diff --git a/src/views/website/searchList/achievement.vue b/src/views/website/searchList/achievement.vue
index 93f88d9..283c199 100644
--- a/src/views/website/searchList/achievement.vue
+++ b/src/views/website/searchList/achievement.vue
@@ -2,7 +2,7 @@
@@ -11,8 +11,9 @@
- 共找到
- {{ total }} 个成果
+ {{ t("webSearch.findNum") }}
+ {{ total }}
+ {{ t("webSearch.findAchievementNum") }}
@@ -49,7 +50,9 @@ import searchContainer from "./components/searchContainer.vue";
// import industrySelect from "./components/industrySelect.vue";
import achievementItem from "./components/achievementItem";
import { useRoute } from "vue-router";
+import { useI18n } from "vue-i18n";
+const { t } = useI18n();
const loading = ref(true);
const searchResults = ref([]);
const total = ref(0);
@@ -90,6 +93,7 @@ const getDataList = async () => {
font-weight: 500;
color: #333333;
margin-bottom: 20px;
+
span {
font-size: 30px;
color: #0054ff;
@@ -116,21 +120,25 @@ const getDataList = async () => {
display: flex;
align-items: center;
justify-content: center;
+
img {
width: 90px;
height: 90px;
border-radius: 50%;
}
}
+
.content {
display: inline-block;
width: 390px;
+
.line {
font-size: 16px;
font-family: Source Han Sans CN;
font-weight: 400;
color: #666666;
margin: 10px 0;
+
span {
font-size: 16px;
font-family: Source Han Sans CN;
@@ -139,15 +147,18 @@ const getDataList = async () => {
}
}
}
+
.keywords {
flex: 1;
width: 129px;
height: 129px;
}
+
.tit {
width: 100%;
overflow: hidden;
cursor: pointer;
+
.text {
margin-right: 200px;
overflow: hidden;
diff --git a/src/views/website/searchList/achievementDetail.vue b/src/views/website/searchList/achievementDetail.vue
index 3c61cb5..2e4f4cf 100644
--- a/src/views/website/searchList/achievementDetail.vue
+++ b/src/views/website/searchList/achievementDetail.vue
@@ -9,10 +9,16 @@
- 找成果
+
+
+ {{ t("webSearch.findAchievement") }}
+
- 成果详情
+
+
+ {{ t("webSearch.achievementDetails") }}
+
@@ -24,7 +30,9 @@
-
预约对接
+
+ {{ t("webSearch.appointment") }}
+
一键分享
@@ -108,6 +116,8 @@ import { reactive, ref } from "vue";
import docking from "./components/docking.vue";
import { getCity } from "@/utils/city";
import { leadOptions, cooperationOptions } from "@/utils/parameter";
+import { useI18n } from "vue-i18n";
+const { t } = useI18n();
const showDocking = ref(false);
const loading = ref(true);
// import {lead}
@@ -220,6 +230,7 @@ function getDataList() {
color: #666666;
font-size: 14px;
}
+
.el-tabs__item:hover {
opacity: 0.8;
}
@@ -230,6 +241,7 @@ function getDataList() {
font-weight: bold;
color: #333333;
}
+
.el-tabs__active-bar {
background-color: #333333;
height: 4px;
@@ -239,18 +251,22 @@ function getDataList() {
background-color: transparent;
}
}
+
.head {
padding: 15px 0px;
+
span {
font-size: 16px;
font-family: Source Han Sans CN;
font-weight: 400;
color: #666666;
}
+
.one {
color: #333333;
}
}
+
.r {
display: inline-block;
width: 325px;
@@ -263,6 +279,7 @@ function getDataList() {
box-sizing: border-box;
padding: 20px;
background: #fff;
+
.describe {
font-size: 14px;
font-family: Source Han Sans CN;
@@ -279,6 +296,7 @@ function getDataList() {
font-family: Source Han Sans CN;
font-weight: 500;
color: #333333;
+
&:before {
content: "";
top: 8px;
@@ -297,6 +315,7 @@ function getDataList() {
width: 100%;
background-color: #fff;
margin-top: -20px;
+
div {
margin-top: 20px;
text-align: center;
@@ -310,16 +329,19 @@ function getDataList() {
font-weight: 400;
line-height: 36px;
box-sizing: border-box;
+
&:hover {
opacity: 0.7;
}
}
+
.share {
color: #333333;
background: #f2f6ff;
border: 1px solid #dcdcdc;
margin-right: 10px;
}
+
.order {
background: #0054ff;
color: #ffffff;
@@ -332,6 +354,7 @@ function getDataList() {
padding: 20px;
background-color: #fff;
margin-bottom: 10px;
+
.tit {
margin-left: -8px;
font-size: 16px;
@@ -339,6 +362,7 @@ function getDataList() {
font-weight: bold;
color: #333333;
}
+
.line {
margin: 10px 0;
font-size: 14px;
@@ -352,12 +376,14 @@ function getDataList() {
padding: 20px;
background-color: #fff;
margin-bottom: 10px;
+
.tit {
font-size: 16px;
font-family: Source Han Sans CN;
font-weight: bold;
color: #333333;
}
+
.line {
padding-left: 8px;
margin: 10px 0;
diff --git a/src/views/website/searchList/components/achievementItem.vue b/src/views/website/searchList/components/achievementItem.vue
index cae586e..80ce7ec 100644
--- a/src/views/website/searchList/components/achievementItem.vue
+++ b/src/views/website/searchList/components/achievementItem.vue
@@ -15,7 +15,7 @@
- 所属领域:
+ {{ t("webSearch.industry") }}:
{{ data.industryStr }}
@@ -65,7 +65,8 @@ import wordcloud from "./wordcloud.vue";
import { useRoute, useRouter } from "vue-router";
import { toRefs } from "vue";
import { addViewHistory } from "@/utils/view_history";
-
+import { useI18n } from "vue-i18n";
+const { t } = useI18n();
const route = useRoute();
const router = useRouter();
diff --git a/src/views/website/searchList/components/collectAndVisit.vue b/src/views/website/searchList/components/collectAndVisit.vue
index f3583dd..2f6bd21 100644
--- a/src/views/website/searchList/components/collectAndVisit.vue
+++ b/src/views/website/searchList/components/collectAndVisit.vue
@@ -15,6 +15,8 @@