feat(dealer): 调整分销商资金明细展示及提现逻辑- 交换订单编号与收益描述的显示位置
- 更新开发环境API基础URL - 新增根据订单号查询分销商资金明细的方法 - 修改订单页面日期状态为月份格式- 将提现费率从16%调整为0%,保留固定费用3元 - 移除提现页面中关于费率的描述文字
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
export const ENV_CONFIG = {
|
||||
// 开发环境
|
||||
development: {
|
||||
API_BASE_URL: 'http://127.0.0.1:9200/api',
|
||||
API_BASE_URL: 'https://cms-api.websoft.top/api',
|
||||
APP_NAME: '开发环境',
|
||||
DEBUG: 'true',
|
||||
},
|
||||
|
||||
@@ -99,3 +99,17 @@ export async function getShopDealerCapital(id: number) {
|
||||
}
|
||||
return Promise.reject(new Error(res.message));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据id查询分销商资金明细表
|
||||
*/
|
||||
export async function getShopDealerCapitalByOrderNo(orderNo: string) {
|
||||
const res = await request.get<ApiResult<ShopDealerCapital>>(
|
||||
'/shop/shop-dealer-capital/getByCode/' + orderNo
|
||||
);
|
||||
if (res.code === 0 && res.data) {
|
||||
return res.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.message));
|
||||
}
|
||||
|
||||
@@ -53,10 +53,10 @@ const DealerCapitalDetail = () => {
|
||||
|
||||
<View className="flex flex-col justify-between mb-1">
|
||||
<Text className="text-sm my-1 text-gray-500">
|
||||
订单编号:{item.orderNo}
|
||||
收益描述:{item.comments}
|
||||
</Text>
|
||||
<Text className="text-sm my-1 text-gray-500">
|
||||
收益描述:{item.comments}
|
||||
订单编号:{item.orderNo}
|
||||
</Text>
|
||||
<Text className="text-sm my-1 text-gray-500">
|
||||
创建时间:{item.createTime}
|
||||
|
||||
@@ -16,9 +16,9 @@ interface OrderWithDetails extends ShopDealerOrder {
|
||||
const DealerOrder: React.FC = () => {
|
||||
const [loading, setLoading] = useState<boolean>(false)
|
||||
const d = new Date()
|
||||
const currDay = `${d.getFullYear()}${d.getMonth() + 1}`;
|
||||
const currMonth = `${d.getFullYear()}${d.getMonth() + 1}`;
|
||||
const currDate = `${d.getFullYear()}-${d.getMonth() + 1}-${d.getDate()}`;
|
||||
const [date, setDate] = useState(currDay)
|
||||
const [date, setDate] = useState(currMonth)
|
||||
const [show1, setShow1] = useState(false)
|
||||
const [refreshing, setRefreshing] = useState<boolean>(false)
|
||||
const [loadingMore, setLoadingMore] = useState<boolean>(false)
|
||||
|
||||
@@ -293,7 +293,7 @@ const DealerWithdraw: React.FC = () => {
|
||||
if (!amount || isNaN(parseFloat(amount))) return '0.00'
|
||||
const withdrawAmount = parseFloat(amount)
|
||||
// 提现费率 16% + 3元
|
||||
const feeRate = 0.16
|
||||
const feeRate = 0
|
||||
const fixedFee = 3
|
||||
const totalFee = withdrawAmount * feeRate + fixedFee
|
||||
const expectedAmount = withdrawAmount - totalFee
|
||||
@@ -360,7 +360,7 @@ const DealerWithdraw: React.FC = () => {
|
||||
<ArrowRight className={'text-gray-300'} size={15}/>
|
||||
</View>
|
||||
}/>
|
||||
<Cell title={'预计到账金额'} description={'提现费率 16% +3元'} extra={
|
||||
<Cell title={'预计到账金额'} extra={
|
||||
<View className="flex items-center justify-between gap-1">
|
||||
<Text className={'text-orange-500 px-2 text-lg'}>¥{calculateExpectedAmount(withdrawAmount)}</Text>
|
||||
</View>
|
||||
|
||||
Reference in New Issue
Block a user