bugfix and performance improvements

This commit is contained in:
quantulr
2023-08-11 17:29:39 +08:00
parent 45ed576dfa
commit b0206985cc
28 changed files with 378 additions and 105 deletions

View File

@ -22,7 +22,18 @@
</el-icon>
</el-upload>
<!-- 上传提示 -->
<div v-if="showTip" class="el-upload__tip">
<div v-if="showTip && locale === 'ru'" class="el-upload__tip">
Пожалуйста, загрузите файл
<template v-if="fileSize">
размером не более <b style="color: #f56c6c">{{ fileSize }}МБ</b>
</template>
<template v-if="fileType">
в формате <b style="color: #f56c6c">{{ fileType.join("/") }}</b>
</template>
<!-- 的文件-->
</div>
<div v-else-if="showTip" class="el-upload__tip">
请上传
<template v-if="fileSize">
大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b>
@ -36,7 +47,7 @@
<el-dialog
v-model="dialogVisible"
append-to-body
title="预览"
:title="t('common.preview')"
width="800px"
>
<img
@ -49,7 +60,9 @@
<script setup>
import { getToken } from "@/utils/auth";
import { useI18n } from "vue-i18n";
const { locale, t } = useI18n();
const props = defineProps({
modelValue: [String, Object, Array],
// 图片数量限制

View File

@ -29,9 +29,13 @@
:class="
pagePath == `/solution/${item.id}` ? 'x_blue _active' : ''
"
@click="handlePath(`/solution/${item.id}?name=${item.name}`)"
@click="
handlePath(
`/solution/${item.id}?name=${item[solutionNameField]}`
)
"
>
{{ item.name }}
{{ item[solutionNameField] }}
</div>
<!--
@ -181,7 +185,7 @@
</template>
<script setup>
import { reactive, watch } from "vue";
import { computed, reactive, watch } from "vue";
import { useRoute, useRouter } from "vue-router";
import useUserStore from "@/store/modules/user";
@ -199,8 +203,11 @@ const router = useRouter();
const baseUrl = ref(import.meta.env.VITE_APP_BASE_API);
const categoryList = ref([]);
// 当前的语言
const currentLocale = ref("zh");
const { locale, t } = useI18n();
const solutionNameField = computed(() => {
return locale.value === "zh" ? "name" : `${locale.value}Name`;
});
const settingsStore = useSettingsStore();
const loadCategoryList = async () => {
const { data } = await getCategory();
@ -239,6 +246,12 @@ function handlePage() {
window.open(routeData.href, "_blank");
}
const showBoxHandlePath = (path) => {
if (path === "") {
}
handlePath(path);
};
function handlePath(path) {
pagePath.value = path;
router.push(path);
@ -301,10 +314,11 @@ dt {
.show_box {
display: none;
position: absolute;
top: 80px;
padding-top: 5px;
top: 75px;
width: 100%;
text-align: center;
background-color: red;
background-color: transparent;
div {
// height: 42px;

View File

@ -3,9 +3,9 @@
<div class="wrap">
<el-row type="flex" justify="center" :gutter="50">
<el-col :span="8" v-for="item in state.list" :key="item.id">
<div class="tit">{{ item.title }}</div>
<div class="tit">{{ item[titleField] }}</div>
<p v-for="subItem in item.children" :key="subItem.id">
<a :href="`${subItem.link}`" target="_black">{{ subItem.title }}</a>
<a :href="`${subItem.link}`" target="_black">{{ subItem[titleField] }}</a>
</p>
</el-col>
<!-- <el-col :span="4">
@ -37,8 +37,8 @@
</el-row>
<div class="icp-beian">
<el-link type="primary" href="https://beian.miit.gov.cn/"
>皖ICP备18001784号</el-link
>
>{{ t('footer.recordNumber')}}
</el-link>
</div>
</div>
</div>
@ -46,27 +46,40 @@
<script setup>
import request from "@/utils/request";
import { onMounted, reactive, watch } from "vue";
import { computed, onMounted, reactive, watch } from "vue";
import { getCategory } from "@/api/website/solution";
import { getCasNavigation } from "@/api/website/home";
import { useI18n } from "vue-i18n";
const { t, locale } = useI18n();
const titleField = computed(() => {
if (locale.value === "zh") {
return "title";
} else {
return `${locale.value}Title`;
}
});
function navigation() {
return request({
url: "/v1/sys/navigation",
});
}
function config(params) {
return request({
url: "/v1/config",
params,
});
}
const state = reactive({
list: [],
mobile: "",
email: "",
address: "",
});
async function getNavigation() {
// navigation().then((res) => {
// if (200 == res.code) {
@ -241,6 +254,7 @@ async function getNavigation() {
// };
state.list = resp.data;
}
async function getConfig() {
// const mobileData = await config({ key: "mobile" });
const mobileData = {
@ -276,6 +290,7 @@ async function getConfig() {
// state.address = res.data.address.value;
// });
}
getNavigation();
// getConfig();
@ -300,16 +315,19 @@ loadsolutionCategoryList();
font-family: Source Han Sans CN;
font-weight: 500;
color: #333333;
.tit {
font-size: 16px;
font-family: Source Han Sans CN;
font-weight: 500;
color: #333333;
}
.qrcode {
width: 88px;
height: 88px;
}
.icp-beian {
text-align: center;
}

View File

@ -42,6 +42,8 @@ const messages = {
},
footer: {
copyRight: "中科云 版权所有",
// 皖ICP备18001784号
recordNumber: "皖公网安备 34011102000001号",
},
webSearch: webSearch_zh,
webContact: webContact_zh,
@ -164,6 +166,8 @@ const messages = {
},
footer: {
copyRight: "Чжункейун Авторское право",
// 皖ICP备18001784号
recordNumber: "Государственная сеть безопасности Аньхой 34011102000001",
},
webSearch: webSearch_ru,
webContact: webContact_ru,

View File

@ -26,6 +26,7 @@ const form = {
edit: "Изменить {type}",
editData: "Изменить данные",
email: "Эл. адрес",
otherContact: "Другие контактные данные",
expertName: "Имя эксперта",
fullName: "Полное имя",
idCard: "Удостоверение личности",

View File

@ -26,6 +26,7 @@ const form = {
edit: "修改{type}",
editData: "修改数据",
email: "邮箱",
otherContact: "其他联系方式",
expertName: "专家姓名",
fullName: "姓名",
idCard: "身份证",

View File

@ -36,5 +36,7 @@ const common = {
"Вы уверены, что хотите выйти из системы?",
// 提示
prompt: "Подсказка",
// 预览
preview: "Предварительный просмотр",
};
export default common;

View File

@ -34,6 +34,8 @@ export const common = {
areYouSureYouWantToLogOutAndExitTheSystem: "确定注销并退出系统吗?",
// 提示
prompt: "提示",
// 预览
preview: "预览",
};
export default common;

View File

@ -1259,17 +1259,17 @@ export const agentRoutes = [
i18nStr: "routes.broker.updateStatus",
},
},
{
path: "matching-demand",
component: () =>
import("@/views/admin/agent/service/matching-demand/index.vue"),
name: "EnterpriseDemandMatch",
meta: {
title: "企业需求匹配",
icon: "list",
i18nStr: "routes.broker.enterpriseDemandMatching",
},
},
// {
// path: "matching-demand",
// component: () =>
// import("@/views/admin/agent/service/matching-demand/index.vue"),
// name: "EnterpriseDemandMatch",
// meta: {
// title: "企业需求匹配",
// icon: "list",
// i18nStr: "routes.broker.enterpriseDemandMatching",
// },
// },
{
path: "matching-demand-detail",
component: () =>

View File

@ -380,7 +380,7 @@ export const countryOptions = [
ru: "Таджикистан",
},
{
key: "kg",
key: "tm",
zh: "土库曼斯坦",
ru: "Туркменистан",
},
@ -394,4 +394,9 @@ export const countryOptions = [
zh: "哈萨克斯坦",
ru: "Казахстан",
},
{
key: "kg",
zh: "吉尔吉斯斯坦",
ru: "Кыргызстан",
}
];

View File

@ -222,13 +222,13 @@ getList();
})
}}
</el-button>
<el-button link type="text">
{{
t("admin.table.managementOf", {
type: t("admin.common.achievement"),
})
}}
</el-button>
<!-- <el-button link type="text">-->
<!-- {{-->
<!-- t("admin.table.managementOf", {-->
<!-- type: t("admin.common.achievement"),-->
<!-- })-->
<!-- }}-->
<!-- </el-button>-->
<el-button link type="text" @click="handleDelete(row.id)">
{{ t("admin.common.delete") }}
</el-button>

View File

@ -190,6 +190,13 @@
>
<el-input v-model="form.bankPhone" placeholder="请输入开户行电话" />
</el-form-item> -->
<el-form-item :label="t('webContact.phone')" prop="phone">
<el-input
v-model="form.phone"
:placeholder="t('webContact.phonePlaceholder')"
/>
</el-form-item>
<el-form-item :label="t('admin.form.email')" prop="email">
<el-input
v-model="form.email"
@ -200,11 +207,9 @@
"
/>
</el-form-item>
<el-form-item :label="t('webContact.phone')" prop="phone">
<el-input
v-model="form.phone"
:placeholder="t('webContact.phonePlaceholder')"
/>
<!-- 其他联系方式-->
<el-form-item :label="t('admin.form.otherContact')" prop="otherContact">
<el-input v-model="form.otherContact"></el-input>
</el-form-item>
<el-form-item :label="t('admin.form.address')" prop="address">
<el-input

View File

@ -101,14 +101,14 @@
<!-- @click="checkEnterpriseInfo(row.id)"-->
<!-- >{{ t("tips.browseEnterpriseInformation") }}-->
<!-- </el-button>-->
<el-button
<!-- TODO: <el-button
v-if="queryParams.status == 0"
size="small"
type="text"
icon="Close"
@click="releaseCancel(row.id)"
>{{ t("tips.moveToDraftBox") }}
</el-button>
</el-button>-->
</template>
</el-table-column>
</el-table>

View File

@ -108,6 +108,21 @@
:placeholder="t('admin.form.defaultExpertPhone')"
/>
</el-form-item>
<!-- ADDEMAIL-->
<!-- 邮箱-->
<el-form-item :label="t('admin.form.email')" prop="email">
<el-input
:placeholder="t('input.inputEmail')"
v-model="form.email"
></el-input>
</el-form-item>
<!-- 其他联系方式-->
<el-form-item :label="t('admin.form.otherContact')" prop="otherContact">
<el-input v-model="form.otherContact"></el-input>
</el-form-item>
<el-form-item :label="t('admin.form.location')">
<el-input
v-model="form.address"

View File

@ -198,6 +198,7 @@ import importTip from "@/assets/achievement_import_description.txt?url";
import { saveAs } from "file-saver";
import { useI18n } from "vue-i18n";
import dayjs from "dayjs";
import {UploadFilled} from "@element-plus/icons-vue";
const { t } = useI18n();
const router = useRouter();

View File

@ -25,6 +25,24 @@
</el-col>
</el-row>
<!-- ADDEMAIL-->
<!-- 邮箱-->
<el-row>
<el-col :span="24">
<el-form-item :label="t('admin.form.email')" prop="email">
<el-input :placeholder="t('input.inputEmail')" v-model="modelValue.email"></el-input>
</el-form-item>
</el-col>
</el-row>
<!-- 其他联系方式-->
<el-row>
<el-col :span="24">
<el-form-item :label="t('admin.form.otherContact')" prop="otherContact">
<el-input v-model="modelValue.otherContact"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row v-if="isAdd">
<el-col :span="24">
<el-form-item
@ -69,7 +87,7 @@
<el-row v-if="isAdd">
<el-col :span="24">
<el-form-item :label="t('admin.form.idCard')" required>
<el-form-item :label="t('admin.form.idCard')">
<el-row :gutter="20">
<el-col :span="8">
<el-form-item prop="idImage.0">
@ -203,11 +221,11 @@ const rules = reactive({
// },
],
idCard: [
{
required: true,
message: computed(() => t("admin.form.placeholder")),
trigger: "blur",
},
// {
// required: true,
// message: computed(() => t("admin.form.placeholder")),
// trigger: "blur",
// },
],
wordAddress: [
{
@ -224,25 +242,25 @@ const rules = reactive({
},
],
"idImage.0": [
{
required: true,
message: computed(() => t("admin.validation.pleaseUpload")),
trigger: ["blur", "change"],
},
// {
// required: true,
// message: computed(() => t("admin.validation.pleaseUpload")),
// trigger: ["blur", "change"],
// },
],
"idImage.1": [
{
required: true,
message: computed(() => t("admin.validation.pleaseUpload")),
trigger: ["blur", "change"],
},
// {
// required: true,
// message: computed(() => t("admin.validation.pleaseUpload")),
// trigger: ["blur", "change"],
// },
],
"idImage.2": [
{
required: true,
message: computed(() => t("admin.validation.pleaseUpload")),
trigger: ["blur", "change"],
},
// {
// required: true,
// message: computed(() => t("admin.validation.pleaseUpload")),
// trigger: ["blur", "change"],
// },
],
certificatePics: [
{

View File

@ -45,21 +45,13 @@
<!-- :maxlength="11"-->
<el-input
v-model="modelValue.phone"
oninput="
value = value
.replace(/[^\d.]/g, '')
.replace(/\.{2,}/g, '.')
.replace('.', '$#$')
.replace(/\./g, '')
.replace('$#$', '.')
.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3')
.replace(/^\./g, '')
"
></el-input>
<!-- v-number -->
</el-form-item>
</el-col>
</el-row>
<!-- ADDEMAIL-->
<!-- 邮箱-->
<el-row>
<el-col :span="24">
<el-form-item :label="t('admin.form.email')" prop="email">
@ -67,6 +59,14 @@
</el-form-item>
</el-col>
</el-row>
<!-- 其他联系方式-->
<el-row>
<el-col :span="24">
<el-form-item :label="t('admin.form.otherContact')" prop="otherContact">
<el-input v-model="modelValue.otherContact"></el-input>
</el-form-item>
</el-col>
</el-row>
<!-- <el-row>
<el-col :span="24">
<el-form-item label="信用代码:" prop="code">

View File

@ -30,6 +30,24 @@
</el-col>
</el-row>
<!-- ADDEMAIL-->
<!-- 邮箱-->
<el-row>
<el-col :span="24">
<el-form-item :label="t('admin.form.email')" prop="email">
<el-input v-model="modelValue.email"></el-input>
</el-form-item>
</el-col>
</el-row>
<!-- 其他联系方式-->
<el-row>
<el-col :span="24">
<el-form-item :label="t('admin.form.otherContact')" prop="otherContact">
<el-input v-model="modelValue.otherContact"></el-input>
</el-form-item>
</el-col>
</el-row>
<!-- <el-row>
<el-col :span="12">
<el-form-item :label="t('webSearch.unit')" prop="researchId">

View File

@ -184,6 +184,24 @@
</el-col>
</el-row>
<!-- ADDEMAIL-->
<!-- 邮箱-->
<el-row>
<el-col :span="24">
<el-form-item :label="t('admin.form.email')" prop="email">
<el-input v-model="modelValue.email"></el-input>
</el-form-item>
</el-col>
</el-row>
<!-- 其他联系方式-->
<el-row>
<el-col :span="24">
<el-form-item :label="t('admin.form.otherContact')" prop="otherContact">
<el-input v-model="modelValue.otherContact"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item

View File

@ -55,6 +55,26 @@
</el-form-item>
</el-col>
</el-row>
<!-- ADDEMAIL-->
<!-- 邮箱-->
<el-row>
<el-col :span="24">
<el-form-item :label="t('admin.form.email')" prop="email">
<el-input v-model="modelValue.email"></el-input>
</el-form-item>
</el-col>
</el-row>
<!-- 其他联系方式-->
<!-- TODO: -->
<!-- <el-row>
<el-col :span="24">
<el-form-item :label="t('admin.form.otherContact')" prop="otherContact">
<el-input v-model="modelValue.otherContact"></el-input>
</el-form-item>
</el-col>
</el-row>-->
<field-options
v-model="modelValue"
:labelWidth="labelWidth"

View File

@ -19,14 +19,14 @@
:key="item.id"
@click="handleActive(index)"
>
{{ item.title }}
{{ item[titleField] }}
</div>
</div>
<div class="_r">
<div
v-if="state.data.length"
class="html"
v-html="state.data[kindId]['content']"
v-html="state.data[kindId][contentField]"
></div>
</div>
</div>
@ -39,12 +39,25 @@ import webFooter from "@/components/webFooter/index.vue";
import request from "@/utils/request";
import { banner } from "@/api/website/home/index";
import { getAboutList } from "../../../api/website/aboutUs";
import { useI18n } from "vue-i18n";
import { computed, onMounted, reactive, ref } from "vue";
const { t, locale } = useI18n();
const titleField = computed(() => {
return locale.value === "zh" ? "title" : `${locale.value}Title`;
});
const contentField = computed(() => {
return locale.value === "zh" ? "content" : `${locale.value}Content`;
});
function about() {
return request({
url: "/v1/sys/about",
method: "get",
});
}
const loading = ref(true);
const state = reactive({
data: [],
@ -74,9 +87,11 @@ function getData() {
loading.value = false;
});
}
onMounted(() => {
getData();
});
function handleActive(id) {
kindId.value = id;
}
@ -85,13 +100,16 @@ function handleActive(id) {
<style lang="scss" scoped>
.about {
background-color: #f2f6ff;
.box {
margin-bottom: 30px;
padding-top: 20px;
display: flex;
._l {
width: 230px;
margin-right: 14px;
._item {
text-align: center;
height: 53px;
@ -101,16 +119,19 @@ function handleActive(id) {
background-color: #fff;
}
}
._r {
flex: 1;
background: #fff;
padding: 20px 40px;
h3 {
font-weight: 600;
text-align: center;
font-size: 18px;
color: #333333;
}
p {
font-size: 14px;
color: #333333;

View File

@ -239,6 +239,28 @@
</el-form-item>
</el-col>
</el-row>
<!-- ADDEMAIL-->
<!-- 邮箱-->
<el-row>
<el-col :span="24">
<el-form-item :label="t('admin.form.email')" prop="email">
<el-input
:placeholder="t('input.inputEmail')"
v-model="signUpForm.email"
></el-input>
</el-form-item>
</el-col>
<!-- 其他联系方式-->
<el-col :span="24">
<el-form-item
:label="t('admin.form.otherContact')"
prop="otherContact"
>
<el-input v-model="signUpForm.otherContact"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="12">
<el-col :span="12">
<el-form-item :label="t('input.age')" prop="age">

View File

@ -33,11 +33,15 @@ import request from "@/utils/request";
import { onMounted, reactive } from "vue";
import webFooter from "@/components/webFooter/index.vue";
import { useI18n } from "vue-i18n";
const { locale } = useI18n();
function platform() {
return request({
url: "/v1/sys/platform",
});
}
const { t } = useI18n();
const state = reactive({
platformInfo: {},
@ -49,12 +53,13 @@ function getInfo() {
message: "ok",
data: {
340000: {
name: "安徽省",
name:
locale.value === "zh" ? "安徽省" : /*俄语*/ "Аньхойская провинция",
code: "340000",
domain: "",
children: [
{
name: "合肥市",
name: locale.value === "zh" ? "合肥市" : /*俄语*/ "Хэфэй",
code: "340100",
domain: "https://www.casshare.com",
children: null,
@ -68,6 +73,7 @@ function getInfo() {
state.platformInfo = res.data;
// });
}
getInfo();
</script>
@ -78,6 +84,7 @@ getInfo();
display: flex;
flex-direction: column;
align-items: center;
.wrap {
width: 100%;
height: 100%;
@ -85,6 +92,7 @@ getInfo();
background-size: 100% 50%;
background-repeat: no-repeat;
background-position: center bottom;
& > div {
flex: 1;
height: 100%;
@ -98,6 +106,7 @@ getInfo();
justify-content: space-evenly;
flex-direction: column;
}
.tit {
text-align: center;
font-size: 30px;
@ -105,6 +114,7 @@ getInfo();
font-weight: 400;
color: #333333;
}
.content {
font-size: 16px;
font-family: Source Han Sans CN;
@ -115,6 +125,7 @@ getInfo();
justify-content: center;
align-items: center;
flex-direction: column;
& > div {
overflow: hidden;
flex: 1;
@ -123,9 +134,11 @@ getInfo();
.item {
width: 66px;
float: left;
a {
color: #0054ff;
}
p {
font-size: 14px;
font-family: Source Han Sans CN;
@ -134,6 +147,7 @@ getInfo();
}
}
}
.more {
width: 150px;
height: 46px;
@ -146,6 +160,7 @@ getInfo();
text-align: center;
user-select: none;
cursor: pointer;
&:hover {
opacity: 0.7;
}

View File

@ -14,10 +14,10 @@
</el-breadcrumb>
</div>
<div class="_head">
<p class="text_hidden">{{ state.data.title }}</p>
<p class="text_hidden">{{ state.data[titleField] }}</p>
<div class="_tags">
<el-tag class="x_fff x_bg_blue" size="small"
>{{ state.data.description }}
>{{ state.data[descriptionField] }}
</el-tag>
</div>
<div class="text-right">
@ -28,7 +28,7 @@
</div>
<div class="_info">
<div class="_l">
<div class="html" v-html="state.data.content"></div>
<div class="html" v-html="state.data[contentField]"></div>
</div>
<div class="_r">
<WebContact />
@ -45,6 +45,7 @@ import webFooter from "@/components/webFooter/index.vue";
import WebContact from "@/components/webContact/index.vue";
import { getInovateInfo } from "../../../api/website/innovate";
import { useI18n } from "vue-i18n";
import { computed } from "vue";
// import request from '@/utils/request'
// to do 创新服务详情
// function detail (id) {
@ -54,7 +55,19 @@ import { useI18n } from "vue-i18n";
// data: { id }
// })
// }
const { t } = useI18n();
const { t, locale } = useI18n();
const titleField = computed(() => {
return locale.value === "zh" ? "title" : `${locale.value}Title`;
});
const descriptionField = computed(() => {
return locale.value === "zh" ? "description" : `${locale.value}Description`;
});
// content
const contentField = computed(() => {
return locale.value === "zh" ? "content" : `${locale.value}Content`;
});
const loading = ref(true);
const state = reactive({

View File

@ -7,15 +7,15 @@
:class="item.id == queryParams.kindId ? 'x_fff x_bg_blue' : ''"
v-for="item in state.kind"
:key="item.id"
@click="handleActive(item.id, item.title)"
@click="handleActive(item.id, item[titleField])"
>
{{ item.title }}
{{ item[titleField] }}
</div>
</div>
<div class="_r">
<div style="width: 70%">
<el-input
v-model.trim="queryParams.title"
v-model.trim="queryParams[titleField]"
:placeholder="t('input.inputKeyword')"
>
<template #append>
@ -28,11 +28,11 @@
<div class="_list" v-loading="listLoading">
<div class="item pointer" v-for="item in state.list" :key="item.id">
<div class="_info">
<p class="text_hidden">{{ item.title }}</p>
<p class="text_hidden">{{ item[titleField] }}</p>
<div class="_tags">
<el-tooltip :content="item.description" placement="top">
<el-tooltip :content="item[descriptionField]" placement="top">
<el-tag class="x_fff x_bg_blue"
>{{ item.description }}
>{{ item[descriptionField] }}
</el-tag>
</el-tooltip>
</div>
@ -60,12 +60,19 @@
<script setup name="Innovate">
import webFooter from "@/components/webFooter/index.vue";
import request from "@/utils/request";
import { reactive, ref } from "vue";
import { computed, reactive, ref } from "vue";
import { useRouter } from "vue-router";
import { getKinds, getInovateList } from "../../../api/website/innovate";
import { useI18n } from "vue-i18n";
const { t } = useI18n();
const { t, locale } = useI18n();
const titleField = computed(() => {
return locale.value === "zh" ? "title" : `${locale.value}Title`;
});
const descriptionField = computed(() => {
return locale.value === "zh" ? "description" : `${locale.value}Description`;
});
const router = useRouter();
const loading = ref(true);
const listLoading = ref(true);
@ -152,8 +159,10 @@ function handleQuery() {
._item {
text-align: center;
height: 53px;
line-height: 53px;
//height: 53px;
line-height: 1.5;
padding: 20px 0;
//line-height: 53px;
font-size: 16px;
color: #333;
background-color: #fff;
@ -197,6 +206,9 @@ function handleQuery() {
margin-top: 14px;
margin-right: 14px;
background-color: #fff;
display: flex;
flex-direction: column;
justify-content: space-between;
&:nth-child(-n + 3) {
margin-top: 10px;
@ -205,6 +217,10 @@ function handleQuery() {
._info {
padding: 30px 14px 0;
.text_hidden {
min-height: 48px;
}
p {
margin: 0;
font-size: 16px;

View File

@ -7,10 +7,10 @@
}}</span>
</el-breadcrumb-item>
<el-breadcrumb-item>
<span class="_one">{{ oneLevelTitle.title }}</span>
<span class="_one">{{ oneLevelTitle[titleField] }}</span>
</el-breadcrumb-item>
<el-breadcrumb-item>
<span class="_two">{{ twoLevelTitle }}</span>
<span class="_two">{{ twoLevelTitle ?? t('common.viewMore') }}</span>
</el-breadcrumb-item>
</el-breadcrumb>
<div>
@ -42,9 +42,13 @@
// import request from "@/utils/request";
import { useRouter } from "vue-router";
import { useI18n } from "vue-i18n";
import { computed } from "vue";
const router = useRouter();
const { t } = useI18n();
const { t, locale } = useI18n();
const titleField = computed(() =>
locale.value === "zh" ? "title" : `${locale.value}Title`
);
function handlePath(id) {
let routeData = router.resolve({ path: `/solution/detail/${id}/` });
@ -90,7 +94,7 @@ const props = defineProps({
},
twoLevelTitle: {
type: String,
default: "查看更多",
// default: "查看更多",
},
data: {
type: Array,

View File

@ -15,7 +15,7 @@
</div>
<div class="content">
<div class="title">
<div>{{ state.data.title }}</div>
<div>{{ state.data[titleField] }}</div>
<div class="description">
<span class="visits"
@ -25,7 +25,7 @@
</div>
</div>
<div class="html" v-html="state.data.content"></div>
<div class="html" v-html="state.data[contentField]"></div>
</div>
</div>
<webFooter></webFooter>
@ -33,13 +33,23 @@
</template>
<script setup>
import { nextTick, onMounted } from "vue";
import { computed, nextTick, onMounted } from "vue";
import seeMore from "./components/seeMore.vue";
import { getInfo } from "@/api/website/solution/index";
import webFooter from "@/components/webFooter/index.vue";
import request from "@/utils/request";
import { useI18n } from "vue-i18n";
const { t } = useI18n();
const { t, locale } = useI18n();
const titleField = computed(() =>
locale.value === "zh" ? "title" : `${locale.value}Title`
);
const contentField = computed(() =>
locale.value === "zh" ? "content" : `${locale.value}Content`
);
function detail(id) {
return request({
url: "/v1/service/solution_case/detail",
@ -82,21 +92,26 @@ function getData() {
overflow: hidden;
display: flex;
flex-direction: column;
.conter1400 {
flex: 1;
}
.head {
padding: 30px 0 20px 0;
span {
font-size: 16px;
font-family: Source Han Sans CN;
font-weight: 400;
color: #666666;
}
.one {
color: #333333;
}
}
.content {
background: #fff;
margin-bottom: 40px;
@ -105,18 +120,21 @@ function getData() {
.html {
padding: 30px 40px;
}
.title {
font-size: 18px;
font-family: Source Han Sans CN;
font-weight: 600;
color: #333333;
border-bottom: 1px solid #dcdcdc;
.description {
padding-top: 20px;
font-size: 14px;
font-family: Source Han Sans CN;
font-weight: 400;
color: #666666;
.visits {
display: inline-block;
width: 120px;

View File

@ -24,7 +24,7 @@
:class="activeId == item.id ? '_active' : ''"
@click="setScrollTop(item.id, index)"
>
{{ item.title }}
{{ item[titleField] }}
</li>
</ul>
</div>
@ -41,7 +41,7 @@
class="_item"
>
<h3 class="_tit text-center" style="font-size: 24px; color: #333333">
{{ item.title }}
{{ item[titleField] }}
</h3>
<div class="_info conter1000">
<div v-if="isOddEvenNumber(index)" class="_r">
@ -52,10 +52,10 @@
class="_l"
>
<h3 :class="isOddEvenNumber(index) ? 'text-right' : ''">
{{ item.title }}
{{ item[titleField] }}
</h3>
<!-- <p>{{ item.description }}</p> -->
<p>{{ item.description }}</p>
<p>{{ item[descriptionField] }}</p>
</div>
<div v-if="!isOddEvenNumber(index)" class="_r">
<img :src="item.image" alt srcset />
@ -73,8 +73,8 @@
fit="cover"
style="width: 100%; height: 135px"
></el-image>
<div class="_head text_hidden">{{ child.title }}</div>
<div class="_detail text_hidden">{{ child.description }}</div>
<div class="_head text_hidden">{{ child[titleField] }}</div>
<div class="_detail text_hidden">{{ child[descriptionField] }}</div>
</li>
</ul>
<div class="_liBtn text-right">
@ -95,7 +95,7 @@
</div>
</template>
<script setup>
import { nextTick, onMounted, reactive } from "vue";
import { computed, nextTick, onMounted, reactive, ref } from "vue";
import seeMore from "./components/seeMore.vue";
import webFooter from "@/components/webFooter/index.vue";
import { banner } from "@/api/website/home/index";
@ -111,7 +111,14 @@ function handlePath(id) {
window.open(routeData.href, "_blank");
}
const { t } = useI18n();
const { t, locale } = useI18n();
const titleField = computed(() =>
locale.value === "zh" ? "title" : `${locale.value}Title`
);
const descriptionField = computed(() =>
locale.value === "zh" ? "description" : `${locale.value}Description`
);
let moreData = ref([]);
const loading = ref(true);
const oneLevelTitle = ref({});
@ -311,11 +318,13 @@ function handleShowMore(item) {
._r {
width: 420px;
background: #f2f6ff;
//background: #f2f6ff;
background: transparent;
img {
width: 100%;
height: 100%;
object-fit: contain;
}
}
}