From 4a487b5894be3b83ec5b88d5fcf7231b6793a5f7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=90=BD=E6=97=A5=E6=99=9A=E9=A3=8E?= <1811466536@qq.com>
Date: Mon, 18 Dec 2023 17:58:00 +0800
Subject: [PATCH] =?UTF-8?q?=E5=88=86=E9=94=80=E5=95=86=E5=93=81=E5=88=97?=
=?UTF-8?q?=E8=A1=A8-=E5=88=86=E9=94=80=E8=B4=A6=E6=88=B7=E4=BF=A1?=
=?UTF-8?q?=E6=81=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/commission/components/account-info.vue | 205 ++---
.../commission/components/commission-info.vue | 218 +++---
pages/commission/goods.vue | 230 +++---
pages/commission/order.vue | 738 +++++++++---------
project.config.json | 28 +
project.private.config.json | 7 +
sheep/api/commission.js | 130 +--
sheep/request/index.js | 12 +-
sheep/request2/index.js | 4 +-
9 files changed, 801 insertions(+), 771 deletions(-)
create mode 100644 project.config.json
create mode 100644 project.private.config.json
diff --git a/pages/commission/components/account-info.vue b/pages/commission/components/account-info.vue
index d0463e61..686fa7e2 100644
--- a/pages/commission/components/account-info.vue
+++ b/pages/commission/components/account-info.vue
@@ -1,108 +1,117 @@
-
-
-
-
-
-
- 总收益(元)
-
- {{ state.showMoney ? agentInfo.total_income || '0.00' : '***' }}
-
-
-
- 我的佣金(元)
-
- {{ state.showMoney ? userInfo.commission || '0.00' : '***' }}
-
-
-
- 我的消费(元)
-
- {{ state.showMoney ? userInfo.total_consume || '0.00' : '***' }}
-
-
-
-
-
+
+
+
+
+
+
+ 当前佣金(元)
+
+ {{ state.showMoney ? userInfo.brokeragePrice || '0.00' : '***' }}
+
+
+
+ 昨天的佣金(元)
+
+ {{ state.showMoney ? userInfo.yesterdayPrice || '0.00' : '***' }}
+
+
+
+ 累计已提(元)
+
+ {{ state.showMoney ? userInfo.withdrawPrice || '0.00' : '***' }}
+
+
+
+
+
+ .account-card {
+ width: 694rpx;
+ margin: 0 auto;
+ padding: 2rpx;
+ background: linear-gradient(180deg, #ffffff 0.88%, #fff9ec 100%);
+ border-radius: 12rpx;
+ z-index: 3;
+ position: relative;
+
+ .account-card-box {
+ background: #ffefd6;
+
+ .card-box-header {
+ padding: 0 30rpx;
+ height: 72rpx;
+ box-shadow: 0px 2px 6px #f2debe;
+
+ .header-title {
+ font-size: 24rpx;
+ font-weight: 500;
+ color: #a17545;
+ line-height: 30rpx;
+ }
+
+ .cicon-play-arrow {
+ color: #a17545;
+ font-size: 24rpx;
+ line-height: 30rpx;
+ }
+ }
+
+ .card-content {
+ height: 190rpx;
+ background: #fdfae9;
+
+ .item-title {
+ font-size: 24rpx;
+ font-weight: 500;
+ color: #cba67e;
+ line-height: 30rpx;
+ margin-bottom: 24rpx;
+ }
+
+ .item-detail {
+ font-size: 36rpx;
+ font-family: OPPOSANS;
+ font-weight: bold;
+ color: #692e04;
+ line-height: 30rpx;
+ }
+ }
+ }
+ }
+
\ No newline at end of file
diff --git a/pages/commission/components/commission-info.vue b/pages/commission/components/commission-info.vue
index fea225fd..e2ad24eb 100644
--- a/pages/commission/components/commission-info.vue
+++ b/pages/commission/components/commission-info.vue
@@ -1,126 +1,126 @@
-
-
-
-
-
-
-
-
- {{ userInfo.nickname }}
-
-
-
-
- {{ agentInfo.level_info?.name }}
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+ {{ userInfo.nickname }}
+
+
+
+
+ {{ agentInfo.level_info?.name }}
+
+
+
+
+
+
+
+
+ .tag-img {
+ width: 36rpx;
+ height: 36rpx;
+ border-radius: 50%;
+ margin-left: -2rpx;
+ }
+
+ .tag-title {
+ font-size: 24rpx;
+ padding: 0 10rpx;
+ font-weight: 500;
+ line-height: 36rpx;
+ color: #fff;
+ }
+ }
+ }
+ }
+
\ No newline at end of file
diff --git a/pages/commission/goods.vue b/pages/commission/goods.vue
index 7b186f02..1d4ce36d 100644
--- a/pages/commission/goods.vue
+++ b/pages/commission/goods.vue
@@ -1,137 +1,123 @@
-
-
-
-
-
- 预计佣金:¥{{ item.commission }}
-
-
-
-
-
-
-
-
+
+
+
+
+ 预计佣金:¥{{ item.commission }}
+
+
+
+
+
+
+
+
-
+ }" @tap="loadmore" />
+
+ .share-btn {
+ width: 120rpx;
+ height: 50rpx;
+ border-radius: 25rpx;
+ }
+ }
+
\ No newline at end of file
diff --git a/pages/commission/order.vue b/pages/commission/order.vue
index 4e92e778..56ceb786 100644
--- a/pages/commission/order.vue
+++ b/pages/commission/order.vue
@@ -1,417 +1,411 @@
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
- 佣金:
- {{ item.rewards[0]?.commission }}
-
-
- {{ item.commission_order_status_text }}
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+ 佣金:
+ {{ item.rewards[0]?.commission }}
+
+
+ {{ item.commission_order_status_text }}
+
+
+
+
+
+
+
+
+
+
-
-
-
+ }" @tap="loadmore" />
+
+
+
+ &::before {
+ content: '¥';
+ font-size: 22rpx;
+ }
+ }
+
+ .order-status {
+ line-height: 30rpx;
+ padding: 0 10rpx;
+ border-radius: 30rpx;
+ margin-left: 20rpx;
+ font-size: 24rpx;
+ color: var(--ui-BG-Main);
+ }
+ }
+ }
+
\ No newline at end of file
diff --git a/project.config.json b/project.config.json
new file mode 100644
index 00000000..d554d96e
--- /dev/null
+++ b/project.config.json
@@ -0,0 +1,28 @@
+{
+ "appid": "wxd4da84f87dcafd80",
+ "compileType": "miniprogram",
+ "libVersion": "3.2.4",
+ "packOptions": {
+ "ignore": [],
+ "include": []
+ },
+ "setting": {
+ "coverView": true,
+ "es6": true,
+ "postcss": true,
+ "minified": true,
+ "enhance": true,
+ "showShadowRootInWxmlPanel": true,
+ "packNpmRelationList": [],
+ "babelSetting": {
+ "ignore": [],
+ "disablePlugins": [],
+ "outputPath": ""
+ }
+ },
+ "condition": {},
+ "editorSetting": {
+ "tabIndent": "insertSpaces",
+ "tabSize": 2
+ }
+}
\ No newline at end of file
diff --git a/project.private.config.json b/project.private.config.json
new file mode 100644
index 00000000..31ea5724
--- /dev/null
+++ b/project.private.config.json
@@ -0,0 +1,7 @@
+{
+ "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
+ "projectname": "uni3",
+ "setting": {
+ "compileHotReLoad": true
+ }
+}
\ No newline at end of file
diff --git a/sheep/api/commission.js b/sheep/api/commission.js
index e3b44c75..35c18d3b 100644
--- a/sheep/api/commission.js
+++ b/sheep/api/commission.js
@@ -1,65 +1,71 @@
import request from '@/sheep/request';
export default {
- // 分销商详情
- agent: () =>
- request({
- url: 'commission/agent',
- method: 'GET',
- custom: {
- showLoading: false,
- showError: false,
- },
- }),
- // 分销表单
- form: () =>
- request({
- url: 'commission/agent/form',
- method: 'GET',
- }),
- // 申请分销商
- apply: (data) =>
- request({
- url: 'commission/agent/apply',
- method: 'POST',
- data,
- custom: {
- showSuccess: true,
- },
- }),
- // 分销动态
- log: (params) =>
- request({
- url: 'commission/log',
- method: 'GET',
- params,
- }),
- // 分销订单
- order: (params) =>
- request({
- url: 'commission/order',
- method: 'GET',
- params,
- }),
- // 分销商品
- goods: (params) =>
- request({
- url: 'commission/goods',
- method: 'GET',
- params,
- }),
- // 我的团队
- team: (params) =>
- request({
- url: 'commission/agent/team',
- method: 'GET',
- params,
- }),
- // 佣金转余额
- transfer: (data) =>
- request({
- url: 'commission/agent/transfer',
- method: 'POST',
- data,
- }),
-};
+ // 分销商详情
+ agent: () =>
+ request({
+ url: 'commission/agent',
+ method: 'GET',
+ custom: {
+ showLoading: false,
+ showError: false,
+ },
+ }),
+ // 分销表单
+ form: () =>
+ request({
+ url: 'commission/agent/form',
+ method: 'GET',
+ }),
+ // 申请分销商
+ apply: (data) =>
+ request({
+ url: 'commission/agent/apply',
+ method: 'POST',
+ data,
+ custom: {
+ showSuccess: true,
+ },
+ }),
+ // 分销动态
+ log: (params) =>
+ request({
+ url: 'commission/log',
+ method: 'GET',
+ params,
+ }),
+ // 分销订单
+ order: (params) =>
+ request({
+ url: 'commission/order',
+ method: 'GET',
+ params,
+ }),
+
+ // 分销商品
+ goods: (params) =>
+ request({
+ url: '/app-api/product/spu/page',
+ method: 'GET',
+ params,
+ }),
+ // 我的团队
+ team: (params) =>
+ request({
+ url: 'commission/agent/team',
+ method: 'GET',
+ params,
+ }),
+ // 佣金转余额
+ transfer: (data) =>
+ request({
+ url: 'commission/agent/transfer',
+ method: 'POST',
+ data,
+ }),
+ getSummary: (data) =>
+ request({
+ url: '/app-api/trade/brokerage-user/get-summary',
+ method: 'GET',
+ }),
+};
\ No newline at end of file
diff --git a/sheep/request/index.js b/sheep/request/index.js
index 7ec6d3cd..a0f41207 100644
--- a/sheep/request/index.js
+++ b/sheep/request/index.js
@@ -94,7 +94,7 @@ http.interceptors.request.use(
if (config.url.indexOf('/app-api/') !== -1) {
config.header['Accept'] = '*/*'
config.header['tenant-id'] = '1';
- config.header['terminal'] = '20';
+ config.header['terminal'] = '20';
config.header['Authorization'] = 'Bearer test247';
}
return config;
@@ -113,7 +113,7 @@ http.interceptors.response.use(
if (response.header.authorization || response.header.Authorization) {
$store('user').setToken(response.header.authorization || response.header.Authorization);
}
- // TODO 芋艿:如果是登录的 API,则自动设置 token
+ // TODO 芋艿:如果是登录的 API,则自动设置 token
response.config.custom.showLoading && closeLoading();
if (response.data.error !== 0 && response.data.code !== 0) {
@@ -125,10 +125,10 @@ http.interceptors.response.use(
});
return Promise.resolve(response.data);
}
- // 成功时的提示
+ // 成功时的提示
if (
(response.data.error === 0 || response.data.code === 0) &&
- ( response.data.msg !== '' || response.config.custom.successMsg !== '' ) &&
+ (response.data.msg !== '' || response.config.custom.successMsg !== '') &&
response.config.custom.showSuccess
) {
uni.showToast({
@@ -215,8 +215,8 @@ const request = (config) => {
}
// TODO 芋艿:额外拼接
if (config.url.indexOf('/app-api/') >= 0) {
- // config.url = 'http://api-dashboard.yudao.iocoder.cn' + config.url; // 调用【云端】
- config.url = 'http://127.0.0.1:48080' + config.url; // 调用【本地】
+ config.url = 'http://api-dashboard.yudao.iocoder.cn' + config.url; // 调用【云端】
+ // config.url = 'http://127.0.0.1:48080' + config.url; // 调用【本地】
}
return http.middleware(config);
};
diff --git a/sheep/request2/index.js b/sheep/request2/index.js
index 545cc012..56b19a33 100644
--- a/sheep/request2/index.js
+++ b/sheep/request2/index.js
@@ -95,8 +95,8 @@ http.interceptors.request.use(
if (config.url.indexOf('/app-api/') !== -1) {
config.header['Accept'] = '*/*'
config.header['tenant-id'] = '1';
- config.header['terminal'] = '20';
- config.header['Authorization'] = 'Bearer test247';
+ config.header['terminal'] = '20';
+ config.header['Authorization'] = 'Bearer test247';
}
return config;
},