diff --git a/gringotts-frontend/components/constants.js b/gringotts-frontend/components/constants.js index dc594ce..b2ba757 100644 --- a/gringotts-frontend/components/constants.js +++ b/gringotts-frontend/components/constants.js @@ -1,6 +1,5 @@ export const information = { debug: true, - // baseUrl: '', baseUrl: 'http://127.0.0.1:20080', title: '可信供给中心', } @@ -17,8 +16,8 @@ export function useAmis(amisObject) { struct, { data: { - debug: information.debug, - base: information.baseUrl, + debug: information.debug ?? false, + base: information.baseUrl ?? '', }, }, { diff --git a/gringotts-frontend/pages/index/main.js b/gringotts-frontend/pages/index/main.js index 0c44642..284a598 100644 --- a/gringotts-frontend/pages/index/main.js +++ b/gringotts-frontend/pages/index/main.js @@ -1,3 +1,4 @@ +import './style.css' import {apiGet, useAmis} from '../../components/constants.js' import {userChangePasswordDialog} from "../../components/user/dialog-user-change-password.js"; import {tabUser} from "./tab-user.js"; diff --git a/gringotts-frontend/pages/index/style.css b/gringotts-frontend/pages/index/style.css new file mode 100644 index 0000000..e69de29 diff --git a/gringotts-frontend/pages/index/tab-market.js b/gringotts-frontend/pages/index/tab-market.js index dc02e41..6add9b9 100644 --- a/gringotts-frontend/pages/index/tab-market.js +++ b/gringotts-frontend/pages/index/tab-market.js @@ -1,4 +1,3 @@ -import {wareDetailDialog} from "../../components/ware/dialog-ware.js"; import {apiGet, crudCommonOptions} from "../../components/constants.js"; import {authenticationAddDialog} from "../../components/permission/dialog-permission.js"; @@ -26,19 +25,58 @@ export function tabMarket() { 'reload', ], mode: 'cards', + columnsCount: 3, card: { header: { title: '${name}', subTitle: '${createdTime}', - description: '${description}', avatar: '${icon}', avatarClassName: 'pull-left thumb-md avatar b-3x m-r' }, + body: '${TRUNCATE(description, 50)}', actions: [ { type: 'action', label: '查看', - ...wareDetailDialog(), + actionType: 'dialog', + dialog: { + title: '数据产品详情', + size: 'md', + actions: [], + body: { + type: 'service', + api: apiGet(`\${base}/ware/detail/\${id}`), + body: [ + { + type: 'property', + title: '产品信息', + items: [ + { + label: '名称', + content: '${name}', + }, + { + label: '归属', + content: '${createdUsername}', + }, + { + label: '创建时间', + content: '${createdTime}', + }, + { + span: 3, + label: '描述', + content: '${description}', + }, + ] + }, + { + type: 'tpl', + tpl: '${content|raw}' + } + ] + } + } }, { type: 'action',