diff --git a/pages.json b/pages.json
index 86e6c272..1bd22d74 100644
--- a/pages.json
+++ b/pages.json
@@ -349,18 +349,6 @@
"group": "分销商城"
}
},
- {
- "path": "apply",
- "style": {
- "navigationBarTitleText": "申请分销商"
- },
- "meta": {
- "auth": true,
- "sync": true,
- "title": "申请分销商",
- "group": "分销商城"
- }
- },
{
"path": "goods",
"style": {
@@ -385,18 +373,6 @@
"group": "分销商城"
}
},
- {
- "path": "share-log",
- "style": {
- "navigationBarTitleText": "分享记录"
- },
- "meta": {
- "auth": true,
- "sync": true,
- "title": "分享记录",
- "group": "分销商城"
- }
- },
{
"path": "team",
"style": {
diff --git a/pages/commission/components/account-info.vue b/pages/commission/components/account-info.vue
index 686fa7e2..8595aa3b 100644
--- a/pages/commission/components/account-info.vue
+++ b/pages/commission/components/account-info.vue
@@ -1,117 +1,125 @@
-
+
-
-
-
-
-
-
- 当前佣金(元)
-
- {{ state.showMoney ? userInfo.brokeragePrice || '0.00' : '***' }}
-
-
-
- 昨天的佣金(元)
-
- {{ state.showMoney ? userInfo.yesterdayPrice || '0.00' : '***' }}
-
-
-
- 累计已提(元)
-
- {{ state.showMoney ? userInfo.withdrawPrice || '0.00' : '***' }}
-
-
-
-
-
+
+
+
+
+
+
+
+ 当前佣金(元)
+
+ {{ state.showMoney ? fen2yuan(state.summary.brokeragePrice || 0) : '***' }}
+
+
+
+ 昨天的佣金(元)
+
+ {{ state.showMoney ? fen2yuan(state.summary.yesterdayPrice || 0) : '***' }}
+
+
+
+ 累计已提(元)
+
+ {{ state.showMoney ? fen2yuan(state.summary.withdrawPrice || 0) : '***' }}
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/commission/components/commission-auth.vue b/pages/commission/components/commission-auth.vue
index 964f6618..9a484fad 100644
--- a/pages/commission/components/commission-auth.vue
+++ b/pages/commission/components/commission-auth.vue
@@ -1,4 +1,4 @@
-
+
+ />
- {{ state.event.title }}
- {{ state.event.subtitle }}
+ 抱歉!您没有分销权限
+ 该功能暂不可用
@@ -30,105 +30,22 @@
diff --git a/pages/commission/components/commission-info.vue b/pages/commission/components/commission-info.vue
index e2ad24eb..02ea14ed 100644
--- a/pages/commission/components/commission-info.vue
+++ b/pages/commission/components/commission-info.vue
@@ -27,18 +27,16 @@
diff --git a/sheep/api/activity.js b/sheep/api/activity.js
index e977ad9d..64d65064 100644
--- a/sheep/api/activity.js
+++ b/sheep/api/activity.js
@@ -39,11 +39,6 @@ export default {
url: '/app-api/member/sign-in/record/page',
method: 'GET',
}),
- // signAdd: () =>
- // request({
- // url: 'activity/signin',
- // method: 'POST',
- // }),
replenish: (data) =>
request({
url: 'activity/signin/replenish',
@@ -55,11 +50,6 @@ export default {
url: 'activity/activity/' + id,
method: 'GET',
}),
- getSummary: () =>
- request({
- url: '/app-api/member/sign-in/record/get-summary',
- method: 'GET',
- }),
getBargainRecordSummary: () =>
request({
url: '/app-api/promotion/bargain-record/get-summary',
diff --git a/sheep/api/commission.js b/sheep/api/commission.js
index 63601381..b42348ae 100644
--- a/sheep/api/commission.js
+++ b/sheep/api/commission.js
@@ -34,13 +34,6 @@ export default {
method: 'GET',
params,
}),
- // 分销订单
- order: (params) =>
- request({
- url: '/app-api/trade/brokerage-record/page',
- method: 'GET',
- params,
- }),
// 分销商品
goods: (params) =>
diff --git a/sheep/api/promotion/diy/template.js b/sheep/api/promotion/diy/template.js
index 092c51dc..abf0d5e8 100644
--- a/sheep/api/promotion/diy/template.js
+++ b/sheep/api/promotion/diy/template.js
@@ -1,13 +1,12 @@
import request from '@/sheep/request';
const DiyTemplateApi = {
- // TODO 芋艿:测试
- // getUsedDiyTemplate: () => {
- // return request({
- // url: '/app-api/promotion/diy-template/used',
- // method: 'GET',
- // });
- // },
+ getUsedDiyTemplate: () => {
+ return request({
+ url: '/app-api/promotion/diy-template/used',
+ method: 'GET',
+ });
+ },
getDiyTemplate: (id) => {
return request({
url: '/app-api/promotion/diy-template/get',
diff --git a/sheep/api/trade/brokerage.js b/sheep/api/trade/brokerage.js
new file mode 100644
index 00000000..ce22c9b1
--- /dev/null
+++ b/sheep/api/trade/brokerage.js
@@ -0,0 +1,28 @@
+import request from '@/sheep/request';
+
+const BrokerageApi = {
+ // 获得个人分销信息
+ getBrokerageUser: () => {
+ return request({
+ url: '/app-api/trade/brokerage-user/get',
+ method: 'GET'
+ });
+ },
+ // 获得个人分销统计
+ getBrokerageUserSummary: () => {
+ return request({
+ url: '/app-api/trade/brokerage-user/get-summary',
+ method: 'GET',
+ });
+ },
+ // 分销订单
+ getBrokerageRecordPage: (params) => {
+ return request({
+ url: '/app-api/trade/brokerage-record/page',
+ method: 'GET',
+ params,
+ });
+ }
+}
+
+export default BrokerageApi
diff --git a/sheep/store/user.js b/sheep/store/user.js
index 32bb13e7..0be0522f 100644
--- a/sheep/store/user.js
+++ b/sheep/store/user.js
@@ -2,7 +2,6 @@ import {
defineStore
} from 'pinia';
import userApi from '@/sheep/api/user';
-import commissionApi from '@/sheep/api/commission';
import $share from '@/sheep/platform/share';
import {
isEmpty,
@@ -15,6 +14,7 @@ import {
showAuthModal
} from '@/sheep/hooks/useModal';
import AuthUtil from '@/sheep/api/member/auth';
+import BrokerageApi from '@/sheep/api/trade/brokerage';
// 默认用户信息
const defaultUserInfo = {
@@ -23,7 +23,7 @@ const defaultUserInfo = {
gender: 0, // 性别
mobile: '', // 手机号
money: '--', // 余额
- commission: '--', // 佣金
+ commission: '--', // 佣金 TODO 芋艿:干掉
score: '--', // 积分
verification: {}, // 认证字段
};
@@ -46,7 +46,6 @@ const user = defineStore({
userInfo: clone(defaultUserInfo), // 用户信息
isLogin: !!uni.getStorageSync('token'), // 登录状态
numData: cloneDeep(defaultNumData), // 用户其他数据
- agentInfo: {}, // 分销商信息
lastUpdateTime: 0, // 上次更新时间
}),
@@ -72,16 +71,6 @@ const user = defineStore({
return Promise.resolve(data);
},
- // 获取分销商信息
- // TODO 芋艿:整理下;
- async getAgentInfo() {
- const res = await commissionApi.agent();
- if (res.error === 0) {
- this.agentInfo = res.data;
- }
- return Promise.resolve(res);
- },
-
// 获取订单、优惠券等其他资产信息
// TODO 芋艿:整理下;
async getNumData() {