feat: 为前端请求添加Status控制
All checks were successful
deploy to server / build-and-deploy (push) Successful in 3m6s
All checks were successful
deploy to server / build-and-deploy (push) Successful in 3m6s
- 在产品页/解决方案页等路由仅获取已发布条目
This commit is contained in:
@ -1,5 +1,5 @@
|
|||||||
query GetDocumentList($locale: String!) {
|
query GetDocumentList($locale: String!) {
|
||||||
product_documents {
|
product_documents(filter: { status: { _eq: "published" } }) {
|
||||||
id
|
id
|
||||||
file {
|
file {
|
||||||
id
|
id
|
||||||
|
|||||||
@ -37,7 +37,7 @@ query GetProduct($id: ID!, $locale: String!) {
|
|||||||
}
|
}
|
||||||
faqs {
|
faqs {
|
||||||
id
|
id
|
||||||
questions_id {
|
questions_id(filter: { status: { _eq: "published" } }) {
|
||||||
id
|
id
|
||||||
translations(filter: { languages_code: { code: { _eq: $locale } } }) {
|
translations(filter: { languages_code: { code: { _eq: $locale } } }) {
|
||||||
id
|
id
|
||||||
@ -48,7 +48,7 @@ query GetProduct($id: ID!, $locale: String!) {
|
|||||||
}
|
}
|
||||||
documents {
|
documents {
|
||||||
id
|
id
|
||||||
product_documents_id {
|
product_documents_id(filter: { status: { _eq: "published" } }) {
|
||||||
id
|
id
|
||||||
file {
|
file {
|
||||||
id
|
id
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
query GetQuestionList($locale: String!) {
|
query GetQuestionList($locale: String!) {
|
||||||
questions {
|
questions(filter: { status: { _eq: "published" } }) {
|
||||||
id
|
id
|
||||||
translations(filter: { languages_code: { code: { _eq: $locale } } }) {
|
translations(filter: { languages_code: { code: { _eq: $locale } } }) {
|
||||||
id
|
id
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
query GetSolutionList($locale: String!) {
|
query GetSolutionList($locale: String!) {
|
||||||
solutions {
|
solutions(filter: { status: { _eq: "published" } }) {
|
||||||
id
|
id
|
||||||
cover {
|
cover {
|
||||||
id
|
id
|
||||||
|
|||||||
@ -160,7 +160,7 @@ export interface Product {
|
|||||||
/** @primaryKey */
|
/** @primaryKey */
|
||||||
id: number;
|
id: number;
|
||||||
/** @description 当前产品条目的状态 */
|
/** @description 当前产品条目的状态 */
|
||||||
status?: 'published' | 'draft' | 'archived';
|
status?: `in-production` | 'discontinued' | 'archived';
|
||||||
product_type?: ProductType | string | null;
|
product_type?: ProductType | string | null;
|
||||||
/** @description 在产品列表中显示 */
|
/** @description 在产品列表中显示 */
|
||||||
cover?: DirectusFile | string | null;
|
cover?: DirectusFile | string | null;
|
||||||
|
|||||||
Reference in New Issue
Block a user