每周五更新
This commit is contained in:
@@ -240,6 +240,27 @@
|
||||
>
|
||||
</div>
|
||||
|
||||
<!-- 钱包未绑定提示弹窗 -->
|
||||
<el-dialog
|
||||
title="提示"
|
||||
:visible.sync="walletBindDialogVisible"
|
||||
width="400px"
|
||||
:close-on-click-modal="false"
|
||||
:show-close="false"
|
||||
:close-on-press-escape="false"
|
||||
class="wallet-bind-dialog"
|
||||
>
|
||||
<div class="wallet-bind-content">
|
||||
<i class="el-icon-warning wallet-warning-icon"></i>
|
||||
<p class="wallet-bind-message">
|
||||
请先在我的店铺绑定钱包地址后才能创建商品
|
||||
</p>
|
||||
<el-button type="primary" @click="handleGoToWalletBind" class="wallet-bind-btn">
|
||||
去绑定钱包
|
||||
</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 上架确认弹窗 -->
|
||||
<el-dialog
|
||||
title="请确认上架信息"
|
||||
@@ -558,6 +579,8 @@ export default {
|
||||
loadingCoins: false,
|
||||
/** 加载算法状态映射 { index: boolean } */
|
||||
loadingAlgos: {},
|
||||
/** 钱包未绑定提示弹窗 */
|
||||
walletBindDialogVisible: false,
|
||||
params: {
|
||||
cost: 353400,
|
||||
powerDissipation: 0.01,
|
||||
@@ -887,7 +910,7 @@ export default {
|
||||
image: it && it.payCoinImage ? String(it.payCoinImage) : "",
|
||||
});
|
||||
});
|
||||
// 根据接口结果渲染“统一售价”输入组
|
||||
// 根据接口结果渲染"统一售价"输入组
|
||||
this.payTypeDefs = defs;
|
||||
const nextCostMap = {};
|
||||
this.payTypeDefs.forEach((d) => {
|
||||
@@ -896,11 +919,26 @@ export default {
|
||||
(this.form.costMap && this.form.costMap[d.key]) || "";
|
||||
});
|
||||
this.form.costMap = nextCostMap;
|
||||
|
||||
// 如果返回的支付方式列表为空,显示提示弹窗
|
||||
if (defs.length === 0) {
|
||||
this.walletBindDialogVisible = true;
|
||||
}
|
||||
} else {
|
||||
// 如果接口返回失败或数据格式不正确,也显示提示弹窗
|
||||
this.walletBindDialogVisible = true;
|
||||
}
|
||||
} catch (e) {
|
||||
// 忽略错误,维持当前 payTypeDefs
|
||||
// 接口调用失败,显示提示弹窗
|
||||
this.walletBindDialogVisible = true;
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 跳转到钱包绑定页面
|
||||
*/
|
||||
handleGoToWalletBind() {
|
||||
this.$router.push('/account/shop-config');
|
||||
},
|
||||
/**
|
||||
* ASIC 模式:出售机器数量输入,仅允许 0-9999 的整数
|
||||
*/
|
||||
@@ -1716,5 +1754,48 @@ export default {
|
||||
gap: 12px;
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
/* 钱包绑定提示弹窗样式 */
|
||||
.wallet-bind-dialog :deep(.el-dialog__header) {
|
||||
padding: 16px 20px 12px;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
}
|
||||
|
||||
.wallet-bind-dialog :deep(.el-dialog__title) {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.wallet-bind-dialog :deep(.el-dialog__body) {
|
||||
padding: 24px 20px;
|
||||
}
|
||||
|
||||
.wallet-bind-content {
|
||||
text-align: center;
|
||||
padding: 8px 0;
|
||||
}
|
||||
|
||||
.wallet-warning-icon {
|
||||
font-size: 40px;
|
||||
color: #E6A23C;
|
||||
margin-bottom: 16px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.wallet-bind-message {
|
||||
font-size: 14px;
|
||||
color: #666;
|
||||
margin: 0 0 24px 0;
|
||||
line-height: 1.6;
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
||||
.wallet-bind-btn {
|
||||
width: 160px;
|
||||
height: 36px;
|
||||
font-size: 14px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user