diff --git a/src/api/cms/mp/model/index.ts b/src/api/cms/mp/model/index.ts index 9e76f41..731ddaf 100644 --- a/src/api/cms/mp/model/index.ts +++ b/src/api/cms/mp/model/index.ts @@ -10,6 +10,8 @@ export interface Mp { appId?: string; // 小程序密钥 appSecret?: string; + // 是否主账号 + type?: number; // 小程序名称 mpName?: string; // 小程序简称 diff --git a/src/api/cms/website/model/index.ts b/src/api/cms/website/model/index.ts index 0b01f7d..37115b7 100644 --- a/src/api/cms/website/model/index.ts +++ b/src/api/cms/website/model/index.ts @@ -17,13 +17,16 @@ export interface Website { address?: string; phone?: string; email?: string; + version?: number; websiteType?: string; expirationTime?: string; templateId?: string; industryParent?: string; industryChild?: string; companyId?: number; + prefix?: string; domain?: string; + adminUrl?: string; icpNo?: string; policeNo?: string; comments?: string; @@ -36,7 +39,7 @@ export interface Website { region?: string; appId?: number; fields?: WebsiteField[]; - status?: boolean; + status?: number; tenantId?: number; tenantName?: string; navigations?: Navigation[]; diff --git a/src/api/shop/goods/index.ts b/src/api/shop/goods/index.ts index 5016d9b..b8ed504 100644 --- a/src/api/shop/goods/index.ts +++ b/src/api/shop/goods/index.ts @@ -3,6 +3,14 @@ import type { ApiResult, PageResult } from '@/api'; import type { Goods, GoodsParam } from './model'; import { MODULES_API_URL } from '@/config/setting'; +export async function getCount() { + const res = await request.get(MODULES_API_URL + '/shop/goods/data'); + if (res.data.code === 0) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + /** * 分页查询商品记录表 */ diff --git a/src/api/shop/goods/model/index.ts b/src/api/shop/goods/model/index.ts index 4ebe8db..759b98c 100644 --- a/src/api/shop/goods/model/index.ts +++ b/src/api/shop/goods/model/index.ts @@ -2,6 +2,12 @@ import type { PageParam } from '@/api'; import { GoodsSpec } from '@/api/shop/goodsSpec/model'; import { GoodsSku } from '@/api/shop/goodsSku/model'; +export interface GoodsCount { + totalNum: number; + totalNum2: number; + totalNum3: number; + totalNum4: number; +} /** * 商品记录表 */ @@ -45,6 +51,7 @@ export interface Goods { // 推荐 recommend?: number; // 状态, 0正常, 1待修,2异常已修,3异常未修 + isShow?: number; status?: number; // 备注 comments?: string; @@ -58,6 +65,8 @@ export interface Goods { tenantId?: number; // 商户ID merchantId?: number; + // 店铺名称 + merchantName?: string; // 创建时间 createTime?: string; // 修改时间 @@ -80,5 +89,8 @@ export interface BathSet { */ export interface GoodsParam extends PageParam { goodsId?: number; + status?: number; + isShow?: number; + stock?: number; keywords?: string; } diff --git a/src/api/shop/merchantAccount/index.ts b/src/api/shop/merchantAccount/index.ts index fcbed1c..4faf784 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 { SERVER_API_URL } from '@/config/setting'; +import { MODULES_API_URL } from '@/config/setting'; /** * 分页查询商户账号 */ export async function pageMerchantAccount(params: MerchantAccountParam) { const res = await request.get>>( - SERVER_API_URL + '/system/merchant-account/page', + MODULES_API_URL + '/shop/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>( - SERVER_API_URL + '/system/merchant-account', + MODULES_API_URL + '/shop/merchant-account', { params } @@ -40,7 +40,7 @@ export async function listMerchantAccount(params?: MerchantAccountParam) { */ export async function addMerchantAccount(data: MerchantAccount) { const res = await request.post>( - SERVER_API_URL + '/system/merchant-account', + MODULES_API_URL + '/shop/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>( - SERVER_API_URL + '/system/merchant-account', + MODULES_API_URL + '/shop/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>( - SERVER_API_URL + '/system/merchant-account/' + id + MODULES_API_URL + '/shop/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>( - SERVER_API_URL + '/system/merchant-account/batch', + MODULES_API_URL + '/shop/merchant-account/batch', { data } @@ -97,7 +97,7 @@ export async function removeBatchMerchantAccount(data: (number | undefined)[]) { */ export async function getMerchantAccount(id: number) { const res = await request.get>( - SERVER_API_URL + '/system/merchant-account/' + id + MODULES_API_URL + '/shop/merchant-account/' + id ); if (res.data.code === 0 && res.data.data) { return res.data.data; @@ -107,7 +107,7 @@ export async function getMerchantAccount(id: number) { export async function getMerchantAccountByPhone(params?: MerchantAccountParam) { const res = await request.get>( - SERVER_API_URL + '/system/merchant-account/getMerchantAccountByPhone', + MODULES_API_URL + '/shop/merchant-account/getMerchantAccountByPhone', { params } diff --git a/src/api/shop/merchantAccount/model/index.ts b/src/api/shop/merchantAccount/model/index.ts index 9bc20a3..ce08a8a 100644 --- a/src/api/shop/merchantAccount/model/index.ts +++ b/src/api/shop/merchantAccount/model/index.ts @@ -20,6 +20,7 @@ export interface MerchantAccount { roleName?: string; // 用户ID userId?: number; + nickname?: string; // 备注 comments?: string; // 状态 diff --git a/src/api/shop/merchantApply/index.ts b/src/api/shop/merchantApply/index.ts index e787997..6a58bd5 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 { SERVER_API_URL } from '@/config/setting'; +import { MODULES_API_URL } from '@/config/setting'; /** * 分页查询商户入驻申请 */ export async function pageMerchantApply(params: MerchantApplyParam) { const res = await request.get>>( - SERVER_API_URL + '/system/merchant-apply/page', + MODULES_API_URL + '/shop/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>( - SERVER_API_URL + '/system/merchant-apply', + MODULES_API_URL + '/shop/merchant-apply', { params } @@ -40,7 +40,7 @@ export async function listMerchantApply(params?: MerchantApplyParam) { */ export async function addMerchantApply(data: MerchantApply) { const res = await request.post>( - SERVER_API_URL + '/system/merchant-apply', + MODULES_API_URL + '/shop/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>( - SERVER_API_URL + '/system/merchant-apply', + MODULES_API_URL + '/shop/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>( - SERVER_API_URL + '/system/merchant-apply/' + id + MODULES_API_URL + '/shop/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>( - SERVER_API_URL + '/system/merchant-apply/batch', + MODULES_API_URL + '/shop/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>( - SERVER_API_URL + '/system/merchant-apply/' + id + MODULES_API_URL + '/shop/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 95c7844..ae2c09c 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 { SERVER_API_URL } from '@/config/setting'; +import { MODULES_API_URL } from '@/config/setting'; /** * 分页查询商户类型 */ export async function pageMerchantType(params: MerchantTypeParam) { const res = await request.get>>( - SERVER_API_URL + '/system/merchant-type/page', + MODULES_API_URL + '/shop/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>( - SERVER_API_URL + '/system/merchant-type', + MODULES_API_URL + '/shop/merchant-type', { params } @@ -40,7 +40,7 @@ export async function listMerchantType(params?: MerchantTypeParam) { */ export async function addMerchantType(data: MerchantType) { const res = await request.post>( - SERVER_API_URL + '/system/merchant-type', + MODULES_API_URL + '/shop/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>( - SERVER_API_URL + '/system/merchant-type', + MODULES_API_URL + '/shop/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>( - SERVER_API_URL + '/system/merchant-type/' + id + MODULES_API_URL + '/shop/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>( - SERVER_API_URL + '/system/merchant-type/batch', + MODULES_API_URL + '/shop/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>( - SERVER_API_URL + '/system/merchant-type/' + id + MODULES_API_URL + '/shop/merchant-type/' + id ); if (res.data.code === 0 && res.data.data) { return res.data.data; diff --git a/src/api/shop/spec/index.ts b/src/api/shop/spec/index.ts index 0bca15b..402722a 100644 --- a/src/api/shop/spec/index.ts +++ b/src/api/shop/spec/index.ts @@ -4,7 +4,7 @@ import type { Spec, SpecParam } from './model'; import { MODULES_API_URL } from '@/config/setting'; /** - * 分页查询商品规格组记录表 + * 分页查询规格 */ export async function pageSpec(params: SpecParam) { const res = await request.get>>( @@ -20,7 +20,7 @@ export async function pageSpec(params: SpecParam) { } /** - * 查询商品规格组记录表列表 + * 查询规格列表 */ export async function listSpec(params?: SpecParam) { const res = await request.get>( @@ -36,7 +36,7 @@ export async function listSpec(params?: SpecParam) { } /** - * 添加商品规格组记录表 + * 添加规格 */ export async function addSpec(data: Spec) { const res = await request.post>( @@ -50,7 +50,7 @@ export async function addSpec(data: Spec) { } /** - * 修改商品规格组记录表 + * 修改规格 */ export async function updateSpec(data: Spec) { const res = await request.put>( @@ -64,7 +64,7 @@ export async function updateSpec(data: Spec) { } /** - * 删除商品规格组记录表 + * 删除规格 */ export async function removeSpec(id?: number) { const res = await request.delete>( @@ -77,7 +77,7 @@ export async function removeSpec(id?: number) { } /** - * 批量删除商品规格组记录表 + * 批量删除规格 */ export async function removeBatchSpec(data: (number | undefined)[]) { const res = await request.delete>( @@ -93,7 +93,7 @@ export async function removeBatchSpec(data: (number | undefined)[]) { } /** - * 根据id查询商品规格组记录表 + * 根据id查询规格 */ export async function getSpec(id: number) { const res = await request.get>( diff --git a/src/api/shop/spec/model/index.ts b/src/api/shop/spec/model/index.ts index 37815a8..800c169 100644 --- a/src/api/shop/spec/model/index.ts +++ b/src/api/shop/spec/model/index.ts @@ -1,31 +1,33 @@ import type { PageParam } from '@/api'; -import { SpecValue } from '@/api/shop/specValue/model'; /** - * 商品规格组记录表 + * 规格 */ export interface Spec { - // 规格组ID + // 规格ID specId?: number; - // 规格组名称 + // 规格名称 specName?: string; - // 描述 + // 规格值 + specValue?: string; + // 创建用户 + userId?: number; + // 更新者 + updater?: number; + // 备注 comments?: string; - // 状态 + // 状态, 0正常, 1待修,2异常已修,3异常未修 status?: number; - // 排序 + // 排序号 sortNumber?: number; // 租户id tenantId?: number; - // 规格值 - specValues?: SpecValue[]; - key?: string; - label?: string; - value?: string; + // 创建时间 + createTime?: string; } /** - * 商品规格组记录表搜索条件 + * 规格搜索条件 */ export interface SpecParam extends PageParam { specId?: number; diff --git a/src/api/shop/specValue/model/index.ts b/src/api/shop/specValue/model/index.ts index 5576a5e..a794343 100644 --- a/src/api/shop/specValue/model/index.ts +++ b/src/api/shop/specValue/model/index.ts @@ -19,6 +19,7 @@ export interface SpecValue { key?: string; label?: string; value?: string; + detail?: [string]; } /** diff --git a/src/components/Simulator/index.vue b/src/components/Simulator/index.vue index f55dc98..13f2d1e 100644 --- a/src/components/Simulator/index.vue +++ b/src/components/Simulator/index.vue @@ -3,13 +3,14 @@
- - {{ form.pageName || '商品详情' }} + + {{ form.title || '首页' }}
- + + diff --git a/src/utils/common.ts b/src/utils/common.ts index 3c2040b..bec2b69 100644 --- a/src/utils/common.ts +++ b/src/utils/common.ts @@ -128,7 +128,7 @@ export const copyText = (text) => { // 执行浏览器复制命令 // 复制命令会将当前选中的内容复制到剪切板中(这里就是创建的input标签) // Input要在正常的编辑状态下原生复制方法才会生效 - message.success('复制成功'); + message.success(`复制成功 ${text}`); document.execCommand('copy'); // 复制成功后再将构造的标签 移除 diff --git a/src/views/cms/mp/components/mpEdit.vue b/src/views/cms/mp/components/mpEdit.vue index 80b0900..95911f6 100644 --- a/src/views/cms/mp/components/mpEdit.vue +++ b/src/views/cms/mp/components/mpEdit.vue @@ -44,6 +44,20 @@ v-model:value="form.mpName" /> + + + + + + - - - - - - 未认证 - - - 正常 - 已过期 - - @@ -164,11 +158,12 @@ mpId: undefined, appId: undefined, appSecret: undefined, + type: undefined, mpName: undefined, shortName: undefined, avatar: undefined, mpQrcode: undefined, - authentication: undefined, + authentication: 1, companyName: undefined, icpNo: undefined, email: undefined, @@ -189,6 +184,22 @@ // 表单验证规则 const rules = reactive({ + appId: [ + { + required: true, + type: 'string', + message: '请填写小程序ID', + trigger: 'blur' + } + ], + appSecret: [ + { + required: true, + type: 'string', + message: '请填写小程序秘钥', + trigger: 'blur' + } + ], mpName: [ { required: true, diff --git a/src/views/cms/mp/components/search.vue b/src/views/cms/mp/components/search.vue index 287ab59..a0a2637 100644 --- a/src/views/cms/mp/components/search.vue +++ b/src/views/cms/mp/components/search.vue @@ -1,19 +1,34 @@ + + diff --git a/src/views/cms/mpField/index.vue b/src/views/cms/mpField/index.vue index 529f407..a70c631 100644 --- a/src/views/cms/mpField/index.vue +++ b/src/views/cms/mpField/index.vue @@ -77,6 +77,7 @@ @@ -100,6 +101,7 @@ updateMpField } from '@/api/cms/mpField'; import { copyText, getPageTitle } from '@/utils/common'; + import router from '@/router'; const props = defineProps<{ mpId: any; @@ -113,10 +115,15 @@ const current = ref(null); // 是否显示编辑弹窗 const showEdit = ref(false); + const pageId = ref(0); // 表格数据源 const datasource: DatasourceFunction = ({ page, limit, where, orders }) => { // 搜索条件 + if (pageId.value > 0) { + where.pageId = pageId.value; + } + // where.pageId = router.currentRoute.value.params.id; return pageMpField({ ...where, ...orders, @@ -137,13 +144,13 @@ dataIndex: 'value', key: 'value' }, - { - title: '位置', - dataIndex: 'pageId', - key: 'pageId', - width: 180, - align: 'center' - }, + // { + // title: '位置', + // dataIndex: 'pageId', + // key: 'pageId', + // width: 180, + // align: 'center' + // }, { title: '排序', dataIndex: 'sortNumber', @@ -226,11 +233,17 @@ }; watch( - () => props.mpId, - (mpId) => { - if (mpId) { - reload(); + () => router.currentRoute.value.params.id, + (id) => { + if (id) { + console.log(router.currentRoute); + if (id == ':id') { + pageId.value = 0; + } else { + pageId.value = Number(id); + } } + reload(); }, { immediate: true } ); diff --git a/src/views/cms/mpGroup/index.vue b/src/views/cms/mpGroup/index.vue index 745d4a4..cae9a6c 100644 --- a/src/views/cms/mpGroup/index.vue +++ b/src/views/cms/mpGroup/index.vue @@ -17,18 +17,7 @@ - 新建 - - - - 删除 + 添加 @@ -60,7 +49,7 @@ diff --git a/src/views/cms/website/components/search.vue b/src/views/cms/website/components/search.vue index 82fea9d..a0a2637 100644 --- a/src/views/cms/website/components/search.vue +++ b/src/views/cms/website/components/search.vue @@ -1,36 +1,48 @@ diff --git a/src/views/cms/website/index.vue b/src/views/cms/website/index.vue index b284cd2..4085d26 100644 --- a/src/views/cms/website/index.vue +++ b/src/views/cms/website/index.vue @@ -4,51 +4,55 @@ + diff --git a/src/views/shop/wechatDeposit/index.vue b/src/views/shop/wechatDeposit/index.vue index 3a00f16..a5485d7 100644 --- a/src/views/shop/wechatDeposit/index.vue +++ b/src/views/shop/wechatDeposit/index.vue @@ -45,7 +45,11 @@ - + @@ -62,8 +66,15 @@ } from 'ele-admin-pro/es/ele-pro-table/types'; import Search from './components/search.vue'; import WechatDepositEdit from './components/wechatDepositEdit.vue'; - import { pageWechatDeposit, removeWechatDeposit, removeBatchWechatDeposit } from '@/api/shop/wechatDeposit'; - import type { WechatDeposit, WechatDepositParam } from '@/api/shop/wechatDeposit/model'; + import { + pageWechatDeposit, + removeWechatDeposit, + removeBatchWechatDeposit + } from '@/api/shop/wechatDeposit'; + import type { + WechatDeposit, + WechatDepositParam + } from '@/api/shop/wechatDeposit/model'; // 表格实例 const tableRef = ref | null>(null); @@ -105,73 +116,73 @@ dataIndex: 'id', key: 'id', align: 'center', - width: 90, + width: 90 }, { title: '订单id', dataIndex: 'oid', key: 'oid', - align: 'center', + align: 'center' }, { title: '用户id', dataIndex: 'uid', key: 'uid', - align: 'center', + align: 'center' }, { title: '场地订单号', dataIndex: 'orderNum', key: 'orderNum', - align: 'center', + align: 'center' }, { title: '付款订单号', dataIndex: 'wechatOrder', key: 'wechatOrder', - align: 'center', + align: 'center' }, { title: '退款订单号 ', dataIndex: 'wechatReturn', key: 'wechatReturn', - align: 'center', + align: 'center' }, { title: '场馆名称', dataIndex: 'siteName', key: 'siteName', - align: 'center', + align: 'center' }, { title: '微信昵称', dataIndex: 'username', key: 'username', - align: 'center', + align: 'center' }, { title: '手机号码', dataIndex: 'phone', key: 'phone', - align: 'center', + align: 'center' }, { title: '物品名称', dataIndex: 'name', key: 'name', - align: 'center', + align: 'center' }, { title: '押金金额', dataIndex: 'price', key: 'price', - align: 'center', + align: 'center' }, { title: '押金状态,1已付款,2未付款,已退押金', dataIndex: 'status', key: 'status', - align: 'center', + align: 'center' }, { title: '', diff --git a/src/views/system/dashboard/components/sale-card.vue b/src/views/system/dashboard/components/sale-card.vue index 921bce9..6dd90cc 100644 --- a/src/views/system/dashboard/components/sale-card.vue +++ b/src/views/system/dashboard/components/sale-card.vue @@ -6,7 +6,8 @@ class="monitor-card-tabs" @change="onSaleTypeChange" > - + +