每周更新
This commit is contained in:
@@ -13,13 +13,17 @@
|
||||
请在本页点击 <b>钱包绑定</b>,配置自己的收款地址(支持不同链与币种)。
|
||||
</li>
|
||||
<li>
|
||||
<b>商品</b>:完成钱包绑定后,即可在“我的店铺”页面 <b>创建商品</b>。
|
||||
商品可按 <b>币种</b> 进行分类管理,创建的商品会在商城对买家展示。
|
||||
商品可理解为“不同算法、币种的机器集合分类”。
|
||||
</li>
|
||||
<li>
|
||||
<b>出售机器</b>:创建商品后,请进入 <b>商品列表</b> 为该商品 <b>添加出售机器明细</b>。
|
||||
必须添加出售机器,否则买家无法下单。买家点击某个商品后,会看到该商品下的机器明细并进行选购。
|
||||
<b>创建商品</b>:完成钱包绑定后,即可在“我的店铺”页面 点击<b>新增商品</b>按钮。
|
||||
<ul class="guide-substeps">
|
||||
<li>
|
||||
<b>ASIC 商品创建</b>:选择矿机种类为 ASIC,填写页面商品信息后创建,商品可按 <b>币种</b> 进行分类管理,创建的商品会在商城对买家展示;
|
||||
商品可理解为“不同算法、币种的机器集合分类”。
|
||||
</li>
|
||||
<li>
|
||||
<b>GPU 商品创建</b>:选择矿机种类为 GPU,查看页面注意事项并下载对应客户端,启动后读取自动创建。创建完成请进入 <b>商品列表</b> 为该商品手动配置售价等相关信息并上架。
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ol>
|
||||
<div class="guide-note">提示:建议先创建店铺 → 完成钱包绑定 → 创建商品的顺序,避免漏配导致无法收款或无法下单。</div>
|
||||
@@ -245,6 +249,7 @@ import { getMyShop, updateShop, deleteShop, queryShop, closeShop ,updateShopConf
|
||||
|
||||
import { coinList } from '@/utils/coinList'
|
||||
import { getShopConfig,getShopConfigV2 ,withdrawBalanceForSeller,updateShopConfigV2} from '@/api/wallet'
|
||||
import { rsaEncrypt, rsaEncryptSync } from '@/utils/rsaEncrypt'
|
||||
|
||||
|
||||
export default {
|
||||
@@ -434,12 +439,55 @@ export default {
|
||||
this.withdrawLoading = true
|
||||
try {
|
||||
const row = this.currentWithdrawRow || {}
|
||||
|
||||
/**
|
||||
* 提现地址 RSA 加密(与“钱包绑定”页面保持一致:同步优先,异步兜底)
|
||||
* - toAddress: 用户输入/默认地址
|
||||
* - fromAddress: 当前绑定的钱包地址(后端可能用于校验来源)
|
||||
*/
|
||||
const toAddressPlain = String(this.withdrawForm.toAddress || '').trim()
|
||||
const fromAddressPlain = String(row.payAddress || this.withdrawForm.toAddress || '').trim()
|
||||
|
||||
/** @type {string} */
|
||||
let encryptedToAddress = toAddressPlain
|
||||
if (encryptedToAddress) {
|
||||
const syncEncrypted = rsaEncryptSync(encryptedToAddress)
|
||||
if (syncEncrypted) {
|
||||
encryptedToAddress = syncEncrypted
|
||||
} else {
|
||||
const asyncEncrypted = await rsaEncrypt(encryptedToAddress)
|
||||
if (asyncEncrypted) {
|
||||
encryptedToAddress = asyncEncrypted
|
||||
} else {
|
||||
this.$message.error('钱包地址加密失败,请重试')
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** @type {string} */
|
||||
let encryptedFromAddress = fromAddressPlain
|
||||
if (encryptedFromAddress) {
|
||||
const syncEncrypted = rsaEncryptSync(encryptedFromAddress)
|
||||
if (syncEncrypted) {
|
||||
encryptedFromAddress = syncEncrypted
|
||||
} else {
|
||||
const asyncEncrypted = await rsaEncrypt(encryptedFromAddress)
|
||||
if (asyncEncrypted) {
|
||||
encryptedFromAddress = asyncEncrypted
|
||||
} else {
|
||||
this.$message.error('钱包地址加密失败,请重试')
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const payload = {
|
||||
toChain: row.chain,
|
||||
toSymbol: row.payCoin,
|
||||
amount: Number(this.withdrawForm.amount),
|
||||
toAddress: this.withdrawForm.toAddress,
|
||||
fromAddress: row.payAddress || this.withdrawForm.toAddress || '',
|
||||
toAddress: encryptedToAddress,
|
||||
fromAddress: encryptedFromAddress,
|
||||
code: this.withdrawForm.googleCode,
|
||||
serviceCharge: Number(this.withdrawForm.fee) || 0
|
||||
}
|
||||
@@ -679,26 +727,53 @@ export default {
|
||||
this.deleteShopConfig({id:row.id})
|
||||
},
|
||||
|
||||
submitConfigEdit() {
|
||||
/**
|
||||
* 提交配置修改
|
||||
*/
|
||||
async submitConfigEdit() {
|
||||
// 仅校验钱包地址
|
||||
const addr = (this.configForm.payAddress || '').trim()
|
||||
if (!addr) {
|
||||
this.$message.warning('请输入钱包地址')
|
||||
return
|
||||
}
|
||||
|
||||
/**
|
||||
* 使用 RSA 加密钱包地址(与“钱包绑定”页面保持一致:同步优先,异步兜底)
|
||||
* @type {string}
|
||||
*/
|
||||
let encryptedPayAddress = addr
|
||||
if (encryptedPayAddress) {
|
||||
const syncEncrypted = rsaEncryptSync(encryptedPayAddress)
|
||||
if (syncEncrypted) {
|
||||
encryptedPayAddress = syncEncrypted
|
||||
} else {
|
||||
const asyncEncrypted = await rsaEncrypt(encryptedPayAddress)
|
||||
if (asyncEncrypted) {
|
||||
encryptedPayAddress = asyncEncrypted
|
||||
} else {
|
||||
this.$message.error('钱包地址加密失败,请重试')
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const payload = {
|
||||
id: this.configForm.id,
|
||||
chain: this.configForm.chainValue || this.configForm.chainLabel || '',
|
||||
payAddress: this.configForm.payAddress
|
||||
payAddress: encryptedPayAddress
|
||||
}
|
||||
;(async () => {
|
||||
try {
|
||||
const res = await updateShopConfigV2(payload)
|
||||
if (res && (res.code === 0 || res.code === 200)) {
|
||||
this.$message.success('保存成功')
|
||||
this.visibleConfigEdit = false
|
||||
this.fetchShopConfigs(this.shop.id)
|
||||
}
|
||||
})()
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('修改配置失败', e)
|
||||
this.$message.error('修改配置失败,请重试')
|
||||
}
|
||||
},
|
||||
removeSelectedCoin(labelUpper) {
|
||||
const label = String(labelUpper || '').toLowerCase()
|
||||
@@ -935,6 +1010,8 @@ export default {
|
||||
.guide-steps { margin: 0; padding-left: 18px; color: #374151; }
|
||||
.guide-steps li { line-height: 1.9; margin: 6px 0; }
|
||||
.guide-steps b { color: #111827; }
|
||||
.guide-substeps { margin: 6px 0 0 0; padding-left: 18px; list-style: disc; }
|
||||
.guide-substeps li { line-height: 1.8; margin: 4px 0; }
|
||||
.guide-note { margin-top: 10px; color: #6b7280; font-size: 13px; background: #f9fafb; border: 1px dashed #e5e7eb; padding: 8px 10px; border-radius: 8px; }
|
||||
.coin-list { display: flex; align-items: center; gap: 8px; }
|
||||
.coin-img { width: 20px; height: 20px; border-radius: 4px; display: inline-block; }
|
||||
|
||||
Reference in New Issue
Block a user