V1.2.0需求 4个页面新增及功能 待处理编辑器锚点定位、编辑器发布的文章UI优化、中英文翻译
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { documentsList } from '../../api/documentManagement'
|
||||
|
||||
export default{
|
||||
name: 'HelpCenter',
|
||||
data() {
|
||||
@@ -11,8 +13,9 @@ export default{
|
||||
{ id: 1, name: 'API文档', route: 'apiFile' },
|
||||
{ id: 2, name: '挖矿教程', route: 'AccessMiningPool/nexaAccess' },
|
||||
{ id: 3, name: '服务条款', route: 'ServiceTerms' },
|
||||
{ id: 3, name: '费率', route: 'rate' },
|
||||
{ id: 4, name: '公告中心', route: 'announcements' },
|
||||
{ id: 4, name: '费率', route: 'rate' },
|
||||
{ id: 5, name: '公告中心', route: 'announcements' },
|
||||
{ id: 6, name: '常见问题', route: 'commonProblem' },
|
||||
|
||||
],
|
||||
/** 推荐内容数据 */
|
||||
@@ -58,18 +61,63 @@ export default{
|
||||
author: '文章ID1星期 19发布',
|
||||
comments: '0'
|
||||
}
|
||||
],
|
||||
activeParams:{
|
||||
type:"3",//公告中心
|
||||
lang:this.$i18n.locale,
|
||||
pageNum:1,
|
||||
pageSize:10
|
||||
},
|
||||
TypeList:[
|
||||
{
|
||||
value:"1",
|
||||
label:"挖矿教程"
|
||||
},
|
||||
{
|
||||
value:"2",
|
||||
label:"常见问题"
|
||||
},
|
||||
{
|
||||
value:"3",
|
||||
label:"公告中心"
|
||||
},
|
||||
{
|
||||
value:"0",
|
||||
label:"其他"
|
||||
},
|
||||
|
||||
]
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
try {
|
||||
this.TypeList = JSON.parse(localStorage.getItem('TypeList'))
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
this.fetchActivityList(this.activeParams)
|
||||
},
|
||||
methods: {
|
||||
async fetchActivityList(params){
|
||||
const res = await documentsList(params)
|
||||
console.log(res,"res");
|
||||
|
||||
if (res.code === 200) {
|
||||
this.activities = res.rows
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 处理搜索功能
|
||||
*/
|
||||
handleSearch() {
|
||||
if (this.searchQuery.trim()) {
|
||||
console.log('搜索内容:', this.searchQuery);
|
||||
// 实际项目中这里应该调用搜索API
|
||||
this.$message.success(`搜索: ${this.searchQuery}`);
|
||||
let url = `/${this.$i18n.locale}/searchResult`
|
||||
this.$router.push({
|
||||
path:url,
|
||||
query:{
|
||||
keyword:this.searchQuery
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
@@ -85,12 +133,38 @@ export default{
|
||||
},
|
||||
|
||||
/**
|
||||
* 处理查看更多按钮点击
|
||||
* 处理查看更多按钮点击 跳转公告中心页面
|
||||
*/
|
||||
handleViewMore() {
|
||||
console.log('查看更多活动');
|
||||
// 实际项目中这里应该跳转到活动列表页面
|
||||
this.$message.info('查看更多活动');
|
||||
this.$router.push(`/${this.$i18n.locale}/announcements`);
|
||||
},
|
||||
handelType(type){
|
||||
try {
|
||||
let label = this.TypeList.find(item => item.value == type).label
|
||||
return this.$t(label)
|
||||
} catch (error) {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
handelTime(time){
|
||||
|
||||
try {
|
||||
return `${time.split("T")[0]} ${time.split("T")[1]}`
|
||||
} catch (error) {
|
||||
return ''
|
||||
}
|
||||
|
||||
},
|
||||
handleActivityClick(activity){
|
||||
|
||||
let url = `/${this.$i18n.locale}/announcementDetails`
|
||||
// 跳转到公告详情页
|
||||
this.$router.push({
|
||||
path:url,
|
||||
query:{
|
||||
id:activity.id
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user