From 775841eed3621f7cdd1d5a6618bd13cf2a4acaea Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com>
Date: Tue, 27 Jan 2026 00:14:08 +0800
Subject: [PATCH] =?UTF-8?q?feat(core):=20=E5=88=9D=E5=A7=8B=E5=8C=96?=
=?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=9F=BA=E7=A1=80=E6=9E=B6=E6=9E=84=E5=92=8C?=
=?UTF-8?q?CMS=E5=8A=9F=E8=83=BD=E6=A8=A1=E5=9D=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 添加Docker相关配置文件(.dockerignore, .env.example, .gitignore)
- 实现服务端API代理功能,支持文件、模块和服务器API转发
- 创建文章详情页、栏目文章列表页和单页内容展示页面
- 集成Ant Design Vue组件库并实现SSR样式提取功能
- 定义API响应数据结构类型和应用布局组件
- 开发开发者应用中心和文章管理页面
- 实现CMS导航菜单获取和多租户切换功能
---
.dockerignore | 15 +
.env.example | 12 +
.gitignore | 26 +
Dockerfile | 33 +
README.md | 193 +
app/api/cms/cmsAd/index.ts | 106 +
app/api/cms/cmsAd/model/index.ts | 65 +
app/api/cms/cmsAdRecord/index.ts | 106 +
app/api/cms/cmsAdRecord/model/index.ts | 35 +
app/api/cms/cmsArticle/index.ts | 159 +
app/api/cms/cmsArticle/model/index.ts | 134 +
app/api/cms/cmsArticleCategory/index.ts | 108 +
app/api/cms/cmsArticleCategory/model/index.ts | 59 +
app/api/cms/cmsArticleComment/index.ts | 106 +
app/api/cms/cmsArticleComment/model/index.ts | 47 +
app/api/cms/cmsArticleContent/index.ts | 106 +
app/api/cms/cmsArticleContent/model/index.ts | 26 +
app/api/cms/cmsArticleCount/index.ts | 106 +
app/api/cms/cmsArticleCount/model/index.ts | 25 +
app/api/cms/cmsArticleLike/index.ts | 106 +
app/api/cms/cmsArticleLike/model/index.ts | 25 +
app/api/cms/cmsDesign/index.ts | 106 +
app/api/cms/cmsDesign/model/index.ts | 64 +
app/api/cms/cmsDomain/index.ts | 153 +
app/api/cms/cmsDomain/model/index.ts | 43 +
app/api/cms/cmsForm/index.ts | 106 +
app/api/cms/cmsForm/model/index.ts | 53 +
app/api/cms/cmsFormRecord/index.ts | 106 +
app/api/cms/cmsFormRecord/model/index.ts | 41 +
app/api/cms/cmsLang/index.ts | 106 +
app/api/cms/cmsLang/model/index.ts | 35 +
app/api/cms/cmsLangLog/index.ts | 106 +
app/api/cms/cmsLangLog/model/index.ts | 27 +
app/api/cms/cmsLink/index.ts | 120 +
app/api/cms/cmsLink/model/index.ts | 45 +
app/api/cms/cmsModel/index.ts | 106 +
app/api/cms/cmsModel/model/index.ts | 63 +
app/api/cms/cmsNavigation/index.ts | 151 +
app/api/cms/cmsNavigation/model/index.ts | 111 +
app/api/cms/cmsOrder/index.ts | 106 +
app/api/cms/cmsOrder/model/index.ts | 66 +
app/api/cms/cmsStatistics/index.ts | 106 +
app/api/cms/cmsStatistics/model/index.ts | 79 +
app/api/cms/cmsTemplate/index.ts | 106 +
app/api/cms/cmsTemplate/model/index.ts | 59 +
app/api/cms/cmsWebsite/index.ts | 175 +
app/api/cms/cmsWebsite/model/index.ts | 168 +
app/api/cms/cmsWebsiteField/index.ts | 167 +
app/api/cms/cmsWebsiteField/model/index.ts | 65 +
app/api/cms/cmsWebsiteSetting/index.ts | 106 +
app/api/cms/cmsWebsiteSetting/model/index.ts | 55 +
app/api/cms/link/index.ts | 113 +
app/api/cms/link/model/index.ts | 31 +
app/api/index.ts | 61 +
app/api/layout/index.ts | 153 +
app/api/layout/model/index.ts | 74 +
app/api/miniprogram/index.ts | 50 +
app/api/passport/login/index.ts | 117 +
app/api/passport/login/model/index.ts | 46 +
app/api/passport/qrLogin/index.ts | 111 +
app/api/sdy/sdyDealerOrder/index.ts | 135 +
app/api/sdy/sdyDealerOrder/model/index.ts | 75 +
app/api/shop/shopCommissionRole/index.ts | 105 +
.../shop/shopCommissionRole/model/index.ts | 35 +
app/api/shop/shopCoupon/index.ts | 105 +
app/api/shop/shopCoupon/model/index.ts | 71 +
.../shop/shopCouponApplyCate/model/index.ts | 11 +
.../shop/shopCouponApplyItem/model/index.ts | 11 +
app/api/shop/shopDealerApply/index.ts | 158 +
app/api/shop/shopDealerApply/model/index.ts | 61 +
app/api/shop/shopDealerCapital/index.ts | 105 +
app/api/shop/shopDealerCapital/model/index.ts | 39 +
app/api/shop/shopDealerOrder/index.ts | 221 +
app/api/shop/shopDealerOrder/model/index.ts | 77 +
app/api/shop/shopDealerPoster/index.ts | 131 +
app/api/shop/shopDealerPoster/model/index.ts | 93 +
app/api/shop/shopDealerRecord/index.ts | 106 +
app/api/shop/shopDealerRecord/model/index.ts | 39 +
app/api/shop/shopDealerReferee/index.ts | 105 +
app/api/shop/shopDealerReferee/model/index.ts | 48 +
app/api/shop/shopDealerSetting/index.ts | 105 +
app/api/shop/shopDealerSetting/model/index.ts | 25 +
app/api/shop/shopDealerUser/index.ts | 140 +
app/api/shop/shopDealerUser/model/index.ts | 60 +
app/api/shop/shopDealerWithdraw/index.ts | 105 +
.../shop/shopDealerWithdraw/model/index.ts | 63 +
app/api/shop/shopExpress/index.ts | 105 +
app/api/shop/shopExpress/model/index.ts | 35 +
app/api/shop/shopExpressTemplate/index.ts | 105 +
.../shop/shopExpressTemplate/model/index.ts | 43 +
.../shop/shopExpressTemplateDetail/index.ts | 105 +
.../shopExpressTemplateDetail/model/index.ts | 45 +
app/api/shop/shopGift/index.ts | 130 +
app/api/shop/shopGift/model/index.ts | 61 +
app/api/shop/shopGoods/index.ts | 116 +
app/api/shop/shopGoods/model/index.ts | 148 +
app/api/shop/shopGoodsCategory/index.ts | 106 +
app/api/shop/shopGoodsCategory/model/index.ts | 64 +
app/api/shop/shopGoodsCoupon/index.ts | 106 +
app/api/shop/shopGoodsCoupon/model/index.ts | 37 +
app/api/shop/shopGoodsRoleCommission/index.ts | 106 +
.../shopGoodsRoleCommission/model/index.ts | 35 +
app/api/shop/shopGoodsSku/index.ts | 118 +
app/api/shop/shopGoodsSku/model/index.ts | 50 +
app/api/shop/shopGoodsSpec/index.ts | 105 +
app/api/shop/shopGoodsSpec/model/index.ts | 29 +
app/api/shop/shopMerchant/index.ts | 106 +
app/api/shop/shopMerchant/model/index.ts | 95 +
app/api/shop/shopMerchantAccount/index.ts | 106 +
.../shop/shopMerchantAccount/model/index.ts | 39 +
app/api/shop/shopMerchantApply/index.ts | 131 +
app/api/shop/shopMerchantApply/model/index.ts | 74 +
app/api/shop/shopMerchantCount/index.ts | 108 +
app/api/shop/shopMerchantCount/model/index.ts | 29 +
app/api/shop/shopMerchantType/index.ts | 108 +
app/api/shop/shopMerchantType/model/index.ts | 30 +
app/api/shop/shopOrder/index.ts | 137 +
app/api/shop/shopOrder/model/index.ts | 183 +
app/api/shop/shopOrderGoods/index.ts | 106 +
app/api/shop/shopOrderGoods/model/index.ts | 71 +
app/api/shop/shopSpec/index.ts | 106 +
app/api/shop/shopSpec/model/index.ts | 38 +
app/api/shop/shopSpecValue/index.ts | 105 +
app/api/shop/shopSpecValue/model/index.ts | 29 +
app/api/shop/shopUser/index.ts | 106 +
app/api/shop/shopUser/model/index.ts | 163 +
app/api/shop/shopUserAddress/index.ts | 106 +
app/api/shop/shopUserAddress/model/index.ts | 49 +
app/api/shop/shopUserCoupon/index.ts | 105 +
app/api/shop/shopUserCoupon/model/index.ts | 61 +
app/api/shop/shopUserReferee/index.ts | 105 +
app/api/shop/shopUserReferee/model/index.ts | 33 +
app/api/shop/spec/index.ts | 106 +
app/api/shop/spec/model/index.ts | 37 +
app/api/shop/specValue/index.ts | 106 +
app/api/shop/specValue/model/index.ts | 33 +
app/api/system/access-key/index.ts | 59 +
app/api/system/access-key/model/index.ts | 20 +
app/api/system/appstore/index.ts | 11 +
app/api/system/appstore/model/index.ts | 13 +
app/api/system/cache/index.ts | 76 +
app/api/system/cache/model/index.ts | 18 +
app/api/system/chat/index.ts | 157 +
app/api/system/chat/model/index.ts | 49 +
app/api/system/chatConversation/index.ts | 106 +
.../system/chatConversation/model/index.ts | 37 +
app/api/system/chatMessage/index.ts | 120 +
app/api/system/chatMessage/model/index.ts | 49 +
app/api/system/comment/index.ts | 106 +
app/api/system/comment/model/index.ts | 33 +
app/api/system/company/index.ts | 162 +
app/api/system/company/model/index.ts | 187 +
app/api/system/companyComment/index.ts | 106 +
app/api/system/companyComment/model/index.ts | 35 +
app/api/system/companyContent/index.ts | 121 +
app/api/system/companyContent/model/index.ts | 25 +
app/api/system/companyGit/index.ts | 106 +
app/api/system/companyGit/model/index.ts | 41 +
app/api/system/companyParameter/index.ts | 106 +
.../system/companyParameter/model/index.ts | 33 +
app/api/system/companyUrl/index.ts | 106 +
app/api/system/companyUrl/model/index.ts | 39 +
app/api/system/dict-data/index.ts | 87 +
app/api/system/dict-data/model/index.ts | 49 +
app/api/system/dict/index.ts | 61 +
app/api/system/dict/model/index.ts | 29 +
app/api/system/dictionary-data/index.ts | 87 +
app/api/system/dictionary-data/model/index.ts | 37 +
app/api/system/dictionary/index.ts | 61 +
app/api/system/dictionary/model/index.ts | 29 +
app/api/system/domain/index.ts | 119 +
app/api/system/domain/model/index.ts | 38 +
app/api/system/environment/index.ts | 125 +
app/api/system/environment/model/index.ts | 25 +
app/api/system/file/index.ts | 250 +
app/api/system/file/model/index.ts | 55 +
app/api/system/login-record/index.ts | 32 +
app/api/system/login-record/model/index.ts | 38 +
app/api/system/menu/index.ts | 172 +
app/api/system/menu/model/index.ts | 67 +
app/api/system/modules/index.ts | 118 +
app/api/system/modules/model/index.ts | 22 +
app/api/system/operation-record/index.ts | 32 +
.../system/operation-record/model/index.ts | 56 +
app/api/system/order/index.ts | 106 +
app/api/system/order/model/index.ts | 98 +
app/api/system/orderGoods/index.ts | 106 +
app/api/system/orderGoods/model/index.ts | 57 +
app/api/system/organization/index.ts | 73 +
app/api/system/organization/model/index.ts | 42 +
app/api/system/parameter/index.ts | 106 +
app/api/system/parameter/model/index.ts | 31 +
app/api/system/payment/index.ts | 178 +
app/api/system/payment/model/index.ts | 59 +
app/api/system/plug/index.ts | 125 +
app/api/system/plug/model/index.ts | 67 +
app/api/system/role/index.ts | 119 +
app/api/system/role/model/index.ts | 27 +
app/api/system/setting/index.ts | 153 +
app/api/system/setting/model/index.ts | 127 +
app/api/system/tenant/index.ts | 201 +
app/api/system/tenant/model/index.ts | 47 +
app/api/system/url/index.ts | 106 +
app/api/system/url/model/index.ts | 37 +
app/api/system/user-collection/index.ts | 106 +
app/api/system/user-collection/model/index.ts | 25 +
app/api/system/user-file/index.ts | 89 +
app/api/system/user-file/model/index.ts | 39 +
app/api/system/user-grade/index.ts | 120 +
app/api/system/user-grade/model/index.ts | 28 +
app/api/system/user-group/index.ts | 120 +
app/api/system/user-group/model/index.ts | 23 +
app/api/system/user/index.ts | 298 +
app/api/system/user/model/count.ts | 15 +
app/api/system/user/model/index.ts | 161 +
app/api/system/userOauth/index.ts | 106 +
app/api/system/userOauth/model/index.ts | 39 +
app/api/system/userRole/index.ts | 48 +
app/api/system/userRole/model/index.ts | 30 +
app/api/system/userVerify/index.ts | 106 +
app/api/system/userVerify/model/index.ts | 54 +
app/api/system/version/index.ts | 119 +
app/api/system/version/model/index.ts | 26 +
app/api/system/website/field/index.ts | 162 +
app/api/system/website/field/model/index.ts | 63 +
app/api/system/website/index.ts | 169 +
app/api/system/website/model/index.ts | 97 +
app/api/system/white-domain/index.ts | 146 +
app/api/system/white-domain/model/index.ts | 27 +
app/api/user/balance-log/index.ts | 104 +
app/api/user/balance-log/model/index.ts | 31 +
app/api/user/feedback/index.ts | 103 +
app/api/user/feedback/model/index.ts | 29 +
app/api/user/grade/index.ts | 114 +
app/api/user/grade/model/index.ts | 28 +
app/api/user/index.ts | 18 +
app/api/user/model/index.ts | 57 +
app/api/user/recharge/export/index.ts | 109 +
app/api/user/recharge/export/model/index.ts | 37 +
app/api/user/recharge/order/index.ts | 134 +
app/api/user/recharge/order/model/index.ts | 34 +
app/api/user/referee/index.ts | 102 +
app/api/user/referee/model/index.ts | 24 +
app/api/user/userCoupon/index.ts | 106 +
app/api/user/userCoupon/model/index.ts | 59 +
app/app.vue | 7 +
app/assets/css/tailwind.css | 3 +
app/components/QrLogin.vue | 220 +
app/components/RichText.vue | 134 +
app/components/SiteFooter.vue | 56 +
app/components/SiteHeader.vue | 557 ++
app/components/console/ConsoleHeader.vue | 169 +
app/components/developer/AppsCenter.vue | 156 +
app/composables/usePageSeo.ts | 37 +
app/composables/useSiteInfo.ts | 8 +
app/config/console-nav.ts | 70 +
app/config/nav.ts | 15 +
app/config/setting.ts | 7 +
app/config/site-nav.ts | 10 +
app/layouts/blank.vue | 8 +
app/layouts/console.vue | 439 +
app/layouts/default.vue | 78 +
app/layouts/site.vue | 246 +
app/pages/apps.vue | 11 +
app/pages/article/[id].vue | 193 +
app/pages/articles.vue | 158 +
app/pages/console/account/index.vue | 347 +
app/pages/console/account/kyc.vue | 456 +
app/pages/console/account/members.vue | 442 +
app/pages/console/account/security.vue | 134 +
app/pages/console/coupons.vue | 20 +
app/pages/console/index.vue | 362 +
app/pages/console/invoices.vue | 425 +
app/pages/console/logout.vue | 32 +
app/pages/console/orders.vue | 394 +
app/pages/console/products.vue | 20 +
app/pages/console/tenant/index.vue | 336 +
app/pages/console/tenant/unopened.vue | 40 +
app/pages/contact.vue | 123 +
app/pages/create-app.vue | 595 ++
app/pages/deploy.vue | 91 +
app/pages/flow.vue | 71 +
app/pages/index.vue | 507 +
app/pages/item/[id].vue | 125 +
app/pages/login.vue | 516 +
app/pages/market.vue | 87 +
app/pages/page/[id].vue | 242 +
app/pages/platform.vue | 115 +
app/pages/profile.vue | 86 +
app/pages/qr-confirm.vue | 252 +
app/plugins/antd.ts | 46 +
app/types/api.ts | 7 +
app/utils/domain.ts | 9 +
app/utils/permission.ts | 247 +
app/utils/request.ts | 101 +
app/utils/token-util.ts | 42 +
docs/WEBSITE_PLAN.md | 37 +
ecosystem.config.cjs | 18 +
eslint.config.mjs | 67 +
modules/fix-tailwind-postcss.ts | 26 +
nuxt.config.ts | 92 +
package-lock.json | 8767 +++++++++++++++++
package.json | 33 +
pnpm-lock.yaml | 8661 ++++++++++++++++
public/favicon.ico | Bin 0 -> 4286 bytes
public/robots.txt | 2 +
scripts/crypto-hash-polyfill.mjs | 17 +
server/api/_file/[...path].ts | 25 +
server/api/_modules/[...path].ts | 26 +
server/api/_server/[...path].ts | 25 +
server/api/cms-navigation.get.ts | 42 +
server/api/cms/cms-navigation.get.ts | 2 +
server/api/cms/cms-website/getSiteInfo.get.ts | 33 +
tailwind.config.cjs | 18 +
tsconfig.json | 6 +
315 files changed, 47072 insertions(+)
create mode 100644 .dockerignore
create mode 100644 .env.example
create mode 100644 .gitignore
create mode 100644 Dockerfile
create mode 100644 README.md
create mode 100644 app/api/cms/cmsAd/index.ts
create mode 100644 app/api/cms/cmsAd/model/index.ts
create mode 100644 app/api/cms/cmsAdRecord/index.ts
create mode 100644 app/api/cms/cmsAdRecord/model/index.ts
create mode 100644 app/api/cms/cmsArticle/index.ts
create mode 100644 app/api/cms/cmsArticle/model/index.ts
create mode 100644 app/api/cms/cmsArticleCategory/index.ts
create mode 100644 app/api/cms/cmsArticleCategory/model/index.ts
create mode 100644 app/api/cms/cmsArticleComment/index.ts
create mode 100644 app/api/cms/cmsArticleComment/model/index.ts
create mode 100644 app/api/cms/cmsArticleContent/index.ts
create mode 100644 app/api/cms/cmsArticleContent/model/index.ts
create mode 100644 app/api/cms/cmsArticleCount/index.ts
create mode 100644 app/api/cms/cmsArticleCount/model/index.ts
create mode 100644 app/api/cms/cmsArticleLike/index.ts
create mode 100644 app/api/cms/cmsArticleLike/model/index.ts
create mode 100644 app/api/cms/cmsDesign/index.ts
create mode 100644 app/api/cms/cmsDesign/model/index.ts
create mode 100644 app/api/cms/cmsDomain/index.ts
create mode 100644 app/api/cms/cmsDomain/model/index.ts
create mode 100644 app/api/cms/cmsForm/index.ts
create mode 100644 app/api/cms/cmsForm/model/index.ts
create mode 100644 app/api/cms/cmsFormRecord/index.ts
create mode 100644 app/api/cms/cmsFormRecord/model/index.ts
create mode 100644 app/api/cms/cmsLang/index.ts
create mode 100644 app/api/cms/cmsLang/model/index.ts
create mode 100644 app/api/cms/cmsLangLog/index.ts
create mode 100644 app/api/cms/cmsLangLog/model/index.ts
create mode 100644 app/api/cms/cmsLink/index.ts
create mode 100644 app/api/cms/cmsLink/model/index.ts
create mode 100644 app/api/cms/cmsModel/index.ts
create mode 100644 app/api/cms/cmsModel/model/index.ts
create mode 100644 app/api/cms/cmsNavigation/index.ts
create mode 100644 app/api/cms/cmsNavigation/model/index.ts
create mode 100644 app/api/cms/cmsOrder/index.ts
create mode 100644 app/api/cms/cmsOrder/model/index.ts
create mode 100644 app/api/cms/cmsStatistics/index.ts
create mode 100644 app/api/cms/cmsStatistics/model/index.ts
create mode 100644 app/api/cms/cmsTemplate/index.ts
create mode 100644 app/api/cms/cmsTemplate/model/index.ts
create mode 100644 app/api/cms/cmsWebsite/index.ts
create mode 100644 app/api/cms/cmsWebsite/model/index.ts
create mode 100644 app/api/cms/cmsWebsiteField/index.ts
create mode 100644 app/api/cms/cmsWebsiteField/model/index.ts
create mode 100644 app/api/cms/cmsWebsiteSetting/index.ts
create mode 100644 app/api/cms/cmsWebsiteSetting/model/index.ts
create mode 100644 app/api/cms/link/index.ts
create mode 100644 app/api/cms/link/model/index.ts
create mode 100644 app/api/index.ts
create mode 100644 app/api/layout/index.ts
create mode 100644 app/api/layout/model/index.ts
create mode 100644 app/api/miniprogram/index.ts
create mode 100644 app/api/passport/login/index.ts
create mode 100644 app/api/passport/login/model/index.ts
create mode 100644 app/api/passport/qrLogin/index.ts
create mode 100644 app/api/sdy/sdyDealerOrder/index.ts
create mode 100644 app/api/sdy/sdyDealerOrder/model/index.ts
create mode 100644 app/api/shop/shopCommissionRole/index.ts
create mode 100644 app/api/shop/shopCommissionRole/model/index.ts
create mode 100644 app/api/shop/shopCoupon/index.ts
create mode 100644 app/api/shop/shopCoupon/model/index.ts
create mode 100644 app/api/shop/shopCouponApplyCate/model/index.ts
create mode 100644 app/api/shop/shopCouponApplyItem/model/index.ts
create mode 100644 app/api/shop/shopDealerApply/index.ts
create mode 100644 app/api/shop/shopDealerApply/model/index.ts
create mode 100644 app/api/shop/shopDealerCapital/index.ts
create mode 100644 app/api/shop/shopDealerCapital/model/index.ts
create mode 100644 app/api/shop/shopDealerOrder/index.ts
create mode 100644 app/api/shop/shopDealerOrder/model/index.ts
create mode 100644 app/api/shop/shopDealerPoster/index.ts
create mode 100644 app/api/shop/shopDealerPoster/model/index.ts
create mode 100644 app/api/shop/shopDealerRecord/index.ts
create mode 100644 app/api/shop/shopDealerRecord/model/index.ts
create mode 100644 app/api/shop/shopDealerReferee/index.ts
create mode 100644 app/api/shop/shopDealerReferee/model/index.ts
create mode 100644 app/api/shop/shopDealerSetting/index.ts
create mode 100644 app/api/shop/shopDealerSetting/model/index.ts
create mode 100644 app/api/shop/shopDealerUser/index.ts
create mode 100644 app/api/shop/shopDealerUser/model/index.ts
create mode 100644 app/api/shop/shopDealerWithdraw/index.ts
create mode 100644 app/api/shop/shopDealerWithdraw/model/index.ts
create mode 100644 app/api/shop/shopExpress/index.ts
create mode 100644 app/api/shop/shopExpress/model/index.ts
create mode 100644 app/api/shop/shopExpressTemplate/index.ts
create mode 100644 app/api/shop/shopExpressTemplate/model/index.ts
create mode 100644 app/api/shop/shopExpressTemplateDetail/index.ts
create mode 100644 app/api/shop/shopExpressTemplateDetail/model/index.ts
create mode 100644 app/api/shop/shopGift/index.ts
create mode 100644 app/api/shop/shopGift/model/index.ts
create mode 100644 app/api/shop/shopGoods/index.ts
create mode 100644 app/api/shop/shopGoods/model/index.ts
create mode 100644 app/api/shop/shopGoodsCategory/index.ts
create mode 100644 app/api/shop/shopGoodsCategory/model/index.ts
create mode 100644 app/api/shop/shopGoodsCoupon/index.ts
create mode 100644 app/api/shop/shopGoodsCoupon/model/index.ts
create mode 100644 app/api/shop/shopGoodsRoleCommission/index.ts
create mode 100644 app/api/shop/shopGoodsRoleCommission/model/index.ts
create mode 100644 app/api/shop/shopGoodsSku/index.ts
create mode 100644 app/api/shop/shopGoodsSku/model/index.ts
create mode 100644 app/api/shop/shopGoodsSpec/index.ts
create mode 100644 app/api/shop/shopGoodsSpec/model/index.ts
create mode 100644 app/api/shop/shopMerchant/index.ts
create mode 100644 app/api/shop/shopMerchant/model/index.ts
create mode 100644 app/api/shop/shopMerchantAccount/index.ts
create mode 100644 app/api/shop/shopMerchantAccount/model/index.ts
create mode 100644 app/api/shop/shopMerchantApply/index.ts
create mode 100644 app/api/shop/shopMerchantApply/model/index.ts
create mode 100644 app/api/shop/shopMerchantCount/index.ts
create mode 100644 app/api/shop/shopMerchantCount/model/index.ts
create mode 100644 app/api/shop/shopMerchantType/index.ts
create mode 100644 app/api/shop/shopMerchantType/model/index.ts
create mode 100644 app/api/shop/shopOrder/index.ts
create mode 100644 app/api/shop/shopOrder/model/index.ts
create mode 100644 app/api/shop/shopOrderGoods/index.ts
create mode 100644 app/api/shop/shopOrderGoods/model/index.ts
create mode 100644 app/api/shop/shopSpec/index.ts
create mode 100644 app/api/shop/shopSpec/model/index.ts
create mode 100644 app/api/shop/shopSpecValue/index.ts
create mode 100644 app/api/shop/shopSpecValue/model/index.ts
create mode 100644 app/api/shop/shopUser/index.ts
create mode 100644 app/api/shop/shopUser/model/index.ts
create mode 100644 app/api/shop/shopUserAddress/index.ts
create mode 100644 app/api/shop/shopUserAddress/model/index.ts
create mode 100644 app/api/shop/shopUserCoupon/index.ts
create mode 100644 app/api/shop/shopUserCoupon/model/index.ts
create mode 100644 app/api/shop/shopUserReferee/index.ts
create mode 100644 app/api/shop/shopUserReferee/model/index.ts
create mode 100644 app/api/shop/spec/index.ts
create mode 100644 app/api/shop/spec/model/index.ts
create mode 100644 app/api/shop/specValue/index.ts
create mode 100644 app/api/shop/specValue/model/index.ts
create mode 100644 app/api/system/access-key/index.ts
create mode 100644 app/api/system/access-key/model/index.ts
create mode 100644 app/api/system/appstore/index.ts
create mode 100644 app/api/system/appstore/model/index.ts
create mode 100644 app/api/system/cache/index.ts
create mode 100644 app/api/system/cache/model/index.ts
create mode 100644 app/api/system/chat/index.ts
create mode 100644 app/api/system/chat/model/index.ts
create mode 100644 app/api/system/chatConversation/index.ts
create mode 100644 app/api/system/chatConversation/model/index.ts
create mode 100644 app/api/system/chatMessage/index.ts
create mode 100644 app/api/system/chatMessage/model/index.ts
create mode 100644 app/api/system/comment/index.ts
create mode 100644 app/api/system/comment/model/index.ts
create mode 100644 app/api/system/company/index.ts
create mode 100644 app/api/system/company/model/index.ts
create mode 100644 app/api/system/companyComment/index.ts
create mode 100644 app/api/system/companyComment/model/index.ts
create mode 100644 app/api/system/companyContent/index.ts
create mode 100644 app/api/system/companyContent/model/index.ts
create mode 100644 app/api/system/companyGit/index.ts
create mode 100644 app/api/system/companyGit/model/index.ts
create mode 100644 app/api/system/companyParameter/index.ts
create mode 100644 app/api/system/companyParameter/model/index.ts
create mode 100644 app/api/system/companyUrl/index.ts
create mode 100644 app/api/system/companyUrl/model/index.ts
create mode 100644 app/api/system/dict-data/index.ts
create mode 100644 app/api/system/dict-data/model/index.ts
create mode 100644 app/api/system/dict/index.ts
create mode 100644 app/api/system/dict/model/index.ts
create mode 100644 app/api/system/dictionary-data/index.ts
create mode 100644 app/api/system/dictionary-data/model/index.ts
create mode 100644 app/api/system/dictionary/index.ts
create mode 100644 app/api/system/dictionary/model/index.ts
create mode 100644 app/api/system/domain/index.ts
create mode 100644 app/api/system/domain/model/index.ts
create mode 100644 app/api/system/environment/index.ts
create mode 100644 app/api/system/environment/model/index.ts
create mode 100644 app/api/system/file/index.ts
create mode 100644 app/api/system/file/model/index.ts
create mode 100644 app/api/system/login-record/index.ts
create mode 100644 app/api/system/login-record/model/index.ts
create mode 100644 app/api/system/menu/index.ts
create mode 100644 app/api/system/menu/model/index.ts
create mode 100644 app/api/system/modules/index.ts
create mode 100644 app/api/system/modules/model/index.ts
create mode 100644 app/api/system/operation-record/index.ts
create mode 100644 app/api/system/operation-record/model/index.ts
create mode 100644 app/api/system/order/index.ts
create mode 100644 app/api/system/order/model/index.ts
create mode 100644 app/api/system/orderGoods/index.ts
create mode 100644 app/api/system/orderGoods/model/index.ts
create mode 100644 app/api/system/organization/index.ts
create mode 100644 app/api/system/organization/model/index.ts
create mode 100644 app/api/system/parameter/index.ts
create mode 100644 app/api/system/parameter/model/index.ts
create mode 100644 app/api/system/payment/index.ts
create mode 100644 app/api/system/payment/model/index.ts
create mode 100644 app/api/system/plug/index.ts
create mode 100644 app/api/system/plug/model/index.ts
create mode 100644 app/api/system/role/index.ts
create mode 100644 app/api/system/role/model/index.ts
create mode 100644 app/api/system/setting/index.ts
create mode 100644 app/api/system/setting/model/index.ts
create mode 100644 app/api/system/tenant/index.ts
create mode 100644 app/api/system/tenant/model/index.ts
create mode 100644 app/api/system/url/index.ts
create mode 100644 app/api/system/url/model/index.ts
create mode 100644 app/api/system/user-collection/index.ts
create mode 100644 app/api/system/user-collection/model/index.ts
create mode 100644 app/api/system/user-file/index.ts
create mode 100644 app/api/system/user-file/model/index.ts
create mode 100644 app/api/system/user-grade/index.ts
create mode 100644 app/api/system/user-grade/model/index.ts
create mode 100644 app/api/system/user-group/index.ts
create mode 100644 app/api/system/user-group/model/index.ts
create mode 100644 app/api/system/user/index.ts
create mode 100644 app/api/system/user/model/count.ts
create mode 100644 app/api/system/user/model/index.ts
create mode 100644 app/api/system/userOauth/index.ts
create mode 100644 app/api/system/userOauth/model/index.ts
create mode 100644 app/api/system/userRole/index.ts
create mode 100644 app/api/system/userRole/model/index.ts
create mode 100644 app/api/system/userVerify/index.ts
create mode 100644 app/api/system/userVerify/model/index.ts
create mode 100644 app/api/system/version/index.ts
create mode 100644 app/api/system/version/model/index.ts
create mode 100644 app/api/system/website/field/index.ts
create mode 100644 app/api/system/website/field/model/index.ts
create mode 100644 app/api/system/website/index.ts
create mode 100644 app/api/system/website/model/index.ts
create mode 100644 app/api/system/white-domain/index.ts
create mode 100644 app/api/system/white-domain/model/index.ts
create mode 100644 app/api/user/balance-log/index.ts
create mode 100644 app/api/user/balance-log/model/index.ts
create mode 100644 app/api/user/feedback/index.ts
create mode 100644 app/api/user/feedback/model/index.ts
create mode 100644 app/api/user/grade/index.ts
create mode 100644 app/api/user/grade/model/index.ts
create mode 100644 app/api/user/index.ts
create mode 100644 app/api/user/model/index.ts
create mode 100644 app/api/user/recharge/export/index.ts
create mode 100644 app/api/user/recharge/export/model/index.ts
create mode 100644 app/api/user/recharge/order/index.ts
create mode 100644 app/api/user/recharge/order/model/index.ts
create mode 100644 app/api/user/referee/index.ts
create mode 100644 app/api/user/referee/model/index.ts
create mode 100644 app/api/user/userCoupon/index.ts
create mode 100644 app/api/user/userCoupon/model/index.ts
create mode 100644 app/app.vue
create mode 100644 app/assets/css/tailwind.css
create mode 100644 app/components/QrLogin.vue
create mode 100644 app/components/RichText.vue
create mode 100644 app/components/SiteFooter.vue
create mode 100644 app/components/SiteHeader.vue
create mode 100644 app/components/console/ConsoleHeader.vue
create mode 100644 app/components/developer/AppsCenter.vue
create mode 100644 app/composables/usePageSeo.ts
create mode 100644 app/composables/useSiteInfo.ts
create mode 100644 app/config/console-nav.ts
create mode 100644 app/config/nav.ts
create mode 100644 app/config/setting.ts
create mode 100644 app/config/site-nav.ts
create mode 100644 app/layouts/blank.vue
create mode 100644 app/layouts/console.vue
create mode 100644 app/layouts/default.vue
create mode 100644 app/layouts/site.vue
create mode 100644 app/pages/apps.vue
create mode 100644 app/pages/article/[id].vue
create mode 100644 app/pages/articles.vue
create mode 100644 app/pages/console/account/index.vue
create mode 100644 app/pages/console/account/kyc.vue
create mode 100644 app/pages/console/account/members.vue
create mode 100644 app/pages/console/account/security.vue
create mode 100644 app/pages/console/coupons.vue
create mode 100644 app/pages/console/index.vue
create mode 100644 app/pages/console/invoices.vue
create mode 100644 app/pages/console/logout.vue
create mode 100644 app/pages/console/orders.vue
create mode 100644 app/pages/console/products.vue
create mode 100644 app/pages/console/tenant/index.vue
create mode 100644 app/pages/console/tenant/unopened.vue
create mode 100644 app/pages/contact.vue
create mode 100644 app/pages/create-app.vue
create mode 100644 app/pages/deploy.vue
create mode 100644 app/pages/flow.vue
create mode 100644 app/pages/index.vue
create mode 100644 app/pages/item/[id].vue
create mode 100644 app/pages/login.vue
create mode 100644 app/pages/market.vue
create mode 100644 app/pages/page/[id].vue
create mode 100644 app/pages/platform.vue
create mode 100644 app/pages/profile.vue
create mode 100644 app/pages/qr-confirm.vue
create mode 100644 app/plugins/antd.ts
create mode 100644 app/types/api.ts
create mode 100644 app/utils/domain.ts
create mode 100644 app/utils/permission.ts
create mode 100644 app/utils/request.ts
create mode 100644 app/utils/token-util.ts
create mode 100644 docs/WEBSITE_PLAN.md
create mode 100644 ecosystem.config.cjs
create mode 100644 eslint.config.mjs
create mode 100644 modules/fix-tailwind-postcss.ts
create mode 100644 nuxt.config.ts
create mode 100644 package-lock.json
create mode 100644 package.json
create mode 100644 pnpm-lock.yaml
create mode 100644 public/favicon.ico
create mode 100644 public/robots.txt
create mode 100644 scripts/crypto-hash-polyfill.mjs
create mode 100644 server/api/_file/[...path].ts
create mode 100644 server/api/_modules/[...path].ts
create mode 100644 server/api/_server/[...path].ts
create mode 100644 server/api/cms-navigation.get.ts
create mode 100644 server/api/cms/cms-navigation.get.ts
create mode 100644 server/api/cms/cms-website/getSiteInfo.get.ts
create mode 100644 tailwind.config.cjs
create mode 100644 tsconfig.json
diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 0000000..bdece4d
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,15 @@
+.git
+.idea
+.nuxt
+.output
+node_modules
+
+.env
+.env.*
+
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+pnpm-debug.log*
+
+归档.zip
diff --git a/.env.example b/.env.example
new file mode 100644
index 0000000..01824b2
--- /dev/null
+++ b/.env.example
@@ -0,0 +1,12 @@
+# Tenant / headers
+# - TenantId header will be sent on every request.
+# - Authorization header is taken from client storage (AccessToken) and forwarded by the Nuxt proxy.
+NUXT_PUBLIC_TENANT_ID=10584
+
+# Upstream APIs (required)
+NUXT_PUBLIC_SERVER_API_BASE=https://server.websoft.top/api
+NUXT_PUBLIC_MODULES_API_BASE=https://cms-api.websoft.top/api
+
+# Optional (only if file server is not the same origin as SERVER_API_BASE)
+# Defaults to the origin of `NUXT_PUBLIC_SERVER_API_BASE` (e.g. https://server.websoft.top)
+# NUXT_PUBLIC_FILE_SERVER_BASE=https://file.wsdns.cn
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..ea1e3d0
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,26 @@
+# Nuxt dev/build outputs
+.output
+.data
+.nuxt
+.nitro
+.cache
+dist
+
+# Node dependencies
+node_modules
+
+# Logs
+logs
+*.log
+.pm2
+
+# Misc
+.DS_Store
+.fleet
+.idea
+
+# Local env files
+.env
+.env.*
+!.env.example
+/.npm-cache/
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..cbe6572
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,33 @@
+# syntax=docker/dockerfile:1.7
+ARG NODE_VERSION=20.19.0
+
+FROM node:${NODE_VERSION}-slim AS build
+WORKDIR /app
+
+ENV NODE_ENV=development \
+ NUXT_TELEMETRY_DISABLED=1
+
+COPY package.json package-lock.json ./
+COPY scripts ./scripts
+
+RUN npm ci --ignore-scripts
+
+COPY . .
+
+RUN npm rebuild
+RUN npm run postinstall
+RUN npm run build
+
+FROM node:${NODE_VERSION}-slim AS runner
+WORKDIR /app
+
+ENV NODE_ENV=production \
+ HOST=0.0.0.0 \
+ PORT=3000 \
+ NUXT_TELEMETRY_DISABLED=1
+
+COPY --from=build /app/.output ./.output
+
+EXPOSE 3000
+
+CMD ["node", ".output/server/index.mjs"]
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..65704d2
--- /dev/null
+++ b/README.md
@@ -0,0 +1,193 @@
+
+
🌐 WebSoftAdmin
+
基于 Vue 3 + Ant Design Vue 的企业级后台管理系统
+
+
+
+
+
+
+
+
+
+
+## 📖 项目简介
+
+WebSoftAdmin 是一个基于 **Vue 3 + Ant Design Vue** 构建的现代化企业级后台管理系统,采用最新的前端技术栈:
+
+- **前端框架**:Vue 3 + TypeScript + Vite
+- **UI 组件库**:Ant Design Vue 3.x
+- **富文本编辑器**:TinyMCE(支持图片/视频上传、一键排版)
+- **图表库**:ECharts + G2
+- **工具库**:Lodash、Day.js、CryptoJS
+
+
+
+## 项目演示
+| 后台管理系统 | https://mp.websoft.top |
+|--------|-------------------------------------------------------------------------------------------------------------------------------------|
+| 账号密码 | [立即注册](https://mp.websoft.top/register/?inviteCode=github) |
+| 关注公众号 |  |
+
+
+
+
+## 🛠️ 技术栈
+
+### 核心技术
+| 技术 | 版本 | 说明 |
+|------|------|------|
+| Vue | 3.x | 渐进式 JavaScript 框架 |
+| TypeScript | 4.x | JavaScript 的超集 |
+| Vite | 4.x | 下一代前端构建工具 |
+| Ant Design Vue | 3.2.11 | 企业级 UI 设计语言 |
+| EleAdmin Pro | 1.10.1 | 企业级组件库 |
+
+### 功能组件
+- **TinyMCE** - 富文本编辑器,支持图片/视频上传
+- **ECharts** - 数据可视化图表库
+- **CropperJS** - 图片裁剪组件
+- **ExcelJS** - Excel 文件处理
+- **Ali OSS** - 阿里云对象存储
+
+## 📋 环境要求
+
+### 基础环境
+- 🟢 **Node.js 16+**
+- 📦 **npm 8+ / yarn 1.22+**
+- 🌐 **现代浏览器**(Chrome 63+、Firefox、Safari、Edge)
+
+### 开发工具
+- **推荐**:VS Code / WebStorm
+- **插件**:Vetur / Volar(Vue 3 支持)
+
+## 🚀 快速开始
+
+### 1. 克隆项目
+```bash
+git clone https://github.com/websoft-top/mp-vue.git
+cd mp-vue
+```
+
+### 2. 安装依赖
+```bash
+# 使用 npm
+npm install
+
+# 或使用 yarn
+yarn install
+```
+
+### 3. 配置环境变量
+```bash
+# 复制环境变量示例文件
+cp .env.example .env
+
+# 编辑 .env 文件,填入您的配置信息
+# 注意:请不要将 .env 文件提交到版本控制系统
+```
+
+### 4. 启动开发服务器
+```bash
+# 开发模式
+npm run dev
+
+# 或
+yarn dev
+```
+
+访问 `http://localhost:3000` 即可看到管理后台。
+
+### 5. 构建生产版本
+```bash
+# 生产构建
+npm run build
+
+# 预览构建结果
+npm run serve
+```
+
+## 🧩 常见问题
+
+### ERROR: EMFILE: too many open files, watch
+
+- 项目已在 `nuxt.config.ts` 中配置忽略 `node_modules/.nuxt/.output` 等目录以减少监听数量。
+- 若仍出现该错误,可在启动前临时提高文件句柄上限后重试:`ulimit -n 8192 && npm run dev`。
+
+## ⚙️ 环境变量配置
+
+项目使用环境变量来管理敏感信息和配置。请按照以下步骤配置:
+
+### 必需配置
+```bash
+# API 配置
+VITE_API_URL=https://your-api.com/api # 后端 API 地址
+VITE_SERVER_API_URL=https://your-server.com/api # 服务端 API 地址
+VITE_FILE_SERVER=https://your-file-server.com # 文件服务器地址
+
+# 应用配置
+VITE_APP_SECRET=your_app_secret # 应用密钥
+VITE_TENANT_ID=your_tenant_id # 租户 ID
+```
+
+### 可选配置
+```bash
+# 高德地图 (如需使用地图功能)
+VITE_MAP_KEY=your_map_key # 高德地图 Key
+VITE_MAP_CODE=your_map_security_code # 高德地图安全密钥
+
+# WebSoftAdmin 授权 (商业版功能)
+VITE_LICENSE_CODE=your_license_code # 授权码
+```
+
+### 获取配置信息
+- **高德地图密钥**:访问 [高德开放平台](https://lbs.amap.com/) 申请
+- **WebSoftAdmin 授权码**:联系 [官方网站](https://websoft.top/) 获取
+- **其他 API 配置**:根据您的后端服务配置
+
+## 🎯 核心功能
+
+### 📝 内容管理系统
+- **文章管理**:支持富文本编辑、图片/视频上传
+- **一键排版**:智能文章格式优化,包含10种专业排版样式
+- **媒体库**:图片/视频文件管理,支持分组和搜索
+- **首行缩进**:中文段落格式智能切换
+
+### 🛒 商城管理
+- **商品管理**:商品信息编辑、规格设置
+- **订单管理**:订单流程跟踪
+- **库存管理**:商品库存监控
+
+### 👥 用户权限
+- **用户管理**:用户信息维护
+- **角色权限**:基于角色的访问控制
+- **菜单管理**:动态菜单配置
+
+## 🎨 富文本编辑器特色功能
+
+### 📸 媒体上传
+- **图片上传**:支持拖拽、粘贴、文件选择
+- **视频上传**:支持多种视频格式
+- **媒体库**:统一的媒体文件管理
+- **OSS 存储**:阿里云对象存储集成
+
+### ✨ 智能排版
+- **一键排版**:10种专业排版优化
+- **首行缩进**:中文段落格式切换
+- **样式优化**:标题、段落、列表、表格等元素美化
+- **响应式**:适配不同屏幕尺寸
+
+## 🏗️ 项目结构
+
+```
+src/
+├── components/ # 公共组件
+├── views/ # 页面组件
+│ ├── cms/ # 内容管理
+│ ├── shop/ # 商城管理
+│ └── system/ # 系统管理
+├── router/ # 路由配置
+├── store/ # 状态管理
+├── utils/ # 工具函数
+└── assets/ # 静态资源
+```
diff --git a/app/api/cms/cmsAd/index.ts b/app/api/cms/cmsAd/index.ts
new file mode 100644
index 0000000..c465bd4
--- /dev/null
+++ b/app/api/cms/cmsAd/index.ts
@@ -0,0 +1,106 @@
+import request from '@/utils/request';
+import type { ApiResult, PageResult } from '@/api';
+import type { CmsAd, CmsAdParam } from './model';
+import { MODULES_API_URL } from '@/config/setting';
+
+/**
+ * 分页查询广告位
+ */
+export async function pageCmsAd(params: CmsAdParam) {
+ const res = await request.get>>(
+ MODULES_API_URL + '/cms/cms-ad/page',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询广告位列表
+ */
+export async function listCmsAd(params?: CmsAdParam) {
+ const res = await request.get>(
+ MODULES_API_URL + '/cms/cms-ad',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 添加广告位
+ */
+export async function addCmsAd(data: CmsAd) {
+ const res = await request.post>(
+ MODULES_API_URL + '/cms/cms-ad',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 修改广告位
+ */
+export async function updateCmsAd(data: CmsAd) {
+ const res = await request.put>(
+ MODULES_API_URL + '/cms/cms-ad',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除广告位
+ */
+export async function removeCmsAd(id?: number) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/cms/cms-ad/' + id
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量删除广告位
+ */
+export async function removeBatchCmsAd(data: (number | undefined)[]) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/cms/cms-ad/batch',
+ {
+ data
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 根据id查询广告位
+ */
+export async function getCmsAd(id: number) {
+ const res = await request.get>(
+ MODULES_API_URL + '/cms/cms-ad/' + id
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/app/api/cms/cmsAd/model/index.ts b/app/api/cms/cmsAd/model/index.ts
new file mode 100644
index 0000000..104c9d0
--- /dev/null
+++ b/app/api/cms/cmsAd/model/index.ts
@@ -0,0 +1,65 @@
+import type { PageParam } from '@/api';
+
+/**
+ * 广告位
+ */
+export interface CmsAd {
+ // ID
+ adId?: number;
+ // 类型
+ type?: number;
+ // 唯一标识
+ code?: string;
+ // 栏目分类
+ categoryId?: number;
+ // 栏目名称
+ categoryName?: string;
+ // 页面ID
+ designId?: number;
+ // 广告类型
+ adType?: string;
+ // 广告位名称
+ name?: string;
+ // 宽
+ width?: string;
+ // 高
+ height?: string;
+ // css样式
+ style?: string;
+ // 广告图片
+ images?: any;
+ // 广告图片
+ imageList?: any;
+ // 路由/链接地址
+ path?: string;
+ // 用户ID
+ userId?: number;
+ // 语言
+ lang?: string;
+ // 页面ID
+ pageId?: number;
+ // 页面名称
+ pageName?: string;
+ // 排序(数字越小越靠前)
+ sortNumber?: number;
+ // 备注
+ comments?: string;
+ // 状态, 0正常, 1冻结
+ status?: number;
+ // 是否删除, 0否, 1是
+ deleted?: number;
+ // 租户id
+ tenantId?: number;
+ // 创建时间
+ createTime?: string;
+ merchantId?: number;
+}
+
+/**
+ * 广告位搜索条件
+ */
+export interface CmsAdParam extends PageParam {
+ adId?: number;
+ pageId?: number;
+ keywords?: string;
+}
diff --git a/app/api/cms/cmsAdRecord/index.ts b/app/api/cms/cmsAdRecord/index.ts
new file mode 100644
index 0000000..840e6d0
--- /dev/null
+++ b/app/api/cms/cmsAdRecord/index.ts
@@ -0,0 +1,106 @@
+import request from '@/utils/request';
+import type { ApiResult, PageResult } from '@/api';
+import type { CmsAdRecord, CmsAdRecordParam } from './model';
+import { MODULES_API_URL } from '@/config/setting';
+
+/**
+ * 分页查询广告图片
+ */
+export async function pageCmsAdRecord(params: CmsAdRecordParam) {
+ const res = await request.get>>(
+ MODULES_API_URL + '/cms/cms-ad-record/page',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询广告图片列表
+ */
+export async function listCmsAdRecord(params?: CmsAdRecordParam) {
+ const res = await request.get>(
+ MODULES_API_URL + '/cms/cms-ad-record',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 添加广告图片
+ */
+export async function addCmsAdRecord(data: CmsAdRecord) {
+ const res = await request.post>(
+ MODULES_API_URL + '/cms/cms-ad-record',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 修改广告图片
+ */
+export async function updateCmsAdRecord(data: CmsAdRecord) {
+ const res = await request.put>(
+ MODULES_API_URL + '/cms/cms-ad-record',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除广告图片
+ */
+export async function removeCmsAdRecord(id?: number) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/cms/cms-ad-record/' + id
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量删除广告图片
+ */
+export async function removeBatchCmsAdRecord(data: (number | undefined)[]) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/cms/cms-ad-record/batch',
+ {
+ data
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 根据id查询广告图片
+ */
+export async function getCmsAdRecord(id: number) {
+ const res = await request.get>(
+ MODULES_API_URL + '/cms/cms-ad-record/' + id
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/app/api/cms/cmsAdRecord/model/index.ts b/app/api/cms/cmsAdRecord/model/index.ts
new file mode 100644
index 0000000..0ecf5d1
--- /dev/null
+++ b/app/api/cms/cmsAdRecord/model/index.ts
@@ -0,0 +1,35 @@
+import type { PageParam } from '@/api';
+
+/**
+ * 广告图片
+ */
+export interface CmsAdRecord {
+ // ID
+ adRecordId?: number;
+ // 广告标题
+ title?: string;
+ // 图片地址
+ path?: string;
+ // 链接地址
+ url?: string;
+ // 广告位ID
+ adId?: number;
+ // 排序(数字越小越靠前)
+ sortNumber?: number;
+ // 备注
+ comments?: string;
+ // 状态, 0正常, 1冻结
+ status?: number;
+ // 租户id
+ tenantId?: number;
+ // 创建时间
+ createTime?: string;
+}
+
+/**
+ * 广告图片搜索条件
+ */
+export interface CmsAdRecordParam extends PageParam {
+ adRecordId?: number;
+ keywords?: string;
+}
diff --git a/app/api/cms/cmsArticle/index.ts b/app/api/cms/cmsArticle/index.ts
new file mode 100644
index 0000000..2ce4d7d
--- /dev/null
+++ b/app/api/cms/cmsArticle/index.ts
@@ -0,0 +1,159 @@
+import request from '@/utils/request';
+import type {ApiResult, PageResult} from '@/api';
+import type {CmsArticle, CmsArticleParam} from './model';
+
+/**
+ * 分页查询文章
+ */
+export async function pageCmsArticle(params: CmsArticleParam) {
+ const res = await request.get>>(
+ '/cms/cms-article/page',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询文章列表
+ */
+export async function listCmsArticle(params?: CmsArticleParam) {
+ const res = await request.get>(
+ '/cms/cms-article',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 添加文章
+ */
+export async function addCmsArticle(data: CmsArticle) {
+ const res = await request.post>(
+ '/cms/cms-article',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 修改文章
+ */
+export async function updateCmsArticle(data: CmsArticle) {
+ const res = await request.put>(
+ '/cms/cms-article',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量修改文章
+ */
+export async function updateBatchCmsArticle(data: any) {
+ const res = await request.put>(
+ '/cms/cms-article/batch',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除文章
+ */
+export async function removeCmsArticle(id?: number) {
+ const res = await request.delete>(
+ '/cms/cms-article/' + id
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量删除文章
+ */
+export async function removeBatchCmsArticle(data: (number | undefined)[]) {
+ const res = await request.delete>(
+ '/cms/cms-article/batch',
+ {
+ data
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 根据id查询文章
+ */
+export async function getCmsArticle(id: number) {
+ const res = await request.get>(
+ '/cms/cms-article/' + id
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 根据code查询文章
+ */
+export async function getByCode(code: string) {
+ const res = await request.get>(
+ '/cms/cms-article/getByCode/' + code
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+export async function getCount(params: CmsArticleParam) {
+ const res = await request.get('/cms/cms-article/data', {
+ params
+ });
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+
+/**
+ * 文章批量导入
+ */
+export async function importArticles(file: File) {
+ const formData = new FormData();
+ formData.append('file', file);
+ const res = await request.post>(
+ '/cms/cms-article/import',
+ formData
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/app/api/cms/cmsArticle/model/index.ts b/app/api/cms/cmsArticle/model/index.ts
new file mode 100644
index 0000000..abb131a
--- /dev/null
+++ b/app/api/cms/cmsArticle/model/index.ts
@@ -0,0 +1,134 @@
+import type { PageParam } from '@/api';
+
+/**
+ * 文章
+ */
+export interface CmsArticle {
+ // 文章ID
+ articleId?: number;
+ // 文章标题
+ title?: string;
+ // 文章类型 0常规 1视频
+ type?: number;
+ // 文章模型
+ model?: string;
+ // 文章编号
+ code?: string;
+ // 文章详情
+ detail?: string;
+ // 列表显示方式(10小图展示 20大图展示)
+ showType?: number;
+ // 话题
+ topic?: string;
+ // 标签
+ tags?: any;
+ // 父级ID
+ parentId?: number;
+ parentName?: string;
+ // 栏目ID
+ categoryId?: number;
+ // 栏目名称
+ categoryName?: string;
+ // 封面图
+ image?: string;
+ // 来源
+ source?: string;
+ // 摘要
+ overview?: string;
+ // 虚拟阅读量(仅用作展示)
+ virtualViews?: number;
+ // 实际阅读量
+ actualViews?: number;
+ // 浏览权限(0公开 1会员 2密码)
+ permission?: number;
+ // 访问密码
+ password?: string;
+ // 确认密码
+ password2?: string;
+ // 发布来源客户端 (APP、H5、小程序等)
+ platform?: string;
+ // 文章附件
+ files?: string;
+ // 视频地址
+ video?: string;
+ // 接受的文件类型
+ accept?: string;
+ // 经度
+ longitude?: string;
+ // 纬度
+ latitude?: string;
+ // 所在省份
+ province?: string;
+ // 所在城市
+ city?: string;
+ // 所在辖区
+ region?: string;
+ // 街道地址
+ address?: string;
+ // 点赞数
+ likes?: number;
+ // 评论数
+ commentNumbers?: number;
+ // 提醒谁看
+ toUsers?: string;
+ // 文章内容
+ content?: string;
+ // 编辑器类型
+ editor?: number;
+ // PDF地址
+ pdfUrl?: string;
+ // 用户ID
+ userId?: number;
+ // 商户ID
+ merchantId?: number;
+ // 作者
+ author?: string;
+ // 语言
+ lang?: string;
+ // 是否推荐
+ recommend?: number;
+ // 是否同步翻译其他语言版本
+ translation?: boolean;
+ // 排序(数字越小越靠前)
+ sortNumber?: number;
+ // 备注
+ comments?: string;
+ // 状态, 0已发布, 1待审核 2已驳回 3违规内容
+ status?: number;
+ // 状态描述
+ statusText?: string;
+ // 是否删除, 0否, 1是
+ deleted?: number;
+ // 租户id
+ tenantId?: number;
+ // 创建时间
+ createTime?: string;
+ // 修改时间
+ updateTime?: string;
+ // 是否移动端
+ isMobile?: boolean;
+ // 二维码
+ qrcode?: string;
+ // 文章路径
+ url?: string;
+}
+
+/**
+ * 文章搜索条件
+ */
+export interface CmsArticleParam extends PageParam {
+ articleId?: number;
+ // 栏目/导航ID(前台常用)
+ categoryId?: number;
+ navigationId?: number;
+ model?: string;
+ status?: number;
+ keywords?: string;
+}
+
+export interface CmsArticleCount {
+ totalNum?: number;
+ totalNum2?: number;
+ totalNum3?: number;
+ totalNum4?: number;
+}
diff --git a/app/api/cms/cmsArticleCategory/index.ts b/app/api/cms/cmsArticleCategory/index.ts
new file mode 100644
index 0000000..4159ed2
--- /dev/null
+++ b/app/api/cms/cmsArticleCategory/index.ts
@@ -0,0 +1,108 @@
+import request from '@/utils/request';
+import type { ApiResult, PageResult } from '@/api';
+import type { CmsArticleCategory, CmsArticleCategoryParam } from './model';
+import { MODULES_API_URL } from '@/config/setting';
+
+/**
+ * 分页查询文章分类表
+ */
+export async function pageCmsArticleCategory(params: CmsArticleCategoryParam) {
+ const res = await request.get>>(
+ MODULES_API_URL + '/cms/cms-article-category/page',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询文章分类表列表
+ */
+export async function listCmsArticleCategory(params?: CmsArticleCategoryParam) {
+ const res = await request.get>(
+ MODULES_API_URL + '/cms/cms-article-category',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 添加文章分类表
+ */
+export async function addCmsArticleCategory(data: CmsArticleCategory) {
+ const res = await request.post>(
+ MODULES_API_URL + '/cms/cms-article-category',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 修改文章分类表
+ */
+export async function updateCmsArticleCategory(data: CmsArticleCategory) {
+ const res = await request.put>(
+ MODULES_API_URL + '/cms/cms-article-category',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除文章分类表
+ */
+export async function removeCmsArticleCategory(id?: number) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/cms/cms-article-category/' + id
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量删除文章分类表
+ */
+export async function removeBatchCmsArticleCategory(
+ data: (number | undefined)[]
+) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/cms/cms-article-category/batch',
+ {
+ data
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 根据id查询文章分类表
+ */
+export async function getCmsArticleCategory(id: number) {
+ const res = await request.get>(
+ MODULES_API_URL + '/cms/cms-article-category/' + id
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/app/api/cms/cmsArticleCategory/model/index.ts b/app/api/cms/cmsArticleCategory/model/index.ts
new file mode 100644
index 0000000..7f8b2a8
--- /dev/null
+++ b/app/api/cms/cmsArticleCategory/model/index.ts
@@ -0,0 +1,59 @@
+import type { PageParam } from '@/api';
+
+/**
+ * 文章分类表
+ */
+export interface CmsArticleCategory {
+ // 文章分类ID
+ categoryId?: number;
+ // 分类标识
+ categoryCode?: string;
+ // 分类名称
+ title?: string;
+ // 类型 0列表 1单页 2外链
+ type?: number;
+ // 分类图片
+ image?: string;
+ // 上级分类ID
+ parentId?: number;
+ // 路由/链接地址
+ path?: string;
+ // 组件路径
+ component?: string;
+ // 绑定的页面
+ pageId?: number;
+ // 用户ID
+ userId?: number;
+ // 文章数量
+ count?: number;
+ // 排序(数字越小越靠前)
+ sortNumber?: number;
+ // 备注
+ comments?: string;
+ // 是否隐藏, 0否, 1是(仅注册路由不显示在左侧菜单)
+ hide?: number;
+ // 是否推荐
+ recommend?: number;
+ // 是否显示在首页
+ showIndex?: number;
+ // 状态, 0正常, 1禁用
+ status?: number;
+ // 是否删除, 0否, 1是
+ deleted?: number;
+ // 租户id
+ tenantId?: number;
+ // 创建时间
+ createTime?: string;
+ // 修改时间
+ updateTime?: string;
+ value?: number;
+ label?: string;
+}
+
+/**
+ * 文章分类表搜索条件
+ */
+export interface CmsArticleCategoryParam extends PageParam {
+ categoryId?: number;
+ keywords?: string;
+}
diff --git a/app/api/cms/cmsArticleComment/index.ts b/app/api/cms/cmsArticleComment/index.ts
new file mode 100644
index 0000000..085579f
--- /dev/null
+++ b/app/api/cms/cmsArticleComment/index.ts
@@ -0,0 +1,106 @@
+import request from '@/utils/request';
+import type { ApiResult, PageResult } from '@/api';
+import type { CmsArticleComment, CmsArticleCommentParam } from './model';
+import { MODULES_API_URL } from '@/config/setting';
+
+/**
+ * 分页查询文章评论表
+ */
+export async function pageCmsArticleComment(params: CmsArticleCommentParam) {
+ const res = await request.get>>(
+ MODULES_API_URL + '/cms/cms-article-comment/page',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询文章评论表列表
+ */
+export async function listCmsArticleComment(params?: CmsArticleCommentParam) {
+ const res = await request.get>(
+ MODULES_API_URL + '/cms/cms-article-comment',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 添加文章评论表
+ */
+export async function addCmsArticleComment(data: CmsArticleComment) {
+ const res = await request.post>(
+ MODULES_API_URL + '/cms/cms-article-comment',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 修改文章评论表
+ */
+export async function updateCmsArticleComment(data: CmsArticleComment) {
+ const res = await request.put>(
+ MODULES_API_URL + '/cms/cms-article-comment',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除文章评论表
+ */
+export async function removeCmsArticleComment(id?: number) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/cms/cms-article-comment/' + id
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量删除文章评论表
+ */
+export async function removeBatchCmsArticleComment(data: (number | undefined)[]) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/cms/cms-article-comment/batch',
+ {
+ data
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 根据id查询文章评论表
+ */
+export async function getCmsArticleComment(id: number) {
+ const res = await request.get>(
+ MODULES_API_URL + '/cms/cms-article-comment/' + id
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/app/api/cms/cmsArticleComment/model/index.ts b/app/api/cms/cmsArticleComment/model/index.ts
new file mode 100644
index 0000000..2490228
--- /dev/null
+++ b/app/api/cms/cmsArticleComment/model/index.ts
@@ -0,0 +1,47 @@
+import type { PageParam } from '@/api';
+
+/**
+ * 文章评论表
+ */
+export interface CmsArticleComment {
+ // 评价ID
+ commentId?: number;
+ // 文章ID
+ articleId?: number;
+ // 评分 (10好评 20中评 30差评)
+ score?: number;
+ // 评价内容
+ content?: string;
+ // 是否为图片评价
+ isPicture?: number;
+ // 评论者ID
+ userId?: number;
+ // 被评价者ID
+ toUserId?: number;
+ // 回复的评论ID
+ replyCommentId?: number;
+ // 回复者ID
+ replyUserId?: number;
+ // 排序(数字越小越靠前)
+ sortNumber?: number;
+ // 备注
+ comments?: string;
+ // 状态, 0未读, 1已读
+ status?: number;
+ // 是否删除, 0否, 1是
+ deleted?: number;
+ // 租户id
+ tenantId?: number;
+ // 创建时间
+ createTime?: string;
+ // 修改时间
+ updateTime?: string;
+}
+
+/**
+ * 文章评论表搜索条件
+ */
+export interface CmsArticleCommentParam extends PageParam {
+ commentId?: number;
+ keywords?: string;
+}
diff --git a/app/api/cms/cmsArticleContent/index.ts b/app/api/cms/cmsArticleContent/index.ts
new file mode 100644
index 0000000..c25d8f4
--- /dev/null
+++ b/app/api/cms/cmsArticleContent/index.ts
@@ -0,0 +1,106 @@
+import request from '@/utils/request';
+import type { ApiResult, PageResult } from '@/api';
+import type { CmsArticleContent, CmsArticleContentParam } from './model';
+import { MODULES_API_URL } from '@/config/setting';
+
+/**
+ * 分页查询文章记录表
+ */
+export async function pageCmsArticleContent(params: CmsArticleContentParam) {
+ const res = await request.get>>(
+ MODULES_API_URL + '/cms/cms-article-content/page',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询文章记录表列表
+ */
+export async function listCmsArticleContent(params?: CmsArticleContentParam) {
+ const res = await request.get>(
+ MODULES_API_URL + '/cms/cms-article-content',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 添加文章记录表
+ */
+export async function addCmsArticleContent(data: CmsArticleContent) {
+ const res = await request.post>(
+ MODULES_API_URL + '/cms/cms-article-content',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 修改文章记录表
+ */
+export async function updateCmsArticleContent(data: CmsArticleContent) {
+ const res = await request.put>(
+ MODULES_API_URL + '/cms/cms-article-content',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除文章记录表
+ */
+export async function removeCmsArticleContent(id?: number) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/cms/cms-article-content/' + id
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量删除文章记录表
+ */
+export async function removeBatchCmsArticleContent(data: (number | undefined)[]) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/cms/cms-article-content/batch',
+ {
+ data
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 根据id查询文章记录表
+ */
+export async function getCmsArticleContent(id: number) {
+ const res = await request.get>(
+ MODULES_API_URL + '/cms/cms-article-content/' + id
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/app/api/cms/cmsArticleContent/model/index.ts b/app/api/cms/cmsArticleContent/model/index.ts
new file mode 100644
index 0000000..d667f91
--- /dev/null
+++ b/app/api/cms/cmsArticleContent/model/index.ts
@@ -0,0 +1,26 @@
+import type { PageParam } from '@/api';
+
+/**
+ * 文章记录表
+ */
+export interface CmsArticleContent {
+ //
+ id?: number;
+ // 文章ID
+ articleId?: number;
+ // 文章内容
+ content?: string;
+ // 租户id
+ tenantId?: number;
+ // 创建时间
+ createTime?: string;
+}
+
+/**
+ * 文章记录表搜索条件
+ */
+export interface CmsArticleContentParam extends PageParam {
+ id?: number;
+ articleId?: number;
+ keywords?: string;
+}
diff --git a/app/api/cms/cmsArticleCount/index.ts b/app/api/cms/cmsArticleCount/index.ts
new file mode 100644
index 0000000..0d88f6d
--- /dev/null
+++ b/app/api/cms/cmsArticleCount/index.ts
@@ -0,0 +1,106 @@
+import request from '@/utils/request';
+import type { ApiResult, PageResult } from '@/api';
+import type { CmsArticleCount, CmsArticleCountParam } from './model';
+import { MODULES_API_URL } from '@/config/setting';
+
+/**
+ * 分页查询点赞文章
+ */
+export async function pageCmsArticleCount(params: CmsArticleCountParam) {
+ const res = await request.get>>(
+ MODULES_API_URL + '/cms/cms-article-count/page',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询点赞文章列表
+ */
+export async function listCmsArticleCount(params?: CmsArticleCountParam) {
+ const res = await request.get>(
+ MODULES_API_URL + '/cms/cms-article-count',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 添加点赞文章
+ */
+export async function addCmsArticleCount(data: CmsArticleCount) {
+ const res = await request.post>(
+ MODULES_API_URL + '/cms/cms-article-count',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 修改点赞文章
+ */
+export async function updateCmsArticleCount(data: CmsArticleCount) {
+ const res = await request.put>(
+ MODULES_API_URL + '/cms/cms-article-count',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除点赞文章
+ */
+export async function removeCmsArticleCount(id?: number) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/cms/cms-article-count/' + id
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量删除点赞文章
+ */
+export async function removeBatchCmsArticleCount(data: (number | undefined)[]) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/cms/cms-article-count/batch',
+ {
+ data
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 根据id查询点赞文章
+ */
+export async function getCmsArticleCount(id: number) {
+ const res = await request.get>(
+ MODULES_API_URL + '/cms/cms-article-count/' + id
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/app/api/cms/cmsArticleCount/model/index.ts b/app/api/cms/cmsArticleCount/model/index.ts
new file mode 100644
index 0000000..9cfbc24
--- /dev/null
+++ b/app/api/cms/cmsArticleCount/model/index.ts
@@ -0,0 +1,25 @@
+import type { PageParam } from '@/api';
+
+/**
+ * 点赞文章
+ */
+export interface CmsArticleCount {
+ // 主键ID
+ id?: number;
+ // 文章ID
+ articleId?: number;
+ // 用户ID
+ userId?: number;
+ // 租户id
+ tenantId?: number;
+ // 创建时间
+ createTime?: string;
+}
+
+/**
+ * 点赞文章搜索条件
+ */
+export interface CmsArticleCountParam extends PageParam {
+ id?: number;
+ keywords?: string;
+}
diff --git a/app/api/cms/cmsArticleLike/index.ts b/app/api/cms/cmsArticleLike/index.ts
new file mode 100644
index 0000000..ab3dd0f
--- /dev/null
+++ b/app/api/cms/cmsArticleLike/index.ts
@@ -0,0 +1,106 @@
+import request from '@/utils/request';
+import type { ApiResult, PageResult } from '@/api';
+import type { CmsArticleLike, CmsArticleLikeParam } from './model';
+import { MODULES_API_URL } from '@/config/setting';
+
+/**
+ * 分页查询点赞文章
+ */
+export async function pageCmsArticleLike(params: CmsArticleLikeParam) {
+ const res = await request.get>>(
+ MODULES_API_URL + '/cms/cms-article-like/page',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询点赞文章列表
+ */
+export async function listCmsArticleLike(params?: CmsArticleLikeParam) {
+ const res = await request.get>(
+ MODULES_API_URL + '/cms/cms-article-like',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 添加点赞文章
+ */
+export async function addCmsArticleLike(data: CmsArticleLike) {
+ const res = await request.post>(
+ MODULES_API_URL + '/cms/cms-article-like',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 修改点赞文章
+ */
+export async function updateCmsArticleLike(data: CmsArticleLike) {
+ const res = await request.put>(
+ MODULES_API_URL + '/cms/cms-article-like',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除点赞文章
+ */
+export async function removeCmsArticleLike(id?: number) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/cms/cms-article-like/' + id
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量删除点赞文章
+ */
+export async function removeBatchCmsArticleLike(data: (number | undefined)[]) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/cms/cms-article-like/batch',
+ {
+ data
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 根据id查询点赞文章
+ */
+export async function getCmsArticleLike(id: number) {
+ const res = await request.get>(
+ MODULES_API_URL + '/cms/cms-article-like/' + id
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/app/api/cms/cmsArticleLike/model/index.ts b/app/api/cms/cmsArticleLike/model/index.ts
new file mode 100644
index 0000000..ccee27a
--- /dev/null
+++ b/app/api/cms/cmsArticleLike/model/index.ts
@@ -0,0 +1,25 @@
+import type { PageParam } from '@/api';
+
+/**
+ * 点赞文章
+ */
+export interface CmsArticleLike {
+ // 主键ID
+ id?: number;
+ // 文章ID
+ articleId?: number;
+ // 用户ID
+ userId?: number;
+ // 租户id
+ tenantId?: number;
+ // 创建时间
+ createTime?: string;
+}
+
+/**
+ * 点赞文章搜索条件
+ */
+export interface CmsArticleLikeParam extends PageParam {
+ id?: number;
+ keywords?: string;
+}
diff --git a/app/api/cms/cmsDesign/index.ts b/app/api/cms/cmsDesign/index.ts
new file mode 100644
index 0000000..eb4736c
--- /dev/null
+++ b/app/api/cms/cmsDesign/index.ts
@@ -0,0 +1,106 @@
+import request from '@/utils/request';
+import type { ApiResult, PageResult } from '@/api';
+import type { CmsDesign, CmsDesignParam } from './model';
+import { MODULES_API_URL } from '@/config/setting';
+
+/**
+ * 分页查询页面管理记录表
+ */
+export async function pageCmsDesign(params: CmsDesignParam) {
+ const res = await request.get>>(
+ MODULES_API_URL + '/cms/cms-design/page',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询页面管理记录表列表
+ */
+export async function listCmsDesign(params?: CmsDesignParam) {
+ const res = await request.get>(
+ MODULES_API_URL + '/cms/cms-design',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 添加页面管理记录表
+ */
+export async function addCmsDesign(data: CmsDesign) {
+ const res = await request.post>(
+ MODULES_API_URL + '/cms/cms-design',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 修改页面管理记录表
+ */
+export async function updateCmsDesign(data: CmsDesign) {
+ const res = await request.put>(
+ MODULES_API_URL + '/cms/cms-design',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除页面管理记录表
+ */
+export async function removeCmsDesign(id?: number) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/cms/cms-design/' + id
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量删除页面管理记录表
+ */
+export async function removeBatchCmsDesign(data: (number | undefined)[]) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/cms/cms-design/batch',
+ {
+ data
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 根据id查询页面管理记录表
+ */
+export async function getCmsDesign(id: number) {
+ const res = await request.get>(
+ MODULES_API_URL + '/cms/cms-design/' + id
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/app/api/cms/cmsDesign/model/index.ts b/app/api/cms/cmsDesign/model/index.ts
new file mode 100644
index 0000000..d8ef624
--- /dev/null
+++ b/app/api/cms/cmsDesign/model/index.ts
@@ -0,0 +1,64 @@
+import type { PageParam } from '@/api';
+
+/**
+ * 页面管理记录表
+ */
+export interface CmsDesign {
+ pageId?: number;
+ name?: string;
+ keywords?: string;
+ description?: string;
+ path?: string;
+ component?: string;
+ photo?: string;
+ content?: string;
+ // 类型
+ type?: string;
+ categoryId?: number;
+ // 宽
+ width?: string;
+ // 高
+ height?: string;
+ // 页面样式
+ style?: string;
+ // 附件
+ images?: string;
+ // 用户ID
+ userId?: number;
+ // 设为首页
+ home?: number;
+ // 排序
+ sortNumber?: number;
+ // 备注
+ comments?: string;
+ // 状态
+ status?: number;
+ // 创建时间
+ createTime?: string;
+ // 更新时间
+ updateTime?: string;
+ // 页面布局
+ layout?: string;
+ backgroundColor?: string;
+ // 关联网站导航ID
+ navigationId?: number;
+ showLayout?: boolean;
+ btn?: any[];
+ showBanner?: boolean;
+ showButton?: boolean;
+ // 是否同步翻译其他语言版本
+ translation?: boolean;
+ buyUrl?: string;
+ demoUrl?: string;
+ account?: string;
+ docUrl?: string;
+ parentId?: number;
+}
+
+/**
+ * 页面管理记录表搜索条件
+ */
+export interface CmsDesignParam extends PageParam {
+ pageId?: number;
+ keywords?: string;
+}
diff --git a/app/api/cms/cmsDomain/index.ts b/app/api/cms/cmsDomain/index.ts
new file mode 100644
index 0000000..8ae32ad
--- /dev/null
+++ b/app/api/cms/cmsDomain/index.ts
@@ -0,0 +1,153 @@
+import request from '@/utils/request';
+import type { ApiResult, PageResult } from '@/api';
+import type { CmsDomain, CmsDomainParam } from './model';
+import { SERVER_API_URL} from '@/config/setting';
+
+/**
+ * 分页查询网站域名记录表
+ */
+export async function pageCmsDomain(params: CmsDomainParam) {
+ const res = await request.get>>(
+ SERVER_API_URL + '/cms/cms-domain/page',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询网站域名记录表列表
+ */
+export async function listCmsDomain(params?: CmsDomainParam) {
+ const res = await request.get>(
+ SERVER_API_URL + '/cms/cms-domain',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 添加网站域名记录表
+ */
+export async function addCmsDomain(data: CmsDomain) {
+ const res = await request.post>(
+ SERVER_API_URL + '/cms/cms-domain',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 修改网站域名记录表
+ */
+export async function updateCmsDomain(data: CmsDomain) {
+ const res = await request.post>(
+ SERVER_API_URL + '/cms/cms-domain/domain',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除网站域名记录表
+ */
+export async function removeCmsDomain(id?: number) {
+ const res = await request.delete>(
+ SERVER_API_URL + '/cms/cms-domain/' + id
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量删除网站域名记录表
+ */
+export async function removeBatchCmsDomain(data: (number | undefined)[]) {
+ const res = await request.delete>(
+ SERVER_API_URL + '/cms/cms-domain/batch',
+ {
+ data
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 根据id查询网站域名记录表
+ */
+export async function getCmsDomain(id: number) {
+ const res = await request.get>(
+ SERVER_API_URL + '/cms/cms-domain/' + id
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 检查IP是否存在
+ */
+export async function checkExistence(
+ field: string,
+ value: string,
+ id?: number
+) {
+ const res = await request.get>(
+ SERVER_API_URL + '/cms/cms-domain/existence',
+ {
+ params: { field, value, id }
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+export async function resolvable(id: number) {
+ const res = await request.get>(
+ SERVER_API_URL + '/cms/cms-domain/resolvable/' + id
+ );
+ if (res.data.code === 0 && res.data) {
+ return res.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+
+/**
+ * 根据授权主域名
+ */
+export async function getAuthorizedDomain() {
+ if(!localStorage.getItem('WebsiteId')){
+ return false;
+ }
+ const res = await request.get>(
+ SERVER_API_URL + '/cms/cms-domain/getAuthorizedDomain/' + localStorage.getItem('WebsiteId')
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/app/api/cms/cmsDomain/model/index.ts b/app/api/cms/cmsDomain/model/index.ts
new file mode 100644
index 0000000..3be7c9d
--- /dev/null
+++ b/app/api/cms/cmsDomain/model/index.ts
@@ -0,0 +1,43 @@
+import type { PageParam } from '@/api';
+
+/**
+ * 网站域名记录表
+ */
+export interface CmsDomain {
+ // ID
+ id?: number;
+ // 类型 0赠送域名 1绑定域名
+ type?: number;
+ // 域名
+ domain?: string;
+ // 主机记录
+ hostName?: string;
+ // 记录值
+ hostValue?: string;
+ // 状态
+ status?: number;
+ // 排序号
+ sortNumber?: number;
+ // 网站ID
+ websiteId?: number;
+ // 租户ID
+ appId?: number;
+ // 用户ID
+ userId?: number;
+ // 是否删除, 0否, 1是
+ deleted?: number;
+ // 租户id
+ tenantId?: number;
+ // 创建时间
+ createTime?: string;
+ // 修改时间
+ updateTime?: string;
+}
+
+/**
+ * 网站域名记录表搜索条件
+ */
+export interface CmsDomainParam extends PageParam {
+ id?: number;
+ keywords?: string;
+}
diff --git a/app/api/cms/cmsForm/index.ts b/app/api/cms/cmsForm/index.ts
new file mode 100644
index 0000000..abf07ab
--- /dev/null
+++ b/app/api/cms/cmsForm/index.ts
@@ -0,0 +1,106 @@
+import request from '@/utils/request';
+import type { ApiResult, PageResult } from '@/api';
+import type { CmsForm, CmsFormParam } from './model';
+import { MODULES_API_URL } from '@/config/setting';
+
+/**
+ * 分页查询表单设计表
+ */
+export async function pageCmsForm(params: CmsFormParam) {
+ const res = await request.get>>(
+ MODULES_API_URL + '/cms/cms-form/page',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询表单设计表列表
+ */
+export async function listCmsForm(params?: CmsFormParam) {
+ const res = await request.get>(
+ MODULES_API_URL + '/cms/cms-form',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 添加表单设计表
+ */
+export async function addCmsForm(data: CmsForm) {
+ const res = await request.post>(
+ MODULES_API_URL + '/cms/cms-form',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 修改表单设计表
+ */
+export async function updateCmsForm(data: CmsForm) {
+ const res = await request.put>(
+ MODULES_API_URL + '/cms/cms-form',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除表单设计表
+ */
+export async function removeCmsForm(id?: number) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/cms/cms-form/' + id
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量删除表单设计表
+ */
+export async function removeBatchCmsForm(data: (number | undefined)[]) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/cms/cms-form/batch',
+ {
+ data
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 根据id查询表单设计表
+ */
+export async function getCmsForm(id: number) {
+ const res = await request.get>(
+ MODULES_API_URL + '/cms/cms-form/' + id
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/app/api/cms/cmsForm/model/index.ts b/app/api/cms/cmsForm/model/index.ts
new file mode 100644
index 0000000..6e43ff9
--- /dev/null
+++ b/app/api/cms/cmsForm/model/index.ts
@@ -0,0 +1,53 @@
+import type { PageParam } from '@/api';
+
+/**
+ * 表单设计表
+ */
+export interface CmsForm {
+ // ID
+ formId?: number;
+ // 表单标题
+ name?: string;
+ // 顶部图片
+ photo?: string;
+ // 背景图片
+ background?: string;
+ // 视频文件
+ video?: string;
+ // 提交次数
+ submitNumber?: number;
+ // 页面布局
+ layout?: string;
+ // 是否隐藏顶部图片
+ hidePhoto?: number;
+ // 是否隐藏背景图片
+ hideBackground?: number;
+ // 是否隐藏视频
+ hideVideo?: number;
+ // 背景图片透明度
+ opacity?: string;
+ // 用户ID
+ userId?: number;
+ // 商户ID
+ merchantId?: number;
+ // 排序(数字越小越靠前)
+ sortNumber?: number;
+ // 备注
+ comments?: string;
+ // 状态, 0正常, 1冻结
+ status?: number;
+ // 是否删除, 0否, 1是
+ deleted?: number;
+ // 租户id
+ tenantId?: number;
+ // 创建时间
+ createTime?: string;
+}
+
+/**
+ * 表单设计表搜索条件
+ */
+export interface CmsFormParam extends PageParam {
+ formId?: number;
+ keywords?: string;
+}
diff --git a/app/api/cms/cmsFormRecord/index.ts b/app/api/cms/cmsFormRecord/index.ts
new file mode 100644
index 0000000..b281148
--- /dev/null
+++ b/app/api/cms/cmsFormRecord/index.ts
@@ -0,0 +1,106 @@
+import request from '@/utils/request';
+import type { ApiResult, PageResult } from '@/api';
+import type { CmsFormRecord, CmsFormRecordParam } from './model';
+import { MODULES_API_URL } from '@/config/setting';
+
+/**
+ * 分页查询表单数据记录表
+ */
+export async function pageCmsFormRecord(params: CmsFormRecordParam) {
+ const res = await request.get>>(
+ MODULES_API_URL + '/cms/cms-form-record/page',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询表单数据记录表列表
+ */
+export async function listCmsFormRecord(params?: CmsFormRecordParam) {
+ const res = await request.get>(
+ MODULES_API_URL + '/cms/cms-form-record',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 添加表单数据记录表
+ */
+export async function addCmsFormRecord(data: CmsFormRecord) {
+ const res = await request.post>(
+ MODULES_API_URL + '/cms/cms-form-record',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 修改表单数据记录表
+ */
+export async function updateCmsFormRecord(data: CmsFormRecord) {
+ const res = await request.put>(
+ MODULES_API_URL + '/cms/cms-form-record',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除表单数据记录表
+ */
+export async function removeCmsFormRecord(id?: number) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/cms/cms-form-record/' + id
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量删除表单数据记录表
+ */
+export async function removeBatchCmsFormRecord(data: (number | undefined)[]) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/cms/cms-form-record/batch',
+ {
+ data
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 根据id查询表单数据记录表
+ */
+export async function getCmsFormRecord(id: number) {
+ const res = await request.get>(
+ MODULES_API_URL + '/cms/cms-form-record/' + id
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/app/api/cms/cmsFormRecord/model/index.ts b/app/api/cms/cmsFormRecord/model/index.ts
new file mode 100644
index 0000000..4bd8f39
--- /dev/null
+++ b/app/api/cms/cmsFormRecord/model/index.ts
@@ -0,0 +1,41 @@
+import type { PageParam } from '@/api';
+
+/**
+ * 表单数据记录表
+ */
+export interface CmsFormRecord {
+ // ID
+ formRecordId?: number;
+ // 手机号
+ phone?: string;
+ // 表单数据
+ formData?: string;
+ // 表单ID
+ formId?: number;
+ // 用户ID
+ userId?: number;
+ // 商户ID
+ merchantId?: number;
+ // 姓名
+ name?: string;
+ // 排序(数字越小越靠前)
+ sortNumber?: number;
+ // 备注
+ comments?: string;
+ // 状态, 0正常, 1冻结
+ status?: number;
+ // 是否删除, 0否, 1是
+ deleted?: number;
+ // 租户id
+ tenantId?: number;
+ // 创建时间
+ createTime?: string;
+}
+
+/**
+ * 表单数据记录表搜索条件
+ */
+export interface CmsFormRecordParam extends PageParam {
+ formRecordId?: number;
+ keywords?: string;
+}
diff --git a/app/api/cms/cmsLang/index.ts b/app/api/cms/cmsLang/index.ts
new file mode 100644
index 0000000..8787da1
--- /dev/null
+++ b/app/api/cms/cmsLang/index.ts
@@ -0,0 +1,106 @@
+import request from '@/utils/request';
+import type { ApiResult, PageResult } from '@/api';
+import type { CmsLang, CmsLangParam } from './model';
+import { MODULES_API_URL } from '@/config/setting';
+
+/**
+ * 分页查询国际化
+ */
+export async function pageCmsLang(params: CmsLangParam) {
+ const res = await request.get>>(
+ MODULES_API_URL + '/cms/cms-lang/page',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询国际化列表
+ */
+export async function listCmsLang(params?: CmsLangParam) {
+ const res = await request.get>(
+ MODULES_API_URL + '/cms/cms-lang',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 添加国际化
+ */
+export async function addCmsLang(data: CmsLang) {
+ const res = await request.post>(
+ MODULES_API_URL + '/cms/cms-lang',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 修改国际化
+ */
+export async function updateCmsLang(data: CmsLang) {
+ const res = await request.put>(
+ MODULES_API_URL + '/cms/cms-lang',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除国际化
+ */
+export async function removeCmsLang(id?: number) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/cms/cms-lang/' + id
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量删除国际化
+ */
+export async function removeBatchCmsLang(data: (number | undefined)[]) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/cms/cms-lang/batch',
+ {
+ data
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 根据id查询国际化
+ */
+export async function getCmsLang(id: number) {
+ const res = await request.get>(
+ MODULES_API_URL + '/cms/cms-lang/' + id
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/app/api/cms/cmsLang/model/index.ts b/app/api/cms/cmsLang/model/index.ts
new file mode 100644
index 0000000..43c1d9e
--- /dev/null
+++ b/app/api/cms/cmsLang/model/index.ts
@@ -0,0 +1,35 @@
+import type { PageParam } from '@/api';
+
+/**
+ * 国际化
+ */
+export interface CmsLang {
+ // ID
+ id?: number;
+ // 名称
+ name?: string;
+ // 编码
+ code?: string;
+ // 排序(数字越小越靠前)
+ sortNumber?: number;
+ // 备注
+ comments?: string;
+ // 状态, 0已发布, 1待审核 2已驳回 3违规内容
+ status?: number;
+ // 是否删除, 0否, 1是
+ deleted?: number;
+ // 租户id
+ tenantId?: number;
+ // 创建时间
+ createTime?: string;
+ // 修改时间
+ updateTime?: string;
+}
+
+/**
+ * 国际化搜索条件
+ */
+export interface CmsLangParam extends PageParam {
+ id?: number;
+ keywords?: string;
+}
diff --git a/app/api/cms/cmsLangLog/index.ts b/app/api/cms/cmsLangLog/index.ts
new file mode 100644
index 0000000..9af33c7
--- /dev/null
+++ b/app/api/cms/cmsLangLog/index.ts
@@ -0,0 +1,106 @@
+import request from '@/utils/request';
+import type { ApiResult, PageResult } from '@/api';
+import type { CmsLangLog, CmsLangLogParam } from './model';
+import { MODULES_API_URL } from '@/config/setting';
+
+/**
+ * 分页查询国际化记录启用
+ */
+export async function pageCmsLangLog(params: CmsLangLogParam) {
+ const res = await request.get>>(
+ MODULES_API_URL + '/cms/cms-lang-log/page',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询国际化记录启用列表
+ */
+export async function listCmsLangLog(params?: CmsLangLogParam) {
+ const res = await request.get>(
+ MODULES_API_URL + '/cms/cms-lang-log',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 添加国际化记录启用
+ */
+export async function addCmsLangLog(data: CmsLangLog) {
+ const res = await request.post>(
+ MODULES_API_URL + '/cms/cms-lang-log',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 修改国际化记录启用
+ */
+export async function updateCmsLangLog(data: CmsLangLog) {
+ const res = await request.put>(
+ MODULES_API_URL + '/cms/cms-lang-log',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除国际化记录启用
+ */
+export async function removeCmsLangLog(id?: number) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/cms/cms-lang-log/' + id
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量删除国际化记录启用
+ */
+export async function removeBatchCmsLangLog(data: (number | undefined)[]) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/cms/cms-lang-log/batch',
+ {
+ data
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 根据id查询国际化记录启用
+ */
+export async function getCmsLangLog(id: number) {
+ const res = await request.get>(
+ MODULES_API_URL + '/cms/cms-lang-log/' + id
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/app/api/cms/cmsLangLog/model/index.ts b/app/api/cms/cmsLangLog/model/index.ts
new file mode 100644
index 0000000..af5a2f6
--- /dev/null
+++ b/app/api/cms/cmsLangLog/model/index.ts
@@ -0,0 +1,27 @@
+import type { PageParam } from '@/api';
+
+/**
+ * 国际化记录启用
+ */
+export interface CmsLangLog {
+ // ID
+ id?: number;
+ // 名称
+ lang?: string;
+ // 关联ID
+ langId?: number;
+ // 编码
+ code?: string;
+ // 租户id
+ tenantId?: number;
+ // 创建时间
+ createTime?: string;
+}
+
+/**
+ * 国际化记录启用搜索条件
+ */
+export interface CmsLangLogParam extends PageParam {
+ id?: number;
+ keywords?: string;
+}
diff --git a/app/api/cms/cmsLink/index.ts b/app/api/cms/cmsLink/index.ts
new file mode 100644
index 0000000..63558af
--- /dev/null
+++ b/app/api/cms/cmsLink/index.ts
@@ -0,0 +1,120 @@
+import request from '@/utils/request';
+import type { ApiResult, PageResult } from '@/api';
+import type { CmsLink, CmsLinkParam } from './model';
+import { MODULES_API_URL } from '@/config/setting';
+
+/**
+ * 分页查询常用链接
+ */
+export async function pageCmsLink(params: CmsLinkParam) {
+ const res = await request.get>>(
+ MODULES_API_URL + '/cms/cms-link/page',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询常用链接列表
+ */
+export async function listCmsLink(params?: CmsLinkParam) {
+ const res = await request.get>(
+ MODULES_API_URL + '/cms/cms-link',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 添加常用链接
+ */
+export async function addCmsLink(data: CmsLink) {
+ const res = await request.post>(
+ MODULES_API_URL + '/cms/cms-link',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 修改常用链接
+ */
+export async function updateCmsLink(data: CmsLink) {
+ const res = await request.put>(
+ MODULES_API_URL + '/cms/cms-link',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除常用链接
+ */
+export async function removeCmsLink(id?: number) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/cms/cms-link/' + id
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量修改常用链接
+ */
+export async function updateBatchCmsLink(data: any) {
+ const res = await request.put>(
+ MODULES_API_URL + '/cms/cms-link/batch',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量删除常用链接
+ */
+export async function removeBatchCmsLink(data: (number | undefined)[]) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/cms/cms-link/batch',
+ {
+ data
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 根据id查询常用链接
+ */
+export async function getCmsLink(id: number) {
+ const res = await request.get>(
+ MODULES_API_URL + '/cms/cms-link/' + id
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/app/api/cms/cmsLink/model/index.ts b/app/api/cms/cmsLink/model/index.ts
new file mode 100644
index 0000000..2f83581
--- /dev/null
+++ b/app/api/cms/cmsLink/model/index.ts
@@ -0,0 +1,45 @@
+import type { PageParam } from '@/api';
+
+/**
+ * 常用链接
+ */
+export interface CmsLink {
+ // 自增ID
+ id?: number;
+ // 链接名称
+ name?: string;
+ // 图标
+ icon?: string;
+ // 链接地址
+ url?: string;
+ // 链接分类
+ categoryId?: number;
+ // 应用ID
+ appId?: number;
+ // 用户ID
+ userId?: number;
+ // 语言
+ lang?: string;
+ // 是否推荐
+ recommend?: number;
+ // 备注
+ comments?: string;
+ // 排序(数字越小越靠前)
+ sortNumber?: number;
+ // 是否删除, 0否, 1是
+ deleted?: number;
+ // 状态, 0正常, 1待确认
+ status?: number;
+ // 租户id
+ tenantId?: number;
+ // 创建时间
+ createTime?: string;
+}
+
+/**
+ * 常用链接搜索条件
+ */
+export interface CmsLinkParam extends PageParam {
+ id?: number;
+ keywords?: string;
+}
diff --git a/app/api/cms/cmsModel/index.ts b/app/api/cms/cmsModel/index.ts
new file mode 100644
index 0000000..934e776
--- /dev/null
+++ b/app/api/cms/cmsModel/index.ts
@@ -0,0 +1,106 @@
+import request from '@/utils/request';
+import type { ApiResult, PageResult } from '@/api';
+import type { CmsModel, CmsModelParam } from './model';
+import { MODULES_API_URL } from '@/config/setting';
+
+/**
+ * 分页查询模型
+ */
+export async function pageCmsModel(params: CmsModelParam) {
+ const res = await request.get>>(
+ MODULES_API_URL + '/cms/cms-model/page',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询模型列表
+ */
+export async function listCmsModel(params?: CmsModelParam) {
+ const res = await request.get>(
+ MODULES_API_URL + '/cms/cms-model',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 添加模型
+ */
+export async function addCmsModel(data: CmsModel) {
+ const res = await request.post>(
+ MODULES_API_URL + '/cms/cms-model',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 修改模型
+ */
+export async function updateCmsModel(data: CmsModel) {
+ const res = await request.put>(
+ MODULES_API_URL + '/cms/cms-model',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除模型
+ */
+export async function removeCmsModel(id?: number) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/cms/cms-model/' + id
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量删除模型
+ */
+export async function removeBatchCmsModel(data: (number | undefined)[]) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/cms/cms-model/batch',
+ {
+ data
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 根据id查询模型
+ */
+export async function getCmsModel(id: number) {
+ const res = await request.get>(
+ MODULES_API_URL + '/cms/cms-model/' + id
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/app/api/cms/cmsModel/model/index.ts b/app/api/cms/cmsModel/model/index.ts
new file mode 100644
index 0000000..14a78f2
--- /dev/null
+++ b/app/api/cms/cmsModel/model/index.ts
@@ -0,0 +1,63 @@
+import type { PageParam } from '@/api';
+
+/**
+ * 模型
+ */
+export interface CmsModel {
+ // ID
+ modelId?: number;
+ // 模型名称
+ name?: string;
+ // 唯一标识
+ model?: string;
+ // 详情页组件
+ componentDetail?: string;
+ // 菜单组件地址, 目录可为空
+ component?: string;
+ // 模型banner图片
+ banner?: string;
+ // 缩列图
+ thumb?: string;
+ // 文件后缀
+ suffix?: string;
+ // 封面图宽
+ imageWidth?: string;
+ // 封面图高
+ imageHeight?: string;
+ // 样式
+ style?: string;
+ // Banner上的标题
+ title?: string;
+ // Banner上的描述
+ desc?: string;
+ // 列表显示方式(10小图展示 20大图展示)
+ showType?: number;
+ // 是否禁用
+ disabled?: boolean;
+ // 用户ID
+ userId?: number;
+ // 排序(数字越小越靠前)
+ sortNumber?: number;
+ // 备注
+ comments?: string;
+ // 状态, 0已发布, 1待审核 2已驳回 3违规内容
+ status?: number;
+ // 是否删除, 0否, 1是
+ deleted?: number;
+ // 租户id
+ tenantId?: number;
+ // 创建时间
+ createTime?: string;
+ // 修改时间
+ updateTime?: string;
+ label?: string;
+ value?: string;
+}
+
+/**
+ * 模型搜索条件
+ */
+export interface CmsModelParam extends PageParam {
+ modelId?: number;
+ keywords?: string;
+}
diff --git a/app/api/cms/cmsNavigation/index.ts b/app/api/cms/cmsNavigation/index.ts
new file mode 100644
index 0000000..1e02b48
--- /dev/null
+++ b/app/api/cms/cmsNavigation/index.ts
@@ -0,0 +1,151 @@
+import request from '@/utils/request';
+import type { ApiResult, PageResult } from '@/api';
+import type { CmsNavigation, CmsNavigationParam } from './model';
+import { MODULES_API_URL } from '@/config/setting';
+
+/**
+ * 分页查询网站导航记录表
+ */
+export async function pageCmsNavigation(params: CmsNavigationParam) {
+ const res = await request.get>>(
+ MODULES_API_URL + '/cms/cms-navigation/page',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询网站导航记录表列表
+ */
+export async function listCmsNavigation(params?: CmsNavigationParam) {
+ const res = await request.get>(
+ MODULES_API_URL + '/cms/cms-navigation',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询导航列表(树形结构)
+ */
+export async function treeNavigation(params?: CmsNavigationParam) {
+ const res = await request.get>(
+ MODULES_API_URL + '/cms/cms-navigation/tree',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 添加网站导航记录表
+ */
+export async function addCmsNavigation(data: CmsNavigation) {
+ const res = await request.post>(
+ MODULES_API_URL + '/cms/cms-navigation',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 修改网站导航记录表
+ */
+export async function updateCmsNavigation(data: CmsNavigation) {
+ const res = await request.put>(
+ MODULES_API_URL + '/cms/cms-navigation',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除网站导航记录表
+ */
+export async function removeCmsNavigation(id?: number) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/cms/cms-navigation/' + id
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量删除网站导航记录表
+ */
+export async function removeBatchCmsNavigation(data: (number | undefined)[]) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/cms/cms-navigation/batch',
+ {
+ data
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 根据id查询网站导航记录表
+ */
+export async function getCmsNavigation(id: number) {
+ const res = await request.get>(
+ MODULES_API_URL + '/cms/cms-navigation/' + id
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+
+/**
+ * 根据code查询导航
+ */
+export async function getByCode(code: string) {
+ const res = await request.get>(
+ '/cms/cms-navigation/getByCode/' + code
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 导航批量导入
+ */
+export async function importCmsNavigation(file: File) {
+ const formData = new FormData();
+ formData.append('file', file);
+ const res = await request.post>(
+ MODULES_API_URL + '/cms/cms-navigation/import',
+ formData
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/app/api/cms/cmsNavigation/model/index.ts b/app/api/cms/cmsNavigation/model/index.ts
new file mode 100644
index 0000000..8bab8d3
--- /dev/null
+++ b/app/api/cms/cmsNavigation/model/index.ts
@@ -0,0 +1,111 @@
+import type { PageParam } from '@/api';
+
+/**
+ * 网站导航记录表
+ */
+export interface CmsNavigation {
+ // ID
+ navigationId?: number;
+ // 上级id, 0是顶级
+ parentId?: number;
+ // 菜单名称
+ title?: string;
+ // 模型
+ model?: string;
+ // 标识
+ code?: string;
+ // 菜单路由地址
+ path?: string;
+ // 菜单组件地址, 目录可为空
+ component?: string;
+ componentPath?: string;
+ // 打开位置
+ target?: string;
+ // 菜单图标
+ icon?: string;
+ // banner图片
+ banner?: string;
+ // 图标颜色
+ color?: string;
+ // 是否隐藏, 0否, 1是(仅注册路由不显示在左侧菜单)
+ hide?: number;
+ // 可见类型 0所有人 1登录可见 2密码可见
+ permission?: number;
+ // 访问密码
+ password?: string;
+ // 位置 0不限 1顶部 2底部
+ position?: number;
+ // 仅在顶部显示
+ top?: number;
+ // 仅在底部显示
+ bottom?: number;
+ // 菜单侧栏选中的path
+ active?: string;
+ // 其它路由元信息
+ meta?: string;
+ // css样式
+ style?: string;
+ // 父级栏目路由
+ parentPath?: string;
+ // 父级栏目名称
+ parentName?: string;
+ // 父级栏目位置
+ parentPosition?: number;
+ // 模型名称
+ modelName?: string;
+ // 类型(已废弃)
+ type?: number;
+ // 绑定的页面(已废弃)
+ pageId?: number;
+ // 项目ID
+ itemId?: number;
+ // 是否微信小程序菜单
+ isMpWeixin?: string;
+ gutter?: number;
+ span?: number;
+ readNum?: number;
+ // 用户ID
+ userId?: number;
+ // 国际化语言
+ lang?: string;
+ // 设为首页
+ home?: number;
+ // 是否推荐
+ recommend?: boolean;
+ // 排序(数字越小越靠前)
+ sortNumber?: number;
+ // 备注
+ comments?: string;
+ // 是否删除, 0否, 1是
+ deleted?: number;
+ // 状态, 0正常, 1冻结
+ status?: number;
+ // 租户id
+ tenantId?: number;
+ // 创建时间
+ createTime?: string;
+ children?: CmsNavigation[];
+ disabled?: boolean;
+ label?: string;
+ value?: number;
+ suffix?: string;
+ showBanner?: boolean;
+ showLayout?: boolean;
+ langCategoryId?: number;
+}
+
+// Runtime-friendly named export.
+// Some build tooling may incorrectly generate value imports for type-only exports.
+export const CmsNavigation = {} as const;
+
+/**
+ * 网站导航记录表搜索条件
+ */
+export interface CmsNavigationParam extends PageParam {
+ navigationId?: number;
+ parentId?: number;
+ model?: string;
+ lang?: string;
+ recommend?: boolean;
+ keywords?: string;
+}
diff --git a/app/api/cms/cmsOrder/index.ts b/app/api/cms/cmsOrder/index.ts
new file mode 100644
index 0000000..fdfc69f
--- /dev/null
+++ b/app/api/cms/cmsOrder/index.ts
@@ -0,0 +1,106 @@
+import request from '@/utils/request';
+import type { ApiResult, PageResult } from '@/api';
+import type { CmsOrder, CmsOrderParam } from './model';
+import { MODULES_API_URL } from '@/config/setting';
+
+/**
+ * 分页查询订单
+ */
+export async function pageCmsOrder(params: CmsOrderParam) {
+ const res = await request.get>>(
+ MODULES_API_URL + '/cms/cms-order/page',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询订单列表
+ */
+export async function listCmsOrder(params?: CmsOrderParam) {
+ const res = await request.get>(
+ MODULES_API_URL + '/cms/cms-order',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 添加订单
+ */
+export async function addCmsOrder(data: CmsOrder) {
+ const res = await request.post>(
+ MODULES_API_URL + '/cms/cms-order',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 修改订单
+ */
+export async function updateCmsOrder(data: CmsOrder) {
+ const res = await request.put>(
+ MODULES_API_URL + '/cms/cms-order',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除订单
+ */
+export async function removeCmsOrder(id?: number) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/cms/cms-order/' + id
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量删除订单
+ */
+export async function removeBatchCmsOrder(data: (number | undefined)[]) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/cms/cms-order/batch',
+ {
+ data
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 根据id查询订单
+ */
+export async function getCmsOrder(id: number) {
+ const res = await request.get>(
+ MODULES_API_URL + '/cms/cms-order/' + id
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/app/api/cms/cmsOrder/model/index.ts b/app/api/cms/cmsOrder/model/index.ts
new file mode 100644
index 0000000..e36a1ae
--- /dev/null
+++ b/app/api/cms/cmsOrder/model/index.ts
@@ -0,0 +1,66 @@
+import type { PageParam } from '@/api';
+
+/**
+ * 订单
+ */
+export interface CmsOrder {
+ // 订单号
+ orderId?: number;
+ // 订单标题
+ title?: string;
+ // 订单编号
+ orderNo?: string;
+ // 订单类型,0商城 1询价 2留言
+ type?: number;
+ // 关联项目ID,配合订单类型使用
+ itemId?: number;
+ // 真实姓名
+ realName?: string;
+ // 手机号码
+ phone?: string;
+ // 电子邮箱
+ email?: string;
+ // 收货地址
+ address?: string;
+ // 订单内容
+ content?: string;
+ // 订单附件
+ files?: string;
+ // 订单总额
+ totalPrice?: string;
+ // 实际付款
+ payPrice?: string;
+ // 报价询价
+ price?: string;
+ // 购买数量
+ totalNum?: number;
+ // 二维码地址,保存订单号,支付成功后才生成
+ qrcode?: string;
+ // 下单渠道,0网站 1小程序 2其他
+ channel?: number;
+ // 过期时间
+ expirationTime?: string;
+ // 订单是否已结算(0未结算 1已结算)
+ isSettled?: boolean;
+ // 用户id
+ userId?: number;
+ // 备注
+ comments?: string;
+ // 排序号
+ sortNumber?: number;
+ // 是否删除, 0否, 1是
+ deleted?: number;
+ // 租户id
+ tenantId?: number;
+ // 创建时间
+ createTime?: string;
+}
+
+/**
+ * 订单搜索条件
+ */
+export interface CmsOrderParam extends PageParam {
+ orderId?: number;
+ isSettled?: number;
+ keywords?: string;
+}
diff --git a/app/api/cms/cmsStatistics/index.ts b/app/api/cms/cmsStatistics/index.ts
new file mode 100644
index 0000000..14edfeb
--- /dev/null
+++ b/app/api/cms/cmsStatistics/index.ts
@@ -0,0 +1,106 @@
+import request from '@/utils/request';
+import type { ApiResult, PageResult } from '@/api';
+import type { CmsStatistics, CmsStatisticsParam } from './model';
+import { MODULES_API_URL } from '@/config/setting';
+
+/**
+ * 分页查询站点统计信息表
+ */
+export async function pageCmsStatistics(params: CmsStatisticsParam) {
+ const res = await request.get>>(
+ MODULES_API_URL + '/cms/cms-statistics/page',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询站点统计信息表列表
+ */
+export async function listCmsStatistics(params?: CmsStatisticsParam) {
+ const res = await request.get>(
+ MODULES_API_URL + '/cms/cms-statistics',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 添加站点统计信息表
+ */
+export async function addCmsStatistics(data: CmsStatistics) {
+ const res = await request.post>(
+ MODULES_API_URL + '/cms/cms-statistics',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 修改站点统计信息表
+ */
+export async function updateCmsStatistics(data: CmsStatistics) {
+ const res = await request.put>(
+ MODULES_API_URL + '/cms/cms-statistics',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除站点统计信息表
+ */
+export async function removeCmsStatistics(id?: number) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/cms/cms-statistics/' + id
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量删除站点统计信息表
+ */
+export async function removeBatchCmsStatistics(data: (number | undefined)[]) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/cms/cms-statistics/batch',
+ {
+ data
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 根据id查询站点统计信息表
+ */
+export async function getCmsStatistics(id: number) {
+ const res = await request.get>(
+ MODULES_API_URL + '/cms/cms-statistics/' + id
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/app/api/cms/cmsStatistics/model/index.ts b/app/api/cms/cmsStatistics/model/index.ts
new file mode 100644
index 0000000..bff5bbc
--- /dev/null
+++ b/app/api/cms/cmsStatistics/model/index.ts
@@ -0,0 +1,79 @@
+import type { PageParam } from '@/api';
+
+/**
+ * 站点统计信息表
+ */
+export interface CmsStatistics {
+ // 自增ID
+ id?: number;
+ // 站点ID
+ websiteId?: number;
+ // 用户总数
+ userCount?: number;
+ // 订单总数
+ orderCount?: number;
+ // 商品总数
+ productCount?: number;
+ // 总销售额
+ totalSales?: number;
+ // 本月销售额
+ monthSales?: number;
+ // 今日销售额
+ todaySales?: number;
+ // 昨日销售额
+ yesterdaySales?: number;
+ // 本周销售额
+ weekSales?: number;
+ // 本年销售额
+ yearSales?: number;
+ // 今日订单数
+ todayOrders?: number;
+ // 本月订单数
+ monthOrders?: number;
+ // 今日新增用户
+ todayUsers?: number;
+ // 本月新增用户
+ monthUsers?: number;
+ // 今日访问量
+ todayVisits?: number;
+ // 总访问量
+ totalVisits?: number;
+ // 商户总数
+ merchantCount?: number;
+ // 活跃用户数
+ activeUsers?: number;
+ // 转化率(%)
+ conversionRate?: string;
+ // 平均订单金额
+ avgOrderAmount?: string;
+ // 统计日期
+ statisticsDate?: string;
+ // 统计类型: 1日统计, 2月统计, 3年统计
+ statisticsType?: number;
+ // 运行天数
+ runDays?: number;
+ // 排序号
+ sortNumber?: number;
+ // 操作用户ID
+ userId?: number;
+ // 商户ID
+ merchantId?: number;
+ // 状态: 0禁用, 1启用
+ status?: string;
+ // 是否删除: 0否, 1是
+ deleted?: string;
+ // 租户ID
+ tenantId?: number;
+ // 创建时间
+ createTime?: string;
+ // 修改时间
+ updateTime?: string;
+}
+
+/**
+ * 站点统计信息表搜索条件
+ */
+export interface CmsStatisticsParam extends PageParam {
+ id?: number;
+ keywords?: string;
+}
diff --git a/app/api/cms/cmsTemplate/index.ts b/app/api/cms/cmsTemplate/index.ts
new file mode 100644
index 0000000..fd29228
--- /dev/null
+++ b/app/api/cms/cmsTemplate/index.ts
@@ -0,0 +1,106 @@
+import request from '@/utils/request';
+import type { ApiResult, PageResult } from '@/api';
+import type { CmsTemplate, CmsTemplateParam } from './model';
+import { MODULES_API_URL } from '@/config/setting';
+
+/**
+ * 分页查询网站模版
+ */
+export async function pageCmsTemplate(params: CmsTemplateParam) {
+ const res = await request.get>>(
+ MODULES_API_URL + '/cms/cms-template/page',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询网站模版列表
+ */
+export async function listCmsTemplate(params?: CmsTemplateParam) {
+ const res = await request.get>(
+ MODULES_API_URL + '/cms/cms-template',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 添加网站模版
+ */
+export async function addCmsTemplate(data: CmsTemplate) {
+ const res = await request.post>(
+ MODULES_API_URL + '/cms/cms-template',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 修改网站模版
+ */
+export async function updateCmsTemplate(data: CmsTemplate) {
+ const res = await request.put>(
+ MODULES_API_URL + '/cms/cms-template',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除网站模版
+ */
+export async function removeCmsTemplate(id?: number) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/cms/cms-template/' + id
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量删除网站模版
+ */
+export async function removeBatchCmsTemplate(data: (number | undefined)[]) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/cms/cms-template/batch',
+ {
+ data
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 根据id查询网站模版
+ */
+export async function getCmsTemplate(id: number) {
+ const res = await request.get>(
+ MODULES_API_URL + '/cms/cms-template/' + id
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/app/api/cms/cmsTemplate/model/index.ts b/app/api/cms/cmsTemplate/model/index.ts
new file mode 100644
index 0000000..96211ee
--- /dev/null
+++ b/app/api/cms/cmsTemplate/model/index.ts
@@ -0,0 +1,59 @@
+import type { PageParam } from '@/api';
+
+/**
+ * 网站模版
+ */
+export interface CmsTemplate {
+ // ID
+ id?: number;
+ // 模版名称
+ name?: string;
+ // 模版标识
+ code?: string;
+ // 缩列图
+ image?: string;
+ // 类型 1企业官网 2其他
+ type?: number;
+ // 网站关键词
+ keywords?: string;
+ // 域名前缀
+ prefix?: string;
+ // 预览地址
+ domain?: string;
+ // 模版下载地址
+ downUrl?: string;
+ // 色系
+ color?: string;
+ // 应用版本 10免费版 20授权版 30永久授权
+ version?: number;
+ // 行业类型(父级)
+ industryParent?: string;
+ // 行业类型(子级)
+ industryChild?: string;
+ // 备注
+ comments?: string;
+ // 是否推荐
+ recommend?: string;
+ // 是否共享模板
+ share?: string;
+ // 排序号
+ sortNumber?: number;
+ // 用户ID
+ userId?: number;
+ // 是否删除, 0否, 1是
+ deleted?: number;
+ // 租户id
+ tenantId?: number;
+ // 创建时间
+ createTime?: string;
+ // 修改时间
+ updateTime?: string;
+}
+
+/**
+ * 网站模版搜索条件
+ */
+export interface CmsTemplateParam extends PageParam {
+ id?: number;
+ keywords?: string;
+}
diff --git a/app/api/cms/cmsWebsite/index.ts b/app/api/cms/cmsWebsite/index.ts
new file mode 100644
index 0000000..66b3629
--- /dev/null
+++ b/app/api/cms/cmsWebsite/index.ts
@@ -0,0 +1,175 @@
+import request from '@/utils/request';
+import type { ApiResult, PageResult } from '@/api';
+import type { CmsWebsite, CmsWebsiteParam } from './model';
+import {MODULES_API_URL} from '@/config/setting';
+
+/**
+ * 获取网站信息
+ */
+export async function getSiteInfo() {
+ const res = await request.get>(
+ MODULES_API_URL + '/cms/cms-website/getSiteInfo',
+ {
+ params: {}
+ }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 分页查询网站信息记录表
+ */
+export async function pageCmsWebsite(params: CmsWebsiteParam) {
+ const res = await request.get>>(
+ MODULES_API_URL + '/cms/cms-website/page',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询网站信息记录表列表
+ */
+export async function listCmsWebsite(params?: CmsWebsiteParam) {
+ const res = await request.get>(
+ MODULES_API_URL + '/cms/cms-website',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 添加网站信息记录表
+ */
+export async function addCmsWebsite(data: CmsWebsite) {
+ const res = await request.post>(
+ MODULES_API_URL + '/cms/cms-website',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 修改网站信息记录表
+ */
+export async function updateCmsWebsite(data: CmsWebsite) {
+ const res = await request.put>(
+ MODULES_API_URL + '/cms/cms-website',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除网站信息记录表
+ */
+export async function removeCmsWebsite(id?: number) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/cms/cms-website/' + id
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量删除网站信息记录表
+ */
+export async function removeBatchCmsWebsite(data: (number | undefined)[]) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/cms/cms-website/batch',
+ {
+ data
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 根据id查询网站信息记录表
+ */
+export async function getCmsWebsite(id: number) {
+ const res = await request.get>(
+ MODULES_API_URL + '/cms/cms-website/' + id
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 清除缓存
+ */
+export async function removeSiteInfoCache(key?: string) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/cms/cms-website/clearSiteInfo/' + key
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+export async function pageCmsWebsiteAll(params: CmsWebsiteParam) {
+ const res = await request.get>>(
+ MODULES_API_URL + '/cms/cms-website/pageAll',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 根据id查询网站
+ */
+export async function getCmsWebsiteAll(id: number) {
+ const res = await request.get>(
+ '/cms/cms-website/getAll/' + id
+ );
+ if (res.data.code === 0 && res.data) {
+ return res.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 修改网站信息记录表
+ */
+export async function updateCmsWebsiteAll(data: CmsWebsite) {
+ const res = await request.put>(
+ '/cms/cms-website/updateAll',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/app/api/cms/cmsWebsite/model/index.ts b/app/api/cms/cmsWebsite/model/index.ts
new file mode 100644
index 0000000..9da0091
--- /dev/null
+++ b/app/api/cms/cmsWebsite/model/index.ts
@@ -0,0 +1,168 @@
+import type { PageParam } from '@/api';
+import type { CmsWebsiteSetting } from "@/api/cms/cmsWebsiteSetting/model";
+import type { CmsNavigation } from "@/api/cms/cmsNavigation/model";
+
+/**
+ * 网站信息记录表
+ */
+export interface CmsWebsite {
+ // 站点ID
+ websiteId?: number;
+ // 网站名称
+ websiteName?: string;
+ // 网站标识
+ websiteCode?: string;
+ // 网站密钥
+ websiteSecret?: string;
+ // 网站LOGO
+ websiteIcon?: string;
+ // 网站LOGO
+ websiteLogo?: string;
+ // 网站LOGO(深色模式)
+ websiteDarkLogo?: string;
+ // 网站类型
+ websiteType?: string;
+ // 网站截图
+ files?: string;
+ // 网站类型
+ type?: number;
+ // 网站关键词
+ keywords?: string;
+ // 域名前缀
+ prefix?: string;
+ // 绑定域名
+ domain?: string;
+ // 全局样式
+ style?: string;
+ // 后台管理地址
+ adminUrl?: string;
+ // 应用版本 10标准版 20专业版 30永久授权
+ version?: number;
+ // 允许展示到插件市场
+ market?: boolean;
+ // 应用类型 0应用 1插件
+ plugin?: boolean;
+ // 默认编辑器
+ editor?: number,
+ // 服务到期时间
+ expirationTime?: string;
+ // 模版ID
+ templateId?: number;
+ // 行业类型
+ category?: string;
+ // 行业类型(父级)
+ industryParent?: string;
+ // 行业类型(子级)
+ industryChild?: string;
+ // 企业ID
+ companyId?: number;
+ // 所在国家
+ country?: string;
+ // 所在省份
+ province?: string;
+ // 所在城市
+ city?: string;
+ // 所在辖区
+ region?: string;
+ // 经度
+ longitude?: string;
+ // 纬度
+ latitude?: string;
+ // 街道地址
+ address?: string;
+ // 联系电话
+ phone?: string;
+ // 电子邮箱
+ email?: string;
+ // ICP备案号
+ icpNo?: string;
+ // 公安备案
+ policeNo?: string;
+ // 备注
+ comments?: string;
+ // 是否推荐
+ recommend?: number;
+ // 是否官方
+ official?: boolean;
+ // 是否运行中
+ running?: number;
+ // 状态 0未开通 1运行中 2维护中 3已关闭 4已欠费停机 5违规关停
+ status?: number;
+ // 维护说明
+ statusText?: string;
+ // 关闭说明
+ statusClose?: string;
+ // 全局样式
+ styles?: string;
+ // 语言
+ lang?: string;
+ // 排序号
+ sortNumber?: number;
+ // 用户ID
+ userId?: number;
+ // 是否删除, 0否, 1是
+ deleted?: number;
+ // 租户id
+ tenantId?: number;
+ // 创建时间
+ createTime?: string;
+ // 修改时间
+ updateTime?: string;
+ // 网站配置
+ config?: any;
+ // 短信验证码
+ smsCode?: string;
+ // 短信验证码
+ code?: string;
+ // 是否记住密码
+ remember?: boolean;
+ // 企业名称
+ companyName?: string;
+ // 是否注册未超级管理员
+ isSuperAdmin?: boolean;
+ // 用户名
+ username?: string;
+ // 网站配置
+ setting?: CmsWebsiteSetting;
+}
+
+export interface AppInfo {
+ appId?: number;
+ appName?: string;
+ description?: string;
+ keywords?: string;
+ appCode?: string;
+ mpQrCode?: string;
+ title?: string;
+ logo?: string;
+ icon?: string;
+ domain?: string;
+ running?: number;
+ version?: number;
+ expirationTime?: string;
+ expired?: boolean;
+ expiredDays?: number;
+ soon?: number;
+ statusIcon?: string;
+ statusText?: string;
+ config?: Object;
+ serverTime?: Object;
+ topNavs?: CmsNavigation[];
+ bottomNavs?: CmsNavigation[];
+ setting?: Object;
+ createTime?: string;
+}
+
+/**
+ * 网站信息记录表搜索条件
+ */
+export interface CmsWebsiteParam extends PageParam {
+ websiteId?: number;
+ type?: number;
+ status?: number;
+ plugin?: boolean;
+ official?: boolean;
+ keywords?: string;
+ // 按用户过滤(例如:只查询当前登录用户的应用)
+ userId?: number;
+}
diff --git a/app/api/cms/cmsWebsiteField/index.ts b/app/api/cms/cmsWebsiteField/index.ts
new file mode 100644
index 0000000..8329889
--- /dev/null
+++ b/app/api/cms/cmsWebsiteField/index.ts
@@ -0,0 +1,167 @@
+import request from '@/utils/request';
+import type { ApiResult, PageResult } from '@/api';
+import type {CmsWebsiteField, CmsWebsiteFieldParam, Config} from './model';
+import {MODULES_API_URL, TEMPLATE_ID} from '@/config/setting';
+
+/**
+ * 分页查询应用参数
+ */
+export async function pageCmsWebsiteField(params: CmsWebsiteFieldParam) {
+ const res = await request.get>>(
+ MODULES_API_URL + '/cms/cms-website-field/page',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询应用参数列表
+ */
+export async function listCmsWebsiteField(params?: CmsWebsiteFieldParam) {
+ const res = await request.get>(
+ MODULES_API_URL + '/cms/cms-website-field',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 添加应用参数
+ */
+export async function addCmsWebsiteField(data: CmsWebsiteField) {
+ const res = await request.post>(
+ MODULES_API_URL + '/cms/cms-website-field',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 修改应用参数
+ */
+export async function updateCmsWebsiteField(data: CmsWebsiteField) {
+ const res = await request.put>(
+ MODULES_API_URL + '/cms/cms-website-field',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除应用参数
+ */
+export async function removeCmsWebsiteField(id?: number) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/cms/cms-website-field/' + id
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量删除应用参数
+ */
+export async function removeBatchCmsWebsiteField(data: (number | undefined)[]) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/cms/cms-website-field/batch',
+ {
+ data
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 根据id查询应用参数
+ */
+export async function getCmsWebsiteField(id: number) {
+ const res = await request.get>(
+ MODULES_API_URL + '/cms/cms-website-field/' + id
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 根据code查询应用参数
+ */
+export async function getCmsWebsiteFieldByCode(code: string) {
+ const res = await request.get>(
+ MODULES_API_URL + '/cms/cms-website-field/getByCode/' + code
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 恢复项目参数
+ */
+export async function undeleteWebsiteField(id?: number) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/cms/website-field/undelete/' + id
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 参数批量导入
+ */
+export async function importWebsiteField(file: File) {
+ const formData = new FormData();
+ formData.append('file', file);
+ const res = await request.post>(
+ MODULES_API_URL + '/cms/cms-website-field/import',
+ formData
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询项目参数列表
+ */
+export async function configWebsiteField(params?: CmsWebsiteFieldParam) {
+ const res = await request.get>(
+ MODULES_API_URL + '/cms/cms-website-field/config',
+ {
+ params,
+ headers: {
+ TenantId: TEMPLATE_ID
+ }
+ }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/app/api/cms/cmsWebsiteField/model/index.ts b/app/api/cms/cmsWebsiteField/model/index.ts
new file mode 100644
index 0000000..17bda1d
--- /dev/null
+++ b/app/api/cms/cmsWebsiteField/model/index.ts
@@ -0,0 +1,65 @@
+import type { PageParam } from '@/api';
+
+/**
+ * 应用参数
+ */
+export interface CmsWebsiteField {
+ // 自增ID
+ id?: number;
+ // 类型,0文本 1图片 2其他
+ type?: number;
+ // 名称
+ name?: string;
+ // 默认值
+ defaultValue?: string;
+ // 可修改的值 [on|off]
+ modifyRange?: string;
+ // 备注
+ comments?: string;
+ // css样式
+ style?: string;
+ // 名称
+ value?: any;
+ // 语言
+ lang?: string;
+ // 是否加密
+ encrypted?: boolean;
+ // 模板
+ template?: string;
+ // 排序(数字越小越靠前)
+ sortNumber?: number;
+ // 是否删除, 0否, 1是
+ deleted?: number;
+ // 租户id
+ tenantId?: number;
+ // 创建时间
+ createTime?: string;
+}
+
+/**
+ * 应用参数搜索条件
+ */
+export interface CmsWebsiteFieldParam extends PageParam {
+ id?: number;
+ keywords?: string;
+}
+
+export interface Config {
+ siteName?: string;
+ siteLogo?: string;
+ domain?: string;
+ icpNo?: string;
+ copyright?: string;
+ loginBgImg?: string;
+ address?: string;
+ tel?: string;
+ kefu2?: string;
+ kefu1?: string;
+ email?: string;
+ loginTitle?: string;
+ sysLogo?: string;
+ // 添加API地址配置项
+ ApiUrl?: string;
+ // 添加主题配置项
+ theme?: string;
+}
\ No newline at end of file
diff --git a/app/api/cms/cmsWebsiteSetting/index.ts b/app/api/cms/cmsWebsiteSetting/index.ts
new file mode 100644
index 0000000..e1392a3
--- /dev/null
+++ b/app/api/cms/cmsWebsiteSetting/index.ts
@@ -0,0 +1,106 @@
+import request from '@/utils/request';
+import type { ApiResult, PageResult } from '@/api';
+import type { CmsWebsiteSetting, CmsWebsiteSettingParam } from './model';
+import { MODULES_API_URL } from '@/config/setting';
+
+/**
+ * 分页查询网站设置
+ */
+export async function pageCmsWebsiteSetting(params: CmsWebsiteSettingParam) {
+ const res = await request.get>>(
+ MODULES_API_URL + '/cms/cms-website-setting/page',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询网站设置列表
+ */
+export async function listCmsWebsiteSetting(params?: CmsWebsiteSettingParam) {
+ const res = await request.get>(
+ MODULES_API_URL + '/cms/cms-website-setting',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 添加网站设置
+ */
+export async function addCmsWebsiteSetting(data: CmsWebsiteSetting) {
+ const res = await request.post>(
+ MODULES_API_URL + '/cms/cms-website-setting',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 修改网站设置
+ */
+export async function updateCmsWebsiteSetting(data: CmsWebsiteSetting) {
+ const res = await request.put>(
+ MODULES_API_URL + '/cms/cms-website-setting',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除网站设置
+ */
+export async function removeCmsWebsiteSetting(id?: number) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/cms/cms-website-setting/' + id
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量删除网站设置
+ */
+export async function removeBatchCmsWebsiteSetting(data: (number | undefined)[]) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/cms/cms-website-setting/batch',
+ {
+ data
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 根据id查询网站设置
+ */
+export async function getCmsWebsiteSetting(id: number) {
+ const res = await request.get>(
+ MODULES_API_URL + '/cms/cms-website-setting/' + id
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/app/api/cms/cmsWebsiteSetting/model/index.ts b/app/api/cms/cmsWebsiteSetting/model/index.ts
new file mode 100644
index 0000000..71241f8
--- /dev/null
+++ b/app/api/cms/cmsWebsiteSetting/model/index.ts
@@ -0,0 +1,55 @@
+import type { PageParam } from '@/api';
+
+/**
+ * 网站设置
+ */
+export interface CmsWebsiteSetting {
+ // 自增ID
+ id?: number;
+ // 关联网站ID
+ websiteId?: number;
+ // 是否官方插件
+ official?: string;
+ // 是否展示在插件市场
+ market?: string;
+ // 是否允许被搜索
+ search?: string;
+ // 是否共享
+ share?: string;
+ // 文章是否需要审核
+ articleReview?: boolean;
+ // 是否插件 0应用1 插件
+ plugin?: string;
+ // 编辑器类型 1 md-editor-v3, 2 tinymce-editor
+ editor?: number;
+ // 显示站内搜索
+ searchBtn?: string;
+ // 显示登录注册功能
+ loginBtn?: string;
+ // 显示悬浮客服工具
+ floatTool?: boolean;
+ // 显示版权信息
+ showCopyright?: boolean;
+ // 显示版权链接
+ copyrightLink?: string;
+ // 导航栏最多显示数量
+ maxMenuNum?: string;
+ // 排序号
+ sortNumber?: number;
+ // 是否删除, 0否, 1是
+ deleted?: number;
+ // 租户id
+ tenantId?: number;
+ // 创建时间
+ createTime?: string;
+ // 修改时间
+ updateTime?: string;
+}
+
+/**
+ * 网站设置搜索条件
+ */
+export interface CmsWebsiteSettingParam extends PageParam {
+ id?: number;
+ keywords?: string;
+}
diff --git a/app/api/cms/link/index.ts b/app/api/cms/link/index.ts
new file mode 100644
index 0000000..e18a108
--- /dev/null
+++ b/app/api/cms/link/index.ts
@@ -0,0 +1,113 @@
+import request from '@/utils/request';
+import type { ApiResult, PageResult } from '@/api';
+import type { Link, LinkParam } from './model';
+import { MODULES_API_URL } from '@/config/setting';
+
+/**
+ * 分页查询链接
+ */
+export async function pageLink(params: LinkParam) {
+ const res = await request.get>>(
+ MODULES_API_URL + '/oa/link/page',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询链接列表
+ */
+export async function listLink(params?: LinkParam) {
+ const res = await request.get>(
+ MODULES_API_URL + '/oa/link',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 添加链接
+ */
+export async function addLink(data: Link) {
+ const res = await request.post>(
+ MODULES_API_URL + '/oa/link',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 修改链接
+ */
+export async function updateLink(data: Link) {
+ const res = await request.put>(
+ MODULES_API_URL + '/oa/link',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除链接
+ */
+export async function removeLink(id?: number) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/oa/link/' + id
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量删除链接
+ */
+export async function removeBatchLink(data: (number | undefined)[]) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/oa/link/batch',
+ {
+ data
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 检查IP是否存在
+ */
+export async function checkExistence(
+ field: string,
+ value: string,
+ id?: number
+) {
+ const res = await request.get>(
+ MODULES_API_URL + '/oa/link/existence',
+ {
+ params: { field, value, id }
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/app/api/cms/link/model/index.ts b/app/api/cms/link/model/index.ts
new file mode 100644
index 0000000..40f5988
--- /dev/null
+++ b/app/api/cms/link/model/index.ts
@@ -0,0 +1,31 @@
+import type { PageParam } from '@/api';
+
+/**
+ * 链接
+ */
+export interface Link {
+ id?: number;
+ name?: string;
+ icon?: string;
+ url?: string;
+ linkType?: string;
+ appId?: number;
+ categoryId?: number;
+ userId?: number;
+ comments?: string;
+ recommend?: number;
+ sortNumber?: number;
+ deleted?: number;
+ status?: number;
+ createTime?: number;
+}
+
+/**
+ * 链接搜索条件
+ */
+export interface LinkParam extends PageParam {
+ id?: number;
+ linkType?: string;
+ categoryId?: number;
+ name?: string;
+}
diff --git a/app/api/index.ts b/app/api/index.ts
new file mode 100644
index 0000000..00f3d67
--- /dev/null
+++ b/app/api/index.ts
@@ -0,0 +1,61 @@
+/**
+ * 接口统一返回结果
+ */
+export interface ApiResult {
+ // 状态码
+ code: number;
+ // 状态信息
+ message?: string;
+ // 返回数据
+ data?: T;
+}
+
+/**
+ * 分页查询统一结果
+ */
+export interface PageResult {
+ // 返回数据
+ list: T[];
+ // 总数量
+ count: number;
+}
+
+/**
+ * 分页查询基本参数
+ */
+export interface PageParam {
+ // 第几页
+ page?: number;
+ // 每页多少条
+ limit?: number;
+ // 排序字段
+ sort?: string;
+ sortNum?: string;
+ // 排序方式, asc升序, desc降序
+ order?: string;
+ // 租户ID
+ tenantId?: number;
+ // 企业ID
+ companyId?: number;
+ // 商户ID
+ merchantId?: number;
+ merchantName?: string;
+ categoryIds?: any;
+ // 商品分类
+ categoryId?: number;
+ categoryName?: string;
+ // 搜素关键词
+ keywords?: string;
+ // 起始时间
+ createTimeStart?: string;
+ // 结束时间
+ createTimeEnd?: string;
+ timeStart?: number;
+ timeEnd?: number;
+ isExpireTime?: number;
+ showSoldStatus?: boolean;
+ dateTime?: string;
+ sceneType?: string;
+ userId?: number;
+ lang?: string;
+}
diff --git a/app/api/layout/index.ts b/app/api/layout/index.ts
new file mode 100644
index 0000000..f3f7aab
--- /dev/null
+++ b/app/api/layout/index.ts
@@ -0,0 +1,153 @@
+import request from '@/utils/request';
+import type { ApiResult } from '@/api';
+import type { User } from '@/api/system/user/model';
+import type { UpdatePasswordParam, NoticeResult } from './model';
+import {SERVER_API_URL} from '@/config/setting';
+import type { Company } from '@/api/system/company/model';
+import type { CmsWebsite } from '@/api/cms/cmsWebsite/model';
+import type { Menu } from "@/api/system/menu/model";
+
+/**
+ * 获取当前登录的用户信息、菜单、权限、角色
+ */
+export async function getTenantInfo(): Promise {
+ const res = await request.get>(
+ SERVER_API_URL + '/auth/tenant'
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 获取网站信息 https://cms-api.websoft.top/api
+ */
+export async function getSiteInfo() {
+ const res = await request.get>(
+ '/shop/getShopInfo',
+ {
+ params: {}
+ }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 获取当前登录的用户信息、菜单、权限、角色
+ */
+export async function getUserInfo(): Promise {
+ const res = await request.get>(SERVER_API_URL + '/auth/user');
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 修改当前登录用户信息
+ */
+export async function updateLoginUser(data: User) {
+ const res = await request.put>(
+ SERVER_API_URL + '/auth/user',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 获取服务器时间(实时)
+ * @return
+ */
+export async function getServerTime() {
+ const res = await request.get>(
+ '/cms/website/getServerTime'
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 获取未来7天的日期
+ * @return
+ */
+export async function getNext7day() {
+ const res = await request.get>(
+ '/cms/website/getNext7day'
+ );
+ console.log('res.data.code: ', res.data.code);
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 向子模块传递token
+ * @param url
+ */
+export async function transferToken(url: string): Promise {
+ const res = await request.get>(url);
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 修改当前登录的用户密码
+ */
+export async function updatePassword(
+ data: UpdatePasswordParam
+): Promise {
+ const res = await request.put>(
+ SERVER_API_URL + '/auth/password',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message ?? '修改成功';
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 创建完整网站并初始化
+ */
+export async function createCmsWebSite(data: CmsWebsite){
+ const res = await request.post>(
+ SERVER_API_URL + '/superAdminRegister',data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 租户初始化
+ */
+export async function initialization(roleId?: number) {
+ const res = await request.get>(
+ SERVER_API_URL + '/system/tenant/role-menu/' + roleId
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询未读通知
+ */
+export async function getUnreadNotice(): Promise {
+ return {
+ notice: [],
+ letter: [],
+ todo: []
+ };
+}
diff --git a/app/api/layout/model/index.ts b/app/api/layout/model/index.ts
new file mode 100644
index 0000000..317b25d
--- /dev/null
+++ b/app/api/layout/model/index.ts
@@ -0,0 +1,74 @@
+/**
+ * 首页布局样式
+ */
+export interface Layout {
+ // 内容区域的宽度
+ width?: string;
+ // 文字颜色
+ color?: string;
+ // 高亮颜色
+ hover?: string;
+ // 背景颜色
+ backgroundColor?: string;
+ headerStyle?: any;
+ siteNameStyle?: any;
+}
+
+/**
+ * 修改密码参数
+ */
+export interface UpdatePasswordParam {
+ // 新密码
+ password: string;
+ // 原始密码
+ oldPassword: string;
+}
+
+/**
+ * 通知数据格式
+ */
+export interface NoticeModel {
+ // 图标颜色
+ color?: string;
+ // 图标
+ icon?: string;
+ // 标题
+ title?: string;
+ // 时间
+ time?: string;
+}
+
+/**
+ * 私信数据格式
+ */
+export interface LetterModel {
+ // 头像
+ avatar?: string;
+ // 标题
+ title?: string;
+ // 内容
+ content?: string;
+ // 时间
+ time?: string;
+}
+
+/**
+ * 代办数据格式
+ */
+export interface TodoModel {
+ // 状态
+ status?: number;
+ // 标题
+ title?: string;
+ // 描述
+ description?: string;
+}
+
+/**
+ * 查询未读通知返回结果
+ */
+export interface NoticeResult {
+ notice: NoticeModel[];
+ letter: LetterModel[];
+ todo: TodoModel[];
+}
diff --git a/app/api/miniprogram/index.ts b/app/api/miniprogram/index.ts
new file mode 100644
index 0000000..8cfbbc9
--- /dev/null
+++ b/app/api/miniprogram/index.ts
@@ -0,0 +1,50 @@
+import {MODULES_API_URL} from '@/config/setting';
+
+/**
+ * 小程序码参数
+ */
+export interface MiniProgramCodeParam {
+ page?: string;
+ scene: string;
+ width?: number;
+ checkPath?: boolean;
+ envVersion?: 'release' | 'trial' | 'develop';
+}
+
+/**
+ * 生成小程序码
+ */
+export async function generateMiniProgramCode(data: MiniProgramCodeParam) {
+ try {
+ const url = '/wx-login/getOrderQRCodeUnlimited/' + data.scene;
+ const fullUrl = MODULES_API_URL + `${url}`;
+
+ console.log('生成小程序码URL:', fullUrl);
+ console.log('小程序码参数:', data);
+ console.log('scene 参数:', data.scene);
+
+ // 直接返回URL,让浏览器处理图片加载
+ // scene 参数中包含了租户ID信息
+ return fullUrl;
+ } catch (error: any) {
+ console.error('生成小程序码失败:', error);
+ throw new Error(error.message || '生成小程序码失败');
+ }
+}
+
+/**
+ * 生成邀请小程序码
+ */
+export async function generateInviteCode(inviterId: number) {
+ const scene = `uid_${inviterId}`;
+
+ console.log('生成邀请小程序码 scene:', scene);
+
+ return generateMiniProgramCode({
+ page: 'pages/index/index',
+ scene: scene,
+ width: 180,
+ checkPath: true,
+ envVersion: 'trial'
+ });
+}
diff --git a/app/api/passport/login/index.ts b/app/api/passport/login/index.ts
new file mode 100644
index 0000000..433d5a8
--- /dev/null
+++ b/app/api/passport/login/index.ts
@@ -0,0 +1,117 @@
+import request from '@/utils/request';
+import { setToken } from '@/utils/token-util';
+import type { ApiResult } from '@/api';
+import type {
+ LoginParam,
+ LoginResult,
+ CaptchaResult,
+ SmsCaptchaResult
+} from './model';
+import type { User } from '@/api/system/user/model';
+import { SERVER_API_URL } from '@/config/setting';
+
+/**
+ * 登录
+ */
+export async function login(data: LoginParam) {
+ const res = await request.post>(
+ SERVER_API_URL + '/login',
+ data
+ );
+ if (res.data.code === 0) {
+ setToken(res.data.data?.access_token, data.remember);
+ if (res.data.data?.user) {
+ const user = res.data.data?.user;
+ localStorage.setItem('TenantId', String(user.tenantId));
+ localStorage.setItem('UserId', String(user.userId));
+ }
+
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 获取验证码
+ */
+export async function getCaptcha() {
+ const res = await request.get>(
+ SERVER_API_URL + '/captcha'
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+export async function loginBySms(data: LoginParam) {
+ const res = await request.post>(
+ SERVER_API_URL + '/loginBySms',
+ data
+ );
+ if (res.data.code === 0) {
+ setToken(res.data.data?.access_token, data.remember);
+ if (res.data.data?.user) {
+ const user = res.data.data?.user;
+ localStorage.setItem('TenantId', String(user.tenantId));
+ localStorage.setItem('UserId', String(user.userId));
+ }
+
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 发送短信验证码
+ */
+export async function sendSmsCaptcha(data: LoginParam) {
+ const res = await request.post>(
+ SERVER_API_URL + '/sendSmsCaptcha',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 登录
+ */
+export async function remoteLogin(data: LoginParam) {
+ const res = await request.post>(
+ 'https://open.gxwebsoft.com/api/login',
+ data
+ );
+ if (res.data.code === 0) {
+ setToken(res.data.data?.access_token, data.remember);
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 获取企业微信登录链接
+ */
+export async function getWxWorkQrConnect(data) {
+ const res = await request.post>(
+ SERVER_API_URL + '/wx-work',
+ data
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+export async function registerUser(data: User) {
+ const res = await request.post>(
+ SERVER_API_URL + '/register',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/app/api/passport/login/model/index.ts b/app/api/passport/login/model/index.ts
new file mode 100644
index 0000000..1f1c822
--- /dev/null
+++ b/app/api/passport/login/model/index.ts
@@ -0,0 +1,46 @@
+import type { User } from '@/api/system/user/model';
+/**
+ * 登录参数
+ */
+export interface LoginParam {
+ // 账号
+ username?: string;
+ // 密码
+ password?: string;
+ // 租户id
+ tenantId?: number;
+ // 是否记住密码
+ remember?: boolean;
+ // 手机号码
+ phone?: string;
+ // 短信验证码
+ code?: string;
+}
+
+/**
+ * 登录返回结果
+ */
+export interface LoginResult {
+ // token
+ access_token?: string;
+ // 用户信息
+ user?: User;
+}
+
+/**
+ * 图形验证码返回结果
+ */
+export interface CaptchaResult {
+ // 图形验证码base64数据
+ base64: string;
+ // 验证码文本
+ text: string;
+}
+
+/**
+ * 短信验证码返回结果
+ */
+export interface SmsCaptchaResult {
+ // 验证码文本
+ text: string;
+}
diff --git a/app/api/passport/qrLogin/index.ts b/app/api/passport/qrLogin/index.ts
new file mode 100644
index 0000000..197a9b0
--- /dev/null
+++ b/app/api/passport/qrLogin/index.ts
@@ -0,0 +1,111 @@
+import request from '@/utils/request';
+import type { ApiResult } from '@/api';
+import { SERVER_API_URL } from '@/config/setting';
+
+/**
+ * 二维码生成响应数据
+ */
+export interface QrCodeResponse {
+ token: string; // 二维码唯一标识token
+ qrCode: string; // 二维码内容
+ expiresIn: number; // 过期时间(秒)
+}
+
+/**
+ * 二维码状态响应
+ */
+export interface QrCodeStatusResponse {
+ status: 'pending' | 'scanned' | 'confirmed' | 'expired';
+ accessToken?: string; // 登录成功时返回的JWT token
+ access_token?: string; // 兼容后端下划线命名
+ userInfo?: any; // 用户信息
+ expiresIn?: number; // 剩余过期时间(秒)
+ tenantId?: string; // 租户ID
+}
+
+/**
+ * 确认登录请求参数
+ */
+export interface QrLoginConfirmRequest {
+ token: string; // 二维码token
+ userId?: number; // 用户ID
+ platform?: string; // 登录平台
+}
+
+/**
+ * 生成登录二维码
+ */
+export async function generateQrCode(): Promise {
+ const res = await request.post>(
+ SERVER_API_URL + '/qr-login/generate',
+ {}
+ );
+
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+
+ return Promise.reject(new Error(res.data.message || '生成二维码失败'));
+}
+
+/**
+ * 检查二维码状态
+ */
+export async function checkQrCodeStatus(token: string): Promise {
+ const res = await request.get>(
+ SERVER_API_URL + `/qr-login/status/${token}`
+ );
+
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+
+ return Promise.reject(new Error(res.data.message || '检查二维码状态失败'));
+}
+
+/**
+ * 扫码确认登录(移动端调用)
+ */
+export async function confirmQrLogin(requestData: QrLoginConfirmRequest): Promise {
+ const res = await request.post>(
+ SERVER_API_URL + '/qr-login/confirm',
+ requestData
+ );
+ console.log(res,'>>>89898989')
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+
+ return Promise.reject(new Error(res.data.message || '确认登录失败'));
+}
+
+/**
+ * 扫码标记(移动端扫码时调用)
+ */
+export async function scanQrCode(token: string): Promise {
+ const res = await request.post>(
+ SERVER_API_URL + `/qr-login/scan/${token}`
+ );
+
+ if (res.data.code === 0) {
+ return res.data.data || true;
+ }
+
+ return Promise.reject(new Error(res.data.message || '扫码失败'));
+}
+
+/**
+ * 微信小程序扫码登录确认
+ */
+export async function wechatMiniProgramConfirm(requestData: QrLoginConfirmRequest): Promise {
+ const res = await request.post>(
+ SERVER_API_URL + '/qr-login/wechat-confirm',
+ requestData
+ );
+
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+
+ return Promise.reject(new Error(res.data.message || '微信小程序登录确认失败'));
+}
diff --git a/app/api/sdy/sdyDealerOrder/index.ts b/app/api/sdy/sdyDealerOrder/index.ts
new file mode 100644
index 0000000..bd57cc4
--- /dev/null
+++ b/app/api/sdy/sdyDealerOrder/index.ts
@@ -0,0 +1,135 @@
+import request from '@/utils/request';
+import type {ApiResult} from '@/api';
+import type {ShopDealerOrder, ShopDealerOrderParam} from './model';
+import {utils, writeFile} from 'xlsx';
+import {message} from 'ant-design-vue';
+import {getTenantId} from '@/utils/domain';
+import {listShopDealerOrder} from "@/api/shop/shopDealerOrder";
+import {MODULES_API_URL} from "@/config/setting";
+
+/**
+ * 导入分销商订单
+ */
+export async function importSdyDealerOrder(file: File) {
+ const formData = new FormData();
+ formData.append('file', file);
+ const res = await request.post>(
+ MODULES_API_URL + '/sdy/sdy-dealer-order/import',
+ formData
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 导出分销商订单
+ */
+export async function exportSdyDealerOrder(params?: ShopDealerOrderParam) {
+ // 显示导出加载提示
+ message.loading('正在准备导出数据...', 0);
+
+ try {
+ // 获取数据
+ const list = await listShopDealerOrder(params);
+
+ if (!list || list.length === 0) {
+ message.destroy();
+ message.warning('没有数据可以导出');
+ return;
+ }
+
+ // 构建导出数据
+ const array: (string | number)[][] = [
+ [
+ '订单ID',
+ '买家用户ID',
+ '订单总金额',
+ '一级分销商ID',
+ '一级佣金',
+ '二级分销商ID',
+ '二级佣金',
+ '三级分销商ID',
+ '三级佣金',
+ '订单状态',
+ '结算状态',
+ '结算时间',
+ '创建时间'
+ ]
+ ];
+
+ list.forEach((order: ShopDealerOrder) => {
+ array.push([
+ order.orderNo || '',
+ order.userId || '',
+ order.orderPrice || '0',
+ order.firstUserId || '',
+ order.firstMoney || '0',
+ order.secondUserId || '',
+ order.secondMoney || '0',
+ order.thirdUserId || '',
+ order.thirdMoney || '0',
+ order.isInvalid === 0 ? '有效' : '失效',
+ order.isSettled === 0 ? '未结算' : '已结算',
+ order.settleTime ? new Date(order.settleTime).toLocaleString() : '',
+ order.createTime || ''
+ ]);
+ });
+
+ // 创建工作簿
+ const sheetName = `shop_dealer_order_${getTenantId()}`;
+ const workbook = {
+ SheetNames: [sheetName],
+ Sheets: {}
+ };
+
+ const sheet = utils.aoa_to_sheet(array);
+ workbook.Sheets[sheetName] = sheet;
+
+ // 设置列宽
+ sheet['!cols'] = [
+ {wch: 15}, // 订单ID
+ {wch: 12}, // 买家用户ID
+ {wch: 12}, // 订单总金额
+ {wch: 15}, // 一级分销商ID
+ {wch: 12}, // 一级佣金
+ {wch: 15}, // 二级分销商ID
+ {wch: 12}, // 二级佣金
+ {wch: 15}, // 三级分销商ID
+ {wch: 12}, // 三级佣金
+ {wch: 10}, // 订单状态
+ {wch: 10}, // 结算状态
+ {wch: 20}, // 结算时间
+ {wch: 20} // 创建时间
+ ];
+
+ message.destroy();
+ message.loading('正在生成Excel文件...', 0);
+
+ // 延迟写入文件,确保消息提示显示
+ setTimeout(() => {
+ writeFile(workbook, `${sheetName}.xlsx`);
+ message.destroy();
+ message.success(`成功导出 ${list.length} 条记录`);
+ }, 1000);
+
+ } catch (error: any) {
+ message.destroy();
+ message.error(error.message || '导出失败,请重试');
+ }
+}
+
+/**
+ * 结算订单
+ */
+export async function updateSdyDealerOrder(data: ShopDealerOrder) {
+ const res = await request.put>(
+ '/sdy/sdy-dealer-order',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/app/api/sdy/sdyDealerOrder/model/index.ts b/app/api/sdy/sdyDealerOrder/model/index.ts
new file mode 100644
index 0000000..acf02b4
--- /dev/null
+++ b/app/api/sdy/sdyDealerOrder/model/index.ts
@@ -0,0 +1,75 @@
+import type { PageParam } from '@/api';
+
+/**
+ * 分销商订单记录表
+ */
+export interface ShopDealerOrder {
+ // 主键ID
+ id?: number;
+ // 客户名称
+ title?: string;
+ // 买家用户ID
+ userId?: number;
+ // 业务员
+ nickname?: string;
+ // 订单编号
+ orderNo?: string;
+ // 订单总金额(不含运费)
+ orderPrice?: string;
+ // 价格
+ price?: string;
+ // 结算金额
+ settledPrice?: string;
+ // 换算成度
+ degreePrice?: string;
+ // 汇率
+ rate?: number;
+ // 月份
+ month?: string;
+ // 实发金额
+ payPrice?: string;
+ // 分销商用户id(一级)
+ firstUserId?: number;
+ // 分销商用户id(二级)
+ secondUserId?: number;
+ // 分销商用户id(三级)
+ thirdUserId?: number;
+ // 一级分销商昵称
+ firstNickname?: string;
+ // 二级分销商昵称
+ secondNickname?: string;
+ // 三级分销商昵称
+ thirdNickname?: string;
+ // 分销佣金(一级)
+ firstMoney?: string;
+ // 分销佣金(二级)
+ secondMoney?: string;
+ // 分销佣金(三级)
+ thirdMoney?: string;
+ // 订单是否失效(0未失效 1已失效)
+ isInvalid?: number;
+ // 佣金结算(0未结算 1已结算)
+ isSettled?: number;
+ // 结算时间
+ settleTime?: number;
+ // 商城ID
+ tenantId?: number;
+ // 创建时间
+ createTime?: string;
+ // 修改时间
+ updateTime?: string;
+}
+
+/**
+ * 分销商订单记录表搜索条件
+ */
+export interface ShopDealerOrderParam extends PageParam {
+ id?: number;
+ orderId?: number;
+ orderNo?: string;
+ productName?: string;
+ userId?: number;
+ isInvalid?: number;
+ isSettled?: number;
+ keywords?: string;
+}
diff --git a/app/api/shop/shopCommissionRole/index.ts b/app/api/shop/shopCommissionRole/index.ts
new file mode 100644
index 0000000..60db05d
--- /dev/null
+++ b/app/api/shop/shopCommissionRole/index.ts
@@ -0,0 +1,105 @@
+import request from '@/utils/request';
+import type { ApiResult, PageResult } from '@/api';
+import type { ShopCommissionRole, ShopCommissionRoleParam } from './model';
+
+/**
+ * 分页查询分红角色
+ */
+export async function pageShopCommissionRole(params: ShopCommissionRoleParam) {
+ const res = await request.get>>(
+ '/shop/shop-commission-role/page',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询分红角色列表
+ */
+export async function listShopCommissionRole(params?: ShopCommissionRoleParam) {
+ const res = await request.get>(
+ '/shop/shop-commission-role',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 添加分红角色
+ */
+export async function addShopCommissionRole(data: ShopCommissionRole) {
+ const res = await request.post>(
+ '/shop/shop-commission-role',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 修改分红角色
+ */
+export async function updateShopCommissionRole(data: ShopCommissionRole) {
+ const res = await request.put>(
+ '/shop/shop-commission-role',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除分红角色
+ */
+export async function removeShopCommissionRole(id?: number) {
+ const res = await request.delete>(
+ '/shop/shop-commission-role/' + id
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量删除分红角色
+ */
+export async function removeBatchShopCommissionRole(data: (number | undefined)[]) {
+ const res = await request.delete>(
+ '/shop/shop-commission-role/batch',
+ {
+ data
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 根据id查询分红角色
+ */
+export async function getShopCommissionRole(id: number) {
+ const res = await request.get>(
+ '/shop/shop-commission-role/' + id
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/app/api/shop/shopCommissionRole/model/index.ts b/app/api/shop/shopCommissionRole/model/index.ts
new file mode 100644
index 0000000..4309104
--- /dev/null
+++ b/app/api/shop/shopCommissionRole/model/index.ts
@@ -0,0 +1,35 @@
+import type { PageParam } from '@/api';
+
+/**
+ * 分红角色
+ */
+export interface ShopCommissionRole {
+ //
+ id?: number;
+ //
+ title?: string;
+ //
+ provinceId?: number;
+ //
+ cityId?: number;
+ //
+ regionId?: number;
+ // 状态, 0正常, 1异常
+ status?: number;
+ // 备注
+ comments?: string;
+ // 租户id
+ tenantId?: number;
+ // 创建时间
+ createTime?: string;
+ //
+ sortNumber?: number;
+}
+
+/**
+ * 分红角色搜索条件
+ */
+export interface ShopCommissionRoleParam extends PageParam {
+ id?: number;
+ keywords?: string;
+}
diff --git a/app/api/shop/shopCoupon/index.ts b/app/api/shop/shopCoupon/index.ts
new file mode 100644
index 0000000..0327e4f
--- /dev/null
+++ b/app/api/shop/shopCoupon/index.ts
@@ -0,0 +1,105 @@
+import request from '@/utils/request';
+import type { ApiResult, PageResult } from '@/api';
+import type { ShopCoupon, ShopCouponParam } from './model';
+
+/**
+ * 分页查询优惠券
+ */
+export async function pageShopCoupon(params: ShopCouponParam) {
+ const res = await request.get>>(
+ '/shop/shop-coupon/page',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询优惠券列表
+ */
+export async function listShopCoupon(params?: ShopCouponParam) {
+ const res = await request.get>(
+ '/shop/shop-coupon',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 添加优惠券
+ */
+export async function addShopCoupon(data: ShopCoupon) {
+ const res = await request.post>(
+ '/shop/shop-coupon',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 修改优惠券
+ */
+export async function updateShopCoupon(data: ShopCoupon) {
+ const res = await request.put>(
+ '/shop/shop-coupon',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除优惠券
+ */
+export async function removeShopCoupon(id?: number) {
+ const res = await request.delete>(
+ '/shop/shop-coupon/' + id
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量删除优惠券
+ */
+export async function removeBatchShopCoupon(data: (number | undefined)[]) {
+ const res = await request.delete>(
+ '/shop/shop-coupon/batch',
+ {
+ data
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 根据id查询优惠券
+ */
+export async function getShopCoupon(id: number) {
+ const res = await request.get>(
+ '/shop/shop-coupon/' + id
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/app/api/shop/shopCoupon/model/index.ts b/app/api/shop/shopCoupon/model/index.ts
new file mode 100644
index 0000000..218fc2e
--- /dev/null
+++ b/app/api/shop/shopCoupon/model/index.ts
@@ -0,0 +1,71 @@
+import type { PageParam } from '@/api/index';
+import {ShopCouponApplyCate} from "@/api/shop/shopCouponApplyCate/model";
+import {ShopCouponApplyItem} from "@/api/shop/shopCouponApplyItem/model";
+
+/**
+ * 优惠券
+ */
+export interface ShopCoupon {
+ // id
+ id?: number;
+ // 优惠券名称
+ name?: string;
+ // 优惠券描述
+ description?: string;
+ // 优惠券类型(10满减券 20折扣券 30免费劵)
+ type?: number;
+ // 满减券-减免金额
+ reducePrice?: string;
+ // 折扣券-折扣率(0-100)
+ discount?: number;
+ // 最低消费金额
+ minPrice?: string;
+ // 到期类型(10领取后生效 20固定时间)
+ expireType?: number;
+ // 领取后生效-有效天数
+ expireDay?: number;
+ // 有效期开始时间
+ startTime?: string | Date;
+ // 有效期结束时间
+ endTime?: string | Date;
+ // 适用范围(10全部商品 20指定商品 30指定分类)
+ applyRange?: number;
+ // 适用范围配置(json格式)
+ applyRangeConfig?: string;
+ // 是否过期(0未过期 1已过期)
+ isExpire?: number;
+ // 排序(数字越小越靠前)
+ sortNumber?: number;
+ // 状态, 0正常, 1禁用
+ status?: number;
+ // 是否删除, 0否, 1是
+ deleted?: number;
+ // 创建用户ID
+ userId?: number;
+ // 租户id
+ tenantId?: number;
+ // 创建时间
+ createTime?: string | Date;
+ // 修改时间
+ updateTime?: string | Date;
+ // 发放总数量(-1表示无限制)
+ totalCount?: number;
+ // 已发放数量
+ issuedCount?: number;
+ // 每人限领数量(-1表示无限制)
+ limitPerUser?: number;
+ // 是否启用(0禁用 1启用)
+ enabled?: string;
+ couponApplyCateList?: ShopCouponApplyCate[];
+ couponApplyItemList?: ShopCouponApplyItem[];
+}
+
+/**
+ * 优惠券搜索条件
+ */
+export interface ShopCouponParam extends PageParam {
+ id?: number;
+ name?: string;
+ type?: number;
+ keywords?: string;
+}
diff --git a/app/api/shop/shopCouponApplyCate/model/index.ts b/app/api/shop/shopCouponApplyCate/model/index.ts
new file mode 100644
index 0000000..2adc829
--- /dev/null
+++ b/app/api/shop/shopCouponApplyCate/model/index.ts
@@ -0,0 +1,11 @@
+
+/**
+ * 优惠券
+ */
+export interface ShopCouponApplyCate {
+ id?: number;
+ couponId?: number;
+ cateId?: number;
+ cateLevel?: number;
+
+}
diff --git a/app/api/shop/shopCouponApplyItem/model/index.ts b/app/api/shop/shopCouponApplyItem/model/index.ts
new file mode 100644
index 0000000..a9ed201
--- /dev/null
+++ b/app/api/shop/shopCouponApplyItem/model/index.ts
@@ -0,0 +1,11 @@
+
+/**
+ * 优惠券
+ */
+export interface ShopCouponApplyItem {
+ id?: number;
+ couponId?: number;
+ type?: number;
+ pk?: number;
+
+}
diff --git a/app/api/shop/shopDealerApply/index.ts b/app/api/shop/shopDealerApply/index.ts
new file mode 100644
index 0000000..1cf1f57
--- /dev/null
+++ b/app/api/shop/shopDealerApply/index.ts
@@ -0,0 +1,158 @@
+import request from '@/utils/request';
+import type { ApiResult, PageResult } from '@/api';
+import type { ShopDealerApply, ShopDealerApplyParam } from './model';
+
+/**
+ * 分页查询分销商申请记录表
+ */
+export async function pageShopDealerApply(params: ShopDealerApplyParam) {
+ const res = await request.get>>(
+ '/shop/shop-dealer-apply/page',
+ {params}
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询分销商申请记录表列表
+ */
+export async function listShopDealerApply(params?: ShopDealerApplyParam) {
+ const res = await request.get>(
+ '/shop/shop-dealer-apply',
+ {params}
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 添加分销商申请记录表
+ */
+export async function addShopDealerApply(data: ShopDealerApply) {
+ const res = await request.post>(
+ '/shop/shop-dealer-apply',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 修改分销商申请记录表
+ */
+export async function updateShopDealerApply(data: ShopDealerApply) {
+ const res = await request.put>(
+ '/shop/shop-dealer-apply',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除分销商申请记录表
+ */
+export async function removeShopDealerApply(id?: number) {
+ const res = await request.delete>(
+ '/shop/shop-dealer-apply/' + id
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量删除分销商申请记录表
+ */
+export async function removeBatchShopDealerApply(data: (number | undefined)[]) {
+ const res = await request.delete>(
+ '/shop/shop-dealer-apply/batch',
+ {
+ data
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 根据id查询分销商申请记录表
+ */
+export async function getShopDealerApply(id: number) {
+ const res = await request.get>(
+ '/shop/shop-dealer-apply/' + id
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 审核通过分销商申请
+ */
+export async function approveShopDealerApply(id: number) {
+ const res = await request.put>(
+ `/shop/shop-dealer-apply/${id}/approve`
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 驳回分销商申请
+ */
+export async function rejectShopDealerApply(id: number, data: { rejectReason: string }) {
+ const res = await request.put>(
+ `/shop/shop-dealer-apply/${id}/reject`,
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量审核通过分销商申请
+ */
+export async function batchApproveShopDealerApply(ids: number[]) {
+ const res = await request.put>(
+ '/shop/shop-dealer-apply/batch-approve',
+ { ids }
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 导入经销商申请
+ */
+export async function importShopDealerApplies(file: File) {
+ const formData = new FormData();
+ formData.append('file', file);
+ const res = await request.post>(
+ '/shop/shop-dealer-apply/import',
+ formData
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/app/api/shop/shopDealerApply/model/index.ts b/app/api/shop/shopDealerApply/model/index.ts
new file mode 100644
index 0000000..bc35074
--- /dev/null
+++ b/app/api/shop/shopDealerApply/model/index.ts
@@ -0,0 +1,61 @@
+import type { PageParam } from '@/api';
+
+/**
+ * 分销商申请记录表
+ */
+export interface ShopDealerApply {
+ // 主键ID
+ applyId?: number;
+ // 类型
+ type?: number;
+ // 用户ID
+ userId?: number;
+ // 昵称
+ nickName?: string;
+ // 姓名
+ realName?: string;
+ // 经销商名称
+ dealerName?: string;
+ // 手机号
+ mobile?: string;
+ // 分销比例
+ rate?: number;
+ // 推荐人用户ID
+ refereeId?: number;
+ // 推荐人姓名
+ refereeName?: string;
+ // 申请方式(10需后台审核 20无需审核)
+ applyType?: number;
+ // 申请时间
+ applyTime?: string | number | Date;
+ // 审核状态 (10待审核 20审核通过 30驳回)
+ applyStatus?: number;
+ // 审核时间
+ auditTime?: string | number | Date;
+ // 驳回原因
+ rejectReason?: string;
+ comments?: string;
+ // 商城ID
+ tenantId?: number;
+ // 创建时间
+ createTime?: string;
+ // 修改时间
+ updateTime?: string;
+}
+
+/**
+ * 分销商申请记录表搜索条件
+ */
+export interface ShopDealerApplyParam extends PageParam {
+ applyId?: number;
+ userId?: number;
+ realName?: string;
+ dealerName?: string;
+ mobile?: string;
+ refereeId?: number;
+ applyType?: number;
+ applyStatus?: number;
+ startTime?: string;
+ endTime?: string;
+ keywords?: string;
+}
diff --git a/app/api/shop/shopDealerCapital/index.ts b/app/api/shop/shopDealerCapital/index.ts
new file mode 100644
index 0000000..1792423
--- /dev/null
+++ b/app/api/shop/shopDealerCapital/index.ts
@@ -0,0 +1,105 @@
+import request from '@/utils/request';
+import type { ApiResult, PageResult } from '@/api';
+import type { ShopDealerCapital, ShopDealerCapitalParam } from './model';
+
+/**
+ * 分页查询分销商资金明细表
+ */
+export async function pageShopDealerCapital(params: ShopDealerCapitalParam) {
+ const res = await request.get>>(
+ '/shop/shop-dealer-capital/page',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询分销商资金明细表列表
+ */
+export async function listShopDealerCapital(params?: ShopDealerCapitalParam) {
+ const res = await request.get>(
+ '/shop/shop-dealer-capital',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 添加分销商资金明细表
+ */
+export async function addShopDealerCapital(data: ShopDealerCapital) {
+ const res = await request.post>(
+ '/shop/shop-dealer-capital',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 修改分销商资金明细表
+ */
+export async function updateShopDealerCapital(data: ShopDealerCapital) {
+ const res = await request.put>(
+ '/shop/shop-dealer-capital',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除分销商资金明细表
+ */
+export async function removeShopDealerCapital(id?: number) {
+ const res = await request.delete>(
+ '/shop/shop-dealer-capital/' + id
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量删除分销商资金明细表
+ */
+export async function removeBatchShopDealerCapital(data: (number | undefined)[]) {
+ const res = await request.delete