diff --git a/src/api/cms/website/field/index.ts b/src/api/cms/website/field/index.ts index 426d6e5..b621b51 100644 --- a/src/api/cms/website/field/index.ts +++ b/src/api/cms/website/field/index.ts @@ -127,3 +127,16 @@ export async function checkExistence( } 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)); +} diff --git a/src/api/cms/website/field/model/index.ts b/src/api/cms/website/field/model/index.ts index 16708eb..827cf07 100644 --- a/src/api/cms/website/field/model/index.ts +++ b/src/api/cms/website/field/model/index.ts @@ -9,10 +9,21 @@ export interface WebsiteField { value?: string; comments?: string; userId?: number; - websiteId?: number; + type?: number; status?: any; sortNumber?: any; createTime?: string; + deleted?: number; +} + +// 约定的网站参数名称 +export interface WebsiteParam { + // 网站名称 + site_logo?: string; + // 登录页面标题 + login_name?: string; + // 登录页面的背景图片 + login_bg_img?: string; } /** @@ -20,7 +31,7 @@ export interface WebsiteField { */ export interface WebsiteFieldParam extends PageParam { id?: number; - name?: string; userId?: number; + name?: string; websiteId?: number; } diff --git a/src/api/passport/login/index.ts b/src/api/passport/login/index.ts index 8dfb744..35a6a50 100644 --- a/src/api/passport/login/index.ts +++ b/src/api/passport/login/index.ts @@ -44,6 +44,26 @@ export async function getCaptcha() { 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('Phone', String(user.phone)); + localStorage.setItem('UserId', String(user.userId)); + localStorage.setItem('MerchantId', String(user.merchantId)); + } + + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + /** * 发送短信验证码 */ diff --git a/src/api/shop/merchant/index.ts b/src/api/shop/merchant/index.ts index 1f410d9..dfcf7d2 100644 --- a/src/api/shop/merchant/index.ts +++ b/src/api/shop/merchant/index.ts @@ -1,14 +1,14 @@ import request from '@/utils/request'; import type { ApiResult, PageResult } from '@/api'; import type { Merchant, MerchantParam } from './model'; -import { MODULES_API_URL } from '@/config/setting'; +import { SERVER_API_URL } from '@/config/setting'; /** * 分页查询商户 */ export async function pageMerchant(params: MerchantParam) { const res = await request.get>>( - MODULES_API_URL + '/shop/merchant/page', + SERVER_API_URL + '/system/merchant/page', { params } @@ -24,7 +24,7 @@ export async function pageMerchant(params: MerchantParam) { */ export async function listMerchant(params?: MerchantParam) { const res = await request.get>( - MODULES_API_URL + '/shop/merchant', + SERVER_API_URL + '/system/merchant', { params } @@ -40,7 +40,7 @@ export async function listMerchant(params?: MerchantParam) { */ export async function addMerchant(data: Merchant) { const res = await request.post>( - MODULES_API_URL + '/shop/merchant', + SERVER_API_URL + '/system/merchant', data ); if (res.data.code === 0) { @@ -54,7 +54,7 @@ export async function addMerchant(data: Merchant) { */ export async function updateMerchant(data: Merchant) { const res = await request.put>( - MODULES_API_URL + '/shop/merchant', + SERVER_API_URL + '/system/merchant', data ); if (res.data.code === 0) { @@ -68,7 +68,7 @@ export async function updateMerchant(data: Merchant) { */ export async function removeMerchant(id?: number) { const res = await request.delete>( - MODULES_API_URL + '/shop/merchant/' + id + SERVER_API_URL + '/system/merchant/' + id ); if (res.data.code === 0) { return res.data.message; @@ -81,7 +81,7 @@ export async function removeMerchant(id?: number) { */ export async function removeBatchMerchant(data: (number | undefined)[]) { const res = await request.delete>( - MODULES_API_URL + '/shop/merchant/batch', + SERVER_API_URL + '/system/merchant/batch', { data } @@ -97,7 +97,7 @@ export async function removeBatchMerchant(data: (number | undefined)[]) { */ export async function getMerchant(id: number) { const res = await request.get>( - MODULES_API_URL + '/shop/merchant/' + id + SERVER_API_URL + '/system/merchant/' + id ); if (res.data.code === 0 && res.data.data) { return res.data.data; diff --git a/src/api/shop/merchant/model/index.ts b/src/api/shop/merchant/model/index.ts index cd10150..ebb896d 100644 --- a/src/api/shop/merchant/model/index.ts +++ b/src/api/shop/merchant/model/index.ts @@ -55,10 +55,6 @@ export interface Merchant { // 默认商户管理角色ID roleId?: number; roleName?: string; - key?: number; - value?: number; - title?: string; - disabled?: boolean; } /** diff --git a/src/api/shop/merchantAccount/index.ts b/src/api/shop/merchantAccount/index.ts index c28495f..fcbed1c 100644 --- a/src/api/shop/merchantAccount/index.ts +++ b/src/api/shop/merchantAccount/index.ts @@ -1,14 +1,14 @@ import request from '@/utils/request'; import type { ApiResult, PageResult } from '@/api'; import type { MerchantAccount, MerchantAccountParam } from './model'; -import { MODULES_API_URL } from '@/config/setting'; +import { SERVER_API_URL } from '@/config/setting'; /** * 分页查询商户账号 */ export async function pageMerchantAccount(params: MerchantAccountParam) { const res = await request.get>>( - MODULES_API_URL + '/shop/merchant-account/page', + SERVER_API_URL + '/system/merchant-account/page', { params } @@ -24,7 +24,7 @@ export async function pageMerchantAccount(params: MerchantAccountParam) { */ export async function listMerchantAccount(params?: MerchantAccountParam) { const res = await request.get>( - MODULES_API_URL + '/shop/merchant-account', + SERVER_API_URL + '/system/merchant-account', { params } @@ -40,7 +40,7 @@ export async function listMerchantAccount(params?: MerchantAccountParam) { */ export async function addMerchantAccount(data: MerchantAccount) { const res = await request.post>( - MODULES_API_URL + '/shop/merchant-account', + SERVER_API_URL + '/system/merchant-account', data ); if (res.data.code === 0) { @@ -54,7 +54,7 @@ export async function addMerchantAccount(data: MerchantAccount) { */ export async function updateMerchantAccount(data: MerchantAccount) { const res = await request.put>( - MODULES_API_URL + '/shop/merchant-account', + SERVER_API_URL + '/system/merchant-account', data ); if (res.data.code === 0) { @@ -68,7 +68,7 @@ export async function updateMerchantAccount(data: MerchantAccount) { */ export async function removeMerchantAccount(id?: number) { const res = await request.delete>( - MODULES_API_URL + '/shop/merchant-account/' + id + SERVER_API_URL + '/system/merchant-account/' + id ); if (res.data.code === 0) { return res.data.message; @@ -81,7 +81,7 @@ export async function removeMerchantAccount(id?: number) { */ export async function removeBatchMerchantAccount(data: (number | undefined)[]) { const res = await request.delete>( - MODULES_API_URL + '/shop/merchant-account/batch', + SERVER_API_URL + '/system/merchant-account/batch', { data } @@ -97,10 +97,26 @@ export async function removeBatchMerchantAccount(data: (number | undefined)[]) { */ export async function getMerchantAccount(id: number) { const res = await request.get>( - MODULES_API_URL + '/shop/merchant-account/' + id + SERVER_API_URL + '/system/merchant-account/' + id ); if (res.data.code === 0 && res.data.data) { return res.data.data; } return Promise.reject(new Error(res.data.message)); } + +export async function getMerchantAccountByPhone(params?: MerchantAccountParam) { + const res = await request.get>( + SERVER_API_URL + '/system/merchant-account/getMerchantAccountByPhone', + { + params + } + ); + if (res.data.code === 1) { + return null; + } + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} diff --git a/src/api/shop/merchantAccount/model/index.ts b/src/api/shop/merchantAccount/model/index.ts index ca0ca67..9bc20a3 100644 --- a/src/api/shop/merchantAccount/model/index.ts +++ b/src/api/shop/merchantAccount/model/index.ts @@ -14,6 +14,8 @@ export interface MerchantAccount { // 商户ID merchantId?: number; merchantName?: string; + // 是否需要审核 + goodsReview?: boolean; roleId?: number; roleName?: string; // 用户ID @@ -35,5 +37,6 @@ export interface MerchantAccount { */ export interface MerchantAccountParam extends PageParam { id?: number; + phone?: string; keywords?: string; } diff --git a/src/api/shop/merchantApply/index.ts b/src/api/shop/merchantApply/index.ts index 6a58bd5..e787997 100644 --- a/src/api/shop/merchantApply/index.ts +++ b/src/api/shop/merchantApply/index.ts @@ -1,14 +1,14 @@ import request from '@/utils/request'; import type { ApiResult, PageResult } from '@/api'; import type { MerchantApply, MerchantApplyParam } from './model'; -import { MODULES_API_URL } from '@/config/setting'; +import { SERVER_API_URL } from '@/config/setting'; /** * 分页查询商户入驻申请 */ export async function pageMerchantApply(params: MerchantApplyParam) { const res = await request.get>>( - MODULES_API_URL + '/shop/merchant-apply/page', + SERVER_API_URL + '/system/merchant-apply/page', { params } @@ -24,7 +24,7 @@ export async function pageMerchantApply(params: MerchantApplyParam) { */ export async function listMerchantApply(params?: MerchantApplyParam) { const res = await request.get>( - MODULES_API_URL + '/shop/merchant-apply', + SERVER_API_URL + '/system/merchant-apply', { params } @@ -40,7 +40,7 @@ export async function listMerchantApply(params?: MerchantApplyParam) { */ export async function addMerchantApply(data: MerchantApply) { const res = await request.post>( - MODULES_API_URL + '/shop/merchant-apply', + SERVER_API_URL + '/system/merchant-apply', data ); if (res.data.code === 0) { @@ -54,7 +54,7 @@ export async function addMerchantApply(data: MerchantApply) { */ export async function updateMerchantApply(data: MerchantApply) { const res = await request.put>( - MODULES_API_URL + '/shop/merchant-apply', + SERVER_API_URL + '/system/merchant-apply', data ); if (res.data.code === 0) { @@ -68,7 +68,7 @@ export async function updateMerchantApply(data: MerchantApply) { */ export async function removeMerchantApply(id?: number) { const res = await request.delete>( - MODULES_API_URL + '/shop/merchant-apply/' + id + SERVER_API_URL + '/system/merchant-apply/' + id ); if (res.data.code === 0) { return res.data.message; @@ -81,7 +81,7 @@ export async function removeMerchantApply(id?: number) { */ export async function removeBatchMerchantApply(data: (number | undefined)[]) { const res = await request.delete>( - MODULES_API_URL + '/shop/merchant-apply/batch', + SERVER_API_URL + '/system/merchant-apply/batch', { data } @@ -97,7 +97,7 @@ export async function removeBatchMerchantApply(data: (number | undefined)[]) { */ export async function getMerchantApply(id: number) { const res = await request.get>( - MODULES_API_URL + '/shop/merchant-apply/' + id + SERVER_API_URL + '/system/merchant-apply/' + id ); if (res.data.code === 0 && res.data.data) { return res.data.data; diff --git a/src/api/shop/merchantType/index.ts b/src/api/shop/merchantType/index.ts index ae2c09c..95c7844 100644 --- a/src/api/shop/merchantType/index.ts +++ b/src/api/shop/merchantType/index.ts @@ -1,14 +1,14 @@ import request from '@/utils/request'; import type { ApiResult, PageResult } from '@/api'; import type { MerchantType, MerchantTypeParam } from './model'; -import { MODULES_API_URL } from '@/config/setting'; +import { SERVER_API_URL } from '@/config/setting'; /** * 分页查询商户类型 */ export async function pageMerchantType(params: MerchantTypeParam) { const res = await request.get>>( - MODULES_API_URL + '/shop/merchant-type/page', + SERVER_API_URL + '/system/merchant-type/page', { params } @@ -24,7 +24,7 @@ export async function pageMerchantType(params: MerchantTypeParam) { */ export async function listMerchantType(params?: MerchantTypeParam) { const res = await request.get>( - MODULES_API_URL + '/shop/merchant-type', + SERVER_API_URL + '/system/merchant-type', { params } @@ -40,7 +40,7 @@ export async function listMerchantType(params?: MerchantTypeParam) { */ export async function addMerchantType(data: MerchantType) { const res = await request.post>( - MODULES_API_URL + '/shop/merchant-type', + SERVER_API_URL + '/system/merchant-type', data ); if (res.data.code === 0) { @@ -54,7 +54,7 @@ export async function addMerchantType(data: MerchantType) { */ export async function updateMerchantType(data: MerchantType) { const res = await request.put>( - MODULES_API_URL + '/shop/merchant-type', + SERVER_API_URL + '/system/merchant-type', data ); if (res.data.code === 0) { @@ -68,7 +68,7 @@ export async function updateMerchantType(data: MerchantType) { */ export async function removeMerchantType(id?: number) { const res = await request.delete>( - MODULES_API_URL + '/shop/merchant-type/' + id + SERVER_API_URL + '/system/merchant-type/' + id ); if (res.data.code === 0) { return res.data.message; @@ -81,7 +81,7 @@ export async function removeMerchantType(id?: number) { */ export async function removeBatchMerchantType(data: (number | undefined)[]) { const res = await request.delete>( - MODULES_API_URL + '/shop/merchant-type/batch', + SERVER_API_URL + '/system/merchant-type/batch', { data } @@ -97,7 +97,7 @@ export async function removeBatchMerchantType(data: (number | undefined)[]) { */ export async function getMerchantType(id: number) { const res = await request.get>( - MODULES_API_URL + '/shop/merchant-type/' + id + SERVER_API_URL + '/system/merchant-type/' + id ); if (res.data.code === 0 && res.data.data) { return res.data.data; diff --git a/src/api/system/chat/model/index.ts b/src/api/system/chat/model/index.ts index 8db6db5..5ead20e 100644 --- a/src/api/system/chat/model/index.ts +++ b/src/api/system/chat/model/index.ts @@ -44,5 +44,6 @@ export interface ChatMessageParam extends PageParam { formUserId?: number; toUserId?: number; type?: string; + status?: number; keywords: string; } diff --git a/src/api/system/chatMessage/index.ts b/src/api/system/chatMessage/index.ts index 2bbd109..1cc75d1 100644 --- a/src/api/system/chatMessage/index.ts +++ b/src/api/system/chatMessage/index.ts @@ -49,6 +49,20 @@ export async function addChatMessage(data: ChatMessage) { return Promise.reject(new Error(res.data.message)); } +/** + * 添加聊天消息表 + */ +export async function addBatchChatMessage(data: ChatMessage[]) { + const res = await request.post>( + SERVER_API_URL + '/system/chat-message/batch', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + /** * 修改聊天消息表 */ diff --git a/src/api/system/chatMessage/model/index.ts b/src/api/system/chatMessage/model/index.ts index 0ef3626..4352a3f 100644 --- a/src/api/system/chatMessage/model/index.ts +++ b/src/api/system/chatMessage/model/index.ts @@ -22,8 +22,10 @@ export interface ChatMessage { withdraw?: number; // 文件信息 fileInfo?: string; - toUserName?: string; + toUserName?: any; formUserName?: string; + // 批量发送 + toUserIds?: any[]; // 存在联系方式 hasContact?: number; // 状态, 0未读, 1已读 diff --git a/src/api/system/user/index.ts b/src/api/system/user/index.ts index c4c7f87..2ac2612 100644 --- a/src/api/system/user/index.ts +++ b/src/api/system/user/index.ts @@ -1,14 +1,14 @@ import request from '@/utils/request'; import type { ApiResult, PageResult } from '@/api'; import type { User, UserParam } from './model'; -import { MODULES_API_URL, SERVER_API_URL } from '@/config/setting'; +import { SERVER_API_URL } from '@/config/setting'; /** * 分页查询用户 */ export async function pageUsers(params: UserParam) { const res = await request.get>>( - MODULES_API_URL + '/system/user/page', + SERVER_API_URL + '/system/user/page', { params } ); if (res.data.code === 0) { diff --git a/src/api/system/user/model/index.ts b/src/api/system/user/model/index.ts index 2bf0182..593c1b5 100644 --- a/src/api/system/user/model/index.ts +++ b/src/api/system/user/model/index.ts @@ -62,6 +62,7 @@ export interface User { payTime?: string; deliveryTime?: string; receiptTime?: string; + merchantId?: number; // 创建时间 createTime?: string; // 租户ID @@ -73,6 +74,7 @@ export interface User { companyInfo?: Company; planId?: number; code?: string; + smsCode?: string; // remember?: boolean; balance?: number; @@ -101,7 +103,7 @@ export interface User { // truename?: string; // 是否管理员:1是;2否 - isAdmin?: string; + isAdmin?: boolean; // 客户端ID clientId?: string; // 注册来源客户端 (APP、H5、小程序等) diff --git a/src/api/system/website/field/index.ts b/src/api/system/website/field/index.ts new file mode 100644 index 0000000..426d6e5 --- /dev/null +++ b/src/api/system/website/field/index.ts @@ -0,0 +1,129 @@ +import request from '@/utils/request'; +import type { ApiResult, PageResult } from '@/api'; +import type { + WebsiteField, + WebsiteFieldParam +} from '@/api/cms/website/field/model'; +import { MODULES_API_URL } from '@/config/setting'; + +/** + * 分页查询项目参数 + */ +export async function pageWebsiteField(params: WebsiteFieldParam) { + const res = await request.get>>( + MODULES_API_URL + '/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 listWebsiteField(params?: WebsiteFieldParam) { + const res = await request.get>( + MODULES_API_URL + '/cms/website-field', + { + params + } + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 根据id查询项目参数 + */ +export async function getWebsiteField(id: number) { + const res = await request.get>( + MODULES_API_URL + '/cms/website-field/' + id + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 添加项目参数 + */ +export async function addWebsiteField(data: WebsiteField) { + const res = await request.post>( + MODULES_API_URL + '/cms/website-field', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 修改项目参数 + */ +export async function updateWebsiteField(data: WebsiteField) { + const res = await request.put>( + MODULES_API_URL + '/cms/website-field', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 删除项目参数 + */ +export async function removeWebsiteField(id?: number) { + const res = await request.delete>( + MODULES_API_URL + '/cms/website-field/' + id + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 批量删除项目参数 + */ +export async function removeBatchWebsiteField(data: (number | undefined)[]) { + const res = await request.delete>( + MODULES_API_URL + '/cms/website-field/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 + '/cms/website-field/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/src/api/system/website/field/model/index.ts b/src/api/system/website/field/model/index.ts new file mode 100644 index 0000000..157263b --- /dev/null +++ b/src/api/system/website/field/model/index.ts @@ -0,0 +1,25 @@ +import type { PageParam } from '@/api'; + +/** + * 网站参数 + */ +export interface WebsiteField { + id?: number; + name?: string; + value?: string; + comments?: string; + userId?: number; + websiteId?: number; + status?: any; + sortNumber?: any; + createTime?: string; +} + +/** + * 网站参数搜索条件 + */ +export interface WebsiteFieldParam extends PageParam { + id?: number; + userId?: number; + websiteId?: number; +} diff --git a/src/api/system/website/index.ts b/src/api/system/website/index.ts new file mode 100644 index 0000000..8afbfbf --- /dev/null +++ b/src/api/system/website/index.ts @@ -0,0 +1,169 @@ +import request from '@/utils/request'; +import type { ApiResult, PageResult } from '@/api'; +import type { Website, WebsiteParam } from './model'; +import { SERVER_API_URL } from '@/config/setting'; + +/** + * 获取网站信息 + */ +export async function getSiteInfo() { + const res = await request.get>( + SERVER_API_URL + '/system/website/getSiteInfo' + ); + 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>( + SERVER_API_URL + '/system/website/clearSiteInfo/' + key + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 分页查询网站 + */ +export async function pageWebsite(params: WebsiteParam) { + const res = await request.get>>( + SERVER_API_URL + '/system/website/page', + { + params + } + ); + if (res.data.code === 0) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 查询网站列表 + */ +export async function listWebsite(params?: WebsiteParam) { + const res = await request.get>( + SERVER_API_URL + '/system/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 addWebsite(data: Website) { + const res = await request.post>( + SERVER_API_URL + '/system/website', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 修改网站 + */ +export async function updateWebsite(data: Website) { + const res = await request.put>( + SERVER_API_URL + '/system/website', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 删除网站 + */ +export async function removeWebsite(id?: number) { + const res = await request.delete>( + SERVER_API_URL + '/system/website/' + id + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 批量删除网站 + */ +export async function removeBatchWebsite(data: (number | undefined)[]) { + const res = await request.delete>( + SERVER_API_URL + '/system/website/batch', + { + data + } + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 修改用户状态 + */ +export async function updateWebsiteStatus(websiteId?: number, status?: number) { + const res = await request.put>( + SERVER_API_URL + '/system/website/status', + { + websiteId, + status + } + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 根据id查询网站 + */ +export async function getWebsite(id: number) { + const res = await request.get>( + SERVER_API_URL + '/system/website/' + 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 + '/system/website/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/src/api/system/website/model/index.ts b/src/api/system/website/model/index.ts new file mode 100644 index 0000000..d5c6463 --- /dev/null +++ b/src/api/system/website/model/index.ts @@ -0,0 +1,58 @@ +import { WebsiteField } from '@/api/cms/website/field/model'; +import { Navigation } from '@/api/cms/navigation/model'; +import { Link } from '@/api/oa/link/model'; +import { ArrangeCategory } from '@/api/cms/category/model'; + +/** + * 菜单 + */ +export interface Website { + websiteId?: number; + websiteName?: string; + websiteCode?: string; + websiteIcon?: string; + websiteLogo?: string; + websiteDarkLogo?: string; + keywords?: string; + address?: string; + phone?: string; + email?: string; + websiteType?: string; + expirationTime?: string; + templateId?: string; + industryParent?: string; + industryChild?: string; + companyId?: number; + domain?: string; + icpNo?: string; + policeNo?: string; + comments?: string; + sortNumber?: number; + createTime?: string; + disabled?: boolean; + country?: string; + province?: string; + recommend?: number; + city?: string; + region?: string; + appId?: number; + fields?: WebsiteField[]; + status?: number; + tenantId?: number; + tenantName?: string; + navigations?: Navigation[]; + categoryList?: ArrangeCategory[]; + links?: Link[]; + // 配置信息 + config?: any; +} + +/** + * 菜单搜索参数 + */ +export interface WebsiteParam { + title?: string; + path?: string; + authority?: string; + parentId?: number; +} diff --git a/src/components/SelectMerchantAccount/components/select-data.vue b/src/components/SelectMerchantAccount/components/select-data.vue new file mode 100644 index 0000000..ca7edd9 --- /dev/null +++ b/src/components/SelectMerchantAccount/components/select-data.vue @@ -0,0 +1,163 @@ + + + + diff --git a/src/components/SelectMerchantAccount/index.vue b/src/components/SelectMerchantAccount/index.vue new file mode 100644 index 0000000..39cd7af --- /dev/null +++ b/src/components/SelectMerchantAccount/index.vue @@ -0,0 +1,61 @@ + + + diff --git a/src/layout/components/header-notice.vue b/src/layout/components/header-notice.vue index c29b967..6127924 100644 --- a/src/layout/components/header-notice.vue +++ b/src/layout/components/header-notice.vue @@ -6,178 +6,73 @@ :trigger="['click']" :overlay-style="{ padding: '0 10px' }" > - + - - - - - @@ -190,7 +85,7 @@ .ele-notice-pop { &.ant-dropdown-menu { padding: 0; - width: 336px; + width: 286px; max-width: 100%; margin-top: 11px; } @@ -228,4 +123,9 @@ } } } + .ele-cell-content { + padding: 4px; + display: flex; + flex-direction: column; + } diff --git a/src/layout/components/header-tools.vue b/src/layout/components/header-tools.vue index 763ea73..3361a7a 100644 --- a/src/layout/components/header-tools.vue +++ b/src/layout/components/header-tools.vue @@ -1,6 +1,11 @@ + + + + + + diff --git a/src/views/passport/forget/index.vue b/src/views/passport/forget/index.vue deleted file mode 100644 index 708e3b7..0000000 --- a/src/views/passport/forget/index.vue +++ /dev/null @@ -1,428 +0,0 @@ - - - - - diff --git a/src/views/passport/login/index.vue b/src/views/passport/login/index.vue index d6cd1dd..85d2c0c 100644 --- a/src/views/passport/login/index.vue +++ b/src/views/passport/login/index.vue @@ -5,59 +5,53 @@ ['', 'login-form-right', 'login-form-left'][direction] ]" :style="{ - backgroundImage: 'url(' + loginImg + ')' + backgroundImage: 'url(' + param.login_bg_img + ')' }" > -