新闻分页
This commit is contained in:
@ -5,3 +5,8 @@ export const listNews = (params) => request({
|
|||||||
method: "GET",
|
method: "GET",
|
||||||
params
|
params
|
||||||
});
|
});
|
||||||
|
|
||||||
|
export const getNewsInfo = (id) => request({
|
||||||
|
url: `/app/news/${id}`,
|
||||||
|
method: "GET",
|
||||||
|
})
|
||||||
@ -10,16 +10,25 @@
|
|||||||
<li class="menu-item1">
|
<li class="menu-item1">
|
||||||
<div
|
<div
|
||||||
class="menu-item-tit"
|
class="menu-item-tit"
|
||||||
:class="pagePath == '/' ? 'active' : ''"
|
:class="pagePath === '/' ? 'active' : ''"
|
||||||
@click="handlePath('/')"
|
@click="handlePath('/')"
|
||||||
>
|
>
|
||||||
{{ t("headerMenu.home") }}
|
{{ t("headerMenu.home") }}
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
<li class="menu-item1">
|
||||||
|
<div
|
||||||
|
class="menu-item-tit"
|
||||||
|
:class="pagePath === '/news' ? 'active' : ''"
|
||||||
|
@click="handlePath('/news')"
|
||||||
|
>
|
||||||
|
{{ t("headerMenu.news") }}
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
<li class="menu-item1 solution">
|
<li class="menu-item1 solution">
|
||||||
<div
|
<div
|
||||||
class="menu-item-tit"
|
class="menu-item-tit"
|
||||||
:class="pagePath.indexOf('/solution/') != -1 ? 'active' : ''"
|
:class="pagePath.indexOf('/solution/') !== -1 ? 'active' : ''"
|
||||||
>
|
>
|
||||||
{{ t("headerMenu.resolution") }}
|
{{ t("headerMenu.resolution") }}
|
||||||
</div>
|
</div>
|
||||||
@ -28,7 +37,7 @@
|
|||||||
v-for="item in categoryList"
|
v-for="item in categoryList"
|
||||||
class="pointer"
|
class="pointer"
|
||||||
:class="
|
:class="
|
||||||
pagePath == `/solution/${item.id}` ? 'x_blue _active' : ''
|
pagePath === `/solution/${item.id}` ? 'x_blue _active' : ''
|
||||||
"
|
"
|
||||||
@click="
|
@click="
|
||||||
handlePath(
|
handlePath(
|
||||||
@ -79,7 +88,7 @@
|
|||||||
<li class="menu-item1">
|
<li class="menu-item1">
|
||||||
<div
|
<div
|
||||||
class="menu-item-tit"
|
class="menu-item-tit"
|
||||||
:class="pagePath == '/innovate' ? 'active' : ''"
|
:class="pagePath === '/innovate' ? 'active' : ''"
|
||||||
@click="handlePath('/innovate')"
|
@click="handlePath('/innovate')"
|
||||||
>
|
>
|
||||||
{{ t("headerMenu.innovation") }}
|
{{ t("headerMenu.innovation") }}
|
||||||
@ -88,7 +97,7 @@
|
|||||||
<li class="menu-item1">
|
<li class="menu-item1">
|
||||||
<div
|
<div
|
||||||
class="menu-item-tit"
|
class="menu-item-tit"
|
||||||
:class="pagePath == '/activity' ? 'active' : ''"
|
:class="pagePath === '/activity' ? 'active' : ''"
|
||||||
@click="handlePath('/activity')"
|
@click="handlePath('/activity')"
|
||||||
>
|
>
|
||||||
{{ t("headerMenu.activity") }}
|
{{ t("headerMenu.activity") }}
|
||||||
@ -97,7 +106,7 @@
|
|||||||
<li class="menu-item1">
|
<li class="menu-item1">
|
||||||
<div
|
<div
|
||||||
class="menu-item-tit"
|
class="menu-item-tit"
|
||||||
:class="pagePath == '/about' ? 'active' : ''"
|
:class="pagePath === '/about' ? 'active' : ''"
|
||||||
@click="handlePath('/about')"
|
@click="handlePath('/about')"
|
||||||
>
|
>
|
||||||
{{ t("headerMenu.aboutUs") }}
|
{{ t("headerMenu.aboutUs") }}
|
||||||
@ -107,7 +116,7 @@
|
|||||||
<div
|
<div
|
||||||
v-if="!userStore.token"
|
v-if="!userStore.token"
|
||||||
class="menu-item-tit"
|
class="menu-item-tit"
|
||||||
:class="pagePath == '/login' ? 'active' : ''"
|
:class="pagePath === '/login' ? 'active' : ''"
|
||||||
@click="handlePath('/login')"
|
@click="handlePath('/login')"
|
||||||
>
|
>
|
||||||
{{ t("headerMenu.loginRegister") }}
|
{{ t("headerMenu.loginRegister") }}
|
||||||
@ -137,7 +146,7 @@
|
|||||||
<div
|
<div
|
||||||
v-if="userStore.token"
|
v-if="userStore.token"
|
||||||
class="menu-item-tit"
|
class="menu-item-tit"
|
||||||
:class="pagePath == '/login' ? 'active' : ''"
|
:class="pagePath === '/login' ? 'active' : ''"
|
||||||
@click="handlePage"
|
@click="handlePage"
|
||||||
>
|
>
|
||||||
{{ t("headerMenu.personalCenter") }}
|
{{ t("headerMenu.personalCenter") }}
|
||||||
@ -145,7 +154,7 @@
|
|||||||
<div
|
<div
|
||||||
v-if="userStore.token"
|
v-if="userStore.token"
|
||||||
class="menu-item-tit"
|
class="menu-item-tit"
|
||||||
:class="pagePath == '/login' ? 'active' : ''"
|
:class="pagePath === '/login' ? 'active' : ''"
|
||||||
@click="logout"
|
@click="logout"
|
||||||
>
|
>
|
||||||
{{ t("headerMenu.logout") }}
|
{{ t("headerMenu.logout") }}
|
||||||
@ -352,7 +361,7 @@ dt {
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 25px 0;
|
padding: 25px 0;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-family: Source Han Sans CN;
|
font-family: Source Han Sans CN, sans-serif;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #000;
|
color: #000;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
@ -398,6 +407,7 @@ dt {
|
|||||||
|
|
||||||
.webHead {
|
.webHead {
|
||||||
.site-title {
|
.site-title {
|
||||||
|
padding-top: 8px;
|
||||||
height: 80px;
|
height: 80px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: start;
|
justify-content: start;
|
||||||
@ -407,10 +417,10 @@ dt {
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
||||||
.site-logo {
|
.site-logo {
|
||||||
width: 30px;
|
width: 90px;
|
||||||
height: 30px;
|
height: 82px;
|
||||||
object-fit: cover;
|
object-fit: contain;
|
||||||
margin-right: 4px;
|
margin-right: 8px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -4,9 +4,9 @@ import webContact_zh from "@/i18n/message/webContact/zh";
|
|||||||
import webContact_ru from "@/i18n/message/webContact/ru";
|
import webContact_ru from "@/i18n/message/webContact/ru";
|
||||||
import activity_ru from "@/i18n/message/activity/ru";
|
import activity_ru from "@/i18n/message/activity/ru";
|
||||||
import activity_zh from "@/i18n/message/activity/zh";
|
import activity_zh from "@/i18n/message/activity/zh";
|
||||||
import { admin_ru, admin_zh } from "@/i18n/message/admin";
|
import {admin_ru, admin_zh} from "@/i18n/message/admin";
|
||||||
import { routes_ru, routes_zh } from "@/i18n/message/routes";
|
import {routes_ru, routes_zh} from "@/i18n/message/routes";
|
||||||
import { tagsView_ru, tagsView_zh } from "@/i18n/message/tagsView";
|
import {tagsView_ru, tagsView_zh} from "@/i18n/message/tagsView";
|
||||||
import common_zh from "@/i18n/message/common/zh";
|
import common_zh from "@/i18n/message/common/zh";
|
||||||
import common_ru from "@/i18n/message/common/ru";
|
import common_ru from "@/i18n/message/common/ru";
|
||||||
import dict_zh from "@/i18n/message/dict/zh";
|
import dict_zh from "@/i18n/message/dict/zh";
|
||||||
@ -39,6 +39,7 @@ const messages = {
|
|||||||
switchSystem: "切换系统",
|
switchSystem: "切换系统",
|
||||||
layoutSettings: "布局设置",
|
layoutSettings: "布局设置",
|
||||||
changeAvatar: "更换头像",
|
changeAvatar: "更换头像",
|
||||||
|
news: "新闻政策"
|
||||||
},
|
},
|
||||||
footer: {
|
footer: {
|
||||||
copyRight: "中科云 版权所有",
|
copyRight: "中科云 版权所有",
|
||||||
@ -163,6 +164,7 @@ const messages = {
|
|||||||
switchSystem: "Переключить систему",
|
switchSystem: "Переключить систему",
|
||||||
layoutSettings: "Настройки макета",
|
layoutSettings: "Настройки макета",
|
||||||
changeAvatar: "Сменить аватар",
|
changeAvatar: "Сменить аватар",
|
||||||
|
news: "Пресс-политика"
|
||||||
},
|
},
|
||||||
footer: {
|
footer: {
|
||||||
copyRight: "Чжункейун Авторское право",
|
copyRight: "Чжункейун Авторское право",
|
||||||
|
|||||||
@ -23,7 +23,7 @@ const table = {
|
|||||||
cooperationMemo: "Совместный протокол",
|
cooperationMemo: "Совместный протокол",
|
||||||
customerConfirmSolution: "Подтверждение технического решения клиентом",
|
customerConfirmSolution: "Подтверждение технического решения клиентом",
|
||||||
signServiceContract: "Подписание сервисного контракта (сумма контракта)",
|
signServiceContract: "Подписание сервисного контракта (сумма контракта)",
|
||||||
endTopic: "Закрыть тему",
|
endTopic: "Закрыть тему (Полученная сумма)",
|
||||||
notEndTopic: "Тема не закрыта",
|
notEndTopic: "Тема не закрыта",
|
||||||
uploadFile: "Загрузить файл",
|
uploadFile: "Загрузить файл",
|
||||||
uploadTime: "Время загрузки",
|
uploadTime: "Время загрузки",
|
||||||
|
|||||||
@ -23,7 +23,7 @@ const table = {
|
|||||||
cooperationMemo: "合作备忘录",
|
cooperationMemo: "合作备忘录",
|
||||||
customerConfirmSolution: "客户确认技术解决方案",
|
customerConfirmSolution: "客户确认技术解决方案",
|
||||||
signServiceContract: "签署服务合同(合同额)",
|
signServiceContract: "签署服务合同(合同额)",
|
||||||
endTopic: "结题",
|
endTopic: "结题(到款金额)",
|
||||||
notEndTopic: "未结题",
|
notEndTopic: "未结题",
|
||||||
uploadFile: "上传文件",
|
uploadFile: "上传文件",
|
||||||
uploadTime: "上传时间",
|
uploadTime: "上传时间",
|
||||||
|
|||||||
@ -53,7 +53,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import variables from "@/assets/styles/variables.module.scss";
|
import variables from "@/assets/styles/variables.module.scss";
|
||||||
import logo from "@/assets/logo/logo.png";
|
import logo from "@/assets/logo/logo.png";
|
||||||
import logoSmall from "@/assets/logo/logo_small.png";
|
import logoSmall from "@/assets/logo/咸海logo.png";
|
||||||
import useSettingsStore from "@/store/modules/settings";
|
import useSettingsStore from "@/store/modules/settings";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
|
|
||||||
|
|||||||
@ -1,21 +1,22 @@
|
|||||||
import router from "./router";
|
import router from "./router";
|
||||||
import { ElMessage } from "element-plus";
|
import {ElMessage} from "element-plus";
|
||||||
import NProgress from "nprogress";
|
import NProgress from "nprogress";
|
||||||
import "nprogress/nprogress.css";
|
import "nprogress/nprogress.css";
|
||||||
import { getToken } from "@/utils/auth";
|
import {getToken} from "@/utils/auth";
|
||||||
import { isHttp } from "@/utils/validate";
|
import {isHttp} from "@/utils/validate";
|
||||||
import { isRelogin } from "@/utils/request";
|
import {isRelogin} from "@/utils/request";
|
||||||
import useUserStore from "@/store/modules/user";
|
import useUserStore from "@/store/modules/user";
|
||||||
import useSettingsStore from "@/store/modules/settings";
|
import useSettingsStore from "@/store/modules/settings";
|
||||||
import usePermissionStore from "@/store/modules/permission";
|
import usePermissionStore from "@/store/modules/permission";
|
||||||
|
|
||||||
NProgress.configure({ showSpinner: false });
|
NProgress.configure({showSpinner: false});
|
||||||
|
|
||||||
const whiteList = [
|
const whiteList = [
|
||||||
"/login",
|
"/login",
|
||||||
"/auth-redirect",
|
"/auth-redirect",
|
||||||
"/bind",
|
"/bind",
|
||||||
"/register",
|
"/register",
|
||||||
|
"/news",
|
||||||
"/",
|
"/",
|
||||||
"/solution/small",
|
"/solution/small",
|
||||||
"/solution/large",
|
"/solution/large",
|
||||||
@ -27,6 +28,7 @@ const whiteList = [
|
|||||||
];
|
];
|
||||||
const whiteListReg = [
|
const whiteListReg = [
|
||||||
/\/solution\/detail\/[0-9]+/,
|
/\/solution\/detail\/[0-9]+/,
|
||||||
|
/\/news\/detail\/[0-9]+/,
|
||||||
/\/solution\/[0-9]+/,
|
/\/solution\/[0-9]+/,
|
||||||
/\/innovate\/detail\/[0-9]+/,
|
/\/innovate\/detail\/[0-9]+/,
|
||||||
/\/searchList\/[\S]+/,
|
/\/searchList\/[\S]+/,
|
||||||
@ -38,7 +40,7 @@ router.beforeEach((to, from, next) => {
|
|||||||
to.meta.title && useSettingsStore().setTitle(to.meta.title);
|
to.meta.title && useSettingsStore().setTitle(to.meta.title);
|
||||||
/* has token*/
|
/* has token*/
|
||||||
if (to.path === "/login") {
|
if (to.path === "/login") {
|
||||||
next({ path: "/" });
|
next({path: "/"});
|
||||||
NProgress.done();
|
NProgress.done();
|
||||||
} else {
|
} else {
|
||||||
if (useUserStore().roles.length === 0) {
|
if (useUserStore().roles.length === 0) {
|
||||||
@ -59,7 +61,7 @@ router.beforeEach((to, from, next) => {
|
|||||||
router.addRoute(route); // 动态添加可访问路由表
|
router.addRoute(route); // 动态添加可访问路由表
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
next({ ...to, replace: true }); // hack方法 确保addRoutes已完成
|
next({...to, replace: true}); // hack方法 确保addRoutes已完成
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
@ -68,7 +70,7 @@ router.beforeEach((to, from, next) => {
|
|||||||
.logOut()
|
.logOut()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ElMessage.error(err);
|
ElMessage.error(err);
|
||||||
next({ path: "/" });
|
next({path: "/"});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { createRouter, createWebHistory } from "vue-router";
|
import {createRouter, createWebHistory} from "vue-router";
|
||||||
/* Layout */
|
/* Layout */
|
||||||
import Layout from "@/layout";
|
import Layout from "@/layout";
|
||||||
import basicInfo from "../views/admin/enterprise/account/basicInfo.vue";
|
import basicInfo from "../views/admin/enterprise/account/basicInfo.vue";
|
||||||
@ -25,7 +25,7 @@ import i18n from "@/i18n";
|
|||||||
activeMenu: '/system/user' // 当路由设置了该属性,则会高亮相对应的侧边栏。
|
activeMenu: '/system/user' // 当路由设置了该属性,则会高亮相对应的侧边栏。
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
const { t } = i18n.global;
|
const {t} = i18n.global;
|
||||||
// 公共路由
|
// 公共路由
|
||||||
export const constantRoutes = [
|
export const constantRoutes = [
|
||||||
{
|
{
|
||||||
@ -198,6 +198,16 @@ export const constantRoutes = [
|
|||||||
name: "about",
|
name: "about",
|
||||||
component: () => import("../views/website/about/about.vue"),
|
component: () => import("../views/website/about/about.vue"),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: "news",
|
||||||
|
name: 'news-list',
|
||||||
|
component: () => import("../views/website/home/index.vue"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "news/detail/:id",
|
||||||
|
name: 'news',
|
||||||
|
component: () => import("@/views/website/news/detail.vue")
|
||||||
|
}
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -241,37 +251,37 @@ export const constantRoutes = [
|
|||||||
path: "index",
|
path: "index",
|
||||||
component: () => import("@/views/identity/index"),
|
component: () => import("@/views/identity/index"),
|
||||||
name: "index",
|
name: "index",
|
||||||
meta: { title: "身份选择" },
|
meta: {title: "身份选择"},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "enterprise",
|
path: "enterprise",
|
||||||
component: () => import("@/views/identity/enterprise"),
|
component: () => import("@/views/identity/enterprise"),
|
||||||
name: "enterprise",
|
name: "enterprise",
|
||||||
meta: { title: "企业入驻" },
|
meta: {title: "企业入驻"},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "expert",
|
path: "expert",
|
||||||
component: () => import("@/views/identity/expert"),
|
component: () => import("@/views/identity/expert"),
|
||||||
name: "expert",
|
name: "expert",
|
||||||
meta: { title: "专家入驻" },
|
meta: {title: "专家入驻"},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "research",
|
path: "research",
|
||||||
component: () => import("@/views/identity/research"),
|
component: () => import("@/views/identity/research"),
|
||||||
name: "research",
|
name: "research",
|
||||||
meta: { title: "研究机构入驻" },
|
meta: {title: "研究机构入驻"},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "laboratory",
|
path: "laboratory",
|
||||||
component: () => import("@/views/identity/laboratory"),
|
component: () => import("@/views/identity/laboratory"),
|
||||||
name: "laboratory",
|
name: "laboratory",
|
||||||
meta: { title: "实验室入驻" },
|
meta: {title: "实验室入驻"},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "agent",
|
path: "agent",
|
||||||
component: () => import("@/views/identity/agent"),
|
component: () => import("@/views/identity/agent"),
|
||||||
name: "agent",
|
name: "agent",
|
||||||
meta: { title: "科技经纪人入驻" },
|
meta: {title: "科技经纪人入驻"},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}, //TODO:
|
}, //TODO:
|
||||||
@ -299,7 +309,7 @@ export const constantRoutes = [
|
|||||||
path: "profile",
|
path: "profile",
|
||||||
component: () => import("@/views/system/user/profile/index"),
|
component: () => import("@/views/system/user/profile/index"),
|
||||||
name: "Profile",
|
name: "Profile",
|
||||||
meta: { title: "个人中心", icon: "user" },
|
meta: {title: "个人中心", icon: "user"},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@ -1341,7 +1351,7 @@ const router = createRouter({
|
|||||||
if (savedPosition) {
|
if (savedPosition) {
|
||||||
return savedPosition;
|
return savedPosition;
|
||||||
} else {
|
} else {
|
||||||
return { top: 0 };
|
return {top: 0};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@ -3,9 +3,10 @@ import Cookies from "js-cookie";
|
|||||||
const useAppStore = defineStore("app", {
|
const useAppStore = defineStore("app", {
|
||||||
state: () => ({
|
state: () => ({
|
||||||
sidebar: {
|
sidebar: {
|
||||||
opened: Cookies.get("sidebarStatus")
|
// opened: Cookies.get("sidebarStatus")
|
||||||
? !!+Cookies.get("sidebarStatus")
|
// ? !!+Cookies.get("sidebarStatus")
|
||||||
: true,
|
// : true,
|
||||||
|
opened: true,
|
||||||
withoutAnimation: false,
|
withoutAnimation: false,
|
||||||
hide: false,
|
hide: false,
|
||||||
},
|
},
|
||||||
|
|||||||
@ -161,7 +161,7 @@ if (route.query.id) {
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-if="index === 2 || index === 3"
|
v-if="index === 2 || index === 3"
|
||||||
:label="t('admin.form.amount')"
|
:label="`${t('admin.form.amount')}(${t('admin.table.tenThousandYuan')})`"
|
||||||
>
|
>
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="updateStatusList[index].remark"
|
v-model="updateStatusList[index].remark"
|
||||||
|
|||||||
@ -57,7 +57,7 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item :label="t('admin.form.workLocation')" prop="wordAddress">
|
<el-form-item :label="t('admin.form.workLocation')" prop="wordAddress">
|
||||||
<el-input v-model="modelValue.wordAddress" />
|
<el-input v-model="modelValue.wordAddress"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -74,7 +74,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<field-options ref="researchsFormRef" v-model="modelValue" />
|
<field-options ref="researchsFormRef" v-model="modelValue"/>
|
||||||
|
|
||||||
<InputBoxAdd
|
<InputBoxAdd
|
||||||
ref="keywordsFormRef"
|
ref="keywordsFormRef"
|
||||||
@ -87,7 +87,7 @@
|
|||||||
|
|
||||||
<el-row v-if="isAdd">
|
<el-row v-if="isAdd">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item :label="t('admin.form.idCard')">
|
<el-form-item :label="t('admin.form.idCard')" prop="idImage">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item prop="idImage.0">
|
<el-form-item prop="idImage.0">
|
||||||
@ -155,10 +155,10 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import InputBoxAdd from "../InputBoxAdd";
|
import InputBoxAdd from "../InputBoxAdd";
|
||||||
import FieldOptions from "../FieldOptions";
|
import FieldOptions from "../FieldOptions";
|
||||||
import { computed, reactive, ref } from "vue";
|
import {computed, reactive, ref} from "vue";
|
||||||
import { useI18n } from "vue-i18n";
|
import {useI18n} from "vue-i18n";
|
||||||
|
|
||||||
const { t } = useI18n();
|
const {t} = useI18n();
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
const researchsFormRef = ref();
|
const researchsFormRef = ref();
|
||||||
const keywordsFormRef = ref();
|
const keywordsFormRef = ref();
|
||||||
@ -206,11 +206,11 @@ const rules = reactive({
|
|||||||
trigger: "blur",
|
trigger: "blur",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
mobile: [
|
phone: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: computed(() =>
|
message: computed(() =>
|
||||||
t("admin.form.placeholder", { type: t("admin.form.mobile") })
|
t("admin.form.placeholder", {type: t("admin.form.mobile")})
|
||||||
),
|
),
|
||||||
trigger: "blur",
|
trigger: "blur",
|
||||||
},
|
},
|
||||||
@ -220,12 +220,20 @@ const rules = reactive({
|
|||||||
// trigger: "blur",
|
// trigger: "blur",
|
||||||
// },
|
// },
|
||||||
],
|
],
|
||||||
|
email: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: computed(() =>
|
||||||
|
t("admin.form.placeholder", {type: t("admin.form.email")})
|
||||||
|
),
|
||||||
|
trigger: "blur",
|
||||||
|
},],
|
||||||
idCard: [
|
idCard: [
|
||||||
// {
|
{
|
||||||
// required: true,
|
required: true,
|
||||||
// message: computed(() => t("admin.form.placeholder")),
|
message: computed(() => t("admin.form.placeholder")),
|
||||||
// trigger: "blur",
|
trigger: "blur",
|
||||||
// },
|
},
|
||||||
],
|
],
|
||||||
wordAddress: [
|
wordAddress: [
|
||||||
{
|
{
|
||||||
@ -241,34 +249,41 @@ const rules = reactive({
|
|||||||
trigger: "blur",
|
trigger: "blur",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
idImage: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
trigger: "change",
|
||||||
|
message: computed(() => t("admin.validation.pleaseUpload")),
|
||||||
|
}
|
||||||
|
],
|
||||||
"idImage.0": [
|
"idImage.0": [
|
||||||
// {
|
|
||||||
// required: true,
|
|
||||||
// message: computed(() => t("admin.validation.pleaseUpload")),
|
|
||||||
// trigger: ["blur", "change"],
|
|
||||||
// },
|
|
||||||
],
|
|
||||||
"idImage.1": [
|
|
||||||
// {
|
|
||||||
// required: true,
|
|
||||||
// message: computed(() => t("admin.validation.pleaseUpload")),
|
|
||||||
// trigger: ["blur", "change"],
|
|
||||||
// },
|
|
||||||
],
|
|
||||||
"idImage.2": [
|
|
||||||
// {
|
|
||||||
// required: true,
|
|
||||||
// message: computed(() => t("admin.validation.pleaseUpload")),
|
|
||||||
// trigger: ["blur", "change"],
|
|
||||||
// },
|
|
||||||
],
|
|
||||||
certificatePics: [
|
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: computed(() => t("admin.validation.pleaseUpload")),
|
message: computed(() => t("admin.validation.pleaseUpload")),
|
||||||
trigger: ["blur", "change"],
|
trigger: ["blur", "change"],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
"idImage.1": [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: computed(() => t("admin.validation.pleaseUpload")),
|
||||||
|
trigger: ["blur", "change"],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"idImage.2": [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: computed(() => t("admin.validation.pleaseUpload")),
|
||||||
|
trigger: ["blur", "change"],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
certificatePics: [
|
||||||
|
// {
|
||||||
|
// required: true,
|
||||||
|
// message: computed(() => t("admin.validation.pleaseUpload")),
|
||||||
|
// trigger: ["blur", "change"],
|
||||||
|
// },
|
||||||
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
const validateForm = async () => {
|
const validateForm = async () => {
|
||||||
|
|||||||
@ -9,13 +9,13 @@
|
|||||||
{{ t("admin.form.basicInfo") }}
|
{{ t("admin.form.basicInfo") }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-row>
|
<!--FIXME: <el-row>-->
|
||||||
<el-col :span="24">
|
<!-- <el-col :span="24">-->
|
||||||
<el-form-item :label="t('admin.form.expertAvatar')">
|
<!-- <el-form-item :label="t('admin.form.expertAvatar')">-->
|
||||||
<ImageUpload v-model="modelValue.image" :limit="1" />
|
<!-- <ImageUpload v-model="modelValue.image" :limit="1" />-->
|
||||||
</el-form-item>
|
<!-- </el-form-item>-->
|
||||||
</el-col>
|
<!-- </el-col>-->
|
||||||
</el-row>
|
<!-- </el-row>-->
|
||||||
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@ -240,11 +240,11 @@
|
|||||||
<script name="ExpertForm" setup>
|
<script name="ExpertForm" setup>
|
||||||
import FieldOptions from "@/views/components/FieldOptions";
|
import FieldOptions from "@/views/components/FieldOptions";
|
||||||
import InputBoxAdd from "@/views/components/InputBoxAdd";
|
import InputBoxAdd from "@/views/components/InputBoxAdd";
|
||||||
import { countryOptions, educationOptions } from "@/utils/parameter";
|
import {countryOptions, educationOptions} from "@/utils/parameter";
|
||||||
import { useI18n } from "vue-i18n";
|
import {useI18n} from "vue-i18n";
|
||||||
import { computed, toRefs } from "vue";
|
import {computed, onActivated, reactive, ref, toRefs} from "vue";
|
||||||
|
|
||||||
const { t, locale } = useI18n();
|
const {t, locale} = useI18n();
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
modelValue: Object,
|
modelValue: Object,
|
||||||
@ -261,7 +261,7 @@ const props = defineProps({
|
|||||||
default: 120,
|
default: 120,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const { modelValue, isAdd, showTitle, labelWidth } = toRefs(props);
|
const {modelValue, isAdd, showTitle, labelWidth} = toRefs(props);
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
rules: {
|
rules: {
|
||||||
product: [
|
product: [
|
||||||
@ -373,7 +373,7 @@ const data = reactive({
|
|||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: computed(() =>
|
message: computed(() =>
|
||||||
t("admin.validation.required", { type: t("admin.form.workingTime") })
|
t("admin.validation.required", {type: t("admin.form.workingTime")})
|
||||||
),
|
),
|
||||||
trigger: ["change", "blur"],
|
trigger: ["change", "blur"],
|
||||||
},
|
},
|
||||||
@ -395,7 +395,7 @@ const data = reactive({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const { rules } = toRefs(data);
|
const {rules} = toRefs(data);
|
||||||
const researchOptions = ref([]);
|
const researchOptions = ref([]);
|
||||||
const options = ref([]);
|
const options = ref([]);
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
@ -403,7 +403,8 @@ const cityFormRef = ref();
|
|||||||
const fieldFormRef = ref();
|
const fieldFormRef = ref();
|
||||||
const keywordsFormRef = ref();
|
const keywordsFormRef = ref();
|
||||||
const researchsFormRef = ref();
|
const researchsFormRef = ref();
|
||||||
const setLaboratory = () => {};
|
const setLaboratory = () => {
|
||||||
|
};
|
||||||
const validateForm = async () => {
|
const validateForm = async () => {
|
||||||
let formValid;
|
let formValid;
|
||||||
try {
|
try {
|
||||||
|
|||||||
@ -10,15 +10,16 @@
|
|||||||
<el-form-item
|
<el-form-item
|
||||||
:label="`${title}:`"
|
:label="`${title}:`"
|
||||||
:prop="fieldKey"
|
:prop="fieldKey"
|
||||||
:rules="[
|
|
||||||
|
>
|
||||||
|
<!-- :rules="[
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
type: 'array',
|
type: 'array',
|
||||||
message: t('admin.validation.pleaseInputAndAdd'),
|
message: t('admin.validation.pleaseInputAndAdd'),
|
||||||
trigger: 'change',
|
trigger: 'change',
|
||||||
},
|
},
|
||||||
]"
|
]"-->
|
||||||
>
|
|
||||||
<el-row type="flex" class="input-add-bar" justify="space-between">
|
<el-row type="flex" class="input-add-bar" justify="space-between">
|
||||||
<el-col :span="20">
|
<el-col :span="20">
|
||||||
<el-input v-model="dataVal" :placeholder="placeholder"></el-input>
|
<el-input v-model="dataVal" :placeholder="placeholder"></el-input>
|
||||||
|
|||||||
@ -1,9 +1,11 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { reactive, ref, toRefs } from "vue";
|
import {reactive, ref, toRefs} from "vue";
|
||||||
import { listNews } from "@/api/website/home/news";
|
import {listNews} from "@/api/website/home/news";
|
||||||
import Pagination from "@/components/Pagination/index.vue";
|
import Pagination from "@/components/Pagination/index.vue";
|
||||||
import { useI18n } from "vue-i18n";
|
import {useI18n} from "vue-i18n";
|
||||||
const { t, locale } = useI18n();
|
import dayjs from "dayjs";
|
||||||
|
|
||||||
|
const {t, locale} = useI18n();
|
||||||
const file_base_url = `${import.meta.env.VITE_APP_BASE_API}/file`;
|
const file_base_url = `${import.meta.env.VITE_APP_BASE_API}/file`;
|
||||||
const total = ref(0);
|
const total = ref(0);
|
||||||
const newsList = ref([]);
|
const newsList = ref([]);
|
||||||
@ -12,12 +14,12 @@ const data = reactive({
|
|||||||
latestNews: {},
|
latestNews: {},
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 8,
|
pageSize: 10,
|
||||||
classification: "0",
|
classification: "0",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const { queryParams, latestNews } = toRefs(data);
|
const {queryParams, latestNews} = toRefs(data);
|
||||||
const getList = () => {
|
const getList = () => {
|
||||||
listNews(queryParams.value).then((resp) => {
|
listNews(queryParams.value).then((resp) => {
|
||||||
newsList.value = resp.rows;
|
newsList.value = resp.rows;
|
||||||
@ -26,7 +28,7 @@ const getList = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const getLatestNews = () => {
|
const getLatestNews = () => {
|
||||||
listNews({ pageNum: 1, pageSize: 1 }).then((resp) => {
|
listNews({pageNum: 1, pageSize: 1}).then((resp) => {
|
||||||
if (resp.total) {
|
if (resp.total) {
|
||||||
latestNews.value = resp.rows[0];
|
latestNews.value = resp.rows[0];
|
||||||
}
|
}
|
||||||
@ -44,7 +46,7 @@ getList();
|
|||||||
<template>
|
<template>
|
||||||
<div class="news-container" style="height: 100%">
|
<div class="news-container" style="height: 100%">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<img class="cover-image" :src="`${file_base_url}${latestNews?.cover}`" />
|
<img class="cover-image" :src="`${file_base_url}${latestNews?.cover}`"/>
|
||||||
<p class="title">{{ latestNews?.title }}</p>
|
<p class="title">{{ latestNews?.title }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
@ -58,14 +60,21 @@ getList();
|
|||||||
</el-tabs>
|
</el-tabs>
|
||||||
<ul class="news-list">
|
<ul class="news-list">
|
||||||
<li class="news-item" v-for="news in newsList" :key="news.id">
|
<li class="news-item" v-for="news in newsList" :key="news.id">
|
||||||
|
<a :href="`/news/detail/${news.id}`" target="_blank">
|
||||||
<span class="title">{{
|
<span class="title">{{
|
||||||
locale === "zh" ? news.title : locale === "ru" ? news.titleRu : null
|
locale === "zh" ? news.title : locale === "ru" ? news.titleRu : null
|
||||||
}}</span>
|
}}</span>
|
||||||
<span class="time">
|
<span class="time">
|
||||||
{{ news.create_time }}
|
{{ dayjs(news.createTime).format("YYYY-MM-DD") }}
|
||||||
</span>
|
</span>
|
||||||
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<pagination v-show="total > 0"
|
||||||
|
:total="total"
|
||||||
|
v-model:page="queryParams.pageNum"
|
||||||
|
v-model:limit="queryParams.pageSize"
|
||||||
|
@pagination="getList"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <div class="news-list">
|
<!-- <div class="news-list">
|
||||||
@ -90,20 +99,26 @@ getList();
|
|||||||
.news-container {
|
.news-container {
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
.left {
|
.left {
|
||||||
flex: 4;
|
width: calc(50vw - 20px);
|
||||||
height: 100%;
|
height: calc(100vh - 200px);
|
||||||
// display: flex;
|
display: flex;
|
||||||
// flex-direction: column;
|
flex-direction: column;
|
||||||
// justify-content: center;
|
|
||||||
.cover-image {
|
.cover-image {
|
||||||
|
height: calc(100vh - 200px - 24px - 12px);
|
||||||
|
//flex: 1;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
aspect-ratio: 4/3;
|
//aspect-ratio: 4/3;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
|
height: 24px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
|
width: 100%;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin-top: 12px;
|
margin-top: 12px;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
@ -112,23 +127,34 @@ getList();
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.right {
|
.right {
|
||||||
flex: 4;
|
width: calc(50vw - 20px);
|
||||||
margin-left: 12px;
|
margin-left: 12px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
|
|
||||||
.news-list {
|
.news-list {
|
||||||
.news-item {
|
.news-item {
|
||||||
list-style: disc;
|
& > a {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
cursor: pointer;
|
justify-content: space-between;
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
|
flex: 1;
|
||||||
|
width: 100px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.time {
|
||||||
|
color: gray;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -52,12 +52,14 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed, onMounted, reactive, ref, shallowRef } from "vue";
|
import {computed, onActivated, onMounted, reactive, ref, shallowRef} from "vue";
|
||||||
import index0 from "./comp/index0.vue";
|
import index0 from "./comp/index0.vue";
|
||||||
import index1 from "./comp/index1.vue";
|
import index1 from "./comp/index1.vue";
|
||||||
import index8 from "./comp/index8.vue";
|
import index8 from "./comp/index8.vue";
|
||||||
import index9 from "@/views/website/home/comp/index9.vue";
|
import index9 from "@/views/website/home/comp/index9.vue";
|
||||||
|
import {useRoute} from "vue-router";
|
||||||
|
|
||||||
|
const route = useRoute()
|
||||||
const loading = ref(true);
|
const loading = ref(true);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
@ -193,14 +195,14 @@ const handleIndicatorClick = (idx) => {
|
|||||||
console.log(idx);
|
console.log(idx);
|
||||||
let boxIndex;
|
let boxIndex;
|
||||||
let _mapIndex;
|
let _mapIndex;
|
||||||
if (idx === 1) {
|
if (idx <= 2) {
|
||||||
boxIndex = 1;
|
boxIndex = idx;
|
||||||
_mapIndex = null;
|
_mapIndex = null;
|
||||||
} else if (idx <= 5) {
|
} else if (idx <= 6) {
|
||||||
boxIndex = 2;
|
|
||||||
_mapIndex = idx - 2;
|
|
||||||
} else {
|
|
||||||
boxIndex = 3;
|
boxIndex = 3;
|
||||||
|
_mapIndex = idx - 3;
|
||||||
|
} else {
|
||||||
|
boxIndex = 4;
|
||||||
_mapIndex = null;
|
_mapIndex = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -219,6 +221,13 @@ const handleIndicatorClick = (idx) => {
|
|||||||
mapIndex.value = _mapIndex;
|
mapIndex.value = _mapIndex;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
// console.log(route.name)
|
||||||
|
if (route.name === "news-list") {
|
||||||
|
handleIndicatorClick(2)
|
||||||
|
}
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="login">
|
<div class="login">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<img class="loginImg" src="@/assets/images/login.png" alt="" srcset="" />
|
<img class="loginImg" src="@/assets/images/login.png" alt="" srcset=""/>
|
||||||
<div class="login-form">
|
<div class="login-form">
|
||||||
<el-tabs v-model="loginForm.mode" v-if="isLogin == 1">
|
<el-tabs v-model="loginForm.mode" v-if="isLogin == 1">
|
||||||
<el-tab-pane
|
<el-tab-pane
|
||||||
@ -59,7 +59,7 @@
|
|||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
<WebGetCode v-model:mobile="loginForm.username" />
|
<WebGetCode v-model:mobile="loginForm.username"/>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@ -132,8 +132,8 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<Register v-model:isLogin="isLogin" v-else-if="isLogin == 2" />
|
<Register v-model:isLogin="isLogin" v-else-if="isLogin == 2"/>
|
||||||
<Retrieve v-model:isLogin="isLogin" v-else-if="isLogin == 3" />
|
<Retrieve v-model:isLogin="isLogin" v-else-if="isLogin == 3"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -149,15 +149,15 @@ import Retrieve from "../retrieve";
|
|||||||
import Register from "../register";
|
import Register from "../register";
|
||||||
import WebGetCode from "@/components/webGetCode";
|
import WebGetCode from "@/components/webGetCode";
|
||||||
import useUserStore from "@/store/modules/user";
|
import useUserStore from "@/store/modules/user";
|
||||||
import { useRouter } from "vue-router";
|
import {useRouter} from "vue-router";
|
||||||
import { useI18n } from "vue-i18n";
|
import {useI18n} from "vue-i18n";
|
||||||
import { computed, reactive, ref } from "vue"; // const store = useStore();
|
import {computed, reactive, ref} from "vue"; // const store = useStore();
|
||||||
// const store = useStore();
|
// const store = useStore();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
// const { proxy } = getCurrentInstance();
|
// const { proxy } = getCurrentInstance();
|
||||||
const { t } = useI18n();
|
const {t} = useI18n();
|
||||||
const isLogin = ref(1);
|
const isLogin = ref(1);
|
||||||
|
|
||||||
const loginForm = ref({
|
const loginForm = ref({
|
||||||
@ -203,7 +203,7 @@ const isCheck = (rule, value, callback) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
const isCheckRules = {
|
const isCheckRules = {
|
||||||
isCheck: [{ required: true, validator: isCheck, trigger: "change" }],
|
isCheck: [{required: true, validator: isCheck, trigger: "change"}],
|
||||||
};
|
};
|
||||||
|
|
||||||
// const codeUrl = ref("");
|
// const codeUrl = ref("");
|
||||||
@ -218,7 +218,7 @@ const handleLogin = async () => {
|
|||||||
if (loginValid && isCheckValid) {
|
if (loginValid && isCheckValid) {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
if (loginForm.value.rememberMe) {
|
if (loginForm.value.rememberMe) {
|
||||||
Cookies.set("username", loginForm.value.username, { expires: 30 });
|
Cookies.set("username", loginForm.value.username, {expires: 30});
|
||||||
Cookies.set("password", loginForm.value.password, {
|
Cookies.set("password", loginForm.value.password, {
|
||||||
expires: 30,
|
expires: 30,
|
||||||
});
|
});
|
||||||
@ -240,7 +240,7 @@ const handleLogin = async () => {
|
|||||||
userStore
|
userStore
|
||||||
.login(formData)
|
.login(formData)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
router.push({ path: redirect.value || "/identity/index" });
|
router.push({path: redirect.value || "/identity/index"});
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
@ -276,7 +276,7 @@ getCookie();
|
|||||||
.content {
|
.content {
|
||||||
// padding: 0 250px;
|
// padding: 0 250px;
|
||||||
// padding: 0 30px;
|
// padding: 0 30px;
|
||||||
width: 1400px;
|
width: 100%;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
background: #b1ccff;
|
background: #b1ccff;
|
||||||
@ -285,8 +285,10 @@ getCookie();
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
.loginImg {
|
.loginImg {
|
||||||
width: 705px;
|
width: calc(100vw - 516px);
|
||||||
height: 458px;
|
//width: 705px;
|
||||||
|
//height: 458px;
|
||||||
|
aspect-ratio: 705/458;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
65
src/views/website/news/detail.vue
Normal file
65
src/views/website/news/detail.vue
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
<script setup>
|
||||||
|
import {getNewsInfo} from "@/api/website/home/news";
|
||||||
|
import {useRoute} from "vue-router";
|
||||||
|
import {reactive, toRefs} from "vue";
|
||||||
|
import {useI18n} from "vue-i18n";
|
||||||
|
import WebFooter from "@/components/webFooter/index.vue";
|
||||||
|
|
||||||
|
const {t, locale} = useI18n();
|
||||||
|
const file_base_url = `${import.meta.env.VITE_APP_BASE_API}/file`;
|
||||||
|
const data = reactive({
|
||||||
|
news: {}
|
||||||
|
})
|
||||||
|
const {news} = toRefs(data)
|
||||||
|
const route = useRoute()
|
||||||
|
const getNews = () => {
|
||||||
|
const id = route.params.id
|
||||||
|
getNewsInfo(id).then((resp) => {
|
||||||
|
news.value = resp.data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
getNews()
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="container">
|
||||||
|
<div class="news-body">
|
||||||
|
<img class="cover-image" :src="`${file_base_url}${news.cover}`"/>
|
||||||
|
<h1 class="title">{{locale === "zh" ? news.title : locale === "ru" ? news.titleRu : null }}</h1>
|
||||||
|
<p class="content">{{ locale === "zh" ? news.content : locale === "ru" ? news.contentRu : null}}</p>
|
||||||
|
</div>
|
||||||
|
<web-footer></web-footer>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.container {
|
||||||
|
background-color: #f2f6ff;
|
||||||
|
|
||||||
|
.news-body {
|
||||||
|
background-color: #ffffff;
|
||||||
|
width: 1000px;
|
||||||
|
margin: 0 auto;
|
||||||
|
|
||||||
|
.cover-image {
|
||||||
|
width: 100%;
|
||||||
|
aspect-ratio: 6/2;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1.title {
|
||||||
|
text-align: center;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 28px;
|
||||||
|
}
|
||||||
|
|
||||||
|
p.content {
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 24px;
|
||||||
|
margin: 0;
|
||||||
|
padding: 24px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -32,8 +32,8 @@ export default defineConfig(({mode, command}) => {
|
|||||||
// https://cn.vitejs.dev/config/#server-proxy
|
// https://cn.vitejs.dev/config/#server-proxy
|
||||||
"/dev-api": {
|
"/dev-api": {
|
||||||
// target: "http://101.34.131.16:1618",
|
// target: "http://101.34.131.16:1618",
|
||||||
target: "http://129.211.170.150/api",
|
// target: "http://129.211.170.150/api",
|
||||||
// target: "http://192.168.0.200:1619",
|
target: "http://192.168.0.200:1619",
|
||||||
// target: 'http://172.18.3.127:1618',
|
// target: 'http://172.18.3.127:1618',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (p) => p.replace(/^\/dev-api/, ""),
|
rewrite: (p) => p.replace(/^\/dev-api/, ""),
|
||||||
|
|||||||
Reference in New Issue
Block a user