diff --git a/common/api/market/distribution.js b/common/api/market/distribution.js new file mode 100644 index 0000000..7ad74cc --- /dev/null +++ b/common/api/market/distribution.js @@ -0,0 +1,149 @@ +// 引入 request 文件 +import request from "@/common/api/request.js"; +import { prveUrl } from "./config.js"; + +export const pay = (data) => { + let platformType = ""; + let payType = ""; + // #ifdef APP-PLUS + platformType = "APP"; + // #endif + // #ifdef H5 + platformType = "H5"; + // #endif + // #ifdef MP-WEIXIN + platformType = "WX"; + platformType = "wechat"; + payType = "wechatPay"; + // #endif + // #ifdef MP-ALIPAY + platformType = "alipay"; + payType = "aliPay"; + // #endif + + + return request({ + url: prveUrl + "/user/distribution/pay", + method: "post", + data: { platformType, payType, ...data }, + }); +}; + +export const centerUser = (data) => { + return request({ + url: prveUrl + "/user/distribution/centerUser", + method: "post", + data: data, + }); +}; +export const activates = (data) => { + return request({ + url: prveUrl + "/user/distribution/centerUser/activates", + method: "get", + data: data, + }); +}; +export const unActivates = (data) => { + return request({ + url: prveUrl + "/user/distribution/centerUser/unActivates", + method: "get", + data: data, + }); +}; +export const centerConfig = (data) => { + return request({ + url: prveUrl + "/user/distribution/centerConfig", + method: "get", + data: data, + }); +}; + + +// 绑定邀请用户 +export const bindInviteUser = (data) => { + return request({ + url: prveUrl + "/user/distribution/bindInviteUser", + method: "post", + data: data, + }); +}; + +export const childUser = (data) => { + return request({ + url: prveUrl + "/user/distribution/childUser", + method: "get", + data: data, + }); +}; +export const inviteUser = (data) => { + return request({ + url: prveUrl + "/user/distribution/inviteUser", + method: "get", + data: data, + }); +}; + +// 提现 +export const withdraw = (data) => { + return request({ + url: prveUrl + "/user/distribution/withdraw", + method: "post", + data: data, + }); +}; + +// 提现详情 +export const withdrawDetail = (data) => { + return request({ + url: prveUrl + "/user/distribution/withdraw/detail", + method: "get", + data: data, + }); +}; +//提现记录 +export const withdrawFlow = (data) => { + return request({ + url: prveUrl + "/user/distribution/withdraw/flow", + method: "get", + data: data, + }); +}; + +// 实名认证 +export const realNameAuth = (data) => { + return request({ + url: prveUrl + "/user/distribution/realNameAuth", + method: "post", + data: data, + }); +}; + + +// 收益明细 +export const getIncomeDetails = (data) => { + return request({ + url: prveUrl + "/user/distribution/distributionFlow", + method: "get", + data: data, + }); +}; + +// 获取邀请码 +export const getInviteCode = (data) => { + return request({ + url: prveUrl + "/user/distribution/getInviteCode", + method: "get", + data: data, + }); +}; + +// 获取配置 +export const getConfig = (data) => { + return request({ + url: prveUrl + "/user/distribution/getConfig", + method: "get", + data: data, + }); +}; + + diff --git a/common/api/order/index.js b/common/api/order/index.js index 173a445..a500f17 100644 --- a/common/api/order/index.js +++ b/common/api/order/index.js @@ -135,4 +135,18 @@ export const rechargePayOrder = (data) => { ...data } }) -} \ No newline at end of file +} + +//分销员支付订单 +export const distributionLtPayOrder = (data) => { + return request({ + url: url + '/pay/distribution/ltPayOrder', + method: 'post', + data: { + platformType, + payType, + openId: uni.cache.get('userInfo').wechatOpenId, + ...data + } + }) +} diff --git a/components/devetools.vue b/components/devetools.vue new file mode 100644 index 0000000..343ba9c --- /dev/null +++ b/components/devetools.vue @@ -0,0 +1,285 @@ + + + + + \ No newline at end of file diff --git a/components/goods-price.vue b/components/goods-price.vue index 407c91f..83eb9f8 100644 --- a/components/goods-price.vue +++ b/components/goods-price.vue @@ -1,11 +1,24 @@ @@ -14,15 +27,14 @@ import BigNumber from "bignumber.js"; import * as orderUtils from "@/utils/order-utils.js"; - -function returnPrice(){ +function returnPrice() { return orderUtils.returnPrice({ - goods:props.cart, - shopInfo:props.shopInfo, - limitTimeDiscountRes:props.limitDiscount, - shopUserInfo:props.shopUserInfo, - idKey:props.idKey - }) + goods: props.cart, + shopInfo: props.shopInfo, + limitTimeDiscountRes: props.limitDiscount, + shopUserInfo: props.shopUserInfo, + idKey: props.idKey, + }); } const props = defineProps({ @@ -31,9 +43,9 @@ const props = defineProps({ type: Object, default: () => {}, }, - idKey:{ + idKey: { type: String, - default: 'id', + default: "id", }, //限时折扣 limitDiscount: { @@ -53,4 +65,11 @@ const props = defineProps({ }); - \ No newline at end of file + \ No newline at end of file diff --git a/distribution/components/commission.vue b/distribution/components/commission.vue new file mode 100644 index 0000000..4e90d5f --- /dev/null +++ b/distribution/components/commission.vue @@ -0,0 +1,107 @@ + + + + + + \ No newline at end of file diff --git a/distribution/components/rule.vue b/distribution/components/rule.vue new file mode 100644 index 0000000..3058db4 --- /dev/null +++ b/distribution/components/rule.vue @@ -0,0 +1,137 @@ + + + + + + \ No newline at end of file diff --git a/distribution/components/tips-popup.vue b/distribution/components/tips-popup.vue new file mode 100644 index 0000000..c6f8228 --- /dev/null +++ b/distribution/components/tips-popup.vue @@ -0,0 +1,57 @@ + + + + + + \ No newline at end of file diff --git a/distribution/income-details/index.vue b/distribution/income-details/index.vue index 1f487b0..977198f 100644 --- a/distribution/income-details/index.vue +++ b/distribution/income-details/index.vue @@ -45,46 +45,66 @@ - + 总计: - 999.99 + + {{ centerUserInfo.totalIncome }} - + - 来源: - 儿童玩具部落 + 来源: + {{ item.shopName }} - 待入账 + 待入账 + 已入账 + 已退款 - 订单: - WEB1942482053783560192 + 订单: + {{ item.orderNo }} - +100 - (订单一级分成) - + -{{ item.rewardAmount }} + + +{{ item.rewardAmount }} + 订单退款 + (订单一级分成) + (订单二级分成) - 时间: - 2025/01/21 04:03 + 时间: + {{ item.createTime }} - - - + @@ -132,7 +152,9 @@ \ No newline at end of file diff --git a/distribution/shop-detail/components/bind-shangji.vue b/distribution/shop-detail/components/bind-shangji.vue index 39b167f..6b3489d 100644 --- a/distribution/shop-detail/components/bind-shangji.vue +++ b/distribution/shop-detail/components/bind-shangji.vue @@ -19,6 +19,7 @@ + @@ -34,6 +35,7 @@ \ No newline at end of file diff --git a/distribution/shop-detail/index.vue b/distribution/shop-detail/index.vue index f58124a..08d06fb 100644 --- a/distribution/shop-detail/index.vue +++ b/distribution/shop-detail/index.vue @@ -7,189 +7,636 @@ :fixed="true" > - - + + - - 这里是店铺名称 + + {{ + state.shopName + }} - \ No newline at end of file diff --git a/distribution/shop-list/index.vue b/distribution/shop-list/index.vue new file mode 100644 index 0000000..afc3e2a --- /dev/null +++ b/distribution/shop-list/index.vue @@ -0,0 +1,201 @@ + + + + + \ No newline at end of file diff --git a/distribution/static/scan.svg b/distribution/static/scan.svg new file mode 100644 index 0000000..c4aa892 --- /dev/null +++ b/distribution/static/scan.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/distribution/withdraw/index.vue b/distribution/withdraw/index.vue index 251e501..cbce567 100644 --- a/distribution/withdraw/index.vue +++ b/distribution/withdraw/index.vue @@ -13,20 +13,21 @@ ¥ - 全部提现 + 全部提现 - 可提现金额:¥399.99 + 可提现金额:¥{{ state.cashOutAmount || 0 }} 手续费为8% 实名认证 - 立即提现 + 立即提现 @@ -35,26 +36,42 @@ 提现记录 - + 提现 手续费9.99元手续费{{ item.serviceFee }}元 - 时间:2017/8/9 21:02 + 时间:{{ item.createTime }} -