From f03d8fdbb4c9bf54e3fae7121246446c98ffa445 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Wed, 19 Nov 2025 18:26:00 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=AE=8C=E6=88=90=E5=88=86=E9=94=80?= =?UTF-8?q?=E5=9F=BA=E7=A1=80=E8=AE=BE=E7=BD=AE=E9=A1=B5=E9=9D=A2=EF=BC=8C?= =?UTF-8?q?=E5=88=86=E9=94=80=E5=91=98=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/date-range-picker/README.md | 52 ++ .../date-range-picker/date-range-picker.vue | 342 ++++++++++++ http/api/market/distribution.js | 139 +++++ pageMarket/components/modal.vue | 84 +++ pageMarket/distribution/components/config.vue | 458 ++++++++-------- .../components/fenxiao-user-list.vue | 268 ++++++++++ pageMarket/distribution/index.vue | 497 +++++++++++------- pageMarket/distribution/level-list.vue | 292 ++++++++++ pages.json | 7 + store/market.js | 53 ++ 10 files changed, 1784 insertions(+), 408 deletions(-) create mode 100644 components/date-range-picker/README.md create mode 100644 components/date-range-picker/date-range-picker.vue create mode 100644 http/api/market/distribution.js create mode 100644 pageMarket/components/modal.vue create mode 100644 pageMarket/distribution/components/fenxiao-user-list.vue create mode 100644 pageMarket/distribution/level-list.vue create mode 100644 store/market.js diff --git a/components/date-range-picker/README.md b/components/date-range-picker/README.md new file mode 100644 index 0000000..4b9f5ec --- /dev/null +++ b/components/date-range-picker/README.md @@ -0,0 +1,52 @@ +#时间范围选择器 +#### 参数文档 + +| 参数 | 说明 | 类型 | 默认值 | 其他 | +| :---- | :---- | :---- | :---- | :---- | +| show | 显示选择器 | Boolean | false | - | +| defaultDate | 默认日期 | String | - | 不传则默认今天 | +| minYear | 最小年份 | Number | 1990 | - | +| themeColor | 主题色 | String | #43b983 | - | +| startText | 开始时间文字 | String | 开始时间 | - | +| endText | 结束时间文字 | String | 结束时间 | - | + +#### case +```vue + + + + +``` diff --git a/components/date-range-picker/date-range-picker.vue b/components/date-range-picker/date-range-picker.vue new file mode 100644 index 0000000..b686d19 --- /dev/null +++ b/components/date-range-picker/date-range-picker.vue @@ -0,0 +1,342 @@ + + + + \ No newline at end of file diff --git a/http/api/market/distribution.js b/http/api/market/distribution.js new file mode 100644 index 0000000..b877061 --- /dev/null +++ b/http/api/market/distribution.js @@ -0,0 +1,139 @@ +import http from '@/http/http.js' +const request = http.request +const urlType='market' + +export function getConfig(data) { + return request({ + url: `${urlType}/admin/distribution`, + method: "GET", + data: { + ...data + } + }) +} + + +export function editConfig(data) { + return request({ + url: `${urlType}/admin/distribution`, + method: "PUT", + data: { + ...data + } + }) +} + +export function moneyRecoders(data) { + return request({ + url: `${urlType}/admin/distribution/flow`, + method: "GET", + data: { + ...data + } + }) +} +export function cashPay(data) { + return request({ + url: `${urlType}/admin/distribution/cashPay`, + method: "POST", + data: { + ...data + } + }) +} +export function openFlow(data) { + return request({ + url: `${urlType}/admin/distribution/openFlow`, + method: "GET", + data: { + ...data + } + }) +} +export function distributionFlow(data) { + return request({ + url: `${urlType}/admin/distribution/distributionFlow`, + method: "GET", + data: { + ...data + } + }) +} +export function rechargeQrCode(data) { + return request({ + url: `${urlType}/admin/distribution/rechargeQrCode`, + method: "GET", + data: { + ...data + } + }) +} +export function withdrawFlow(data) { + return request({ + url: `${urlType}/admin/distribution/withdrawFlow`, + method: "GET", + data: { + ...data + } + }) +} + +export function distributionUser(data) { + return request({ + url: `${urlType}/admin/distribution/user`, + method: "GET", + data: { + ...data + } + }) +} + +export function addDistributionUser(data) { + return request({ + url: `${urlType}/admin/distribution/user`, + method: "POST", + data: { + ...data + } + }) +} + +export function editDistributionUser(data) { + return request({ + url: `${urlType}/admin/distribution/user`, + method: "PUT", + data: { + ...data + } + }) +} + +export function deleteDistributionUser(data) { + return request({ + url: `${urlType}/admin/distribution/user`, + method: "DELETE", + data: { + ...data + } + }) +} + +export function inviteUser(data) { + return request({ + url: `${urlType}/admin/distribution/user/inviteUser`, + method: "GET", + data: { + ...data + } + }) +} + +export function resetLevel(data) { + return request({ + url: `${urlType}/admin/distribution/user/resetLevel`, + method: "POST", + data: { + ...data + } + }) +} diff --git a/pageMarket/components/modal.vue b/pageMarket/components/modal.vue new file mode 100644 index 0000000..d8f4fc3 --- /dev/null +++ b/pageMarket/components/modal.vue @@ -0,0 +1,84 @@ + + + + \ No newline at end of file diff --git a/pageMarket/distribution/components/config.vue b/pageMarket/distribution/components/config.vue index c857bb5..1cde388 100644 --- a/pageMarket/distribution/components/config.vue +++ b/pageMarket/distribution/components/config.vue @@ -1,93 +1,175 @@ - - - - \ No newline at end of file +$height: 70rpx; +.number-box { + font-size: 28rpx; + padding: 0 26rpx; + border-radius: 6rpx 0 0 6rpx; + border-top: 2rpx solid #d9d9d9; + border-bottom: 2rpx solid #d9d9d9; + border-left: 2rpx solid #d9d9d9; + background: #fff; + box-sizing: border-box; + height: $height; + flex: 1; + line-height: $height; +} +.unit { + display: flex; + padding: 0 38rpx; + height: $height; + line-height: $height; + align-items: center; + border-radius: 0 6rpx 6rpx 0; + border: 2rpx solid #d9d9d9; + background: #f7f7fa; + font-size: 28rpx; + color: #999999; +} + diff --git a/pageMarket/distribution/components/fenxiao-user-list.vue b/pageMarket/distribution/components/fenxiao-user-list.vue new file mode 100644 index 0000000..96c9283 --- /dev/null +++ b/pageMarket/distribution/components/fenxiao-user-list.vue @@ -0,0 +1,268 @@ + + + diff --git a/pageMarket/distribution/index.vue b/pageMarket/distribution/index.vue index 83e0124..6de5d9f 100644 --- a/pageMarket/distribution/index.vue +++ b/pageMarket/distribution/index.vue @@ -1,221 +1,324 @@ \ No newline at end of file +.delete-btn { + background: #ffe7e6; + color: #ff1c1c; +} +.filter-box { + display: flex; + padding: 8rpx 24rpx; + align-items: center; + border-radius: 8rpx; + border: 2rpx solid #d9d9d9; + background: #f7f7f7; + min-height: 62rpx; + box-sizing: border-box; +} + diff --git a/pageMarket/distribution/level-list.vue b/pageMarket/distribution/level-list.vue new file mode 100644 index 0000000..045d9c8 --- /dev/null +++ b/pageMarket/distribution/level-list.vue @@ -0,0 +1,292 @@ + + + diff --git a/pages.json b/pages.json index 7854b9b..f361f21 100644 --- a/pages.json +++ b/pages.json @@ -644,6 +644,13 @@ "style": { "navigationBarTitleText": "添加限时折扣" } + }, + { + "pageId": "PAGES_DISTRIBUTION_LEVEL_LIST", + "path": "distribution/level-list", + "style": { + "navigationBarTitleText": "分销员等级" + } } ] }, diff --git a/store/market.js b/store/market.js new file mode 100644 index 0000000..9a8a526 --- /dev/null +++ b/store/market.js @@ -0,0 +1,53 @@ +// stores/counter.js +import { defineStore } from "pinia"; +import * as distributionApi from "@/http/api/market/distribution.js"; + +export const upgradeTypes = [ + { + value: "not_upgrade", + label: "不自动升级", + }, + { + value: "invite", + label: "邀请有效人数", + }, + { + value: "cost", + label: "消费金额(不含退款)", + }, +]; +// 分销 +export const useDistributionStore = defineStore("distribution", { + state: () => { + return { + //分销配置 + config: { + isEnable: 0, + openType: "pay", + inviteCount: 1, + inviteConsume: 0, + payAmount: 0, + rewardCount: 1, + settlementDay: 1, + upgradeType: "auto", + notActivatedPage: null, + levelConfigList: [], + }, + //升级条件 + upgradeTypes, + }; + }, + actions: { + async getConfig() { + const data = await distributionApi.getConfig(); + this.config = data; + return this.config; + }, + async editConfig(data) { + const res = await distributionApi.editConfig({ ...this.config, ...data }); + this.getConfig(); + return res; + }, + }, + unistorage: true, // 开启后对 state 的数据读写都将持久化 +}); From 1070049a9d373a15b05f5fe26cff753b62cab6be Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Thu, 20 Nov 2025 10:26:25 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=88=86=E9=94=80=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=8E=A5=E5=8F=A3=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commons/style/common.scss | 9 + pageMarket/distribution/add-fenxiao-user.vue | 317 +++++++++++++++++ .../components/fenxiao-mingxi.vue | 197 +++++++++++ .../components/fenxiao-user-list.vue | 4 +- .../distribution/components/open-list.vue | 254 ++++++++++++++ pageMarket/distribution/index.vue | 186 ++++++++-- pageMarket/distribution/money-recoders.vue | 328 ++++++++++++++++++ pages.json | 17 +- pages/pay.vue | 258 +++++++------- static/iconImg/icon-sel.png | Bin 0 -> 767 bytes 10 files changed, 1397 insertions(+), 173 deletions(-) create mode 100644 pageMarket/distribution/add-fenxiao-user.vue create mode 100644 pageMarket/distribution/components/fenxiao-mingxi.vue create mode 100644 pageMarket/distribution/components/open-list.vue create mode 100644 pageMarket/distribution/money-recoders.vue create mode 100644 static/iconImg/icon-sel.png diff --git a/commons/style/common.scss b/commons/style/common.scss index 5c51603..6a0a8f3 100644 --- a/commons/style/common.scss +++ b/commons/style/common.scss @@ -418,4 +418,13 @@ text { ::v-deep .u-m-t-16 .u-textarea{ border-width: 1px!important; +} +.font-700{ + font-weight: 700; +} +.text-center{ + text-align: center; +} +.bg-f7{ + background-color: #F7F7F7; } \ No newline at end of file diff --git a/pageMarket/distribution/add-fenxiao-user.vue b/pageMarket/distribution/add-fenxiao-user.vue new file mode 100644 index 0000000..0f31251 --- /dev/null +++ b/pageMarket/distribution/add-fenxiao-user.vue @@ -0,0 +1,317 @@ + + + diff --git a/pageMarket/distribution/components/fenxiao-mingxi.vue b/pageMarket/distribution/components/fenxiao-mingxi.vue new file mode 100644 index 0000000..69032bc --- /dev/null +++ b/pageMarket/distribution/components/fenxiao-mingxi.vue @@ -0,0 +1,197 @@ + + + diff --git a/pageMarket/distribution/components/fenxiao-user-list.vue b/pageMarket/distribution/components/fenxiao-user-list.vue index 96c9283..4a20196 100644 --- a/pageMarket/distribution/components/fenxiao-user-list.vue +++ b/pageMarket/distribution/components/fenxiao-user-list.vue @@ -45,7 +45,7 @@ - 添加分销员 + 添加分销员 + + + + + 订单号: + {{ item.orderNo }} + + + {{ item.createTime }} + + + + + 用户昵称 + + {{ item.nickName }} + + + {{ item.changeAmount }} + + + + + + + + + + + + + 分销组 + + + + + + + + + 是否确认重置分销组 重置后将会按照用户的实际数据匹配分销组 + + + + 是否确认取消分销员 + + + + + + diff --git a/pageMarket/distribution/index.vue b/pageMarket/distribution/index.vue index 6de5d9f..cf98324 100644 --- a/pageMarket/distribution/index.vue +++ b/pageMarket/distribution/index.vue @@ -24,7 +24,7 @@ @@ -57,35 +57,105 @@ - - + + + + + + + + {{ listRes.totalCount}} + 支付开通人数 + + + {{ listRes.totalAmount}} + 支付开通人数 + + + + + {{ listRes.successAmount}} + 已入账金额(元) + + + {{ listRes.pendingAmount||0}} + 待入账金额(元) + + + {{ listRes.balanceAmount}} + + 运营余额(元) + 充值> + + + + + + + + + + diff --git a/pages.json b/pages.json index f361f21..3dd66ed 100644 --- a/pages.json +++ b/pages.json @@ -93,8 +93,7 @@ "path": "pages/pay", "pageId": "PAGES_PAY", "style": { - "navigationBarTitleText": "分销", - "navigationStyle": "custom" + "navigationBarTitleText": "运营余额" } } ], @@ -651,6 +650,20 @@ "style": { "navigationBarTitleText": "分销员等级" } + }, + { + "pageId": "PAGES_DISTRIBUTION_ADD_FENXIAO_USER", + "path": "distribution/add-fenxiao-user", + "style": { + "navigationBarTitleText": "添加分销员" + } + }, + { + "pageId": "PAGES_DISTRIBUTION_MONEY_RECODERS", + "path": "distribution/money-recoders", + "style": { + "navigationBarTitleText": "运营余额" + } } ] }, diff --git a/pages/pay.vue b/pages/pay.vue index f127d40..05aeec3 100644 --- a/pages/pay.vue +++ b/pages/pay.vue @@ -1,115 +1,105 @@