update
This commit is contained in:
12
utils/rpc.ts
12
utils/rpc.ts
@ -31,11 +31,11 @@ export interface InewsIndex {
|
||||
created_at: string
|
||||
updated_at: string
|
||||
}
|
||||
export async function newsIndex(websiteId:number = 0):Promise<result<InewsIndex[]>>{
|
||||
console.log(websiteId)
|
||||
export async function newsIndex(websiteId:number = 0, limit:number = 10):Promise<result<InewsIndex[]>>{
|
||||
const client = getRpcClient()
|
||||
const result = await client.call('news/index', {
|
||||
id:websiteId
|
||||
id:websiteId,
|
||||
limit: limit
|
||||
})
|
||||
|
||||
return result
|
||||
@ -63,10 +63,11 @@ export interface InewsDetail {
|
||||
title: string
|
||||
}
|
||||
}
|
||||
export async function newsDetail(id:string):Promise<result<InewsDetail>>{
|
||||
export async function newsDetail(id:string, app_id:number):Promise<result<InewsDetail>>{
|
||||
const client = getRpcClient()
|
||||
const result = await client.call('news/view', {
|
||||
id:id
|
||||
id:id,
|
||||
app_id:app_id
|
||||
})
|
||||
|
||||
return result
|
||||
@ -81,6 +82,7 @@ export interface IWebsiteConfig {
|
||||
app_description: string
|
||||
app_keywords: string
|
||||
app_company: string
|
||||
app_template: string
|
||||
app_logo: string
|
||||
app_favicon: string
|
||||
app_copyright: string
|
||||
|
Reference in New Issue
Block a user