fix(wallet): 放开未入驻账号查看提现规则与新增withdrawRules公开接口
这个提交包含在:
@@ -103,6 +103,12 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 提现规则加载失败重试条(绝不使用假数据兜底) -->
|
||||
<view class="rule-error-bar" v-else-if="ruleLoadFailed">
|
||||
<text class="rule-error-txt">提现规则加载失败,请检查服务端是否已更新或点击重试</text>
|
||||
<view class="rule-retry-btn clickable-hover" @tap="load">重试</view>
|
||||
</view>
|
||||
|
||||
<!-- 收支账单与提现明细 -->
|
||||
<view class="bill-card">
|
||||
<view class="card-head">
|
||||
@@ -451,6 +457,7 @@
|
||||
const confirmingId = ref(0);
|
||||
const activeLog = ref(null);
|
||||
const activeWithdraw = ref(null);
|
||||
const ruleLoadFailed = ref(false);
|
||||
|
||||
const availMoney = computed(() => Number(income.value?.money || 0));
|
||||
const withdrawCfg = computed(() => income.value?.withdraw_config || null);
|
||||
@@ -683,6 +690,7 @@
|
||||
}
|
||||
|
||||
async function load() {
|
||||
ruleLoadFailed.value = false;
|
||||
try {
|
||||
const res = await api.masterIncome();
|
||||
income.value = res;
|
||||
@@ -693,7 +701,27 @@
|
||||
const refreshed = withdrawList.value.find(item => item.id === activeWithdraw.value.id);
|
||||
activeWithdraw.value = refreshed || null;
|
||||
}
|
||||
} catch (e) {}
|
||||
return;
|
||||
} catch (e) {
|
||||
try {
|
||||
const ruleRes = await api.masterWithdrawRules();
|
||||
if (ruleRes && ruleRes.withdraw_config) {
|
||||
income.value = Object.assign({
|
||||
money: 0,
|
||||
frozen_money: 0,
|
||||
today_income: 0,
|
||||
total_income: 0
|
||||
}, income.value || {}, {
|
||||
withdraw_config: ruleRes.withdraw_config,
|
||||
withdraw_limits: ruleRes.withdraw_limits || {}
|
||||
});
|
||||
return;
|
||||
}
|
||||
} catch (re) {}
|
||||
if (!withdrawCfg.value) {
|
||||
ruleLoadFailed.value = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function openWithdraw() {
|
||||
@@ -1138,6 +1166,37 @@
|
||||
line-height: 1.5;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
.rule-error-bar {
|
||||
margin: 20rpx $yjyf-space-md 0;
|
||||
padding: 18rpx 22rpx;
|
||||
background: $yjyf-bg-card;
|
||||
border-radius: $yjyf-radius-md;
|
||||
box-shadow: $yjyf-shadow-card;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 16rpx;
|
||||
}
|
||||
.rule-error-txt {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
font-size: $yjyf-font-sub;
|
||||
color: $yjyf-danger;
|
||||
line-height: 1.45;
|
||||
}
|
||||
.rule-retry-btn {
|
||||
height: 52rpx;
|
||||
padding: 0 22rpx;
|
||||
border-radius: $yjyf-radius-pill;
|
||||
background: $yjyf-primary-bg;
|
||||
color: $yjyf-primary;
|
||||
font-size: $yjyf-font-sub;
|
||||
font-weight: 600;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* 账单卡片 */
|
||||
.bill-card {
|
||||
|
||||
@@ -65,6 +65,7 @@ export default {
|
||||
masterVerifyCode: (data) => post('/master/verifyCode', data),
|
||||
masterRequestDiff: (data) => post('/master/requestDiff', data),
|
||||
masterIncome: () => get('/master/income'),
|
||||
masterWithdrawRules: () => get('/master/withdrawRules', {}, { silent: true }),
|
||||
masterToggle: (data) => post('/master/toggleWork', data),
|
||||
masterUpdateLocation: (data) => post('/master/updateLocation', data),
|
||||
masterResolveLocation: (data) => get('/master/resolveLocation', data, { silent: true }),
|
||||
|
||||
在新工单中引用
屏蔽一个用户