diff --git a/power_leasing/src/api/user.js b/power_leasing/src/api/user.js index 0b832bc..4a96e82 100644 --- a/power_leasing/src/api/user.js +++ b/power_leasing/src/api/user.js @@ -71,6 +71,39 @@ export function updatePassword(data) { } + //注销账户 +export function closeAccount(data) { + return request({ + url: `/lease/auth/closeAccount`, + method: 'post', + data + }) +} + + + //注销邮箱验证码 + export function sendCloseAccount(data) { + return request({ + url: `/lease/auth/sendCloseAccount`, + method: 'post', + data + }) + } + + + //个人中心修改密码 + export function updatePasswordInCenter(data) { + return request({ + url: `/lease/auth/updatePasswordInCenter`, + method: 'post', + data + }) + } + + + + + diff --git a/power_leasing/src/components/header.vue b/power_leasing/src/components/header.vue index 46c460c..2d1e58c 100644 --- a/power_leasing/src/components/header.vue +++ b/power_leasing/src/components/header.vue @@ -9,7 +9,7 @@ :key="nav.path" :to="nav.path" class="nav-btn" - active-class="active" + :class="{ active: isNavActive(nav.path) }" :title="nav.description" > {{ nav.icon }} @@ -30,9 +30,16 @@ - +
{{ userEmail }} + + 安全设置 +
-
订单号{{ row.orderId || '' }}
-
支付地址{{ row.fromAddress || '' }}
-
收款地址{{ row.toAddress || '' }}
-
交易哈希{{ row.txHash }}
+
+ 订单号 +
+ {{ row.orderId || '' }} + 复制 +
+
+
+ 支付地址 +
+ {{ row.fromAddress || '' }} + 复制 +
+
+
+ 收款地址 +
+ {{ row.toAddress || '' }} + 复制 +
+
+
+ 交易哈希 +
+ {{ row.txHash }} + 复制 +
+
diff --git a/power_leasing/src/views/account/index.vue b/power_leasing/src/views/account/index.vue index a4d716b..204a98a 100644 --- a/power_leasing/src/views/account/index.vue +++ b/power_leasing/src/views/account/index.vue @@ -16,20 +16,20 @@
@@ -68,7 +68,6 @@ export default { // { label: '充值记录', to: '/account/rechargeRecord' }, // { label: '提现记录', to: '/account/withdrawalHistory' }, { label: '资金流水', to: '/account/funds-flow' }, - { label: '安全设置', to: '/account/security-settings' }, ], // 卖家侧导航 sellerLinks: [ @@ -77,7 +76,6 @@ export default { { label: '商品列表', to: '/account/products' }, { label: '已售出订单', to: '/account/seller-orders' }, { label: '资金流水', to: '/account/seller-funds-flow' }, - { label: '安全设置', to: '/account/security-settings' }, ], } }, @@ -97,6 +95,14 @@ export default { displayedLinks() { return this.activeRole === 'buyer' ? this.buyerLinks : this.sellerLinks }, + /** + * 判断当前是否在安全设置页面 + * @returns {boolean} + */ + isSecuritySettingsPage() { + const path = (this.$route && this.$route.path) || '' + return path === '/account/security-settings' + }, }, mounted() { const getVal = (key) => { @@ -179,7 +185,10 @@ export default { '/account/shop-config' ] // 安全设置页面买家和卖家都可见,不参与分组判断 + // 在安全设置页面时,清除分组高亮(不设置 activeRole) if (path === '/account/security-settings') { + // 清除分组高亮,让所有分组按钮都不高亮 + this.activeRole = null return } const shouldBuyer = buyerPrefixes.some(p => path.indexOf(p) === 0) diff --git a/power_leasing/src/views/account/myShops.vue b/power_leasing/src/views/account/myShops.vue index 67a3dd8..4b2975c 100644 --- a/power_leasing/src/views/account/myShops.vue +++ b/power_leasing/src/views/account/myShops.vue @@ -229,12 +229,25 @@ - +
+
+ + + + +
取消 确认修改 @@ -272,7 +285,7 @@ export default { // 店铺配置列表 shopConfigs: [], visibleConfigEdit: false, - configForm: { id: '', chainLabel: '', chainValue: '', payAddress: '', payCoins: [], payCoin: '' }, + configForm: { id: '', chainLabel: '', chainValue: '', payAddress: '', payCoins: [], payCoin: '', googleCode: '' }, productOptions: [], coinOptions: coinList || [], editCoinOptionsApi: [], @@ -554,8 +567,14 @@ export default { if (!Number.isFinite(amtInt) || amtInt <= 0) { callback(new Error('请输入有效的金额')); return } const feeInt = this.toScaledInt(this.withdrawForm.fee) const balanceInt = this.toScaledInt((this.currentWithdrawRow && this.currentWithdrawRow.balance) || 0) - if (amtInt >= balanceInt) { callback(new Error('提现金额必须小于可用余额')); return } + // 允许提现金额等于可用余额,但不能大于 + if (amtInt > balanceInt) { callback(new Error('提现金额不能大于可用余额')); return } + // 提现金额必须大于手续费 if (amtInt <= feeInt) { callback(new Error('提现金额必须大于手续费')); return } + // 实际到账金额(提现金额 - 手续费)必须大于0 + const actualInt = amtInt - feeInt + if (actualInt <= 0) { callback(new Error('提现金额扣除手续费后必须大于0')); return } + // 最小提现金额为 1 if (amtInt < 1000000) { callback(new Error('最小提现金额为 1')); return } callback() }, @@ -701,7 +720,8 @@ export default { chainValue: d.value || '', payAddress: d.address || '', payCoins: preSelected, - payCoin: preSelected.join(',') + payCoin: preSelected.join(','), + googleCode: '' } } else { // 回退:使用行内已有数据 @@ -715,7 +735,8 @@ export default { chainValue: row.chain || '', payAddress: row.payAddress || '', payCoins, - payCoin: payCoins.join(',') + payCoin: payCoins.join(','), + googleCode: '' } } this.visibleConfigEdit = true @@ -727,19 +748,42 @@ export default { this.deleteShopConfig({id:row.id}) }, + /** + * 处理谷歌验证码输入(仅允许数字) + */ + handleConfigGoogleCodeInput(v) { + this.configForm.googleCode = String(v || '').replace(/\D/g, '') + }, + /** + * 修改配置弹窗关闭时清空验证码 + */ + handleConfigEditClose() { + this.configForm.googleCode = '' + }, /** * 提交配置修改 */ async submitConfigEdit() { - // 仅校验钱包地址 + // 校验钱包地址 const addr = (this.configForm.payAddress || '').trim() if (!addr) { this.$message.warning('请输入钱包地址') return } + // 校验谷歌验证码 + const googleCode = String(this.configForm.googleCode || '').trim() + if (!googleCode) { + this.$message.warning('请输入谷歌验证码') + return + } + if (!/^\d{6}$/.test(googleCode)) { + this.$message.warning('谷歌验证码必须是6位数字') + return + } + /** - * 使用 RSA 加密钱包地址(与“钱包绑定”页面保持一致:同步优先,异步兜底) + * 使用 RSA 加密钱包地址(与"钱包绑定"页面保持一致:同步优先,异步兜底) * @type {string} */ let encryptedPayAddress = addr @@ -761,7 +805,8 @@ export default { const payload = { id: this.configForm.id, chain: this.configForm.chainValue || this.configForm.chainLabel || '', - payAddress: encryptedPayAddress + payAddress: encryptedPayAddress, + gcode: googleCode } try { const res = await updateShopConfigV2(payload) diff --git a/power_leasing/src/views/account/products.vue b/power_leasing/src/views/account/products.vue index 978cfe2..fbf1b36 100644 --- a/power_leasing/src/views/account/products.vue +++ b/power_leasing/src/views/account/products.vue @@ -301,18 +301,38 @@ v-for="(row, idx) in editDialog.form.coinAndAlgoList" :key="'edit-ca-' + idx" > - - + + + + :loading="loadingAlgos[idx]" + :disabled="!row.coin" + filterable + clearable + > + + { + // 如果是对象,取 coin 字段;如果是字符串,直接使用 + return typeof item === 'string' ? item : (item.coin || item.name || item) + }).filter(Boolean) + } else if (data && typeof data === 'object') { + // 如果是对象,尝试提取币种列表 + this.coinOptions = Object.keys(data).map(key => { + const item = data[key] + return typeof item === 'string' ? item : (item.coin || item.name || key) + }).filter(Boolean) + } + // 去重并排序 + this.coinOptions = [...new Set(this.coinOptions)].sort() + } + } catch (e) { + console.error('加载币种列表失败', e) + } finally { + this.loadingCoins = false + } }, - /** 编辑弹窗:算法输入过滤(仅字母数字和-,转大写) */ - editHandleAlgorithmInput(index) { - const r = this.editDialog.form.coinAndAlgoList[index] - let v = String(r.algorithm || '') - v = v.replace(/[\u4e00-\u9fa5]/g, '').replace(/[^A-Za-z0-9-]/g, '') - this.$set(this.editDialog.form.coinAndAlgoList[index], 'algorithm', v.toUpperCase()) + /** + * 币种选择变化处理(编辑弹窗) + * @param {number} index - 行索引 + * @param {string} coin - 选择的币种 + */ + async editHandleCoinChange(index, coin) { + // 清空当前行的算法选择 + this.$set(this.editDialog.form.coinAndAlgoList[index], 'algorithm', '') + // 如果选择了币种,加载对应的算法列表 + if (coin) { + await this.editLoadAlgorithmsForCoin(coin, index) + } + }, + /** + * 加载指定币种支持的算法列表(编辑弹窗) + * @param {string} coin - 币种名称 + * @param {number} index - 行索引(用于显示加载状态) + */ + async editLoadAlgorithmsForCoin(coin, index) { + if (!coin) return + + // 如果已经加载过该币种的算法,直接返回 + if (this.algoOptionsMap[coin] && this.algoOptionsMap[coin].length > 0) { + return + } + + // 设置加载状态 + this.$set(this.loadingAlgos, index, true) + + try { + const res = await getSupportAlgo(coin) + if (res && (res.code === 0 || res.code === 200)) { + const data = res.data || [] + let algorithms = [] + + // 处理返回的数据,可能是数组或对象 + if (Array.isArray(data)) { + algorithms = data.map(item => { + // 如果是对象,取 algorithm 或 algo 字段;如果是字符串,直接使用 + return typeof item === 'string' ? item : (item.algorithm || item.algo || item.name || item) + }).filter(Boolean) + } else if (data && typeof data === 'object') { + // 如果是对象,尝试提取算法列表 + algorithms = Object.keys(data).map(key => { + const item = data[key] + return typeof item === 'string' ? item : (item.algorithm || item.algo || item.name || key) + }).filter(Boolean) + } + + // 去重并排序,保存到映射中 + this.$set(this.algoOptionsMap, coin, [...new Set(algorithms)].sort()) + } + } catch (e) { + console.error(`加载币种 ${coin} 的算法列表失败`, e) + // 设置空数组,避免重复请求 + this.$set(this.algoOptionsMap, coin, []) + } finally { + this.$set(this.loadingAlgos, index, false) + } }, /** 编辑弹窗:理论算力限制(6整数+4小数) */ editHandleRowTheoryInput(index) { @@ -580,8 +683,11 @@ export default { return } const last = list[list.length - 1] || { unit: 'TH/S' } + const newIndex = list.length list.push({ coin: '', algorithm: '', theoryPower: '', unit: last.unit || 'TH/S', coinAndPowerId: null }) this.$set(this.editDialog.form, 'coinAndAlgoList', list) + // 初始化新行的加载状态 + this.$set(this.loadingAlgos, newIndex, false) }, /** 编辑弹窗:删除一行(至少保留1行) */ editHandleRemoveRow(index) { @@ -1243,6 +1349,16 @@ export default { }) this.editDialog.form = form this.editDialog.visible = true + // 打开弹窗时加载币种列表 + this.loadSupportCoins() + // 如果已有币种数据,预加载对应的算法列表 + if (form.coinAndAlgoList && form.coinAndAlgoList.length > 0) { + form.coinAndAlgoList.forEach((row, idx) => { + if (row.coin) { + this.editLoadAlgorithmsForCoin(row.coin, idx) + } + }) + } }, /** 保存编辑 */ diff --git a/power_leasing/src/views/account/securitySettings.vue b/power_leasing/src/views/account/securitySettings.vue index 5b341a0..3a448b1 100644 --- a/power_leasing/src/views/account/securitySettings.vue +++ b/power_leasing/src/views/account/securitySettings.vue @@ -16,10 +16,10 @@ {{ getStatusText }} {{ getButtonText }} @@ -28,6 +28,56 @@
+ +
+
+
+
+ +
+
+
修改密码
+

定期修改密码可以提高账户安全性,建议使用强密码并定期更换。

+
+
+
+ + 修改 + +
+
+
+
+ + +
+
+
+
+ +
+
+
注销账号
+

注销账号将永久删除您的账户和所有相关数据,此操作不可恢复,请谨慎操作。

+
+
+
+ +
+
+
+
+ + + + + + + + + +
+ + + {{ changePasswordCountdown > 0 ? `${changePasswordCountdown}秒后重试` : '获取验证码' }} + +
+
+ + + + +
+ + 密码需包含大小写字母、数字和特殊字符,长度8-32位 +
+
+ + + + + + + + +
+ + 取消 + + 确认修改 + + +
+ + + + + + + + +
+ + + {{ deleteAccountCountdown > 0 ? `${deleteAccountCountdown}秒后重试` : '获取验证码' }} + +
+
+ + + + +
+ + 取消 + + 确定注销 + + +
\ No newline at end of file +power_leasing
\ No newline at end of file diff --git a/power_leasing/test/js/app.7bd6edb2.js b/power_leasing/test/js/app.7bd6edb2.js new file mode 100644 index 0000000..e4e341d --- /dev/null +++ b/power_leasing/test/js/app.7bd6edb2.js @@ -0,0 +1,2 @@ +(function(){"use strict";var t={346:function(t,e,a){Object.defineProperty(e,"B",{value:!0}),e.A=void 0,a(4114);var i=a(9252),s=a(9662);e.A={name:"AccountProductNew",data(){const t=(t,e,a)=>{"string"!==typeof e||0!==e.trim().length?a():a(new Error("内容不能全是空格"))},e=t=>{if("string"!==typeof t||0===t.length)return!1;const e=/[\u{1F300}-\u{1FAFF}]|[\u{1F1E6}-\u{1F1FF}]|[\u{2600}-\u{26FF}]|[\u{2700}-\u{27BF}]|[\u{FE0F}]|[\u{200D}]|[\u{20E3}]/u;return e.test(t)},a=(t,a,i)=>{"string"===typeof a&&e(a)?i(new Error("商品名称不能包含表情符号")):i()};return{submitting:!1,form:{name:"",type:0,coin:"",description:"",image:"",state:0,shopId:null},rules:{name:[{required:!0,message:"请输入商品名称",trigger:"blur"},{validator:t,trigger:"blur"},{validator:a,trigger:"blur"},{min:1,max:30,message:"商品名称长度在 2 到 30 个字符",trigger:"blur"}],type:[{required:!0,message:"请选择商品类型",trigger:"change"}],coin:[{required:!0,message:"请选择挖矿币种",trigger:"change"}],description:[{required:!0,message:"请输入商品描述",trigger:"blur"},{validator:t,trigger:"blur"},{min:1,max:100,message:"商品描述长度在 1 到 100 个字符",trigger:"blur"}],image:[],state:[{required:!0,message:"请选择商品状态",trigger:"change"}]}}},computed:{coinOptions(){return i.coinList||[{value:"nexa",label:"NEXA"},{value:"rxd",label:"RXD"},{value:"dgbo",label:"DGBO"},{value:"dgbq",label:"DGBQ"},{value:"dgbs",label:"DGBS"},{value:"alph",label:"ALPH"},{value:"enx",label:"ENX"},{value:"grs",label:"GRS"},{value:"mona",label:"MONA"}]}},created(){const t=this.$route.query.shopId;t&&(this.form.shopId=Number(t))},methods:{async fetchAddProduct(t){const e=await(0,s.createProduct)(t);!e||0!==e.code&&200!==e.code?this.$message({message:e&&e.msg?e.msg:"创建失败",type:"error",showClose:!0}):(this.$message({message:"商品创建成功",type:"success",showClose:!0}),this.$router.push("/account/products"))},async handleSubmit(){try{const t=await this.$refs.productForm.validate();if(!t)return;if(!this.form.shopId)return void this.$message({message:"缺少店铺ID,请从我的店铺页面进入",type:"error",showClose:!0});this.submitting=!0,this.fetchAddProduct(this.form)}catch(t){console.error("创建商品失败:",t)}finally{this.submitting=!1}},handleReset(){this.$refs.productForm.resetFields();const t=this.$route.query.shopId;t&&(this.form.shopId=Number(t))},handleCancel(){this.$router.push("/account/shops")}}}},460:function(t,e,a){var i=a(3999)["default"];Object.defineProperty(e,"B",{value:!0}),e.A=void 0;var s=a(4180),o=i(a(6930));e.A={name:"AccountOrders",components:{OrderList:o.default},data(){return{active:"7",orders:{7:[],8:[],9:[]},loading:!1}},created(){const t=this.$route&&this.$route.query&&this.$route.query.status?String(this.$route.query.status):null,e=localStorage.getItem("orderListActiveTab"),a=t||e||"7";this.active=a,this.fetchOrders(a)},methods:{async fetchCancelOrder(t){const e=await(0,s.cancelOrder)(t);e&&200===Number(e.code)?(this.$message({message:"取消订单成功",type:"success",showClose:!0}),this.fetchOrders(this.active)):this.$message({message:e&&e.msg||"取消失败",type:"error",showClose:!0})},handleCancelOrder({orderId:t}){t&&this.fetchCancelOrder({orderId:t})},handleTabClick(t){const e=t&&t.name?String(t.name):this.active;try{localStorage.setItem("orderListActiveTab",e)}catch(a){console.warn("保存标签页状态失败:",a)}this.fetchOrders(e)},async fetchOrders(t){const e=String(t);try{this.loading=!0;const a=await(0,s.getOrdersByStatus)({status:Number(t)}),i=null!=(a&&a.data)?a.data:a,o=Array.isArray(i)?i:Array.isArray(i&&i.rows)?i.rows:[];this.$set(this.orders,e,o)}catch(a){console.log(a,"获取订单失败")}finally{this.loading=!1}}}}},465:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.initNoEmojiGuard=void 0;const a=()=>{if("undefined"===typeof window)return;if(window.__noEmojiGuardInitialized)return;window.__noEmojiGuardInitialized=!0;const t=/[\u{1F300}-\u{1FAFF}]|[\u{1F1E6}-\u{1F1FF}]|[\u{2600}-\u{26FF}]|[\u{2700}-\u{27BF}]|[\u{FE0F}]|[\u{200D}]|[\u{20E3}]/gu,e=t=>{if(!t||!(t instanceof Element))return!1;if(t.getAttribute&&"true"===t.getAttribute("data-allow-emoji"))return!1;const e=t.tagName;if("INPUT"===e){const e=(t.getAttribute("type")||"text").toLowerCase(),a=["checkbox","radio","file","hidden","button","submit","reset","range","color","date","datetime-local","month","time","week"];return-1===a.indexOf(e)}return"TEXTAREA"===e},a=(t,e)=>{try{t.__noEmojiComposing=e}catch(a){}},i=t=>!(!t||!t.__noEmojiComposing);function s(e){const a=String(e.value??"");if(!a)return;if(!t.test(a))return;const i=e.selectionStart,s=e.selectionEnd,o=a.replace(t,"");if(o===a)return;e.value=o;try{if("number"===typeof i&&"number"===typeof s){const t=a.length-o.length,s=Math.max(0,i-t);e.setSelectionRange(s,s)}}catch(n){}const r=new Event("input",{bubbles:!0});e.dispatchEvent(r)}document.addEventListener("compositionstart",t=>{e(t.target)&&a(t.target,!0)},!0),document.addEventListener("compositionend",t=>{e(t.target)&&(a(t.target,!1),s(t.target))},!0),document.addEventListener("input",t=>{const a=t.target;e(a)&&(i(a)||s(a))},!0)};e.initNoEmojiGuard=a},636:function(t,e,a){a.r(e),a.d(e,{__esModule:function(){return s.B},default:function(){return l}});var i=a(3386),s=a(2515),o=s.A,r=a(845),n=(0,r.A)(o,i.XX,i.Yp,!1,null,"147a043d",null),l=n.exports},792:function(t,e){e.Yp=e.XX=void 0;e.XX=function(){var t=this,e=t._self._c;return e("div",{staticClass:"account-page"},[e("div",{staticClass:"account-layout"},[e("aside",{staticClass:"sidebar"},[e("nav",{staticClass:"side-nav"},[e("div",{staticClass:"user-role",attrs:{role:"group","aria-label":"导航分组切换"}},[e("button",{staticClass:"role-button",class:{active:"buyer"===t.activeRole&&!t.isSecuritySettingsPage},attrs:{"aria-pressed":"buyer"===t.activeRole&&!t.isSecuritySettingsPage,tabindex:"0"},on:{click:function(e){return t.handleClickRole("buyer")},keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:(e.preventDefault(),t.handleClickRole("buyer"))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"space",32,e.key,[" ","Spacebar"])?null:(e.preventDefault(),t.handleClickRole("buyer"))}]}},[t._v("买家相关")]),e("button",{staticClass:"role-button",class:{active:"seller"===t.activeRole&&!t.isSecuritySettingsPage},attrs:{"aria-pressed":"seller"===t.activeRole&&!t.isSecuritySettingsPage,tabindex:"0"},on:{click:function(e){return t.handleClickRole("seller")},keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:(e.preventDefault(),t.handleClickRole("seller"))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"space",32,e.key,[" ","Spacebar"])?null:(e.preventDefault(),t.handleClickRole("seller"))}]}},[t._v("卖家相关")])]),t._l(t.displayedLinks,function(a){return e("router-link",{key:a.to,class:["side-link",t.isActiveLink(a.to)?"active":""],attrs:{to:a.to}},[t._v(t._s(a.label))])})],2)]),e("section",{staticClass:"content"},[e("router-view")],1)])])},e.Yp=[]},1029:function(t,e,a){Object.defineProperty(e,"B",{value:!0}),e.A=void 0,a(8111),a(7588),a(1701);var i=a(9662),s=a(1193);e.A={name:"AccountProductDetail",data(){return{loading:!1,product:null,ranges:[],machineList:[],productId:null,confirmVisible:!1,stateSnapshot:{},fieldSnapshot:{},updateLoading:!1,unitOptions:["KH/S","MH/S","GH/S","TH/S","PH/S"]}},created(){this.productId=Number(this.$route.params.id),this.productId&&(this.fetchDetail({id:this.productId}),this.fetchMachineList({id:this.productId}))},methods:{handlePayTypeChange(t){const e=this.machineList&&this.machineList[t];if(!e)return;const a=Number(e._selectedPayIndex||0),i=Array.isArray(e.priceList)?e.priceList:[],s=i[a]||{};this.$set(this.machineList,t,{...e,_priceEditing:String(s.price??"")})},isRowDisabled(t){return!!t&&1===Number(t.saleState)},handleOpenConfirm(){this.machineList&&this.machineList.length?this.confirmVisible=!0:this.$message.warning("没有可提交的数据")},async fetchDetail(t){this.loading=!0;try{const e=await(0,i.getMachineInfoById)(t),a=e?.data||{};this.product=a,this.ranges=Array.isArray(a.productMachineRangeList)?a.productMachineRangeList:[]}catch(e){console.error("获取商品详情失败",e),console.log("获取商品详情失败")}finally{this.loading=!1}},async fetchMachineList(t){const e=await(0,s.getMachineListForUpdate)(t);if(e&&200===e.code){const t=Array.isArray(e.rows)?e.rows:[];this.machineList=t.map(t=>{const e=Array.isArray(t.priceList)?t.priceList:[],a=0,i=e[a]||{};return{...t,_selectedPayIndex:a,_priceEditing:String(i.price??"")}}),this.refreshStateSnapshot(),this.refreshFieldSnapshot()}},refreshStateSnapshot(){const t={},e=Array.isArray(this.machineList)?this.machineList:[];for(let a=0;a{t&&(s[String(t.payTypeId??"")]=String(t.price??""))}),t[i.id]={theoryPower:String(i.theoryPower??""),powerDissipation:String(i.powerDissipation??""),type:String(i.type??""),priceMap:s,maxLeaseDays:String(i.maxLeaseDays??"")}}this.fieldSnapshot=t},isCellChanged(t,e){if(!t||"undefined"===typeof t.id)return!1;const a=this.fieldSnapshot[t.id]||{};if("price"===e){const e=Number(t._selectedPayIndex||0),i=Array.isArray(t.priceList)&&t.priceList[e]?t.priceList[e]:null,s=String(i&&i.payTypeId?i.payTypeId:e),o=String(i&&null!=i.price?i.price:""),r=String(a.priceMap&&a.priceMap[s]||"");return o!==r}const i=String(t[e]??""),s=String(a[e]??"");return i!==s},restoreStateSnapshot(){if(this.machineList&&this.machineList.length)for(let t=0;t6&&(r=r.slice(0,6)),n&&(n=n.slice(0,4)),a=n.length?`${r}.${n}`:s?`${r}.`:r,this.$set(this.machineList,t,{...this.machineList[t],theoryPower:a})},handleNumericCell(t,e){const a=this.machineList&&this.machineList[t];if(!a||this.isRowDisabled(a))return;let i=String("price"===e?this.machineList[t]._priceEditing??"":this.machineList[t][e]??"");i=i.replace(/[^0-9.]/g,"");const s=i.indexOf(".");if(-1!==s&&(i=i.slice(0,s+1)+i.slice(s+1).replace(/\./g,"")),"powerDissipation"===e){const t=i.endsWith("."),e=i.split(".");let a=e[0]||"",s=e[1]||"";a.length>6&&(a=a.slice(0,6)),s&&(s=s.slice(0,4)),i=s.length?`${a}.${s}`:t?`${a}.`:a}else if("price"===e){const e=i.endsWith("."),a=i.split(".");let s=a[0]||"",o=a[1]||"";s.length>12&&(s=s.slice(0,12)),o&&(o=o.slice(0,2)),i=o.length?`${s}.${o}`:e?`${s}.`:s,this.$set(this.machineList[t],"_priceEditing",i);const r=this.machineList[t],n=Number(r._selectedPayIndex||0);Array.isArray(r.priceList)&&r.priceList[n]&&this.$set(r.priceList[n],"price",i)}else if(-1!==s){const[t,e]=i.split(".");i=t+"."+(e?e.slice(0,6):"")}if("price"!==e){const a={...this.machineList[t],[e]:i};this.$set(this.machineList,t,a)}},handlePriceBlur(t){const e=String(this.machineList[t]._priceEditing??""),a=/^\d{1,12}(\.\d{1,2})?$/;if(!e||Number(e)<=0||!a.test(e)){this.$message.warning("单价必须大于0,整数最多12位,小数最多2位"),this.$set(this.machineList[t],"_priceEditing","");const e=this.machineList[t],a=Number(e._selectedPayIndex||0);Array.isArray(e.priceList)&&e.priceList[a]&&this.$set(e.priceList[a],"price","")}},handleMaxLeaseDaysInput(t){const e=this.machineList&&this.machineList[t];if(!e||this.isRowDisabled(e))return;let a=String(this.machineList[t].maxLeaseDays??"");a=a.replace(/\D/g,""),a.length>3&&(a=a.slice(0,3));const i={...this.machineList[t],maxLeaseDays:a};this.$set(this.machineList,t,i)},handleMaxLeaseDaysBlur(t){const e=String(this.machineList[t].maxLeaseDays??"");if(!/^\d{1,3}$/.test(e)){this.$message.warning("最大租赁天数需为 1-365 的整数");const e={...this.machineList[t],maxLeaseDays:""};return void this.$set(this.machineList,t,e)}const a=Number(e);if(!Number.isInteger(a)||a<1||a>365){this.$message.warning("最大租赁天数需为 1-365 的整数");const e={...this.machineList[t],maxLeaseDays:""};this.$set(this.machineList,t,e)}},handleTheoryPowerBlur(t){const e=String(this.machineList[t].theoryPower??""),a=/^\d{1,6}(\.\d{1,4})?$/;if(!e||Number(e)<=0||!a.test(e)){this.$message.warning("理论算力必须大于0");const e={...this.machineList[t],theoryPower:""};this.$set(this.machineList,t,e)}},handlePowerDissipationBlur(t){const e=String(this.machineList[t].powerDissipation??""),a=/^\d{1,6}(\.\d{1,4})?$/;if(!e||Number(e)<=0||!a.test(e)){this.$message.warning("功耗必须大于0");const e={...this.machineList[t],powerDissipation:""};this.$set(this.machineList,t,e)}},handleTypeCell(t){const e=this.machineList&&this.machineList[t];if(!e||this.isRowDisabled(e))return;const a={...this.machineList[t],type:this.machineList[t].type};this.$set(this.machineList,t,a)},handleStateChange(t){const e=this.machineList&&this.machineList[t];if(!e||this.isRowDisabled(e))return;const a={...this.machineList[t],state:this.machineList[t].state};this.$set(this.machineList,t,a)},async handleDeleteMachine(t){if(t&&t.id)if(this.isRowDisabled(t))this.$message.warning("该矿机已售出,无法删除");else try{await this.$confirm("确定删除该矿机吗?删除后不可恢复","提示",{confirmButtonText:"删除",cancelButtonText:"取消",type:"warning"});const e=await(0,s.deleteMachine)({id:t.id});e&&200===e.code&&(this.$message.success("删除成功"),this.fetchMachineList({id:this.productId}))}catch(e){}},async handleSubmitMachines(){if(this.machineList&&this.machineList.length)try{const t=/^\d{1,6}(\.\d{1,4})?$/,e=/^\d{1,12}(\.\d{1,2})?$/,a=t=>"string"===typeof t&&0===t.trim().length&&t.length>0;for(let s=0;s365)return void this.$message.warning(`第${s+1}行(机器:${o}) 最大租赁天数需为 1-365 的整数`);if(l&&a(l))return void this.$message.warning(`第${s+1}行(机器:${o}) 型号不能全是空格`)}const i=this.machineList.map(t=>({id:t.id,powerDissipation:Number(t.powerDissipation??0),priceList:Array.isArray(t.priceList)?t.priceList.map(t=>({...t,price:Number(t&&null!=t.price&&""!==t.price?t.price:0)})):[],state:Number(t.state??0),theoryPower:Number(t.theoryPower??0),type:t.type||"",maxLeaseDays:Number(t.maxLeaseDays??0),unit:t.unit||""}));this.confirmVisible=!1,console.log(i,"payload"),await this.updateMachineList(i)}catch(t){}else this.$message.warning("没有可提交的数据")},handleBack(){this.$router.back()}}}},1047:function(t,e){e.Yp=e.XX=void 0;e.XX=function(){var t=this,e=t._self._c;return e("div",{staticClass:"receipt-page"},[e("div",{staticClass:"card",attrs:{"aria-label":"收款记录",tabindex:"0"}},[t._m(0),t.loading?e("div",{staticClass:"loading"},[e("i",{staticClass:"el-icon-loading",attrs:{"aria-label":"加载中",role:"img"}}),t._v(" 加载中... ")]):e("div",[e("el-table",{ref:"receiptTable",staticStyle:{width:"100%","table-layout":"auto"},attrs:{data:t.rows,border:"",stripe:"",size:"small","row-key":t.getRowKey,"expand-row-keys":t.expandedRowKeys,"row-class-name":t.getRowClassName,"header-cell-style":{textAlign:"left"},"cell-style":{textAlign:"left"}},on:{"row-click":t.handleRowClick,"expand-change":t.handleExpandChange}},[t.rows.length>0?e("el-table-column",{attrs:{type:"expand",width:"46"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("div",{staticClass:"detail-panel"},[e("div",{staticClass:"detail-grid"},[e("div",{staticClass:"detail-item"},[e("span",{staticClass:"detail-label"},[t._v("订单号")]),e("span",{staticClass:"detail-value mono"},[t._v(t._s(a.row.orderId||"-"))])]),e("div",{staticClass:"detail-item"},[e("span",{staticClass:"detail-label"},[t._v("付款链")]),e("span",{staticClass:"detail-value"},[e("span",{staticClass:"badge"},[t._v(t._s(t.formatChain(a.row.fromChain)||"-"))])])]),e("div",{staticClass:"detail-item"},[e("span",{staticClass:"detail-label"},[t._v("付款币种")]),e("span",{staticClass:"detail-value"},[e("span",{staticClass:"badge badge-blue"},[t._v(t._s(String(a.row.fromSymbol||a.row.coin||"").toUpperCase()))])])]),e("div",{staticClass:"detail-item detail-item-full"},[e("span",{staticClass:"detail-label"},[t._v("付款地址")]),e("span",{staticClass:"detail-value address"},[e("span",{staticClass:"mono-ellipsis",attrs:{title:a.row.fromAddress}},[t._v(t._s(a.row.fromAddress||"-"))]),a.row.fromAddress?e("el-button",{attrs:{type:"text",size:"mini"},on:{click:function(e){return e.stopPropagation(),t.copy(a.row.fromAddress)}}},[t._v("复制")]):t._e()],1)])])])]}}],null,!1,2778494901)}):t._e(),e("el-table-column",{attrs:{label:"支付时间",width:"160"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(t.formatFullTime(e.row.createTime)))]}}])}),e("el-table-column",{attrs:{label:"收款金额(USDT)",width:"140",align:"right"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",{staticClass:"amount-green"},[t.formatAmount(a.row.realAmount,a.row.coin||a.row.toSymbol||"USDT").truncated?e("el-tooltip",{attrs:{content:`+${t.formatAmount(a.row.realAmount,a.row.coin||a.row.toSymbol||"USDT").full}`,placement:"top"}},[e("span",[t._v(" +"+t._s(t.formatAmount(a.row.realAmount,a.row.coin||a.row.toSymbol||"USDT").text)+" "),e("i",{staticClass:"el-icon-more amount-more"})])]):e("span",[t._v(" +"+t._s(t.formatAmount(a.row.realAmount,a.row.coin||a.row.toSymbol||"USDT").text)+" ")])],1)]}}])}),e("el-table-column",{attrs:{label:"收款链",width:"140"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(t.formatChain(e.row.toChain)))]}}])}),e("el-table-column",{attrs:{label:"收款币种",width:"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(String(e.row.coin||"").toUpperCase()))]}}])}),e("el-table-column",{attrs:{label:"收款地址","min-width":"200"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",{staticClass:"mono-ellipsis",attrs:{title:a.row.toAddress}},[t._v(t._s(a.row.toAddress))]),e("el-button",{attrs:{type:"text",size:"mini"},on:{click:function(e){return e.stopPropagation(),t.copy(a.row.toAddress)}}},[t._v("复制")])]}}])}),e("el-table-column",{attrs:{label:"交易HASH","min-width":"200"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",{staticClass:"mono-ellipsis",attrs:{title:a.row.txHash}},[t._v(t._s(a.row.txHash))]),a.row.txHash?e("el-button",{attrs:{type:"text",size:"mini"},on:{click:function(e){return e.stopPropagation(),t.copy(a.row.txHash)}}},[t._v("复制")]):t._e()]}}])}),e("el-table-column",{attrs:{label:"支付状态",width:"120"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-tag",{attrs:{type:t.getStatusType(a.row.status),size:"small"}},[t._v(t._s(t.getStatusText(a.row.status)))])]}}])}),e("el-table-column",{attrs:{label:"状态更新时间",width:"160"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(t.formatFullTime(e.row.updateTime)))]}}])})],1),t.rows.length?t._e():e("div",{staticClass:"empty"},[e("div",{staticClass:"empty-icon"},[t._v("💳")]),e("div",{staticClass:"empty-text"},[t._v("暂无收款记录")])]),e("div",{staticClass:"pagination"},[e("el-pagination",{attrs:{background:"",layout:"prev, pager, next, jumper","current-page":t.page,"page-size":t.pageSize,total:t.total},on:{"update:currentPage":function(e){t.page=e},"update:current-page":function(e){t.page=e},"current-change":t.fetchList}})],1)],1)])])},e.Yp=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"card-header"},[e("h3",{staticClass:"card-title"},[t._v("收款记录")])])}]},1182:function(t,e,a){a.r(e),a.d(e,{__esModule:function(){return s.B},default:function(){return l}});var i=a(2038),s=a(7570),o=s.A,r=a(845),n=(0,r.A)(o,i.XX,i.Yp,!1,null,null,null),l=n.exports},1193:function(t,e,a){var i=a(3999)["default"];Object.defineProperty(e,"__esModule",{value:!0}),e.addAsicMachine=h,e.addSingleOrBatchMachine=o,e.deleteMachine=r,e.downloadClient=u,e.getMachineListForUpdate=d,e.getSupportAlgo=m,e.getSupportCoin=p,e.getUserMachineList=n,e.getUserMinersList=l,e.updateMachine=c;var s=i(a(5720));function o(t){return(0,s.default)({url:"/lease/product/machine/addSingleOrBatchMachine",method:"post",data:t})}function r(t){return(0,s.default)({url:"/lease/product/machine/delete",method:"post",data:t})}function n(t){return(0,s.default)({url:"/lease/product/machine/getUserMachineList",method:"post",data:t})}function l(t){return(0,s.default)({url:"/lease/product/machine/getUserMinersList",method:"post",data:t})}function c(t){return(0,s.default)({url:"/lease/product/machine/updateMachine",method:"post",data:t})}function d(t){return(0,s.default)({url:"/lease/product/machine/getMachineListForUpdate",method:"post",data:t})}function u(){return(0,s.default)({url:"/lease/user/downloadClient",method:"get",responseType:"blob"})}function h(t){return(0,s.default)({url:"/lease/v2/product/machine/addAsicMachine",method:"post",data:t})}function p(){return(0,s.default)({url:"/lease/v2/product/machine/getSupportCoin",method:"get"})}function m(t){return(0,s.default)({url:"/lease/v2/product/machine/getSupportAlgo",method:"get",params:{coin:t}})}},1220:function(t,e,a){a.r(e),a.d(e,{__esModule:function(){return s.B},default:function(){return l}});var i=a(5508),s=a(1872),o=s.A,r=a(845),n=(0,r.A)(o,i.XX,i.Yp,!1,null,"9935370e",null),l=n.exports},1259:function(t,e,a){Object.defineProperty(e,"B",{value:!0}),e.A=void 0,a(4114),a(8111),a(3579);e.A={name:"AccountPage",data(){return{activeIndex:"1",userEmail:"",activeRole:"seller",buyerLinks:[{label:"我的钱包",to:"/account/wallet"},{label:"已购商品",to:"/account/purchased-machine-config"},{label:"订单列表",to:"/account/orders"},{label:"资金流水",to:"/account/funds-flow"}],sellerLinks:[{label:"我的店铺",to:"/account/shops"},{label:"商品列表",to:"/account/products"},{label:"已售出订单",to:"/account/seller-orders"},{label:"资金流水",to:"/account/seller-funds-flow"}]}},computed:{userInitial(){const t=(this.userEmail||"").trim();return t?t[0].toUpperCase():"?"},displayedLinks(){return"buyer"===this.activeRole?this.buyerLinks:this.sellerLinks},isSecuritySettingsPage(){const t=this.$route&&this.$route.path||"";return"/account/security-settings"===t}},mounted(){const t=t=>{const e=localStorage.getItem(t);if(null==e)return null;try{return JSON.parse(e)}catch(a){return e}},e=t("leasEmail")||"";this.userEmail="string"===typeof e?e:String(e);const a=t("accountActiveRole");"buyer"!==a&&"seller"!==a||(this.activeRole=a),this.setActiveRoleByRoute()},methods:{handleClickRole(t){if("buyer"===t||"seller"===t){this.activeRole=t;try{localStorage.setItem("accountActiveRole",JSON.stringify(t))}catch(e){}try{const e="buyer"===t?this.buyerLinks&&this.buyerLinks[0]&&this.buyerLinks[0].to:this.sellerLinks&&this.sellerLinks[0]&&this.sellerLinks[0].to;e&&this.$route&&this.$route.path!==e&&this.$router.push(e)}catch(e){}}},setActiveRoleByRoute(){const t=this.$route&&this.$route.path||"";if(0===t.indexOf("/account/order-detail")){const t=this.$route&&this.$route.query&&this.$route.query.from||"";let e=t;if(!e)try{e=sessionStorage.getItem("orderDetailFrom")||""}catch(r){e=""}const a="seller"===e?"seller":"buyer";if(this.activeRole!==a){this.activeRole=a;try{localStorage.setItem("accountActiveRole",JSON.stringify(a))}catch(r){}}return}const e=["/account/wallet","/account/purchased-machine-config","/account/purchased-machine-detail","/account/orders","/account/funds-flow"],a=["/account/shops","/account/shop-new","/account/product-new","/account/products","/account/product-detail","/account/product-machine-add","/account/seller-orders","/account/seller-funds-flow","/account/receipt-record","/account/withdraw-record","/account/shop-config"];if("/account/security-settings"===t)return void(this.activeRole=null);const i=e.some(e=>0===t.indexOf(e)),s=a.some(e=>0===t.indexOf(e)),o=i?"buyer":s?"seller":this.activeRole;if(this.activeRole!==o){this.activeRole=o;try{localStorage.setItem("accountActiveRole",JSON.stringify(o))}catch(r){}}},isActiveLink(t){const e=this.$route&&this.$route.path||"";if(!t)return!1;if(0===e.indexOf("/account/order-detail")){const e=this.$route&&this.$route.query&&this.$route.query.from||"";let a=e;if(!a)try{a=sessionStorage.getItem("orderDetailFrom")||""}catch(s){a=""}return"seller"===a&&"/account/seller-orders"===t||"/account/orders"===t}const a={"/account/seller-orders":["/account/seller-orders"],"/account/products":["/account/products","/account/product-detail"],"/account/purchased-machine-config":["/account/purchased-machine-config","/account/purchased-machine-detail"]},i=a[t];return Array.isArray(i)?i.some(t=>e===t||("/account/product-detail"===t||"/account/purchased-machine-detail"===t)&&0===e.indexOf(t)):e===t}},watch:{"$route.path":{immediate:!0,handler(){this.setActiveRoleByRoute()}}}}},1264:function(t,e,a){a.r(e),a.d(e,{__esModule:function(){return s.B},default:function(){return l}});var i=a(792),s=a(1259),o=s.A,r=a(845),n=(0,r.A)(o,i.XX,i.Yp,!1,null,"5eac5e84",null),l=n.exports},1373:function(t,e,a){Object.defineProperty(e,"B",{value:!0}),e.A=void 0,a(4114);var i=a(2549),s=a(6966);e.A={name:"RegisterPage",data(){const t=(t,e,a)=>{if(!e)return void a(new Error("请输入邮箱"));const i=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,}$/;i.test(e)?a():a(new Error("请输入有效的邮箱地址"))},e=(t,e,a)=>{if(!e)return void a(new Error("请输入密码"));const i=/^(?!.*[\u4e00-\u9fa5])(?![a-zA-Z]+$)(?![A-Z0-9]+$)(?![A-Z\W_]+$)(?![a-z0-9]+$)(?![a-z\W_]+$)(?![0-9\W_]+$)[a-zA-Z0-9\W_]{8,32}$/;i.test(e)?a():a(new Error("密码应包含大小写字母、数字和特殊字符,长度8-32位"))},a=(t,e,a)=>{e?e===this.registerForm.password?a():a(new Error("两次输入的密码不一致")):a(new Error("请再次输入密码"))},i=(t,e,a)=>{e?a():a(new Error("请阅读并同意用户协议"))};return{registerForm:{email:"",code:"",password:"",confirmPassword:"",agree:!1},registerRules:{email:[{required:!0,validator:t,trigger:"blur"}],code:[{required:!0,message:"请输入验证码",trigger:"blur"},{min:1,max:10,message:"验证码长度为1-10位",trigger:"blur"}],password:[{required:!0,validator:e,trigger:"blur"}],confirmPassword:[{required:!0,validator:a,trigger:"blur"}],agree:[{required:!0,validator:i,trigger:"change"}]},loading:!1,sendingCode:!1,countdown:0,timer:null}},computed:{passwordStrength(){const t=this.registerForm.password;if(!t)return 0;let e=0;return t.length>=6&&(e+=1),t.length>=10&&(e+=1),/\d/.test(t)&&(e+=1),/[a-z]/.test(t)&&(e+=1),/[A-Z]/.test(t)&&(e+=1),/[^a-zA-Z0-9]/.test(t)&&(e+=1),e},passwordStrengthText(){const t=this.passwordStrength;return t<=2?"弱":t<=4?"中":"强"},passwordStrengthClass(){const t=this.passwordStrength;return t<=2?"weak":t<=4?"medium":"strong"}},beforeDestroy(){this.timer&&(clearInterval(this.timer),this.timer=null)},methods:{goToShop(){"/productList"!==this.$route.path?this.$router.push("/productList"):this.$router.go(-1)},async handleSendCode(){const t=(this.registerForm.email||"").trim();if(!t)return this.$message.warning("请输入邮箱地址"),void this.$refs.registerForm.validateField("email");const e=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;if(!e.test(t))return this.$message.warning("请输入有效的邮箱地址"),void this.$refs.registerForm.validateField("email");this.sendingCode=!0;try{const t=await(0,i.sendEmailCode)({email:this.registerForm.email});t&&200===t.code?(this.$message.success(t.msg||"验证码已发送,请查收邮箱"),this.startCountdown()):this.$message.error(t.msg||"发送验证码失败")}catch(a){console.error("发送验证码失败:",a),this.$message.error(a.message||"发送验证码失败,请重试")}finally{this.sendingCode=!1}},startCountdown(){this.countdown=60,this.timer=setInterval(()=>{this.countdown--,this.countdown<=0&&(clearInterval(this.timer),this.timer=null)},1e3)},async handleRegister(){try{await this.$refs.registerForm.validate()}catch(t){return}this.loading=!0;try{const t=this.registerForm.password;let e=t;const a=(0,s.rsaEncryptSync)(t);if(a)e=a;else{const a=await(0,s.rsaEncrypt)(t);if(!a)return this.$message.error("密码加密失败,请重试"),void(this.loading=!1);e=a}const o=await(0,i.register)({code:this.registerForm.code,password:e,userEmail:this.registerForm.email});o&&200===o.code?(this.$message.success("注册成功,请登录"),this.$router.push({path:"/login",query:{email:this.registerForm.email}})):this.$message.error(o.msg||"注册失败")}catch(t){console.error("注册失败:",t),this.$message.error("注册失败,请重试")}finally{this.loading=!1}}}}},1394:function(t,e,a){a.r(e),a.d(e,{__esModule:function(){return s.B},default:function(){return l}});var i=a(8475),s=a(8284),o=s.A,r=a(845),n=(0,r.A)(o,i.XX,i.Yp,!1,null,"37492658",null),l=n.exports},1406:function(t,e,a){var i=a(3999)["default"],s=i(a(5471)),o=i(a(9197)),r=i(a(9325)),n=i(a(5129)),l=i(a(1052));a(1475);var c=a(465);console.log=()=>{},s.default.config.productionTip=!1,s.default.use(l.default),(0,c.initNoEmojiGuard)();const d=new s.default({router:r.default,store:n.default,render:t=>t(o.default)}).$mount("#app");window.vm=d},1452:function(t,e,a){a.r(e),a.d(e,{__esModule:function(){return s.B},default:function(){return l}});var i=a(2710),s=a(1561),o=s.A,r=a(845),n=(0,r.A)(o,i.XX,i.Yp,!1,null,"462a5e76",null),l=n.exports},1507:function(t,e,a){var i=a(3999)["default"];Object.defineProperty(e,"B",{value:!0}),e.A=void 0;var s=a(5952),o=i(a(9146));e.A={mixins:[o.default],name:"ProductList",mounted(){},methods:{formatPayType(t){try{const e=(t&&t.chain?String(t.chain):"").toUpperCase(),a=(t&&t.coin?String(t.coin):"").toUpperCase();return e&&a?`${e}-${a}`:e||a||""}catch(e){return""}},handleAddToCart(t){try{(0,s.addToCart)({id:t.id,title:t.title,price:t.price,image:t.image,quantity:1}),this.$message({message:"已添加到购物车",type:"success",showClose:!0})}catch(e){console.error("添加到购物车失败:",e),console.log("添加到购物车失败,请稍后重试")}}}}},1561:function(t,e,a){Object.defineProperty(e,"B",{value:!0}),e.A=void 0,a(4114);var i=a(5705);e.A={data(){return{form:{name:"",description:"",image:"",feeRate:""}}},mounted(){},methods:{hasEmoji(t){if(!t||"string"!==typeof t)return!1;const e=/[\u{1F300}-\u{1F6FF}\u{1F900}-\u{1F9FF}\u{1FA70}-\u{1FAFF}\u2600-\u27BF]/u;return e.test(t)},handleFeeRateInput(t){let e=String(t??this.form.feeRate??"");e=e.replace(/[^0-9.]/g,"");const a=e.indexOf(".");-1!==a&&(e=e.slice(0,a+1)+e.slice(a+1).replace(/\./g,""));const i=e.endsWith("."),s=e.split(".");let o=s[0]||"",r=s[1]||"";r.length>6&&(r=r.slice(0,6)),o&&"0"!==o&&(o=String(Number(o))),this.form.feeRate=i&&-1!==a?`${o||"0"}.`:r?`${o||"0"}.${r}`:o||""},async fetchAddShop(){const t=await(0,i.getAddShop)(this.form);t&&200==t.code&&(this.$message({message:"店铺创建成功",type:"success",showClose:!0}),this.$router.push("/account/shops"))},handleDescriptionInput(t){t&&t.length>300&&(this.form.description=t.substring(0,300),this.$message({message:"店铺描述不能超过300个字符",type:"warning",showClose:!0}))},handleCreate(){const t=t=>"string"===typeof t&&t.length>0&&0===t.trim().length;if(!this.form.name||t(this.form.name))return void this.$message({message:"店铺名称不能为空或全是空格",type:"warning",showClose:!0});if(this.hasEmoji(this.form.name))return void this.$message({message:"店铺名称不能包含表情符号",type:"warning",showClose:!0});if(this.form.name&&this.form.name.length>30)return void this.$message({message:"店铺名称不能超过30个字符",type:"warning",showClose:!0});if(t(this.form.description))return void this.$message({message:"店铺描述不能全是空格",type:"warning",showClose:!0});if(this.form.description&&this.form.description.length>300)return void this.$message({message:"店铺描述不能超过300个字符",type:"warning",showClose:!0});if(this.$route.query&&"1"===this.$route.query.hasShop)return this.$message({message:"每个用户仅允许一个店铺,无法新建",type:"warning",showClose:!0}),void this.$router.replace("/account/shops");if(!this.form.name)return void this.$message.error("店铺名称不能为空");const e=String(this.form.feeRate||"").trim();if(!e)return void this.$message({message:"请填写店铺手续费比例(0.01 - 0.1,最多6位小数)",type:"warning",showClose:!0});const a=Number(e),i=!e.includes(".")||(e.split(".")[1]||"").length<=6;!Number.isFinite(a)||a<.01||a>.1||!i?this.$message({message:"手续费比例需在 0.01 - 0.1 之间,且小数位不超过6位",type:"warning",showClose:!0}):(this.form.feeRate=a.toString(),this.fetchAddShop(this.form))}}}},1644:function(t,e,a){a.r(e),a.d(e,{__esModule:function(){return s.B},default:function(){return l}});var i=a(5366),s=a(4792),o=s.A,r=a(845),n=(0,r.A)(o,i.XX,i.Yp,!1,null,"68da2d3a",null),l=n.exports},1673:function(t,e,a){var i=a(3999)["default"];Object.defineProperty(e,"__esModule",{value:!0}),e.bindGoogle=r,e.closeStepTwo=l,e.getBindInfo=o,e.getGoogleStatus=d,e.openStepTwo=u,e.sendCloseGoogleCode=c,e.sendOpenGoogleCode=n;var s=i(a(5720));function o(t){return(0,s.default)({url:"/lease/auth/getBindInfo",method:"post",data:t})}function r(t){return(0,s.default)({url:"/lease/auth/bindGoogle",method:"post",data:t})}function n(t){return(0,s.default)({url:"/lease/auth/sendOpenGoogleCode",method:"post",data:t})}function l(t){return(0,s.default)({url:"/lease/auth/closeStepTwo",method:"post",data:t})}function c(t){return(0,s.default)({url:"/lease/auth/sendCloseGoogleCode",method:"post",data:t})}function d(t){return(0,s.default)({url:"/lease/auth/getGoogleStatus",method:"post",data:t})}function u(t){return(0,s.default)({url:"/lease/auth/openStepTwo",method:"post",data:t})}},1831:function(t,e){e.Yp=e.XX=void 0;e.XX=function(){var t=this,e=t._self._c;return e("div",{staticClass:"auth-container"},[t._m(0),e("div",{staticClass:"auth-card"},[e("div",{staticClass:"close-btn",attrs:{title:"返回商城"},on:{click:t.goToShop}},[e("i",{staticClass:"el-icon-close"})]),t._m(1),e("el-form",{ref:"registerForm",staticClass:"auth-form",attrs:{model:t.registerForm,rules:t.registerRules},nativeOn:{submit:function(e){return e.preventDefault(),t.handleRegister.apply(null,arguments)}}},[e("el-form-item",{attrs:{prop:"email"}},[e("el-input",{attrs:{placeholder:"请输入邮箱","prefix-icon":"el-icon-message",size:"large",clearable:""},model:{value:t.registerForm.email,callback:function(e){t.$set(t.registerForm,"email",e)},expression:"registerForm.email"}})],1),e("el-form-item",{attrs:{prop:"code"}},[e("div",{staticClass:"code-input-wrapper"},[e("el-input",{attrs:{placeholder:"请输入邮箱验证码","prefix-icon":"el-icon-key",size:"large",maxlength:"10",clearable:""},model:{value:t.registerForm.code,callback:function(e){t.$set(t.registerForm,"code",e)},expression:"registerForm.code"}}),e("el-button",{staticClass:"send-code-btn",attrs:{type:"primary",size:"large",disabled:t.countdown>0,loading:t.sendingCode},on:{click:t.handleSendCode}},[t._v(" "+t._s(t.countdown>0?`${t.countdown}秒后重试`:"获取验证码")+" ")])],1)]),e("el-form-item",{attrs:{prop:"password"}},[e("el-input",{attrs:{type:"password",placeholder:"请输入密码(8-32位)","prefix-icon":"el-icon-lock",size:"large","show-password":"",clearable:""},model:{value:t.registerForm.password,callback:function(e){t.$set(t.registerForm,"password",e)},expression:"registerForm.password"}}),e("div",{staticClass:"password-tip"},[e("i",{staticClass:"el-icon-info"}),e("span",[t._v("密码需包含大小写字母、数字和特殊字符,长度8-32位")])]),t.registerForm.password?e("div",{staticClass:"password-strength"},[e("span",{staticClass:"strength-label"},[t._v("密码强度:")]),e("span",{class:["strength-bar",t.passwordStrengthClass]},[t._v(" "+t._s(t.passwordStrengthText)+" ")])]):t._e()],1),e("el-form-item",{attrs:{prop:"confirmPassword"}},[e("el-input",{attrs:{type:"password",placeholder:"请再次输入密码","prefix-icon":"el-icon-lock",size:"large","show-password":"",clearable:""},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleRegister.apply(null,arguments)}},model:{value:t.registerForm.confirmPassword,callback:function(e){t.$set(t.registerForm,"confirmPassword",e)},expression:"registerForm.confirmPassword"}})],1),e("el-form-item",{attrs:{prop:"agree"}},[e("el-checkbox",{model:{value:t.registerForm.agree,callback:function(e){t.$set(t.registerForm,"agree",e)},expression:"registerForm.agree"}},[t._v(" 我已阅读并同意 "),e("a",{staticClass:"link-text",attrs:{href:"#"},on:{click:function(t){t.preventDefault()}}},[t._v("《用户协议》")]),t._v(" 和 "),e("a",{staticClass:"link-text",attrs:{href:"#"},on:{click:function(t){t.preventDefault()}}},[t._v("《隐私政策》")])])],1),e("el-form-item",[e("el-button",{staticClass:"auth-submit-btn",attrs:{type:"primary",size:"large",loading:t.loading},on:{click:t.handleRegister}},[t._v(" "+t._s(t.loading?"注册中...":"立即注册")+" ")])],1),e("div",{staticClass:"auth-footer"},[e("span",{staticClass:"footer-text"},[t._v("已有账号?")]),e("router-link",{staticClass:"link-text link-primary",attrs:{to:"/login"}},[t._v(" 立即登录 ")])],1)],1)],1)])},e.Yp=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"auth-background"},[e("div",{staticClass:"bg-circle circle-1"}),e("div",{staticClass:"bg-circle circle-2"}),e("div",{staticClass:"bg-circle circle-3"})])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"auth-header"},[e("h1",{staticClass:"auth-title"},[t._v("欢迎注册")]),e("p",{staticClass:"auth-subtitle"},[t._v("创建您的 Power Leasing 账号")])])}]},1872:function(t,e){Object.defineProperty(e,"B",{value:!0}),e.A=void 0;e.A={name:"Content"}},1968:function(t,e){e.Yp=e.XX=void 0;e.XX=function(){var t=this,e=t._self._c;return e("div",{attrs:{id:"app"}},[e("router-view")],1)},e.Yp=[]},1977:function(t,e,a){var i=a(3999)["default"];Object.defineProperty(e,"B",{value:!0}),e.A=void 0;var s=a(4180),o=i(a(6930));e.A={name:"AccountSellerOrders",components:{OrderList:o.default},data(){return{active:"7",orders:{7:[],8:[]},loading:!1}},created(){const t=this.$route&&this.$route.query&&this.$route.query.status?String(this.$route.query.status):null,e=localStorage.getItem("sellerOrderListActiveTab"),a=t||e||"7";this.active=a,this.fetchOrders(a)},methods:{handleTabClick(t){const e=t&&t.name?String(t.name):this.active;try{localStorage.setItem("sellerOrderListActiveTab",e)}catch(a){}this.fetchOrders(e)},async fetchOrders(t){const e=String(t);try{this.loading=!0;const a=await(0,s.getOrdersByStatusForSeller)({status:Number(t)}),i=null!=(a&&a.data)?a.data:a,o=Array.isArray(i)?i:Array.isArray(i&&i.rows)?i.rows:[];this.$set(this.orders,e,o)}catch(a){console.error("获取卖家订单失败",a)}finally{this.loading=!1}}}}},2038:function(t,e){e.Yp=e.XX=void 0;e.XX=function(){var t=this,e=t._self._c;return e("el-container",{staticClass:"containerApp",staticStyle:{width:"100vw",height:"100vh"}},[e("el-header",{staticClass:"el-header"},[e("comHeard")],1),e("el-main",{staticClass:"el-main"},[e("appMain")],1)],1)},e.Yp=[]},2067:function(t,e,a){a.r(e),a.d(e,{__esModule:function(){return s.B},default:function(){return l}});var i=a(4779),s=a(8586),o=s.A,r=a(845),n=(0,r.A)(o,i.XX,i.Yp,!1,null,"d056bf30",null),l=n.exports},2300:function(t,e){e.Yp=e.XX=void 0;e.XX=function(){var t=this,e=t._self._c;return e("div",{staticClass:"panel"},[e("h2",{staticClass:"panel-title"},[t._v("我的店铺")]),e("div",{staticClass:"panel-body"},[e("el-card",{staticClass:"guide-card",staticStyle:{"margin-bottom":"16px"},attrs:{shadow:"never"}},[e("div",{staticClass:"guide-header",attrs:{slot:"header"},slot:"header"},[t._v("店铺层级说明")]),e("div",{staticClass:"guide-content"},[e("p",{staticClass:"hierarchy"},[t._v("层级结构:店铺 → 商品 → 出售机器")]),e("ol",{staticClass:"guide-steps"},[e("li",[e("b",[t._v("店铺(唯一)")]),t._v(":每个用户在平台"),e("strong",[t._v("仅能创建一个店铺")]),t._v("。创建成功后, 请在本页点击 "),e("b",[t._v("钱包绑定")]),t._v(",配置自己的收款地址(支持不同链与币种)。 ")]),e("li",[e("b",[t._v("创建商品")]),t._v(":完成钱包绑定后,即可在“我的店铺”页面 点击"),e("b",[t._v("新增商品")]),t._v("按钮。 "),e("ul",{staticClass:"guide-substeps"},[e("li",[e("b",[t._v("ASIC 商品创建")]),t._v(":选择矿机种类为 ASIC,填写页面商品信息后创建,商品可按 "),e("b",[t._v("币种")]),t._v(" 进行分类管理,创建的商品会在商城对买家展示; 商品可理解为“不同算法、币种的机器集合分类”。 ")]),e("li",[e("b",[t._v("GPU 商品创建")]),t._v(":选择矿机种类为 GPU,查看页面注意事项并下载对应客户端,启动后读取自动创建。创建完成请进入 "),e("b",[t._v("商品列表")]),t._v(" 为该商品手动配置售价等相关信息并上架。 ")])])])]),e("div",{staticClass:"guide-note"},[t._v("提示:建议先创建店铺 → 完成钱包绑定 → 创建商品的顺序,避免漏配导致无法收款或无法下单。")])])]),t.loaded&&t.hasShop?e("el-card",{staticClass:"shop-card",attrs:{shadow:"hover"}},[e("div",{staticClass:"shop-row"},[e("div",{staticClass:"shop-cover"},[e("img",{attrs:{src:t.shop.image||t.defaultCover,alt:"店铺封面"}})]),e("div",{staticClass:"shop-info"},[e("div",{staticClass:"shop-title"},[e("span",{staticClass:"name"},[t._v(t._s(t.shop.name||"未命名店铺"))]),e("el-tag",{attrs:{size:"small",type:t.shopStateTagType}},[t._v(" "+t._s(t.shopStateText)+" ")])],1),e("div",{staticClass:"desc"},[t._v(t._s(t.shop.description||"这家店还没有描述~"))]),e("div",{staticClass:"meta"},[e("span",[t._v("手续费率:"+t._s(t.formatFeeRate(t.shop.feeRate)))])]),e("div",{staticClass:"actions"},[e("el-button",{attrs:{size:"small",type:"primary"},on:{click:t.handleOpenEdit}},[t._v("修改店铺")]),e("el-button",{attrs:{size:"small",type:"warning"},on:{click:t.handleToggleShop}},[t._v(" "+t._s(2===t.shop.state?"开启店铺":"关闭店铺")+" ")]),e("el-button",{attrs:{size:"small",type:"danger"},on:{click:t.handleDelete}},[t._v("删除店铺")]),e("el-button",{attrs:{size:"small",type:"success"},on:{click:t.handleAddProduct}},[t._v("新增商品")]),e("el-button",{attrs:{size:"small",type:"success"},on:{click:t.handleWalletBind}},[t._v("钱包绑定")])],1)])])]):t._e(),t.loaded&&t.hasShop?e("el-card",{staticClass:"shop-config-card",staticStyle:{"margin-top":"16px"},attrs:{shadow:"never"}},[e("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[e("span",[t._v("已绑定钱包")])]),e("el-table",{staticStyle:{width:"100%"},attrs:{data:t.shopConfigs,border:""}},[e("el-table-column",{attrs:{prop:"chain",label:"链",width:"120"}}),e("el-table-column",{attrs:{label:"支付币种",width:"120"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("div",{staticClass:"coin-list"},[Array.isArray(a.row.children)&&a.row.children.length?t._l(a.row.children,function(a,i){return e("el-tooltip",{key:i,attrs:{content:String(a&&a.payCoin?a.payCoin:"").toUpperCase(),placement:"top"}},[a&&a.image?e("img",{staticClass:"coin-img",attrs:{src:a.image,alt:(a.payCoin||"").toUpperCase()}}):t._e()])}):[t._v(" "+t._s(String(a.row.payCoin||"").toUpperCase())+" ")]],2)]}}],null,!1,569036476)}),e("el-table-column",{attrs:{prop:"payAddress",label:"收款钱包地址","show-overflow-tooltip":""}}),e("el-table-column",{attrs:{label:"余额"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",{staticClass:"balance-num"},[t._v(t._s(t.formatAmount(a.row)))]),e("span",{staticClass:"balance-unit"},[t._v(" "+t._s(t.formatCoin(a.row)))])]}}],null,!1,59971880)}),e("el-table-column",{attrs:{label:"操作",width:"240",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-button",{staticStyle:{color:"#409EFF"},attrs:{type:"text"},on:{click:function(e){return t.handleWithdraw(a.row)}}},[t._v("提现")]),e("el-divider",{attrs:{direction:"vertical"}}),e("el-button",{attrs:{type:"text"},on:{click:function(e){return t.handleEditConfig(a.row)}}},[t._v("修改")]),e("el-divider",{attrs:{direction:"vertical"}}),e("el-button",{staticStyle:{color:"#e74c3c"},attrs:{type:"text"},on:{click:function(e){return t.handleDeleteConfig(a.row)}}},[t._v("删除")])]}}],null,!1,1325460802)})],1)],1):t.loaded&&!t.hasShop?e("div",{staticClass:"no-shop"},[e("el-empty",{attrs:{description:"暂无店铺"}},[e("el-button",{attrs:{type:"primary"},on:{click:t.handleGoNew}},[t._v("新建店铺")])],1)],1):e("el-empty",{attrs:{description:"正在加载店铺信息..."}}),e("el-dialog",{attrs:{title:t.withdrawDialogTitle,visible:t.withdrawDialogVisible,width:"720px","close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(e){t.withdrawDialogVisible=e}}},[e("el-form",{ref:"withdrawForm",attrs:{model:t.withdrawForm,rules:t.withdrawRules,"label-width":"120px"}},[e("el-form-item",{attrs:{label:"提现链"}},[e("el-input",{attrs:{value:String(t.currentWithdrawRow.chain||"").toUpperCase(),disabled:!0}})],1),e("el-form-item",{attrs:{label:"提现币种"}},[e("el-input",{attrs:{value:t.displayWithdrawSymbol,disabled:!0}})],1),e("el-form-item",{attrs:{label:"提现金额",prop:"amount"}},[e("el-input",{attrs:{placeholder:"请输入提现金额",inputmode:"decimal"},on:{input:t.handleAmountInput},model:{value:t.withdrawForm.amount,callback:function(e){t.$set(t.withdrawForm,"amount",e)},expression:"withdrawForm.amount"}},[e("template",{slot:"append"},[t._v(t._s(t.displayWithdrawSymbol))])],2),e("div",{staticClass:"balance-info"},[t._v(" 可用余额: "+t._s(t.availableWithdrawBalance)+" "+t._s(t.displayWithdrawSymbol)+" ")])],1),e("el-form-item",{attrs:{label:"手续费"}},[e("el-input",{attrs:{disabled:!0},model:{value:t.withdrawForm.fee,callback:function(e){t.$set(t.withdrawForm,"fee",e)},expression:"withdrawForm.fee"}},[e("template",{slot:"append"},[t._v(t._s(t.displayWithdrawSymbol))])],2),e("div",{staticClass:"fee-info"},[t._v("网络手续费: "+t._s(t.withdrawForm.fee||"0")+" "+t._s(t.displayWithdrawSymbol))])],1),e("el-form-item",{attrs:{label:"实际到账"}},[e("el-input",{attrs:{value:t.actualAmount,disabled:!0}},[e("template",{slot:"append"},[t._v(t._s(t.displayWithdrawSymbol))])],2),e("div",{staticClass:"actual-amount-info"},[t._v("实际到账: "+t._s(t.actualAmount)+" "+t._s(t.displayWithdrawSymbol))])],1),e("el-form-item",{attrs:{label:"收款地址",prop:"toAddress"}},[e("el-input",{ref:"withdrawToAddressInput",attrs:{placeholder:"请输入收款钱包地址",disabled:!t.withdrawAddressEditable},model:{value:t.withdrawForm.toAddress,callback:function(e){t.$set(t.withdrawForm,"toAddress",e)},expression:"withdrawForm.toAddress"}},[e("template",{slot:"append"},[e("el-button",{attrs:{type:"text"},on:{click:t.handleEditAddressClick}},[t._v("修改")])],1)],2),e("div",{staticClass:"address-tip"},[t._v("请确认地址正确,错误地址将导致资产丢失")])],1),e("el-form-item",{attrs:{label:"谷歌验证码",prop:"googleCode"}},[e("el-input",{attrs:{placeholder:"请输入6位谷歌验证码",maxlength:"6"},on:{input:t.handleGoogleCodeInput},model:{value:t.withdrawForm.googleCode,callback:function(e){t.$set(t.withdrawForm,"googleCode",e)},expression:"withdrawForm.googleCode"}},[e("template",{slot:"prepend"},[e("i",{staticClass:"el-icon-key"})])],2)],1)],1),e("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:function(e){t.withdrawDialogVisible=!1}}},[t._v("取消")]),e("el-button",{attrs:{type:"primary",loading:t.withdrawLoading},on:{click:t.confirmWithdraw}},[t._v("确认提现")])],1)],1),e("el-dialog",{attrs:{title:"修改店铺",visible:t.visibleEdit,width:"520px"},on:{"update:visible":function(e){t.visibleEdit=e}}},[e("div",{staticClass:"row"},[e("label",{staticClass:"label"},[t._v("店铺名称")]),e("el-input",{attrs:{placeholder:"请输入店铺名称",maxlength:30,"show-word-limit":""},model:{value:t.editForm.name,callback:function(e){t.$set(t.editForm,"name",e)},expression:"editForm.name"}})],1),e("div",{staticClass:"row"},[e("label",{staticClass:"label"},[t._v("店铺描述")]),e("el-input",{attrs:{type:"textarea",rows:3,placeholder:"请输入描述",maxlength:300,"show-word-limit":""},model:{value:t.editForm.description,callback:function(e){t.$set(t.editForm,"description",e)},expression:"editForm.description"}})],1),e("div",{staticClass:"row"},[e("label",{staticClass:"label"},[t._v("手续费比例")]),e("el-input",{attrs:{placeholder:"比例区间 0.01 - 0.1 之间,最多6位小数"},on:{input:t.handleEditFeeRateInput},model:{value:t.editForm.feeRate,callback:function(e){t.$set(t.editForm,"feeRate",e)},expression:"editForm.feeRate"}})],1),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:function(e){t.visibleEdit=!1}}},[t._v("取消")]),e("el-button",{attrs:{type:"primary"},on:{click:t.submitEdit}},[t._v("保存")])],1)]),e("el-dialog",{attrs:{title:"修改配置",visible:t.visibleConfigEdit,width:"560px"},on:{"update:visible":function(e){t.visibleConfigEdit=e},close:t.handleConfigEditClose}},[e("div",{staticClass:"row"},[e("label",{staticClass:"label"},[t._v("钱包地址")]),e("el-input",{attrs:{placeholder:"请输入钱包地址"},model:{value:t.configForm.payAddress,callback:function(e){t.$set(t.configForm,"payAddress",e)},expression:"configForm.payAddress"}})],1),e("div",{staticClass:"row"},[e("label",{staticClass:"label"},[t._v("谷歌验证码")]),e("el-input",{attrs:{placeholder:"请输入6位谷歌验证码",maxlength:"6"},on:{input:t.handleConfigGoogleCodeInput},model:{value:t.configForm.googleCode,callback:function(e){t.$set(t.configForm,"googleCode",e)},expression:"configForm.googleCode"}},[e("template",{slot:"prepend"},[e("i",{staticClass:"el-icon-key"})])],2)],1),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:function(e){t.visibleConfigEdit=!1}}},[t._v("取消")]),e("el-button",{attrs:{type:"primary"},on:{click:t.submitConfigEdit}},[t._v("确认修改")])],1)])],1)])},e.Yp=[]},2308:function(t,e){e.Yp=e.XX=void 0;e.XX=function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"cart-page"},[e("h1",{staticClass:"page-title"},[t._v("购物车")]),t.loading?e("div",{staticClass:"loading"},[e("i",{staticClass:"el-icon-loading",attrs:{"aria-label":"加载中",role:"img"}}),t._v(" 加载中... ")]):t.isCartEmpty?e("div",{staticClass:"empty-cart"},[e("div",{staticClass:"empty-icon"},[t._v("🛒")]),e("h2",[t._v("购物车是空的")]),e("p",[t._v("快去添加一些商品吧!")]),e("router-link",{staticClass:"shop-now-btn",attrs:{to:"/productList"}},[t._v(" 去购物 ")])],1):e("div",{staticClass:"cart-content"},[e("p",{staticStyle:{color:"#9E44F1","font-size":"14px","margin-bottom":"10px"}},[t._v("注意:各店铺支持多种支付方式,请选择店铺支付方式后提交订单结算")]),e("el-table",{ref:"shopTable",staticStyle:{width:"100%"},attrs:{data:t.shops,border:"","row-key":"id","expand-row-keys":t.expandedShopKeys,"header-cell-style":{textAlign:"left"},"cell-style":{textAlign:"left"}},on:{"expand-change":t.handleGuardExpand}},[e("el-table-column",{attrs:{type:"expand",width:"46",expandable:()=>!1},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-table",{ref:"innerTable-"+a.row.id,staticStyle:{width:"100%"},attrs:{data:a.row.productMachineDtoList||[],size:"small",border:"","row-key":"id","reserve-selection":"","row-class-name":t.getMachineRowClassName,"header-cell-style":{textAlign:"left"},"cell-style":{textAlign:"left"}},on:{"selection-change":e=>t.handleShopInnerSelectionChange(a.row,e)}},[e("el-table-column",{attrs:{type:"selection",width:"46",selectable:e=>t.isRowSelectableByShop(a.row,e)}}),e("el-table-column",{attrs:{prop:"name",label:"商品名称"}}),e("el-table-column",{attrs:{prop:"type",label:"矿机种类",width:"80"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-tag",{class:["type-tag",t.typeClass(a.row.type)],attrs:{"disable-transitions":""}},[t._v(" "+t._s(t.formatMachineType(a.row.type))+" ")])]}}],null,!0)}),e("el-table-column",{attrs:{prop:"id",label:"机器ID",width:"80"}}),e("el-table-column",{attrs:{prop:"algorithm",label:"最大收益算法"}}),e("el-table-column",{attrs:{label:"可售数量","min-width":"40"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(Number(e.row.canSaleNumbers||0))+" ")]}}],null,!0)}),e("el-table-column",{attrs:{label:"购买数量","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-input-number",{attrs:{min:1,max:t.getRowMaxPurchaseForCart(a.row),precision:0,step:1,size:"mini",controls:!1,disabled:1===Number(a.row.type)},on:{change:e=>t.handleNumbersChange(a.row,e)},model:{value:a.row.numbers,callback:function(e){t.$set(a.row,"numbers",e)},expression:"scope.row.numbers"}})]}}],null,!0)}),e("el-table-column",{attrs:{label:"最大可租(天)","min-width":"50"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(null!=e.row.maxLeaseDays?e.row.maxLeaseDays:""))]}}],null,!0)}),e("el-table-column",{attrs:{label:"租赁天数",width:"145"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-input-number",{attrs:{min:1,max:t.getRowMaxLeaseDaysLocal(a.row),precision:0,step:1,size:"mini","controls-position":"right"},on:{change:function(e){return t.handleLeaseTimeChange(a.row)},input:function(e){return t.handleLeaseTimeInput(a.row,e)}},model:{value:a.row.leaseTime,callback:function(e){t.$set(a.row,"leaseTime",e)},expression:"scope.row.leaseTime"}})]}}],null,!0)}),e("el-table-column",{attrs:{prop:"price",width:"120"},scopedSlots:t._u([{key:"header",fn:function(){return[t._v("单价("+t._s(t.getSelectedCoinSymbolForShop(a.row)||"USDT")+")")]},proxy:!0},{key:"default",fn:function(i){return[null!=t.getMachineUnitPriceBySelection(a.row,i.row)?[e("span",{staticClass:"price-strong"},[t.formatAmount(t.getMachineUnitPriceBySelection(a.row,i.row),t.getSelectedCoinSymbolForShop(a.row)).truncated?e("el-tooltip",{attrs:{content:t.formatAmount(t.getMachineUnitPriceBySelection(a.row,i.row),t.getSelectedCoinSymbolForShop(a.row)).full,placement:"top"}},[e("span",[t._v(" "+t._s(t.formatAmount(t.getMachineUnitPriceBySelection(a.row,i.row),t.getSelectedCoinSymbolForShop(a.row)).text)+" "),e("i",{staticClass:"el-icon-more amount-more"})])]):e("span",[t._v(" "+t._s(t.formatAmount(t.getMachineUnitPriceBySelection(a.row,i.row),t.getSelectedCoinSymbolForShop(a.row)).text)+" ")])],1)]:[t._v("-")]]}}],null,!0)}),e("el-table-column",{attrs:{label:"机器状态",width:"110"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-tag",{attrs:{type:1===Number(a.row.del)||1===Number(a.row.state)?"info":"success"}},[t._v(" "+t._s(1===Number(a.row.del)||1===Number(a.row.state)?"下架":"上架")+" ")])]}}],null,!0)}),e("el-table-column",{attrs:{"min-width":"120"},scopedSlots:t._u([{key:"header",fn:function(){return[t._v("机器总价("+t._s(t.getSelectedCoinSymbolForShop(a.row)||"USDT")+")")]},proxy:!0},{key:"default",fn:function(i){return[null!=t.getMachineUnitPriceBySelection(a.row,i.row)?[e("span",{staticClass:"price-strong"},[t.formatAmount(t.getMachineUnitPriceBySelection(a.row,i.row)*Number(i.row.leaseTime||1),t.getSelectedCoinSymbolForShop(a.row)).truncated?e("el-tooltip",{attrs:{content:t.formatAmount(t.getMachineUnitPriceBySelection(a.row,i.row)*Number(i.row.leaseTime||1),t.getSelectedCoinSymbolForShop(a.row)).full,placement:"top"}},[e("span",[t._v(" "+t._s(t.formatAmount(t.getMachineUnitPriceBySelection(a.row,i.row)*Number(i.row.leaseTime||1),t.getSelectedCoinSymbolForShop(a.row)).text)+" "),e("i",{staticClass:"el-icon-more amount-more"})])]):e("span",[t._v(" "+t._s(t.formatAmount(t.getMachineUnitPriceBySelection(a.row,i.row)*Number(i.row.leaseTime||1),t.getSelectedCoinSymbolForShop(a.row)).text)+" ")])],1)]:[t._v("-")]]}}],null,!0)})],1)]}}])}),e("el-table-column",{attrs:{prop:"name",label:"店铺名称"}}),e("el-table-column",{attrs:{prop:"totalMachine",label:"机器总数"}}),e("el-table-column",{attrs:{prop:"totalPrice"},scopedSlots:t._u([{key:"header",fn:function(){return[t._v(" 总价("+t._s(t.getSelectedCoinSymbolForShopHeader())+") ")]},proxy:!0},{key:"default",fn:function(a){return[e("span",{staticClass:"price-strong"},[t.formatAmount(t.displayShopTotalBySelection(a.row),t.getSelectedCoinSymbolForShop(a.row)).truncated?e("el-tooltip",{attrs:{content:t.formatAmount(t.displayShopTotalBySelection(a.row),t.getSelectedCoinSymbolForShop(a.row)).full,placement:"top"}},[e("span",[t._v(" "+t._s(t.formatAmount(t.displayShopTotalBySelection(a.row),t.getSelectedCoinSymbolForShop(a.row)).text)+" "),e("i",{staticClass:"el-icon-more amount-more"})])]):e("span",[t._v(" "+t._s(t.formatAmount(t.displayShopTotalBySelection(a.row),t.getSelectedCoinSymbolForShop(a.row)).text)+" ")])],1)]}}])}),e("el-table-column",{attrs:{label:"支付方式"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-select",{staticStyle:{"min-width":"180px"},attrs:{placeholder:"请选择",size:"mini"},on:{change:e=>t.handleShopPayChange(a.row,e)},scopedSlots:t._u([{key:"prefix",fn:function(){return[t.getSelectedPayIcon(a.row)?e("img",{staticStyle:{width:"16px",height:"16px","margin-right":"6px","border-radius":"3px"},attrs:{src:t.getSelectedPayIcon(a.row),alt:t.getSelectedCoinSymbolForShop(a.row)}}):t._e()]},proxy:!0}],null,!0),model:{value:t.paySelectionMap[a.row.id],callback:function(e){t.$set(t.paySelectionMap,a.row.id,e)},expression:"paySelectionMap[scope.row.id]"}},t._l(t.getShopPayOptions(a.row),function(a,i){return e("el-option",{key:i,attrs:{value:a.value,label:a.label}},[e("div",{staticStyle:{display:"flex","align-items":"center",gap:"8px"}},[e("img",{staticStyle:{width:"18px",height:"18px","border-radius":"3px"},attrs:{src:a.icon,alt:a.label}}),e("span",[t._v(t._s(a.label))])])])}),1)]}}])})],1),e("div",{staticClass:"summary-actions",staticStyle:{"margin-top":"16px",display:"flex",gap:"12px","justify-content":"flex-end"}},[e("div",{staticClass:"summary-inline",staticStyle:{color:"#666"}},[t._v(" 已选机器:"),e("b",[t._v(t._s(t.selectedMachineCount))]),t._v(" 台 "),e("span",{staticStyle:{"margin-left":"12px"}},[t._v("金额合计:")]),Object.keys(t.selectedTotalByCoin||{}).length?t._l(t.selectedTotalByCoin,function(a,i){return e("span",{key:i,staticStyle:{"margin-left":"8px"}},[e("span",{staticClass:"price-strong"},[t.formatAmount(a,i).truncated?e("el-tooltip",{attrs:{content:t.formatAmount(a,i).full,placement:"top"}},[e("span",[t._v(" "+t._s(i)+": "+t._s(t.formatAmount(a,i).text)+" "),e("i",{staticClass:"el-icon-more amount-more"})])]):e("span",[t._v(t._s(i)+": "+t._s(t.formatAmount(a,i).text))])],1)])}):[e("span",{staticClass:"price-strong"},[t._v("-")])]],2),e("div",{staticClass:"actions-inline",staticStyle:{display:"flex",gap:"12px"}},[e("el-button",{attrs:{type:"danger",disabled:!t.selectedMachineCount},on:{click:t.handleRemoveSelectedMachines}},[t._v("删除所选机器")]),e("el-button",{attrs:{type:"warning",plain:"",loading:t.clearOffLoading},on:{click:t.handleClearOffShelf}},[t._v("清除已下架商品")]),e("el-button",{attrs:{type:"primary",disabled:!t.selectedMachineCount},on:{click:t.handleCheckoutSelected}},[t._v("结算选中机器")])],1)]),e("el-dialog",{attrs:{visible:t.confirmDialog.visible,width:"80vw","close-on-click-modal":!1,title:`确认结算(共 ${t.confirmDialog.count} 台机器)`},on:{"update:visible":function(e){return t.$set(t.confirmDialog,"visible",e)}},scopedSlots:t._u([{key:"footer",fn:function(){return[e("el-button",{on:{click:t.handleConfirmDialogPrev}},[t._v("上一步")]),e("el-button",{on:{click:function(e){t.confirmDialog.visible=!1}}},[t._v("取消")]),e("el-button",{attrs:{type:"primary"},on:{click:t.confirmPay}},[t._v("确认结算")])]},proxy:!0}])},[e("div",[t._l(t.confirmDialog.shops,function(a){return e("div",{key:a.shopId,staticStyle:{"margin-bottom":"18px"}},[e("div",{staticStyle:{display:"flex","align-items":"center","justify-content":"space-between",margin:"8px 0 6px 0"}},[e("div",{staticStyle:{"font-weight":"600",color:"#2c3e50"}},[t._v(" 店铺:"+t._s(a.shopName||a.shopId)+" "),e("span",{staticStyle:{"margin-left":"12px",color:"#666","font-weight":"400"}},[t._v("支付方式:"+t._s(a.payLabel))])]),e("div",[a.coinSymbol?[a.enough?e("span",{staticStyle:{color:"#16a34a","font-weight":"600"}},[t._v(" 已满足起付额 "+t._s(t.formatAmount(a.deductibleAmount||0,a.coinSymbol).text)+" ")]):e("span",{staticStyle:{color:"#ef4444","font-weight":"600"}},[t._v(" 金额不足最低起付额 "+t._s(t.formatAmount(a.deductibleAmount||0,a.coinSymbol).text)+" ,收取手续费 "+t._s(t.formatAmount(a.fee||0,a.coinSymbol).text)+" ")])]:t._e()],2)]),e("el-table",{attrs:{data:a.items,"max-height":"260",border:"",stripe:"","header-cell-style":{textAlign:"left"},"cell-style":{textAlign:"left"}}},[e("el-table-column",{attrs:{label:"矿机种类","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-tag",{class:["type-tag",t.typeClass(a.row.type)],staticStyle:{"font-size":"14px"},attrs:{"disable-transitions":""}},[t._v(" "+t._s(t.formatMachineType(a.row.type))+" ")])]}}],null,!0)}),e("el-table-column",{attrs:{prop:"id",label:"机器ID","min-width":"160"}}),e("el-table-column",{attrs:{prop:"algorithm",label:"最大收益算法","min-width":"140"}}),e("el-table-column",{attrs:{prop:"unitPrice","min-width":"140"},scopedSlots:t._u([{key:"header",fn:function(){return[t._v("单价("+t._s(a.coinSymbol||"USDT")+")")]},proxy:!0},{key:"default",fn:function(i){return[e("span",{staticClass:"price-strong"},[t.formatAmount(i.row.unitPrice,a.coinSymbol).truncated?e("el-tooltip",{attrs:{content:t.formatAmount(i.row.unitPrice,a.coinSymbol).full,placement:"top"}},[e("span",[t._v(" "+t._s(t.formatAmount(i.row.unitPrice,a.coinSymbol).text)+" "),e("i",{staticClass:"el-icon-more amount-more"})])]):e("span",[t._v(t._s(t.formatAmount(i.row.unitPrice,a.coinSymbol).text))])],1)]}}],null,!0)}),e("el-table-column",{attrs:{prop:"leaseTime",label:"租赁天数","min-width":"120"}}),e("el-table-column",{attrs:{prop:"numbers",label:"购买数量","min-width":"120"}}),e("el-table-column",{attrs:{prop:"subtotal","min-width":"140"},scopedSlots:t._u([{key:"header",fn:function(){return[t._v("小计("+t._s(a.coinSymbol||"USDT")+")")]},proxy:!0},{key:"default",fn:function(i){return[e("span",{staticClass:"price-strong"},[t.formatAmount(i.row.subtotal,a.coinSymbol).truncated?e("el-tooltip",{attrs:{content:t.formatAmount(i.row.subtotal,a.coinSymbol).full,placement:"top"}},[e("span",[t._v(" "+t._s(t.formatAmount(i.row.subtotal,a.coinSymbol).text)+" "),e("i",{staticClass:"el-icon-more amount-more"})])]):e("span",[t._v(t._s(t.formatAmount(i.row.subtotal,a.coinSymbol).text))])],1)]}}],null,!0)})],1)],1)}),e("div",{staticStyle:{"margin-top":"12px","text-align":"right"}},[e("span",{staticStyle:{"margin-right":"8px"}},[t._v("总金额:")]),Object.keys(t.confirmDialog.totalsByCoin||{}).length?t._l(t.confirmDialog.totalsByCoin,function(a,i){return e("span",{key:i,staticStyle:{"margin-left":"12px"}},[t._v(" "+t._s(i)+": "),e("span",{staticClass:"price-strong"},[t.formatAmount(a,i).truncated?e("el-tooltip",{attrs:{content:t.formatAmount(a,i).full,placement:"top"}},[e("span",[t._v(" "+t._s(t.formatAmount(a,i).text)+" "),e("i",{staticClass:"el-icon-more amount-more"})])]):e("span",[t._v(t._s(t.formatAmount(a,i).text))])],1)])}):[t._v("-")]],2)],2)]),e("el-dialog",{attrs:{visible:t.noticeDialog.visible,width:"60vw",title:"下单须知","show-close":!1,"close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(e){return t.$set(t.noticeDialog,"visible",e)}},scopedSlots:t._u([{key:"footer",fn:function(){return[e("el-button",{attrs:{type:"primary",disabled:t.noticeDialog.countdown>0},on:{click:t.handleNoticeAcknowledge}},[t._v(" 同意并下单"+t._s(t.noticeDialog.countdown>0?`(${t.noticeDialog.countdown}s)`:"")+" ")])]},proxy:!0}])},[e("div",{staticClass:"notice-content"},[e("p",{staticClass:"notice-title"},[t._v('尊敬的客户,感谢您选择我们的服务。在您下单前,请务必仔细阅读并完全理解以下须知条款。一旦您点击" 同意并下单"或完成支付流程,即视为您已充分阅读、理解并同意接受本须知的全部内容约束。')]),e("ol",{staticClass:"notice-list"},[e("li",[e("b",[t._v("预授权冻结:")]),t._v("为保障订单顺利执行,在下单成功后,系统将立即对您数字钱包或账户中与订单全款总额等值的资金进行预授权冻结。此操作并非即时划转,而是为确保您有足够的资金用于每日支付。")]),e("li",[e("b",[t._v("每日结算支付:")]),t._v('本服务采用"按日结算"模式。冻结的资金将根据租赁协议约定的每日费用,每日自动划转相应的金额给卖家。划转操作通常在每个UTC日结束时自动执行。')]),e("li",[e("b",[t._v("资金解冻:")]),t._v("当租赁服务到期或因其他原因终止后,系统中剩余的、未被划转的冻结资金将立即解除冻结,并返还至您的可用余额中。")]),e("li",[e("b",[t._v("订单生效:")]),t._v(" 您的订单在支付流程完成且资金成功冻结后立即生效。系统将开始为您配置相应的矿机或算力资源。")]),e("li",[e("b",[t._v("不可取消政策:")]),t._v(" 鉴于算力服务一经提供即无法退回的特性,所有订单一旦生效,即不可取消、不可退款、不可转让。您无法在租赁期内单方面中止服务或要求退还已冻结及已支付的费用。")]),e("li",[e("b",[t._v("免责声明:")]),t._v("因不可抗力(如自然灾害、政策变动等)导致订单延迟或无法履行,我们不承担相应责任。")]),e("li",[e("b",[t._v("算力波动:")]),t._v("您所租赁的算力产生的收益取决于区块链网络难度、全球总算力、币价波动、矿池运气等多种外部因素。我们仅提供稳定的算力输出,不对您的最终收益做出任何承诺或保证。")])]),e("p",{staticClass:"notice-title"},[t._v("再次提醒:数字资产挖矿存在较高市场风险,收益波动巨大,过去业绩不代表未来表现。请根据自身的风险承受能力谨慎决策。您下单的行为即代表您已充分了解并自愿承担所有相关风险。")]),e("div",{staticClass:"notice-ack"},[e("el-checkbox",{staticStyle:{color:"#e74c3c"},model:{value:t.noticeDialog.checked,callback:function(e){t.$set(t.noticeDialog,"checked",e)},expression:"noticeDialog.checked"}},[t._v("我已阅读并同意上述注意事项")])],1)])]),e("el-dialog",{attrs:{visible:t.configDialog.visible,width:"80vw",title:"矿机配置","close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(e){return t.$set(t.configDialog,"visible",e)}},scopedSlots:t._u([{key:"footer",fn:function(){return[e("el-button",{on:{click:t.handleConfigPrev}},[t._v("上一步")]),e("el-button",{on:{click:t.handleConfigCancel}},[t._v("取消")]),e("el-button",{attrs:{type:"primary"},on:{click:t.handleConfigConfirm}},[t._v(" "+t._s(t.unconfiguredMachinesList.length>0?"确认配置":"下一步")+" ")])]},proxy:!0}])},[e("div",[t.configDialog.selectedMachines&&t.configDialog.selectedMachines.length>0?e("div",[e("div",{staticStyle:{display:"flex","align-items":"center",gap:"12px","margin-bottom":"12px"}},[e("div",{staticStyle:{"font-weight":"600",color:"#2c3e50"}},[t._v("选择币种/算法")]),e("el-cascader",{staticStyle:{"min-width":"320px"},attrs:{options:t.configDialog.coinAlgoOptions,props:{checkStrictly:!1},clearable:"",placeholder:"请选择币种与算法",size:"small"},on:{change:t.handleCoinAlgoChange},model:{value:t.configDialog.coinAlgoValue,callback:function(e){t.$set(t.configDialog,"coinAlgoValue",e)},expression:"configDialog.coinAlgoValue"}}),e("div",{staticStyle:{"font-weight":"600",color:"#2c3e50","white-space":"nowrap"}},[t._v("选择矿池/模型")]),e("el-cascader",{staticStyle:{width:"240px"},attrs:{options:t.configDialog.poolOptions,props:{checkStrictly:!1},clearable:"",placeholder:"请选择矿池与模型",size:"small",disabled:!t.configDialog.coinAlgoValue||2!==t.configDialog.coinAlgoValue.length},on:{change:t.handlePoolValueChange},model:{value:t.configDialog.poolValue,callback:function(e){t.$set(t.configDialog,"poolValue",e)},expression:"configDialog.poolValue"}})],1),t.unconfiguredMachinesList.length>0?e("div",[e("div",{staticStyle:{"font-weight":"600",color:"#2c3e50","margin-bottom":"8px","font-size":"14px"}},[t.configDialog.coinAlgoValue&&2===t.configDialog.coinAlgoValue.length?[t._v(" 支持该币种/算法的机器(共 "+t._s(t.unconfiguredMachinesList.length)+" 台) ")]:[t._v(" 待配置机器(共 "+t._s(t.unconfiguredMachinesList.length)+" 台) ")]],2),e("el-table",{ref:"configTable",attrs:{data:t.unconfiguredMachinesList,"max-height":"300",border:"",stripe:"","row-key":"id","reserve-selection":"","header-cell-style":{textAlign:"left",fontSize:"14px"},"cell-style":{textAlign:"left",fontSize:"14px"}},on:{"selection-change":t.handleConfigSelectionChange}},[e("el-table-column",{attrs:{type:"selection",width:"46"}}),e("el-table-column",{attrs:{label:"矿机种类",width:"120"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-tag",{class:["type-tag",t.typeClass(a.row.type)],staticStyle:{"font-size":"14px"},attrs:{"disable-transitions":""}},[t._v(" "+t._s(t.formatMachineType(a.row.type))+" ")])]}}],null,!1,2555332731)}),e("el-table-column",{attrs:{prop:"id",label:"机器ID",width:"120"}}),e("el-table-column",{attrs:{prop:"algorithm",label:"最大收益算法","min-width":"140"}}),null!==t.getCurrentWalletMining()?e("el-table-column",{attrs:{label:"矿工号","min-width":"160"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-input",{attrs:{placeholder:"矿工号",size:"mini",clearable:"",maxlength:"40"},on:{input:e=>t.handleMachineWorkerIdInput(a.row,e)},model:{value:a.row._workerId,callback:function(e){t.$set(a.row,"_workerId",e)},expression:"scope.row._workerId"}})]}}],null,!1,46571769)}):t._e()],1)],1):t._e(),null!==t.getCurrentWalletMining()?e("div",{staticStyle:{"margin-top":"16px"}},[!0===t.getCurrentWalletMining()?e("div",{staticStyle:{display:"flex","align-items":"center",gap:"12px"}},[e("label",{staticStyle:{"font-weight":"600",color:"#2c3e50","min-width":"100px"}},[t._v("钱包地址:")]),e("el-input",{staticStyle:{flex:"1","max-width":"500px"},attrs:{placeholder:"请输入钱包地址",clearable:"",maxlength:"95"},on:{input:t.handleWalletAddressInput},model:{value:t.configDialog.walletAddress,callback:function(e){t.$set(t.configDialog,"walletAddress",e)},expression:"configDialog.walletAddress"}})],1):t._e(),!1===t.getCurrentWalletMining()?e("div",{staticStyle:{display:"flex","align-items":"center",gap:"12px"}},[e("label",{staticStyle:{"font-weight":"600",color:"#2c3e50","min-width":"100px"}},[t._v("挖矿账户:")]),e("el-input",{staticStyle:{flex:"1","max-width":"500px"},attrs:{placeholder:"请输入挖矿账户",clearable:"",maxlength:"40"},on:{input:t.handleMiningAccountInput},model:{value:t.configDialog.miningAccount,callback:function(e){t.$set(t.configDialog,"miningAccount",e)},expression:"configDialog.miningAccount"}})],1):t._e()]):t.configDialog.coinAlgoValue&&2===t.configDialog.coinAlgoValue.length&&null===t.getCurrentWalletMining()?e("div",{staticStyle:{"margin-top":"16px",color:"#909399","font-size":"14px"}},[t._v(" 请先选择矿池/模型 ")]):t.configDialog.coinAlgoValue&&2===t.configDialog.coinAlgoValue.length&&0===t.unconfiguredMachinesList.length?e("div",{staticStyle:{"margin-bottom":"12px",color:"#909399","font-size":"14px"}},[t._v(" 当前选择的币种/算法下没有可配置的机器 ")]):t._e(),t.unsupportedMachinesList.length>0?e("div",{staticStyle:{"margin-top":"16px"}},[e("div",{staticStyle:{"font-weight":"600",color:"#f56c6c","margin-bottom":"8px","font-size":"14px"}},[t._v(" 不支持该币种/算法的机器(共 "+t._s(t.unsupportedMachinesList.length)+" 台) ")]),e("el-table",{attrs:{data:t.unsupportedMachinesList,"max-height":"200",border:"",stripe:"","header-cell-style":{textAlign:"left",fontSize:"14px"},"cell-style":{textAlign:"left",fontSize:"14px"}}},[e("el-table-column",{attrs:{label:"矿机种类",width:"120"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-tag",{class:["type-tag",t.typeClass(a.row.type)],staticStyle:{"font-size":"14px"},attrs:{"disable-transitions":""}},[t._v(" "+t._s(t.formatMachineType(a.row.type))+" ")])]}}],null,!1,2555332731)}),e("el-table-column",{attrs:{prop:"id",label:"机器ID",width:"120"}}),e("el-table-column",{attrs:{prop:"algorithm",label:"最大收益算法","min-width":"140"}})],1)],1):t._e()]):t._e(),t.configDialog.configuredMachines.length>0?e("div",{staticStyle:{"margin-top":"24px"}},[e("div",{staticStyle:{"font-weight":"600",color:"#2c3e50","margin-bottom":"12px","font-size":"16px"}},[t._v("已配置机器")]),e("el-table",{attrs:{data:t.configDialog.configuredMachines,"max-height":"300",border:"",stripe:"","header-cell-style":{textAlign:"left",fontSize:"14px"},"cell-style":{textAlign:"left",fontSize:"14px"}}},[e("el-table-column",{attrs:{label:"矿机种类",width:"120"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-tag",{class:["type-tag",t.typeClass(a.row.type)],staticStyle:{"font-size":"14px"},attrs:{"disable-transitions":""}},[t._v(" "+t._s(t.formatMachineType(a.row.type))+" ")])]}}],null,!1,2555332731)}),e("el-table-column",{attrs:{prop:"id",label:"机器ID",width:"120"}}),e("el-table-column",{attrs:{prop:"coin",label:"币种",width:"120"}}),e("el-table-column",{attrs:{prop:"algorithm",label:"算法","min-width":"140"}}),e("el-table-column",{attrs:{prop:"poolName",label:"矿池","min-width":"140"}}),e("el-table-column",{attrs:{prop:"modelName",label:"模型","min-width":"140"}}),e("el-table-column",{attrs:{label:"钱包地址","min-width":"200"},scopedSlots:t._u([{key:"default",fn:function(a){return[a.row.walletAddress?e("el-tooltip",{attrs:{content:a.row.walletAddress,placement:"top"}},[e("span",{staticClass:"mono-ellipsis",staticStyle:{"font-family":"monospace"}},[t._v(t._s(t.formatWalletAddress(a.row.walletAddress)))])]):e("span",[t._v("-")])]}}],null,!1,2449193566)}),t.hasConfiguredMiningAccount?e("el-table-column",{attrs:{prop:"miningAccount",label:"挖矿账户","min-width":"140"}}):t._e(),t.hasConfiguredWorkerId?e("el-table-column",{attrs:{prop:"workerId",label:"矿工号","min-width":"140"}}):t._e()],1)],1):t._e()])]),e("el-dialog",{attrs:{visible:t.googleCodeDialog.visible,width:"480px",title:"安全验证","show-close":!1,"close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(e){return t.$set(t.googleCodeDialog,"visible",e)}},scopedSlots:t._u([{key:"footer",fn:function(){return[e("div",{staticClass:"dialog-footer"},[e("el-button",{on:{click:t.handleGoogleCodePrev}},[t._v("上一步")]),e("el-button",{on:{click:t.handleGoogleCodeCancel}},[t._v("取消")]),e("el-button",{attrs:{type:"primary",loading:t.googleCodeDialog.loading,disabled:!t.isGoogleCodeValid},on:{click:t.handleGoogleCodeSubmit}},[t._v(" "+t._s(t.googleCodeDialog.loading?"验证中...":"确认验证")+" ")])],1)]},proxy:!0}])},[e("div",{staticClass:"google-code-content"},[e("div",{staticClass:"verification-icon"},[e("i",{staticClass:"el-icon-lock",staticStyle:{"font-size":"48px",color:"#409EFF"}})]),e("div",{staticClass:"verification-title"},[e("h3",[t._v("请输入谷歌验证码")]),e("p",{staticClass:"verification-desc"},[t._v("为了保障您的账户安全,请输入您的谷歌验证器中的6位验证码")])]),e("div",{staticClass:"code-input-wrapper"},[e("el-input",{ref:"googleCodeInput",staticClass:"code-input",attrs:{placeholder:"请输入6位验证码",maxlength:"6",size:"large"},on:{input:t.handleGoogleCodeInput},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleGoogleCodeSubmit.apply(null,arguments)}},scopedSlots:t._u([{key:"prepend",fn:function(){return[e("i",{staticClass:"el-icon-key"})]},proxy:!0}]),model:{value:t.googleCodeDialog.code,callback:function(e){t.$set(t.googleCodeDialog,"code",e)},expression:"googleCodeDialog.code"}})],1),t.googleCodeDialog.error?e("div",{staticClass:"code-error"},[e("i",{staticClass:"el-icon-warning"}),e("span",[t._v(t._s(t.googleCodeDialog.error))])]):t._e()])])],1),e("el-dialog",{attrs:{visible:t.settlementSuccessfulVisible,width:"480px","append-to-body":"","close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(e){t.settlementSuccessfulVisible=e},close:t.handleCloseSuccessDialog},scopedSlots:t._u([{key:"footer",fn:function(){return[e("el-button",{attrs:{type:"primary"},on:{click:t.handleCloseSuccessDialog}},[t._v("已知晓")])]},proxy:!0}])},[e("div",{staticStyle:{"text-align":"center",padding:"20px 0"}},[e("div",{staticStyle:{"font-size":"48px",color:"#52c41a","margin-bottom":"16px"}},[t._v("✓")]),e("div",{staticStyle:{"font-size":"18px",color:"#333","margin-bottom":"12px"}},[t._v("请求结算处理成功")]),e("div",{staticStyle:{color:"#666","line-height":"1.6"}},[t._v(" 请在订单列表页面查看结算状态"),e("br"),t._v(" 结算成功会自动更新钱包余额 ")])])])],1)},e.Yp=[]},2334:function(t,e){e.Yp=e.XX=void 0;e.XX=function(){var t=this,e=t._self._c;return e("div",{staticClass:"header-container"},[e("nav",{staticClass:"navbar"},[e("div",{staticClass:"nav-left"},t._l(t.navigation,function(a){return e("router-link",{key:a.path,staticClass:"nav-btn",class:{active:t.isNavActive(a.path)},attrs:{to:a.path,title:a.description}},[e("span",{staticClass:"nav-icon"},[t._v(t._s(a.icon))]),e("span",{staticClass:"nav-text"},[t._v(t._s(a.name))]),"/cart"===a.path?e("span",{staticClass:"cart-count"},[t._v("("+t._s(t.cartItemCount)+")")]):t._e()])}),1),e("div",{staticClass:"nav-right"},[t.isLoggedIn?e("div",{staticClass:"user-info"},[e("span",{staticClass:"user-email"},[t._v(t._s(t.userEmail))]),e("router-link",{staticClass:"security-link",attrs:{to:"/account/security-settings","active-class":"active"}},[t._v(" 安全设置 ")]),e("el-button",{staticClass:"logout-btn",attrs:{type:"text",size:"small"},on:{click:t.handleLogout}},[t._v(" 退出 ")])],1):e("div",{staticClass:"auth-buttons"},[e("button",{staticClass:"auth-btn register-btn",on:{click:t.goToRegister}},[t._v(" 注册 ")]),e("button",{staticClass:"auth-btn login-btn",on:{click:t.goToLogin}},[t._v(" 登录 ")])])])])])},e.Yp=[]},2361:function(t,e){e.Yp=e.XX=void 0;e.XX=function(){var t=this,e=t._self._c;return e("div",{staticClass:"product-machine-add"},[e("div",{staticClass:"header"},[e("el-button",{attrs:{type:"text"},on:{click:t.handleBack}},[t._v("返回")]),e("h2",{staticClass:"title"},[t._v("创建商品")])],1),e("el-card",{staticClass:"form-card",attrs:{shadow:"never"}},[e("el-form",{ref:"machineForm",attrs:{model:t.form,rules:t.rules,"label-width":"160px",size:"small"}},[e("el-form-item",{attrs:{label:"矿机种类"}},[e("el-radio-group",{on:{change:t.handleMachineCategoryChange},model:{value:t.form.machineCategory,callback:function(e){t.$set(t.form,"machineCategory",e)},expression:"form.machineCategory"}},[e("el-radio",{attrs:{label:"ASIC"}},[t._v("ASIC")]),e("el-radio",{attrs:{label:"GPU"}},[t._v("GPU")])],1)],1),"GPU"===t.form.machineCategory?e("div",{staticClass:"gpu-guide-section"},[e("el-card",{staticClass:"gpu-guide-card",attrs:{shadow:"never"}},[e("div",{staticClass:"gpu-guide-content"},[e("div",{staticClass:"gpu-guide-title"},[t._v("注意事项:")]),e("ol",{staticClass:"gpu-guide-list"},[e("li",[t._v(" GPU商品需先点击下方按钮,下载并在GPU所在主机启动客户端,在下载包中会有启动客户端的操作指引文档 ")]),e("li",[t._v(" 成功在GPU主机启动客户端后,GPU信息会自行添加至商品列表中,点击下方前往商品列表按钮可以前往该页面 ")]),e("li",[t._v(" 客户端和您的卖家账号绑定,如果您需要在本卖家账号"),t.userEmail?e("span",[t._v(" ("+t._s(t.userEmail)+")")]):t._e(),t._v("添加多个GPU商品,可通过下列两种方法实现:"),e("br"),t._v(" 方法一:点击下方下载客户端按钮,将下载好的完整客户端包复制到不同的GPU主机并且启动,启动后客户端所在主机的GPU数据会自动添加到商品列表中 (推荐) "),e("br"),t._v(" 方法二:在不同的客户端主机登陆您的卖家账号,进入本页面,点击下载对应操作系统客户端,成功启动客户端后也可自动添加GPU数据到商品列表中 ")]),e("li",[t._v("目前只支持NVIDIA系列GPU")])]),e("div",{staticClass:"gpu-guide-buttons"},[e("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.handleDownloadClient("windows")}}},[t._v("Windows 客户端下载")]),e("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.handleDownloadClient("linux")}}},[t._v("Linux 客户端下载")]),e("el-button",{attrs:{type:"success"},on:{click:t.handleGpuClientStarted}},[t._v("前往商品列表")])],1)])])],1):t._e(),"ASIC"===t.form.machineCategory?e("el-form-item",{attrs:{label:"币种/算法/算力/单位",prop:"coinAndAlgoList",required:!0}},[e("div",{staticClass:"coin-algo-rows"},t._l(t.form.coinAndAlgoList,function(a,i){return e("div",{key:i,staticClass:"coin-algo-line"},[e("el-select",{staticClass:"coin-input",attrs:{placeholder:"请选择币种",loading:t.loadingCoins,filterable:"",clearable:""},on:{change:function(e){return t.handleCoinChange(i,e)}},model:{value:a.coin,callback:function(e){t.$set(a,"coin",e)},expression:"row.coin"}},t._l(t.coinOptions,function(t){return e("el-option",{key:t,attrs:{label:t,value:t}})}),1),e("el-select",{staticClass:"algo-input",attrs:{placeholder:"请选择算法",loading:t.loadingAlgos[i],disabled:!a.coin,filterable:"",clearable:""},model:{value:a.algorithm,callback:function(e){t.$set(a,"algorithm",e)},expression:"row.algorithm"}},t._l(t.algoOptionsMap[a.coin]||[],function(t){return e("el-option",{key:t,attrs:{label:t,value:t}})}),1),e("el-input",{staticClass:"power-input",attrs:{placeholder:"理论算力",inputmode:"decimal"},on:{input:function(e){return t.handleCoinRowTheoryInput(i)}},model:{value:a.theoryPower,callback:function(e){t.$set(a,"theoryPower",e)},expression:"row.theoryPower"}}),e("el-select",{staticClass:"unit-select",attrs:{placeholder:"单位"},on:{change:function(e){return t.handleCoinRowUnitChange(i,e)}},model:{value:a.unit,callback:function(e){t.$set(a,"unit",e)},expression:"row.unit"}},[e("el-option",{attrs:{label:"KH/S",value:"KH/S"}}),e("el-option",{attrs:{label:"MH/S",value:"MH/S"}}),e("el-option",{attrs:{label:"GH/S",value:"GH/S"}}),e("el-option",{attrs:{label:"TH/S",value:"TH/S"}}),e("el-option",{attrs:{label:"PH/S",value:"PH/S"}})],1),e("el-button",{staticClass:"op-btn",attrs:{type:"primary",icon:"el-icon-plus",circle:"","aria-label":"新增一行"},on:{click:t.handleAddCoinAlgoRow}}),t.form.coinAndAlgoList.length>1?e("el-button",{staticClass:"op-btn",attrs:{icon:"el-icon-minus",circle:"","aria-label":"删除该行"},on:{click:function(e){return t.handleRemoveCoinAlgoRow(i)}}}):t._e()],1)}),0)]):t._e(),"ASIC"===t.form.machineCategory?e("el-form-item",{attrs:{label:"矿机型号",prop:"type",required:!0}},[e("el-input",{staticStyle:{width:"50%"},attrs:{placeholder:"示例:龍珠",maxlength:20},on:{input:t.handleTypeInput},model:{value:t.form.type,callback:function(e){t.$set(t.form,"type",e)},expression:"form.type"}})],1):t._e(),"ASIC"===t.form.machineCategory?e("el-form-item",{attrs:{label:"最大租赁天数",prop:"maxLeaseDays"}},[e("el-input",{staticStyle:{width:"50%"},attrs:{placeholder:"1-365",inputmode:"numeric"},on:{input:function(e){return t.handleNumeric("maxLeaseDays")}},model:{value:t.form.maxLeaseDays,callback:function(e){t.$set(t.form,"maxLeaseDays",e)},expression:"form.maxLeaseDays"}},[e("template",{slot:"append"},[t._v("天")])],2)],1):t._e(),"ASIC"===t.form.machineCategory?e("el-form-item",{attrs:{label:"功耗",prop:"powerDissipation"}},[e("el-input",{staticStyle:{width:"50%"},attrs:{inputmode:"decimal"},on:{input:function(e){return t.handleNumeric("powerDissipation")}},model:{value:t.form.powerDissipation,callback:function(e){t.$set(t.form,"powerDissipation",e)},expression:"form.powerDissipation"}},[e("template",{slot:"append"},[t._v("kw/h")])],2)],1):t._e(),"ASIC"===t.form.machineCategory?e("el-form-item",{attrs:{label:"统一售价",prop:t.payTypeDefs&&t.payTypeDefs.length?"costMap":"cost",required:!0}},[e("span",{attrs:{slot:"label"},slot:"label"},[t._v("统一售价")]),t.payTypeDefs&&t.payTypeDefs.length?e("div",{staticClass:"cost-multi"},t._l(t.payTypeDefs,function(a){return e("div",{key:a.key,staticClass:"cost-item"},[e("el-input",{staticStyle:{width:"50%"},attrs:{placeholder:"请输入价格",inputmode:"decimal"},on:{input:e=>t.handleCostMapInput(a.key,e)},model:{value:t.form.costMap[a.key],callback:function(e){t.$set(t.form.costMap,a.key,e)},expression:"form.costMap[pt.key]"}},[e("template",{slot:"append"},[t._v(t._s(a.label))])],2)],1)}),0):e("el-input",{staticStyle:{width:"50%"},attrs:{placeholder:"请输入成本(USDT)",inputmode:"decimal"},on:{input:function(e){return t.handleNumeric("cost")}},model:{value:t.form.cost,callback:function(e){t.$set(t.form,"cost",e)},expression:"form.cost"}},[e("template",{slot:"append"},[t._v("USDT")])],2)],1):t._e(),"ASIC"===t.form.machineCategory?e("el-form-item",{attrs:{label:"出售机器数量(台)",prop:"sellCount",required:!0}},[e("el-input",{staticStyle:{width:"50%"},attrs:{placeholder:"0 - 9999",inputmode:"numeric"},on:{input:t.handleSellCountInput,blur:t.handleSellCountBlur},model:{value:t.form.sellCount,callback:function(e){t.$set(t.form,"sellCount",e)},expression:"form.sellCount"}})],1):t._e()],1)],1),"ASIC"===t.form.machineCategory?e("div",{staticClass:"actions"},[e("el-button",{on:{click:t.handleBack}},[t._v("取消")]),e("el-button",{attrs:{type:"primary",loading:t.saving},on:{click:t.handleSave}},[t._v("确认创建")])],1):t._e(),e("el-dialog",{attrs:{title:"请确认上架信息",visible:t.confirmVisible,width:"560px"},on:{"update:visible":function(e){t.confirmVisible=e}}},[e("div",{staticStyle:{"text-align":"left","line-height":"1.9"}},[e("div",[t._v(" 币种:"),e("b",[t._v(t._s(t.confirmData.coin))])]),e("div",[t._v(" 算法:"),e("b",[t._v(t._s(t.confirmData.algorithm))])]),e("div",[t._v(" 最大租赁天数:"),e("b",[t._v(t._s(t.confirmData.maxLeaseDays||"-"))])]),e("div",[t._v(" 出售机器数量:"),e("b",[t._v(t._s(t.confirmData.saleNumbers||"-"))])]),e("div",{staticStyle:{"margin-top":"8px"}},[t._v("售价:")]),e("el-table",{staticStyle:{width:"100%"},attrs:{data:t.confirmData.priceList,border:"",size:"mini"}},[e("el-table-column",{attrs:{prop:"chain",label:"链",width:"120"}}),e("el-table-column",{attrs:{prop:"coin",label:"币种",width:"120"}}),e("el-table-column",{attrs:{label:"价格"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.row.price)+" ")]}}])})],1),e("p",{staticStyle:{color:"#666","margin-top":"12px"}},[t._v(" 请仔细确认以上参数无误后提交。 ")])],1),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:function(e){t.confirmVisible=!1}}},[t._v("取消")]),e("el-button",{attrs:{type:"primary",loading:t.saving},on:{click:t.doSubmit}},[t._v("确认提交")])],1)])],1)},e.Yp=[]},2515:function(t,e,a){Object.defineProperty(e,"B",{value:!0}),e.A=void 0,a(8111),a(1701),a(7642),a(8004),a(3853),a(5876),a(2475),a(5024),a(1698);var i=a(6299),s=a(4981);e.A={name:"AccountFundsFlow",data(){return{active:"recharge",loading:{recharge:!1,withdraw:!1,consume:!1},rechargeRows:[],withdrawRows:[],consumeRows:[],expandedKeys:new Set,total:0,pageSizes:[10,20,50],currentPage:1,pagination:{pageNum:1,pageSize:10,status:2}}},mounted(){const t=this.$route&&this.$route.query&&this.$route.query.tab||"recharge";["recharge","withdraw","consume"].includes(t)&&(this.active=t),this.pagination.status=this.getStatusByTab(this.active),this.loadList()},methods:{formatAmount(t,e){return(0,s.truncateAmountByCoin)(t,e)},handleTab(t,e){this.expandedKeys.clear(),this.expandedKeys=new Set(this.expandedKeys);const a=t&&t.name||this.active;this.pagination.status=this.getStatusByTab(a),this.pagination.pageNum=1,this.currentPage=1,this.loadList()},getRowKey(t,e){const a=null!=e?`#${e}`:"";if(!t)return String(null!=e?e:"");const i=t.__key||t.id||t.txHash||t.orderId||`${t.createTime||""}-${t.updateTime||""}`;return null==i||""===i?String(null!=e?e:""):`${String(i)}${a}`},isExpanded(t,e,a){const i=`${t}-${this.getRowKey(e,a)}`;return this.expandedKeys.has(i)},toggleExpand(t,e,a){const i=`${t}-${this.getRowKey(e,a)}`;this.expandedKeys.has(i)?this.expandedKeys.clear():(this.expandedKeys.clear(),this.expandedKeys.add(i)),this.expandedKeys=new Set(this.expandedKeys)},async loadList(){const t=Number(this.pagination.status),e=this.getTypeKeyByStatus(t);if(e){this.loading[e]=!0;try{const e=await(0,i.transactionRecord)({pageNum:this.pagination.pageNum,pageSize:this.pagination.pageSize,status:t}),a=e?.rows||e?.data?.rows||[];this.total=e?.total||e?.data?.total||(Array.isArray(a)?a.length:0);const s=(Array.isArray(a)?a:[]).map((t,e)=>({...t,__key:t.id||t.txHash||t.orderId||`${e}`}));2===t?this.rechargeRows=s:1===t?this.withdrawRows=s:this.consumeRows=s,this.expandedKeys.clear(),this.expandedKeys=new Set(this.expandedKeys)}finally{this.loading[e]=!1}}},loadByStatus(t){return this.pagination.status=t,this.active=this.getTabByStatus(t),this.pagination.pageNum=1,this.currentPage=1,this.loadList()},loadRecharge(){return this.loadByStatus(2)},loadWithdraw(){return this.loadByStatus(1)},loadConsume(){return this.loadByStatus(0)},statusClass(t){return{0:"failed",1:"success",2:"pending"}[t]||"neutral"},getRechargeStatusType(t){return{0:"danger",1:"success",2:"warning"}[t]||"info"},getRechargeStatusText(t){return{0:"充值失败",1:"充值成功",2:"充值中",3:"证书校验失败"}[t]||"未知"},getWithdrawStatusType(t){return{0:"danger",1:"success",2:"warning"}[t]||"info"},getWithdrawStatusText(t){return{0:"提现失败",1:"提现成功",2:"提现中",3:"证书校验失败"}[t]||"未知"},getPayStatusType(t){return{0:"danger",1:"success",2:"warning",3:"danger"}[t]||"info"},getPayStatusText(t){return{0:"支付失败",1:"支付成功",2:"待校验",3:"证书校验失败"}[t]||"未知"},formatChain(t){if(!t)return"";const e=String(t).toLowerCase(),a={tron:"TRON",trx:"TRON",eth:"ETH",ethereum:"ETH",bsc:"BSC",polygon:"POLYGON",matic:"POLYGON"};return(a[e]||String(t)).toUpperCase()},formatFullTime(t){if(!t)return"";try{return new Date(t).toLocaleString("zh-CN")}catch(e){return String(t)}},formatTime(t){return this.formatFullTime(t)},formatTrunc(t,e=2){const a=Number(t);if(!Number.isFinite(a))return"0";const i=Math.max(0,Number(e)||0),s=Math.pow(10,i),o=Math.trunc(a*s)/s,r=String(o);if(0===i)return r;const[n,l=""]=r.split("."),c=l.padEnd(i,"0");return`${n}.${c}`},handleSizeChange(t){console.log(`每页 ${t} 条`),this.pagination.pageSize=t,this.pagination.pageNum=1,this.currentPage=1,this.loadList()},handleCurrentChange(t){console.log(`当前页: ${t}`),this.pagination.pageNum=t,this.loadList()},async handleCopy(t,e="内容"){try{const a=String(t||"");if(navigator&&navigator.clipboard&&navigator.clipboard.writeText)await navigator.clipboard.writeText(a);else{const t=document.createElement("textarea");t.value=a,t.style.position="fixed",t.style.left="-9999px",document.body.appendChild(t),t.focus(),t.select(),document.execCommand("copy"),document.body.removeChild(t)}this.$message.success(`${e}已复制`)}catch(a){this.$message.error("复制失败,请手动选择复制")}},getStatusByTab(t){return"recharge"===t?2:"withdraw"===t?1:0},getTabByStatus(t){return 2===Number(t)?"recharge":1===Number(t)?"withdraw":"consume"},getTypeKeyByStatus(t){return 2===Number(t)?"recharge":1===Number(t)?"withdraw":0===Number(t)?"consume":""}}}},2549:function(t,e,a){var i=a(3999)["default"];Object.defineProperty(e,"__esModule",{value:!0}),e.closeAccount=h,e.getLogin=r,e.getLogout=n,e.register=o,e.sendCloseAccount=p,e.sendEmailCode=c,e.sendLoginCode=l,e.sendUpdatePwdCode=d,e.updatePassword=u,e.updatePasswordInCenter=m;var s=i(a(5720));function o(t){return(0,s.default)({url:"/lease/auth/register",method:"post",data:t})}function r(t){return(0,s.default)({url:"/lease/auth/login",method:"post",data:t})}function n(t){return(0,s.default)({url:"/lease/auth/logout",method:"post",data:t})}function l(t){return(0,s.default)({url:"/lease/auth/sendLoginCode",method:"post",data:t})}function c(t){return(0,s.default)({url:"/lease/auth/sendRegisterCode",method:"post",data:t})}function d(t){return(0,s.default)({url:"/lease/auth/sendUpdatePwdCode",method:"post",data:t})}function u(t){return(0,s.default)({url:"/lease/auth/updatePassword",method:"post",data:t})}function h(t){return(0,s.default)({url:"/lease/auth/closeAccount",method:"post",data:t})}function p(t){return(0,s.default)({url:"/lease/auth/sendCloseAccount",method:"post",data:t})}function m(t){return(0,s.default)({url:"/lease/auth/updatePasswordInCenter",method:"post",data:t})}},2553:function(t,e){e.Yp=e.XX=void 0;e.XX=function(){var t=this,e=t._self._c;return e("div",{staticClass:"recharge-record-container"},[t._m(0),e("div",{staticClass:"tab-container"},[e("el-tabs",{on:{"tab-click":t.handleTabClick},model:{value:t.activeTab,callback:function(e){t.activeTab=e},expression:"activeTab"}},[e("el-tab-pane",{attrs:{label:"充值中",name:"pending"}},[e("div",{staticClass:"tab-content"},[e("div",{staticClass:"list-header"},[e("span",{staticClass:"list-title"},[t._v("充值中 ("+t._s(t.pendingRecharges.length)+")")]),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.refreshData}},[e("i",{staticClass:"el-icon-refresh"}),t._v(" 刷新 ")])],1),e("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"recharge-list"},[t._l(t.pendingRecharges,function(a){return e("div",{key:a.id,staticClass:"recharge-item pending",on:{click:function(e){return t.showDetail(a)}}},[e("div",{staticClass:"item-main"},[e("div",{staticClass:"item-left"},[e("div",{staticClass:"amount"},[t._v(" "+t._s(a.amount)+" "+t._s(a.fromSymbol||"USDT")+" ")]),e("div",{staticClass:"chain"},[t._v(t._s(t.getChainName(a.fromChain)))])]),e("div",{staticClass:"item-right"},[e("div",{staticClass:"status pending-status"},[e("i",{staticClass:"el-icon-loading"}),t._v(" "+t._s(t.getStatusText(a.status))+" ")]),e("div",{staticClass:"time"},[t._v(t._s(t.formatTime(a.createTime)))])])]),e("div",{staticClass:"item-footer"},[e("div",{staticClass:"footer-left"},[e("span",{staticClass:"address"},[t._v(t._s(t.formatAddress(a.address)))]),a.txHash?e("span",{staticClass:"tx-hash"},[e("i",{staticClass:"el-icon-link"}),t._v(" "+t._s(t.formatAddress(a.txHash))+" ")]):t._e()]),e("i",{staticClass:"el-icon-arrow-right"})])])}),0===t.pendingRecharges.length?e("div",{staticClass:"empty-state"},[e("i",{staticClass:"el-icon-document"}),e("p",[t._v("暂无充值中的记录")])]):t._e()],2)])]),e("el-tab-pane",{attrs:{label:"充值成功",name:"success"}},[e("div",{staticClass:"tab-content"},[e("div",{staticClass:"list-header"},[e("span",{staticClass:"list-title"},[t._v("充值成功 ("+t._s(t.successRecharges.length)+")")]),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.refreshData}},[e("i",{staticClass:"el-icon-refresh"}),t._v(" 刷新 ")])],1),e("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"recharge-list"},[t._l(t.successRecharges,function(a){return e("div",{key:a.id,staticClass:"recharge-item success",on:{click:function(e){return t.showDetail(a)}}},[e("div",{staticClass:"item-main"},[e("div",{staticClass:"item-left"},[e("div",{staticClass:"amount"},[t._v(" "+t._s(a.amount)+" "+t._s(a.fromSymbol||"USDT")+" ")]),e("div",{staticClass:"chain"},[t._v(t._s(t.getChainName(a.fromChain)))])]),e("div",{staticClass:"item-right"},[e("div",{staticClass:"status success-status"},[e("i",{staticClass:"el-icon-check"}),t._v(" "+t._s(t.getStatusText(a.status))+" ")]),e("div",{staticClass:"time"},[t._v(t._s(t.formatTime(a.createTime)))])])]),e("div",{staticClass:"item-footer"},[e("div",{staticClass:"footer-left"},[e("span",{staticClass:"address"},[t._v(t._s(t.formatAddress(a.address)))]),a.txHash?e("span",{staticClass:"tx-hash"},[e("i",{staticClass:"el-icon-link"}),t._v(" "+t._s(t.formatAddress(a.txHash))+" ")]):t._e()]),e("i",{staticClass:"el-icon-arrow-right"})])])}),0===t.successRecharges.length?e("div",{staticClass:"empty-state"},[e("i",{staticClass:"el-icon-document"}),e("p",[t._v("暂无充值成功的记录")])]):t._e()],2)])]),e("el-tab-pane",{attrs:{label:"充值失败",name:"failed"}},[e("div",{staticClass:"tab-content"},[e("div",{staticClass:"list-header"},[e("span",{staticClass:"list-title"},[t._v("充值失败 ("+t._s(t.failedRecharges.length)+")")]),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.refreshData}},[e("i",{staticClass:"el-icon-refresh"}),t._v(" 刷新 ")])],1),e("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"recharge-list"},[t._l(t.failedRecharges,function(a){return e("div",{key:a.id,staticClass:"recharge-item failed",on:{click:function(e){return t.showDetail(a)}}},[e("div",{staticClass:"item-main"},[e("div",{staticClass:"item-left"},[e("div",{staticClass:"amount"},[t._v(" "+t._s(a.amount)+" "+t._s(a.fromSymbol||"USDT")+" ")]),e("div",{staticClass:"chain"},[t._v(t._s(t.getChainName(a.fromChain)))])]),e("div",{staticClass:"item-right"},[e("div",{staticClass:"status failed-status"},[e("i",{staticClass:"el-icon-close"}),t._v(" "+t._s(t.getStatusText(a.status))+" ")]),e("div",{staticClass:"time"},[t._v(t._s(t.formatTime(a.createTime)))])])]),e("div",{staticClass:"item-footer"},[e("div",{staticClass:"footer-left"},[e("span",{staticClass:"address"},[t._v(t._s(t.formatAddress(a.address)))]),a.txHash?e("span",{staticClass:"tx-hash"},[e("i",{staticClass:"el-icon-link"}),t._v(" "+t._s(t.formatAddress(a.txHash))+" ")]):t._e()]),e("i",{staticClass:"el-icon-arrow-right"})])])}),0===t.failedRecharges.length?e("div",{staticClass:"empty-state"},[e("i",{staticClass:"el-icon-document"}),e("p",[t._v("暂无充值失败的记录")])]):t._e()],2)])])],1),e("el-row",[e("el-col",{staticStyle:{display:"flex","justify-content":"center"},attrs:{span:24}},[e("el-pagination",{staticStyle:{margin:"0 auto","margin-top":"10px"},attrs:{"current-page":t.currentPage,"page-sizes":t.pageSizes,"page-size":t.pagination.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange,"update:currentPage":function(e){t.currentPage=e},"update:current-page":function(e){t.currentPage=e}}})],1)],1)],1),e("el-dialog",{attrs:{title:"充值详情",visible:t.detailDialogVisible,width:"600px"},on:{"update:visible":function(e){t.detailDialogVisible=e},close:t.closeDetail}},[t.selectedItem?e("div",{staticClass:"detail-content"},[e("div",{staticClass:"detail-section"},[e("h3",{staticClass:"section-title"},[t._v("基本信息")]),e("div",{staticClass:"detail-list"},[e("div",{staticClass:"detail-row"},[e("span",{staticClass:"detail-label"},[t._v("充值ID")]),e("span",{staticClass:"detail-value"},[t._v(t._s(t.selectedItem.id))])]),e("div",{staticClass:"detail-row"},[e("span",{staticClass:"detail-label"},[t._v("充值金额")]),e("span",{staticClass:"detail-value amount"},[t._v(t._s(t.selectedItem.amount)+" "+t._s(t.selectedItem.fromSymbol||"USDT"))])]),e("div",{staticClass:"detail-row"},[e("span",{staticClass:"detail-label"},[t._v("区块链网络")]),e("span",{staticClass:"detail-value"},[t._v(t._s(t.getChainName(t.selectedItem.fromChain)))])]),e("div",{staticClass:"detail-row"},[e("span",{staticClass:"detail-label"},[t._v("充值状态")]),e("span",{staticClass:"detail-value"},[e("el-tag",{attrs:{type:t.getStatusType(t.selectedItem.status)}},[t._v(" "+t._s(t.getStatusText(t.selectedItem.status))+" ")])],1)])])]),e("div",{staticClass:"detail-section"},[e("h3",{staticClass:"section-title"},[t._v("地址信息")]),e("div",{staticClass:"detail-list"},[e("div",{staticClass:"detail-row"},[e("span",{staticClass:"detail-label"},[t._v("充值地址")]),e("div",{staticClass:"address-container"},[e("span",{staticClass:"detail-value address"},[t._v(t._s(t.selectedItem.address))]),e("el-button",{attrs:{type:"text",size:"small"},on:{click:function(e){return t.copyAddress(t.selectedItem.address)}}},[t._v(" 复制 ")])],1)]),t.selectedItem.txHash?e("div",{staticClass:"detail-row"},[e("span",{staticClass:"detail-label"},[t._v("交易哈希")]),e("div",{staticClass:"address-container"},[e("span",{staticClass:"detail-value address"},[t._v(t._s(t.selectedItem.txHash))]),e("el-button",{attrs:{type:"text",size:"small"},on:{click:function(e){return t.copyAddress(t.selectedItem.txHash)}}},[t._v(" 复制 ")])],1)]):t._e()])]),e("div",{staticClass:"detail-section"},[e("h3",{staticClass:"section-title"},[t._v("时间信息")]),e("div",{staticClass:"detail-list"},[e("div",{staticClass:"detail-row"},[e("span",{staticClass:"detail-label"},[t._v("充值时间")]),e("span",{staticClass:"detail-value"},[t._v(t._s(t.formatFullTime(t.selectedItem.createTime)))])])])])]):t._e(),e("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:t.closeDetail}},[t._v("关闭")])],1)])],1)},e.Yp=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"page-header"},[e("h1",{staticClass:"page-title"},[t._v("充值记录")]),e("p",{staticClass:"page-subtitle"},[t._v("查看您的充值申请和到账状态")])])}]},2570:function(t,e,a){Object.defineProperty(e,"B",{value:!0}),e.A=void 0,a(4114),a(8111),a(2489),a(1701);var i=a(5705),s=a(9252),o=a(6299),r=a(6966);e.A={name:"AccountMyShops",data(){return{loaded:!1,defaultCover:"https://dummyimage.com/120x120/eee/999.png&text=Shop",shop:{id:0,name:"",image:"",description:"",feeRate:"",del:!0,state:0},visibleEdit:!1,editForm:{id:"",name:"",image:"",description:"",feeRate:""},shopConfigs:[],visibleConfigEdit:!1,configForm:{id:"",chainLabel:"",chainValue:"",payAddress:"",payCoins:[],payCoin:"",googleCode:""},productOptions:[],coinOptions:s.coinList||[],editCoinOptionsApi:[],chainOptions:[{label:"Tron (TRC20)",value:"tron"},{label:"Ethereum (ERC20)",value:"ethereum"},{label:"BSC (BEP20)",value:"bsc"},{label:"Nexa",value:"nexa"}],shopLoading:!1,withdrawDialogVisible:!1,withdrawLoading:!1,currentWithdrawRow:{},withdrawForm:{amount:"",toAddress:"",fee:"0.00",googleCode:""},withdrawAddressEditable:!1,withdrawRules:{}}},computed:{shopStateText(){return 0===this.shop.state?"待审核":1===this.shop.state?"店铺开启":2===this.shop.state?"店铺关闭":"未知状态"},shopStateTagType(){return 0===this.shop.state?"warning":1===this.shop.state?"success":(this.shop.state,"info")},hasShop(){return!!(this.shop&&Number(this.shop.id)>0)},canCreateShop(){return!this.hasShop},editCoinOptions(){return Array.isArray(this.editCoinOptionsApi)&&this.editCoinOptionsApi.length?this.editCoinOptionsApi:this.coinOptions},selectedCoinLabels(){const t=new Map((this.editCoinOptions||[]).map(t=>[String(t.value),String(t.label).toUpperCase()]));return(this.configForm.payCoins||[]).map(e=>t.get(String(e))||String(e).toUpperCase())},withdrawDialogTitle(){const t=String(this.currentWithdrawRow&&this.currentWithdrawRow.payCoin||"").toUpperCase()||"USDT";return`${t}提现`},displayWithdrawSymbol(){return String(this.currentWithdrawRow&&this.currentWithdrawRow.payCoin||"").toUpperCase()},availableWithdrawBalance(){const t=Number(this.currentWithdrawRow&&this.currentWithdrawRow.balance||0);return this.formatDec6(t)},actualAmount(){const t=this.toScaledInt(this.withdrawForm.amount),e=this.toScaledInt(this.withdrawForm.fee);if(!Number.isFinite(t)||!Number.isFinite(e))return"0";const a=t-e;return a>0?this.formatDec6FromInt(a):"0"}},created(){this.fetchMyShop()},methods:{formatBalance(t){try{const e=Number(t&&t.balance),a=Number.isFinite(e),i=String(t&&t.payCoin?t.payCoin:"").toUpperCase();if(!a)return"-";const s=String(e);return i?`${s} ${i}`:s}catch(e){return"-"}},formatAmount(t){try{const e=Number(t&&t.balance);return Number.isFinite(e)?String(e):"-"}catch(e){return"-"}},formatCoin(t){return String(t&&t.payCoin?t.payCoin:"").toUpperCase()},async handleWithdraw(t){this.currentWithdrawRow=t||{};const e=Number(t&&(null!=t.serviceCharge?t.serviceCharge:t.charge));this.withdrawForm.fee=Number.isFinite(e)?this.formatDec6(e):"0.00",this.withdrawForm.amount="",this.withdrawForm.toAddress=t&&t.payAddress?t.payAddress:"",this.withdrawForm.googleCode="",this.withdrawAddressEditable=!1,this.withdrawRules={amount:[{required:!0,message:"请输入提现金额",trigger:"blur"},{validator:this.validateWithdrawAmount,trigger:"blur"}],googleCode:[{required:!0,message:"请输入谷歌验证码",trigger:"blur"},{validator:this.validateGoogleCode,trigger:"blur"}]},this.withdrawDialogVisible=!0},handleEditAddressClick(){this.withdrawAddressEditable=!0,this.$nextTick(()=>{const t=this.$refs.withdrawToAddressInput;t&&t.focus&&t.focus()})},handleAmountInput(t){let e=String(t||"");e=e.replace(/[^0-9.]/g,"");const a=e.indexOf(".");if(-1!==a){e=e.slice(0,a+1)+e.slice(a+1).replace(/\./g,"");const[t,i=""]=e.split(".");e=t+"."+i.slice(0,6)}this.withdrawForm.amount=e},handleGoogleCodeInput(t){this.withdrawForm.googleCode=String(t||"").replace(/\D/g,"")},confirmWithdraw(){this.$refs.withdrawForm.validate(async t=>{if(t){this.withdrawLoading=!0;try{const t=this.currentWithdrawRow||{},e=String(this.withdrawForm.toAddress||"").trim(),a=String(t.payAddress||this.withdrawForm.toAddress||"").trim();let i=e;if(i){const t=(0,r.rsaEncryptSync)(i);if(t)i=t;else{const t=await(0,r.rsaEncrypt)(i);if(!t)return void this.$message.error("钱包地址加密失败,请重试");i=t}}let s=a;if(s){const t=(0,r.rsaEncryptSync)(s);if(t)s=t;else{const t=await(0,r.rsaEncrypt)(s);if(!t)return void this.$message.error("钱包地址加密失败,请重试");s=t}}const n={toChain:t.chain,toSymbol:t.payCoin,amount:Number(this.withdrawForm.amount),toAddress:i,fromAddress:s,code:this.withdrawForm.googleCode,serviceCharge:Number(this.withdrawForm.fee)||0},l=await(0,o.withdrawBalanceForSeller)(n);!l||0!==l.code&&200!==l.code||(this.$message.success("提现申请已提交,请等待处理"),this.withdrawDialogVisible=!1,this.fetchShopConfigs(this.shop.id))}catch(e){console.error("卖家提现失败",e)}finally{this.withdrawLoading=!1}}})},formatDec6(t){if(null===t||void 0===t||""===t)return"0";let e=String(t);if(/e/i.test(e)){const a=Number(t);if(!Number.isFinite(a))return"0";e=a.toFixed(20).replace(/\.0+$/,"").replace(/(\.\d*?)0+$/,"$1")}const a=e.match(/^(-?)(\d+)(?:\.(\d+))?$/);if(!a)return e;let i=a[2],s=a[3]||"";return s.length>6&&(s=s.slice(0,6)),s?`${i}.${s}`:i},toScaledInt(t,e=6){if(null===t||void 0===t)return 0;const a=String(t).trim();if(""===a)return 0;const i=new RegExp(`^\\d+(?:\\.(\\d{0,${e}}))?$`),s=a.match(i);if(!s){const t=Number(a);if(!Number.isFinite(t))return 0;const i=Math.pow(10,e);return Math.round(t*i)}const[o,r]=a.split("."),n=(r||"").padEnd(e,"0").slice(0,e),l=Math.pow(10,e);return Number(o)*l+Number(n)},formatDec6FromInt(t){const e=t<0?"-":"",a=Math.abs(t),i=Math.pow(10,6),s=Math.floor(a/i),o=String(a%i).padStart(6,"0"),r=`${e}${s}.${o}`;return r.replace(/\.0+$/,"").replace(/(\.\d*?)0+$/,"$1")},validateWithdrawAmount(t,e,a){const i=this.toScaledInt(e);if(!Number.isFinite(i)||i<=0)return void a(new Error("请输入有效的金额"));const s=this.toScaledInt(this.withdrawForm.fee),o=this.toScaledInt(this.currentWithdrawRow&&this.currentWithdrawRow.balance||0);if(i>o)return void a(new Error("提现金额不能大于可用余额"));if(i<=s)return void a(new Error("提现金额必须大于手续费"));const r=i-s;r<=0?a(new Error("提现金额扣除手续费后必须大于0")):i<1e6?a(new Error("最小提现金额为 1")):a()},validateGoogleCode(t,e,a){const i=String(e||"");/^\d{6}$/.test(i)?a():a(new Error("谷歌验证码必须是6位数字"))},formatFeeRate(t){if(null===t||void 0===t||""===t)return"-";const e=Number(t);if(!Number.isFinite(e))return"-";const a=e.toFixed(6);return a.replace(/\.?0+$/,"")},handleEditFeeRateInput(t){let e=String(t??this.editForm.feeRate??"");e=e.replace(/[^0-9.]/g,"");const a=e.indexOf(".");-1!==a&&(e=e.slice(0,a+1)+e.slice(a+1).replace(/\./g,""));const i=e.endsWith("."),s=e.split(".");let o=s[0]||"",r=s[1]||"";r.length>6&&(r=r.slice(0,6)),o&&"0"!==o&&(o=String(Number(o))),this.editForm.feeRate=i&&-1!==a?`${o||"0"}.`:r?`${o||"0"}.${r}`:o||""},hasEmoji(t){if(!t||"string"!==typeof t)return!1;const e=/[\u{1F300}-\u{1F6FF}\u{1F900}-\u{1F9FF}\u{1FA70}-\u{1FAFF}\u2600-\u27BF]/u;return e.test(t)},resetShopState(){this.shop={id:0,name:"",image:"",description:"",del:!0,state:0},this.shopConfigs=[]},async fetchMyShop(){try{const t=await(0,i.getMyShop)();t&&(0===t.code||200===t.code)&&t.data?(this.shop={id:t.data.id,name:t.data.name,image:t.data.image,description:t.data.description,feeRate:t.data.feeRate,del:!!t.data.del,state:Number(t.data.state||0)},this.fetchShopConfigs(t.data.id)):(this.resetShopState(),t&&t.msg&&console.warn("获取店铺数据失败:",t.msg))}catch(t){console.error("获取店铺信息失败:",t),this.resetShopState()}finally{this.loaded=!0}},async fetchShopConfigs(t){if(!t||t<=0)this.shopConfigs=[];else try{const e=await(0,o.getShopConfigV2)({id:t});e&&(0===e.code||200===e.code)&&Array.isArray(e.data)?this.shopConfigs=e.data:this.shopConfigs=[]}catch(e){console.warn("获取店铺配置失败:",e),this.shopConfigs=[]}},async updateShopConfig(t){const e=await(0,i.updateShopConfig)(t);!e||0!==e.code&&200!==e.code||(this.$message.success("保存成功"),this.visibleConfigEdit=!1,this.fetchShopConfigs(this.shop.id))},async deleteShopConfig(t){const e=await(0,i.deleteShopConfig)(t);!e||0!==e.code&&200!==e.code||(this.$message.success("删除成功"),this.fetchShopConfigs(this.shop.id))},async handleEditConfig(t){try{const e=await(0,i.getChainAndCoin)({id:t.id});if(e&&(0===e.code||200===e.code)&&e.data){const a=e.data||{},i=Array.isArray(a.children)?a.children:[];this.editCoinOptionsApi=i.map(t=>({label:t.label,value:t.value}));const s=i.filter(t=>1===Number(t.hasBind)).map(t=>t.value);this.configForm={id:t.id,chainLabel:a.label||"",chainValue:a.value||"",payAddress:a.address||"",payCoins:s,payCoin:s.join(","),googleCode:""}}else{this.editCoinOptionsApi=[];const e=t.chain||"",a=String(t.payCoin||""),i=a?a.split(","):[];this.configForm={id:t.id,chainLabel:e,chainValue:t.chain||"",payAddress:t.payAddress||"",payCoins:i,payCoin:i.join(","),googleCode:""}}this.visibleConfigEdit=!0}catch(e){this.visibleConfigEdit=!0}},async handleDeleteConfig(t){this.deleteShopConfig({id:t.id})},handleConfigGoogleCodeInput(t){this.configForm.googleCode=String(t||"").replace(/\D/g,"")},handleConfigEditClose(){this.configForm.googleCode=""},async submitConfigEdit(){const t=(this.configForm.payAddress||"").trim();if(!t)return void this.$message.warning("请输入钱包地址");const e=String(this.configForm.googleCode||"").trim();if(!e)return void this.$message.warning("请输入谷歌验证码");if(!/^\d{6}$/.test(e))return void this.$message.warning("谷歌验证码必须是6位数字");let a=t;if(a){const t=(0,r.rsaEncryptSync)(a);if(t)a=t;else{const t=await(0,r.rsaEncrypt)(a);if(!t)return void this.$message.error("钱包地址加密失败,请重试");a=t}}const i={id:this.configForm.id,chain:this.configForm.chainValue||this.configForm.chainLabel||"",payAddress:a,gcode:e};try{const t=await(0,o.updateShopConfigV2)(i);!t||0!==t.code&&200!==t.code||(this.$message.success("保存成功"),this.visibleConfigEdit=!1,this.fetchShopConfigs(this.shop.id))}catch(s){console.error("修改配置失败",s)}},removeSelectedCoin(t){const e=String(t||"").toLowerCase(),a=new Map((this.editCoinOptions||[]).map(t=>[String(t.label).toLowerCase(),String(t.value)])),i=a.get(e);i&&(this.configForm.payCoins=(this.configForm.payCoins||[]).filter(t=>String(t)!==String(i)))},async handleOpenEdit(){try{this.visibleEdit=!0;const t=await(0,i.queryShop)({id:this.shop.id});t&&(0===t.code||200===t.code)&&t.data?this.editForm={id:t.data.id,name:t.data.name,image:t.data.image,description:t.data.description,feeRate:t.data.feeRate}:(this.editForm={id:this.shop.id,name:this.shop.name,image:this.shop.image,description:this.shop.description,feeRate:this.shop.feeRate},this.$message.warning(t&&t.msg?t.msg:"未获取到店铺详情"))}catch(t){this.editForm={id:this.shop.id,name:this.shop.name,image:this.shop.image,description:this.shop.description,feeRate:this.shop.feeRate},console.error("查询店铺详情失败:",t)}},async submitEdit(){try{const{name:t,image:e,description:a}=this.editForm,s=t=>"string"===typeof t&&t.length>0&&0===t.trim().length;if(s(t))return void this.$message.error("店铺名称不能全是空格");if(!t)return void this.$message.error("店铺名称不能为空");if(this.hasEmoji(t))return void this.$message.warning("店铺名称不能包含表情符号");if(s(e))return void this.$message.error("店铺封面不能全是空格");if(s(a))return void this.$message.error("店铺描述不能全是空格");if(t&&t.length>30)return void this.$message.warning("店铺名称不能超过30个字符");if(a&&a.length>300)return void this.$message.warning("店铺描述不能超过300个字符");const o=String(this.editForm.feeRate||"").trim();if(!o)return void this.$message.warning("请填写店铺手续费比例(0.01 - 0.1,最多6位小数)");const r=Number(o),n=!o.includes(".")||(o.split(".")[1]||"").length<=6;if(!Number.isFinite(r)||r<.01||r>.1||!n)return void this.$message.warning("手续费比例需在 0.01 - 0.1 之间,且小数位不超过6位");this.editForm.feeRate=r.toString();const l={...this.editForm},c=await(0,i.updateShop)(l);!c||0!==c.code&&200!==c.code?this.$message({message:c.msg||"保存失败",type:"error",showClose:!0}):(this.$message({message:"已保存",type:"success",showClose:!0}),this.visibleEdit=!1,this.fetchMyShop())}catch(t){console.error("更新店铺失败:",t),console.log("更新店铺失败,请稍后重试")}},async handleDelete(){try{await this.$confirm("确定删除该店铺吗?此操作不可恢复","提示",{type:"warning"});const t=await(0,i.deleteShop)(this.shop.id);!t||0!==t.code&&200!==t.code||(this.$message({message:"删除成功",type:"success",showClose:!0}),this.resetShopState(),this.loaded=!1,setTimeout(()=>{this.fetchMyShop()},500))}catch(t){}},async handleToggleShop(){try{const t=2===this.shop.state,e=t?"确定开启店铺吗?":"确定关闭该店铺吗?关闭后用户将无法访问";await this.$confirm(e,"提示",{type:"warning"});const a=await(0,i.closeShop)(this.shop.id);!a||0!==a.code&&200!==a.code?console.log("操作失败"):(this.$message({message:t?"店铺已开启":"店铺已关闭",type:"success",showClose:!0}),this.fetchMyShop())}catch(t){}},handleGoNew(){this.canCreateShop?this.$router.push("/account/shop-new"):this.$message({message:"每个用户仅允许一个店铺,无法新建",type:"warning",showClose:!0})},handleAddProduct(){this.hasShop?this.$router.push({path:"/account/product-machine-add",query:{shopId:this.shop.id}}):this.$message({message:"请先创建店铺",type:"warning",showClose:!0})},handleWalletBind(){this.hasShop?this.$router.push("/account/shop-config"):this.$message({message:"请先创建店铺",type:"warning",showClose:!0})}}}},2710:function(t,e){e.Yp=e.XX=void 0;e.XX=function(){var t=this,e=t._self._c;return e("div",{staticClass:"panel"},[e("h2",{staticClass:"panel-title"},[t._v("新增店铺")]),e("div",{staticClass:"panel-body"},[e("div",{staticClass:"row"},[e("label",{staticClass:"label required"},[t._v("店铺名称")]),e("el-input",{attrs:{placeholder:"请输入店铺名称",maxlength:30,"show-word-limit":""},model:{value:t.form.name,callback:function(e){t.$set(t.form,"name",e)},expression:"form.name"}})],1),e("div",{staticClass:"row"},[e("label",{staticClass:"label"},[t._v("店铺描述")]),e("div",{staticClass:"textarea-wrapper"},[e("el-input",{attrs:{type:"textarea",rows:4,maxlength:300,placeholder:"请输入店铺描述","show-word-limit":""},on:{input:t.handleDescriptionInput},model:{value:t.form.description,callback:function(e){t.$set(t.form,"description",e)},expression:"form.description"}})],1)]),e("div",{staticClass:"row"},[e("label",{staticClass:"label required"},[t._v("手续费比例")]),e("el-input",{attrs:{placeholder:"比例区间 0.01 - 0.1 之间,最多6位小数"},on:{input:t.handleFeeRateInput},model:{value:t.form.feeRate,callback:function(e){t.$set(t.form,"feeRate",e)},expression:"form.feeRate"}})],1),t._m(0),e("div",{staticClass:"row",staticStyle:{"margin-top":"50px"}},[e("div",{staticClass:"actions-center"},[e("el-button",{staticClass:"btn-wide",attrs:{type:"primary"},on:{click:t.handleCreate}},[t._v("创建店铺")])],1)])])])},e.Yp=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"row",staticStyle:{"margin-top":"-6px"}},[e("div"),e("div",{staticStyle:{color:"#909399","font-size":"12px","text-align":"left"}},[t._v(" 为提升您的店铺曝光,您可为平台交易设置手续费比例,该手续费为商家向平台支付的交易佣金,手续费比例将作为影响店铺排名的关键因素,该比例越高,您的店铺排名就越靠前。 ")])])}]},2935:function(t,e,a){Object.defineProperty(e,"B",{value:!0}),e.A=void 0,a(4114);a(4180);var i=a(4981);e.A={name:"OrderList",props:{items:{type:Array,default:()=>[]},emptyText:{type:String,default:"暂无数据"},showCheckout:{type:Boolean,default:!1},onCancel:{type:Function,default:null},isSeller:{type:Boolean,default:!1}},data(){return{payLoading:!1,orderDialog:{visible:!1,qrContent:"",coin:"",amount:"",address:""},dialogVisible:!1,paymentDialog:{totalPrice:"",payAmount:"",noPayAmount:"",img:""}}},computed:{safeItems(){return Array.isArray(this.items)?this.items:[]}},methods:{formatAmount(t,e){return(0,i.truncateAmountByCoin)(t,e)},buildQrSrc(t){if(!t)return"";try{const e=String(t).trim();return e.startsWith("data:")?e:`data:image/png;base64,${e}`}catch(e){return""}},formatDateTime(t){if(!t)return"—";try{const e=String(t);return e.includes("T")?e.replace("T"," "):e}catch(e){return String(t)}},formatMachineType(t){if(null===t||void 0===t)return"—";const e=Number(t);return 0===e?"ASIC":1===e?"GPU":"—"},async handleCheckout(t){if(t)try{this.payLoading=!0,this.paymentDialog={totalPrice:t.totalPrice,payAmount:t.payAmount,noPayAmount:t.noPayAmount,img:t.img},this.paymentDialog.img?(this.paymentDialog.img=this.buildQrSrc(this.paymentDialog.img),this.dialogVisible=!0):this.$message({message:"未返回支付二维码",type:"error",showClose:!0})}catch(e){console.log(e,"创建支付订单失败")}finally{this.payLoading=!1}},handleGoDetail(t){const e=t&&(null!=t.id?t.id:t.orderId);if(null!=e)try{const t=this.isSeller?"seller":"buyer";try{sessionStorage.setItem("orderDetailFrom",t)}catch(a){console.warn("保存订单来源失败",a)}this.$router.push({path:`/account/order-detail/${e}`,query:{from:t}})}catch(a){this.$message({message:"无法跳转到详情页",type:"error",showClose:!0})}else this.$message({message:"订单ID缺失",type:"error",showClose:!0})},handleCancel(t){if(!t||!this.onCancel)return;const e=t.id;null!=e?this.$confirm("确认取消该订单吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{try{this.onCancel({orderId:e})}catch(t){}}).catch(()=>null):this.$message({message:"订单ID缺失",type:"error",showClose:!0})},shouldShowActions(t){if(console.log(t,"飞机飞机覅附件s"),!this.showCheckout)return!1;const e=Number(t&&t.status);return console.log(e,"飞机飞机覅附件s"),0===e||6===e||10===e}}}},3110:function(t,e,a){a.r(e),a.d(e,{__esModule:function(){return s.B},default:function(){return l}});var i=a(1831),s=a(1373),o=s.A,r=a(845),n=(0,r.A)(o,i.XX,i.Yp,!1,null,"0cdcb380",null),l=n.exports},3259:function(t,e){e.Yp=e.XX=void 0;e.XX=function(){var t=this,e=t._self._c;return e("div",{staticClass:"account-products"},[e("div",{staticClass:"toolbar"},[t._m(0),e("div",{staticClass:"right-area"},[e("el-select",{staticClass:"mr-12",staticStyle:{width:"140px"},attrs:{placeholder:"矿机种类",size:"small"},on:{change:t.handleTypeChange},model:{value:t.listParams.type,callback:function(e){t.$set(t.listParams,"type",e)},expression:"listParams.type"}},[e("el-option",{attrs:{label:"ASIC",value:0}}),e("el-option",{attrs:{label:"GPU",value:1}})],1),e("el-input",{staticClass:"mr-12",staticStyle:{width:"280px"},attrs:{placeholder:t.searchPlaceholder,size:"small",clearable:""},on:{clear:t.handleClear},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleSearch.apply(null,arguments)}},model:{value:t.searchKeyword,callback:function(e){t.searchKeyword=e},expression:"searchKeyword"}}),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.handleSearch}},[t._v("搜索")]),e("el-button",{staticClass:"ml-8",attrs:{size:"small"},on:{click:t.handleReset}},[t._v("重置")])],1)]),t.payTypes&&t.payTypes.length?e("div",{staticClass:"paytypes-bar"},[e("span",{staticClass:"pt-label"},[t._v("支持结算方式:")]),e("div",{staticClass:"pt-icons"},t._l(t.payTypes,function(a,i){return e("el-tooltip",{key:i,attrs:{content:t.formatPayTypeHead(a),placement:"top","open-delay":80}},[e("img",{staticClass:"paytype-icon",attrs:{src:t.getPayImage(a),alt:t.formatPayTypeHead(a)}})])}),1)]):t._e(),0===t.listParams.type&&t.payTypes&&t.payTypes.length?e("div",{staticClass:"price-select-bar",staticStyle:{margin:"8px 0 4px",display:"flex","justify-content":"flex-end","align-items":"center"}},[e("span",{staticStyle:{"margin-right":"8px",color:"#606266","font-size":"14px"}},[t._v("筛选售价:")]),e("el-select",{staticStyle:{width:"220px"},attrs:{size:"small",placeholder:"选择价格展示币种"},on:{change:t.handlePayTypeChange},model:{value:t.selectedPayKey,callback:function(e){t.selectedPayKey=e},expression:"selectedPayKey"}},[e("template",{slot:"prefix"},[t.getSelectedPayImage()?e("img",{staticClass:"paytype-icon",staticStyle:{width:"16px",height:"16px","border-radius":"3px","margin-right":"6px"},attrs:{src:t.getSelectedPayImage()}}):t._e()]),t._l(t.payTypes,function(a,i){return e("el-option",{key:"pt-opt-top-"+i,attrs:{label:t.formatPayTypeHead(a),value:t.buildPayKey(a)}},[e("span",{staticStyle:{display:"inline-flex","align-items":"center",gap:"6px"}},[e("img",{staticClass:"paytype-icon",attrs:{src:t.getPayImage(a)}}),e("span",[t._v(t._s(t.formatPayTypeHead(a)))])])])})],2)],1):t._e(),0===t.listParams.type?e("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],key:"asic-table",staticStyle:{width:"100%"},attrs:{data:t.shopMachineList||[],border:"",stripe:""}},[e("el-table-column",{attrs:{label:"矿机类型",width:"100"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-tag",{attrs:{type:0==a.row.type?"warning":"success"}},[t._v(" "+t._s(0==a.row.type?"ASIC":"GPU")+" ")])]}}],null,!1,1255276155)}),e("el-table-column",{attrs:{label:"币种","min-width":"140","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(a){return[e("div",{staticClass:"ellipsis-cell"},[t._v(t._s(t.getRowCoinText(a.row)))])]}}],null,!1,3296547820)}),e("el-table-column",{attrs:{label:"算法","min-width":"160","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(a){return[e("div",{staticClass:"ellipsis-cell"},[t._v(t._s(t.getRowAlgorithmText(a.row)))])]}}],null,!1,1057179176)}),e("el-table-column",{attrs:{prop:"name",label:"矿机型号"}}),e("el-table-column",{attrs:{label:"理论算力","min-width":"170","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(a){return[e("div",{staticClass:"ellipsis-cell"},[t._v(t._s(t.getTheoryText(a.row)))])]}}],null,!1,4122576080)}),e("el-table-column",{attrs:{label:"功耗(kw/h)"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(t.getPowerDissText(a.row)))])]}}],null,!1,2386465872)}),e("el-table-column",{attrs:{prop:"saleNumbers",label:"总机器数量"}}),e("el-table-column",{attrs:{prop:"saleOutNumbers",label:"已售数量"}}),e("el-table-column",{attrs:{prop:"maxLeaseDays",label:"最大租赁天数"}}),e("el-table-column",{scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",{staticClass:"price-strong"},[t._v(t._s(t.getRowPriceText(a.row)))])]}}],null,!1,1822165360)},[e("template",{slot:"header"},[e("div",{staticStyle:{display:"flex","align-items":"center",gap:"8px"}},[e("span",[t._v("售价")])])])],2),e("el-table-column",{attrs:{label:"状态",width:"80"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-tag",{attrs:{type:0===a.row.state?"success":"info"}},[t._v(" "+t._s(0===a.row.state?"上架":"下架")+" ")])]}}],null,!1,4131197732)}),e("el-table-column",{attrs:{label:"操作",fixed:"right",width:"140"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-button",{attrs:{type:"text",size:"small"},on:{click:function(e){return t.handleEdit(a.row)}}},[t._v("修改")]),e("el-button",{staticStyle:{color:"#f56c6c"},attrs:{type:"text",size:"small"},on:{click:function(e){return t.handleDelete(a.row)}}},[t._v("删除")])]}}],null,!1,198470154)})],1):e("el-table",{key:"gpu-table-"+String(t.listParams.type),staticStyle:{width:"100%"},attrs:{data:t.shopMachineList||[],border:"",stripe:""}},[e("el-table-column",{attrs:{label:"矿机类型",width:"100"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-tag",{attrs:{type:1==a.row.type?"success":"warning"}},[t._v(" "+t._s(1==a.row.type?"GPU":"ASIC")+" ")])]}}])}),e("el-table-column",{attrs:{prop:"miner",label:"矿机编号"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.miner||"-"))])]}}])}),e("el-table-column",{attrs:{prop:"name",label:"显卡型号"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.name||"-"))])]}}])}),e("el-table-column",{attrs:{label:"状态",width:"180"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("div",{staticClass:"gpu-state"},[e("el-switch",{attrs:{"active-value":0,"inactive-value":1,value:null!=(t.updateMap[t.getRowId(a.row)]&&t.updateMap[t.getRowId(a.row)].state)?t.updateMap[t.getRowId(a.row)].state:1},on:{change:function(e){return t.handleToggleState(a.row,e)}}}),e("span",{staticClass:"gpu-state-text",class:{on:0===(t.updateMap[t.getRowId(a.row)]&&t.updateMap[t.getRowId(a.row)].state)}},[t._v(" "+t._s(0===(t.updateMap[t.getRowId(a.row)]&&t.updateMap[t.getRowId(a.row)].state)?"上架":"下架")+" ")])],1)]}}])}),e("el-table-column",{attrs:{label:"售价","min-width":"300"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("div",{staticClass:"gpu-price-row"},t._l(t.payTypes,function(i,s){return e("div",{key:s,staticClass:"gpu-price-item"},[e("span",{staticClass:"gpu-price-label"},[t._v(t._s(t.formatPayTypeHead(i)))]),e("el-input",{staticClass:"gpu-price-input",attrs:{size:"small",value:t.getPriceValue(t.getRowId(a.row),i),placeholder:"价格"},on:{input:function(e){return t.handlePriceInput(a.row,i,e)},blur:function(e){return t.handlePriceBlur(a.row,i)}}})],1)}),0)]}}])}),e("el-table-column",{attrs:{label:"最大租赁天数",width:"160"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-input",{staticStyle:{width:"120px"},attrs:{size:"small",value:String(t.updateMap[t.getRowId(a.row)]&&t.updateMap[t.getRowId(a.row)].maxLeaseDays||""),placeholder:"1-365"},on:{input:function(e){return t.handleMaxLeaseDaysInput(a.row,e)}}})]}}])}),e("el-table-column",{attrs:{label:"操作",fixed:"right",width:"120"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-button",{staticStyle:{color:"#f56c6c"},attrs:{type:"text",size:"small"},on:{click:function(e){return t.handleDelete(a.row)}}},[t._v("删除")])]}}])})],1),0===t.listParams.type?e("div",{staticClass:"pagination"},[e("el-pagination",{attrs:{background:"",layout:"total, sizes, prev, pager, next, jumper",total:t.total,"current-page":t.pagination.pageNum,"page-sizes":[10,20,50,100],"page-size":t.pagination.pageSize},on:{"update:currentPage":function(e){return t.$set(t.pagination,"pageNum",e)},"update:current-page":function(e){return t.$set(t.pagination,"pageNum",e)},"update:pageSize":function(e){return t.$set(t.pagination,"pageSize",e)},"update:page-size":function(e){return t.$set(t.pagination,"pageSize",e)},"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1):e("div",{staticStyle:{"margin-top":"12px",display:"flex","justify-content":"space-between","align-items":"center"}},[e("el-button",{attrs:{type:"primary"},on:{click:t.handleUpdateGpu}},[t._v("更新商品信息")]),e("el-pagination",{attrs:{background:"",layout:"total, sizes, prev, pager, next, jumper",total:t.total,"current-page":t.pagination.pageNum,"page-sizes":[10,20,50,100],"page-size":t.pagination.pageSize},on:{"update:currentPage":function(e){return t.$set(t.pagination,"pageNum",e)},"update:current-page":function(e){return t.$set(t.pagination,"pageNum",e)},"update:pageSize":function(e){return t.$set(t.pagination,"pageSize",e)},"update:page-size":function(e){return t.$set(t.pagination,"pageSize",e)},"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1),e("el-dialog",{attrs:{visible:t.editDialog.visible,"close-on-click-modal":!1,width:"70VW",title:"编辑商品 - "+(t.editDialog.form&&t.editDialog.form.name?t.editDialog.form.name:"")},on:{"update:visible":function(e){return t.$set(t.editDialog,"visible",e)}},scopedSlots:t._u([{key:"footer",fn:function(){return[e("el-button",{on:{click:function(e){t.editDialog.visible=!1}}},[t._v("取消")]),e("el-button",{attrs:{type:"primary",loading:t.editDialog.saving},on:{click:t.handleSaveEdit}},[t._v("确认修改")])]},proxy:!0}])},[t.editDialog.form?e("el-form",{ref:"editForm",staticClass:"edit-form",attrs:{model:t.editDialog.form,"label-width":"160px"}},[e("el-form-item",{attrs:{label:"矿机型号"}},[e("el-input",{attrs:{maxlength:"60"},model:{value:t.editDialog.form.name,callback:function(e){t.$set(t.editDialog.form,"name","string"===typeof e?e.trim():e)},expression:"editDialog.form.name"}})],1),e("el-form-item",{attrs:{label:"币种/算法/算力/单位"}},[e("div",{staticClass:"coin-algo-rows"},t._l(t.editDialog.form.coinAndAlgoList,function(a,i){return e("div",{key:"edit-ca-"+i,staticClass:"coin-algo-line"},[e("el-select",{staticClass:"coin-input",attrs:{placeholder:"请选择币种",loading:t.loadingCoins,filterable:"",clearable:""},on:{change:function(e){return t.editHandleCoinChange(i,e)}},model:{value:a.coin,callback:function(e){t.$set(a,"coin",e)},expression:"row.coin"}},t._l(t.coinOptions,function(t){return e("el-option",{key:t,attrs:{label:t,value:t}})}),1),e("el-select",{staticClass:"algo-input",attrs:{placeholder:"请选择算法",loading:t.loadingAlgos[i],disabled:!a.coin,filterable:"",clearable:""},model:{value:a.algorithm,callback:function(e){t.$set(a,"algorithm",e)},expression:"row.algorithm"}},t._l(t.algoOptionsMap[a.coin]||[],function(t){return e("el-option",{key:t,attrs:{label:t,value:t}})}),1),e("el-input",{staticClass:"power-input",attrs:{placeholder:"理论算力",inputmode:"decimal"},on:{input:function(e){return t.editHandleRowTheoryInput(i)}},model:{value:a.theoryPower,callback:function(e){t.$set(a,"theoryPower",e)},expression:"row.theoryPower"}}),e("el-select",{staticClass:"unit-select",attrs:{placeholder:"单位"},on:{change:function(e){return t.editHandleRowUnitChange(i,e)}},model:{value:a.unit,callback:function(e){t.$set(a,"unit",e)},expression:"row.unit"}},[e("el-option",{attrs:{label:"KH/S",value:"KH/S"}}),e("el-option",{attrs:{label:"MH/S",value:"MH/S"}}),e("el-option",{attrs:{label:"GH/S",value:"GH/S"}}),e("el-option",{attrs:{label:"TH/S",value:"TH/S"}}),e("el-option",{attrs:{label:"PH/S",value:"PH/S"}})],1),e("el-button",{staticClass:"op-btn",attrs:{type:"primary",icon:"el-icon-plus",circle:"","aria-label":"新增一行"},on:{click:t.editHandleAddRow}}),(t.editDialog.form.coinAndAlgoList||[]).length>1?e("el-button",{staticClass:"op-btn",attrs:{icon:"el-icon-minus",circle:"","aria-label":"删除该行"},on:{click:function(e){return t.editHandleRemoveRow(i)}}}):t._e()],1)}),0)]),e("el-form-item",{attrs:{label:"最大租赁天数"}},[e("el-input",{staticStyle:{width:"200px"},attrs:{placeholder:"1-365"},on:{input:function(e){t.editDialog.form.maxLeaseDays=String(t.editDialog.form.maxLeaseDays||"").replace(/[^\d]/g,"")}},model:{value:t.editDialog.form.maxLeaseDays,callback:function(e){t.$set(t.editDialog.form,"maxLeaseDays",e)},expression:"editDialog.form.maxLeaseDays"}})],1),e("el-form-item",{staticClass:"align-like-input",attrs:{label:"状态"}},[e("el-radio-group",{model:{value:t.editDialog.form.state,callback:function(e){t.$set(t.editDialog.form,"state",e)},expression:"editDialog.form.state"}},[e("el-radio",{attrs:{label:0}},[t._v("上架")]),e("el-radio",{attrs:{label:1}},[t._v("下架")])],1)],1),e("el-form-item",{attrs:{label:"功耗(kw/h)"}},[e("el-input",{staticStyle:{width:"200px"},attrs:{placeholder:"功耗"},on:{input:function(e){t.editDialog.form.powerDissipation=String(t.editDialog.form.powerDissipation||"").replace(/[^\\d.]/g,"")}},model:{value:t.editDialog.form.powerDissipation,callback:function(e){t.$set(t.editDialog.form,"powerDissipation",e)},expression:"editDialog.form.powerDissipation"}})],1),e("el-form-item",{attrs:{label:"出售数量(台)"}},[e("el-input",{staticStyle:{width:"200px"},attrs:{placeholder:"整数"},on:{input:function(e){t.editDialog.form.saleNumbers=String(t.editDialog.form.saleNumbers||"").replace(/[^\d]/g,"")}},model:{value:t.editDialog.form.saleNumbers,callback:function(e){t.$set(t.editDialog.form,"saleNumbers",e)},expression:"editDialog.form.saleNumbers"}})],1),e("el-form-item",{attrs:{label:"售价(多币种)"}},[e("div",{staticClass:"gpu-price-row"},t._l(t.editDialog.priceList,function(a,i){return e("div",{key:"ep-"+i,staticClass:"gpu-price-item"},[e("span",{staticClass:"gpu-price-label"},[t._v(t._s(t.formatPayTypeHead(a)))]),e("el-input",{staticClass:"gpu-price-input",attrs:{size:"small",value:a.price,placeholder:"价格"},on:{input:function(e){return t.handleEditPriceInput(i,e)}}})],1)}),0)])],1):t._e()],1)],1)},e.Yp=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"left-area"},[e("h2",{staticClass:"page-title"},[t._v("商品列表")])])}]},3386:function(t,e){e.Yp=e.XX=void 0;e.XX=function(){var t=this,e=t._self._c;return e("div",{staticClass:"funds-page"},[e("h3",{staticClass:"title",staticStyle:{"margin-bottom":"18px","text-align":"left"}},[t._v("资金流水")]),e("div",{staticClass:"tabs-card"},[e("el-tabs",{on:{"tab-click":t.handleTab},model:{value:t.active,callback:function(e){t.active=e},expression:"active"}},[e("el-tab-pane",{attrs:{label:"充值记录",name:"recharge"}},[e("div",{staticClass:"list-wrap"},[e("div",{staticClass:"list-header"},[e("span",{staticClass:"list-title"},[t._v("全部充值 ("+t._s(t.rechargeRows.length)+")")]),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.loadRecharge}},[t._v("刷新")])],1),e("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading.recharge,expression:"loading.recharge"}],staticClass:"record-list"},[t._l(t.rechargeRows,function(a,i){return e("div",{key:t.getRowKey(a,i),staticClass:"record-item",class:t.statusClass(a.status),on:{click:function(e){return t.toggleExpand("recharge",a,i)}}},[e("div",{staticClass:"item-main"},[e("div",{staticClass:"item-left"},[e("div",{staticClass:"amount"},[t.formatAmount(a.amount,a.fromSymbol).truncated?e("el-tooltip",{attrs:{content:`${t.formatAmount(a.amount,a.fromSymbol).full} ${(a.fromSymbol||"USDT").toUpperCase()}`,placement:"top"}},[e("span",[t._v(" + "+t._s(t.formatAmount(a.amount,a.fromSymbol).text)+" "+t._s((a.fromSymbol||"USDT").toUpperCase())+" "),e("i",{staticClass:"el-icon-more amount-more"})])]):e("span",[t._v(" + "+t._s(t.formatAmount(a.amount,a.fromSymbol).text)+" "+t._s((a.fromSymbol||"USDT").toUpperCase())+" ")])],1),e("div",{staticClass:"chain"},[t._v(t._s(t.formatChain(a.fromChain)))])]),e("div",{staticClass:"item-right"},[e("div",{staticClass:"status"},[e("el-tag",{attrs:{type:t.getRechargeStatusType(a.status),size:"small"}},[t._v(t._s(t.getRechargeStatusText(a.status)))])],1),e("div",{staticClass:"time"},[t._v(t._s(t.formatFullTime(a.createTime)))])])]),e("div",{directives:[{name:"show",rawName:"v-show",value:t.isExpanded("recharge",a,i),expression:"isExpanded('recharge', row, idx)"}],staticClass:"expand-panel"},[e("div",{staticClass:"expand-grid"},[e("div",{staticClass:"expand-item"},[e("span",{staticClass:"label"},[t._v("充值地址")]),e("div",{staticClass:"value value-row"},[e("span",{staticClass:"mono-ellipsis",attrs:{title:a.fromAddress}},[t._v(t._s(a.fromAddress))]),e("el-button",{attrs:{type:"text",size:"mini",icon:"el-icon-document-copy"},on:{click:function(e){return e.stopPropagation(),t.handleCopy(a.fromAddress,"充值地址")}}},[t._v("复制")])],1)]),a.txHash?e("div",{staticClass:"expand-item"},[e("span",{staticClass:"label"},[t._v("交易哈希")]),e("div",{staticClass:"value value-row"},[e("span",{staticClass:"mono-ellipsis",attrs:{title:a.txHash}},[t._v(t._s(a.txHash))]),e("el-button",{attrs:{type:"text",size:"mini",icon:"el-icon-document-copy"},on:{click:function(e){return e.stopPropagation(),t.handleCopy(a.txHash,"交易哈希")}}},[t._v("复制")])],1)]):t._e()])])])}),t.rechargeRows.length?t._e():e("div",{staticClass:"empty"},[t._v("暂无充值记录")])],2)])]),e("el-tab-pane",{attrs:{label:"提现记录",name:"withdraw"}},[e("div",{staticClass:"list-wrap"},[e("div",{staticClass:"list-header"},[e("span",{staticClass:"list-title"},[t._v("全部提现 ("+t._s(t.withdrawRows.length)+")")]),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.loadWithdraw}},[t._v("刷新")])],1),e("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading.withdraw,expression:"loading.withdraw"}],staticClass:"record-list"},[t._l(t.withdrawRows,function(a,i){return e("div",{key:t.getRowKey(a,i),staticClass:"record-item",class:t.statusClass(a.status),on:{click:function(e){return t.toggleExpand("withdraw",a,i)}}},[e("div",{staticClass:"item-main"},[e("div",{staticClass:"item-left"},[e("div",{staticClass:"amount"},[t.formatAmount(a.amount,a.toSymbol).truncated?e("el-tooltip",{attrs:{content:`${t.formatAmount(a.amount,a.toSymbol).full} ${(a.toSymbol||"USDT").toUpperCase()}`,placement:"top"}},[e("span",[t._v(" - "+t._s(t.formatAmount(a.amount,a.toSymbol).text)+" "+t._s((a.toSymbol||"USDT").toUpperCase())+" "),e("i",{staticClass:"el-icon-more amount-more"})])]):e("span",[t._v(" - "+t._s(t.formatAmount(a.amount,a.toSymbol).text)+" "+t._s((a.toSymbol||"USDT").toUpperCase())+" ")])],1),e("div",{staticClass:"chain"},[t._v(t._s(t.formatChain(a.toChain)))])]),e("div",{staticClass:"item-right"},[e("div",{staticClass:"status"},[e("el-tag",{attrs:{type:t.getWithdrawStatusType(a.status),size:"small"}},[t._v(t._s(t.getWithdrawStatusText(a.status)))])],1),e("div",{staticClass:"time"},[t._v(t._s(t.formatFullTime(a.createTime)))])])]),e("div",{directives:[{name:"show",rawName:"v-show",value:t.isExpanded("withdraw",a,i),expression:"isExpanded('withdraw', row, idx)"}],staticClass:"expand-panel"},[e("div",{staticClass:"expand-grid"},[e("div",{staticClass:"expand-item"},[e("span",{staticClass:"label"},[t._v("收款地址")]),e("div",{staticClass:"value value-row"},[e("span",{staticClass:"mono-ellipsis",attrs:{title:a.toAddress}},[t._v(t._s(a.toAddress))]),e("el-button",{attrs:{type:"text",size:"mini",icon:"el-icon-document-copy"},on:{click:function(e){return e.stopPropagation(),t.handleCopy(a.toAddress,"收款地址")}}},[t._v("复制")])],1)]),a.txHash?e("div",{staticClass:"expand-item"},[e("span",{staticClass:"label"},[t._v("交易哈希")]),e("div",{staticClass:"value value-row"},[e("span",{staticClass:"mono-ellipsis",attrs:{title:a.txHash}},[t._v(t._s(a.txHash))]),e("el-button",{attrs:{type:"text",size:"mini",icon:"el-icon-document-copy"},on:{click:function(e){return e.stopPropagation(),t.handleCopy(a.txHash,"交易哈希")}}},[t._v("复制")])],1)]):t._e()])])])}),t.withdrawRows.length?t._e():e("div",{staticClass:"empty"},[t._v("暂无提现记录")])],2)])]),e("el-tab-pane",{attrs:{label:"消费记录",name:"consume"}},[e("div",{staticClass:"list-wrap"},[e("div",{staticClass:"list-header"},[e("span",{staticClass:"list-title"},[t._v("全部消费 ("+t._s(t.consumeRows.length)+")")]),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.loadConsume}},[t._v("刷新")])],1),e("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading.consume,expression:"loading.consume"}],staticClass:"record-list"},[t._l(t.consumeRows,function(a,i){return e("div",{key:t.getRowKey(a,i),staticClass:"record-item",class:t.statusClass(a.status),on:{click:function(e){return t.toggleExpand("consume",a,i)}}},[e("div",{staticClass:"item-main"},[e("div",{staticClass:"item-left"},[e("div",{staticClass:"amount"},[t.formatAmount(a.realAmount,a.fromSymbol).truncated?e("el-tooltip",{attrs:{content:`${t.formatAmount(a.realAmount,a.fromSymbol).full} ${(a.fromSymbol||"USDT").toUpperCase()}`,placement:"top"}},[e("span",[t._v(" - "+t._s(t.formatAmount(a.realAmount,a.fromSymbol).text)+" "+t._s((a.fromSymbol||"USDT").toUpperCase())+" "),e("i",{staticClass:"el-icon-more amount-more"})])]):e("span",[t._v(" - "+t._s(t.formatAmount(a.realAmount,a.fromSymbol).text)+" "+t._s((a.fromSymbol||"USDT").toUpperCase())+" ")])],1),e("div",{staticClass:"chain"},[t._v(t._s(t.formatChain(a.fromChain)))])]),e("div",{staticClass:"item-right"},[e("div",{staticClass:"status"},[e("el-tag",{attrs:{type:t.getPayStatusType(a.status),size:"small"}},[t._v(t._s(t.getPayStatusText(a.status)))])],1),e("div",{staticClass:"time"},[t._v(t._s(t.formatFullTime(a.createTime||a.time)))])])]),e("div",{directives:[{name:"show",rawName:"v-show",value:t.isExpanded("consume",a,i),expression:"isExpanded('consume', row, idx)"}],staticClass:"expand-panel"},[e("div",{staticClass:"expand-grid"},[e("div",{staticClass:"expand-item"},[e("span",{staticClass:"label"},[t._v("订单号")]),e("div",{staticClass:"value value-row"},[e("span",{staticClass:"mono-ellipsis",attrs:{title:a.orderId}},[t._v(t._s(a.orderId||""))]),e("el-button",{attrs:{type:"text",size:"mini",icon:"el-icon-document-copy"},on:{click:function(e){return e.stopPropagation(),t.handleCopy(a.orderId,"订单号")}}},[t._v("复制")])],1)]),e("div",{staticClass:"expand-item"},[e("span",{staticClass:"label"},[t._v("支付地址")]),e("div",{staticClass:"value value-row"},[e("span",{staticClass:"mono-ellipsis",attrs:{title:a.fromAddress}},[t._v(t._s(a.fromAddress||""))]),e("el-button",{attrs:{type:"text",size:"mini",icon:"el-icon-document-copy"},on:{click:function(e){return e.stopPropagation(),t.handleCopy(a.fromAddress,"支付地址")}}},[t._v("复制")])],1)]),e("div",{staticClass:"expand-item"},[e("span",{staticClass:"label"},[t._v("收款地址")]),e("div",{staticClass:"value value-row"},[e("span",{staticClass:"mono-ellipsis",attrs:{title:a.toAddress}},[t._v(t._s(a.toAddress||""))]),e("el-button",{attrs:{type:"text",size:"mini",icon:"el-icon-document-copy"},on:{click:function(e){return e.stopPropagation(),t.handleCopy(a.toAddress,"收款地址")}}},[t._v("复制")])],1)]),a.txHash?e("div",{staticClass:"expand-item"},[e("span",{staticClass:"label"},[t._v("交易哈希")]),e("div",{staticClass:"value value-row"},[e("span",{staticClass:"mono-ellipsis",attrs:{title:a.txHash}},[t._v(t._s(a.txHash))]),e("el-button",{attrs:{type:"text",size:"mini",icon:"el-icon-document-copy"},on:{click:function(e){return e.stopPropagation(),t.handleCopy(a.txHash,"交易哈希")}}},[t._v("复制")])],1)]):t._e()])])])}),t.consumeRows.length?t._e():e("div",{staticClass:"empty"},[t._v("暂无消费记录")])],2)])])],1),e("el-row",[e("el-col",{staticStyle:{display:"flex","justify-content":"center"},attrs:{span:24}},[e("el-pagination",{staticStyle:{margin:"0 auto","margin-top":"10px"},attrs:{"current-page":t.currentPage,"page-sizes":t.pageSizes,"page-size":t.pagination.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange,"update:currentPage":function(e){t.currentPage=e},"update:current-page":function(e){t.currentPage=e}}})],1)],1)],1)])},e.Yp=[]},3466:function(t,e,a){var i=a(3999)["default"];Object.defineProperty(e,"B",{value:!0}),e.A=void 0,a(4114),a(8111),a(2489),a(7588),a(1701),a(7642),a(8004),a(3853),a(5876),a(2475),a(5024),a(1698);var s=a(1193),o=a(9662),r=i(a(5720));e.A={name:"AccountProductMachineAdd",data(){return{form:{productId:Number(this.$route.query.productId)||null,coin:this.$route.query.coin||"",productName:this.$route.query.name||"",machineCategory:"ASIC",sellCount:"",coinAndAlgoList:[{coin:"",algorithm:"",theoryPower:"",unit:"TH/S"}],powerDissipation:null,type:"",cost:"",costMap:{},maxLeaseDays:""},confirmVisible:!1,confirmData:{coin:"",algorithm:"",maxLeaseDays:"",saleNumbers:"",priceList:[]},rules:{productName:[{required:!0,message:"商品名称不能为空",trigger:"change"}],type:[{required:!0,message:"矿机型号不能为空",trigger:"blur"},{validator:(t,e,a)=>{const i=String(e||"");i&&0===i.trim().length?a(new Error("矿机型号不能全是空格")):a()},trigger:"blur"}],coinAndAlgoList:[{validator:(t,e,a)=>this.validateCoinAlgoRows(t,e,a),trigger:"blur"}],sellCount:[{validator:(t,e,a)=>{if("ASIC"!==this.form.machineCategory)return void a();const i=String(e??"");if(""===i)return void a(new Error("请输入出售机器数量"));if(!/^\d{1,4}$/.test(i))return void a(new Error("请输入 0-9999 的整数"));const s=Number(i);!Number.isInteger(s)||s<0||s>9999?a(new Error("范围需在 0-9999")):a()},trigger:"blur"}],powerDissipation:[{required:!0,message:"功耗不能为空",trigger:"blur"},{validator:(t,e,a)=>{const i=String(e||"");if(!i)return void a(new Error("功耗不能为空"));const s=/^\d{1,6}(\.\d{1,4})?$/;s.test(i)?Number(i)<=0?a(new Error("功耗必须大于0")):a():a(new Error("功耗整数最多6位,小数最多4位"))},trigger:"blur"}],cost:[{validator(t,e,a){if(Array.isArray(this.payTypeDefs)&&this.payTypeDefs.length>0)return void a();const i=String(e||"");if(!i)return void a(new Error("请填写机器成本(USDT)"));const s=/^\d{1,12}(\.\d{1,2})?$/;s.test(i)?Number(i)<=0?a(new Error("成本必须大于 0")):a():a(new Error("成本整数最多12位,小数最多2位"))},trigger:"blur"}],maxLeaseDays:[{required:!0,message:"请填写最大租赁天数",trigger:"blur"},{validator:(t,e,a)=>{const i=String(e??"");if(!i)return void a(new Error("请填写最大租赁天数"));if(!/^\d{1,3}$/.test(i))return void a(new Error("仅允许整数,范围 1-365"));const s=Number(i);!Number.isInteger(s)||s<1||s>365?a(new Error("范围需在 1-365 天")):a()},trigger:"blur"}]},miners:[],minersLoading:!1,selectedMiner:"",machineOptions:[],machinesLoading:!1,selectedMachines:[],selectedMachineRows:[],saving:!1,lastCostBaseline:0,lastCostMapBaseline:{},lastTypeBaseline:"",lastMaxLeaseDaysBaseline:0,lastPowerDissipationBaseline:0,lastTheoryPowerBaseline:0,lastUnitBaseline:"TH/S",gpuDialogVisible:!1,clientDownloadUrl:{NODE_ENV:"production",VUE_APP_BASE_API:"https://test.m2pool.com/api/",VUE_APP_BASE_URL:"'https://test.m2pool.com/'",VUE_APP_TITLE:"m2pool",BASE_URL:"/"}.VUE_APP_GPU_CLIENT_URL||"",hasDownloadedClient:!1,payTypeDefs:[],coinOptions:[],algoOptionsMap:{},loadingCoins:!1,loadingAlgos:{},params:{cost:353400,powerDissipation:.01,theoryPower:1e3,type:"",unit:"TH/S",productId:1,productMachineURDVos:[{user:"lx_888",miner:"iusfhufhu",price:353400,type:"",state:0},{user:"lx_888",miner:"iusfhufhu2",price:353400,type:"",state:0}]},userEmail:""}},created(){this.initPayTypesFromRoute(),this.lastTypeBaseline=this.form.type,this.rules&&this.rules.cost&&this.$set(this.rules,"cost",[{validator:this.validateCost,trigger:"blur"}]),this.$set(this.rules,"costMap",[{validator:this.validateCostMap,trigger:"blur"}]),this.getPayTypes(),this.loadSupportCoins(),this.userEmail=JSON.parse(localStorage.getItem("leasEmail"))||""},methods:{validateCoinAlgoRows(t,e,a){try{const t=Array.isArray(this.form.coinAndAlgoList)?this.form.coinAndAlgoList:[];if(!t.length)return void a(new Error("请至少添加一行币种/算法/算力/单位"));const e=/^\d{1,6}(\.\d{1,4})?$/;for(let i=0;i"string"===typeof t?t:t.coin||t.name||t).filter(Boolean):e&&"object"===typeof e&&(this.coinOptions=Object.keys(e).map(t=>{const a=e[t];return"string"===typeof a?a:a.coin||a.name||t}).filter(Boolean)),this.coinOptions=[...new Set(this.coinOptions)].sort()}}catch(t){console.error("加载币种列表失败",t)}finally{this.loadingCoins=!1}},async handleCoinChange(t,e){this.$set(this.form.coinAndAlgoList[t],"algorithm",""),e&&await this.loadAlgorithmsForCoin(e,t)},async loadAlgorithmsForCoin(t,e){if(t&&!(this.algoOptionsMap[t]&&this.algoOptionsMap[t].length>0)){this.$set(this.loadingAlgos,e,!0);try{const e=await(0,s.getSupportAlgo)(t);if(e&&(0===e.code||200===e.code)){const a=e.data||[];let i=[];Array.isArray(a)?i=a.map(t=>"string"===typeof t?t:t.algorithm||t.algo||t.name||t).filter(Boolean):a&&"object"===typeof a&&(i=Object.keys(a).map(t=>{const e=a[t];return"string"===typeof e?e:e.algorithm||e.algo||e.name||t}).filter(Boolean)),this.$set(this.algoOptionsMap,t,[...new Set(i)].sort())}}catch(a){console.error(`加载币种 ${t} 的算法列表失败`,a),this.$set(this.algoOptionsMap,t,[])}finally{this.$set(this.loadingAlgos,e,!1)}}},handleCoinRowTheoryInput(t){let e=String(this.form.coinAndAlgoList[t].theoryPower??"");e=e.replace(/[^0-9.]/g,"");const a=e.indexOf(".");-1!==a&&(e=e.slice(0,a+1)+e.slice(a+1).replace(/\./g,""));const i=e.endsWith("."),s=e.split(".");let o=s[0]||"",r=s[1]||"";o.length>6&&(o=o.slice(0,6)),r&&(r=r.slice(0,4)),e=r.length?`${o}.${r}`:i?`${o}.`:o,this.$set(this.form.coinAndAlgoList[t],"theoryPower",e)},handleCoinRowUnitChange(t,e){this.$set(this.form.coinAndAlgoList[t],"unit",e)},handleAddCoinAlgoRow(){if(this.form.coinAndAlgoList.length>=10)return void this.$message.warning("最多添加 10 行");const t=this.form.coinAndAlgoList[this.form.coinAndAlgoList.length-1]||{unit:"TH/S"},e=this.form.coinAndAlgoList.length;this.form.coinAndAlgoList.push({coin:"",algorithm:"",theoryPower:"",unit:t.unit||"TH/S"}),this.$set(this.loadingAlgos,e,!1)},handleRemoveCoinAlgoRow(t){this.form.coinAndAlgoList.length<=1||this.form.coinAndAlgoList.splice(t,1)},buildCoinCsvFromRows(){const t=new Set,e=Array.isArray(this.form.coinAndAlgoList)?this.form.coinAndAlgoList:[];return e.forEach(e=>{const a=String(e.coin||"").split(/[,\s,、]+/).map(t=>t.trim().toUpperCase()).filter(Boolean);a.forEach(e=>t.add(e))}),Array.from(t).join(",")},buildAlgoCsvFromRows(){const t=new Set,e=Array.isArray(this.form.coinAndAlgoList)?this.form.coinAndAlgoList:[];return e.forEach(e=>{const a=String(e.algorithm||"").split(/[,\s,、]+/).map(t=>t.trim().toUpperCase()).filter(Boolean);a.forEach(e=>t.add(e))}),Array.from(t).join(",")},handleCoinsInput(){let t=String(this.form.coinsInput||"");t=t.replace(/[\u4e00-\u9fa5]/g,""),this.form.coinsInput=t},handleAlgorithmsInput(){let t=String(this.form.algorithmsInput||"");t=t.replace(/[\u4e00-\u9fa5]/g,""),this.form.algorithmsInput=t},normalizeCsv(t,e=!0){const a=String(t||"").split(/[,\s,、]+/).map(t=>t.trim()).filter(Boolean),i=e?a.map(t=>t.toUpperCase()):a;return i.join(",")},buildPriceList(){const t=[],e=Array.isArray(this.payTypeDefs)?this.payTypeDefs:[];return e.forEach(e=>{const a=e.key,i=this.form.costMap?this.form.costMap[a]:"",s=Number(i);!Number.isFinite(s)||s<=0||t.push({chain:e.chain,coin:e.coin,price:s})}),t},async getPayTypes(){try{const t=await(0,o.getPayTypes)();if(t&&(0===t.code||200===t.code)){const e=Array.isArray(t.data)?t.data:[],a=[],i=new Set;e.forEach(t=>{const e=String(t&&t.payChain?t.payChain:"").toUpperCase(),s=String(t&&t.payCoin?t.payCoin:"").toUpperCase();if(!e&&!s)return;const o=[e,s].filter(Boolean).join("-");i.has(o)||(i.add(o),a.push({chain:e,coin:s,key:o,label:o,image:t&&t.payCoinImage?String(t.payCoinImage):""}))}),this.payTypeDefs=a;const s={};this.payTypeDefs.forEach(t=>{s[t.key]=this.form.costMap&&this.form.costMap[t.key]||""}),this.form.costMap=s}}catch(t){}},handleSellCountInput(){let t=String(this.form.sellCount??"");if(t=t.replace(/\D/g,""),t.length>4&&(t=t.slice(0,4)),t){const e=Number(t);e>9999&&(t="9999")}this.form.sellCount=t},handleSellCountBlur(){const t=String(this.form.sellCount??"");if(""===t)return;const e=Number(t);(!Number.isInteger(e)||e<0||e>9999)&&(this.$message.warning("出售机器数量需为 0-9999 的整数"),this.form.sellCount="")},handleMachineCategoryChange(t){},handleDownloadClient(t){let e="";try{const t=localStorage.getItem("leasEmail");t&&(e=JSON.parse(t))}catch(i){}this.downloadUrl=`${r.default.defaults.baseURL}/lease/user/downloadClient?userEmail=${e||""}&type=${t}`;let a=document.createElement("a");a.href=this.downloadUrl,a.click()},handleGpuClientStarted(){this.$router.push("/account/products")},validateCost(t,e,a){if(Array.isArray(this.payTypeDefs)&&this.payTypeDefs.length>0)return this.validateCostMap(t,e,a);const i=String(e||"");if(!i)return void a(new Error("请填写机器成本(USDT)"));const s=/^\d{1,12}(\.\d{1,2})?$/;s.test(i)?Number(i)<=0?a(new Error("成本必须大于 0")):a():a(new Error("成本整数最多12位,小数最多2位"))},validateCostMap(t,e,a){try{const t=Array.isArray(this.payTypeDefs)?this.payTypeDefs:[];if(!t.length)return void a();const e=/^\d{1,12}(\.\d{1,2})?$/;for(let i=0;i{const e=String(t&&t.chain?t.chain:"").toUpperCase(),i=String(t&&t.coin?t.coin:"").toUpperCase();if(!e&&!i)return;const s=[e,i].filter(Boolean).join("-"),o=s;a.push({chain:e,coin:i,key:s,label:o})});const i=new Map;a.forEach(t=>{i.has(t.key)||i.set(t.key,t)}),this.payTypeDefs=Array.from(i.values());const s={};this.payTypeDefs.forEach(t=>{s[t.key]=""}),this.form.costMap=s,this.lastCostMapBaseline={...s}}catch(t){this.payTypeDefs=[]}},handleBack(){this.$router.back()},handleNumeric(t){let e=String(this.form[t]??"");e=e.replace(/[^0-9.]/g,"");const a=e.indexOf(".");-1!==a&&(e=e.slice(0,a+1)+e.slice(a+1).replace(/\./g,""));const i=e.endsWith(".");if("cost"===t){const t=e.split(".");let a=t[0]||"",s=t[1]||"";a.length>12&&(a=a.slice(0,12)),s&&(s=s.slice(0,2)),e=s.length?`${a}.${s}`:i?`${a}.`:a}else if("powerDissipation"===t||"theoryPower"===t){const t=e.split(".");let a=t[0]||"",s=t[1]||"";a.length>6&&(a=a.slice(0,6)),s&&(s=s.slice(0,4)),e=s.length?`${a}.${s}`:i?`${a}.`:a}else{if("maxLeaseDays"===t)return e=e.replace(/\D/g,""),e.length>3&&(e=e.slice(0,3)),this.form[t]=e,void this.syncMaxLeaseDaysToRows();if(-1!==a){const[t,a]=e.split(".");e=t+"."+(a?a.slice(0,6):"")}}this.form[t]=e},handleCostMapInput(t,e){let a=String(e??this.form.costMap[t]??"");a=a.replace(/[^0-9.]/g,"");const i=a.indexOf(".");-1!==i&&(a=a.slice(0,i+1)+a.slice(i+1).replace(/\./g,""));const s=a.endsWith("."),o=a.split(".");let r=o[0]||"",n=o[1]||"";r.length>12&&(r=r.slice(0,12)),n&&(n=n.slice(0,2)),a=n.length?`${r}.${n}`:s?`${r}.`:r,this.$set(this.form.costMap,t,a)},handleTypeInput(){"string"===typeof this.form.type&&this.form.type.length>20&&(this.form.type=this.form.type.slice(0,20))},syncCostToRows(){const t=Number(this.form.cost);if(!Number.isFinite(t))return;const e=this.lastCostBaseline;this.selectedMachineRows=this.selectedMachineRows.map(a=>{const i=Number(a.price);return Number.isFinite(i)&&i!==e?a:{...a,price:t}}),this.lastCostBaseline=t},updateMachineType(){this.lastTypeBaseline=this.form.type},handleRowPowerDissipationInput(t){let e=String(this.selectedMachineRows[t].powerDissipation??"");e=e.replace(/[^0-9.]/g,"");const a=e.indexOf(".");-1!==a&&(e=e.slice(0,a+1)+e.slice(a+1).replace(/\./g,""));const i=e.endsWith("."),s=e.split(".");let o=s[0]||"",r=s[1]||"";o.length>6&&(o=o.slice(0,6)),r&&(r=r.slice(0,4)),e=r.length?`${o}.${r}`:i?`${o}.`:o,this.$set(this.selectedMachineRows[t],"powerDissipation",e)},handleRowPowerDissipationBlur(t){const e=String(this.selectedMachineRows[t].powerDissipation??""),a=/^\d{1,6}(\.\d{1,4})?$/;(!e||Number(e)<=0||!a.test(e))&&(this.$message.warning("功耗需大于0,整数最多6位,小数最多4位"),this.$set(this.selectedMachineRows[t],"powerDissipation",""))},handleRowTheoryPowerInput(t){let e=String(this.selectedMachineRows[t].theoryPower??"");e=e.replace(/[^0-9.]/g,"");const a=e.indexOf(".");-1!==a&&(e=e.slice(0,a+1)+e.slice(a+1).replace(/\./g,""));const i=e.endsWith("."),s=e.split(".");let o=s[0]||"",r=s[1]||"";o.length>6&&(o=o.slice(0,6)),r&&(r=r.slice(0,4)),e=r.length?`${o}.${r}`:i?`${o}.`:o,this.$set(this.selectedMachineRows[t],"theoryPower",e)},handleRowTheoryPowerBlur(t){const e=String(this.selectedMachineRows[t].theoryPower??""),a=/^\d{1,6}(\.\d{1,4})?$/;(!e||Number(e)<=0||!a.test(e))&&(this.$message.warning("理论算力需大于0,整数最多6位,小数最多4位"),this.$set(this.selectedMachineRows[t],"theoryPower",""))},handleRowUnitChange(t,e){this.$set(this.selectedMachineRows[t],"unit",e)},syncMaxLeaseDaysToRows(){const t=this.form.maxLeaseDays,e=Number(t);if(!Number.isInteger(e))return;const a=this.lastMaxLeaseDaysBaseline;this.selectedMachineRows=this.selectedMachineRows.map(t=>{const i=Number(t.maxLeaseDays);return Number.isInteger(i)&&i!==a?t:{...t,maxLeaseDays:e}}),this.lastMaxLeaseDaysBaseline=e},handleRowMaxLeaseDaysInput(t){let e=String(this.selectedMachineRows[t].maxLeaseDays??"");e=e.replace(/\D/g,""),e.length>3&&(e=e.slice(0,3)),this.$set(this.selectedMachineRows[t],"maxLeaseDays",e)},handleRowMaxLeaseDaysBlur(t){const e=String(this.selectedMachineRows[t].maxLeaseDays??"");if(!/^\d{1,3}$/.test(e))return this.$message.warning("最大租赁天数需为 1-365 的整数"),void this.$set(this.selectedMachineRows[t],"maxLeaseDays","");const a=Number(e);(!Number.isInteger(a)||a<1||a>365)&&(this.$message.warning("最大租赁天数需为 1-365 的整数"),this.$set(this.selectedMachineRows[t],"maxLeaseDays",""))},handleRowPriceInput(t){let e=String(this.selectedMachineRows[t].price??"");e=e.replace(/[^0-9.]/g,"");const a=e.indexOf(".");-1!==a&&(e=e.slice(0,a+1)+e.slice(a+1).replace(/\./g,""));const i=e.endsWith("."),s=e.split(".");let o=s[0]||"",r=s[1]||"";o.length>12&&(o=o.slice(0,12)),r&&(r=r.slice(0,2)),e=r.length?`${o}.${r}`:i?`${o}.`:o,this.$set(this.selectedMachineRows[t],"price",e)},handleRowPriceMapInput(t,e){const a=this.selectedMachineRows[t],i={...a.priceMap||{}};let s=String(i[e]??"");s=s.replace(/[^0-9.]/g,"");const o=s.indexOf(".");-1!==o&&(s=s.slice(0,o+1)+s.slice(o+1).replace(/\./g,""));const r=s.endsWith("."),n=s.split(".");let l=n[0]||"",c=n[1]||"";l.length>12&&(l=l.slice(0,12)),c&&(c=c.slice(0,2)),s=c.length?`${l}.${c}`:r?`${l}.`:l,i[e]=s,this.$set(this.selectedMachineRows[t],"priceMap",i)},handleRowPriceMapBlur(t,e){const a=this.selectedMachineRows[t],i=String((a.priceMap&&a.priceMap[e])??""),s=/^\d{1,12}(\.\d{1,2})?$/;if(!i||Number(i)<=0||!s.test(i)){this.$message.warning("价格必须大于0,整数最多12位,小数最多2位");const i={...a.priceMap||{}};i[e]="",this.$set(this.selectedMachineRows[t],"priceMap",i)}},handleRowPriceBlur(t){const e=String(this.selectedMachineRows[t].price??""),a=/^\d{1,12}(\.\d{1,2})?$/;(!e||Number(e)<=0||!a.test(e))&&(this.$message.warning("价格必须大于0,整数最多12位,小数最多2位"),this.$set(this.selectedMachineRows[t],"price",""))},handleRowTypeInput(t){const e=String(this.selectedMachineRows[t].type||""),a=e.length>20?e.slice(0,20):e;this.$set(this.selectedMachineRows[t],"type",a)},handleRowTypeBlur(t){const e=this.selectedMachineRows[t].type,a=t=>"string"===typeof t&&t.length>0&&0===t.trim().length;a(e)&&(this.$message.warning("矿机型号不能全是空格"),this.$set(this.selectedMachineRows[t],"type",""))},handleToggleState(t){const e=this.selectedMachineRows[t].state;this.$set(this.selectedMachineRows[t],"state",0===e?1:0)},async fetchMiners(){this.minersLoading=!0;try{const t=await getUserMinersList({coin:this.form.coin||""}),e=t?.data;let a=[];Array.isArray(e)?a=e:e&&"object"===typeof e?Object.keys(e).forEach(t=>{const i=Array.isArray(e[t])?e[t]:[];i.forEach(t=>{t&&t.user&&t.coin&&a.push({user:t.user,coin:t.coin,miner:t.miner||null})})}):e&&e.additionalProperties1&&(a=[e.additionalProperties1]),this.form.coin&&(a=a.filter(t=>t.coin===this.form.coin)),this.miners=a}catch(t){console.error("获取挖矿账户失败",t)}finally{this.minersLoading=!1}},async handleMinerChange(t){if(this.selectedMachines=[],!t)return void(this.machineOptions=[]);const[e,a]=t.split("|");this.machinesLoading=!0;try{const t={coin:a,user:e},i=await getUserMachineList(t),s=i?.data||[];this.machineOptions=Array.isArray(s)?s:[],console.log("选择挖矿账户:",{user:e,coin:a}),console.log("获取机器列表响应:",i),console.log("机器列表数据:",this.machineOptions)}catch(i){console.error("获取机器列表失败",i)}finally{this.machinesLoading=!1}},async handleSave(){try{const t=await this.$refs.machineForm.validate();if(!t)return}catch(s){return}{const t=String(this.form.sellCount??"");if(""===t)return void this.$message.warning("请输入出售机器数量");const e=Number(t);if(!Number.isInteger(e)||e<0||e>9999)return void this.$message.warning("出售机器数量需为 0-9999 的整数");if(0===e)return void this.$message.warning("出售机器数量为 0,无需提交")}const t=t=>"string"===typeof t&&t.length>0&&0===t.trim().length;if(t(this.form.type))return void this.$message.warning("矿机型号不能全是空格");const e=this.selectedMachineRows.findIndex(e=>t(e.type));if(-1!==e)return void this.$message.warning("存在行的矿机型号全是空格,请修正后再试");const a=this.buildCoinCsvFromRows(),i=this.buildAlgoCsvFromRows();this.confirmData={coin:a||"-",algorithm:i||"-",maxLeaseDays:this.form.maxLeaseDays,saleNumbers:this.form.sellCount,priceList:this.buildPriceList()},this.confirmVisible=!0},async doSubmit(){this.saving=!0;try{const t=(this.form.coinAndAlgoList||[]).map(t=>({coin:String(t.coin||"").toUpperCase().trim(),algorithm:String(t.algorithm||"").toUpperCase().trim(),theoryPower:Number(t.theoryPower)||0,unit:t.unit})),e={coinAndAlgoList:t,maxLeaseDays:Number(this.form.maxLeaseDays)||0,name:this.form.type,powerDissipation:Number(this.form.powerDissipation)||0,saleNumbers:Number(this.form.sellCount)||0,priceList:this.buildPriceList()};e.priceList=(e.priceList||[]).filter(t=>Number(t.price)>0),console.log(e,"请求参数");const a=await(0,s.addAsicMachine)(e);!a||0!==a.code&&200!==a.code||(this.$message({message:"创建成功",duration:3e3,showClose:!0,type:"success"}),this.confirmVisible=!1,this.$router.push("/account/products"))}catch(t){console.error("创建商品失败",t),console.log("创建失败")}finally{this.saving=!1}}}}},3525:function(t,e,a){a.r(e),a.d(e,{__esModule:function(){return s.B},default:function(){return l}});var i=a(1047),s=a(4300),o=s.A,r=a(845),n=(0,r.A)(o,i.XX,i.Yp,!1,null,"115b6a3a",null),l=n.exports},3574:function(t,e){e.Yp=e.XX=void 0;e.XX=function(){var t=this,e=t._self._c;return e("div",{staticClass:"product-new"},[e("el-card",{staticClass:"product-form-card"},[e("div",{staticClass:"card-header",attrs:{slot:"header"},slot:"header"},[e("h2",[t._v("新增商品")]),e("p",{staticClass:"subtitle"},[t._v("创建新的商品信息")])]),e("el-form",{ref:"productForm",staticClass:"product-form",attrs:{model:t.form,rules:t.rules,"label-width":"120px"}},[e("el-form-item",{attrs:{label:"商品名称",prop:"name"}},[e("el-input",{attrs:{placeholder:"请输入商品名称,如:Nexa-M2-Miner",maxlength:"30","show-word-limit":""},model:{value:t.form.name,callback:function(e){t.$set(t.form,"name",e)},expression:"form.name"}})],1),e("el-form-item",{staticClass:"align-like-input",attrs:{label:"商品类型",prop:"type"}},[e("el-radio-group",{model:{value:t.form.type,callback:function(e){t.$set(t.form,"type",e)},expression:"form.type"}},[e("el-radio",{attrs:{label:0}},[t._v("矿机")])],1)],1),e("el-form-item",{attrs:{label:"挖矿币种",prop:"coin"}},[e("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择挖矿币种"},model:{value:t.form.coin,callback:function(e){t.$set(t.form,"coin",e)},expression:"form.coin"}},t._l(t.coinOptions,function(t){return e("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})}),1)],1),e("el-form-item",{attrs:{label:"商品描述",prop:"description"}},[e("el-input",{attrs:{type:"textarea",rows:4,placeholder:"请输入商品描述",maxlength:"100","show-word-limit":""},model:{value:t.form.description,callback:function(e){t.$set(t.form,"description",e)},expression:"form.description"}})],1),e("el-form-item",{staticClass:"align-like-input",attrs:{label:"商品状态",prop:"state"}},[e("el-radio-group",{model:{value:t.form.state,callback:function(e){t.$set(t.form,"state",e)},expression:"form.state"}},[e("el-radio",{attrs:{label:0}},[t._v("上架")]),e("el-radio",{attrs:{label:1}},[t._v("下架")])],1)],1),e("el-form-item",{staticClass:"actions-row"},[e("div",{staticClass:"form-actions"},[e("el-button",{attrs:{type:"primary",size:"medium",loading:t.submitting},on:{click:t.handleSubmit}},[t._v("创建商品")]),e("el-button",{attrs:{size:"medium"},on:{click:t.handleReset}},[t._v("重置")]),e("el-button",{attrs:{size:"medium"},on:{click:t.handleCancel}},[t._v("取消")])],1)])],1)],1)],1)},e.Yp=[]},3723:function(t,e,a){var i=a(3999)["default"];Object.defineProperty(e,"__esModule",{value:!0}),e.productRoutes=e.mainRoutes=e["default"]=e.childrenRoutes=e.checkoutRoutes=e.cartRoutes=e.authRoutes=e.accountRoutes=void 0;var s=i(a(1774));const o=e.authRoutes=[{path:"/login",name:"Login",component:()=>Promise.resolve().then(()=>(0,s.default)(a(8569))),meta:{title:"用户登录",description:"登录到您的账户",requiresAuth:!1}},{path:"/register",name:"Register",component:()=>Promise.resolve().then(()=>(0,s.default)(a(3110))),meta:{title:"用户注册",description:"创建新账户",requiresAuth:!1}},{path:"/reset-password",name:"ResetPassword",component:()=>Promise.resolve().then(()=>(0,s.default)(a(5987))),meta:{title:"重置密码",description:"重置您的账户密码",requiresAuth:!1}}],r=e.productRoutes=[{path:"/productList",name:"productList",component:()=>Promise.resolve().then(()=>(0,s.default)(a(8235))),meta:{title:"商品列表",description:"浏览所有可用商品",allAuthority:["all"]}},{path:"/product/:id",name:"productDetail",component:()=>Promise.resolve().then(()=>(0,s.default)(a(5002))),meta:{title:"商品详情",description:"查看商品详细信息",allAuthority:["all"]}}],n=e.cartRoutes=[{path:"/cart",name:"cart",component:()=>Promise.resolve().then(()=>(0,s.default)(a(8872))),meta:{title:"购物车",description:"管理购物车商品",allAuthority:["all"]}}],l=e.checkoutRoutes=[{path:"/checkout",name:"checkout",component:()=>Promise.resolve().then(()=>(0,s.default)(a(5638))),meta:{title:"订单结算",description:"完成订单结算",allAuthority:["all"]}}],c=e.accountRoutes=[{path:"/account",name:"account",component:()=>Promise.resolve().then(()=>(0,s.default)(a(1264))),redirect:"/account/shops",meta:{title:"个人中心",description:"管理个人资料和店铺",allAuthority:["all"]},children:[{path:"wallet",name:"Wallet",component:()=>Promise.resolve().then(()=>(0,s.default)(a(9585))),meta:{title:"我的钱包",description:"查看钱包余额、充值和提现",allAuthority:["all"]}},{path:"rechargeRecord",name:"RechargeRecord",component:()=>Promise.resolve().then(()=>(0,s.default)(a(6851))),meta:{title:"充值记录",description:"查看充值记录",allAuthority:["all"]}},{path:"withdrawalHistory",name:"WithdrawalHistory",component:()=>Promise.resolve().then(()=>(0,s.default)(a(1394))),meta:{title:"提现记录",description:"查看提现记录",allAuthority:["all"]}},{path:"receipt-record",name:"accountReceiptRecord",component:()=>Promise.resolve().then(()=>(0,s.default)(a(3525))),meta:{title:"收款记录",description:"卖家收款流水记录",allAuthority:["all"]}},{path:"withdraw-record",name:"accountWithdrawRecord",component:()=>Promise.resolve().then(()=>(0,s.default)(a(6565))),meta:{title:"提现记录",description:"卖家提现流水记录",allAuthority:["all"]}},{path:"shop-new",name:"accountShopNew",component:()=>Promise.resolve().then(()=>(0,s.default)(a(1452))),meta:{title:"新增店铺",description:"创建新的店铺",allAuthority:["all"]}},{path:"shop-config",name:"accountShopConfig",component:()=>Promise.resolve().then(()=>(0,s.default)(a(3774))),meta:{title:"钱包绑定",description:"绑定店铺收款钱包",allAuthority:["all"]}},{path:"shops",name:"accountMyShops",component:()=>Promise.resolve().then(()=>(0,s.default)(a(9810))),meta:{title:"我的店铺",description:"查看我的店铺信息",allAuthority:["all"]}},{path:"product-new",name:"accountProductNew",component:()=>Promise.resolve().then(()=>(0,s.default)(a(9266))),meta:{title:"新增商品",description:"创建新的商品",allAuthority:["all"]}},{path:"products",name:"accountProducts",component:()=>Promise.resolve().then(()=>(0,s.default)(a(6795))),meta:{title:"商品列表",description:"管理店铺下的商品列表",allAuthority:["all"]}},{path:"purchased-machine-config",name:"accountPurchasedMachineConfig",component:()=>Promise.resolve().then(()=>(0,s.default)(a(5806))),meta:{title:"已购商品",description:"查看已购买商品的配置信息",allAuthority:["all"]}},{path:"purchased-machine-detail/:id",name:"purchasedMachineDetail",component:()=>Promise.resolve().then(()=>(0,s.default)(a(2067))),meta:{title:"已购商品详情",description:"查看已购买商品的详细信息",allAuthority:["all"]}},{path:"funds-flow",name:"accountFundsFlow",component:()=>Promise.resolve().then(()=>(0,s.default)(a(636))),meta:{title:"资金流水",description:"充值/提现/消费记录切换查看",allAuthority:["all"]}},{path:"seller-funds-flow",name:"accountSellerFundsFlow",component:()=>Promise.resolve().then(()=>(0,s.default)(a(1644))),meta:{title:"资金流水",description:"卖家收款/提现流水记录",allAuthority:["all"]}},{path:"orders",name:"accountOrders",component:()=>Promise.resolve().then(()=>(0,s.default)(a(8401))),meta:{title:"订单列表",description:"查看与管理订单(按状态筛选)",allAuthority:["all"]}},{path:"seller-orders",name:"accountSellerOrders",component:()=>Promise.resolve().then(()=>(0,s.default)(a(5027))),meta:{title:"已售出订单",description:"卖家侧订单列表",allAuthority:["all"]}},{path:"order-detail/:id",name:"accountOrderDetail",component:()=>Promise.resolve().then(()=>(0,s.default)(a(8641))),meta:{title:"订单详情",description:"查看订单详细信息",allAuthority:["all"]}},{path:"product-detail/:id",name:"accountProductDetail",component:()=>Promise.resolve().then(()=>(0,s.default)(a(5355))),meta:{title:"商品详情",description:"个人中心 - 商品详情",allAuthority:["all"]}},{path:"product-machine-add",name:"accountProductMachineAdd",component:()=>Promise.resolve().then(()=>(0,s.default)(a(7937))),meta:{title:"添加出售机器",description:"为商品添加出售机器",allAuthority:["all"]}},{path:"security-settings",name:"accountSecuritySettings",component:()=>Promise.resolve().then(()=>(0,s.default)(a(8837))),meta:{title:"安全设置",description:"管理账户安全选项",allAuthority:["all"]}}]}],d=e.childrenRoutes=[...r,...n,...l,...c],u=e.mainRoutes=[...o,{path:"/",name:"Home",component:()=>Promise.resolve().then(()=>(0,s.default)(a(1182))),redirect:"/productList",children:d},{path:"*",redirect:"/productList"}];e["default"]=u},3774:function(t,e,a){a.r(e),a.d(e,{__esModule:function(){return s.B},default:function(){return l}});var i=a(4163),s=a(4601),o=s.A,r=a(845),n=(0,r.A)(o,i.XX,i.Yp,!1,null,"255bc54a",null),l=n.exports},3831:function(t,e,a){Object.defineProperty(e,"B",{value:!0}),e.A=void 0,a(4114);var i=a(2549),s=a(6966);e.A={name:"ResetPasswordPage",data(){const t=(t,e,a)=>{if(!e)return void a(new Error("请输入邮箱"));const i=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;i.test(e)?a():a(new Error("请输入有效的邮箱地址"))},e=(t,e,a)=>{if(!e)return void a(new Error("请输入新密码"));const i=/^(?!.*[\u4e00-\u9fa5])(?![a-zA-Z]+$)(?![A-Z0-9]+$)(?![A-Z\W_]+$)(?![a-z0-9]+$)(?![a-z\W_]+$)(?![0-9\W_]+$)[a-zA-Z0-9\W_]{8,32}$/;i.test(e)?a():a(new Error("密码应包含大小写字母、数字和特殊字符,长度8-32位"))},a=(t,e,a)=>{e?e===this.resetForm.password?a():a(new Error("两次输入的密码不一致")):a(new Error("请再次输入新密码"))};return{resetForm:{email:"",code:"",password:"",confirmPassword:""},resetRules:{email:[{required:!0,validator:t,trigger:"blur"}],code:[{required:!0,message:"请输入验证码",trigger:"blur"},{min:1,max:10,message:"验证码长度为1-10位",trigger:"blur"}],password:[{required:!0,validator:e,trigger:"blur"}],confirmPassword:[{required:!0,validator:a,trigger:"blur"}]},loading:!1,sendingCode:!1,countdown:0,timer:null}},computed:{passwordStrength(){const t=this.resetForm.password;if(!t)return 0;let e=0;return t.length>=6&&(e+=1),t.length>=10&&(e+=1),/\d/.test(t)&&(e+=1),/[a-z]/.test(t)&&(e+=1),/[A-Z]/.test(t)&&(e+=1),/[^a-zA-Z0-9]/.test(t)&&(e+=1),e},passwordStrengthText(){const t=this.passwordStrength;return t<=2?"弱":t<=4?"中":"强"},passwordStrengthClass(){const t=this.passwordStrength;return t<=2?"weak":t<=4?"medium":"strong"}},beforeDestroy(){this.timer&&(clearInterval(this.timer),this.timer=null)},methods:{goToShop(){"/productList"!==this.$route.path?this.$router.push("/productList"):this.$router.go(-1)},async handleSendCode(){const t=(this.resetForm.email||"").trim();if(!t)return this.$message.warning("请输入邮箱地址"),void this.$refs.resetForm.validateField("email");const e=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;if(!e.test(t))return this.$message.warning("请输入有效的邮箱地址"),void this.$refs.resetForm.validateField("email");this.sendingCode=!0;try{const t=await(0,i.sendUpdatePwdCode)({email:this.resetForm.email});t&&200===t.code?(this.$message.success(t.msg||"验证码已发送,请查收邮箱"),this.startCountdown()):this.$message.error(t.msg||"发送验证码失败")}catch(a){console.error("发送验证码失败:",a),this.$message.error(a.message||"发送验证码失败,请重试")}finally{this.sendingCode=!1}},startCountdown(){this.countdown=60,this.timer=setInterval(()=>{this.countdown--,this.countdown<=0&&(clearInterval(this.timer),this.timer=null)},1e3)},async handleReset(){try{await this.$refs.resetForm.validate()}catch(t){return}this.loading=!0;try{const t=this.resetForm.password;let e=t;const a=(0,s.rsaEncryptSync)(t);if(a)e=a;else{const a=await(0,s.rsaEncrypt)(t);if(!a)return this.$message.error("密码加密失败,请重试"),void(this.loading=!1);e=a}const o=await(0,i.updatePassword)({email:this.resetForm.email,code:this.resetForm.code,password:e});o&&200===o.code?(this.$message.success(o.msg||"密码重置成功,请使用新密码登录"),setTimeout(()=>{this.$router.push({path:"/login",query:{email:this.resetForm.email}})},1500)):this.$message.error(o.msg||"密码重置失败")}catch(t){console.error("密码重置失败:",t),this.$message.error("密码重置失败,请重试")}finally{this.loading=!1}}}}},4163:function(t,e,a){e.Yp=e.XX=void 0,a(8111),a(1701);e.XX=function(){var t=this,e=t._self._c;return e("div",{staticClass:"panel"},[e("h2",{staticClass:"panel-title page-title"},[t._v("钱包绑定")]),e("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"panel-body"},[e("el-form",{staticClass:"config-form",attrs:{model:t.form,"label-width":"120px"}},[e("el-form-item",{attrs:{label:"选择链/币种"}},[e("el-cascader",{staticStyle:{width:"420px"},attrs:{options:t.options,props:t.cascaderProps,"show-all-levels":!1,clearable:"",filterable:""},on:{change:t.handleChange,"expand-change":t.handleExpandChange},scopedSlots:t._u([{key:"default",fn:function({node:a,data:i}){return[e("span",{staticClass:"custom-node",attrs:{"aria-label":"cascader-item",tabindex:"0"},on:{click:function(e){return e.stopPropagation(),t.handleItemClick(a,i)}}},[e("span",{staticClass:"node-label"},[t._v(t._s(i.label))]),a.isLeaf&&a.checked?e("span",{staticClass:"leaf-checked",attrs:{"aria-hidden":"true"}},[t._v("✓")]):t._e()])]}}]),model:{value:t.value,callback:function(e){t.value=e},expression:"value"}})],1),e("el-form-item",{attrs:{label:"已选择币种"}},[e("div",{staticClass:"selected-coins",attrs:{"aria-label":"selected-coins",tabindex:"0"}},[t._l(t.selectedCoins,function(a){return e("el-tag",{key:a,attrs:{type:"warning",effect:"light",closable:"","disable-transitions":""},on:{close:function(e){return t.handleRemoveSelectedCoin(a)}}},[t._v(" "+t._s(a)+" ")])}),0===t.selectedCoins.length?e("span",{staticClass:"placeholder"},[t._v("未选择")]):t._e()],2)]),e("el-form-item",{attrs:{label:"收款钱包地址"}},[e("el-input",{attrs:{placeholder:"请输入"},model:{value:t.form.payAddress,callback:function(e){t.$set(t.form,"payAddress",e)},expression:"form.payAddress"}})],1),e("el-form-item",[e("el-button",{staticStyle:{width:"200px"},attrs:{type:"primary"},on:{click:t.handleSave}},[t._v("确认绑定")])],1)],1),e("el-dialog",{attrs:{visible:t.preCheck.visible,width:"80vw","close-on-click-modal":!1,title:"检测到关联商品"},on:{"update:visible":function(e){return t.$set(t.preCheck,"visible",e)},close:t.handlePreCheckClose},scopedSlots:t._u([{key:"footer",fn:function(){return[e("el-button",{on:{click:function(e){t.preCheck.visible=!1}}},[t._v("取消")]),e("el-button",{attrs:{type:"primary",disabled:!t.canSubmitPreCheck},on:{click:t.handleConfirmBindAfterPreview}},[t._v("继续绑定")])]},proxy:!0}])},[e("div",{staticStyle:{"margin-bottom":"10px"}},[e("el-alert",{attrs:{type:"warning",closable:!1,"show-icon":"",description:"检测到以下商品与本次绑定的链/币相关。继续绑定后,可能需要为这些商品配置该新链下的价格。是否继续?"}})],1),e("p",{staticStyle:{color:"red","font-size":"12px","margin-top":"6px","text-align":"right"}},[t._v("* 请填写每个商品对应币种的价格,商品包含机器统一设置价格,如需单台修改请在商品列表-详情页操作")]),e("el-table",{attrs:{data:t.preCheck.rows,height:"360",border:"","header-cell-style":{textAlign:"left"},"cell-style":{textAlign:"left"}}},[e("el-table-column",{attrs:{label:"商品名称","min-width":"160"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.name||e.row.productName||e.row.title||e.row.product||"-"))]}}])}),e("el-table-column",{attrs:{label:"链","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(){return[t._v(" "+t._s((t.form.chain||"").toUpperCase())+" ")]},proxy:!0}])}),e("el-table-column",{attrs:{label:"币种","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(){return[t._v(" "+t._s(t.form.payCoin.split(",").map(t=>t.trim().toUpperCase()).join(","))+" ")]},proxy:!0}])}),e("el-table-column",{attrs:{label:"总矿机数","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(null!=e.row.totalMachineNumber?e.row.totalMachineNumber:e.row.total||e.row.totalMachines||"-"))]}}])}),e("el-table-column",{attrs:{label:"商品状态","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(1===Number(e.row.state)?"下架":"上架"))]}}])}),t._l(t.coinsForBind,function(a){return e("el-table-column",{key:"price-"+a,attrs:{label:a+" 价格","min-width":"160"},scopedSlots:t._u([{key:"default",fn:function(i){return[e("el-input",{staticClass:"price-input",attrs:{size:"mini",placeholder:"请输入",inputmode:"decimal"},scopedSlots:t._u([{key:"append",fn:function(){return[t._v(t._s(a))]},proxy:!0}],null,!0),model:{value:t.preCheck.rowPrices[t.getRowKey(i.row,i.$index)][a],callback:function(e){t.$set(t.preCheck.rowPrices[t.getRowKey(i.row,i.$index)],a,e)},expression:"preCheck.rowPrices[getRowKey(scope.row, scope.$index)][sym]"}})]}}],null,!0)})})],2)],1)],1)])},e.Yp=[]},4180:function(t,e,a){var i=a(3999)["default"];Object.defineProperty(e,"__esModule",{value:!0}),e.addOrders=o,e.addOrdersV2=m,e.cancelOrder=r,e.getChainAndListForSeller=d,e.getCoinPrice=u,e.getMachineSupportCoinAndAlgorithm=h,e.getMachineSupportPool=p,e.getOrdersByIds=n,e.getOrdersByStatus=l,e.getOrdersByStatusForSeller=c,e.getPurchasedInfoV2=f,e.getPurchasedItems=g;var s=i(a(5720));function o(t){return(0,s.default)({url:"/lease/order/info/addOrders",method:"post",data:t})}function r(t){return(0,s.default)({url:"/lease/order/info/cancelOrder",method:"post",data:t})}function n(t){return(0,s.default)({url:"/lease/order/info/getOrdersByIds",method:"post",data:t})}function l(t){return(0,s.default)({url:"/lease/order/info/getOrdersByStatus",method:"post",data:t})}function c(t){return(0,s.default)({url:"/lease/order/info/getOrdersByStatusForSeller",method:"post",data:t})}function d(t){return(0,s.default)({url:"/lease/shop/getChainAndListForSeller",method:"post",data:t})}function u(t){return(0,s.default)({url:"/lease/order/info/getCoinPrice",method:"post",data:t})}function h(t){return(0,s.default)({url:"/lease/v2/order/info/getMachineSupportCoinAndAlgorithm",method:"post",data:t})}function p(t){return(0,s.default)({url:"/lease/v2/order/info/getMachineSupportPool",method:"post",data:t})}function m(t){return(0,s.default)({url:"/lease/v2/order/info/addOrdersV2",method:"post",data:t})}function g(t){return(0,s.default)({url:"/lease/v2/order/info/getPurchasedItems",method:"post",data:t})}function f(t){return(0,s.default)({url:"/lease/v2/order/info/getPurchasedInfo",method:"post",data:t})}},4300:function(t,e,a){Object.defineProperty(e,"B",{value:!0}),e.A=void 0,a(8111),a(1701);var i=a(6299),s=a(4981);e.A={name:"AccountReceiptRecord",data(){return{loading:!1,rows:[{orderId:"1234567890",fromChain:"tron",fromSymbol:"USDT",fromAddress:"TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",toChain:"tron",coin:"USDT",toAddress:"TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",txHash:"TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",status:2,updateTime:"2024-01-15 14:30:25",realAmount:100},{orderId:"1234567890",fromChain:"tron",fromSymbol:"USDT",fromAddress:"TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",toChain:"tron",coin:"USDT",toAddress:"TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",txHash:"TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",status:1,updateTime:"2024-01-15 14:30:25",realAmount:106}],page:1,pageSize:10,total:0,range:[],keyword:"",expandedRowKeys:[]}},mounted(){this.fetchList(),this.rows=this.withKeys(this.rows)},methods:{formatAmount(t,e){return(0,s.truncateAmountByCoin)(t,e)},withKeys(t){const e=Array.isArray(t)?t:[];return e.map((t,e)=>({...t,__rowKey:t&&t.__rowKey?t.__rowKey:`${t&&(t.txHash||t.orderId||t.updateTime||"")}_${e}`}))},getRowKey(t){return t&&t.__rowKey},handleRowClick(t){const e=this.getRowKey(t),a=this.expandedRowKeys.includes(e);this.expandedRowKeys=a?[]:[e]},handleExpandChange(t,e){Array.isArray(e)?this.expandedRowKeys=e.length?[this.getRowKey(e[e.length-1])]:[]:this.expandedRowKeys=[]},getRowClassName(){return"clickable-row"},formatTrunc(t,e=2){const a=Number(t);if(!Number.isFinite(a))return"0";const i=Math.max(0,Number(e)||0),s=Math.pow(10,i),o=Math.trunc(a*s)/s,r=String(o);if(0===i)return r;const[n,l=""]=r.split("."),c=l.padEnd(i,"0");return`${n}.${c}`},formatFullTime(t){if(!t)return"";try{return`${t.split("T")[0]} ${t.split("T")[1].split(".")[0]}`}catch(e){return console.log(e,"时间"),t}},formatChain(t){const e={tron:"Tron (TRC20)",ethereum:"Ethereum (ERC20)",bsc:"BSC (BEP20)",polygon:"Polygon"};return e[t]||t||"-"},getStatusType(t){const e={0:"danger",1:"success",2:"warning",3:"danger"};return e[t]||"info"},getStatusText(t){const e={0:"支付失败",1:"支付成功",2:"待校验",3:"证书校验失败"};return e[t]||"未知"},copy(t){if(!t)return;try{if(navigator.clipboard&&navigator.clipboard.writeText)return navigator.clipboard.writeText(t),void this.$message.success("已复制")}catch(a){}const e=document.createElement("textarea");e.value=t,document.body.appendChild(e),e.select();try{document.execCommand("copy"),this.$message.success("已复制")}catch(a){}document.body.removeChild(e)},handleRangeChange(){this.page=1},async fetchList(){this.loading=!0;try{const t={page:this.page,pageSize:this.pageSize},e=await(0,i.sellerReceiptList)(t),a=e&&(e.data||e),s=Array.isArray(a&&a.rows)?a.rows:Array.isArray(a)?a:[];this.rows=this.withKeys(s),this.total=e.total}catch(t){this.rows=[],this.total=0}finally{this.loading=!1}}}}},4487:function(t,e,a){Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=void 0,a(4114),a(8111),a(2489),a(116),a(2912),a(7588),a(1701),a(8237),a(3579),a(7642),a(8004),a(3853),a(5876),a(2475),a(5024),a(1698);var i=a(7723),s=a(9662),o=a(4981),r=a(5844);e["default"]={name:"ProductDetail",data(){return{product:null,loading:!1,expandedRowKeys:[],selectedMap:{},machineList:[],paymentMethodList:[],selectedPayKey:null,filters:{chain:"",coin:"",minPrice:null,maxPrice:null,minPower:null,maxPower:null,minPowerDissipation:null,maxPowerDissipation:null,unit:"GH/S"},powerUnitOptions:["KH/S","MH/S","GH/S","TH/S","PH/S"],sortStates:{priceSort:!0,powerSort:!0,powerDissipationSort:!0},activeSortField:"",payFilterDefaultApplied:!1,params:{id:"",pageNum:1,pageSize:10},confirmAddDialog:{visible:!1,items:[]},cartMachineIdSet:new Set,cartCompositeKeySet:new Set,cartLoaded:!1,machinesLoaded:!1,productListData:[],tableData:[],productDetailLoading:!1,pageSizes:[10,20,50],currentPage:1,total:0,dynamicMeta:{},dynamicColumns:[],dynamicRows:[],dynamicSearch:{visible:!1,keyword:""},machineType:1}},mounted(){try{const t=Number(window&&window.localStorage?window.localStorage.getItem("pl_machineType"):NaN);0!==t&&1!==t||(this.machineType=t)}catch(e){}const t=this.$route&&this.$route.params&&(this.$route.params.shopId||this.$route.params.id)||this.$route&&this.$route.query&&this.$route.query.shopId;t?(this.params.id=t,this.product=!0,this.fetchGetMachineInfo(this.buildQueryParams()),this.fetchPayTypes()):(this.$message.warning("缺少店铺ID(shopId),无法加载商品列表"),this.product=!1)},methods:{formatDynamicCell(t,e){try{let a=t[e.key];if(null===a||void 0===a||""===a)return{text:"—",full:"—",truncated:!1};if("amount"===e.type){if("price"===e.key){if(Array.isArray(t.priceList)&&t.priceList.length){const e=this.getDisplayPrice(t),i=this.getDisplayPriceCoin(t);null!==e&&void 0!==e&&(a=e);const s=a,r=(0,o.truncateTo6)(s),n=(i||"").toString().toUpperCase();return{text:n?`${r.text} ${n}`:r.text,full:n?`${r.full} ${n}`:r.full,truncated:r.truncated}}const e=(0,o.truncateTo6)(a);return{text:e.text,full:e.full,truncated:e.truncated}}const i=(e.currency||"").toString().toUpperCase();if("USDT"===i){const t=(0,o.truncateTo6)(a);return{text:`${t.text} USDT`,full:`${t.full} USDT`,truncated:t.truncated}}const s=(0,o.truncateTo6)(a);return{text:s.text,full:s.full,truncated:s.truncated}}if("hashrate"===e.type){const t=String(a||"");return{text:t,full:t,truncated:!1}}if("days"===e.type){const t=Number(a);if(!Number.isFinite(t))return{text:String(a),full:String(a),truncated:!1};const e=`${Math.floor(t)} 天`;return{text:e,full:e,truncated:!1}}const i=String(a);return{text:i,full:i,truncated:!1}}catch(a){return{text:"—",full:"—",truncated:!1}}},ensureDefaultPayFilterFromPrices(){try{if(this.payFilterDefaultApplied)return;const t=Array.isArray(this.dynamicRows)?this.dynamicRows:[],e=t.find(t=>Array.isArray(t&&t.priceList)&&t.priceList.length);if(!e)return;const a=e.priceList[0],i=String(a&&a.chain||"").trim(),s=String(a&&a.coin||"").trim();if(!i&&!s)return;this.selectedPayKey=`${i}|${s}`,this.filters.chain=i,this.filters.coin=s,this.payFilterDefaultApplied=!0}catch(t){}},getDisplayPrice(t){try{const e=Array.isArray(t&&t.priceList)?t.priceList:[];if(!e.length)return t&&t.price;const a=this.selectedPayKey;if(a){const[t,i]=String(a).split("|"),s=String(t||"").toUpperCase().trim(),o=String(i||"").toUpperCase().trim(),r=e.find(t=>String(t&&t.chain).toUpperCase().trim()===s&&String(t&&t.coin).toUpperCase().trim()===o);if(r&&void 0!==r.price&&null!==r.price)return r.price}const i=e[0];return i&&void 0!==i.price&&null!==i.price?i.price:t&&t.price}catch(e){return t&&t.price}},getDisplayPriceCoin(t){try{const e=Array.isArray(t&&t.priceList)?t.priceList:[];if(!e.length)return"";const a=this.selectedPayKey;if(a){const[t,i]=String(a).split("|"),s=String(t||"").toUpperCase().trim(),o=String(i||"").toUpperCase().trim(),r=e.find(t=>String(t&&t.chain).toUpperCase().trim()===s&&String(t&&t.coin).toUpperCase().trim()===o);if(r&&r.coin)return String(r.coin)}const i=e[0];return i&&i.coin?String(i.coin):""}catch(e){return""}},_truncate(t,e=2){try{const a=Math.pow(10,e);return(Math.floor(Number(t)*a)/a).toFixed(e)}catch(a){return String(t)}},isLastHashrateColumn(t){try{const e=this.getRenderedColumns();for(let a=e.length-1;a>=0;a--)if("hashrate"===String(e[a]&&e[a].type).toLowerCase())return a===t;return!1}catch(e){return!1}},getRenderedColumns(){try{const t=Array.isArray(this.dynamicColumns)?this.dynamicColumns:[],e=t.filter(t=>"hashrate"===String(t&&t.type).toLowerCase()).slice(0,8),a=t.filter(t=>"hashrate"!==String(t&&t.type).toLowerCase());return[...e,...a]}catch(t){return[]}},handleOpenDynamicSearch(){this.dynamicSearch.visible=!0,this.dynamicSearch.keyword=""},async handleConfirmDynamicSearch(){const t=(this.dynamicSearch.keyword||"").trim();this.dynamicSearch.visible=!1,await this.fetchDynamicTable({shopId:this.params.id,type:1,keyword:t})},async fetchDynamicTable(t){try{if(!t||!t.keyword)return;const e=String(t.keyword).toUpperCase(),a=(this.dynamicColumns||[]).filter(t=>["model","price","maxLeaseDays","monthIncome"].includes(t.key)),i=(this.dynamicColumns||[]).filter(t=>String(t.label||t.key).toUpperCase().includes(e)),s=[...a.length?a:[this.dynamicColumns[0]||[]],...i];s.length&&(this.dynamicColumns=s)}catch(e){console.warn("fetchDynamicTable mock error",e)}},handleMachineTypeChange(){try{Array.isArray(this.dynamicRows)&&this.dynamicRows.forEach(t=>{t&&this.$set(t,"_selected",!1)}),this.confirmAddDialog&&(this.confirmAddDialog.items=[],this.confirmAddDialog.visible=!1)}catch(t){}this.fetchGetMachineInfo(this.buildQueryParams()),this.fetchPayTypes();try{window&&window.localStorage&&window.localStorage.setItem("pl_machineType",String(this.machineType))}catch(t){}},getRowCoin(t){try{const e=t&&(t.payCoin||t.coin)||this.getPriceCoinSymbol()||"";return String(e).toUpperCase()}catch(e){return""}},formatAmount(t,e){return(0,o.truncateAmountByCoin)(t,e)},formatNum6(t){return(0,o.truncateTo6)(t)},ensureDefaultPayFilterSelection(){try{if(this.payFilterDefaultApplied)return;const t=Array.isArray(this.paymentMethodList)?this.paymentMethodList:[];if(!t.length)return;const e=this.getPriceCoinSymbol&&this.getPriceCoinSymbol()||"";if(!e)return;const a=t.find(t=>String(t&&t.payCoin).toUpperCase()===String(e).toUpperCase());if(!a)return;const i=`${a.payChain||""}|${a.payCoin||""}`;this.selectedPayKey=i,this.filters.chain=String(a.payChain||"").trim(),this.filters.coin=String(a.payCoin||"").trim(),this.payFilterDefaultApplied=!0}catch(t){}},handleToggleSort(t){try{this.sortStates||(this.sortStates={}),this.activeSortField!==t?(Object.keys(this.sortStates).forEach(t=>{this.sortStates[t]=!0}),this.activeSortField=t,this.sortStates[t]=!1):this.sortStates[t]=!this.sortStates[t];const e=this.buildQueryParams();this.fetchGetMachineInfo(e)}catch(e){}},buildQueryParams(){const t={shopId:this.params.id,type:this.machineType};try{this.params&&null!=this.params.pageNum&&(t.pageNum=this.params.pageNum),this.params&&null!=this.params.pageSize&&(t.pageSize=this.params.pageSize)}catch(a){}const e=(e,a,i)=>{const s=e[a];if(null===s||void 0===s||""===s)return;const o=Number(s);Number.isFinite(o)&&o>0&&(t[i]=o)};this.filters.chain&&String(this.filters.chain).trim()&&(t.chain=String(this.filters.chain).trim()),this.filters.coin&&String(this.filters.coin).trim()&&(t.coin=String(this.filters.coin).trim()),this.filters.unit&&String(this.filters.unit).trim()&&(t.unit=String(this.filters.unit).trim()),e(this.filters,"minPrice","minPrice"),e(this.filters,"maxPrice","maxPrice"),e(this.filters,"minPower","minPower"),e(this.filters,"maxPower","maxPower"),e(this.filters,"minPowerDissipation","minPowerDissipation"),e(this.filters,"maxPowerDissipation","maxPowerDissipation");try{if(this.activeSortField){const e=this.sortStates||{};t[this.activeSortField]=!!e[this.activeSortField]}}catch(a){}return t},async fetchPayTypes(){try{const t=await(0,s.getPayTypes)({shopId:this.params.id,productId:this.params.id});if(t&&(0===t.code||200===t.code)){const e=Array.isArray(t.data)?t.data:[];this.paymentMethodList=e,this.ensureDefaultPayFilterSelection()}}catch(t){this.paymentMethodList=[]}},async fetchGetMachineInfo(t){this.productDetailLoading=!0;const e=await(0,s.getShopMachineList)(t);if(e&&(200===e.code||0===e.code)){const t=e&&e.data?e.data:e,i=Array.isArray(t.columns)?t.columns:Array.isArray(e.columns)?e.columns:[],s=Array.isArray(t.rows)?t.rows:Array.isArray(e.rows)?e.rows:[],o=Number(null!=t.total?t.total:null!=e.total?e.total:0);this.total=Number.isFinite(o)?o:0,this.dynamicColumns=i,this.dynamicRows=s.map(t=>({saleNumbers:0,saleOutNumbers:0,leaseTime:1,purchaseQuantity:1,_selected:!1,...t})),this.ensureDefaultPayFilterFromPrices();try{const e=t&&t.payConfigList;Array.isArray(e)&&e.length&&(this.paymentMethodList=e,this.ensureDefaultPayFilterSelection())}catch(a){}}this.productDetailLoading=!1},async loadProduct(){try{this.loading=!0;const t=this.$route.params.id;this.product=await(0,i.getProductById)(t),this.product||this.$message({message:"商品不存在",type:"error",showClose:!0})}catch(t){console.error("加载商品详情失败:",t),this.$message({message:"加载商品详情失败,请稍后重试",type:"error",showClose:!0})}finally{this.loading=!1}},async fetchAddCart(t){const e=await addCart(t);return e},async fetchGetGoodsList(t){const e=await(0,r.getGoodsListV2)(t);try{const t=this.params&&this.params.id?Number(this.params.id):Number(this.$route.params.id),i=Array.isArray(e&&e.rows)?e.rows:Array.isArray(e&&e.data&&e.data.rows)?e.data.rows:Array.isArray(e&&e.data)?e.data:[],s=i.length&&i[0]&&Array.isArray(i[0].shoppingCartInfoDtoList)?i.flatMap(t=>Array.isArray(t.shoppingCartInfoDtoList)?t.shoppingCartInfoDtoList:[]):i,o=s.filter(e=>Number(e.productId)===t),r=new Set,n=new Set;o.forEach(t=>{const e=Array.isArray(t.productMachineDtoList)?t.productMachineDtoList:[];e.forEach(t=>{t&&(void 0!==t.id&&null!==t.id&&r.add(String(t.id)),t.user&&t.miner&&n.add(`${String(t.user)}|${String(t.miner)}`))})}),this.cartMachineIdSet=r,this.cartCompositeKeySet=n;try{const t=s.reduce((t,e)=>t+(Array.isArray(e&&e.productMachineDtoList)?e.productMachineDtoList.length:0),0);Number.isFinite(t)&&window.dispatchEvent(new CustomEvent("cart-updated",{detail:{count:t}}))}catch(a){}this.$nextTick(()=>{this.cartLoaded=!0,this.autoSelectAndDisable()})}catch(a){console.warn("解析购物车数据失败",a)}},handleBack(){this.$router.push("/productList")},handleSeriesRowClick(t){const e=t.id,a=Object.keys(this.selectedMap).filter(t=>(this.selectedMap[t]||[]).length>0),i=this.expandedRowKeys.includes(e);this.expandedRowKeys=i?a:Array.from(new Set([e,...a]))},handleGetSeriesRowClassName(){return"series-clickable-row"},handleInnerSelectionChange(t,e){const a=t.id;this.$set(this.selectedMap,a,e);const i=Object.keys(this.selectedMap).filter(t=>(this.selectedMap[t]||[]).length>0),s=new Set(this.expandedRowKeys);i.forEach(t=>s.add(t)),this.expandedRowKeys=Array.from(s).filter(t=>i.includes(t)||t===a||this.expandedRowKeys.includes(t))},handleExpandChange(t,e){},autoSelectAndDisable(){},isSelectable(t,e){return!0},isSelectedByParent(t,e){const a=t&&t.id,i=a&&this.selectedMap[a]||[];return!!i.find(t=>t&&t.id===e.id)},handleManualSelect(t,e,a){if(e&&(1===e.saleState||2===e.saleState))return this.$message.warning("该机器已售出或售出中,无法选择"),void this.$set(e,"_selected",!1);try{const t=Array.isArray(e&&e.priceList)&&e.priceList.some(t=>t&&null!==t.price&&void 0!==t.price)||e&&null!==e.price&&void 0!==e.price&&""!==e.price;if(!t)return this.$message.warning("该机器暂无价格,无法选择"),void this.$set(e,"_selected",!1)}catch(r){}const i=t.id,s=this.selectedMap[i]&&[...this.selectedMap[i]]||[],o=s.findIndex(t=>t&&t.id===e.id);a&&-1===o&&s.push(e),!a&&o>-1&&s.splice(o,1),this.$set(this.selectedMap,i,s),this.$set(e,"_selected",!!a)},handleGetInnerRowClass({row:t}){return t&&(1===t.saleState||2===t.saleState)?"sold-row":""},handleDecreaseVariantQuantity(t,e){const a=this.productListData[t].variants[e];a.quantity>1&&a.quantity--},handleIncreaseVariantQuantity(t,e){const a=this.productListData[t].variants[e];a.quantity<99&&a.quantity++},handleVariantQuantityInput(t,e){const a=this.productListData[t].variants[e],i=Number(a.quantity);(!i||i<1)&&(a.quantity=1),i>99&&(a.quantity=99)},handleAddVariantToCart(t){if(t&&t.onlyKey)try{addToCart({id:t.onlyKey,title:t.model,price:t.price,quantity:t.quantity}),this.$message.success(`已添加 ${t.quantity} 件 ${t.model} 到购物车`),t.quantity=1}catch(e){console.error("添加到购物车失败:",e)}},handleAddSelectedToCart(){const t=Object.values(this.selectedMap).flat().filter(Boolean);if(t.length)try{t.forEach(t=>{addToCart({id:t.onlyKey||t.id,title:t.type||t.model||"矿机",price:t.price,quantity:1,leaseTime:Number(t.leaseTime||1)})}),this.$message.success(`已加入 ${t.length} 台矿机到购物车`),this.selectedMap={}}catch(e){console.error("统一加入购物车失败",e)}else this.$message.warning("请先勾选至少一台矿机")},handleOpenAddToCartDialog(){const t=Array.isArray(this.dynamicRows)?this.dynamicRows:[],e=t.filter(t=>!!t&&!!t._selected);e.length?(this.confirmAddDialog.items=e.map(t=>({...t,leaseTime:Number(t.leaseTime||1),purchaseQuantity:Number(t.purchaseQuantity||1)})),this.confirmAddDialog.visible=!0):this.$message.warning("请先勾选至少一台矿机")},async handleConfirmAddSelectedToCart(){const t=Array.isArray(this.confirmAddDialog.items)?this.confirmAddDialog.items.filter(Boolean):[];if(t.length)try{const a=t.map(t=>{const e={id:t.id,leaseTime:Number(t.leaseTime||1)};return 0===this.machineType&&(e.numbers=Number(t.purchaseQuantity||1)),e}),i=await(0,s.addGoodsV2)(a);!i||0!==i.code&&200!==i.code||this.$message({message:`已加入 ${t.length} 台矿机到购物车`,type:"success",duration:3e3,showClose:!0}),this.confirmAddDialog.visible=!1;try{(this.dynamicRows||[]).forEach(t=>{t&&this.$set(t,"_selected",!1)})}catch(e){}try{window.dispatchEvent(new CustomEvent("cart-updated"))}catch(e){}}catch(e){console.error("addGoodsV2 error:",e),this.$message.error("加入购物车失败,请稍后重试")}else this.$message.warning("请先勾选至少一台矿机")},clearAllSelections(){try{if(this.selectedMap={},Array.isArray(this.machineList)&&this.machineList.length)return void this.machineList.forEach(t=>{t&&this.$set(t,"_selected",!1)});const t=Array.isArray(this.productListData)?this.productListData:[];t.forEach(t=>{const e=Array.isArray(t.productMachines)?t.productMachines:[];e.forEach(t=>{t&&this.$set(t,"_selected",!1)})})}catch(t){}},handleDecreaseQuantity(t){this.tableData[t].quantity>1&&this.tableData[t].quantity--},handleIncreaseQuantity(t){this.tableData[t].quantity<99&&this.tableData[t].quantity++},handleQuantityInput(t){const e=this.tableData[t].quantity;e<1?this.tableData[t].quantity=1:e>99&&(this.tableData[t].quantity=99)},handleQuantityBlur(t){const e=this.tableData[t].quantity;!e||e<1?this.tableData[t].quantity=1:e>99&&(this.tableData[t].quantity=99)},handleAddToCart(t){if(!t||t.quantity<1)this.$message.warning("请选择有效的数量");else try{addToCart({id:t.date,title:t.date,price:t.price,quantity:t.quantity,leaseTime:Number(t.leaseTime||1)}),this.$message.success(`已添加 ${t.quantity} 件 ${t.date} 到购物车`),t.quantity=1}catch(e){console.error("添加到购物车失败:",e),this.$message.error("添加到购物车失败,请稍后重试")}},handleSizeChange(t){console.log(`每页 ${t} 条`),this.params.pageSize=t,this.params.pageNum=1,this.currentPage=1,this.fetchGetMachineInfo(this.buildQueryParams())},handleCurrentChange(t){console.log(`当前页: ${t}`),this.params.pageNum=t,this.fetchGetMachineInfo(this.buildQueryParams())}}}},4555:function(t,e){e.Yp=e.XX=void 0;e.XX=function(){var t=this,e=t._self._c;return e("div",{staticClass:"auth-container"},[t._m(0),e("div",{staticClass:"auth-card"},[e("div",{staticClass:"close-btn",attrs:{title:"返回商城"},on:{click:t.goToShop}},[e("i",{staticClass:"el-icon-close"})]),t._m(1),e("el-form",{ref:"loginForm",staticClass:"auth-form",attrs:{model:t.loginForm,rules:t.loginRules},nativeOn:{submit:function(e){return e.preventDefault(),t.handleLogin.apply(null,arguments)}}},[e("el-form-item",{attrs:{prop:"email"}},[e("el-input",{attrs:{placeholder:"请输入邮箱","prefix-icon":"el-icon-message",size:"large",clearable:""},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleLogin.apply(null,arguments)}},model:{value:t.loginForm.email,callback:function(e){t.$set(t.loginForm,"email",e)},expression:"loginForm.email"}})],1),e("el-form-item",{attrs:{prop:"password"}},[e("el-input",{attrs:{type:"password",placeholder:"请输入密码(8-32位)","prefix-icon":"el-icon-lock",size:"large","show-password":"",clearable:""},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleLogin.apply(null,arguments)}},model:{value:t.loginForm.password,callback:function(e){t.$set(t.loginForm,"password",e)},expression:"loginForm.password"}}),e("div",{staticClass:"password-tip"},[e("i",{staticClass:"el-icon-info"}),e("span",[t._v("密码需包含大小写字母、数字和特殊字符,长度8-32位")])])],1),e("el-form-item",{attrs:{prop:"code"}},[e("div",{staticClass:"code-input-wrapper"},[e("el-input",{attrs:{placeholder:"请输入邮箱验证码","prefix-icon":"el-icon-key",size:"large",maxlength:"10",clearable:""},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleLogin.apply(null,arguments)}},model:{value:t.loginForm.code,callback:function(e){t.$set(t.loginForm,"code",e)},expression:"loginForm.code"}}),e("el-button",{staticClass:"send-code-btn",attrs:{type:"primary",size:"large",disabled:t.countdown>0,loading:t.sendingCode},on:{click:t.handleSendCode}},[t._v(" "+t._s(t.countdown>0?`${t.countdown}秒后重试`:"获取验证码")+" ")])],1)]),e("div",{staticClass:"auth-options"},[e("span"),e("router-link",{staticClass:"link-text",attrs:{to:"/reset-password"}},[t._v(" 忘记密码? ")])],1),e("el-form-item",[e("el-button",{staticClass:"auth-submit-btn",attrs:{type:"primary",size:"large",loading:t.loading},on:{click:t.handleLogin}},[t._v(" "+t._s(t.loading?"登录中...":"登录")+" ")])],1),e("div",{staticClass:"auth-footer"},[e("span",{staticClass:"footer-text"},[t._v("还没有账号?")]),e("router-link",{staticClass:"link-text link-primary",attrs:{to:"/register"}},[t._v(" 立即注册 ")])],1)],1)],1)])},e.Yp=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"auth-background"},[e("div",{staticClass:"bg-circle circle-1"}),e("div",{staticClass:"bg-circle circle-2"}),e("div",{staticClass:"bg-circle circle-3"})])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"auth-header"},[e("h1",{staticClass:"auth-title"},[t._v("欢迎登录")]),e("p",{staticClass:"auth-subtitle"},[t._v("Power Leasing - 算力租赁平台")])])}]},4601:function(t,e,a){Object.defineProperty(e,"B",{value:!0}),e.A=void 0,a(4114),a(8111),a(2489),a(7588),a(1701);a(5705);var i=a(6299),s=a(6966);e.A={name:"AccountShopConfig",data(){return{productOptions:[],form:{chain:"",payAddress:"",payCoin:""},shop:{id:0,name:"",image:"",description:"",del:!0,state:0},value:[],currentChain:"",cascaderProps:{multiple:!0,checkStrictly:!1,emitPath:!0,value:"value",label:"label",children:"children"},options:[],loading:!1,preCheck:{visible:!1,rows:[],prices:{},rowPrices:{}}}},mounted(){this.getChainAndList()},methods:{handleRemoveSelectedCoin(t){const e=String(t||"").toLowerCase(),a=(this.value||[]).filter(t=>Array.isArray(t)&&String(t[1]).toLowerCase()!==e);this.handleChange(a)},handleItemClick(t,e){if(t)if(t.isLeaf){const e=t.path.map(t=>t.value),a=e[0],i=e[1];this.currentChain=String(a||"");let s=Array.isArray(this.value)?this.value.slice():[];const o=s.length?s[s.length-1]:null,r=Array.isArray(o)?o[0]:null;r&&r!==a&&(s=[]);const n=s.findIndex(t=>Array.isArray(t)&&t[0]===a&&t[1]===i);n>=0?s.splice(n,1):s.push([a,i]),this.handleChange(s)}else{const a=e&&e.value;t.expanded||t.expand(),a&&(this.currentChain=String(a),this.value=[],this.form.chain=String(a),this.form.payCoin="")}},handleExpandChange(t){const e=Array.isArray(t)&&t[0]||"";e&&(this.currentChain=String(e))},validateAddressByChain(t,e){const a=String(t||"").toLowerCase(),i=String(e||"").trim();if(!i)return{ok:!1,message:"请输入收款地址"};if(a.includes("tron")||"tron"===a){const t=/^T[A-Za-z1-9]{33}$/.test(i);return t?{ok:!0}:{ok:!1,message:"请输入正确的 TRON 地址:以 T 开头的 34 位字符"}}if(a.includes("ethereum")||"ethereum"===a||a.includes("eth")||a.includes("bsc")||"bsc"===a||a.includes("polygon")||"polygon"===a||a.includes("erc")||a.includes("bep")){const t=/^0x[a-fA-F0-9]{40}$/.test(i);return t?{ok:!0}:{ok:!1,message:"请输入正确的以太坊/EVM 兼容链地址:以 0x 开头 + 40 位十六进制"}}return i.length<=10?{ok:!1,message:"请输入正确的收款地址格式"}:{ok:!0}},async getChainAndList(){this.loading=!0;const t=await(0,i.getChainAndList)();t&&(0===t.code||200===t.code)&&t.data&&(this.options=this.toUpperOptions(t.data)),this.loading=!1},toUpperOptions(t){const e=Array.isArray(t)?t:[];return e.map(t=>{const e={...t},a=t&&(null!=t.label?t.label:t.value)||"";return e.label=String(a).toUpperCase(),Array.isArray(t&&t.children)&&(e.children=this.toUpperOptions(t.children)),e})},async FetchAddWalletShopConfig(t){this.loading=!0;let e=t.payAddress;if(t.payAddress){const a=(0,s.rsaEncryptSync)(t.payAddress);if(a)e=a;else{const a=await(0,s.rsaEncrypt)(t.payAddress);if(!a)return this.$message.error("钱包地址加密失败,请重试"),void(this.loading=!1);e=a}}const a={...t,payAddress:e},o=await(0,i.addWalletShopConfig)(a);!o||0!==o.code&&200!==o.code||(this.$message.success("绑定成功"),this.$router.push("/account/shops")),this.loading=!1},handleChange(t){const e=Array.isArray(t)?t:[];if(0===e.length)return this.form.chain="",this.form.payCoin="",void(this.value=[]);const a=e[e.length-1],i=Array.isArray(a)?a[0]:"",s=this.currentChain||i,o=e.filter(t=>Array.isArray(t)&&t[0]===s);this.value=o,this.form.chain=s||"",this.form.payCoin=o.map(t=>t[1]).filter(Boolean).join(",")},handleSave(){const t=Array.isArray(this.value)?this.value:[];if(this.form.chain=t.length?t[0]&&t[0][0]:"",this.form.payCoin=t.map(t=>t&&t[1]).filter(Boolean).join(","),!this.form.chain)return void this.$message.warning("请选择链");if(!this.form.payCoin)return void this.$message.warning("请选择币种");if(!this.form.payAddress)return void this.$message.warning("请输入钱包地址");const{ok:e,message:a}=this.validateAddressByChain(this.form.chain,this.form.payAddress);e?this.preCheckBeforeBind():this.$message.warning(a||"钱包地址格式不正确")},async preCheckBeforeBind(){try{this.loading=!0,this.preCheck.visible=!1,this.preCheck.rows=[];const t={chain:this.form.chain,payCoin:this.form.payCoin},e=await(0,i.getProductListForShopWalletConfig)(t),a=e&&(0===e.code||200===e.code);if(!a)return void await this.submitBindWithPrice([]);const s=Array.isArray(e&&e.data)?e.data:Array.isArray(e&&e.rows)?e.rows:[];if(Array.isArray(s)&&s.length>0){this.preCheck.rows=s;const t=(this.form.payCoin||"").split(",").map(t=>t.trim().toUpperCase()).filter(Boolean),e={};t.forEach(t=>{t in this.preCheck.prices||(e[t]="")}),this.preCheck.prices={...e,...this.preCheck.prices},this.preCheck.rowPrices=this.preCheck.rowPrices||{},this.preCheck.rows.forEach((e,a)=>{const i=this.getRowKey(e,a);this.preCheck.rowPrices[i]||this.$set(this.preCheck.rowPrices,i,{}),t.forEach(t=>{t in this.preCheck.rowPrices[i]||this.$set(this.preCheck.rowPrices[i],t,"")})}),this.preCheck.visible=!0}else this.preCheck.visible=!1,this.preCheck.rows=[],await this.submitBindWithPrice([])}catch(t){this.preCheck.visible=!1,this.preCheck.rows=[],await this.submitBindWithPrice([])}finally{this.loading=!1}},handleConfirmBindAfterPreview(){const t=(this.form.payCoin||"").split(",").map(t=>t.trim().toUpperCase()).filter(Boolean);for(let a=0;a{null!=e&&""!==e&&t.push(e)};return(t||[]).forEach((t,i)=>{const s=[];Array.isArray(t&&t.machineList)&&t.machineList.forEach(t=>a(s,t&&(null!=t.productMachineId?t.productMachineId:t.id))),Array.isArray(t&&t.productMachineIdList)&&t.productMachineIdList.forEach(t=>a(s,t)),t&&null!=t.productMachineId&&a(s,t.productMachineId),Array.isArray(t&&t.productMachineDtoList)&&t.productMachineDtoList.forEach(t=>a(s,t&&(null!=t.productMachineId?t.productMachineId:t.id))),Array.isArray(t&&t.machines)&&t.machines.forEach(t=>a(s,t&&(null!=t.productMachineId?t.productMachineId:t.id))),Array.isArray(t&&t.items)&&t.items.forEach(t=>a(s,t&&(null!=t.productMachineId?t.productMachineId:t.id)));const o=this.getRowKey(t,i);e.push({key:o,machineIds:s})}),e},getRowKey(t,e){return t&&null!=t.productId?String(t.productId):t&&null!=t.id?`p-${t.id}`:`idx-${e}`},async submitBindWithPrice(t){try{this.loading=!0;const e=(this.form.payCoin||"").split(",").map(t=>t.trim().toUpperCase()).filter(Boolean),a=[];Array.isArray(t)&&t.length&&t.forEach(t=>{const i=this.preCheck.rowPrices&&this.preCheck.rowPrices[t.key]||{},s=e.map(t=>i[t]||"").join(",");(t.machineIds||[]).forEach(t=>{a.push({productMachineId:t,price:s})})});let o=this.form.payAddress;if(this.form.payAddress){const t=(0,s.rsaEncryptSync)(this.form.payAddress);if(t)o=t;else{const t=await(0,s.rsaEncrypt)(this.form.payAddress);if(!t)return this.$message.error("钱包地址加密失败,请重试"),void(this.loading=!1);o=t}}const r={chain:this.form.chain,symbol:this.form.payCoin,payAddress:o,productMachineForWalletConfigVoList:a},n=await(0,i.updateProductListForShopWalletConfig)(r);!n||0!==n.code&&200!==n.code?(this.preCheck.visible=!1,this.resetPreCheckPrices()):(this.preCheck.visible=!1,this.resetPreCheckPrices(),this.$message.success("绑定成功"),this.$router.push("/account/shops"))}catch(e){}finally{this.loading=!1}},handleReset(){this.form={chain:"",payAddress:"",payCoin:""},this.value=[]},resetPreCheckPrices(){try{this.preCheck.prices={},this.preCheck.rowPrices={}}catch(t){}},handlePreCheckClose(){this.resetPreCheckPrices()}},computed:{coinsForBind(){return(this.form.payCoin||"").split(",").map(t=>t.trim().toUpperCase()).filter(Boolean)},canSubmitPreCheck(){if(!this.preCheck||!this.preCheck.visible)return!1;const t=this.coinsForBind;if(!t.length)return!1;for(let e=0;e<(this.preCheck.rows||[]).length;e++){const a=this.preCheck.rows[e],i=this.getRowKey(a,e),s=this.preCheck.rowPrices&&this.preCheck.rowPrices[i]||{};for(const e of t){const t=s[e];if(!t||Number(t)<=0)return!1}}return!0},selectedCoinsDisplay(){const t=Array.isArray(this.value)?this.value:[],e=t.map(t=>t&&t[1]).filter(Boolean).map(t=>String(t).toUpperCase());return e.join("、")},selectedCoins(){const t=Array.isArray(this.value)?this.value:[];return t.map(t=>t&&t[1]).filter(Boolean).map(t=>String(t).toUpperCase())}}}},4679:function(t,e){e.Yp=e.XX=void 0;e.XX=function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"loading",rawName:"v-loading",value:t.statusLoading,expression:"statusLoading"}],staticClass:"security-settings"},[e("div",{staticClass:"security-item-wrapper"},[e("div",{staticClass:"security-item"},[t._m(0),e("div",{staticClass:"security-right"},[e("span",{staticClass:"security-status",class:t.getStatusClass},[t._v(" "+t._s(t.getStatusText)+" ")]),e("el-button",{staticClass:"security-btn two-factor-btn",attrs:{type:"text",loading:t.loading},on:{click:t.handleButtonClick}},[t._v(" "+t._s(t.getButtonText)+" ")])],1)]),e("div",{staticClass:"security-divider"})]),e("div",{staticClass:"security-item-wrapper"},[e("div",{staticClass:"security-item"},[t._m(1),e("div",{staticClass:"security-right"},[e("el-button",{staticClass:"security-btn change-password-btn",attrs:{type:"text"},on:{click:t.handleChangePassword}},[t._v(" 修改 ")])],1)]),e("div",{staticClass:"security-divider"})]),e("div",{staticClass:"security-item-wrapper"},[e("div",{staticClass:"security-item"},[t._m(2),e("div",{staticClass:"security-right"},[e("el-button",{staticClass:"security-btn delete-account-btn",attrs:{type:"text"},on:{click:t.handleDeleteAccount}},[t._v(" 注销 ")])],1)]),e("div",{staticClass:"security-divider"})]),e("el-dialog",{attrs:{title:"开启双重验证 - 步骤 1/2",visible:t.step1Visible,width:"600px","close-on-click-modal":!1},on:{"update:visible":function(e){t.step1Visible=e},close:t.handleStep1Close}},[e("div",{staticClass:"step1-content"},[e("div",{staticClass:"instruction-text"},[e("p",[t._v("请使用您手机上的谷歌身份验证器 (Google Authenticator) 或其它兼容应用程序扫描下方二维码,也可手动输入以下密钥。")])]),e("div",{staticClass:"qr-section"},[t.qrCodeUrl?e("div",{staticClass:"qr-code-wrapper"},[e("img",{staticClass:"qr-code",attrs:{src:t.getQrCodeSrc,alt:"二维码"}})]):e("div",{staticClass:"qr-loading"},[e("i",{staticClass:"el-icon-loading"}),e("span",[t._v("加载中...")])])]),e("div",{staticClass:"secret-key-section"},[e("div",{staticClass:"secret-key-label"},[t._v("或手动输入密钥:")]),e("div",{staticClass:"secret-key-input-group"},[e("el-input",{staticClass:"secret-key-input",attrs:{readonly:""},model:{value:t.secretKey,callback:function(e){t.secretKey=e},expression:"secretKey"}}),e("el-button",{attrs:{type:"primary",disabled:!t.secretKey},on:{click:t.handleCopySecret}},[t._v(" 复制 ")])],1)]),e("div",{staticClass:"warning-box"},[e("i",{staticClass:"el-icon-warning"}),e("div",{staticClass:"warning-text"},[e("p",[t._v("请妥善保存密钥,避免被盗或丢失。如遇手机丢失等情况,可通过该密钥恢复您的谷歌验证。如密钥丢失,需要提交工单通过人工客服重置,处理时间需7天。")])])])]),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:function(e){t.step1Visible=!1}}},[t._v("取消")]),e("el-button",{attrs:{type:"primary",disabled:!t.qrCodeUrl||!t.secretKey},on:{click:t.handleNextToStep2}},[t._v(" 下一步 ")])],1)]),e("el-dialog",{attrs:{title:"开启双重验证 - 步骤 2/2",visible:t.step2Visible,width:"500px","close-on-click-modal":!1},on:{"update:visible":function(e){t.step2Visible=e},close:t.handleStep2Close}},[e("el-form",{ref:"verifyForm",attrs:{model:t.verifyForm,rules:t.verifyRules,"label-position":"top"}},[e("el-form-item",{attrs:{label:"登录密码",prop:"password"}},[e("el-input",{attrs:{type:"password",placeholder:"请输入密码(8-32位)","show-password":"",clearable:""},model:{value:t.verifyForm.password,callback:function(e){t.$set(t.verifyForm,"password",e)},expression:"verifyForm.password"}}),e("div",{staticClass:"password-tip"},[e("i",{staticClass:"el-icon-info"}),e("span",[t._v("密码需包含大小写字母、数字和特殊字符,长度8-32位")])])],1),e("el-form-item",{attrs:{label:"邮箱验证码",prop:"emailCode"}},[e("div",{staticClass:"code-input-group"},[e("el-input",{staticClass:"code-input",attrs:{placeholder:"请输入邮箱验证码",maxlength:"10",clearable:""},model:{value:t.verifyForm.emailCode,callback:function(e){t.$set(t.verifyForm,"emailCode",e)},expression:"verifyForm.emailCode"}}),e("el-button",{attrs:{type:"primary",loading:t.sendingCode,disabled:t.countdown>0},on:{click:t.handleSendEmailCode}},[t._v(" "+t._s(t.countdown>0?`${t.countdown}秒后重试`:"发送验证码")+" ")])],1),e("div",{staticClass:"help-link"},[e("a",{attrs:{href:"javascript:void(0)"},on:{click:t.handleCannotGetCode}},[t._v("无法获取验证码?")])])]),e("el-form-item",{attrs:{label:"谷歌验证码",prop:"googleCode"}},[e("el-input",{attrs:{placeholder:"请输入6位动态口令",maxlength:"6"},on:{input:t.handleGoogleCodeInput},model:{value:t.verifyForm.googleCode,callback:function(e){t.$set(t.verifyForm,"googleCode",e)},expression:"verifyForm.googleCode"}}),e("div",{staticClass:"help-link"},[e("a",{attrs:{href:"javascript:void(0)"},on:{click:t.handleCannotGetGoogleCode}},[t._v("无法获取验证码?")])])],1)],1),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:t.handleBackToStep1}},[t._v("上一步")]),e("el-button",{attrs:{type:"primary",loading:t.submitting},on:{click:t.handleConfirm}},[t._v(" 确定 ")])],1)],1),e("el-dialog",{attrs:{title:"关闭双重验证",visible:t.closeDialogVisible,width:"500px","close-on-click-modal":!1},on:{"update:visible":function(e){t.closeDialogVisible=e},close:t.handleCloseDialogClose}},[e("el-form",{ref:"closeForm",attrs:{model:t.closeForm,rules:t.closeRules,"label-position":"top"}},[e("el-form-item",{attrs:{label:"邮箱验证码",prop:"emailCode"}},[e("div",{staticClass:"code-input-group"},[e("el-input",{staticClass:"code-input",attrs:{placeholder:"请输入邮箱验证码",maxlength:"10",clearable:""},model:{value:t.closeForm.emailCode,callback:function(e){t.$set(t.closeForm,"emailCode",e)},expression:"closeForm.emailCode"}}),e("el-button",{attrs:{type:"primary",loading:t.sendingCloseCode,disabled:t.closeCountdown>0},on:{click:t.handleSendCloseEmailCode}},[t._v(" "+t._s(t.closeCountdown>0?`${t.closeCountdown}秒后重试`:"发送验证码")+" ")])],1)]),e("el-form-item",{attrs:{label:"谷歌验证码",prop:"googleCode"}},[e("el-input",{attrs:{placeholder:"请输入6位动态口令",maxlength:"6",clearable:""},on:{input:t.handleCloseGoogleCodeInput},model:{value:t.closeForm.googleCode,callback:function(e){t.$set(t.closeForm,"googleCode",e)},expression:"closeForm.googleCode"}})],1)],1),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:function(e){t.closeDialogVisible=!1}}},[t._v("取消")]),e("el-button",{attrs:{type:"primary",loading:t.closing},on:{click:t.handleConfirmClose}},[t._v(" 确定 ")])],1)],1),e("el-dialog",{attrs:{title:"开启双重验证",visible:t.openDialogVisible,width:"500px","close-on-click-modal":!1},on:{"update:visible":function(e){t.openDialogVisible=e},close:t.handleOpenDialogClose}},[e("el-form",{ref:"openForm",attrs:{model:t.openForm,rules:t.openRules,"label-position":"top"}},[e("el-form-item",{attrs:{label:"邮箱验证码",prop:"emailCode"}},[e("div",{staticClass:"code-input-group"},[e("el-input",{staticClass:"code-input",attrs:{placeholder:"请输入邮箱验证码",maxlength:"10",clearable:""},model:{value:t.openForm.emailCode,callback:function(e){t.$set(t.openForm,"emailCode",e)},expression:"openForm.emailCode"}}),e("el-button",{attrs:{type:"primary",loading:t.sendingOpenCode,disabled:t.openCountdown>0},on:{click:t.handleSendOpenEmailCode}},[t._v(" "+t._s(t.openCountdown>0?`${t.openCountdown}秒后重试`:"发送验证码")+" ")])],1)]),e("el-form-item",{attrs:{label:"谷歌验证码",prop:"googleCode"}},[e("el-input",{attrs:{placeholder:"请输入6位动态口令",maxlength:"6",clearable:""},on:{input:t.handleOpenGoogleCodeInput},model:{value:t.openForm.googleCode,callback:function(e){t.$set(t.openForm,"googleCode",e)},expression:"openForm.googleCode"}})],1)],1),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:function(e){t.openDialogVisible=!1}}},[t._v("取消")]),e("el-button",{attrs:{type:"primary",loading:t.opening},on:{click:t.handleConfirmOpen}},[t._v(" 确定 ")])],1)],1),e("el-dialog",{attrs:{title:"修改密码",visible:t.changePasswordDialogVisible,width:"500px","close-on-click-modal":!1},on:{"update:visible":function(e){t.changePasswordDialogVisible=e},close:t.handleChangePasswordDialogClose}},[e("el-form",{ref:"changePasswordForm",attrs:{model:t.changePasswordForm,rules:t.changePasswordRules,"label-position":"top"}},[e("el-form-item",{attrs:{label:"用户邮箱"}},[e("el-input",{staticClass:"email-display",attrs:{value:t.userEmail,readonly:"",disabled:""}})],1),e("el-form-item",{attrs:{label:"邮箱验证码",prop:"emailCode"}},[e("div",{staticClass:"code-input-group"},[e("el-input",{staticClass:"code-input",attrs:{placeholder:"请输入邮箱验证码",maxlength:"10",clearable:""},model:{value:t.changePasswordForm.emailCode,callback:function(e){t.$set(t.changePasswordForm,"emailCode",e)},expression:"changePasswordForm.emailCode"}}),e("el-button",{attrs:{type:"primary",loading:t.sendingChangePasswordCode,disabled:t.changePasswordCountdown>0},on:{click:t.handleSendChangePasswordCode}},[t._v(" "+t._s(t.changePasswordCountdown>0?`${t.changePasswordCountdown}秒后重试`:"获取验证码")+" ")])],1)]),e("el-form-item",{attrs:{label:"新密码",prop:"password"}},[e("el-input",{attrs:{type:"password",placeholder:"请输入新密码(8-32位)","show-password":"",clearable:""},model:{value:t.changePasswordForm.password,callback:function(e){t.$set(t.changePasswordForm,"password",e)},expression:"changePasswordForm.password"}}),e("div",{staticClass:"password-tip"},[e("i",{staticClass:"el-icon-info"}),e("span",[t._v("密码需包含大小写字母、数字和特殊字符,长度8-32位")])])],1),e("el-form-item",{attrs:{label:"确认新密码",prop:"confirmPassword"}},[e("el-input",{attrs:{type:"password",placeholder:"请再次输入新密码","show-password":"",clearable:""},model:{value:t.changePasswordForm.confirmPassword,callback:function(e){t.$set(t.changePasswordForm,"confirmPassword",e)},expression:"changePasswordForm.confirmPassword"}})],1),e("el-form-item",{attrs:{label:"谷歌验证码",prop:"googleCode"}},[e("el-input",{attrs:{placeholder:"请输入6位动态口令",maxlength:"6",clearable:""},on:{input:t.handleChangePasswordGoogleCodeInput},model:{value:t.changePasswordForm.googleCode,callback:function(e){t.$set(t.changePasswordForm,"googleCode",e)},expression:"changePasswordForm.googleCode"}})],1)],1),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:function(e){t.changePasswordDialogVisible=!1}}},[t._v("取消")]),e("el-button",{attrs:{type:"primary",loading:t.changingPassword},on:{click:t.handleConfirmChangePassword}},[t._v(" 确认修改 ")])],1)],1),e("el-dialog",{attrs:{title:"注销账号",visible:t.deleteAccountDialogVisible,width:"500px","close-on-click-modal":!1},on:{"update:visible":function(e){t.deleteAccountDialogVisible=e},close:t.handleDeleteAccountDialogClose}},[e("el-form",{ref:"deleteAccountForm",attrs:{model:t.deleteAccountForm,rules:t.deleteAccountRules,"label-position":"top"}},[e("el-form-item",{attrs:{label:"用户邮箱"}},[e("el-input",{staticClass:"email-display",attrs:{value:t.userEmail,readonly:"",disabled:""}})],1),e("el-form-item",{attrs:{label:"邮箱验证码",prop:"emailCode"}},[e("div",{staticClass:"code-input-group"},[e("el-input",{staticClass:"code-input",attrs:{placeholder:"请输入邮箱验证码",maxlength:"10",clearable:""},model:{value:t.deleteAccountForm.emailCode,callback:function(e){t.$set(t.deleteAccountForm,"emailCode",e)},expression:"deleteAccountForm.emailCode"}}),e("el-button",{attrs:{type:"primary",loading:t.sendingDeleteAccountCode,disabled:t.deleteAccountCountdown>0},on:{click:t.handleSendDeleteAccountCode}},[t._v(" "+t._s(t.deleteAccountCountdown>0?`${t.deleteAccountCountdown}秒后重试`:"获取验证码")+" ")])],1)]),e("el-form-item",{attrs:{label:"谷歌验证码",prop:"googleCode"}},[e("el-input",{attrs:{placeholder:"请输入6位动态口令",maxlength:"6",clearable:""},on:{input:t.handleDeleteAccountGoogleCodeInput},model:{value:t.deleteAccountForm.googleCode,callback:function(e){t.$set(t.deleteAccountForm,"googleCode",e)},expression:"deleteAccountForm.googleCode"}})],1)],1),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:function(e){t.deleteAccountDialogVisible=!1}}},[t._v("取消")]),e("el-button",{attrs:{type:"danger",loading:t.deletingAccount},on:{click:t.handleConfirmDeleteAccount}},[t._v(" 确定注销 ")])],1)],1)],1)},e.Yp=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"security-left"},[e("div",{staticClass:"security-icon"},[e("i",{staticClass:"el-icon-lock"})]),e("div",{staticClass:"security-info"},[e("div",{staticClass:"security-title"},[t._v("双重验证")]),e("p",{staticClass:"security-desc"},[t._v("用于登录帐户、结算订单、提现、修改登录密码等,涉及账户安全的重要操作。")])])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"security-left"},[e("div",{staticClass:"security-icon"},[e("i",{staticClass:"el-icon-edit"})]),e("div",{staticClass:"security-info"},[e("div",{staticClass:"security-title"},[t._v("修改密码")]),e("p",{staticClass:"security-desc"},[t._v("定期修改密码可以提高账户安全性,建议使用强密码并定期更换。")])])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"security-left"},[e("div",{staticClass:"security-icon"},[e("i",{staticClass:"el-icon-warning"})]),e("div",{staticClass:"security-info"},[e("div",{staticClass:"security-title"},[t._v("注销账号")]),e("p",{staticClass:"security-desc"},[t._v("注销账号将永久删除您的账户和所有相关数据,此操作不可恢复,请谨慎操作。")])])])}]},4767:function(t,e,a){a.r(e),a.d(e,{__esModule:function(){return s.B},default:function(){return l}});var i=a(2334),s=a(9814),o=s.A,r=a(845),n=(0,r.A)(o,i.XX,i.Yp,!1,null,"67d9e74a",null),l=n.exports},4779:function(t,e){e.Yp=e.XX=void 0;e.XX=function(){var t=this,e=t._self._c;return e("div",{staticClass:"purchased-machine-detail"},[e("div",{staticClass:"toolbar"},[e("div",{staticClass:"left-area"},[e("el-button",{staticClass:"back-btn",attrs:{type:"text",icon:"el-icon-arrow-left"},on:{click:t.handleBack}},[t._v(" 返回 ")]),e("h2",{staticClass:"page-title"},[t._v("已购商品详情")])],1)]),e("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"detail-content"},[t.detailData?e("el-card",{staticClass:"detail-card"},[e("div",{staticClass:"card-header",attrs:{slot:"header"},slot:"header"},[e("span",[t._v("基本信息")])]),e("el-descriptions",{attrs:{column:2,border:""}},[e("el-descriptions-item",{attrs:{label:"挖矿账户"}},[t._v(" "+t._s(t.detailData.poolUser||"—")+" ")]),e("el-descriptions-item",{attrs:{label:"矿池名称"}},[t._v(" "+t._s(t.detailData.pool||"—")+" ")]),e("el-descriptions-item",{attrs:{label:"矿池挖矿地址"}},[t.detailData.poolUrl?e("div",{staticClass:"address-item"},[e("span",{staticClass:"mono-ellipsis"},[t._v(t._s(t.detailData.poolUrl))]),e("el-button",{staticClass:"copy-btn",attrs:{type:"text",size:"mini",icon:"el-icon-document-copy"},on:{click:function(e){return t.handleCopy(t.detailData.poolUrl,"矿池挖矿地址")}}},[t._v(" 复制 ")])],1):e("span",[t._v("—")])]),e("el-descriptions-item",{attrs:{label:"矿池所挖币种"}},[t._v(" "+t._s(t.detailData.coin||"—")+" ")]),e("el-descriptions-item",{attrs:{label:"币种对应算法"}},[t._v(" "+t._s(t.detailData.algorithm||"—")+" ")]),e("el-descriptions-item",{attrs:{label:"收款钱包"}},[t.detailData.walletAddress?e("div",{staticClass:"address-item"},[e("span",{staticClass:"mono-ellipsis",staticStyle:{"font-family":"monospace"}},[t._v(t._s(t.detailData.walletAddress))]),e("el-button",{staticClass:"copy-btn",attrs:{type:"text",size:"mini",icon:"el-icon-document-copy"},on:{click:function(e){return t.handleCopy(t.detailData.walletAddress,"收款钱包")}}},[t._v(" 复制 ")])],1):e("span",[t._v("—")])]),t.detailData.watchUrl?e("el-descriptions-item",{attrs:{label:"挖矿信息页面地址"}},[e("div",{staticClass:"address-item"},[e("span",{staticClass:"mono-ellipsis"},[t._v(t._s(t.detailData.watchUrl))]),e("el-button",{staticClass:"copy-btn",attrs:{type:"text",size:"mini",icon:"el-icon-document-copy"},on:{click:function(e){return t.handleCopy(t.detailData.watchUrl,"挖矿信息页面地址")}}},[t._v(" 复制 ")])],1)]):t._e()],1)],1):t._e(),t.detailData?e("el-card",{staticClass:"detail-card"},[e("div",{staticClass:"card-header",attrs:{slot:"header"},slot:"header"},[e("span",[t._v("已购矿机信息")])]),t.purchasedMachinesList&&t.purchasedMachinesList.length>0?e("el-table",{staticStyle:{width:"100%"},attrs:{data:t.purchasedMachinesList,border:"",stripe:"","header-cell-style":{textAlign:"left"},"cell-style":{textAlign:"left"}}},[e("el-table-column",{attrs:{prop:"workerId",label:"矿工号","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.workerId||"—"))])]}}],null,!1,3323832681)}),e("el-table-column",{attrs:{prop:"power",label:"实时算力","min-width":"140"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.power||"—"))])]}}],null,!1,1271444333)}),e("el-table-column",{attrs:{prop:"recordTime",label:"最近实时算力记录时间","min-width":"180"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(t.formatDateTime(a.row.recordTime)))])]}}],null,!1,889773213)}),e("el-table-column",{attrs:{prop:"startTime",label:"挖矿开始时间","min-width":"160"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(t.formatDateTime(a.row.startTime)))])]}}],null,!1,1820455728)}),e("el-table-column",{attrs:{prop:"endTime",label:"挖矿结束时间","min-width":"160"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(t.formatDateTime(a.row.endTime)))])]}}],null,!1,1075225151)}),e("el-table-column",{attrs:{prop:"status",label:"状态",width:"140"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-tag",{attrs:{type:t.getStatusType(a.row.status)}},[t._v(" "+t._s(t.getStatusText(a.row.status))+" ")])]}}],null,!1,2263538733)})],1):e("div",{staticClass:"empty-table"},[e("p",[t._v("暂无矿机信息")])])],1):t._e(),t.loading||t.detailData?t._e():e("div",{staticClass:"empty-state"},[e("p",[t._v("未找到详情信息")])])],1)])},e.Yp=[]},4792:function(t,e,a){var i=a(3999)["default"];Object.defineProperty(e,"B",{value:!0}),e.A=void 0;var s=i(a(3525)),o=i(a(6565));e.A={name:"AccountSellerFundsFlow",components:{AccountReceiptRecord:s.default,AccountWithdrawRecord:o.default},data(){return{activeTab:"receipt"}},computed:{activeComponentName(){return"withdraw"===this.activeTab?"AccountWithdrawRecord":"AccountReceiptRecord"}},created(){this.syncTabFromRoute()},watch:{"$route.query.tab":{immediate:!1,handler(){this.syncTabFromRoute()}}},methods:{syncTabFromRoute(){const t=String(this.$route&&this.$route.query&&this.$route.query.tab||"");this.activeTab="withdraw"===t?"withdraw":"receipt"},handleTabClick(){const t="withdraw"===this.activeTab?"withdraw":"receipt",e=String(this.$route&&this.$route.query&&this.$route.query.tab||"");e!==t&&this.$router.replace({query:{...this.$route.query||{},tab:t}})}}}},4981:function(t,e){function a(){return 6}function i(t,e){if(null===t||void 0===t)return{text:"0",truncated:!1,full:"0"};const a=String(t);if(!a)return{text:"0",truncated:!1,full:"0"};if(!/^-?\d+(\.\d+)?$/.test(a))return{text:a,truncated:!1,full:a};const i=a.startsWith("-"),s=i?a.slice(1):a,[o,r=""]=s.split("."),n=r.slice(0,Math.max(0,e)),l=r.length>e,c=(i?"-":"")+(n?`${o}.${n}`:o);return{text:c,truncated:l,full:a}}function s(t,e){const s=a(e);return i(t,s)}function o(t){return i(t,6)}Object.defineProperty(e,"__esModule",{value:!0}),e.getMaxDecimalsByCoin=a,e.truncateAmountByCoin=s,e.truncateAmountRaw=i,e.truncateTo6=o},4994:function(t,e,a){Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=void 0,a(4114),a(8111),a(7588);class i{constructor(){this.loadingStates=new Map,this.setupListeners()}setupListeners(){window.addEventListener("network-retry-complete",()=>{this.resetAllLoadingStates()})}setLoading(t,e,a){const i=`${t}:${e}`;this.loadingStates.set(i,{value:a,timestamp:Date.now()})}getLoading(t,e){const a=`${t}:${e}`,i=this.loadingStates.get(a);return!!i&&i.value}resetAllLoadingStates(){const t=[];this.loadingStates.forEach((e,a)=>{if(!0===e.value){const[e,i]=a.split(":");t.push({componentId:e,stateKey:i}),this.loadingStates.set(a,{value:!1,timestamp:Date.now()})}}),window.dispatchEvent(new CustomEvent("reset-loading-states",{detail:{componentsToUpdate:t}}))}resetComponentLoadingStates(t){const e=[];return this.loadingStates.forEach((a,i)=>{if(i.startsWith(`${t}:`)&&!0===a.value){const a=i.split(":")[1];e.push({componentId:t,stateKey:a}),this.loadingStates.set(i,{value:!1,timestamp:Date.now()})}}),e}}const s=new i;e["default"]=s},5002:function(t,e,a){a.r(e),a.d(e,{__esModule:function(){return s.B},default:function(){return l}});var i=a(7031),s=a(7692),o=s.A,r=a(845),n=(0,r.A)(o,i.XX,i.Yp,!1,null,"e9fc8b4a",null),l=n.exports},5027:function(t,e,a){a.r(e),a.d(e,{__esModule:function(){return s.B},default:function(){return l}});var i=a(9979),s=a(1977),o=s.A,r=a(845),n=(0,r.A)(o,i.XX,i.Yp,!1,null,"b8adaf98",null),l=n.exports},5129:function(t,e,a){var i=a(3999)["default"];Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=void 0;var s=i(a(5471)),o=i(a(5353));s.default.use(o.default);e["default"]=new o.default.Store({state:{},getters:{},mutations:{},actions:{},modules:{}})},5355:function(t,e,a){a.r(e),a.d(e,{__esModule:function(){return s.B},default:function(){return l}});var i=a(8466),s=a(1029),o=s.A,r=a(845),n=(0,r.A)(o,i.XX,i.Yp,!1,null,"69d09b20",null),l=n.exports},5366:function(t,e){e.Yp=e.XX=void 0;e.XX=function(){var t=this,e=t._self._c;return e("div",{staticClass:"funds-page"},[e("h3",{staticClass:"title"},[t._v("资金流水")]),e("div",{staticClass:"tabs-card",attrs:{"aria-label":"资金流水tab",tabindex:"0"}},[e("el-tabs",{on:{"tab-click":t.handleTabClick},model:{value:t.activeTab,callback:function(e){t.activeTab=e},expression:"activeTab"}},[e("el-tab-pane",{attrs:{label:"收款记录",name:"receipt"}}),e("el-tab-pane",{attrs:{label:"提现记录",name:"withdraw"}})],1),e("keep-alive",[e(t.activeComponentName,{tag:"component"})],1)],1)])},e.Yp=[]},5367:function(t,e,a){e.Yp=e.XX=void 0;e.XX=function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"loading",rawName:"v-loading",value:t.productListLoading,expression:"productListLoading"}],staticClass:"product-list"},[e("section",{staticClass:"container"},[e("h1",{staticClass:"page-title"},[t._v("商品列表")]),e("section",{staticClass:"filter-section"},[e("div",{staticClass:"filter-row"},[e("el-input",{staticClass:"search-input",attrs:{size:"middle",placeholder:"输入币种或算法搜索",clearable:""},on:{clear:t.handleAlgorithmClear},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleAlgorithmSearch.apply(null,arguments)}},scopedSlots:t._u([{key:"append",fn:function(){return[e("el-button",{attrs:{type:"primary"},on:{click:t.handleAlgorithmSearch}},[t._v("搜索")])]},proxy:!0}]),model:{value:t.searchAlgorithm,callback:function(e){t.searchAlgorithm=e},expression:"searchAlgorithm"}})],1)]),e("div",{staticClass:"product-list-grid"},[t._l(t.products,function(i,s){return e("div",{key:i.shopId||i.id||s,staticClass:"product-item",attrs:{tabindex:"0","aria-label":"查看详情"},on:{click:function(e){return t.handleProductClick(i)}}},[e("img",{staticClass:"product-image",attrs:{src:a(6278),alt:i.name}}),e("div",{staticClass:"product-info"},[e("h4",{staticClass:"title-line"},[e("span",{staticClass:"label"},[t._v("店铺:")]),e("span",{staticClass:"value ellipsis",attrs:{title:i.shopName||i.name}},[t._v(t._s(i.shopName||i.name))])]),e("p",{staticClass:"info-line coin-line"},[e("span",{staticClass:"label"},[t._v("币种:")]),e("el-tooltip",{attrs:{content:i.coin,placement:"top","open-delay":80}},[e("span",{staticClass:"value ellipsis",attrs:{tabindex:"0","aria-label":`币种 ${i.coin}`}},[t._v(t._s(i.coin))])])],1),e("p",{staticClass:"info-line algorithm-line"},[e("span",{staticClass:"label"},[t._v("算法:")]),e("el-tooltip",{attrs:{content:i.algorithm,placement:"top","open-delay":80}},[e("span",{staticClass:"value ellipsis",attrs:{tabindex:"0","aria-label":`算法 ${i.algorithm}`}},[t._v(t._s(i.algorithm))])])],1),e("div",{staticClass:"product-footer"},[e("div",{staticClass:"paytypes"},[e("span",{staticClass:"paytypes-label"},[t._v("支付方式:")]),t._l(i.payTypes||[],function(a,i){return e("el-tooltip",{key:i,attrs:{content:t.formatPayType(a),placement:"top","open-delay":80}},[e("img",{staticClass:"paytype-icon",attrs:{src:a.image,alt:t.formatPayType(a)}})])})],2),e("div",{staticClass:"right-meta"},[e("span",{staticClass:"product-sold",attrs:{"aria-label":"已售数量"}},[t._v("已售:"+t._s(i&&null!=i.saleNumber?i.saleNumber:0))])])])])])}),0!==t.products.length||t.productListLoading?t._e():e("div",{staticClass:"empty-state"},[e("i",{staticClass:"el-icon-goods"}),e("p",[t._v("暂无商品数据")]),e("p",{staticStyle:{"font-size":"12px",color:"#999","margin-top":"8px"}},[t._v("请检查网络连接或联系管理员")])])],2)])])},e.Yp=[]},5502:function(t,e,a){Object.defineProperty(e,"B",{value:!0}),e.A=void 0,a(4114);var i=a(1673),s=a(6966),o=a(2549);e.A={name:"SecuritySettings",data(){const t=(t,e,a)=>{if(!e)return void a(new Error("请输入密码"));const i=/^(?!.*[\u4e00-\u9fa5])(?![a-zA-Z]+$)(?![A-Z0-9]+$)(?![A-Z\W_]+$)(?![a-z0-9]+$)(?![a-z\W_]+$)(?![0-9\W_]+$)[a-zA-Z0-9\W_]{8,32}$/;i.test(e)?a():a(new Error("密码应包含大小写字母、数字和特殊字符,长度8-32位"))};return{isEnabled:!1,loading:!1,statusLoading:!1,step1Visible:!1,step2Visible:!1,closeDialogVisible:!1,openDialogVisible:!1,deleteAccountDialogVisible:!1,changePasswordDialogVisible:!1,userEmail:"",qrCodeUrl:"",secretKey:"",sendingCode:!1,countdown:0,countdownTimer:null,sendingCloseCode:!1,closeCountdown:0,closeCountdownTimer:null,sendingOpenCode:!1,openCountdown:0,openCountdownTimer:null,sendingDeleteAccountCode:!1,deleteAccountCountdown:0,deleteAccountCountdownTimer:null,deletingAccount:!1,sendingChangePasswordCode:!1,changePasswordCountdown:0,changePasswordCountdownTimer:null,changingPassword:!1,closing:!1,opening:!1,submitting:!1,verifyForm:{password:"",emailCode:"",googleCode:""},closeForm:{emailCode:"",googleCode:""},openForm:{emailCode:"",googleCode:""},deleteAccountForm:{emailCode:"",googleCode:""},changePasswordForm:{emailCode:"",password:"",confirmPassword:"",googleCode:""},verifyRules:{password:[{required:!0,validator:t,trigger:"blur"}],emailCode:[{required:!0,message:"请输入邮箱验证码",trigger:"blur"},{min:1,max:10,message:"验证码长度为1-10位",trigger:"blur"}],googleCode:[{required:!0,message:"请输入谷歌验证码",trigger:"blur"},{pattern:/^\d{6}$/,message:"请输入6位数字",trigger:"blur"}]},closeRules:{emailCode:[{required:!0,message:"请输入邮箱验证码",trigger:"blur"},{min:1,max:10,message:"验证码长度为1-10位",trigger:"blur"}],googleCode:[{required:!0,message:"请输入谷歌验证码",trigger:"blur"},{pattern:/^\d{6}$/,message:"请输入6位数字",trigger:"blur"}]},openRules:{emailCode:[{required:!0,message:"请输入邮箱验证码",trigger:"blur"},{min:1,max:10,message:"验证码长度为1-10位",trigger:"blur"}],googleCode:[{required:!0,message:"请输入谷歌验证码",trigger:"blur"},{pattern:/^\d{6}$/,message:"请输入6位数字",trigger:"blur"}]},deleteAccountRules:{emailCode:[{required:!0,message:"请输入邮箱验证码",trigger:"blur"},{min:1,max:10,message:"验证码长度为1-10位",trigger:"blur"}],googleCode:[{required:!0,message:"请输入谷歌验证码",trigger:"blur"},{pattern:/^\d{6}$/,message:"请输入6位数字",trigger:"blur"}]},changePasswordRules:{},googleStatus:1}},computed:{getQrCodeSrc(){return this.qrCodeUrl?this.qrCodeUrl.startsWith("data:")?this.qrCodeUrl:`data:image/png;base64,${this.qrCodeUrl}`:""},getStatusText(){switch(this.googleStatus){case 0:return"已开启";case 1:return"未绑定";case 2:return"已关闭";default:return"未绑定"}},getButtonText(){switch(this.googleStatus){case 0:return"关闭";case 1:return"设置";case 2:return"开启";default:return"设置"}},getStatusClass(){return{"status-enabled":0===this.googleStatus,"status-bound":2===this.googleStatus}},getButtonType(){switch(this.googleStatus){case 0:return"danger";case 1:return"primary";case 2:return"primary";default:return"primary"}}},mounted(){this.check2FAStatus(),this.loadUserEmail()},beforeDestroy(){this.countdownTimer&&clearInterval(this.countdownTimer),this.closeCountdownTimer&&clearInterval(this.closeCountdownTimer),this.openCountdownTimer&&clearInterval(this.openCountdownTimer),this.deleteAccountCountdownTimer&&clearInterval(this.deleteAccountCountdownTimer)},methods:{async check2FAStatus(){this.statusLoading=!0;try{const t=await(0,i.getGoogleStatus)();if(!t||0!==t.code&&200!==t.code)this.googleStatus=1,this.isEnabled=!1;else{const e=t.data?.status??t.data??1;this.googleStatus=e,this.isEnabled=0===e}}catch(t){console.error("查询谷歌绑定状态失败",t),this.googleStatus=1,this.isEnabled=!1}finally{this.statusLoading=!1}},handleButtonClick(){switch(this.googleStatus){case 0:this.handleDisable2FA();break;case 1:this.handleEnable2FA();break;case 2:this.handleEnable2FA();break;default:this.handleEnable2FA()}},async handleEnable2FA(){if(1===this.googleStatus){this.loading=!0;try{const t=await(0,i.getBindInfo)();!t||0!==t.code&&200!==t.code?this.$message.error(t?.message||t?.msg||"获取绑定信息失败"):(this.qrCodeUrl=t.data?.img||"",this.secretKey=t.data?.secret||"",console.log("getBindInfo 返回数据:",t.data),console.log("保存的 secretKey:",this.secretKey),this.qrCodeUrl||this.secretKey?this.step1Visible=!0:this.$message.error("获取绑定信息失败,请稍后重试"))}catch(t){console.error("获取绑定信息失败",t),this.$message.error("获取绑定信息失败,请稍后重试")}finally{this.loading=!1}}else this.openDialogVisible=!0},handleDisable2FA(){this.closeDialogVisible=!0},async handleSendCloseEmailCode(){if(!(this.closeCountdown>0)){this.sendingCloseCode=!0;try{const t=await(0,i.sendCloseGoogleCode)();!t||0!==t.code&&200!==t.code?this.$message.error(t?.message||t?.msg||"发送验证码失败"):(this.$message.success("验证码已发送到您的邮箱"),this.startCloseCountdown())}catch(t){console.error("发送验证码失败",t),this.$message.error("发送验证码失败,请稍后重试")}finally{this.sendingCloseCode=!1}}},startCloseCountdown(){this.closeCountdown=60,this.closeCountdownTimer=setInterval(()=>{this.closeCountdown--,this.closeCountdown<=0&&(clearInterval(this.closeCountdownTimer),this.closeCountdownTimer=null)},1e3)},handleCloseGoogleCodeInput(t){this.closeForm.googleCode=t.replace(/\D/g,"").slice(0,6)},async handleConfirmClose(){try{const t=await this.$refs.closeForm.validate();if(!t)return;this.closing=!0;const e={eCode:this.closeForm.emailCode,gCode:this.closeForm.googleCode},a=await(0,i.closeStepTwo)(e);!a||0!==a.code&&200!==a.code?this.$message.error(a?.message||a?.msg||"关闭失败,请检查输入信息"):(this.$message.success("双重验证已关闭"),this.closeDialogVisible=!1,this.googleStatus=2,this.isEnabled=!1,this.handleCloseDialogClose(),this.check2FAStatus())}catch(t){console.error("关闭双重验证失败",t),this.$message.error("关闭失败,请稍后重试")}finally{this.closing=!1}},handleCloseDialogClose(){this.closeForm={emailCode:"",googleCode:""},this.$refs.closeForm&&this.$refs.closeForm.clearValidate()},async handleSendOpenEmailCode(){if(!(this.openCountdown>0)){this.sendingOpenCode=!0;try{const t=await(0,i.sendOpenGoogleCode)();!t||0!==t.code&&200!==t.code?this.$message.error(t?.message||t?.msg||"发送验证码失败"):(this.$message.success("验证码已发送到您的邮箱"),this.startOpenCountdown())}catch(t){console.error("发送验证码失败",t),this.$message.error("发送验证码失败,请稍后重试")}finally{this.sendingOpenCode=!1}}},startOpenCountdown(){this.openCountdown=60,this.openCountdownTimer=setInterval(()=>{this.openCountdown--,this.openCountdown<=0&&(clearInterval(this.openCountdownTimer),this.openCountdownTimer=null)},1e3)},handleOpenGoogleCodeInput(t){this.openForm.googleCode=t.replace(/\D/g,"").slice(0,6)},async handleConfirmOpen(){try{const t=await this.$refs.openForm.validate();if(!t)return;this.opening=!0;const e={eCode:this.openForm.emailCode,gCode:this.openForm.googleCode},a=await(0,i.openStepTwo)(e);!a||0!==a.code&&200!==a.code?this.$message.error(a?.message||a?.msg||"开启失败,请检查输入信息"):(this.$message.success("双重验证已开启"),this.openDialogVisible=!1,this.googleStatus=0,this.isEnabled=!0,this.handleOpenDialogClose(),this.check2FAStatus())}catch(t){console.error("开启双重验证失败",t),this.$message.error("开启失败,请稍后重试")}finally{this.opening=!1}},handleOpenDialogClose(){this.openForm={emailCode:"",googleCode:""},this.$refs.openForm&&this.$refs.openForm.clearValidate()},handleCopySecret(){if(!this.secretKey)return;const t=document.createElement("input");t.value=this.secretKey,document.body.appendChild(t),t.select();try{document.execCommand("copy"),this.$message.success("密钥已复制到剪贴板")}catch(e){this.$message.error("复制失败,请手动复制")}document.body.removeChild(t)},handleStep1Close(){this.qrCodeUrl=""},handleNextToStep2(){this.qrCodeUrl||this.secretKey?(this.step1Visible=!1,this.step2Visible=!0):this.$message.warning("请先获取二维码或密钥")},handleBackToStep1(){this.step2Visible=!1,this.step1Visible=!0},handleStep2Close(){this.verifyForm={password:"",emailCode:"",googleCode:""},this.$refs.verifyForm&&this.$refs.verifyForm.clearValidate()},async handleSendEmailCode(){if(!(this.countdown>0)){this.sendingCode=!0;try{const t=await(0,i.sendOpenGoogleCode)();!t||0!==t.code&&200!==t.code?this.$message.error(t?.message||t?.msg||"发送验证码失败"):(this.$message.success("验证码已发送到您的邮箱"),this.startCountdown())}catch(t){console.error("发送验证码失败",t),this.$message.error("发送验证码失败,请稍后重试")}finally{this.sendingCode=!1}}},startCountdown(){this.countdown=60,this.countdownTimer=setInterval(()=>{this.countdown--,this.countdown<=0&&(clearInterval(this.countdownTimer),this.countdownTimer=null)},1e3)},handleGoogleCodeInput(t){this.verifyForm.googleCode=t.replace(/\D/g,"").slice(0,6)},async handleConfirm(){try{const t=await this.$refs.verifyForm.validate();if(!t)return;if(!this.secretKey)return void this.$message.warning("密钥不存在,请重新获取");if(!this.verifyForm.password)return void this.$message.warning("请输入密码");this.submitting=!0;const e=await(0,s.rsaEncrypt)(this.verifyForm.password);if(!e)return this.$message.error("密码加密失败,请稍后重试"),void(this.submitting=!1);const a={eCode:this.verifyForm.emailCode,gCode:this.verifyForm.googleCode,pwd:e,secret:this.secretKey};console.log("提交参数:",a);const o=await(0,i.bindGoogle)(a);!o||0!==o.code&&200!==o.code?this.$message.error(o?.message||o?.msg||"绑定失败,请检查输入信息"):(this.$message.success("双重验证已成功开启"),this.step2Visible=!1,this.googleStatus=0,this.isEnabled=!0,this.handleStep2Close())}catch(t){console.error("绑定失败",t)}finally{this.submitting=!1}},handleCannotGetCode(){this.$message.info("请检查邮箱垃圾箱,或联系客服")},handleCannotGetGoogleCode(){this.$message.info("请确保已正确扫描二维码或输入密钥,并检查时间同步")},handleChangePassword(){this.userEmail?this.changePasswordDialogVisible=!0:this.$message.warning("无法获取用户邮箱,请重新登录")},async handleSendChangePasswordCode(){if(!(this.changePasswordCountdown>0))if(this.userEmail){this.sendingChangePasswordCode=!0;try{const t=await(0,o.sendUpdatePwdCode)({email:this.userEmail});!t||0!==t.code&&200!==t.code?this.$message.error(t?.message||t?.msg||"发送验证码失败"):(this.$message.success("验证码已发送到您的邮箱"),this.startChangePasswordCountdown())}catch(t){console.error("发送验证码失败",t),this.$message.error("发送验证码失败,请稍后重试")}finally{this.sendingChangePasswordCode=!1}}else this.$message.warning("无法获取用户邮箱,请重新登录")},startChangePasswordCountdown(){this.changePasswordCountdown=60,this.changePasswordCountdownTimer=setInterval(()=>{this.changePasswordCountdown--,this.changePasswordCountdown<=0&&(clearInterval(this.changePasswordCountdownTimer),this.changePasswordCountdownTimer=null)},1e3)},handleChangePasswordGoogleCodeInput(t){this.changePasswordForm.googleCode=t.replace(/\D/g,"").slice(0,6)},validateConfirmPassword(t,e,a){e?e===this.changePasswordForm.password?a():a(new Error("两次输入的密码不一致")):a(new Error("请再次输入新密码"))},async handleConfirmChangePassword(){try{const t=await this.$refs.changePasswordForm.validate();if(!t)return;this.changingPassword=!0;const e=await(0,s.rsaEncrypt)(this.changePasswordForm.password);if(!e)return this.$message.error("密码加密失败,请稍后重试"),void(this.changingPassword=!1);const a={code:this.changePasswordForm.emailCode,email:this.userEmail,password:e,gcode:this.changePasswordForm.googleCode},i=await(0,o.updatePasswordInCenter)(a);!i||0!==i.code&&200!==i.code?this.$message.error(i?.message||i?.msg||"修改密码失败,请检查输入信息"):(this.$message.success("密码修改成功"),this.changePasswordDialogVisible=!1,this.handleChangePasswordDialogClose())}catch(t){console.error("修改密码失败",t),this.$message.error("修改密码失败,请稍后重试")}finally{this.changingPassword=!1}},handleChangePasswordDialogClose(){this.changePasswordForm={emailCode:"",password:"",confirmPassword:"",googleCode:""},this.$refs.changePasswordForm&&this.$refs.changePasswordForm.clearValidate()},loadUserEmail(){try{const t=t=>{const e=localStorage.getItem(t);if(null==e)return null;try{return JSON.parse(e)}catch(a){return e}},e=t("leasEmail")||"";this.userEmail="string"===typeof e?e:String(e)}catch(t){console.error("读取用户邮箱失败",t),this.userEmail=""}},handleDeleteAccount(){this.userEmail?this.deleteAccountDialogVisible=!0:this.$message.warning("无法获取用户邮箱,请重新登录")},async handleSendDeleteAccountCode(){if(!(this.deleteAccountCountdown>0))if(this.userEmail){this.sendingDeleteAccountCode=!0;try{const t=await(0,o.sendCloseAccount)({email:this.userEmail});!t||0!==t.code&&200!==t.code?this.$message.error(t?.message||t?.msg||"发送验证码失败"):(this.$message.success("验证码已发送到您的邮箱"),this.startDeleteAccountCountdown())}catch(t){console.error("发送验证码失败",t),this.$message.error("发送验证码失败,请稍后重试")}finally{this.sendingDeleteAccountCode=!1}}else this.$message.warning("无法获取用户邮箱,请重新登录")},startDeleteAccountCountdown(){this.deleteAccountCountdown=60,this.deleteAccountCountdownTimer=setInterval(()=>{this.deleteAccountCountdown--,this.deleteAccountCountdown<=0&&(clearInterval(this.deleteAccountCountdownTimer),this.deleteAccountCountdownTimer=null)},1e3)},handleDeleteAccountGoogleCodeInput(t){this.deleteAccountForm.googleCode=t.replace(/\D/g,"").slice(0,6)},async handleConfirmDeleteAccount(){try{const t=await this.$refs.deleteAccountForm.validate();if(!t)return;this.$confirm("注销账号将永久删除您的账户和所有相关数据,包括订单、余额、店铺等所有信息,此操作不可恢复。确定要继续吗?","警告",{confirmButtonText:"确定注销",cancelButtonText:"取消",type:"warning",dangerouslyUseHTMLString:!1}).then(async()=>{this.deletingAccount=!0;try{const t={eCode:this.deleteAccountForm.emailCode,gCode:this.deleteAccountForm.googleCode},e=await(0,o.closeAccount)(t);!e||0!==e.code&&200!==e.code||(this.$message.success("账号已成功注销"),this.deleteAccountDialogVisible=!1,this.handleDeleteAccountDialogClose(),localStorage.removeItem("leasToken"),localStorage.removeItem("leasEmail"),localStorage.removeItem("userInfo"),window.dispatchEvent(new CustomEvent("login-status-changed")),this.$router.push("/login"))}catch(t){console.error("注销账号失败",t),this.$message.error("注销失败,请稍后重试")}finally{this.deletingAccount=!1}}).catch(()=>{})}catch(t){console.error("表单验证失败",t)}},handleDeleteAccountDialogClose(){this.deleteAccountForm={emailCode:"",googleCode:""},this.$refs.deleteAccountForm&&this.$refs.deleteAccountForm.clearValidate()}}}},5508:function(t,e){e.Yp=e.XX=void 0;e.XX=function(){var t=this,e=t._self._c;return e("div",{staticClass:"content-container"},[e("router-view")],1)},e.Yp=[]},5638:function(t,e,a){a.r(e),a.d(e,{__esModule:function(){return s.B},default:function(){return l}});var i=a(9628),s=a(7370),o=s.A,r=a(845),n=(0,r.A)(o,i.XX,i.Yp,!1,null,"c3bf12ce",null),l=n.exports},5656:function(t,e){e.Yp=e.XX=void 0;e.XX=function(){var t=this,e=t._self._c;return e("div",{staticClass:"orders-page"},[e("h2",{staticClass:"title"},[t._v("订单列表")]),e("el-tabs",{on:{"tab-click":t.handleTabClick},model:{value:t.active,callback:function(e){t.active=e},expression:"active"}},[e("el-tab-pane",{attrs:{label:"订单进行中",name:"7"}},[e("order-list",{attrs:{items:t.orders[7],"show-checkout":!0,"on-cancel":t.handleCancelOrder,"empty-text":"暂无进行中的订单"}})],1),e("el-tab-pane",{attrs:{label:"订单已完成",name:"8"}},[e("order-list",{attrs:{items:t.orders[8],"show-checkout":!1,"empty-text":"暂无已完成的订单"}})],1)],1)],1)},e.Yp=[]},5705:function(t,e,a){var i=a(3999)["default"];Object.defineProperty(e,"__esModule",{value:!0}),e.addShopConfig=h,e.closeShop=d,e.deleteShop=l,e.deleteShopConfig=m,e.getAddShop=o,e.getChainAndCoin=g,e.getMyShop=r,e.getShopConfig=u,e.getShopConfigV2=f,e.queryShop=c,e.updateShop=n,e.updateShopConfig=p;var s=i(a(5720));function o(t){return(0,s.default)({url:"/lease/shop/addShop",method:"post",data:t})}function r(t){return(0,s.default)({url:"/lease/shop/getShopByUserEmail",method:"get",params:t})}function n(t){return(0,s.default)({url:"/lease/shop/updateShop",method:"post",data:t})}function l(t){return(0,s.default)({url:"/lease/shop/deleteShop",method:"post",data:{id:t}})}function c(t){return(0,s.default)({url:"/lease/shop/getShopById",method:"post",data:t})}function d(t){return(0,s.default)({url:"/lease/shop/closeShop",method:"post",data:{id:t}})}function u(t){return(0,s.default)({url:"/lease/shop/getShopConfig",method:"post",data:{id:t}})}function h(t){return(0,s.default)({url:"/lease/shop/addShopConfig",method:"post",data:t})}function p(t){return(0,s.default)({url:"/lease/shop/updateShopConfig",method:"post",data:t})}function m(t){return(0,s.default)({url:"/lease/shop/deleteShopConfig",method:"post",data:t})}function g(t){return(0,s.default)({url:"/lease/shop/getChainAndCoin",method:"post",data:t})}function f(t){return(0,s.default)({url:"/lease/v2/shop/getShopConfigV2",method:"post",data:t})}},5720:function(t,e,a){var i=a(3999)["default"];Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=void 0,a(4114),a(8111),a(7588);var s=i(a(6425)),o=i(a(9526)),r=a(1052),n=i(a(4994)),l=i(a(7465));const c=new Map;function d(t){const{url:e,method:a,params:i,data:s}=t;return[e,a,JSON.stringify(i),JSON.stringify(s)].join("&")}const u=s.default.create({baseURL:"https://test.m2pool.com/api/",timeout:1e4}),h=6e4;let p=new Map,m={online:0,offline:0},g=!1;window.addEventListener("online",()=>{const t=Date.now();if(g)return void console.log("[网络] 网络恢复处理已在进行中,忽略重复事件");if(g=!0,t-m.online>3e4){m.online=t;try{window.vm&&window.vm.$message&&(window.vm.$message({message:window.vm.$i18n.t("home.networkReconnected")||"网络已重新连接,正在恢复数据...",type:"success",duration:5e3,showClose:!0}),console.log("[网络] 显示网络恢复提示, 时间:",(new Date).toLocaleTimeString()))}catch(a){console.error("[网络] 显示网络恢复提示失败:",a)}}else console.log("[网络] 抑制重复的网络恢复提示, 间隔过短:",t-m.online+"ms");const e=[];p.forEach(async(a,i)=>{if(t-a.timestamp<=h)try{const t=await u(a.config);e.push(t),a.callback&&"function"===typeof a.callback&&a.callback(t),window.vm&&(a.config.url.includes("getPoolPower")&&t&&t.data?window.dispatchEvent(new CustomEvent("chart-data-updated",{detail:{type:"poolPower",data:t.data}})):a.config.url.includes("getNetPower")&&t&&t.data?window.dispatchEvent(new CustomEvent("chart-data-updated",{detail:{type:"netPower",data:t.data}})):a.config.url.includes("getBlockInfo")&&t&&t.rows&&window.dispatchEvent(new CustomEvent("chart-data-updated",{detail:{type:"blockInfo",data:t.rows}}))),p.delete(i)}catch(s){console.error("重试请求失败:",s),p.delete(i)}else p.delete(i)}),Promise.allSettled(e).then(()=>{if(n.default&&n.default.resetAllLoadingStates(),window.vm){const t=["minerChartLoading","reportBlockLoading","apiPageLoading","MiningLoading","miniLoading","bthLoading","editLoading"];t.forEach(t=>{"undefined"!==typeof window.vm[t]&&(window.vm[t]=!1)}),Object.keys(window.vm).forEach(t=>{t.endsWith("Loading")&&(window.vm[t]=!1)})}window.dispatchEvent(new CustomEvent("network-retry-complete")),setTimeout(()=>{g=!1},5e3)})}),window.addEventListener("offline",()=>{window.vm&&window.vm.$message&&l.default.canShowError("networkOffline")&&window.vm.$message({message:window.vm.$i18n.t("home.networkOffline")||"网络连接已断开,系统将在恢复连接后自动重试",type:"error",duration:5e3,showClose:!0})}),u.defaults.retry=2,u.defaults.retryDelay=2e3,u.defaults.shouldRetry=t=>"Network Error"===t.message||t.message.includes("timeout"),localStorage.setItem("superReportError","");let f=localStorage.getItem("superReportError");window.addEventListener("setItem",()=>{f=localStorage.getItem("superReportError")}),u.interceptors.request.use(t=>{let e;f="",localStorage.setItem("superReportError","");try{e=JSON.parse(localStorage.getItem("leasToken"))}catch(o){console.log(o)}if(e&&(t.headers["Authorization"]=e),console.log(e,"if就覅飞机飞机"),"get"==t.method&&t.data&&(t.params=t.data),"get"===t.method&&t.params){let e=t.url+"?";for(const i of Object.keys(t.params)){const s=t.params[i];var a=encodeURIComponent(i)+"=";if(null!==s&&"undefined"!==typeof s)if("object"===typeof s){for(const t of Object.keys(s))if(null!==s[t]&&"undefined"!==typeof s[t]){let a=i+"["+t+"]",o=encodeURIComponent(a)+"=";e+=o+encodeURIComponent(s[t])+"&"}}else e+=a+encodeURIComponent(s)+"&"}e=e.slice(0,-1),t.params={},t.url=e}const i=d(t);if(c.has(i)){const t=c.get(i);t(),c.delete(i)}return t.cancelToken=new s.default.CancelToken(t=>{c.set(i,t)}),t},t=>{Promise.reject(t)}),u.interceptors.response.use(t=>{const e=d(t.config);if(c.delete(e),"blob"===t.config.responseType||t.data instanceof Blob)return t.status>=200&&t.status<300?t:Promise.reject(new Error(`下载失败,状态码: ${t.status}`));const a=t.data.code||200,i=o.default[a]||t.data.msg||o.default["default"];if(421===a){if(localStorage.setItem("cs_disconnect_all",Date.now().toString()),localStorage.removeItem("leasToken"),window.dispatchEvent(new CustomEvent("login-status-changed")),f=localStorage.getItem("superReportError"),!f){f=421,localStorage.setItem("superReportError",f);const t=(t,e)=>window.vm&&window.vm.$i18n&&window.vm.$i18n.t(t)||e,e=()=>window.vm&&window.vm.$i18n&&window.vm.$i18n.locale?`/${window.vm.$i18n.locale}/login`:"/login",a=()=>window.vm&&window.vm.$i18n&&window.vm.$i18n.locale?`/${window.vm.$i18n.locale}/`:"/";r.MessageBox.confirm(t("user.loginExpired","登录状态已过期"),t("user.overduePrompt","您的登录状态已过期,请重新登录"),{distinguishCancelAndClose:!0,confirmButtonText:t("user.login","登录"),cancelButtonText:t("user.Home","返回首页"),closeOnClickModal:!1,showClose:!1,type:"warning"}).then(()=>{window.vm&&window.vm.$router?window.vm.$router.push(e()):window.location.href=e(),localStorage.removeItem("token"),localStorage.removeItem("superReportError")}).catch(()=>{window.vm&&window.vm.$router?window.vm.$router.push(a()):window.location.href=a(),localStorage.removeItem("leasToken"),localStorage.removeItem("superReportError")})}return Promise.reject("登录状态已过期")}if(!(a>=500)||f)return 200!==a?(r.Notification.error({title:i}),Promise.reject("error")):t.data;f=500,localStorage.setItem("superReportError",f),(0,r.Message)({dangerouslyUseHTMLString:!0,message:i,type:"error",showClose:!0})},t=>{if("ERR_CANCELED"===t.code||t.message&&t.message.includes("canceled")||t.message?.includes("Request aborted"))return new Promise(()=>{});if(t.config){const e=d(t.config);c.delete(e)}let{message:e}=t;if("Network Error"==e||e.includes("timeout"))if(navigator.onLine){if(t.config.__retryCount=t.config.__retryCount||0,t.config.__retryCount{setTimeout(()=>{e(u(t.config))},u.defaults.retryDelay)});console.log(`[请求失败] ${t.config.url} - 已达到最大重试次数`)}else{const e=JSON.stringify({url:t.config.url,method:t.config.method,params:t.config.params,data:t.config.data});let a=null;t.config.url.includes("getPoolPower")?a=t=>{window.vm&&(window.vm.minerChartLoading=!1)}:t.config.url.includes("getBlockInfo")&&(a=t=>{window.vm&&(window.vm.reportBlockLoading=!1)}),p.has(e)||(p.set(e,{config:t.config,timestamp:Date.now(),retryCount:0,callback:a}),console.log("请求已加入断网重连队列:",t.config.url))}return f||(f="error",localStorage.setItem("superReportError",f),l.default.canShowError(e)?"Network Error"==e?(0,r.Message)({message:window.vm.$i18n.t("home.NetworkError"),type:"error",duration:4e3,showClose:!0}):e.includes("timeout")?(0,r.Message)({message:window.vm.$i18n.t("home.requestTimeout"),type:"error",duration:5e3,showClose:!0}):e.includes("Request failed with status code")?(0,r.Message)({message:"系统接口"+e.substr(e.length-3)+"异常",type:"error",duration:5e3,showClose:!0}):(0,r.Message)({message:e,type:"error",duration:5e3,showClose:!0}):console.log("[错误提示] 已抑制重复错误:",e)),Promise.reject(t)});e["default"]=u},5785:function(t,e){e.Yp=e.XX=void 0;e.XX=function(){var t=this,e=t._self._c;return e("div",{staticClass:"account-purchased-machine-config"},[t._m(0),e("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.tableData,border:"",stripe:"","header-cell-style":{textAlign:"left"},"cell-style":{textAlign:"left"}}},[e("el-table-column",{attrs:{prop:"coin",label:"币种",width:"100"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.coin||"—"))])]}}])}),e("el-table-column",{attrs:{prop:"algorithm",label:"算法","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.algorithm||"—"))])]}}])}),e("el-table-column",{attrs:{prop:"pool",label:"矿池","min-width":"140"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.pool||"—"))])]}}])}),e("el-table-column",{attrs:{prop:"walletAddress",label:"钱包地址","min-width":"200"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("div",{staticClass:"address-cell"},[a.row.walletAddress?e("span",{staticClass:"mono-ellipsis",staticStyle:{"font-family":"monospace"}},[t._v(t._s(a.row.walletAddress))]):e("span",[t._v("—")]),a.row.walletAddress?e("el-button",{staticClass:"copy-btn",attrs:{type:"text",size:"mini",icon:"el-icon-document-copy"},on:{click:function(e){return t.handleCopy(a.row.walletAddress,"钱包地址")}}},[t._v(" 复制 ")]):t._e()],1)]}}])}),e("el-table-column",{attrs:{prop:"poolUrl",label:"矿池地址","min-width":"200"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("div",{staticClass:"address-cell"},[a.row.poolUrl?e("span",{staticClass:"mono-ellipsis"},[t._v(t._s(a.row.poolUrl))]):e("span",[t._v("—")]),a.row.poolUrl?e("el-button",{staticClass:"copy-btn",attrs:{type:"text",size:"mini",icon:"el-icon-document-copy"},on:{click:function(e){return t.handleCopy(a.row.poolUrl,"矿池地址")}}},[t._v(" 复制 ")]):t._e()],1)]}}])}),e("el-table-column",{attrs:{label:"操作",width:"120",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-button",{attrs:{type:"text",size:"mini"},on:{click:function(e){return t.handleViewDetail(a.row)}}},[t._v(" 详情 ")])]}}])})],1),e("div",{staticClass:"pagination"},[e("el-pagination",{attrs:{background:"",layout:"total, sizes, prev, pager, next, jumper",total:t.total,"current-page":t.pagination.pageNum,"page-sizes":[10,20,50,100],"page-size":t.pagination.pageSize},on:{"update:currentPage":function(e){return t.$set(t.pagination,"pageNum",e)},"update:current-page":function(e){return t.$set(t.pagination,"pageNum",e)},"update:pageSize":function(e){return t.$set(t.pagination,"pageSize",e)},"update:page-size":function(e){return t.$set(t.pagination,"pageSize",e)},"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)],1)},e.Yp=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"toolbar"},[e("div",{staticClass:"left-area"},[e("h2",{staticClass:"page-title"},[t._v("已购商品")])])])}]},5787:function(t,e,a){Object.defineProperty(e,"B",{value:!0}),e.A=void 0,a(8111),a(2489);var i=a(6299);e.A={name:"RechargeRecord",data(){return{activeTab:"pending",detailDialogVisible:!1,selectedItem:null,rechargeRecords:[{address:"TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",amount:100,fromSymbol:"USDT",fromChain:"tron",status:2,createTime:"2024-01-15 14:30:25",id:1,txHash:"TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE"},{address:"TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",amount:100,fromSymbol:"USDT",fromChain:"tron",status:2,createTime:"2024-01-15 14:30:25",id:2,txHash:"TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE"},{address:"TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",amount:100,fromSymbol:"USDT",fromChain:"tron",status:2,createTime:"2024-01-15 14:30:25",id:3,txHash:"TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE"}],pagination:{pageNum:1,pageSize:1,total:0,totalPage:0},loading:!1,statusFilter:"",total:0,pageSizes:[10,20,50],currentPage:1}},computed:{pendingRecharges(){return this.rechargeRecords.filter(t=>2===t.status)},successRecharges(){return this.rechargeRecords.filter(t=>1===t.status)},failedRecharges(){return this.rechargeRecords.filter(t=>0===t.status)}},mounted(){this.activeTab="pending",this.statusFilter=2},methods:{async loadRechargeRecords(){this.loading=!0;try{const t={pageNum:this.pagination.pageNum,pageSize:this.pagination.pageSize};""!==this.statusFilter&&(t.status=this.statusFilter);const e=await(0,i.balanceRechargeList)(t);!e||0!==e.code&&200!==e.code||(this.rechargeRecords=e.rows||[],this.pagination.total=e.total||0,this.pagination.totalPage=e.totalPage||0,this.total=e.total||0,console.log("充值记录加载成功:",{records:this.rechargeRecords,pagination:this.pagination}))}catch(t){console.error("加载充值记录失败:",t)}finally{this.loading=!1}},handleTabClick(t){this.activeTab=t.name,"pending"===t.name?this.statusFilter=2:"success"===t.name?this.statusFilter=1:"failed"===t.name&&(this.statusFilter=0),this.pagination.pageNum=1,this.currentPage=1,this.pagination.pageSize=10,this.loadRechargeRecords()},showDetail(t){this.selectedItem=t,this.detailDialogVisible=!0},closeDetail(){this.detailDialogVisible=!1,this.selectedItem=null},getChainName(t){const e={tron:"Tron (TRC20)",ethereum:"Ethereum (ERC20)",bsc:"BSC (BEP20)",polygon:"Polygon (MATIC)"};return e[t]||t},getStatusType(t){const e={0:"danger",1:"success",2:"warning"};return e[t]||"info"},formatAddress(t){return t?t.length>20?`${t.slice(0,10)}...${t.slice(-10)}`:t:""},formatTime(t){if(!t)return"";const e=new Date(t),a=new Date,i=a-e;return i<6e4?"刚刚":i<36e5?`${Math.floor(i/6e4)}分钟前`:i<864e5?`${Math.floor(i/36e5)}小时前`:e.toLocaleDateString()},formatFullTime(t){return t?new Date(t).toLocaleString("zh-CN"):""},copyAddress(t){navigator.clipboard?navigator.clipboard.writeText(t).then(()=>{this.$message({message:"地址已复制到剪贴板",type:"success",showClose:!0})}).catch(()=>{this.fallbackCopyAddress(t)}):this.fallbackCopyAddress(t)},fallbackCopyAddress(t){const e=document.createElement("textarea");e.value=t,document.body.appendChild(e),e.select();try{document.execCommand("copy"),this.$message({message:"地址已复制到剪贴板",type:"success",showClose:!0})}catch(a){console.log("复制失败,请手动复制")}document.body.removeChild(e)},refreshData(){this.loadRechargeRecords()},viewOnExplorer(t,e){const a={tron:`https://tronscan.org/#/transaction/${t}`,ethereum:`https://etherscan.io/tx/${t}`,bsc:`https://bscscan.com/tx/${t}`,polygon:`https://polygonscan.com/tx/${t}`},i=a[e];i?window.open(i,"_blank"):this.$message.error("不支持的区块链网络")},getStatusText(t){const e={0:"充值失败",1:"充值成功",2:"充值中"};return e[t]||"未知状态"},handleSizeChange(t){console.log(`每页 ${t} 条`),this.pagination.pageSize=t,this.pagination.pageNum=1,this.currentPage=1,this.loadRechargeRecords()},handleCurrentChange(t){console.log(`当前页: ${t}`),this.pagination.pageNum=t,this.loadRechargeRecords()}}}},5806:function(t,e,a){a.r(e),a.d(e,{__esModule:function(){return s.B},default:function(){return l}});var i=a(5785),s=a(6087),o=s.A,r=a(845),n=(0,r.A)(o,i.XX,i.Yp,!1,null,"f22fc604",null),l=n.exports},5844:function(t,e,a){var i=a(3999)["default"];Object.defineProperty(e,"__esModule",{value:!0}),e.addCart=o,e.deleteBatchGoods=n,e.deleteBatchGoodsForIsDelete=l,e.deleteBatchGoodsForIsDeleteV2=d,e.deleteBatchGoodsV2=u,e.getGoodsList=r,e.getGoodsListV2=c;var s=i(a(5720));function o(t){return(0,s.default)({url:"/lease/shopping/cart/addGoods",method:"post",data:t})}function r(t){return(0,s.default)({url:"/lease/shopping/cart/getGoodsList",method:"post",data:t})}function n(t){return(0,s.default)({url:"/lease/shopping/cart/deleteBatchGoods",method:"post",data:t})}function l(t){return(0,s.default)({url:"/lease/shopping/cart/deleteBatchGoodsForIsDelete",method:"post",data:t})}function c(t){return(0,s.default)({url:"/lease/v2/shopping/cart/getGoodsListV2",method:"post",data:t})}function d(t){return(0,s.default)({url:"/lease/v2/shopping/cart/deleteBatchGoodsForIsDeleteV2",method:"post",data:t})}function u(t){return(0,s.default)({url:"/lease/v2/shopping/cart/deleteBatchGoodsV2",method:"post",data:t})}},5952:function(t,e,a){Object.defineProperty(e,"__esModule",{value:!0}),e.updateQuantity=e.removeFromCart=e.readCart=e["default"]=e.computeSummary=e.clearCart=e.addToCart=void 0,a(8111),a(2489),a(1701),a(8237);const i="power_leasing_cart_v1",s=()=>{try{const t=window.localStorage.getItem(i);if(!t)return[];const e=JSON.parse(t);return Array.isArray(e)?e.filter(Boolean):[]}catch(t){return console.error("[cartManager] readCart error:",t),[]}};e.readCart=s;const o=t=>{try{window.localStorage.setItem(i,JSON.stringify(t));try{const e=t.reduce((t,e)=>t+Number(e.quantity||0),0);window.dispatchEvent(new CustomEvent("cart-updated",{detail:{count:e}}))}catch(e){}}catch(a){console.error("[cartManager] writeCart error:",a)}},r=t=>{if(!t||!t.id)return s();const e=s(),a=e.findIndex(e=>e.id===t.id);if(a>=0){const i=[...e];return i[a]={...i[a],quantity:Math.max(1,Number(i[a].quantity||0)+Number(t.quantity||1))},o(i),i}const i=[...e,{...t,quantity:Math.max(1,Number(t.quantity||1))}];return o(i),i};e.addToCart=r;const n=(t,e)=>{const a=s(),i=a.map(a=>a.id===t?{...a,quantity:Math.max(1,Number(e)||1)}:a);return o(i),i};e.updateQuantity=n;const l=t=>{const e=s(),a=e.filter(e=>e.id!==t);return o(a),a};e.removeFromCart=l;const c=()=>(o([]),[]);e.clearCart=c;const d=()=>{const t=s(),e=t.reduce((t,e)=>t+Number(e.quantity||0),0),a=t.reduce((t,e)=>t+Number(e.quantity||0)*Number(e.price||0),0);return{totalQuantity:e,totalPrice:a}};e.computeSummary=d;e["default"]={readCart:s,addToCart:r,updateQuantity:n,removeFromCart:l,clearCart:c,computeSummary:d}},5987:function(t,e,a){a.r(e),a.d(e,{__esModule:function(){return s.B},default:function(){return l}});var i=a(9273),s=a(3831),o=s.A,r=a(845),n=(0,r.A)(o,i.XX,i.Yp,!1,null,"278fc602",null),l=n.exports},6067:function(t,e,a){Object.defineProperty(e,"__esModule",{value:!0}),e.mainNavigation=e.getPageTitle=e.getPageDescription=e.getBreadcrumb=e["default"]=e.checkRoutePermission=e.breadcrumbConfig=void 0,a(8111),a(3579);const i=e.mainNavigation=[{path:"/productList",name:"商城",icon:"🛍️",description:"浏览所有商品"},{path:"/cart",name:"购物车",icon:"🛒",description:"管理购物车商品"},{path:"/account",name:"个人中心",icon:"👤",description:"管理个人资料和店铺"}],s=e.breadcrumbConfig={"/productList":["首页","商品列表"],"/product":["首页","商品列表","商品详情"],"/cart":["首页","购物车"],"/checkout":["首页","购物车","订单结算"],"/account":["首页","个人中心"],"/account/wallet":["首页","个人中心","我的钱包"],"/account/shop-new":["首页","个人中心","新增店铺"],"/account/shop-config":["首页","个人中心","店铺配置"],"/account/shops":["首页","个人中心","我的店铺"],"/account/product-new":["首页","个人中心","新增商品"],"/account/products":["首页","个人中心","商品列表"]},o=t=>t.startsWith("/product/")?s["/product"]:s[t]||["首页"];e.getBreadcrumb=o;const r=(t,e=[])=>{if(!t.meta||!t.meta.allAuthority)return!0;const a=t.meta.allAuthority;return!!a.includes("all")||a.some(t=>e.includes(t))};e.checkRoutePermission=r;const n=t=>t.meta&&t.meta.title?`${t.meta.title} - Power Leasing`:"Power Leasing - 电商系统";e.getPageTitle=n;const l=t=>t.meta&&t.meta.description?t.meta.description:"Power Leasing 电商系统 - 专业的电力设备租赁平台";e.getPageDescription=l;e["default"]={mainNavigation:i,breadcrumbConfig:s,getBreadcrumb:o,checkRoutePermission:r,getPageTitle:n,getPageDescription:l}},6087:function(t,e,a){Object.defineProperty(e,"B",{value:!0}),e.A=void 0,a(4114);var i=a(4180);e.A={name:"AccountPurchasedMachineConfig",data(){return{loading:!1,tableData:[],pagination:{pageNum:1,pageSize:10},total:0,totalPage:0}},created(){this.fetchTableData()},methods:{async fetchTableData(){this.loading=!0;try{const t={pageNum:this.pagination.pageNum,pageSize:this.pagination.pageSize},e=await(0,i.getPurchasedItems)(t);!e||0!==e.code&&200!==e.code?(this.tableData=[],this.total=0,this.totalPage=0):(this.tableData=Array.isArray(e.rows)?e.rows:[],this.total=Number(e.total||0),this.totalPage=Number(e.totalPage||0))}catch(t){console.error("获取已购矿机配置失败",t),this.tableData=[],this.total=0,this.totalPage=0}finally{this.loading=!1}},handleSizeChange(t){this.pagination.pageSize=t,this.pagination.pageNum=1,this.fetchTableData()},handleCurrentChange(t){this.pagination.pageNum=t,this.fetchTableData()},formatDateTime(t){if(!t)return"—";try{const e=String(t);return e.includes("T")?e.replace("T"," "):e}catch(e){return String(t)}},async handleCopy(t,e="内容"){if(t)try{const i=String(t).trim();if(navigator&&navigator.clipboard&&navigator.clipboard.writeText)await navigator.clipboard.writeText(i),this.$message({message:`${e}已复制到剪贴板`,type:"success",showClose:!0});else{const t=document.createElement("textarea");t.value=i,t.style.position="fixed",t.style.left="-9999px",document.body.appendChild(t),t.focus(),t.select();try{document.execCommand("copy"),this.$message({message:`${e}已复制到剪贴板`,type:"success",showClose:!0})}catch(a){this.$message({message:"复制失败,请手动复制",type:"error",showClose:!0})}document.body.removeChild(t)}}catch(i){console.error("复制失败",i),this.$message({message:"复制失败,请手动复制",type:"error",showClose:!0})}else this.$message({message:`${e}为空,无法复制`,type:"warning",showClose:!0})},handleViewDetail(t){console.log("查看详情,行数据:",t);const e=t.id||t.productMachineId||t.machineId;if(console.log("提取的ID:",e),e)try{this.$router.push({name:"purchasedMachineDetail",params:{id:e}})}catch(a){console.error("路由跳转失败:",a),this.$message.error("跳转失败,请稍后重试")}else console.warn("行数据中缺少ID字段:",t),this.$message.warning("无法获取详情,缺少ID信息")},getStatusText(t){const e=Number(t);return 0===e?"租约已到期":1===e?"挖矿中":2===e?"卖家矿机启动中":!0===t?"挖矿中":"未知状态"},getStatusType(t){const e=Number(t);return 0===e?"info":1===e?"success":2===e?"warning":!0===t?"success":"info"}}}},6163:function(t,e,a){Object.defineProperty(e,"B",{value:!0}),e.A=void 0,a(4114),a(8111),a(2489),a(116),a(7588),a(1701),a(3579),a(7642),a(8004),a(3853),a(5876),a(2475),a(5024),a(1698);var i=a(9662),s=a(1193);const o="account_products_machine_type";e.A={name:"AccountProducts",data(){return{loading:!1,searchKeyword:"",tableData:[],payTypes:[],selectedPayKey:"",shopMachineList:[],pagination:{pageNum:1,pageSize:10,total:0},coinOptions:[],algoOptionsMap:{},loadingCoins:!1,loadingAlgos:{},editDialog:{visible:!1,saving:!1,form:null,priceList:[]},total:0,userEmail:"",listParams:{type:0,pageNum:1,pageSize:10},updateArr:[],updateMap:{},unitCoin:""}},created(){this.initOptions();try{const t=localStorage.getItem(o),e=null!=t?parseInt(t,10):null;0!==e&&1!==e||(this.listParams.type=e)}catch(t){}this.fetchTableData(),this.getPayTypesList().then(()=>{!this.selectedPayKey&&Array.isArray(this.payTypes)&&this.payTypes.length&&(this.selectedPayKey=this.buildPayKey(this.payTypes[0]))})},watch:{"listParams.type"(t){this.shopMachineList=[],this.updateMap={},this.updateArr=[],this.ensureGpuDraft()},payTypes:{handler(){this.ensureGpuDraft(),this.computeUnitFromFirstRow()},deep:!0},shopMachineList:{handler(){this.ensureGpuDraft(),this.computeUnitFromFirstRow()},deep:!0},selectedPayKey(){this.computeUnitFromFirstRow()}},computed:{searchPlaceholder(){return 1===this.listParams.type?"输入显卡型号搜索":"输入币种或算法关键字后回车/搜索"},headerCoinSymbol(){if(this.selectedPayKey){const t=String(this.selectedPayKey).split("|"),e=(t[1]||"").trim().toUpperCase();if(e)return e}if(Array.isArray(this.payTypes)&&this.payTypes.length){const t=this.payTypes[0]||{},e=(t.payCoin||t.coin||"").toString().trim().toUpperCase();if(e)return e}const t=Array.isArray(this.shopMachineList)?this.shopMachineList:[];if(t.length){const e=Array.isArray(t[0].priceList)?t[0].priceList:[];if(e.length){const t=e[0]||{},a=(t.coin||t.payCoin||"").toString().trim().toUpperCase();if(a)return a}}return""}},methods:{async loadSupportCoins(){this.loadingCoins=!0;try{const t=await(0,s.getSupportCoin)();if(t&&(0===t.code||200===t.code)){const e=t.data||[];Array.isArray(e)?this.coinOptions=e.map(t=>"string"===typeof t?t:t.coin||t.name||t).filter(Boolean):e&&"object"===typeof e&&(this.coinOptions=Object.keys(e).map(t=>{const a=e[t];return"string"===typeof a?a:a.coin||a.name||t}).filter(Boolean)),this.coinOptions=[...new Set(this.coinOptions)].sort()}}catch(t){console.error("加载币种列表失败",t)}finally{this.loadingCoins=!1}},async editHandleCoinChange(t,e){this.$set(this.editDialog.form.coinAndAlgoList[t],"algorithm",""),e&&await this.editLoadAlgorithmsForCoin(e,t)},async editLoadAlgorithmsForCoin(t,e){if(t&&!(this.algoOptionsMap[t]&&this.algoOptionsMap[t].length>0)){this.$set(this.loadingAlgos,e,!0);try{const e=await(0,s.getSupportAlgo)(t);if(e&&(0===e.code||200===e.code)){const a=e.data||[];let i=[];Array.isArray(a)?i=a.map(t=>"string"===typeof t?t:t.algorithm||t.algo||t.name||t).filter(Boolean):a&&"object"===typeof a&&(i=Object.keys(a).map(t=>{const e=a[t];return"string"===typeof e?e:e.algorithm||e.algo||e.name||t}).filter(Boolean)),this.$set(this.algoOptionsMap,t,[...new Set(i)].sort())}}catch(a){console.error(`加载币种 ${t} 的算法列表失败`,a),this.$set(this.algoOptionsMap,t,[])}finally{this.$set(this.loadingAlgos,e,!1)}}},editHandleRowTheoryInput(t){let e=String(this.editDialog.form.coinAndAlgoList[t].theoryPower??"");e=e.replace(/[^0-9.]/g,"");const a=e.indexOf(".");-1!==a&&(e=e.slice(0,a+1)+e.slice(a+1).replace(/\./g,""));const i=e.endsWith("."),s=e.split(".");let o=s[0]||"",r=s[1]||"";o.length>6&&(o=o.slice(0,6)),r&&(r=r.slice(0,4)),e=r.length?`${o}.${r}`:i?`${o}.`:o,this.$set(this.editDialog.form.coinAndAlgoList[t],"theoryPower",e)},editHandleRowUnitChange(t,e){this.$set(this.editDialog.form.coinAndAlgoList[t],"unit",e)},editHandleAddRow(){const t=this.editDialog.form.coinAndAlgoList||[];if(t.length>=10)return void this.$message.warning("最多添加 10 行");const e=t[t.length-1]||{unit:"TH/S"},a=t.length;t.push({coin:"",algorithm:"",theoryPower:"",unit:e.unit||"TH/S",coinAndPowerId:null}),this.$set(this.editDialog.form,"coinAndAlgoList",t),this.$set(this.loadingAlgos,a,!1)},editHandleRemoveRow(t){const e=this.editDialog.form.coinAndAlgoList||[];e.length<=1||(e.splice(t,1),this.$set(this.editDialog.form,"coinAndAlgoList",e))},getRowCoinText(t){try{const e=Array.isArray(t&&t.coinAndAlgoList)?t.coinAndAlgoList:[];if(e.length){const t=e.map(t=>String(t&&t.coin?t.coin:"").trim()).filter(Boolean),a=Array.from(new Set(t));if(a.length)return a.join(",")}const a=String(t&&t.coin?t.coin:"").trim();return a||"-"}catch(e){return String(t&&t.coin?t.coin:"").trim()||"-"}},getRowAlgorithmText(t){try{const e=Array.isArray(t&&t.coinAndAlgoList)?t.coinAndAlgoList:[];if(e.length){const t=e.map(t=>String(t&&t.slogithm?t.slogithm:t&&t.algorithm?t.algorithm:"").trim()).filter(Boolean),a=Array.from(new Set(t));if(a.length)return a.join(",")}const a=String(t&&t.algorithm?t.algorithm:"").trim();return a||"-"}catch(e){return String(t&&t.algorithm?t.algorithm:"").trim()||"-"}},computeUnitFromFirstRow(){try{const t=Array.isArray(this.shopMachineList)?this.shopMachineList:[];if(!t.length)return void(this.unitCoin="");const e=t[0]||{},a=Array.isArray(e.priceList)?e.priceList:[];if(!a.length)return void(this.unitCoin="");let i="",s="";if(this.selectedPayKey){const t=String(this.selectedPayKey).split("|");i=(t[0]||"").trim().toUpperCase(),s=(t[1]||"").trim().toUpperCase()}let o=null;(i||s)&&(o=a.find(t=>{const e=String(t.chain||t.payChain||"").trim().toUpperCase(),a=String(t.coin||t.payCoin||"").trim().toUpperCase();return(!i||e===i)&&(!s||a===s)})||null),o||(o=a[0]||null);const r=o&&(o.coin||o.payCoin)||"";this.unitCoin=String(r||"").trim().toUpperCase()}catch(t){this.unitCoin=""}},buildPayKey(t){const e=(t&&(t.payChain||t.chain)?String(t.payChain||t.chain):"").trim().toUpperCase(),a=(t&&(t.payCoin||t.coin)?String(t.payCoin||t.coin):"").trim().toUpperCase();return[e,a].filter(Boolean).join("|")},handlePayTypeChange(){},getPayTypeByKey(t){try{if(!t)return null;const e=String(t).split("|"),a=(e[0]||"").trim().toUpperCase(),i=(e[1]||"").trim().toUpperCase();return(this.payTypes||[]).find(t=>String(t.payChain||t.chain||"").trim().toUpperCase()===a&&String(t.payCoin||t.coin||"").trim().toUpperCase()===i)||null}catch(e){return null}},getSelectedPayImage(){const t=this.getPayTypeByKey(this.selectedPayKey);if(!t)return"";const e=t.payCoinImage||t.image||"";return String(e||"").trim()},getSelectedCoinSymbol(){try{const t=this.getPayTypeByKey(this.selectedPayKey);if(t){const e=t.payCoin||t.coin||"";return String(e||"").trim().toUpperCase()}if(this.selectedPayKey){const t=String(this.selectedPayKey).split("|"),e=(t[1]||"").trim().toUpperCase();if(e)return e}if(Array.isArray(this.payTypes)&&this.payTypes.length){const t=this.payTypes[0],e=t&&(t.payCoin||t.coin);return String(e||"").trim().toUpperCase()}return""}catch(t){return""}},getRowPriceBySelected(t){try{const e=Array.isArray(t&&t.priceList)?t.priceList:[];if(!e.length)return"-";let a="",i="";if(this.selectedPayKey){const t=String(this.selectedPayKey).split("|");a=(t[0]||"").toUpperCase(),i=(t[1]||"").toUpperCase()}if(!a&&!i){const t=e[0]||{},a=t&&null!=t.price?String(t.price):"";return a||"-"}const s=e.find(t=>{const e=String(t.chain||t.payChain||"").toUpperCase(),s=String(t.coin||t.payCoin||"").toUpperCase();return e===a&&s===i});return s&&null!=s.price?String(s.price):"-"}catch(e){return"-"}},getRowPriceText(t){try{const e=Array.isArray(t&&t.priceList)?t.priceList:[];if(!e.length)return"-";let a="",i="";if(this.selectedPayKey){const t=String(this.selectedPayKey).split("|");a=(t[0]||"").trim().toUpperCase(),i=(t[1]||"").trim().toUpperCase()}let s=null;if((a||i)&&(s=e.find(t=>{const e=String(t.chain||t.payChain||"").trim().toUpperCase(),s=String(t.coin||t.payCoin||"").trim().toUpperCase();return(!a||e===a)&&(!i||s===i)})||null),s||(s=e[0]||null),!s)return"-";const o=null!=s.price?String(s.price):"",r=(s.coin||s.payCoin||"").toString().trim().toUpperCase();return o?r?`${o} ${r}`:o:"-"}catch(e){return"-"}},getFirstPriceText(t){try{const e=Array.isArray(t&&t.priceList)?t.priceList:[];if(!e.length)return"-";const a=e[0]||{},i=null!=a.price?a.price:null!=a.amount?a.amount:"";return""===i||null==i?"-":String(i)}catch(e){return"-"}},getTheoryText(t){try{const e=Array.isArray(t&&t.coinAndAlgoList)?t.coinAndAlgoList:[];if(e.length){const t=e.map(t=>{const e=t&&null!=t.theoryPower?String(t.theoryPower):"",a=t&&(t.unit||t.Unit)?String(t.unit||t.Unit).trim().toUpperCase():"",i=e?a?`${e} ${a}`:e:"";return i}).filter(Boolean);if(t.length)return t.join(", ")}const a=t&&null!=t.theoryPower?String(t.theoryPower):"";if(!a)return"-";const i=(t&&t.unit?String(t.unit):"").trim().toUpperCase();return i?`${a} ${i}`:a}catch(e){const a=t&&null!=t.theoryPower?String(t.theoryPower):"";if(!a)return"-";const i=(t&&t.unit?String(t.unit):"").trim().toUpperCase();return i?`${a} ${i}`:a}},getPowerDissText(t){const e=t&&null!=t.powerDissipation?String(t.powerDissipation):"";return e||"-"},getRowId(t){if(t)return null!=t.id?t.id:null!=t.productMachineId?t.productMachineId:null!=t.produceMachineId?t.produceMachineId:null!=t.machineId?t.machineId:null!=t.__key?t.__key:void 0},async updateGpuMachineInfo(t){const e=await(0,i.updateGpuMachine)(t);!e||0!==e.code&&200!==e.code||(this.$message.success("更新成功"),await this.fetchTableData())},async getPayTypesList(){const t=await(0,i.getPayTypes)();if(t&&(0===t.code||200===t.code)){const e=Array.isArray(t.data)?t.data:[];this.payTypes=e,!this.selectedPayKey&&this.payTypes.length&&(this.selectedPayKey=this.buildPayKey(this.payTypes[0]))}},async fetchShopMachineListForSeller(t){const e=await(0,i.getShopMachineListForSeller)(t);console.log(e,"res"),!e||0!==e.code&&200!==e.code||(this.shopMachineList=Array.isArray(e.rows)?e.rows:[],this.total=Number(e.total||e.data&&e.data.total||e.data&&e.data.totalCount||0),this.ensureGpuDraft(),this.computeUnitFromFirstRow())},handleTypeChange(t){this.pagination.pageNum=1,this.listParams.type=t,this.listParams.pageNum=1,this.listParams.keyword=(this.searchKeyword||"").trim()||void 0;try{localStorage.setItem(o,String(t))}catch(e){}this.shopMachineList=[],this.updateMap={},this.updateArr=[],this.fetchTableData()},ensureGpuDraft(){if(1!==this.listParams.type)return;if(!Array.isArray(this.shopMachineList)||!this.shopMachineList.length)return;if(!Array.isArray(this.payTypes)||!this.payTypes.length)return;const t={},e=this.payTypes.map(t=>({chain:(t.payChain||t.chain||"").toString(),coin:(t.payCoin||t.coin||"").toString()})),a=(t=[],a=[])=>e.map(e=>{const i=(Array.isArray(t)?t:[]).find(t=>t.chain===e.chain&&t.coin===e.coin),s=(Array.isArray(a)?a:[]).find(t=>t.chain===e.chain&&t.coin===e.coin);return{chain:e.chain,coin:e.coin,price:i?i.price??"":s?s.price??"":"",payTypeId:i?i.payTypeId??"":s?s.payTypeId??"":""}});this.shopMachineList.forEach((e,i)=>{let s=this.getRowId(e);null==s&&(s=`k_${i}_${e&&(e.name||e.miner||"")}`,this.$set(e,"__key",s));const o=this.updateMap[s];if(o){const i={...o};e&&"undefined"!==typeof e.maxLeaseDays&&(i.maxLeaseDays=e.maxLeaseDays),!e||0!==e.state&&1!==e.state?i.state=1:i.state=e.state,!e||0!==e.effect&&1!==e.effect?void 0===i.effect&&(i.effect=1):i.effect=e.effect,i.priceList=a(e&&e.priceList,o.priceList),t[s]=i}else{const i=!e||0!==e.state&&1!==e.state?1:e.state;t[s]={id:s,maxLeaseDays:e&&"undefined"!==typeof e.maxLeaseDays?e.maxLeaseDays:"",priceList:a(e&&e.priceList,[]),state:i,effect:!e||0!==e.effect&&1!==e.effect?1:e.effect}}}),this.updateMap=t,this.updateArr=Object.values(this.updateMap)},getPriceValue(t,e){const a=this.updateMap[t];if(!a||!Array.isArray(a.priceList))return"";const i=(e.payChain||e.chain||"").toString(),s=(e.payCoin||e.coin||"").toString(),o=a.priceList.find(t=>t.chain===i&&t.coin===s);return o?o.price:""},ensurePriceObj(t,e,a){const i=this.updateMap[t];if(!i)return null;let s=i.priceList.find(t=>t.chain===e&&t.coin===a);return s||(s={chain:e,coin:a,price:"",payTypeId:""},i.priceList.push(s)),s},normalizeGpuPrice(t,e=!1){if(null==t)return"";let a=String(t).replace(/[^\d.]/g,"");const i=a.indexOf(".");-1!==i&&(a=a.slice(0,i+1)+a.slice(i+1).replace(/\./g,""));const s=-1!==i;s&&a.endsWith(".");let o,[r,n=""]=a.split(".");if(r.length>1&&(r=r.replace(/^0+/,"")),""===r&&(r="0"),r.length>10&&(r=r.slice(0,10)),n.length>6&&(n=n.slice(0,6)),o=s?n?`${r}.${n}`:e?r:`${r}.`:r,e){const t=Number(o);if(!(Number.isFinite(t)&&t>0))return"";if(!n&&String(r).length>1&&String(r).startsWith("0")){const t=String(r).replace(/^0+/,"")||"0";o=t}}return o},handlePriceInput(t,e,a){const i=this.getRowId(t)||t.__key,s=(e.payChain||e.chain||"").toString(),o=(e.payCoin||e.coin||"").toString(),r=this.normalizeGpuPrice(a,!1),n=this.ensurePriceObj(i,s,o);n&&(n.price=r),this.updateArr=Object.values(this.updateMap)},handlePriceBlur(t,e){const a=this.getRowId(t)||t.__key,i=(e.payChain||e.chain||"").toString(),s=(e.payCoin||e.coin||"").toString(),o=this.ensurePriceObj(a,i,s),r=o?o.price:"",n=this.normalizeGpuPrice(r,!0);o&&(o.price=n),""===n&&this.$message.warning("价格需为>0,整数最多10位,小数最多6位,且整数部分不可以0开头"),this.updateArr=Object.values(this.updateMap)},handleMaxLeaseDaysInput(t,e){const a=this.getRowId(t)||t.__key,i=String(e||"").replace(/[^\d]/g,"");let s=i?parseInt(i,10):"";"number"!==typeof s||Number.isNaN(s)||(s<1&&(s=1),s>365&&(s=365)),this.updateMap[a]&&(this.updateMap[a].maxLeaseDays=s),this.updateArr=Object.values(this.updateMap)},handleToggleState(t,e){const a=this.getRowId(t)||t.__key;if(0===e){let e=1;if(!t||0!==t.effect&&1!==t.effect?!this.updateMap[a]||0!==this.updateMap[a].effect&&1!==this.updateMap[a].effect||(e=this.updateMap[a].effect):e=t.effect,0===e)return this.$message.warning("本网站暂时不支持该矿机币种及算法,暂时不能上架!"),this.updateMap[a]&&(this.updateMap[a].state=1),void(this.updateArr=Object.values(this.updateMap))}this.updateMap[a]&&(this.updateMap[a].state=e,!t||0!==t.effect&&1!==t.effect||(this.updateMap[a].effect=t.effect)),this.updateArr=Object.values(this.updateMap)},handleUpdateGpu(){if(1!==this.listParams.type)return;const t=Object.values(this.updateMap).map(t=>({id:t.id,maxLeaseDays:t.maxLeaseDays,priceList:Array.isArray(t.priceList)?t.priceList.map(t=>({chain:t.chain,coin:t.coin,price:t.price,payTypeId:t.payTypeId||""})):[],state:t.state})),e=Array.isArray(this.payTypes)?this.payTypes.length:0;if(e>0){const a=t.some(t=>!Array.isArray(t.priceList)||t.priceList.length!==e||t.priceList.some(t=>{const e=t&&null!=t.price?String(t.price).trim():"";if(""===e)return!0;const a=this.normalizeGpuPrice(e,!0);return""===a}));if(a)return void this.$message.warning("请填写合法售价(>0,整数最多10位,小数最多6位,且每种支付方式均需填写)")}const a=t.some(t=>!(Number.isInteger(t.maxLeaseDays)&&t.maxLeaseDays>=1&&t.maxLeaseDays<=365));a?this.$message.warning("请检查最大租赁天数(1-365天的整数)"):this.updateGpuMachineInfo(t)},formatPayType(t){try{const e=(t&&t.chain?String(t.chain):"").toUpperCase(),a=(t&&t.coin?String(t.coin):"").toUpperCase();return e&&a?`${e}-${a}`:e||a||""}catch(e){return""}},formatPayTypeHead(t){try{const e=(t&&(t.payChain||t.chain)?String(t.payChain||t.chain):"").toUpperCase(),a=(t&&(t.payCoin||t.coin)?String(t.payCoin||t.coin):"").toUpperCase();return e&&a?`${e}-${a}`:e||a||""}catch(e){return""}},getPayImage(t){const e=t&&(t.payCoinImage||t.image)?String(t.payCoinImage||t.image):"";return e.trim()},initOptions(){try{const{coinList:t}=a(9252);this.coinOptions=Array.isArray(t)?t:[]}catch(t){this.coinOptions=[]}},async fetchMachineInfo(t){const e=await(0,i.getMachineInfo)(t);!e||0!==e.code&&200!==e.code||(this.editDialog.form=e.data,console.log(e.data,"res.data"))},async fetchTableData(){this.loading=!0;try{await this.fetchShopMachineListForSeller(this.listParams)}catch(t){console.error("获取列表失败",t)}finally{this.loading=!1}},handleSearch(){this.pagination.pageNum=1,this.listParams.pageNum=1,this.listParams.keyword=(this.searchKeyword||"").trim()||void 0,this.fetchTableData()},handleReset(){this.searchKeyword="",this.pagination.pageNum=1,this.pagination.pageSize=10,this.listParams={type:this.listParams.type,pageNum:1,pageSize:10,keyword:void 0},this.fetchTableData()},handleView(t){t&&t.id?this.$router.push(`/account/product-detail/${t.id}`):this.$message({message:"缺少商品ID",type:"warning",showClose:!0})},handleEdit(t){const e=Array.isArray(t.coinAndAlgoList)?t.coinAndAlgoList:[],a=e.length?e.map(t=>({coin:String(t&&(t.coin||"")).trim(),algorithm:String(t&&(t.slogithm||t.algorithm||"")).trim(),theoryPower:t&&null!=t.theoryPower?String(t.theoryPower):"",unit:String(t&&(t.unit||"")).trim()||"TH/S",coinAndPowerId:t&&null!=t.coinAndPowerId?t.coinAndPowerId:null})):[{coin:String(t.coin||"").trim(),algorithm:String(t.algorithm||"").trim(),theoryPower:t&&null!=t.theoryPower?String(t.theoryPower):"",unit:String(t.unit||"TH/S").trim(),coinAndPowerId:null}],i={id:t.id,name:t.name||"",coinAndAlgoList:a,maxLeaseDays:t.maxLeaseDays||"",powerDissipation:t.powerDissipation||t.powerDissipation||"",saleNumbers:t.saleNumbers||"",state:!t||0!==t.state&&1!==t.state?0:t.state},s=Array.isArray(t.priceList)?t.priceList:[],o=(this.payTypes||[]).map(t=>({chain:(t.payChain||t.chain||"").toString(),coin:(t.payCoin||t.coin||"").toString(),payTypeId:t.payTypeId||t.id||0}));this.editDialog.priceList=o.map(e=>{const a=s.find(t=>String(t.chain||t.payChain||"")===e.chain&&String(t.coin||t.payCoin||"")===e.coin);return{chain:e.chain,coin:e.coin,price:a?a.price??"":"",payTypeId:a?a.payTypeId??e.payTypeId??0:e.payTypeId??0,productMachineId:t.productMachineId||t.id||0}}),this.editDialog.form=i,this.editDialog.visible=!0,this.loadSupportCoins(),i.coinAndAlgoList&&i.coinAndAlgoList.length>0&&i.coinAndAlgoList.forEach((t,e)=>{t.coin&&this.editLoadAlgorithmsForCoin(t.coin,e)})},handleEditPriceInput(t,e){const a=String(e||"").replace(/[^\d.]/g,"");this.editDialog.priceList&&this.editDialog.priceList[t]&&this.$set(this.editDialog.priceList[t],"price",a)},async handleSaveEdit(){if(!this.editDialog.form)return;const t=this.editDialog.form;if(!String(t.name||"").trim())return void this.$message.warning("矿机型号不能为空");const e=Array.isArray(t.coinAndAlgoList)?t.coinAndAlgoList:[];if(!e.length)return void this.$message.warning("请至少添加一行币种/算法/算力/单位");const a=/^[A-Za-z0-9]{1,10}$/,s=/^[A-Za-z0-9-]{2,20}$/,o=/^\d{1,6}(\.\d{1,4})?$/;for(let i=0;i=1&&r<=365))return void this.$message.warning("最大租赁天数需为1-365的整数");const n=parseInt(String(t.saleNumbers||"").replace(/[^\d]/g,""),10);if(!Number.isInteger(n)||n<0)return void this.$message.warning("出售数量应为非负整数");const l={id:t.id,coinAndAlgoList:(t.coinAndAlgoList||[]).map(t=>({coin:String(t.coin||"").trim().toUpperCase(),algorithm:String(t.algorithm||"").trim().toUpperCase(),theoryPower:Number(t.theoryPower)||0,unit:t.unit,coinAndPowerId:t.coinAndPowerId||null})),maxLeaseDays:r,name:String(t.name||"").trim(),powerDissipation:Number(String(t.powerDissipation||"0").replace(/[^\d.]/g,""))||0,priceList:(this.editDialog.priceList||[]).map(e=>({chain:e.chain,coin:e.coin,payTypeId:e.payTypeId||0,price:Number(String(e.price||"0").replace(/[^\d.]/g,""))||0,productMachineId:e.productMachineId||t.id||0})),saleNumbers:n,state:(t&&(t.credentials,t.state))??0},c=Array.isArray(l.priceList)&&l.priceList.some(t=>t.price>0);if(c){this.editDialog.saving=!0;try{const t=await(0,i.updateAsicMachine)(l);!t||0!==t.code&&200!==t.code?this.$message.error(t?.msg||"修改失败"):(this.$message.success("修改成功"),this.editDialog.visible=!1,await this.fetchTableData())}catch(d){console.error("更新失败",d)}finally{this.editDialog.saving=!1}}else this.$message.warning("请至少填写一种支付方式的售价")},handleDelete(t){if(!t)return;const e=this.getRowId(t)||t.id;null!=e&&""!==e?this.$confirm("确认删除该商品吗?删除后不可恢复","提示",{confirmButtonText:"删除",cancelButtonText:"取消",type:"warning"}).then(async()=>{try{const t=await(0,i.deleteMachine)({id:e});!t||0!==t.code&&200!==t.code||(this.$message.success("删除成功"),1===this.tableData.length&&this.pagination.pageNum>1&&(this.pagination.pageNum-=1),this.fetchTableData())}catch(t){console.error("删除商品失败",t),console.log("删除失败")}}).catch(()=>{}):this.$message.warning("缺少可删除的ID")},handleSizeChange(t){this.pagination.pageSize=t,this.pagination.pageNum=1,this.listParams.pageSize=t,this.listParams.pageNum=1,this.fetchTableData()},handleCurrentChange(t){this.pagination.pageNum=t,this.listParams.pageNum=t,this.fetchTableData()},handleClear(){this.searchKeyword="",this.pagination.pageNum=1,this.listParams.pageNum=1,this.listParams.keyword=void 0,this.fetchTableData()},handleAddMachine(t){if(!t||!t.id)return void this.$message.warning("缺少商品ID");let e="";try{const a=Array.isArray(t.payTypes)?t.payTypes:[];e=encodeURIComponent(JSON.stringify(a))}catch(a){e=""}this.$router.push({path:"/account/product-machine-add",query:{productId:t.id,coin:t.coin,name:t.name,payTypes:e}})}}}},6278:function(t,e,a){t.exports=a.p+"img/commodity.0dddb787.png"},6299:function(t,e,a){var i=a(3999)["default"];Object.defineProperty(e,"__esModule",{value:!0}),e.addWalletShopConfig=d,e.balanceRechargeList=n,e.balanceWithdrawList=l,e.balanceWithdrawListV2=C,e.bindWallet=p,e.getChainAndList=u,e.getProductListForShopWalletConfig=f,e.getRecentlyTransaction=g,e.getShopConfig=h,e.getShopConfigV2=w,e.getWalletInfo=o,e.sellerReceiptList=c,e.transactionRecord=m,e.updateProductListForShopWalletConfig=y,e.updateShopConfigV2=b,e.withdrawBalance=r,e.withdrawBalanceForSeller=v;var s=i(a(5720));function o(t){return(0,s.default)({url:"/lease/user/getWalletInfo",method:"post",data:t})}function r(t){return(0,s.default)({url:"/lease/user/withdrawBalance",method:"post",data:t})}function n(t){return(0,s.default)({url:"/lease/user/balanceRechargeList",method:"post",data:t})}function l(t){return(0,s.default)({url:"/lease/user/balanceWithdrawList",method:"post",data:t})}function c(t){return(0,s.default)({url:"/lease/user/balancePayList",method:"post",data:t})}function d(t){return(0,s.default)({url:"/lease/shop/addShopConfig",method:"post",data:t})}function u(t){return(0,s.default)({url:"/lease/shop/getChainAndList",method:"post",data:t})}function h(t){return(0,s.default)({url:"/lease/shop/getShopConfig",method:"post",data:t})}function p(t){return(0,s.default)({url:"/lease/user/bindWallet",method:"post",data:t})}function m(t){return(0,s.default)({url:"/lease/user/transactionRecord",method:"post",data:t})}function g(t){return(0,s.default)({url:"/lease/user/getRecentlyTransaction",method:"post",data:t})}function f(t){return(0,s.default)({url:"/lease/product/getProductListForShopWalletConfig",method:"post",data:t})}function y(t){return(0,s.default)({url:"/lease/product/updateProductListForShopWalletConfig",method:"post",data:t})}function w(t){return(0,s.default)({url:"/lease/v2/shop/getShopConfigV2",method:"post",data:t})}function v(t){return(0,s.default)({url:"/lease/v2/shop/withdrawBalanceForSeller",method:"post",data:t})}function C(t){return(0,s.default)({url:"/lease/v2/shop/balanceWithdrawList",method:"post",data:t})}function b(t){return(0,s.default)({url:"/lease/v2/shop/updateShopConfigV2",method:"post",data:t})}},6565:function(t,e,a){a.r(e),a.d(e,{__esModule:function(){return s.B},default:function(){return l}});var i=a(9635),s=a(7082),o=s.A,r=a(845),n=(0,r.A)(o,i.XX,i.Yp,!1,null,"72b1f929",null),l=n.exports},6616:function(t,e,a){Object.defineProperty(e,"B",{value:!0}),e.A=void 0,a(8111),a(1701),a(3579);var i=a(6299),s=a(6299),o=a(6966);e.A={name:"WalletPage",data(){return{walletBalance:0,blockedBalance:0,walletList:[],WalletData:{},rechargeDialogVisible:!1,qrCodeGenerated:!1,withdrawDialogVisible:!1,withdrawLoading:!1,withdrawForm:{toChain:"tron",toSymbol:"USDT",amount:"",toAddress:"",fee:"1.00",googleCode:""},withdrawRules:{toChain:[{required:!0,message:"请选择区块链网络",trigger:"change"}],toSymbol:[{required:!0,message:"请选择提现币种",trigger:"change"}],amount:[{required:!0,message:"请输入提现金额",trigger:"blur"},{validator:this.validateWithdrawAmount,trigger:"blur"}],toAddress:[{required:!0,message:"请输入收款地址",trigger:"blur"},{validator:this.validateAddress,trigger:"blur"}],googleCode:[{required:!0,message:"请输入谷歌验证码",trigger:"blur"},{validator:this.validateGoogleCode,trigger:"blur"}]},chainOptions:[{label:"Tron (TRC20)",value:"tron"}],options:[],loading:!1,createDialogVisible:!1,createLoading:!1,createValue:[],tokenOptions:{tron:[{label:"USDT (TRC20)",value:"USDT"}]},recentTransactions:[]}},computed:{availableTokens(){return this.tokenOptions[this.withdrawForm.toChain]||[]},actualAmount(){const t=this.toScaledInt(this.withdrawForm.amount),e=this.toScaledInt(this.withdrawForm.fee);if(!Number.isFinite(t)||!Number.isFinite(e))return"0";const a=t-e;return a<=0?"0":this.formatDec6FromInt(a)},totalBalance(){const t=parseFloat(this.WalletData.walletBalance||this.WalletData.balance||this.walletBalance||0)||0,e=parseFloat(this.WalletData.blockedBalance||this.blockedBalance||0)||0;return(t+e).toFixed(2)},availableWithdrawBalance(){return this.WalletData.walletBalance||this.WalletData.balance||0},displayWithdrawSymbol(){const t=this.WalletData&&(this.WalletData.fromSymbol||this.WalletData.coin||this.withdrawForm.toSymbol)||"";return String(t).toUpperCase()}},mounted(){this.fetchWalletInfo(),this.updateFeeByChain(),this.getChainAndList(),this.fetchRecentlyTransaction()},methods:{displaySymbol(t){const e=t&&(t.fromSymbol||t.toSymbol||t.coin)||"";return String(e).toUpperCase()},openCreateWallet(){this.createDialogVisible=!0,Array.isArray(this.options)&&0!==this.options.length||this.getChainAndList()},async confirmCreateWallet(){const t=this.createValue||[];if(!Array.isArray(t)||t.length<2)return void this.$message.warning("请先选择链与币种");const[e,a]=t;if(e&&a)try{this.createLoading=!0;const t=await(0,s.bindWallet)({chain:e,coin:a});if(t&&(0===t.code||200===t.code)){const e=t.data;if(e){const t=Array.isArray(e)?e[0]||{}:e;this.WalletData=t,this.rechargeDialogVisible=!0,this.qrCodeGenerated=!1,this.$nextTick(()=>{this.generateQRCode()})}this.fetchWalletInfo(),this.createDialogVisible=!1,this.createValue=[]}}catch(i){console.error("获取充值信息失败",i)}finally{this.createLoading=!1}else this.$message.warning("请选择完整的链与币种")},async getChainAndList(){this.loading=!0;const t=await(0,s.getChainAndList)();t&&(0===t.code||200===t.code)&&t.data&&(this.options=t.data),this.loading=!1},async fetchRecentlyTransaction(){try{const t=await(0,i.getRecentlyTransaction)();if(t&&(0===t.code||200===t.code)){const e=Array.isArray(t.data)?t.data:[],a=e.map((t,e)=>{const a=Number(t&&t.amount),i=Number.isFinite(a)?a:0,s=Number(t&&t.type),o=1===s?Math.abs(i):-Math.abs(i),r=1===s?"充值":2===s?"提现":"支付",n=Number(t&&t.status),l={0:"失败",1:"成功",2:"处理中",3:"校验失败"},c={0:"danger",1:"success",2:"warning",3:"danger"};return{id:`${t&&t.updateTime||""}-${e}`,type:r,amount:o,amountText:this.formatDec6(Math.abs(o)),time:this.formatApiTime(t&&t.updateTime),status:n,statusText:l[n]||"-",statusTagType:c[n]||"info"}});this.recentTransactions=a}}catch(t){}},formatApiTime(t){const e=String(t||"");return e?e.replace("T"," ").replace("Z",""):""},formatDec6(t){if(null===t||void 0===t||""===t)return"0";let e=String(t);if(/e/i.test(e)){const a=Number(t);if(!Number.isFinite(a))return"0";e=a.toFixed(20).replace(/\.0+$/,"").replace(/(\.\d*?)0+$/,"$1")}const a=e.match(/^(-?)(\d+)(?:\.(\d+))?$/);if(!a)return e;let i=a[2],s=a[3]||"";return s.length>6&&(s=s.slice(0,6)),s?`${i}.${s}`:i},toScaledInt(t,e=6){if(null===t||void 0===t)return 0;const a=String(t).trim();if(""===a)return 0;const i=new RegExp(`^\\d+(?:\\.(\\d{0,${e}}))?$`),s=a.match(i);if(!s){const t=Number(a);if(!Number.isFinite(t))return 0;const i=Math.pow(10,e);return Math.round(t*i)}const[o,r]=a.split("."),n=(r||"").padEnd(e,"0").slice(0,e),l=Math.pow(10,e);return Number(o)*l+Number(n)},scaledIntToString(t,e=6){const a=t<0?"-":"",i=Math.abs(t),s=Math.pow(10,e),o=Math.floor(i/s),r=String(i%s).padStart(e,"0");return`${a}${o}.${r}`},formatDec6FromInt(t){const e=this.scaledIntToString(t,6);return e.replace(/\.0+$/,"").replace(/(\.\d*?)0+$/,"$1")},async fetchWalletInfo(t){try{const e=await(0,i.getWalletInfo)(t);if(e&&(0===e.code||200===e.code)){const t=e.data;if(Array.isArray(t)){this.walletList=t;const e=t[0]||{};this.walletBalance=e.walletBalance||e.balance||0,this.blockedBalance=e.blockedBalance||0,this.rechargeDialogVisible||(this.WalletData=e)}else t&&"object"===typeof t?(this.walletList=[t],this.walletBalance=t.walletBalance||t.balance||0,this.blockedBalance=t.blockedBalance||0,this.rechargeDialogVisible||(this.WalletData=t)):(this.walletList=[],this.walletBalance=0,this.blockedBalance=0,this.WalletData={})}}catch(e){console.error("获取钱包信息失败:",e)}},async fetchBalanceRechargeList(t={}){try{const e={pageNum:1,pageSize:20,...t};console.log("获取充值记录参数:",e);const a=await(0,i.balanceRechargeList)(e);if(!a||0!==a.code&&200!==a.code)return this.$message({message:a?.msg||"获取充值记录失败",type:"error",showClose:!0}),null;{const t={list:a.data.rows||[],total:a.data.total||0,totalPage:a.data.totalPage||0,currentPage:e.pageNum,pageSize:e.pageSize,status:e.status};return console.log("充值记录获取成功:",t),t}}catch(e){return console.error("获取充值记录失败:",e),null}},async fetchBalanceWithdrawList(t){const e=await(0,i.balanceWithdrawList)(t);!e||0!==e.code&&200!==e.code||(this.balanceWithdrawList=e.data)},handleRecharge(t){t&&"object"===typeof t&&(this.WalletData=t),this.rechargeDialogVisible=!0,this.qrCodeGenerated=!1,this.$nextTick(()=>{this.generateQRCode()})},handleWithdraw(t){if(t){this.WalletData=t;const e=t.fromChain||t.chain||this.withdrawForm.toChain,a=t.fromSymbol||t.coin||this.withdrawForm.toSymbol;this.withdrawForm.toChain=e,this.withdrawForm.toSymbol=a,this.updateFeeByChain()}this.withdrawDialogVisible=!0},copyAddress(t){const e=t||this.WalletData.fromAddress;e?navigator.clipboard?navigator.clipboard.writeText(e).then(()=>{this.$message({message:"钱包地址已复制到剪贴板",type:"success",showClose:!0})}).catch(()=>{this.fallbackCopyAddress(e)}):this.fallbackCopyAddress(e):this.$message({message:"钱包地址不存在",type:"error",showClose:!0})},fallbackCopyAddress(t){const e=document.createElement("textarea");e.value=t,document.body.appendChild(e),e.select();try{document.execCommand("copy"),this.$message({message:"钱包地址已复制到剪贴板",type:"success",showClose:!0})}catch(a){console.log("复制失败,请手动复制")}document.body.removeChild(e)},generateQRCode(){if(!this.qrCodeGenerated)if(this.WalletData.qrcode){const t=this.$refs.qrCodeRef;if(t){t.innerHTML="";const e=document.createElement("img");e.src=`data:image/png;base64,${this.WalletData.qrcode}`,e.alt="USDT充值二维码",e.style.width="160px",e.style.height="160px",e.style.borderRadius="4px",e.onerror=()=>{t.innerHTML='
二维码加载失败
'},t.appendChild(e),this.qrCodeGenerated=!0}}else{const t=this.$refs.qrCodeRef;t&&(t.innerHTML='
暂无二维码数据
')}},onChainChange(){const t=this.tokenOptions[this.withdrawForm.toChain]||[],e=t.some(t=>"USDT"===t.value);this.withdrawForm.toSymbol=e?"USDT":"",this.updateFeeByChain()},updateFeeByChain(){const t=this.WalletData&&(null!=this.WalletData.charge?this.WalletData.charge:this.WalletData.fee);if(null!=t&&""!==t){const e=Number(t);return void(this.withdrawForm.fee=Number.isFinite(e)?e.toFixed(2):String(t))}const e={tron:"1.00",ethereum:"5.00",bsc:"0.50",polygon:"0.10"};this.withdrawForm.fee=e[this.withdrawForm.toChain]||"1.00"},async confirmWithdraw(){this.$refs.withdrawForm.validate(async t=>{if(t){this.withdrawLoading=!0;try{const t=String(this.withdrawForm.toAddress||"").trim(),e=String(this.WalletData&&this.WalletData.fromAddress||"").trim();let a=t;if(a){const t=(0,o.rsaEncryptSync)(a);if(t)a=t;else{const t=await(0,o.rsaEncrypt)(a);if(!t)return void this.$message.error("钱包地址加密失败,请重试");a=t}}let s=e;if(s){const t=(0,o.rsaEncryptSync)(s);if(t)s=t;else{const t=await(0,o.rsaEncrypt)(s);if(!t)return void this.$message.error("钱包地址加密失败,请重试");s=t}}const r=await(0,i.withdrawBalance)({toChain:this.WalletData&&(this.WalletData.fromChain||this.WalletData.chain)||this.withdrawForm.toChain,toSymbol:this.WalletData&&(this.WalletData.fromSymbol||this.WalletData.coin)||this.withdrawForm.toSymbol,amount:parseFloat(this.withdrawForm.amount),toAddress:a,fromAddress:s,code:this.withdrawForm.googleCode});!r||0!==r.code&&200!==r.code||(this.$message({message:"提现申请已提交,请等待处理",type:"success",showClose:!0}),await this.fetchWalletInfo(),this.withdrawDialogVisible=!1,this.resetWithdrawForm())}catch(e){console.error("提现申请失败:",e),console.log("网络错误,请重试")}finally{this.withdrawLoading=!1}}})},resetRechargeForm(){this.qrCodeGenerated=!1,this.fetchWalletInfo()},resetWithdrawForm(){this.withdrawForm={toChain:"tron",toSymbol:"USDT",amount:"",toAddress:"",fee:"1.00",googleCode:""},this.withdrawLoading=!1,this.$nextTick(()=>{this.$refs.withdrawForm&&this.$refs.withdrawForm.clearValidate()})},validateWithdrawAmount(t,e,a){if(!e)return void a(new Error("请输入提现金额"));const i=this.toScaledInt(e);if(!Number.isFinite(i)||i<=0)return void a(new Error("请输入有效的金额"));const s=this.toScaledInt(this.withdrawForm.fee),o=i+s,r=this.WalletData&&(this.WalletData.walletBalance||this.WalletData.balance)||0,n=this.WalletData&&(this.WalletData.blockedBalance||0)||0,l=parseFloat(r)+parseFloat(n),c=this.toScaledInt(l);if(o>c){const t=this.formatDec6FromInt(o);return void a(new Error(`提现金额加上手续费(${t} ${this.displayWithdrawSymbol})不能超过钱包余额`))}const d=this.toScaledInt(r);if(i>d)return void a(new Error("提现金额不能大于可用余额"));if(i<1e6)return void a(new Error("最小提现金额为1 USDT"));if(i<=s)return void a(new Error("提现金额必须大于手续费"));const u=i-s;u<=0?a(new Error("提现金额扣除手续费后必须大于0")):a()},handleGoogleCodeInput(t){this.withdrawForm.googleCode=t.replace(/\D/g,"")},handleAmountInput(t){let e=String(t||"");e=e.replace(/[^0-9.]/g,"");const a=e.indexOf(".");if(-1!==a&&(e=e.slice(0,a+1)+e.slice(a+1).replace(/\./g,"")),-1!==a){const[t,a]=e.split(".");e=t+"."+(a?a.slice(0,6):"")}const i=e.split(".");i[0]&&i[0].length>12&&(i[0]=i[0].slice(0,12)),e=i.join("."),this.withdrawForm.amount=e},validateGoogleCode(t,e,a){e?/^\d{6}$/.test(e)?a():a(new Error("谷歌验证码必须是6位数字")):a(new Error("请输入谷歌验证码"))},validateAddress(t,e,a){const i="string"===typeof e?e.trim():"";if(!i)return void a(new Error("请输入收款地址"));const s=this.withdrawForm.toChain;let o=!1;switch(s){case"tron":o=/^T[A-Za-z1-9]{33}$/.test(i);break;case"ethereum":o=/^0x[a-fA-F0-9]{40}$/.test(i);break;case"bsc":o=/^0x[a-fA-F0-9]{40}$/.test(i);break;case"polygon":o=/^0x[a-fA-F0-9]{40}$/.test(i);break;default:o=i.length>10}o?a():a(new Error("请输入正确的收款地址格式"))},addTransactionRecord(t,e){const a=new Date,i=`${a.getFullYear()}-${String(a.getMonth()+1).padStart(2,"0")}-${String(a.getDate()).padStart(2,"0")} ${String(a.getHours()).padStart(2,"0")}:${String(a.getMinutes()).padStart(2,"0")}`;this.recentTransactions.unshift({id:Date.now(),type:t,amount:e,time:i}),this.recentTransactions.length>10&&(this.recentTransactions=this.recentTransactions.slice(0,10))}}}},6795:function(t,e,a){a.r(e),a.d(e,{__esModule:function(){return s.B},default:function(){return l}});var i=a(3259),s=a(6163),o=s.A,r=a(845),n=(0,r.A)(o,i.XX,i.Yp,!1,null,"2d7e2698",null),l=n.exports},6851:function(t,e,a){a.r(e),a.d(e,{__esModule:function(){return s.B},default:function(){return l}});var i=a(2553),s=a(5787),o=s.A,r=a(845),n=(0,r.A)(o,i.XX,i.Yp,!1,null,"5cf693fa",null),l=n.exports},6930:function(t,e,a){a.r(e),a.d(e,{__esModule:function(){return s.B},default:function(){return l}});var i=a(7317),s=a(2935),o=s.A,r=a(845),n=(0,r.A)(o,i.XX,i.Yp,!1,null,"1fca51c3",null),l=n.exports},6966:function(t,e,a){var i=a(3999)["default"];Object.defineProperty(e,"__esModule",{value:!0}),e.rsaEncrypt=c,e.rsaEncryptSync=l;var s=i(a(7703));const o="MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsQVIKYozXCfnXUw8+omYLdcdL1pTzmQh35YPsvn22wM4SQJKvMmXmcS6bI5Bu+5zCjL0F56DzfKz0BNZEwb46UshUOO+KFBUr8CxjYE8NOgIsoe5FUn57O6er9/KySaWlkpGZX49K+l3e90R+dFUEfRE/ijYpeZWkLRwcgWZ+2u6HGpl9h/eF6XD0aW9asDjdAbxUQ48TlaWgfP+OHC+Zy2GKGQG16EcDMczrN6a2HbFnwRIUKrFP67UqyRq11BTUziOhXLY8J0MFuwXUk2OY4VpqjrJjHHjlHYADjIL/5K4Io2AhRU9+QSsKFR2wGxi4e8vw2IXDzscrDuah/7YSwIDAQAB",r=`-----BEGIN PUBLIC KEY-----\n${o}\n-----END PUBLIC KEY-----`;function n(){return s.default?s.default:"undefined"!==typeof window&&window.JSEncrypt?window.JSEncrypt:null}function l(t){if(!t||"string"!==typeof t)return console.error("RSA 加密:输入必须是非空字符串"),null;try{const e=n();if(!e)return console.error("JSEncrypt 未加载"),null;const a=new e;a.setPublicKey(r);const i=a.encrypt(t);return i||(console.error("RSA 加密失败:返回值为空"),null)}catch(e){return console.error("RSA 加密异常:",e),null}}async function c(t){if(!t||"string"!==typeof t)return console.error("RSA 加密:输入必须是非空字符串"),null;try{const e=n();if(!e)return console.error("JSEncrypt 未加载"),null;const a=new e;a.setPublicKey(r);const i=a.encrypt(t);return i||(console.error("RSA 加密失败:返回值为空"),null)}catch(e){return console.error("RSA 加密异常:",e),null}}},7031:function(t,e){e.Yp=e.XX=void 0;e.XX=function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"loading",rawName:"v-loading",value:t.productDetailLoading,expression:"productDetailLoading"}],staticClass:"product-detail"},[t.loading?e("div",{staticClass:"loading"},[e("i",{staticClass:"el-icon-loading",attrs:{"aria-label":"加载中",role:"img"}}),t._v(" 加载中... ")]):t.product?e("div",{staticClass:"detail-container"},[e("h2",{staticStyle:{margin:"10px","text-align":"left","margin-top":"28px"}},[t._v("商品详情-选择矿机")]),e("section",{staticClass:"pay-methods",attrs:{"aria-label":"支付方式"}},[e("div",{staticClass:"pay-label",attrs:{tabindex:"0","aria-label":"支付方式标签"}},[t._v("支付方式:")]),e("ul",{staticClass:"pay-list",attrs:{role:"list","aria-label":"支付方式列表"}},t._l(t.paymentMethodList,function(a,i){return e("li",{key:i,staticClass:"pay-item",attrs:{"aria-label":`支付方式: ${a.payChain}`}},[e("el-tooltip",{attrs:{content:t.formatPayTooltip(a),placement:"top","open-delay":80}},[e("img",{staticClass:"pay-icon",attrs:{src:t.getPayImageUrl(a),alt:`${(a.payChain||"").toUpperCase()} ${(a.payCoin||"").toUpperCase()}`.trim(),title:t.formatPayTooltip(a),tabindex:"0",role:"img"},on:{keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:(e.preventDefault(),t.handlePayIconKeyDown(a))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"space",32,e.key,[" ","Spacebar"])?null:(e.preventDefault(),t.handlePayIconKeyDown(a))}]}})])],1)}),0)]),e("section",{staticClass:"filter-bar",attrs:{"aria-label":"筛选条件"}},[e("div",{staticClass:"filter-grid"},[e("div",{staticClass:"filter-cell"},[e("label",{staticClass:"filter-title"},[t._v("矿机种类")]),e("div",{staticStyle:{display:"inline-flex","align-items":"center"}},[e("el-radio-group",{attrs:{size:"small"},on:{change:t.handleMachineTypeChange},model:{value:t.machineType,callback:function(e){t.machineType=e},expression:"machineType"}},[e("el-radio-button",{attrs:{label:1}},[t._v("GPU")]),e("el-radio-button",{attrs:{label:0}},[t._v("ASIC")])],1)],1)]),e("div",{staticClass:"filter-cell"},[e("label",{staticClass:"filter-title",attrs:{for:"payFilter"}},[t._v("支付方式筛选")]),e("el-select",{staticClass:"filter-control",staticStyle:{"max-width":"260px"},attrs:{id:"payFilter",placeholder:"全部",clearable:"",filterable:"",size:"small"},on:{change:t.handlePayFilterChange},scopedSlots:t._u([{key:"prefix",fn:function(){return[t.getSelectedPayIcon()?e("img",{staticStyle:{width:"16px",height:"16px","border-radius":"3px","margin-right":"6px"},attrs:{src:t.getSelectedPayIcon(),alt:""}}):t._e()]},proxy:!0}]),model:{value:t.selectedPayKey,callback:function(e){t.selectedPayKey=e},expression:"selectedPayKey"}},t._l(t.paymentMethodList,function(a,i){return e("el-option",{key:i,attrs:{label:t.formatPayTooltip(a),value:`${a.payChain||""}|${a.payCoin||""}`}},[e("div",{staticClass:"pay-opt"},[e("img",{staticClass:"pay-icon",attrs:{src:t.getPayImageUrl(a),alt:""}}),e("span",[t._v(t._s((a.payChain||"").toUpperCase())+" - "+t._s((a.payCoin||"").toUpperCase()))])])])}),1)],1),e("div",{staticClass:"filter-cell center-title"},[e("label",{staticClass:"filter-title"},[t._v("单价区间"),t.getPriceCoinSymbol()?e("span",[t._v("("+t._s(t.getPriceCoinSymbol())+")")]):t._e()]),e("div",{staticClass:"range-controls"},[e("el-input-number",{staticClass:"filter-control",attrs:{min:0,step:1,precision:0,controls:!1,size:"small"},model:{value:t.filters.minPrice,callback:function(e){t.$set(t.filters,"minPrice",e)},expression:"filters.minPrice"}}),e("span",{staticClass:"filter-sep"},[t._v("-")]),e("el-input-number",{staticClass:"filter-control",attrs:{min:0,step:1,precision:0,controls:!1,size:"small"},model:{value:t.filters.maxPrice,callback:function(e){t.$set(t.filters,"maxPrice",e)},expression:"filters.maxPrice"}})],1)]),e("div",{staticClass:"filter-cell filter-actions"},[e("div",{staticClass:"action-row"},[e("el-button",{attrs:{type:"primary",size:"small","aria-label":"执行筛选"},on:{click:t.handleSearchFilters}},[t._v("筛选查询")]),e("el-button",{attrs:{size:"small","aria-label":"重置筛选"},on:{click:t.handleResetFilters}},[t._v("重置")])],1)])])]),t.dynamicColumns&&t.dynamicColumns.length?e("section",{staticClass:"dynamic-hashrate",attrs:{"aria-label":"动态收益表"}},[e("el-table",{staticClass:"dynamic-table",attrs:{data:t.dynamicRows,border:"",stripe:"",size:"small","header-cell-style":{textAlign:"left"},"cell-style":{textAlign:"left"}}},[e("el-table-column",{attrs:{width:"46",fixed:"left"},scopedSlots:t._u([{key:"default",fn:function({row:a}){return[e("el-checkbox",{attrs:{title:t.isRowDisabled(a)?!a||1!==a.saleState&&2!==a.saleState?"该机器暂无价格,无法选择":"该机器已售出或售出中,无法选择":"选择该矿机",disabled:t.isRowDisabled(a)},on:{change:e=>t.handleManualSelectFlat(a,e)},model:{value:a._selected,callback:function(e){t.$set(a,"_selected",e)},expression:"row._selected"}})]}}],null,!1,1048063571)}),t._l(t.getRenderedColumns(),function(a,i){return e("el-table-column",{key:a.key||i,attrs:{prop:a.key,label:a.label,fixed:a.fixed||!1,"show-overflow-tooltip":""},scopedSlots:t._u([{key:"header",fn:function(){return[e("div",{staticClass:"col-header",attrs:{title:a.label}},[a.icon?e("img",{staticClass:"col-icon",attrs:{src:a.icon,alt:""}}):t._e(),e("span",[t._v(t._s(a.label))]),t.isLastHashrateColumn(i)?e("el-button",{staticClass:"more-action",attrs:{type:"text"},on:{click:function(e){return e.stopPropagation(),t.handleOpenDynamicSearch.apply(null,arguments)}}},[t._v("更多")]):t._e()],1)]},proxy:!0},{key:"default",fn:function({row:i}){return[e("span",{class:t.getCellClass(a)},[t.formatDynamicCell(i,a).truncated?e("el-tooltip",{attrs:{content:t.formatDynamicCell(i,a).full,placement:"top"}},[e("span",[t._v(t._s(t.formatDynamicCell(i,a).text))])]):e("span",[t._v(t._s(t.formatDynamicCell(i,a).text))])],1)]}}],null,!0)})}),0===t.machineType?e("el-table-column",{attrs:{prop:"saleNumbers",label:"总机器数"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(null!=a.row.saleNumbers?a.row.saleNumbers:"—"))])]}}],null,!1,1658856336)}):t._e(),0===t.machineType?e("el-table-column",{attrs:{prop:"saleOutNumbers",label:"已售数量"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(null!=a.row.saleOutNumbers?a.row.saleOutNumbers:"—"))])]}}],null,!1,1678042608)}):t._e(),e("el-table-column",{attrs:{prop:"leaseTime",label:"租赁天数(天)"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-input-number",{staticClass:"input-full",attrs:{min:1,max:t.getRowMaxLeaseDays(a.row),precision:0,step:1,controls:!1,size:"mini"},on:{change:e=>t.handleLeaseDaysChange(a.row,e)},model:{value:a.row.leaseTime,callback:function(e){t.$set(a.row,"leaseTime",e)},expression:"scope.row.leaseTime"}})]}}],null,!1,1697156763)}),0===t.machineType?e("el-table-column",{attrs:{prop:"purchaseQuantity",label:"购买数量"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-input-number",{staticClass:"input-full",attrs:{min:1,max:t.getRowMaxPurchase(a.row),precision:0,step:1,controls:!1,size:"mini",disabled:t.getRowMaxPurchase(a.row)<=0},on:{change:e=>t.handlePurchaseQuantityChange(a.row,e)},model:{value:a.row.purchaseQuantity,callback:function(e){t.$set(a.row,"purchaseQuantity",e)},expression:"scope.row.purchaseQuantity"}})]}}],null,!1,3016046336)}):t._e(),e("el-table-column",{attrs:{prop:"totalAmount",label:"总价","header-align":"left",align:"left"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",{staticClass:"price-strong"},[t._v(t._s(t.formatConfirmTotalText(a.row)))])]}}],null,!1,1059681298)})],2),e("el-dialog",{attrs:{title:"搜索币种/算法",visible:t.dynamicSearch.visible,width:"420px"},on:{"update:visible":function(e){return t.$set(t.dynamicSearch,"visible",e)}}},[e("div",{staticClass:"dynamic-search-bar",staticStyle:{display:"flex",gap:"10px","align-items":"center"}},[e("el-input",{attrs:{placeholder:"输入币种代码或算法关键词",clearable:""},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleConfirmDynamicSearch.apply(null,arguments)}},model:{value:t.dynamicSearch.keyword,callback:function(e){t.$set(t.dynamicSearch,"keyword",e)},expression:"dynamicSearch.keyword"}}),e("el-button",{attrs:{type:"primary"},on:{click:t.handleConfirmDynamicSearch}},[t._v("搜索")])],1)])],1):t._e(),e("div",{staticStyle:{margin:"18px","text-align":"right"}},[e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.handleOpenAddToCartDialog}},[t._v("加入购物车")])],1),e("el-dialog",{attrs:{visible:t.confirmAddDialog.visible,width:"70vw",title:`确认加入购物车(共 ${t.confirmAddDialog.items.length} 台)`},on:{"update:visible":function(e){return t.$set(t.confirmAddDialog,"visible",e)}},scopedSlots:t._u([{key:"footer",fn:function(){return[e("el-button",{on:{click:function(e){t.confirmAddDialog.visible=!1}}},[t._v("取消")]),e("el-button",{attrs:{type:"primary"},on:{click:t.handleConfirmAddSelectedToCart}},[t._v("确认加入")])]},proxy:!0}])},[e("div",[e("el-table",{attrs:{data:t.confirmAddDialog.items,height:"360",border:"",stripe:"","header-cell-style":{textAlign:"left"},"cell-style":{textAlign:"left"}}},[e("el-table-column",{attrs:{prop:"model",label:"型号","header-align":"left",align:"left"}}),e("el-table-column",{attrs:{prop:"price",label:"价格","header-align":"left",align:"left"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",{staticClass:"price-strong"},[t.formatDynamicCell(a.row,{key:"price",type:"amount"}).truncated?e("el-tooltip",{attrs:{content:t.formatDynamicCell(a.row,{key:"price",type:"amount"}).full,placement:"top"}},[e("span",[t._v(t._s(t.formatDynamicCell(a.row,{key:"price",type:"amount"}).text))])]):e("span",[t._v(t._s(t.formatDynamicCell(a.row,{key:"price",type:"amount"}).text))])],1)]}}])}),e("el-table-column",{attrs:{prop:"leaseTime",label:"租赁天数(天)","header-align":"left",align:"left"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(Number(e.row.leaseTime||1)))]}}])}),0===t.machineType?e("el-table-column",{attrs:{prop:"purchaseQuantity",label:"购买数量","header-align":"left",align:"left"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(Number(e.row.purchaseQuantity||0)))]}}],null,!1,1092190239)}):t._e(),e("el-table-column",{attrs:{prop:"totalAmount",label:"总价","header-align":"left",align:"left"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",{staticClass:"price-strong"},[t._v(t._s(t.formatConfirmTotalText(a.row)))])]}}])})],1)],1)]),e("el-row",{staticStyle:{"margin-bottom":"20px"}},[e("el-col",{staticStyle:{display:"flex","justify-content":"center"},attrs:{span:24}},[e("el-pagination",{staticStyle:{margin:"0 auto","margin-top":"10px"},attrs:{"current-page":t.currentPage,"page-sizes":t.pageSizes,"page-size":t.params.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange,"update:currentPage":function(e){t.currentPage=e},"update:current-page":function(e){t.currentPage=e}}})],1)],1)],1):e("div",{staticClass:"not-found"},[e("h2",[t._v("商品不存在")]),e("p",[t._v("抱歉,您查找的商品不存在或已被删除。")]),e("button",{staticClass:"back-btn",on:{click:t.handleBack}},[t._v("返回商品列表")])])])},e.Yp=[]},7082:function(t,e,a){Object.defineProperty(e,"B",{value:!0}),e.A=void 0;var i=a(6299),s=a(4981);e.A={name:"AccountWithdrawRecord",data(){return{loading:!1,rows:[],pageNum:1,pageSize:20,total:0}},mounted(){this.fetchList()},methods:{formatAmount(t,e){return(0,s.truncateAmountByCoin)(t,e)},formatFullTime(t){if(!t)return"";try{return`${t.split("T")[0]} ${t.split("T")[1].split(".")[0]}`}catch(e){return t}},formatChain(t){const e={tron:"Tron (TRC20)",ethereum:"Ethereum (ERC20)",bsc:"BSC (BEP20)",polygon:"Polygon",ETH:"ETH",TRON:"TRON"},a="string"===typeof t?t.toLowerCase():t;return e[a]||t||"-"},getStatusType(t){const e={0:"danger",1:"success",2:"warning",3:"danger"};return e[t]||"info"},getStatusText(t){const e={0:"失败",1:"成功",2:"处理中",3:"校验失败"};return e[t]||"未知"},copy(t){if(!t)return;try{if(navigator.clipboard&&navigator.clipboard.writeText)return navigator.clipboard.writeText(t),void this.$message.success("已复制")}catch(a){}const e=document.createElement("textarea");e.value=t,document.body.appendChild(e),e.select();try{document.execCommand("copy"),this.$message.success("已复制")}catch(a){}document.body.removeChild(e)},async fetchList(){this.loading=!0;try{const t=await(0,i.balanceWithdrawListV2)({pageNum:this.pageNum,pageSize:this.pageSize}),e=t&&(t.data||t),a=Array.isArray(e&&e.rows)?e.rows:Array.isArray(e)?e:[];this.rows=a;const s=Number(e&&(null!=e.total?e.total:t.total));this.total=Number.isFinite(s)?s:0}catch(t){this.rows=[],this.total=0}finally{this.loading=!1}}}}},7317:function(t,e){e.Yp=e.XX=void 0;e.XX=function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"loading",rawName:"v-loading",value:t.payLoading,expression:"payLoading"}]},[t.safeItems.length?e("el-table",{attrs:{data:t.safeItems,border:"","header-cell-style":{textAlign:"left"},"cell-style":{textAlign:"left"}}},[e("el-table-column",{attrs:{type:"expand",width:"46"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-table",{attrs:{data:a.row.orderItemDtoList||[],size:"small",border:"","header-cell-style":{textAlign:"left"},"cell-style":{textAlign:"left"},"row-key":"productMachineId"}},[e("el-table-column",{attrs:{prop:"productMachineId",label:"机器ID","min-width":"120"}}),e("el-table-column",{attrs:{label:"矿机类型","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(t.formatMachineType(e.row&&e.row.type)))]}}],null,!0)}),e("el-table-column",{attrs:{prop:"payCoin",label:"币种","min-width":"100"}}),e("el-table-column",{attrs:{prop:"address",label:"收款地址","min-width":"240"}}),e("el-table-column",{attrs:{prop:"leaseTime",label:"租赁天数","min-width":"100"}}),e("el-table-column",{attrs:{label:"购买数量","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row&&null!=e.row.numbers?e.row.numbers:"—"))]}}],null,!0)}),e("el-table-column",{attrs:{prop:"price",label:"单价(USDT)","min-width":"240"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",{staticClass:"value strong"},[t.formatAmount(a.row.price,a.row.payCoin||"USDT").truncated?e("el-tooltip",{attrs:{content:t.formatAmount(a.row.price,a.row.payCoin||"USDT").full,placement:"top"}},[e("span",[t._v(" "+t._s(t.formatAmount(a.row.price,a.row.payCoin||"USDT").text)+" "),e("i",{staticClass:"el-icon-more amount-more"})])]):e("span",[t._v(t._s(t.formatAmount(a.row.price,a.row.payCoin||"USDT").text))])],1)]}}],null,!0)})],1)]}}])}),e("el-table-column",{attrs:{label:"店铺",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row&&e.row.shopName||"—"))]}}])}),e("el-table-column",{attrs:{label:"订单号","min-width":"220"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",{staticClass:"value mono"},[t._v(t._s(a.row&&a.row.orderNumber||"—"))])]}}])}),e("el-table-column",{attrs:{label:"创建时间",width:"160"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(t.formatDateTime(e.row&&e.row.createTime)))]}}])}),e("el-table-column",{attrs:{label:"商品数","min-width":"70"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(Array.isArray(e.row&&e.row.orderItemDtoList)?e.row.orderItemDtoList.length:0))]}}])}),e("el-table-column",{attrs:{label:"总金额(USDT)",width:"120"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",{staticClass:"value strong"},[t.formatAmount(a.row&&a.row.totalPrice,"USDT").truncated?e("el-tooltip",{attrs:{content:t.formatAmount(a.row&&a.row.totalPrice,"USDT").full,placement:"top"}},[e("span",[t._v(" "+t._s(t.formatAmount(a.row&&a.row.totalPrice,"USDT").text)+" "),e("i",{staticClass:"el-icon-more amount-more"})])]):e("span",[t._v(t._s(t.formatAmount(a.row&&a.row.totalPrice,"USDT").text))])],1)]}}])}),e("el-table-column",{attrs:{width:"160"},scopedSlots:t._u([{key:"header",fn:function(){return[e("el-tooltip",{attrs:{placement:"top",effect:"dark"}},[e("div",{attrs:{slot:"content"},slot:"content"},[t._v(" 实际支付金额/理论支付金额:"),e("br"),t._v(" 1. 实际支付金额是按照矿机实际算力计算支付金额"),e("br"),t._v(" 2. 理论支付金额是卖家定义出售价格 ")]),e("span",{staticStyle:{display:"inline-flex","align-items":"center",gap:"6px"}},[e("i",{staticClass:"el-icon-question",staticStyle:{color:"#909399"},attrs:{"aria-label":"说明",role:"img"}}),t._v(" 已支付金额(USDT) ")])])]},proxy:!0},{key:"default",fn:function(a){return[e("span",{staticClass:"value strong"},[t.formatAmount(a.row&&a.row.payAmount,"USDT").truncated?e("el-tooltip",{attrs:{content:t.formatAmount(a.row&&a.row.payAmount,"USDT").full,placement:"top"}},[e("span",[t._v(" "+t._s(t.formatAmount(a.row&&a.row.payAmount,"USDT").text)+" "),e("i",{staticClass:"el-icon-more amount-more"})])]):e("span",[t._v(t._s(t.formatAmount(a.row&&a.row.payAmount,"USDT").text))])],1)]}}])}),e("el-table-column",{attrs:{label:"订单完成时间",width:"160"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(t.formatDateTime(e.row&&e.row.endTime)))]}}])}),e("el-table-column",{attrs:{label:"操作","min-width":"60",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-button",{staticStyle:{"margin-right":"8px"},attrs:{size:"mini"},on:{click:function(e){return t.handleGoDetail(a.row)}}},[t._v("详情")]),t.shouldShowActions(a.row)?[e("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.handleCheckout(a.row)}}},[t._v("去结算")])]:t._e()]}}])})],1):e("div",{staticClass:"empty"},[t._v(t._s(t.emptyText))]),e("el-dialog",{attrs:{visible:t.dialogVisible,width:"520px",title:"请扫码支付"},on:{"update:visible":function(e){t.dialogVisible=e}}},[e("div",{staticStyle:{"text-align":"left","margin-bottom":"12px",color:"#666"}},[e("div",{staticStyle:{"margin-bottom":"6px"}},[t._v("总金额(USDT): "),e("b",[t.formatAmount(t.paymentDialog.totalPrice,"USDT").truncated?e("el-tooltip",{attrs:{content:t.formatAmount(t.paymentDialog.totalPrice,"USDT").full,placement:"top"}},[e("span",[t._v(" "+t._s(t.formatAmount(t.paymentDialog.totalPrice,"USDT").text)+" "),e("i",{staticClass:"el-icon-more amount-more"})])]):e("span",[t._v(t._s(t.formatAmount(t.paymentDialog.totalPrice,"USDT").text))])],1)]),e("div",{staticStyle:{"margin-bottom":"6px",display:"flex","align-items":"center",gap:"6px"}},[e("el-tooltip",{attrs:{placement:"top",effect:"dark"}},[e("div",{attrs:{slot:"content"},slot:"content"},[t._v(" 实际支付金额/理论支付金额:"),e("br"),t._v(" 1. 实际支付金额是按照矿机实际算力计算支付金额"),e("br"),t._v(" 2. 理论支付金额是卖家定义出售价格 ")]),e("i",{staticClass:"el-icon-question",staticStyle:{color:"#909399"},attrs:{"aria-label":"说明",role:"img"}})]),e("span",[t._v("已支付金额(USDT):")]),e("b",{staticClass:"value strong"},[t.formatAmount(t.paymentDialog.payAmount,"USDT").truncated?e("el-tooltip",{attrs:{content:t.formatAmount(t.paymentDialog.payAmount,"USDT").full,placement:"top"}},[e("span",[t._v(" "+t._s(t.formatAmount(t.paymentDialog.payAmount,"USDT").text)+" "),e("i",{staticClass:"el-icon-more amount-more"})])]):e("span",[t._v(t._s(t.formatAmount(t.paymentDialog.payAmount,"USDT").text))])],1)],1),e("div",{staticStyle:{"margin-bottom":"6px"}},[t._v("待支付金额(USDT): "),e("b",{staticClass:"value strong"},[t.formatAmount(t.paymentDialog.noPayAmount,"USDT").truncated?e("el-tooltip",{attrs:{content:t.formatAmount(t.paymentDialog.noPayAmount,"USDT").full,placement:"top"}},[e("span",[t._v(" "+t._s(t.formatAmount(t.paymentDialog.noPayAmount,"USDT").text)+" "),e("i",{staticClass:"el-icon-more amount-more"})])]):e("span",[t._v(t._s(t.formatAmount(t.paymentDialog.noPayAmount,"USDT").text))])],1)])]),e("div",{staticStyle:{"text-align":"center"}},[t.paymentDialog.img?e("img",{staticStyle:{width:"180px",height:"180px","margin-top":"18px"},attrs:{src:t.paymentDialog.img,alt:"支付二维码"}}):e("div",{staticStyle:{color:"#666"}},[t._v("未返回支付二维码")])]),e("p",{staticStyle:{"margin-bottom":"6px",color:"red","text-align":"left"}},[t._v("注意:如果已经支付对应金额,不要在重复支付,待系统确认后会自动更新订单状态。因个人原因重复支付导致无法退款,平台不承担任何责任。")]),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:function(e){t.dialogVisible=!1}}},[t._v("关闭")])],1)])],1)},e.Yp=[]},7370:function(t,e,a){Object.defineProperty(e,"B",{value:!0}),e.A=void 0,a(4114);var i=a(5952);e.A={name:"Checkout",data(){return{cartItems:[],loading:!1,submitting:!1,form:{name:"",phone:"",address:"",note:""},errors:{}}},computed:{summary(){return(0,i.computeSummary)()}},mounted(){this.loadCart()},methods:{loadCart(){try{this.loading=!0,this.cartItems=(0,i.readCart)(),0===this.cartItems.length&&this.$message.warning("购物车为空,请先添加商品")}catch(t){console.error("加载购物车失败:",t),console.log("加载购物车失败,请稍后重试")}finally{this.loading=!1}},validateForm(){return this.errors={},this.form.name.trim()||(this.errors.name="请输入收货人姓名"),this.form.phone.trim()?/^1[3-9]\d{9}$/.test(this.form.phone.trim())||(this.errors.phone="请输入正确的手机号码"):this.errors.phone="请输入联系电话",this.form.address.trim()||(this.errors.address="请输入收货地址"),0===Object.keys(this.errors).length},async handleSubmit(){if(this.validateForm())try{this.submitting=!0,await new Promise(t=>setTimeout(t,2e3));const t={id:`ORDER_${Date.now()}`,items:this.cartItems,total:this.summary.totalPrice,customer:{name:this.form.name,phone:this.form.phone,address:this.form.address,note:this.form.note},createTime:(new Date).toISOString()};console.log("订单提交成功:",t),(0,i.clearCart)(),this.$message.success("订单提交成功!"),setTimeout(()=>{this.$router.push("/productList")},1500)}catch(t){console.error("提交订单失败:",t),console.log("提交订单失败,请稍后重试")}finally{this.submitting=!1}else this.$message.error("请完善收货信息")}}}},7465:function(t,e,a){Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=void 0,a(8111),a(7588);class i{constructor(){this.recentErrors=new Map,this.throttleTime=3e3,this.errorTypes={"Network Error":"network",timeout:"timeout","Request failed with status code":"statusCode",networkReconnected:"networkStatus",NetworkError:"network"}}getErrorType(t){for(const[e,a]of Object.entries(this.errorTypes))if(t.includes(e))return a;return"unknown"}canShowError(t){const e=this.getErrorType(t),a=Date.now();if(this.recentErrors.has(e)){const t=this.recentErrors.get(e);if(a-t{t-e>this.throttleTime&&this.recentErrors.delete(a)})}}const s=new i;e["default"]=s},7531:function(t,e){e.Yp=e.XX=void 0;e.XX=function(){var t=this,e=t._self._c;return e("div",{staticClass:"order-detail-page"},[e("h2",{staticClass:"title"},[t._v("订单详情")]),t.loading?e("div",{staticClass:"loading"},[t._v("加载中...")]):e("div",[e("el-card",{staticClass:"section"},[e("div",{staticClass:"row"},[e("span",{staticClass:"label"},[t._v("订单ID:")]),e("span",{staticClass:"value mono"},[t._v(t._s(t.order.id||"—"))])]),e("div",{staticClass:"row"},[e("span",{staticClass:"label"},[t._v("订单号:")]),e("span",{staticClass:"value mono"},[t._v(t._s(t.order.orderNumber||"—"))])]),e("div",{staticClass:"row"},[e("span",{staticClass:"label"},[t._v("状态:")]),e("span",{staticClass:"value"},[t._v(t._s(t.getOrderStatusText(t.order.status)))])]),e("div",{staticClass:"row"},[e("span",{staticClass:"label"},[t._v("店铺:")]),e("span",{staticClass:"value"},[t._v(t._s(t.order.shopName||"—"))])]),e("div",{staticClass:"row"},[e("span",{staticClass:"label"},[t._v("金额(USDT):")]),e("span",{staticClass:"value strong"},[t._v(t._s(t.order.totalPrice))])]),e("div",{staticClass:"row"},[e("span",{staticClass:"label"},[t._v("创建时间:")]),e("span",{staticClass:"value"},[t._v(t._s(t.formatDateTime(t.order.createTime)))])]),e("div",{staticClass:"row"},[e("span",{staticClass:"label"},[t._v("订单完成时间:")]),e("span",{staticClass:"value"},[t._v(t._s(t.formatDateTime(t.order.endTime)))])])]),e("el-card",{staticClass:"section",staticStyle:{"margin-top":"12px"}},[e("div",{staticClass:"sub-title"},[t._v("机器列表")]),e("el-table",{staticStyle:{width:"100%"},attrs:{data:t.items,border:"",size:"small","header-cell-style":{textAlign:"left"},"cell-style":{textAlign:"left"}}},[e("el-table-column",{attrs:{prop:"productMachineId",label:"机器ID","min-width":"120"}}),e("el-table-column",{attrs:{label:"矿机类型","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(t.formatMachineType(e.row&&e.row.type)))]}}])}),e("el-table-column",{attrs:{prop:"payCoin",label:"币种","min-width":"100"}}),e("el-table-column",{attrs:{prop:"leaseTime",label:"租赁天数","min-width":"100"}}),e("el-table-column",{attrs:{label:"购买数量","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row&&null!=e.row.numbers?e.row.numbers:"—"))]}}])}),e("el-table-column",{attrs:{prop:"price",label:"单价(USDT)","min-width":"120"}}),e("el-table-column",{attrs:{prop:"address",label:"收款地址","min-width":"240"}})],1)],1),e("div",{staticClass:"actions"},[e("el-button",{on:{click:function(e){return t.$router.back()}}},[t._v("返回")])],1)],1)])},e.Yp=[]},7570:function(t,e,a){var i=a(3999)["default"];Object.defineProperty(e,"B",{value:!0}),e.A=void 0;var s=i(a(1774));e.A={components:{comHeard:()=>Promise.resolve().then(()=>(0,s.default)(a(4767))),appMain:()=>Promise.resolve().then(()=>(0,s.default)(a(1220)))}}},7692:function(t,e,a){var i=a(3999)["default"];Object.defineProperty(e,"B",{value:!0}),e.A=void 0,a(4114),a(8111),a(2489),a(116),a(1701),a(3579);var s=i(a(4487));e.A={name:"ProductDetail",mixins:[s.default],methods:{getCellClass(t){try{if(!t)return"num-strong";if("amount"===String(t.type).toLowerCase())return"price-strong";const e=String(t.key||"").toLowerCase();if(e.includes("price")||e.includes("amount"))return"price-strong";const a=String(t.label||"");return a.includes("价")||a.includes("金额")?"price-strong":"num-strong"}catch(e){return"num-strong"}},multiplyAsDecimal(t){const e=t=>{const e=String(t||0).trim();if(!e.includes("."))return{int:BigInt(e||"0"),scale:0};const[a,i]=e.split("."),s=(i||"").replace(/[^0-9]/g,""),o=(a||"0").replace(/[^0-9-]/g,""),r=o.startsWith("-")?"-":"",n=(r?o.slice(1):o)+s,l=n.replace(/^0+(?=\d)/,"")||"0";return{int:BigInt(r+l),scale:s.length}};let a=1n,i=0;for(const d of t){const{int:t,scale:s}=e(d);a*=t,i+=s}const s=a<0n,o=(s?-a:a).toString();if(0===i)return(s?"-":"")+o;const r=i-o.length,n=r>0?"0".repeat(r)+o:o,l=n.length-i;let c=n.slice(0,l)+"."+n.slice(l);return c=c.replace(/^(-?)0+(?=\d)/,"$1"),c=c.replace(/\.?0+$/,""),c.startsWith(".")&&(c="0"+c),""!==c&&"-"!==c||(c="0"),(s?"-":"")+c},truncateDecimalString(t,e=6){const a=String(t||"0");if(!a.includes("."))return a;const[i,s]=a.split(".");return s.length<=e?a:`${i}.${s.slice(0,e)}`},formatConfirmTotalText(t){try{const e=this.getDisplayPrice?this.getDisplayPrice(t):t&&t.price,a=this.getDisplayPriceCoin&&this.getDisplayPriceCoin(t)||"",i=Number(t&&t.leaseTime)||1,s=[e,i];if(0===this.machineType){const e=Number(t&&t.purchaseQuantity)||1;s.push(e)}const o=this.multiplyAsDecimal(s),r=this.truncateDecimalString(o,6),n=(a||"").toString().toUpperCase();return n?`${r} ${n}`:r}catch(e){return"—"}},getRowMaxPurchase(t){try{const e=Number(t&&t.saleNumbers);return!Number.isFinite(e)||e<0?0:Math.floor(e)}catch(e){return 0}},handlePurchaseQuantityChange(t,e){try{const a=this.getRowMaxPurchase(t);let i=Number(e);Number.isFinite(i)||(i=1),i<1&&(i=1),a>0&&i>a&&(i=a),i=Math.floor(i),this.$set(t,"purchaseQuantity",i)}catch(a){this.$set(t,"purchaseQuantity",1)}},hasAnyPrice(t){try{if(!t)return console.log("[hasAnyPrice] 行数据为空"),!1;if(Array.isArray(t.priceList)&&t.priceList.length){const e=t.priceList.some(t=>t&&null!==t.price&&void 0!==t.price);return e||console.log(`[hasAnyPrice] 机器ID ${t.id||"unknown"} priceList 中无有效价格:`,t.priceList),e}const e=t.price,a=null!==e&&void 0!==e&&""!==e;return a||console.log(`[hasAnyPrice] 机器ID ${t.id||"unknown"} row.price 无效:`,e),a}catch(e){return console.error("[hasAnyPrice] 异常:",e,t),!1}},isRowDisabled(t){try{if(!t)return console.log("[isRowDisabled] 行数据为空"),!0;if(1===t.saleState||2===t.saleState)return console.log(`[isRowDisabled] 机器ID ${t.id||"unknown"} 已售出或售出中, saleState:`,t.saleState),!0;const e=this.hasAnyPrice(t);return e||console.log(`[isRowDisabled] 机器ID ${t.id||"unknown"} 无价格:`,{priceList:t.priceList,price:t.price,hasPriceList:Array.isArray(t.priceList)&&t.priceList.length>0}),!e}catch(e){return console.error("[isRowDisabled] 异常:",e,t),!0}},getRowMaxLeaseDays(t){const e=t&&(t.maxLeaseDays||t.maxLeaseDay||t.max_lease_days)||365,a=Number(e);return Number.isFinite(a)?a<1?1:a>365?365:Math.floor(a):365},getPayImageUrl(t){try{const e=t&&t.payCoinImage?String(t.payCoinImage):"";return e.trim()}catch(e){return""}},getSelectedPayIcon(){try{const t=this.selectedPayKey;if(!t)return"";const[e,a]=String(t).split("|"),i=Array.isArray(this.paymentMethodList)?this.paymentMethodList:[],s=i.find(t=>String(t&&t.payChain).toUpperCase()===String(e).toUpperCase()&&String(t&&t.payCoin).toUpperCase()===String(a).toUpperCase());return this.getPayImageUrl(s)}catch(t){return""}},handlePayFilterChange(t){try{const e="string"===typeof t?t:"";if(e){const[t,a]=e.split("|");this.filters.chain=(t||"").trim(),this.filters.coin=(a||"").trim()}else this.filters.chain="",this.filters.coin="";this.handleSearchFilters()}catch(e){}},handleSearchFilters(){const t=this.buildQueryParams();this.fetchGetMachineInfo(t)},handleResetFilters(){this.filters.minPrice=null,this.filters.maxPrice=null,this.handleSearchFilters()},getFirstCoinSymbol(){try{const t=Array.isArray(this.machineList)?this.machineList:[],e=t.length&&t[0]&&t[0].coin?String(t[0].coin):"";return e?e.toUpperCase():""}catch(t){return""}},getPriceCoinSymbol(){try{const t=Array.isArray(this.machineList)?this.machineList:[],e=t.find(t=>t&&t.payCoin),a=e&&e.payCoin?String(e.payCoin):"";return a?a.toUpperCase():""}catch(t){return""}},handleLeaseDaysChange(t,e){const a=this.getRowMaxLeaseDays(t);let i=Number(e);Number.isFinite(i)||(i=1),i<1&&(i=1),i>a&&(i=a),i=Math.floor(i),this.$set(t,"leaseTime",i)},formatPayTooltip(t){try{if(!t)return"";const e=(t.payChain||"").toString().trim(),a=(t.payCoin||"").toString().trim();return e&&a?`${e} - ${a}`:e||a||""}catch(e){return console.error("formatPayTooltip error:",e),""}},handlePayIconKeyDown(t){try{if(!t)return;console.debug("[pay-icon-keydown]",t.payChain)}catch(e){console.error("handlePayIconKeyDown error:",e)}},handleManualSelectFlat(t,e){try{if(!t)return;if(1===t.saleState||2===t.saleState)return this.$message.warning("该机器已售出或售出中,无法选择"),void this.$set(t,"_selected",!1);this.$set(t,"_selected",!!e)}catch(a){console.error("handleManualSelectFlat error:",a)}},handleGetRowClass({row:t}){return t&&(1===t.saleState||2===t.saleState)?"sold-row":""},handleOpenAddToCartDialog(){const t=Array.isArray(this.dynamicRows)?this.dynamicRows:[],e=t.filter(t=>!!t&&!!t._selected);e.length?(this.confirmAddDialog.items=e.map(t=>({...t,leaseTime:Number(t.leaseTime||1),purchaseQuantity:Number(t.purchaseQuantity||0)})),this.confirmAddDialog.visible=!0):this.$message.warning("请先勾选至少一台矿机")}}}},7723:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.listProducts=e.getProductById=e["default"]=void 0;const a=[{id:"p1001",title:"新能源充电桩(家用)",description:"7kW 单相,智能预约,支持远程监控。",price:1299,image:"https://via.placeholder.com/300x200?text=%E5%85%85%E7%94%B5%E6%A1%A9"},{id:"p1002",title:"工业电能表",description:"三相四线,远程抄表,Modbus 通信。",price:899,image:"https://via.placeholder.com/300x200?text=%E7%94%B5%E8%83%BD%E8%A1%A8"},{id:"p1003",title:"配电柜(入门版)",description:"IP54 防护,内置断路器与防雷模块。",price:5599,image:"https://via.placeholder.com/300x200?text=%E9%85%8D%E7%94%B5%E6%9F%9C"},{id:"p1004",title:"工矿照明灯",description:"120W 高亮,耐腐蚀,适配多场景。",price:329,image:"https://via.placeholder.com/300x200?text=%E7%85%A7%E6%98%8E%E7%81%AF"}],i=async()=>Promise.resolve(a);e.listProducts=i;const s=async t=>{const e=a.find(e=>e.id===t);return Promise.resolve(e)};e.getProductById=s;e["default"]={listProducts:i,getProductById:s}},7937:function(t,e,a){a.r(e),a.d(e,{__esModule:function(){return s.B},default:function(){return l}});var i=a(2361),s=a(3466),o=s.A,r=a(845),n=(0,r.A)(o,i.XX,i.Yp,!1,null,"a9befda4",null),l=n.exports},8235:function(t,e,a){a.r(e),a.d(e,{__esModule:function(){return s.B},default:function(){return l}});var i=a(5367),s=a(1507),o=s.A,r=a(845),n=(0,r.A)(o,i.XX,i.Yp,!1,null,"6b6c93c3",null),l=n.exports},8284:function(t,e,a){Object.defineProperty(e,"B",{value:!0}),e.A=void 0,a(8111),a(2489);var i=a(6299);e.A={name:"WithdrawalHistory",data(){return{activeTab:"pending",detailDialogVisible:!1,selectedItem:null,withdrawalRecords:[],pagination:{pageNum:1,pageSize:10,totalPage:0},loading:!1,statusFilter:"",total:0,pageSizes:[10,20,50],currentPage:1}},computed:{pendingWithdrawals(){return this.withdrawalRecords.filter(t=>2===t.status)},successWithdrawals(){return this.withdrawalRecords.filter(t=>1===t.status)},failedWithdrawals(){return this.withdrawalRecords.filter(t=>0===t.status)}},mounted(){this.activeTab="pending",this.statusFilter=2,this.loadWithdrawalRecords()},methods:{async fetchBalanceWithdrawList(t={}){try{const e={pageNum:1,pageSize:20,...t};console.log("获取提现记录参数:",e);const a=await(0,i.balanceWithdrawList)(e);!a||0!==a.code&&200!==a.code?this.$message({message:a?.msg||"获取提现记录失败",type:"error",showClose:!0}):(this.withdrawalRecords=a.rows||[],this.pagination.totalPage=a.totalPage||0,this.total=a.total||0,console.log("提现记录获取成功:",{records:this.withdrawalRecords,pagination:this.pagination}))}catch(e){console.error("获取提现记录失败:",e)}},async loadWithdrawalRecords(){this.loading=!0;try{const t={pageNum:this.pagination.pageNum,pageSize:this.pagination.pageSize};""!==this.statusFilter&&(t.status=this.statusFilter),await this.fetchBalanceWithdrawList(t)}finally{this.loading=!1}},handleTabClick(t){this.activeTab=t.name,"pending"===t.name?this.statusFilter=2:"success"===t.name?this.statusFilter=1:"failed"===t.name&&(this.statusFilter=0),this.currentPage=1,this.pagination.pageSize=10,this.pagination.pageNum=1,this.loadWithdrawalRecords()},showDetail(t){this.selectedItem=t,this.detailDialogVisible=!0},closeDetail(){this.detailDialogVisible=!1,this.selectedItem=null},getChainName(t){const e={tron:"Tron (TRC20)",ethereum:"Ethereum (ERC20)",bsc:"BSC (BEP20)",polygon:"Polygon (MATIC)"};return e[t]||t},getStatusType(t){const e={0:"danger",1:"success",2:"warning"};return e[t]||"info"},formatAddress(t){return t?t.length>20?`${t.slice(0,10)}...${t.slice(-10)}`:t:""},formatTime(t){if(!t)return"";const e=new Date(t),a=new Date,i=a-e;return i<6e4?"刚刚":i<36e5?`${Math.floor(i/6e4)}分钟前`:i<864e5?`${Math.floor(i/36e5)}小时前`:e.toLocaleDateString()},formatFullTime(t){return t?new Date(t).toLocaleString("zh-CN"):""},copyAddress(t){navigator.clipboard?navigator.clipboard.writeText(t).then(()=>{this.$message.success("地址已复制到剪贴板")}).catch(()=>{this.fallbackCopyAddress(t)}):this.fallbackCopyAddress(t)},fallbackCopyAddress(t){const e=document.createElement("textarea");e.value=t,document.body.appendChild(e),e.select();try{document.execCommand("copy"),this.$message.success("地址已复制到剪贴板")}catch(a){this.$message.error("复制失败,请手动复制")}document.body.removeChild(e)},viewOnExplorer(t,e){const a={tron:`https://tronscan.org/#/transaction/${t}`,ethereum:`https://etherscan.io/tx/${t}`,bsc:`https://bscscan.com/tx/${t}`,polygon:`https://polygonscan.com/tx/${t}`},i=a[e];i?window.open(i,"_blank"):this.$message.error("不支持的区块链网络")},refreshData(){this.loadWithdrawalRecords()},getStatusText(t){const e={0:"提现失败",1:"提现成功",2:"提现中"};return e[t]||"未知状态"},handleSizeChange(t){console.log(`每页 ${t} 条`),this.pagination.pageSize=t,this.pagination.pageNum=1,this.currentPage=1,this.loadWithdrawalRecords()},handleCurrentChange(t){console.log(`当前页: ${t}`),this.pagination.pageNum=t,this.loadWithdrawalRecords()}}}},8401:function(t,e,a){a.r(e),a.d(e,{__esModule:function(){return s.B},default:function(){return l}});var i=a(5656),s=a(460),o=s.A,r=a(845),n=(0,r.A)(o,i.XX,i.Yp,!1,null,"2ad2c7c3",null),l=n.exports},8466:function(t,e){e.Yp=e.XX=void 0;e.XX=function(){var t=this,e=t._self._c;return e("div",{staticClass:"account-product-detail"},[e("div",{staticClass:"header"},[e("el-button",{attrs:{type:"text"},on:{click:t.handleBack}},[t._v("返回")]),e("h2",{staticClass:"title"},[t._v("商品详情")])],1),e("el-card",{staticClass:"detail-card",attrs:{shadow:"never"}},[e("el-form",{staticClass:"detail-form",attrs:{model:t.product,"label-width":"90px",size:"small"}},[e("el-row",{attrs:{gutter:16}},[e("el-col",{attrs:{span:12}},[e("el-form-item",{attrs:{label:"商品ID"}},[e("el-input",{attrs:{value:t.product&&t.product.id,disabled:""}})],1)],1),e("el-col",{attrs:{span:12}},[e("el-form-item",{attrs:{label:"店铺ID"}},[e("el-input",{attrs:{value:t.product&&t.product.shopId,disabled:""}})],1)],1),e("el-col",{attrs:{span:12}},[e("el-form-item",{attrs:{label:"名称"}},[e("el-input",{attrs:{value:t.product&&t.product.name,disabled:""}})],1)],1),e("el-col",{attrs:{span:12}},[e("el-form-item",{attrs:{label:"币种"}},[e("el-input",{attrs:{value:t.product&&t.product.coin,disabled:""}})],1)],1),e("el-col",{attrs:{span:12}},[e("el-form-item",{attrs:{label:"算法"}},[e("el-input",{attrs:{value:t.product&&t.product.algorithm,disabled:""}})],1)],1),e("el-col",{attrs:{span:12}},[e("el-form-item",{attrs:{label:"类型"}},[e("el-input",{attrs:{value:t.product&&(1===t.product.type?"算力套餐":"挖矿机器"),disabled:""}})],1)],1),e("el-col",{attrs:{span:12}},[e("el-form-item",{attrs:{label:"状态"}},[e("el-input",{attrs:{value:t.product&&(1===t.product.state?"下架":"上架"),disabled:""}})],1)],1),e("el-col",{attrs:{span:12}}),e("el-col",{attrs:{span:24}},[e("el-form-item",{attrs:{label:"描述"}},[e("el-input",{attrs:{type:"textarea",rows:3,value:t.product&&t.product.description,disabled:""}})],1)],1)],1)],1)],1),e("el-card",{directives:[{name:"loading",rawName:"v-loading",value:t.updateLoading,expression:"updateLoading"}],staticClass:"detail-card",attrs:{shadow:"never"}},[e("div",{staticClass:"section-title",attrs:{slot:"header"},slot:"header"},[t._v("机器组合")]),t.machineList&&t.machineList.length?e("div",[e("el-table",{staticStyle:{width:"100%"},attrs:{data:t.machineList,border:"",stripe:""}},[e("el-table-column",{attrs:{prop:"user",label:"挖矿账户"}}),e("el-table-column",{attrs:{prop:"id",label:"矿机ID"}}),e("el-table-column",{attrs:{prop:"miner",label:"机器编号"}}),e("el-table-column",{attrs:{label:"实际算力",width:"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.computingPower)+" "+t._s(e.row.unit||""))]}}],null,!1,881627289)},[e("template",{slot:"header"},[e("el-tooltip",{attrs:{content:"实际算力为该机器在本矿池过去24H的平均算力",effect:"dark",placement:"top"}},[e("i",{staticClass:"el-icon-question label-help",attrs:{"aria-label":"帮助",tabindex:"0"}})]),e("span",[t._v("实际算力")])],1)],2),e("el-table-column",{attrs:{label:"理论算力","min-width":"140"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-input",{class:{"changed-input":t.isCellChanged(a.row,"theoryPower")},staticStyle:{"max-width":"260px"},attrs:{size:"small",inputmode:"decimal",disabled:t.isRowDisabled(a.row)},on:{input:function(e){return t.handleTheoryPowerInput(a.$index)},blur:function(e){return t.handleTheoryPowerBlur(a.$index)}},model:{value:a.row.theoryPower,callback:function(e){t.$set(a.row,"theoryPower",e)},expression:"scope.row.theoryPower"}},[e("template",{slot:"append"},[e("el-select",{staticClass:"append-select append-select--unit",staticStyle:{width:"90px"},attrs:{size:"mini",disabled:t.isRowDisabled(a.row)},model:{value:a.row.unit,callback:function(e){t.$set(a.row,"unit",e)},expression:"scope.row.unit"}},t._l(t.unitOptions,function(t){return e("el-option",{key:t,attrs:{label:t,value:t}})}),1)],1)],2)]}}],null,!1,1615065668)}),e("el-table-column",{attrs:{label:"功耗(kw/h)"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-input",{class:{"changed-input":t.isCellChanged(a.row,"powerDissipation")},staticStyle:{"max-width":"260px"},attrs:{size:"small",inputmode:"decimal",disabled:t.isRowDisabled(a.row)},on:{input:function(e){return t.handleNumericCell(a.$index,"powerDissipation")},blur:function(e){return t.handlePowerDissipationBlur(a.$index)}},model:{value:a.row.powerDissipation,callback:function(e){t.$set(a.row,"powerDissipation",e)},expression:"scope.row.powerDissipation"}})]}}],null,!1,2013801812)}),e("el-table-column",{attrs:{label:"型号"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-input",{class:{"changed-input":t.isCellChanged(a.row,"type")},staticStyle:{"max-width":"180px"},attrs:{size:"small",maxlength:20,disabled:t.isRowDisabled(a.row)},on:{input:function(e){return t.handleTypeCell(a.$index)}},model:{value:a.row.type,callback:function(e){t.$set(a.row,"type",e)},expression:"scope.row.type"}})]}}],null,!1,4182654038)}),e("el-table-column",{attrs:{label:"售价",width:"188"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-input",{class:{"changed-input":t.isCellChanged(a.row,"price")},staticStyle:{"max-width":"260px"},attrs:{size:"small",inputmode:"decimal",disabled:t.isRowDisabled(a.row)},on:{input:function(e){return t.handleNumericCell(a.$index,"price")},blur:function(e){return t.handlePriceBlur(a.$index)}},model:{value:a.row._priceEditing,callback:function(e){t.$set(a.row,"_priceEditing",e)},expression:"scope.row._priceEditing"}},[e("template",{slot:"append"},[e("el-select",{staticClass:"append-select append-select--coin",staticStyle:{width:"120px"},attrs:{size:"mini"},on:{change:function(e){return t.handlePayTypeChange(a.$index)}},model:{value:a.row._selectedPayIndex,callback:function(e){t.$set(a.row,"_selectedPayIndex",e)},expression:"scope.row._selectedPayIndex"}},t._l(a.row.priceList||[],function(t,a){return e("el-option",{key:t.payTypeId||a,attrs:{label:[String(t.chain||"").toUpperCase(),String(t.coin||"").toUpperCase()].filter(Boolean).join("-"),value:a}})}),1)],1)],2)]}}],null,!1,3035245774)},[e("template",{slot:"header"},[e("el-tooltip",{attrs:{effect:"dark",placement:"top"}},[e("div",{attrs:{slot:"content"},slot:"content"},[t._v(" 卖家最终收款金额 = 机器售价 × 波动率"),e("br"),t._v(" 波动率规则:"),e("br"),t._v(" 1)0% - 5%(包含5%):波动率 = 1(按售价结算)"),e("br"),t._v(" 2)5%以上:波动率 = 实际算力 / 理论算力,且不会超过 1,即最终结算时不会超过机器售价 ")]),e("i",{staticClass:"el-icon-question label-help",attrs:{"aria-label":"帮助",tabindex:"0"}})]),e("span",[t._v("售价(按结算币种)")])],1)],2),e("el-table-column",{attrs:{label:"最大租赁天数(天)",width:"100"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-input",{class:{"changed-input":t.isCellChanged(a.row,"maxLeaseDays")},staticStyle:{"max-width":"260px"},attrs:{size:"small",inputmode:"numeric",disabled:t.isRowDisabled(a.row)},on:{input:function(e){return t.handleMaxLeaseDaysInput(a.$index)},blur:function(e){return t.handleMaxLeaseDaysBlur(a.$index)}},model:{value:a.row.maxLeaseDays,callback:function(e){t.$set(a.row,"maxLeaseDays",e)},expression:"scope.row.maxLeaseDays"}},[e("template",{slot:"append"},[t._v("天")])],2)]}}],null,!1,3414109227)}),e("el-table-column",{attrs:{label:"上下架","min-width":"140"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-switch",{attrs:{"active-value":0,"inactive-value":1,"active-text":"上架","inactive-text":"下架",disabled:t.isRowDisabled(a.row)},on:{change:function(e){return t.handleStateChange(a.$index)}},model:{value:a.row.state,callback:function(e){t.$set(a.row,"state",e)},expression:"scope.row.state"}})]}}],null,!1,1620801377)}),e("el-table-column",{attrs:{label:"售出状态","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-tag",{attrs:{type:0===a.row.saleState?"info":1===a.row.saleState?"danger":"warning"}},[t._v(" "+t._s(0===a.row.saleState?"未售出":1===a.row.saleState?"已售出":"售出中")+" ")])]}}],null,!1,1904393654)}),e("el-table-column",{attrs:{label:"操作",fixed:"right","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-button",{staticStyle:{color:"#f56c6c"},attrs:{type:"text",size:"small",disabled:t.isRowDisabled(a.row)},on:{click:function(e){return t.handleDeleteMachine(a.row)}}},[t._v("删除")])]}}],null,!1,979761678)})],1)],1):e("div",{staticClass:"empty-text"},[t._v("暂无组合数据")])]),t.machineList&&t.machineList.length?e("div",{staticClass:"actions"},[e("el-button",{attrs:{type:"primary"},on:{click:t.handleOpenConfirm}},[t._v("提交修改机器")])],1):t._e(),e("el-dialog",{attrs:{title:"确认提交修改",visible:t.confirmVisible,width:"520px"},on:{"update:visible":function(e){t.confirmVisible=e}}},[e("div",[e("p",[t._v("请仔细确认已选择机器机器组合里的机器价格及相关参数定义。")]),e("p",[t._v("机器修改上架后,一经售出,在机器出售期间不能修改价格及机器参数。")])]),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:function(e){t.confirmVisible=!1}}},[t._v("取消")]),e("el-button",{attrs:{type:"primary"},on:{click:t.handleSubmitMachines}},[t._v("确认提交修改")])],1)])],1)},e.Yp=[]},8475:function(t,e){e.Yp=e.XX=void 0;e.XX=function(){var t=this,e=t._self._c;return e("div",{staticClass:"withdrawal-history-container"},[t._m(0),e("div",{staticClass:"tab-container"},[e("el-tabs",{on:{"tab-click":t.handleTabClick},model:{value:t.activeTab,callback:function(e){t.activeTab=e},expression:"activeTab"}},[e("el-tab-pane",{attrs:{label:"提现中",name:"pending"}},[e("div",{staticClass:"tab-content"},[e("div",{staticClass:"list-header"},[e("span",{staticClass:"list-title"},[t._v("提现中 ("+t._s(t.total)+")")]),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.refreshData}},[e("i",{staticClass:"el-icon-refresh"}),t._v(" 刷新 ")])],1),e("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"withdrawal-list"},[t._l(t.pendingWithdrawals,function(a){return e("div",{key:a.id,staticClass:"withdrawal-item pending",on:{click:function(e){return t.showDetail(a)}}},[e("div",{staticClass:"item-main"},[e("div",{staticClass:"item-left"},[e("div",{staticClass:"amount"},[t._v(t._s(a.amount)+" "+t._s(a.toSymbol||"USDT"))]),e("div",{staticClass:"chain"},[t._v(t._s(t.getChainName(a.toChain)))])]),e("div",{staticClass:"item-right"},[e("div",{staticClass:"status pending-status"},[e("i",{staticClass:"el-icon-loading"}),t._v(" "+t._s(t.getStatusText(a.status))+" ")]),e("div",{staticClass:"time"},[t._v(t._s(t.formatTime(a.createTime)))])])]),e("div",{staticClass:"item-footer"},[e("div",{staticClass:"footer-left"},[e("span",{staticClass:"address"},[t._v(t._s(t.formatAddress(a.toAddress)))]),a.txHash?e("span",{staticClass:"tx-hash"},[e("i",{staticClass:"el-icon-link"}),t._v(" "+t._s(t.formatAddress(a.txHash))+" ")]):t._e()]),e("i",{staticClass:"el-icon-arrow-right"})])])}),0===t.pendingWithdrawals.length?e("div",{staticClass:"empty-state"},[e("i",{staticClass:"el-icon-document"}),e("p",[t._v("暂无提现中的记录")])]):t._e()],2)])]),e("el-tab-pane",{attrs:{label:"提现成功",name:"success"}},[e("div",{staticClass:"tab-content"},[e("div",{staticClass:"list-header"},[e("span",{staticClass:"list-title"},[t._v("提现成功 ("+t._s(t.total)+")")]),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.refreshData}},[e("i",{staticClass:"el-icon-refresh"}),t._v(" 刷新 ")])],1),e("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"withdrawal-list"},[t._l(t.successWithdrawals,function(a){return e("div",{key:a.id,staticClass:"withdrawal-item success",on:{click:function(e){return t.showDetail(a)}}},[e("div",{staticClass:"item-main"},[e("div",{staticClass:"item-left"},[e("div",{staticClass:"amount"},[t._v(t._s(a.amount)+" "+t._s(a.toSymbol||"USDT"))]),e("div",{staticClass:"chain"},[t._v(t._s(t.getChainName(a.toChain)))])]),e("div",{staticClass:"item-right"},[e("div",{staticClass:"status success-status"},[e("i",{staticClass:"el-icon-check"}),t._v(" "+t._s(t.getStatusText(a.status))+" ")]),e("div",{staticClass:"time"},[t._v(t._s(t.formatTime(a.createTime)))])])]),e("div",{staticClass:"item-footer"},[e("div",{staticClass:"footer-left"},[e("span",{staticClass:"address"},[t._v(t._s(t.formatAddress(a.toAddress)))]),a.txHash?e("span",{staticClass:"tx-hash"},[e("i",{staticClass:"el-icon-link"}),t._v(" "+t._s(t.formatAddress(a.txHash))+" ")]):t._e()]),e("i",{staticClass:"el-icon-arrow-right"})])])}),0===t.successWithdrawals.length?e("div",{staticClass:"empty-state"},[e("i",{staticClass:"el-icon-document"}),e("p",[t._v("暂无提现成功的记录")])]):t._e()],2)])]),e("el-tab-pane",{attrs:{label:"提现失败",name:"failed"}},[e("div",{staticClass:"tab-content"},[e("div",{staticClass:"list-header"},[e("span",{staticClass:"list-title"},[t._v("提现失败 ("+t._s(t.total)+")")]),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.refreshData}},[e("i",{staticClass:"el-icon-refresh"}),t._v(" 刷新 ")])],1),e("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"withdrawal-list"},[t._l(t.failedWithdrawals,function(a){return e("div",{key:a.id,staticClass:"withdrawal-item failed",on:{click:function(e){return t.showDetail(a)}}},[e("div",{staticClass:"item-main"},[e("div",{staticClass:"item-left"},[e("div",{staticClass:"amount"},[t._v(t._s(a.amount)+" "+t._s(a.toSymbol||"USDT"))]),e("div",{staticClass:"chain"},[t._v(t._s(t.getChainName(a.toChain)))])]),e("div",{staticClass:"item-right"},[e("div",{staticClass:"status failed-status"},[e("i",{staticClass:"el-icon-close"}),t._v(" "+t._s(t.getStatusText(a.status))+" ")]),e("div",{staticClass:"time"},[t._v(t._s(t.formatTime(a.createTime)))])])]),e("div",{staticClass:"item-footer"},[e("div",{staticClass:"footer-left"},[e("span",{staticClass:"address"},[t._v(t._s(t.formatAddress(a.toAddress)))]),a.txHash?e("span",{staticClass:"tx-hash"},[e("i",{staticClass:"el-icon-link"}),t._v(" "+t._s(t.formatAddress(a.txHash))+" ")]):t._e()]),e("i",{staticClass:"el-icon-arrow-right"})])])}),0===t.failedWithdrawals.length?e("div",{staticClass:"empty-state"},[e("i",{staticClass:"el-icon-document"}),e("p",[t._v("暂无提现失败的记录")])]):t._e()],2)])])],1),e("el-row",[e("el-col",{staticStyle:{display:"flex","justify-content":"center"},attrs:{span:24}},[e("el-pagination",{staticStyle:{margin:"0 auto","margin-top":"10px"},attrs:{"current-page":t.currentPage,"page-sizes":t.pageSizes,"page-size":t.pagination.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange,"update:currentPage":function(e){t.currentPage=e},"update:current-page":function(e){t.currentPage=e}}})],1)],1)],1),e("el-dialog",{attrs:{title:"提现详情",visible:t.detailDialogVisible,width:"600px"},on:{"update:visible":function(e){t.detailDialogVisible=e},close:t.closeDetail}},[t.selectedItem?e("div",{staticClass:"detail-content"},[e("div",{staticClass:"detail-section"},[e("h3",{staticClass:"section-title"},[t._v("基本信息")]),e("div",{staticClass:"detail-list"},[e("div",{staticClass:"detail-row"},[e("span",{staticClass:"detail-label"},[t._v("提现ID")]),e("span",{staticClass:"detail-value"},[t._v(t._s(t.selectedItem.id))])]),e("div",{staticClass:"detail-row"},[e("span",{staticClass:"detail-label"},[t._v("提现金额")]),e("span",{staticClass:"detail-value amount"},[t._v(t._s(t.selectedItem.amount)+" "+t._s(t.selectedItem.toSymbol||"USDT"))])]),e("div",{staticClass:"detail-row"},[e("span",{staticClass:"detail-label"},[t._v("区块链网络")]),e("span",{staticClass:"detail-value"},[t._v(t._s(t.getChainName(t.selectedItem.toChain)))])]),e("div",{staticClass:"detail-row"},[e("span",{staticClass:"detail-label"},[t._v("提现状态")]),e("span",{staticClass:"detail-value"},[e("el-tag",{attrs:{type:t.getStatusType(t.selectedItem.status)}},[t._v(" "+t._s(t.getStatusText(t.selectedItem.status))+" ")])],1)])])]),e("div",{staticClass:"detail-section"},[e("h3",{staticClass:"section-title"},[t._v("地址信息")]),e("div",{staticClass:"detail-list"},[e("div",{staticClass:"detail-row"},[e("span",{staticClass:"detail-label"},[t._v("收款地址")]),e("div",{staticClass:"address-container"},[e("span",{staticClass:"detail-value address"},[t._v(t._s(t.selectedItem.toAddress))]),e("el-button",{attrs:{type:"text",size:"small"},on:{click:function(e){return t.copyAddress(t.selectedItem.toAddress)}}},[t._v(" 复制 ")])],1)]),e("div",{staticClass:"detail-row"},[e("span",{staticClass:"detail-label"},[t._v("交易哈希")]),e("div",{staticClass:"address-container"},[e("span",{staticClass:"detail-value address"},[t._v(t._s(t.selectedItem.txHash))]),t.selectedItem.txHash?e("el-button",{attrs:{type:"text",size:"small"},on:{click:function(e){return t.copyAddress(t.selectedItem.txHash)}}},[t._v(" 复制 ")]):t._e()],1)])])]),e("div",{staticClass:"detail-section"},[e("h3",{staticClass:"section-title"},[t._v("时间信息")]),e("div",{staticClass:"detail-list"},[e("div",{staticClass:"detail-row"},[e("span",{staticClass:"detail-label"},[t._v("提现时间")]),e("span",{staticClass:"detail-value"},[t._v(t._s(t.formatFullTime(t.selectedItem.createTime)))])]),t.selectedItem.updateTime?e("div",{staticClass:"detail-row"},[e("span",{staticClass:"detail-label"},[t._v("完成时间")]),e("span",{staticClass:"detail-value"},[t._v(t._s(t.formatFullTime(t.selectedItem.updateTime)))])]):t._e()])])]):t._e(),e("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:t.closeDetail}},[t._v("关闭")])],1)])],1)},e.Yp=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"page-header"},[e("h1",{staticClass:"page-title"},[t._v("提现记录")]),e("p",{staticClass:"page-subtitle"},[t._v("查看您的提现申请和交易状态")])])}]},8567:function(t,e,a){Object.defineProperty(e,"B",{value:!0}),e.A=void 0,a(4114);var i=a(2549),s=a(6966);e.A={name:"LoginPage",data(){const t=(t,e,a)=>{if(!e)return void a(new Error("请输入邮箱"));const i=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;i.test(e)?a():a(new Error("请输入有效的邮箱地址"))},e=(t,e,a)=>{if(!e)return void a(new Error("请输入密码"));const i=/^(?!.*[\u4e00-\u9fa5])(?![a-zA-Z]+$)(?![A-Z0-9]+$)(?![A-Z\W_]+$)(?![a-z0-9]+$)(?![a-z\W_]+$)(?![0-9\W_]+$)[a-zA-Z0-9\W_]{8,32}$/;i.test(e)?a():a(new Error("密码应包含大小写字母、数字和特殊字符,长度8-32位"))};return{loginForm:{email:"",password:"",code:""},loginRules:{email:[{required:!0,validator:t,trigger:"blur"}],password:[{required:!0,validator:e,trigger:"blur"}],code:[{required:!0,message:"请输入验证码",trigger:"blur"},{min:1,max:10,message:"验证码长度为1-10位",trigger:"blur"}]},loading:!1,sendingCode:!1,countdown:0,timer:null}},mounted(){this.$route.query.email&&(this.loginForm.email=this.$route.query.email)},beforeDestroy(){this.timer&&(clearInterval(this.timer),this.timer=null)},methods:{goToShop(){"/productList"!==this.$route.path?this.$router.push("/productList"):this.$router.go(-1)},async handleSendCode(){const t=(this.loginForm.email||"").trim();if(!t)return this.$message.warning("请输入邮箱地址"),void this.$refs.loginForm.validateField("email");const e=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;if(!e.test(t))return this.$message.warning("请输入有效的邮箱地址"),void this.$refs.loginForm.validateField("email");this.sendingCode=!0;try{const t=await(0,i.sendLoginCode)({email:this.loginForm.email});t&&200===t.code?(this.$message.success(t.msg||"验证码已发送,请查收邮箱"),this.startCountdown()):this.$message.error(t.msg||"发送验证码失败")}catch(a){console.error("发送验证码失败:",a)}finally{this.sendingCode=!1}},startCountdown(){this.countdown=60,this.timer=setInterval(()=>{this.countdown--,this.countdown<=0&&(clearInterval(this.timer),this.timer=null)},1e3)},async handleLogin(){try{await this.$refs.loginForm.validate()}catch(t){return}this.loading=!0;try{const t=this.loginForm.password;let e=t;const a=(0,s.rsaEncryptSync)(t);if(a)e=a;else{const a=await(0,s.rsaEncrypt)(t);if(!a)return this.$message.error("密码加密失败,请重试"),void(this.loading=!1);e=a}const o=await(0,i.getLogin)({email:this.loginForm.email,password:e,code:this.loginForm.code});if(o&&200===o.code){const t=o.data.access_token;t&&localStorage.setItem("leasToken",JSON.stringify(t));const e={userName:o.data.userName||this.loginForm.email,expires_in:o.data.expires_in||null};localStorage.setItem("userInfo",JSON.stringify(e)),localStorage.setItem("leasEmail",this.loginForm.email),window.dispatchEvent(new CustomEvent("login-status-changed")),this.$message({message:"登录成功",type:"success",duration:3e3,showClose:!0});const a=this.$route.query.redirect||"/productList";this.$router.push(a)}else this.$message.error(o.msg||"登录失败")}catch(t){console.error("登录失败:",t),this.$message.error("登录失败,请重试")}finally{this.loading=!1}}}}},8569:function(t,e,a){a.r(e),a.d(e,{__esModule:function(){return s.B},default:function(){return l}});var i=a(4555),s=a(8567),o=s.A,r=a(845),n=(0,r.A)(o,i.XX,i.Yp,!1,null,"1cc6346a",null),l=n.exports},8586:function(t,e,a){Object.defineProperty(e,"B",{value:!0}),e.A=void 0;var i=a(4180);e.A={name:"PurchasedMachineDetail",data(){return{loading:!1,detailData:null}},created(){this.fetchDetail()},computed:{purchasedMachinesList(){return this.detailData&&Array.isArray(this.detailData.purchasedMachines)?this.detailData.purchasedMachines:[]}},methods:{async fetchDetail(){const t=this.$route.params.id;if(!t)return this.$message.error("缺少ID参数"),void this.handleBack();this.loading=!0;try{const e={id:t},a=await(0,i.getPurchasedInfoV2)(e);if(!a||0!==a.code&&200!==a.code){const t=a&&a.msg||"获取详情失败";this.$message.error(t)}else this.detailData=a.data||a,this.detailData||this.$message.warning("未找到对应的详情信息")}catch(e){console.error("获取详情失败",e),this.$message.error("获取详情失败,请稍后重试")}finally{this.loading=!1}},handleBack(){this.$router.go(-1)},formatDateTime(t){if(!t)return"—";try{const e=String(t);return e.includes("T")?e.replace("T"," "):e}catch(e){return String(t)}},async handleCopy(t,e="内容"){if(t)try{const i=String(t).trim();if(navigator&&navigator.clipboard&&navigator.clipboard.writeText)await navigator.clipboard.writeText(i),this.$message({message:`${e}已复制到剪贴板`,type:"success",showClose:!0});else{const t=document.createElement("textarea");t.value=i,t.style.position="fixed",t.style.left="-9999px",document.body.appendChild(t),t.focus(),t.select();try{document.execCommand("copy"),this.$message({message:`${e}已复制到剪贴板`,type:"success",showClose:!0})}catch(a){this.$message({message:"复制失败,请手动复制",type:"error",showClose:!0})}document.body.removeChild(t)}}catch(i){console.error("复制失败",i),this.$message({message:"复制失败,请手动复制",type:"error",showClose:!0})}else this.$message({message:`${e}为空,无法复制`,type:"warning",showClose:!0})},getStatusText(t){const e=Number(t);return 0===e?"租约已到期":1===e?"挖矿中":2===e?"卖家矿机启动中":!0===t?"挖矿中":"未知状态"},getStatusType(t){const e=Number(t);return 0===e?"info":1===e?"success":2===e?"warning":!0===t?"success":"info"}}}},8639:function(t,e){e.Yp=e.XX=void 0;e.XX=function(){var t=this,e=t._self._c;return e("div",{staticClass:"wallet-container"},[e("div",{staticClass:"wallet-toolbar",attrs:{role:"region","aria-label":"钱包操作"}},[e("el-button",{staticClass:"create-wallet-btn",attrs:{type:"primary"},on:{click:t.openCreateWallet}},[e("i",{staticClass:"el-icon-plus",staticStyle:{"margin-right":"6px"}}),t._v("充值 ")])],1),e("section",{staticClass:"wallet-card-section"},t._l(t.walletList,function(a){return e("div",{key:a.id,staticClass:"wallet-card"},[e("div",{staticClass:"wallet-header"},[e("h2",{staticClass:"wallet-title"},[e("i",{staticClass:"el-icon-wallet"}),t._v(" 我的钱包 "),e("el-tag",{staticStyle:{"margin-left":"8px"},attrs:{size:"mini",effect:"dark"}},[t._v(" "+t._s((a.fromChain||a.chain||"").toUpperCase())+" "+t._s((a.fromSymbol||a.coin||"").toUpperCase())+" ")])],1),e("div",{staticClass:"wallet-balance"},[e("div",{staticClass:"balance-item"},[e("span",{staticClass:"balance-label"},[t._v("可用余额")]),e("span",{staticClass:"balance-amount"},[t._v(t._s(a.walletBalance||a.balance||0)+" "+t._s(t.displaySymbol(a)))])]),e("div",{staticClass:"balance-item"},[e("el-tooltip",{attrs:{placement:"top",effect:"dark"}},[e("div",{attrs:{slot:"content"},slot:"content"},[t._v(" 冻结金额不能使用或提现,以下情况会冻结钱包余额:"),e("br"),t._v(" 1. 下单机器后会冻结订单对应金额"),e("br"),t._v(" 2. 提交提现后,金额正在提现中 ")]),e("i",{staticClass:"el-icon-question balance-tip-icon"})]),e("span",{staticClass:"balance-label"},[t._v("冻结余额")]),e("span",{staticClass:"balance-amount frozen"},[t._v(t._s(a.blockedBalance||0)+" "+t._s(t.displaySymbol(a)))])],1),e("el-button",{staticClass:"withdraw-inline-btn",attrs:{type:"success",size:"mini"},on:{click:function(e){return t.handleWithdraw(a)}}},[t._v(" 提现 ")])],1)])])}),0),e("div",{staticClass:"transaction-section"},[e("h3",{staticClass:"section-title"},[t._v("最近交易")]),e("div",{staticClass:"transaction-list"},[t._l(t.recentTransactions,function(a){return e("div",{key:a.id,staticClass:"transaction-item"},[e("div",{staticClass:"transaction-info"},[e("span",{staticClass:"transaction-type"},[t._v(t._s(a.type))]),e("span",{staticClass:"transaction-time"},[t._v(t._s(a.time))]),e("el-tag",{staticClass:"transaction-status",attrs:{size:"mini",type:a.statusTagType||"info"}},[t._v(" "+t._s(a.statusText||"-")+" ")])],1),e("div",{staticClass:"transaction-amount",class:a.amount>0?"positive":"negative"},[t._v(" "+t._s(a.amount>0?"+":"")+t._s(a.amountText)+" USDT ")])])}),0===t.recentTransactions.length?e("div",{staticClass:"empty-state"},[t._v(" 暂无交易记录 ")]):t._e()],2)]),e("el-dialog",{attrs:{title:"钱包余额充值",visible:t.rechargeDialogVisible,width:"660px"},on:{"update:visible":function(e){t.rechargeDialogVisible=e},close:t.resetRechargeForm}},[e("div",{staticClass:"recharge-content"},[e("div",{staticClass:"wallet-address-section"},[e("h4",{staticClass:"section-title"},[t._v("钱包地址")]),e("div",{staticClass:"charge-meta"},[e("el-tag",{staticClass:"meta-tag",attrs:{size:"small",effect:"dark",type:"warning"}},[e("i",{staticClass:"el-icon-link"}),e("span",{staticClass:"meta-title"},[t._v("充值链:")]),e("span",{staticClass:"meta-val"},[t._v(t._s((t.WalletData.fromChain||t.WalletData.chain||"").toString().toUpperCase()))])]),e("el-tag",{staticClass:"meta-tag",attrs:{size:"small",effect:"dark",type:"warning"}},[e("i",{staticClass:"el-icon-coin"}),e("span",{staticClass:"meta-title"},[t._v("充值币种:")]),e("span",{staticClass:"meta-val"},[t._v(t._s((t.WalletData.fromSymbol||t.WalletData.coin||"").toString().toUpperCase()))])])],1),e("div",{staticClass:"address-container"},[e("el-input",{staticClass:"address-input",attrs:{readonly:"",disabled:!0},model:{value:t.WalletData.fromAddress,callback:function(e){t.$set(t.WalletData,"fromAddress",e)},expression:"WalletData.fromAddress"}}),e("el-button",{staticClass:"copy-btn",attrs:{type:"primary",size:"small"},on:{click:function(e){return t.copyAddress(t.WalletData.fromAddress)}}},[t._v(" 复制 ")])],1),e("p",{staticClass:"address-tip"},[t._v("请向此地址转账非"+t._s(t.displaySymbol(t.WalletData))+"资产,否则资产将无法找回.")])]),e("div",{staticClass:"qr-code-section"},[e("h4",{staticClass:"section-title"},[t._v("扫码充值")]),e("div",{staticClass:"qr-code-container"},[e("div",{ref:"qrCodeRef",staticClass:"qr-code"}),e("p",{staticClass:"qr-tip"},[t._v("使用支持"+t._s(t.displaySymbol(t.WalletData))+"的钱包扫描二维码")])])]),e("div",{staticClass:"recharge-notice"},[e("h4",{staticClass:"section-title"},[t._v("充值说明")]),e("ul",{staticClass:"notice-list"},[e("li",[t._v("充值后请耐心等待余额更新或在资金流水页面查看最新充值记录")]),e("li",[t._v("最小充值金额:10 "+t._s(t.displaySymbol(t.WalletData)))])])])]),e("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:function(e){t.rechargeDialogVisible=!1}}},[t._v("关闭")])],1)]),e("el-dialog",{attrs:{title:"USDT提现",visible:t.withdrawDialogVisible,width:"720px","close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(e){t.withdrawDialogVisible=e},close:t.resetWithdrawForm}},[e("el-form",{ref:"withdrawForm",attrs:{model:t.withdrawForm,rules:t.withdrawRules,"label-width":"120px"}},[e("el-form-item",{attrs:{label:"提现链"}},[e("el-input",{staticStyle:{width:"100%"},attrs:{value:(t.WalletData.fromChain||t.WalletData.chain||t.withdrawForm.toChain||"").toString().toUpperCase(),disabled:!0}})],1),e("el-form-item",{attrs:{label:"提现币种"}},[e("el-input",{staticStyle:{width:"100%"},attrs:{value:t.displayWithdrawSymbol,disabled:!0}})],1),e("el-form-item",{attrs:{label:"提现金额",prop:"amount"}},[e("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入提现金额",inputmode:"decimal"},on:{input:t.handleAmountInput},model:{value:t.withdrawForm.amount,callback:function(e){t.$set(t.withdrawForm,"amount",e)},expression:"withdrawForm.amount"}},[e("template",{slot:"append"},[t._v(t._s(t.displayWithdrawSymbol))])],2),e("div",{staticClass:"balance-info"},[e("div",{staticClass:"balance-total"},[t._v("钱包总余额:"+t._s(t.totalBalance)+" "+t._s(t.displayWithdrawSymbol))]),e("div",{staticClass:"balance-row"},[e("span",[t._v("可用余额:"+t._s(t.availableWithdrawBalance)+" "+t._s(t.displayWithdrawSymbol))]),e("span",{staticClass:"divider"},[t._v("|")]),e("span",{staticClass:"frozen-info"},[e("el-tooltip",{attrs:{placement:"top",effect:"dark"}},[e("div",{attrs:{slot:"content"},slot:"content"},[t._v(" 冻结金额不能使用或提现,以下情况会冻结钱包余额:"),e("br"),t._v(" 1. 下单机器后会冻结订单对应金额"),e("br"),t._v(" 2. 提交提现后,金额正在提现中 ")]),e("i",{staticClass:"el-icon-question frozen-tip-icon"})]),t._v(" 冻结余额:"+t._s(t.WalletData.blockedBalance||0)+" "+t._s(t.displayWithdrawSymbol)+" "),e("span",{staticClass:"frozen-tip"},[t._v("(购买机器下单后冻结,不可提现)")])],1)])])],1),e("el-form-item",{attrs:{label:"手续费"}},[e("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"手续费",disabled:!0},model:{value:t.withdrawForm.fee,callback:function(e){t.$set(t.withdrawForm,"fee",e)},expression:"withdrawForm.fee"}},[e("template",{slot:"append"},[t._v(t._s(t.displayWithdrawSymbol))])],2),e("div",{staticClass:"fee-info"},[t._v(" 网络手续费:"+t._s(t.withdrawForm.fee||"0.00")+" "+t._s(t.displayWithdrawSymbol)+" ")])],1),e("el-form-item",{attrs:{label:"实际到账"}},[e("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"实际到账金额",disabled:!0},model:{value:t.actualAmount,callback:function(e){t.actualAmount=e},expression:"actualAmount"}},[e("template",{slot:"append"},[t._v(t._s(t.displayWithdrawSymbol))])],2),e("div",{staticClass:"actual-amount-info"},[t._v(" 实际到账:"+t._s(t.actualAmount)+" "+t._s(t.displayWithdrawSymbol)+" ")])],1),e("el-form-item",{attrs:{label:"收款地址",prop:"toAddress"}},[e("el-input",{staticStyle:{width:"100%"},attrs:{type:"textarea",rows:3,placeholder:"请输入收款钱包地址"},model:{value:t.withdrawForm.toAddress,callback:function(e){t.$set(t.withdrawForm,"toAddress",e)},expression:"withdrawForm.toAddress"}}),e("div",{staticClass:"address-tip"},[t._v(" 请确保地址正确,错误地址将导致资产丢失 ")])],1),e("el-form-item",{attrs:{label:"谷歌验证码",prop:"googleCode"}},[e("el-input",{ref:"googleCodeInput",staticStyle:{width:"100%"},attrs:{placeholder:"请输入6位谷歌验证码",maxlength:"6"},on:{input:t.handleGoogleCodeInput},model:{value:t.withdrawForm.googleCode,callback:function(e){t.$set(t.withdrawForm,"googleCode",e)},expression:"withdrawForm.googleCode"}},[e("template",{slot:"prepend"},[e("i",{staticClass:"el-icon-key"})])],2),e("div",{staticClass:"google-code-tip"},[t._v(" 为了保障您的账户安全,请输入您的谷歌验证器中的6位验证码 ")])],1)],1),e("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:function(e){t.withdrawDialogVisible=!1}}},[t._v("取消")]),e("el-button",{attrs:{type:"primary",loading:t.withdrawLoading},on:{click:t.confirmWithdraw}},[t._v("确认提现")])],1)],1),e("el-dialog",{attrs:{title:"链上充值",visible:t.createDialogVisible,"close-on-click-modal":!1,"close-on-press-escape":!1,width:"520px"},on:{"update:visible":function(e){t.createDialogVisible=e}}},[e("el-form",{attrs:{"label-width":"120px"}},[e("el-form-item",{attrs:{label:"选择充值链/币种"}},[e("el-cascader",{staticStyle:{width:"100%"},attrs:{options:t.options},model:{value:t.createValue,callback:function(e){t.createValue=e},expression:"createValue"}})],1)],1),e("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:function(e){t.createDialogVisible=!1}}},[t._v("取消")]),e("el-button",{attrs:{type:"primary",loading:t.createLoading},on:{click:t.confirmCreateWallet}},[t._v("确定")])],1)],1)],1)},e.Yp=[]},8641:function(t,e,a){a.r(e),a.d(e,{__esModule:function(){return s.B},default:function(){return l}});var i=a(7531),s=a(9660),o=s.A,r=a(845),n=(0,r.A)(o,i.XX,i.Yp,!1,null,"31af0562",null),l=n.exports},8732:function(t,e,a){Object.defineProperty(e,"B",{value:!0}),e.A=void 0,a(4114),a(8111),a(1148),a(2489),a(116),a(7588),a(1701),a(8237),a(3579),a(7642),a(8004),a(3853),a(5876),a(2475),a(5024),a(1698);var i=a(5844),s=a(4180),o=a(4981),r=a(6966);e.A={name:"Cart",data(){return{loading:!1,shops:[],groups:[],selectedGroups:[],selectedMachinesMap:{},confirmDialog:{visible:!1,shops:[],count:0,totalsByCoin:{}},expandedGroupKeys:[],expandedShopKeys:[],creatingOrder:!1,successDialog:{visible:!1},noticeDialog:{visible:!1,checked:!1,countdown:5},noticeTimer:null,pendingCheckoutShop:null,pendingCheckoutAll:null,googleCodeDialog:{visible:!1,code:"",error:"",loading:!1},machineSupportData:[],configDialog:{visible:!1,coin:"",algorithm:"",coinOptions:[],algorithmOptions:[],coinAlgoOptions:[],coinAlgoValue:[],selectedMachines:[],poolOptions:[],poolValue:[],poolRawData:[],selectedMachineIds:[],walletAddress:"",miningAccount:"",workerId:"",configuredMachines:[]},options:[],payDialog:{visible:!1,value:[],loading:!1},selectedChain:"",selectedCoin:"",selectedPrice:0,paySelectionMap:{},clearOffLoading:!1,settlementSuccessfulVisible:!1,paramsV2:{pageNum:1,pageSize:20}}},computed:{isAllSelected(){return this.selectedGroups.length&&this.selectedGroups.length===this.groups.length},isCartEmpty(){const t=Array.isArray(this.shops)&&this.shops.length>0,e=Array.isArray(this.groups)&&this.groups.length>0;return!t&&!e},selectedMachineCount(){return Object.values(this.selectedMachinesMap).reduce((t,e)=>t+(e?e.size:0),0)},selectedTotal(){const t=this.selectedTotalByCoin;let e=0;return Object.values(t||{}).forEach(t=>{e+=Number(t||0)}),e},selectedTotalByCoin(){const t=new Map,e=Array.isArray(this.shops)?this.shops:[];e.forEach(e=>{const a=this.selectedMachinesMap[e.id];if(!a||!a.size)return;const i=this.paySelectionMap[e.id]||"",[s,o]=String(i).split("|"),r=this.toUpperText(o||"");if(!r)return;const n=Array.isArray(e.productMachineDtoList)?e.productMachineDtoList:[];n.forEach(i=>{if(a.has(i.id)){const a=this.getMachineUnitPriceBySelection(e,i);if(null!=a){const e=Math.max(1,Math.floor(Number(i.leaseTime||1))),s=Number(a||0)*e,o=t.get(r)||0;t.set(r,o+s)}}})});const a={};return t.forEach((t,e)=>{a[e]=t}),a},canCheckout(){return this.selectedMachineCount>0||this.selectedGroups.length>0},isGoogleCodeValid(){const t=this.googleCodeDialog.code;return/^\d{6}$/.test(t)},payCoinSymbol(){return(this.selectedCoin||"").toUpperCase()},unconfiguredMachinesList(){const t=this.configDialog.selectedMachines||[],e=new Set((this.configDialog.configuredMachines||[]).map(t=>t.id)),a=t.filter(t=>!e.has(t.id)),i=Array.isArray(this.configDialog.coinAlgoValue)?this.configDialog.coinAlgoValue:[];if(2!==i.length)return a;const s=i[0],o=i[1],r=(this.machineSupportData||[]).find(t=>String(t&&t.coin)===String(s));if(!r)return[];const n=(r.algorithmList||[]).find(t=>String(t&&t.algorithm)===String(o));if(!n)return[];const l=new Set((n.machineIds||[]).map(t=>Number(t)));return a.filter(t=>l.has(Number(t.id)))},unsupportedMachinesList(){const t=this.configDialog.selectedMachines||[],e=new Set((this.configDialog.configuredMachines||[]).map(t=>t.id)),a=t.filter(t=>!e.has(t.id)),i=Array.isArray(this.configDialog.coinAlgoValue)?this.configDialog.coinAlgoValue:[];if(2!==i.length)return[];const s=i[0],o=i[1],r=(this.machineSupportData||[]).find(t=>String(t&&t.coin)===String(s));if(!r)return[];const n=(r.algorithmList||[]).find(t=>String(t&&t.algorithm)===String(o));if(!n)return[];const l=new Set((n.machineIds||[]).map(t=>Number(t)));return a.filter(t=>!l.has(Number(t.id)))},canProceedToNextStep(){const t=this.configDialog,e=this.unconfiguredMachinesList;if(e.length>0){const e=t.selectedMachineIds||[],a=Array.isArray(e)&&e.length>0,i=Array.isArray(t.coinAlgoValue)?t.coinAlgoValue:[],s=Array.isArray(t.poolValue)?t.poolValue:[],o=String(t.walletAddress||"").trim(),r=String(t.miningAccount||"").trim(),n=2===i.length,l=2===s.length,c=o.length>0,d=r.length>0,u=n&&l&&c&&d,h=a&&u;return h||console.log("按钮禁用原因:",{hasSelection:a,selectedIds:e,coinAlgo:i,coinAlgoValid:n,pool:s,poolValid:l,wallet:o,walletValid:c,account:r,accountValid:d,formValid:u}),h}const a=new Set((t.selectedMachines||[]).map(t=>t.id)),i=new Set((t.configuredMachines||[]).map(t=>t.id)),s=Array.from(a).every(t=>i.has(t));return s},hasConfiguredMiningAccount(){const t=this.configDialog.configuredMachines||[];return t.some(t=>t.miningAccount&&String(t.miningAccount).trim().length>0)},hasConfiguredWorkerId(){const t=this.configDialog.configuredMachines||[];return t.some(t=>t.workerId&&String(t.workerId).trim().length>0)}},mounted(){this.fetchGetGoodsListV2(this.paramsV2)},watch:{"noticeDialog.visible"(t){if(t)this.startNoticeCountdown(),this.$nextTick(()=>this.reapplySelectionsForPendingShop());else if(this.noticeTimer){try{clearInterval(this.noticeTimer)}catch(e){}this.noticeTimer=null}},"confirmDialog.visible"(t){this.$nextTick(()=>this.reapplySelectionsForPendingShop())},"payDialog.visible"(t){this.$nextTick(()=>this.reapplySelectionsForPendingShop())},"googleCodeDialog.visible"(t){this.$nextTick(()=>this.reapplySelectionsForPendingShop())},"configDialog.coinAlgoValue"(){this.$forceUpdate()},"configDialog.poolValue"(){this.$forceUpdate()},"configDialog.walletAddress"(){this.$forceUpdate()},"configDialog.miningAccount"(){this.$forceUpdate()},"configDialog.workerId"(){this.$forceUpdate()},"configDialog.selectedMachineIds"(){this.$forceUpdate()}},beforeDestroy(){try{this.noticeTimer&&clearInterval(this.noticeTimer)}catch(t){}this.noticeTimer=null},methods:{async fetchGetMachineSupportPool(t,e){const a={coin:t||"",algorithm:e||""},i=await(0,s.getMachineSupportPool)(a);if(i&&(0===i.code||200===i.code)&&Array.isArray(i.data)){this.configDialog.poolRawData=i.data||[];const t=(i.data||[]).map(t=>({label:t&&t.poolName?String(t.poolName):"",value:t&&null!=t.poolId?t.poolId:"",children:Array.isArray(t&&t.miningCoinInfoList)?t.miningCoinInfoList.map(t=>({label:t&&t.modelName?String(t.modelName):"",value:t&&null!=t.coinConfigId?t.coinConfigId:"",raw:t})):[]}));this.configDialog.poolOptions=t,this.configDialog.poolValue=[]}else this.configDialog.poolOptions=[],this.configDialog.poolValue=[],this.configDialog.poolRawData=[]},async fetchGetMachineSupportCoinAndAlgorithm(t=[]){const e=Array.isArray(t)?t.filter(t=>null!=t):[],a=await(0,s.getMachineSupportCoinAndAlgorithm)(e);console.log(a,"res"),a&&(0===a.code||200===a.code)&&a.data&&(this.machineSupportData=Array.isArray(a.data)?a.data:[])},async fetchGetGoodsListV2(t){try{const a=await(0,i.getGoodsListV2)(t),s=a&&a.data?a.data:a,o=Array.isArray(s&&s.rows)?s.rows:Array.isArray(s)?s:[],r=o.map((t,e)=>{const a=Array.isArray(t&&t.cartMachineInfoDtoList)?t.cartMachineInfoDtoList:Array.isArray(t&&t.productMachineDtoList)?t.productMachineDtoList:[];try{a.forEach(t=>{t&&null==t._origLeaseTime&&(t._origLeaseTime=Number(t.leaseTime||1))})}catch(s){}const i=this.sortMachinesByShelfStatus(a);return{...t,id:t&&null!=t.id?String(t.id):`shop-${e}`,productMachineDtoList:i}});this.shops=r;try{this.expandedShopKeys=r.map(t=>String(t.id))}catch(e){this.expandedShopKeys=[]}try{this.shops.forEach(t=>this.ensureDefaultPaySelection(t))}catch(e){}try{const t=r.reduce((t,e)=>t+(Array.isArray(e.productMachineDtoList)?e.productMachineDtoList.length:0),0);window.dispatchEvent(new CustomEvent("cart-updated",{detail:{count:t}}))}catch(e){}}catch(e){this.shops=[]}},formatAmount(t,e){return(0,o.truncateAmountByCoin)(t,e)},formatNum6(t){return(0,o.truncateTo6)(t)},toCents(t){if(null===t||void 0===t)return 0;let e=String(t).trim();if(""===e)return 0;let a=1;"-"===e[0]&&(a=-1,e=e.slice(1));const i=e.split("."),s=parseInt(i[0]||"0",10)||0,o=(i[1]||"").replace(/[^0-9]/g,""),r=o.length>=2?o.slice(0,2):o.padEnd(2,"0"),n=100*s+(parseInt(r||"0",10)||0);return a*n},centsToText(t){const e=t<0?"-":"",a=Math.abs(Number(t)||0),i=Math.floor(a/100),s=String(a%100).padStart(2,"0");return`${e}${i}.${s}`},isRowSelectable(t,e){return!(1===Number(t&&t.del)||1===Number(t&&t.state))},isOnShelf(t){return!(1===Number(t&&t.del)||1===Number(t&&t.state))},sortMachinesByShelfStatus(t){return Array.isArray(t)?[...t].sort((t,e)=>{const a=this.isOnShelf(t),i=this.isOnShelf(e);return a===i?0:a?-1:1}):[]},getMachineRowClassName({row:t}){return this.isOnShelf(t)?"":"off-shelf-row"},getRowMaxLeaseDaysLocal(t){const e=t&&t.maxLeaseDays,a=Number(e);return Number.isFinite(a)?a<1?1:a>365?365:Math.floor(a):365},formatTrunc(t,e=2){const a=Number(t);if(!Number.isFinite(a))return"0";const i=Math.max(0,Number(e)||0),s=Math.pow(10,i),o=Math.trunc(a*s)/s,r=String(o);if(0===i)return r;const[n,l=""]=r.split("."),c=l.padEnd(i,"0");return`${n}.${c}`},async fetchChainAndListForSeller(t){if(!t)return this.options=[],void(this.loading=!1);this.loading=!0;const e=await(0,s.getChainAndListForSeller)({id:t});e&&(0===e.code||200===e.code)&&e.data&&(this.options=this.toUpperOptions(e.data)),this.loading=!1},toUpperOptions(t){const e=Array.isArray(t)?t:[];return e.map(t=>{const e={...t},a=t&&(null!=t.label?t.label:t.value)||"";return e.label=String(a).toUpperCase(),Array.isArray(t&&t.children)&&(e.children=this.toUpperOptions(t.children)),e})},getAllGroups(){return[]},getShopPayOptions(t){const e=Array.isArray(t&&t.payConfigList)?t.payConfigList:[];return e.map(t=>{const e=t&&t.payChain?String(t.payChain):"",a=t&&t.payCoin?String(t.payCoin):"",i=`${e}|${a}`;return{label:`${e} - ${this.toUpperText(a)}`,value:i,icon:t&&t.payCoinImage?t.payCoinImage:""}})},hasMachinePriceForSelection(t,e){if(!t||!e)return!1;const a=this.paySelectionMap[t.id]||"",[i,s]=String(a).split("|"),o=Array.isArray(e.priceList)?e.priceList:[];return o.some(t=>String(t.chain)===i&&String(t.coin)===s)},getSelectedCoinSymbolForShop(t){const e=this.paySelectionMap[t?t.id:void 0];if(!e)return"";const a=String(e).split("|");return this.toUpperText(a[1])},getSelectedCoinSymbolForShopHeader(){const t=Array.isArray(this.shops)&&this.shops.length?this.shops[0]:null;return t?(this.ensureDefaultPaySelection(t),this.getSelectedCoinSymbolForShop(t)):""},getSelectedPayIcon(t){if(!t)return"";this.ensureDefaultPaySelection(t);const e=this.paySelectionMap[t.id]||"",[a,i]=String(e).split("|"),s=Array.isArray(t&&t.payConfigList)?t.payConfigList:[],o=s.find(t=>String(t.payChain)===a&&String(t.payCoin)===i);return o&&o.payCoinImage?o.payCoinImage:""},ensureDefaultPaySelection(t){if(!t)return;const e=this.getShopPayOptions(t);e.length&&!this.paySelectionMap[t.id]&&this.$set(this.paySelectionMap,t.id,e[0].value)},handleShopPayChange(t,e){if(!t)return;this.$set(this.paySelectionMap,t.id,e);const a=this.selectedMachinesMap[t.id];if(a&&a.size){const e=Array.isArray(t.productMachineDtoList)?t.productMachineDtoList:[];e.forEach(e=>{a.has(e.id)&&!this.hasMachinePriceForSelection(t,e)&&a.delete(e.id)}),this.$nextTick(()=>this.applyInnerSelectionFromSet(t))}},displayShopTotalBySelection(t){if(!t)return 0;if(this.ensureDefaultPaySelection(t),this.isShopLeaseChanged(t))try{const e=Array.isArray(t.productMachineDtoList)?t.productMachineDtoList:[];let a=0;return e.forEach(e=>{const i=this.getMachineUnitPriceBySelection(t,e);if(null!=i){const t=Math.max(1,Math.floor(Number(e.leaseTime||1)));a+=this.toCents(i)*t}}),a/100}catch(r){}const e=this.paySelectionMap[t.id]||"",[a,i]=e.split("|"),s=Array.isArray(t.totalPriceList)?t.totalPriceList:[],o=s.find(t=>String(t.chain)===a&&String(t.coin)===i);return o&&null!=o.price?Number(o.price||0):Number(t.totalPrice||0)},isShopLeaseChanged(t){try{const e=Array.isArray(t&&t.productMachineDtoList)?t.productMachineDtoList:[];return e.some(t=>{const e=t&&null!=t._origLeaseTime?Number(t._origLeaseTime):Number(t&&t.leaseTime),a=Math.max(1,Math.floor(Number(t&&t.leaseTime)||1));return e!==a})}catch(e){return!1}},getMachineUnitPriceBySelection(t,e){if(!t||!e)return Number(e.price||0);this.ensureDefaultPaySelection(t);const a=this.paySelectionMap[t.id]||"",[i,s]=a.split("|"),o=Array.isArray(e.priceList)?e.priceList:[],r=o.find(t=>String(t.chain)===i&&String(t.coin)===s);return r&&null!=r.price?Number(r.price||0):null},isRowSelectableByShop(t,e){return!!this.isOnShelf(e)&&this.hasMachinePriceForSelection(t,e)},computeShopTotal(t){if(!t)return 0;const e=Array.isArray(t.productMachineDtoList)?t.productMachineDtoList:[];if(!e.length)return Number(t.totalPrice||0);let a=0;for(const i of e){const t=this.toCents(i&&i.price),e=Math.max(1,Math.floor(Number(i&&i.leaseTime)||1));a+=t*e}return a/100},computeShopTotalDisplay(t){const e=Array.isArray(t&&t.productMachineDtoList)?t.productMachineDtoList:[],a=Number(t&&t.totalPrice),i=Number.isFinite(a);let s=!1;for(const r of e){const t=r&&null!=r._origLeaseTime?Number(r._origLeaseTime):Number(r&&r.leaseTime),e=Math.max(1,Math.floor(Number(r&&r.leaseTime)||1));if(t!==e){s=!0;break}}if(i&&!s||!e.length&&i)return this.formatTrunc(a,2);let o=0;for(const r of e){const t=this.toCents(r&&r.price),e=Math.max(1,Math.floor(Number(r&&r.leaseTime)||1));o+=t*e}return this.centsToText(o)},buildDeletePayload(){const t=[],e=Array.isArray(this.shops)?this.shops:[];return e.forEach(e=>{const a=this.selectedMachinesMap[e.id];if(!a||0===a.size)return;const i=Array.isArray(e.productMachineDtoList)?e.productMachineDtoList:[];i.forEach(e=>{a.has(e.id)&&null!=e.cartInfoId&&t.push({cartInfoId:e.cartInfoId})})}),t.filter(t=>t&&null!=t.cartInfoId)},async fetchAddOrdersV2(t,e,a){try{const i={code:a,orderInfoVoList:t,orderMiningInfoDtoList:e},o=await(0,s.addOrdersV2)(i);return o}catch(i){return{code:-1,msg:"网络异常",data:null}}},async fetchDeleteBatchGoods(t){try{const e=await(0,i.deleteBatchGoodsV2)(t);return e}catch(e){return{code:-1,msg:"网络异常"}}},async handleClearOffShelf(){if(!this.clearOffLoading){this.clearOffLoading=!0;try{const t=await(0,i.deleteBatchGoodsForIsDeleteV2)();t&&200===Number(t.code)?(this.$message({message:"已清除下架商品",type:"success",showClose:!0}),await this.fetchGetGoodsListV2(this.paramsV2)):this.$message({message:t&&t.msg||"清除失败",type:"error",showClose:!0})}catch(t){this.$message({message:"网络异常",type:"error",showClose:!0})}finally{this.clearOffLoading=!1}}},toUpperText(t){return null==t?"":String(t).toUpperCase()},handleOuterExpandChange(t,e){try{const t=Array.isArray(e)?e.map(t=>t&&(null!=t.id?String(t.id):void 0)).filter(Boolean):[];this.expandedGroupKeys=t}catch(a){this.expandedGroupKeys=[]}},handleShopExpandChange(t,e){try{const a=Array.isArray(e)?e.map(t=>t&&(null!=t.id?String(t.id):void 0)).filter(Boolean):[];this.expandedShopKeys=a;const i=a.includes(String(t.id));i&&this.$nextTick(()=>this.applyInnerSelectionFromSet(t))}catch(a){this.expandedShopKeys=[]}},async fetchGetGoodsList(t){try{this.loading=!0;const a=await(0,i.getGoodsList)(t),s=Array.isArray(a&&a.rows)?a.rows:Array.isArray(a&&a.data&&a.data.rows)?a.data.rows:Array.isArray(a&&a.data)?a.data:[];if(!s||0===s.length)return this.shops=[],this.groups=[],this.expandedShopKeys=[],this.expandedGroupKeys=[],this.selectedMachinesMap={},this.selectedGroups=[],void window.dispatchEvent(new CustomEvent("cart-updated",{detail:{count:0}}));if(s.length&&s[0].productMachineDtoList){const t=s.map((t,e)=>({...t,id:null!=t.id?String(t.id):`shop-${e}`}));try{t.forEach(t=>this.ensureDefaultPaySelection(t))}catch(e){}try{t.forEach(t=>{const e=Array.isArray(t.productMachineDtoList)?t.productMachineDtoList:[];e.forEach(t=>{t&&null==t._origLeaseTime&&(t._origLeaseTime=Number(t.leaseTime||1))}),t.productMachineDtoList=this.sortMachinesByShelfStatus(e)})}catch(e){}this.shops=t,this.groups=[],this.expandedGroupKeys=[];try{this.expandedShopKeys=t.map(t=>String(t.id))}catch(e){this.expandedShopKeys=[]}const a=t.reduce((t,e)=>t+(Array.isArray(e.productMachineDtoList)?e.productMachineDtoList.length:0),0);return void window.dispatchEvent(new CustomEvent("cart-updated",{detail:{count:a}}))}const o=s.map((t,e)=>({...t,id:t&&(null!=t.id?t.id:null!=t.productId?t.productId:`g-${e}`)}));this.groups=o,this.shops=[],this.expandedShopKeys=[],this.expandedGroupKeys=(this.expandedGroupKeys||[]).filter(t=>o.some(e=>String(e.id)===String(t)));try{const t=o.reduce((t,e)=>t+(Array.isArray(e.productMachineDtoList)?e.productMachineDtoList.length:0),0);window.dispatchEvent(new CustomEvent("cart-updated",{detail:{count:t}}))}catch(e){}}catch(e){console.log(e,"e")}finally{this.loading=!1}},handleGroupSelectionChange(){},handleGroupSelectionChangeForShop(){},applyInnerSelection(t,e,a=0){const i=this.$refs["innerTable-"+t.id],s=Array.isArray(t.productMachineDtoList)?t.productMachineDtoList:[];if(i&&"function"===typeof i.clearSelection){try{i.clearSelection()}catch(o){}e&&s.forEach(t=>{try{i.toggleRowSelection(t,!0)}catch(o){}})}else a>=5||this.$nextTick(()=>this.applyInnerSelection(t,e,a+1))},applyInnerSelectionFromSet(t,e=0){if(!t)return;const a=this.$refs["innerTable-"+t.id],i=Array.isArray(t.productMachineDtoList)?t.productMachineDtoList:[],s=this.selectedMachinesMap[t.id];if(a&&"function"===typeof a.clearSelection){try{a.clearSelection()}catch(o){}s&&s.size&&i.forEach(t=>{if(s.has(t.id))try{a.toggleRowSelection(t,!0)}catch(o){}})}else e>=5||this.$nextTick(()=>this.applyInnerSelectionFromSet(t,e+1))},reapplySelectionsForPendingShop(){const t=this.pendingCheckoutShop&&this.pendingCheckoutShop.shop;t&&this.applyInnerSelectionFromSet(t)},handleShopInnerSelectionChange(t,e){const a=new Set((e||[]).map(t=>t.id));this.$set(this.selectedMachinesMap,t.id,a)},toggleSelectAll(){const t=this.$refs.outerTable;t&&(this.isAllSelected?t.clearSelection():this.groups.forEach(e=>t.toggleRowSelection(e,!0)))},calcGroupTotal(t){const e=Array.isArray(t&&t.productMachineDtoList)?t.productMachineDtoList:[];return e.reduce((t,e)=>{const a=Number(e.price||0),i=Number(e.leaseTime||1);return t+a*i},0)},countMachines(t){const e=Array.isArray(t&&t.productMachineDtoList)?t.productMachineDtoList:[];return e.length},async handleCheckoutShop(t){if(!t)return;const e=t.id,a=Array.isArray(t.productMachineDtoList)?t.productMachineDtoList:[];if(0===a.length)return void this.$message({message:"该店铺暂无可结算的机器",type:"warning",showClose:!0});const i=Array.isArray(this.expandedShopKeys)&&this.expandedShopKeys.includes(String(e)),s=[];if(i){const t=this.selectedMachinesMap[e];if(!t||0===t.size)return void this.$message({message:"请先在该店铺下勾选要结算的机器",type:"warning",showClose:!0});if(a.forEach(a=>{t.has(a.id)&&this.isOnShelf(a)&&s.push({leaseTime:Number(a.leaseTime||1),machineId:a.id,productId:a.productId,shopId:e})}),!s.length)return void this.$message({message:"所选机器均已下架,无法结算",type:"warning",showClose:!0})}else{const t=a.filter(t=>this.isOnShelf(t));if(!t.length)return void this.$message({message:"该店铺暂无上架机器可结算",type:"warning",showClose:!0});t.forEach(t=>{s.push({leaseTime:Number(t.leaseTime||1),machineId:t.id,productId:t.productId,shopId:e})})}await this.fetchChainAndListForSeller(e),this.pendingCheckoutShop={shop:t,payload:s},this.noticeDialog.visible=!0,this.noticeDialog.checked=!1,this.startNoticeCountdown()},async executeCheckout(t){if(!this.pendingCheckoutShop&&!this.pendingCheckoutAll)return!1;const e=this.configDialog.configuredMachines||[];if(!e.length)return this.$message.warning("请先完成机器配置"),!1;const a=[],i=[],s=[];if(this.pendingCheckoutAll&&this.pendingCheckoutAll.length)this.pendingCheckoutAll.forEach(({shop:t,items:e})=>{(e||[]).forEach(e=>{s.push({shop:t,machine:e})})});else if(this.pendingCheckoutShop){const{shop:t,payload:e}=this.pendingCheckoutShop,a=Array.isArray(t.productMachineDtoList)?t.productMachineDtoList:[],i=new Set(e.map(t=>t.machineId));a.forEach(e=>{i.has(e.id)&&s.push({shop:t,machine:e})})}s.forEach(({shop:t,machine:s})=>{const o=this.paySelectionMap[t.id]||"",[r,n]=String(o).split("|"),l=e.find(t=>t.id===s.id);if(!l)return void console.warn(`机器 ${s.id} 未找到配置信息`);a.push({chain:r||"",coin:n||"",leaseTime:Number(s.leaseTime||1),machineId:s.id,numbers:Number(s.numbers||1),type:Number(s.type||0),shopId:t.id});const c=l.coinConfigId;if(!c)return void console.warn(`机器 ${s.id} 的 coinConfigId 为空`);const d=String(l.walletAddress||"").trim(),u=String(l.miningAccount||"").trim(),h=String(l.workerId||"").trim();i.push({coinConfigId:c,coin:l.coin||"",poolName:l.poolName||"",poolUser:u,walletAddress:d,walletMining:l.walletMining||!1,workerId:h,machineId:String(s.id)})});for(const n of i||[]){const t=String(n&&n.walletAddress?n.walletAddress:"").trim();if(!t)continue;let e=(0,r.rsaEncryptSync)(t);if(e||(e=await(0,r.rsaEncrypt)(t)),!e)return this.$message.error("钱包地址加密失败,请重试"),this.reapplySelectionsForPendingShop(),!1;n.walletAddress=e}this.creatingOrder=!0;try{const e=await this.fetchAddOrdersV2(a,i,t);let s=!1;if(e&&200===Number(e.code)){const t=String(e.data||"");return s=t.includes("成功"),s?(this.$message({message:"结算成功,订单状态请在订单列表中查看",type:"success",duration:3e3,showClose:!0}),this.settlementSuccessfulVisible=!0,await this.fetchGetGoodsListV2(this.paramsV2),this.pendingCheckoutShop=null,this.pendingCheckoutAll=null,!0):(this.reapplySelectionsForPendingShop(),!1)}return this.reapplySelectionsForPendingShop(),!1}catch(o){return console.log("网络错误,请重试",o),this.$message({message:"网络错误,请重试",type:"error",duration:3e3,showClose:!0}),this.reapplySelectionsForPendingShop(),!1}finally{this.creatingOrder=!1}},async handleCheckoutSelected(){if(!this.selectedMachineCount)return void this.$message({message:"请先勾选要结算的机器",type:"warning",showClose:!0});const t=Array.isArray(this.shops)?this.shops:[],e=[];if(t.forEach(t=>{const a=this.selectedMachinesMap[t.id];if(!a||!a.size)return;const i=Array.isArray(t.productMachineDtoList)?t.productMachineDtoList:[],s=i.filter(t=>a.has(t.id)&&this.isOnShelf(t));s.length&&e.push({shop:t,items:s})}),e.length){try{const t=[];if(e.forEach(({items:e})=>{(e||[]).forEach(e=>{e&&null!=e.id&&t.push(e.id)})}),t.length&&(await this.fetchGetMachineSupportCoinAndAlgorithm(t),!this.machineSupportData||0===this.machineSupportData.length))return void this.$message({message:"加载配置信息失败,请重试",type:"error",showClose:!0})}catch(a){return void this.$message({message:"加载配置信息失败,请重试",type:"error",showClose:!0})}this.pendingCheckoutAll=e,this.noticeDialog.visible=!0,this.noticeDialog.checked=!1,this.startNoticeCountdown()}else this.$message({message:"未找到可结算的上架机器",type:"warning",showClose:!0})},handleRemoveSelectedMachines(){const t=this.buildDeletePayload();t.length?this.$confirm("确定删除所选机器吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(async()=>{const e=await this.fetchDeleteBatchGoods(t);if(e&&200===Number(e.code)){this.$message({message:"已删除选中的机器",type:"success",duration:3e3,showClose:!0}),await this.fetchGetGoodsListV2(this.paramsV2),this.selectedMachinesMap={},this.selectedGroups=[];try{this.getAllGroups().forEach(t=>{const e=this.$refs["innerTable-"+t.id];if(e&&"function"===typeof e.clearSelection)try{e.clearSelection()}catch(a){}})}catch(a){}}}).catch(()=>null):this.$message({message:"请先勾选需要删除的机器或商品",type:"warning",showClose:!0})},confirmPay(){this.confirmDialog.visible=!1,this.showGoogleCodeDialog()},handleConfirmDialogPrev(){this.confirmDialog.visible=!1,this.configDialog.visible=!0},handleCloseSuccessDialog(){try{this.settlementSuccessfulVisible=!1}catch(t){}this.$router.push({path:"/account/orders",query:{status:"7"}})},startNoticeCountdown(){try{this.noticeTimer&&clearInterval(this.noticeTimer)}catch(t){}this.noticeDialog.countdown=5,this.noticeTimer=setInterval(()=>{this.noticeDialog.countdown>0?this.noticeDialog.countdown-=1:(clearInterval(this.noticeTimer),this.noticeTimer=null)},1e3)},async handleNoticeAcknowledge(){this.noticeDialog.countdown>0||(this.noticeDialog.checked?(this.noticeDialog.visible=!1,this.$nextTick(()=>this.reapplySelectionsForPendingShop()),this.openConfigDialog()):this.$message({message:'请先勾选"我已阅读并同意上述注意事项"',type:"warning",showClose:!0}))},openConfigDialog(){if(!this.machineSupportData||0===this.machineSupportData.length)return void this.$message({message:"加载配置信息失败,请重试",type:"error",showClose:!0});this.configDialog.configuredMachines=[];const t=Array.isArray(this.machineSupportData)?this.machineSupportData:[],e=t.map(t=>({label:this.toUpperText(t&&t.coin),value:t&&t.coin}));this.configDialog.coinOptions=e,this.configDialog.coinAlgoOptions=(t||[]).map(t=>({label:this.toUpperText(t&&t.coin),value:t&&t.coin,children:Array.isArray(t&&t.algorithmList)?t.algorithmList.map(t=>({label:t&&t.algorithm?String(t.algorithm):"",value:t&&t.algorithm?String(t.algorithm):""})):[]})),this.$set(this.configDialog,"coin",""),this.$set(this.configDialog,"algorithm",""),this.$set(this.configDialog,"coinAlgoValue",[]),this.configDialog.selectedMachines=this.buildSelectedMachinesForConfig(),this.$set(this.configDialog,"selectedMachineIds",[]),this.$set(this.configDialog,"walletAddress",""),this.$set(this.configDialog,"miningAccount",""),this.$set(this.configDialog,"workerId",""),this.$set(this.configDialog,"poolValue",[]),this.$set(this.configDialog,"poolOptions",[]),this.$set(this.configDialog,"poolRawData",[]),this.configDialog.visible=!0},refreshAlgorithmOptions(){const t=this.configDialog.coin,e=(this.machineSupportData||[]).find(e=>String(e&&e.coin)===String(t)),a=Array.isArray(e&&e.algorithmList)?e.algorithmList:[];this.configDialog.algorithmOptions=a.map(t=>({label:t&&t.algorithm?String(t.algorithm):"",value:t&&t.algorithm?String(t.algorithm):"",machineIds:Array.isArray(t&&t.machineIds)?t.machineIds:[]})),!this.configDialog.algorithm&&this.configDialog.algorithmOptions.length?this.configDialog.algorithm=this.configDialog.algorithmOptions[0].value:this.configDialog.algorithm&&!this.configDialog.algorithmOptions.some(t=>t.value===this.configDialog.algorithm)&&(this.configDialog.algorithm=this.configDialog.algorithmOptions.length?this.configDialog.algorithmOptions[0].value:"")},handleConfigCoinChange(){this.configDialog.algorithm="",this.refreshAlgorithmOptions();try{this.configDialog.coin&&this.configDialog.algorithm?this.fetchGetMachineSupportPool(this.configDialog.coin,this.configDialog.algorithm):(this.configDialog.poolOptions=[],this.configDialog.poolValue=[],this.configDialog.poolRawData=[])}catch(t){}},handleConfigAlgorithmChange(){try{this.configDialog.coin&&this.configDialog.algorithm?this.fetchGetMachineSupportPool(this.configDialog.coin,this.configDialog.algorithm):(this.configDialog.poolOptions=[],this.configDialog.poolValue=[],this.configDialog.poolRawData=[])}catch(t){}},handleCoinAlgoChange(t){const e=Array.isArray(t)?t:[],a=e[0]||"",i=e[1]||"";this.$set(this.configDialog,"coin",a),this.$set(this.configDialog,"algorithm",i),this.$set(this.configDialog,"coinAlgoValue",e),this.$set(this.configDialog,"selectedMachineIds",[]),this.$nextTick(()=>{try{const t=this.$refs.configTable;t&&"function"===typeof t.clearSelection&&t.clearSelection()}catch(t){}this.$forceUpdate()}),this.$set(this.configDialog,"walletAddress",""),this.$set(this.configDialog,"miningAccount",""),a&&i?this.fetchGetMachineSupportPool(a,i):(this.$set(this.configDialog,"poolOptions",[]),this.$set(this.configDialog,"poolValue",[]),this.$set(this.configDialog,"poolRawData",[]))},handlePoolValueChange(t){this.$set(this.configDialog,"poolValue",t||[]);const e=Array.isArray(t)?t:[];if(2===e.length){const t=e[0],a=e[1],i=(this.configDialog.poolOptions||[]).find(e=>e.value===t);if(i){const t=(i.children||[]).find(t=>t.value===a);if(t&&t.raw){const e=t.raw.walletMining||!1;this.$set(this.configDialog,"walletAddress",""),this.$set(this.configDialog,"miningAccount","");const a=this.unconfiguredMachinesList;a.forEach(t=>{this.$set(t,"_walletMining",e),this.$set(t,"_workerId","")})}}}else this.$set(this.configDialog,"walletAddress",""),this.$set(this.configDialog,"miningAccount","");this.$nextTick(()=>{this.$forceUpdate()})},getCurrentWalletMining(){const t=Array.isArray(this.configDialog.poolValue)?this.configDialog.poolValue:[];if(2!==t.length)return null;const e=t[0],a=t[1],i=(this.configDialog.poolOptions||[]).find(t=>t.value===e);if(i){const t=(i.children||[]).find(t=>t.value===a);if(t&&t.raw)return t.raw.walletMining||!1}return null},handleMachineWalletAddressInput(t,e){if(!e)return void this.$set(t,"_walletAddress","");let a=e.replace(/[\u4e00-\u9fa5\u3400-\u4dbf\u3000-\u303f\uff00-\uffef]/g,"");a.length>95&&(a=a.substring(0,95)),this.$set(t,"_walletAddress",a)},handleMachineMiningAccountInput(t,e){if(!e)return void this.$set(t,"_miningAccount","");let a=String(e);a.length>40&&(a=a.substring(0,40)),this.$set(t,"_miningAccount",a)},handleMachineWorkerIdInput(t,e){if(!e)return void this.$set(t,"_workerId","");let a=String(e);a.length>40&&(a=a.substring(0,40)),this.$set(t,"_workerId",a)},handleWalletAddressInput(t){if(!t)return void this.$set(this.configDialog,"walletAddress","");let e=t.replace(/[^\u0020-\u007E]/g,"");e=e.replace(/[^a-zA-Z0-9\-_]/g,""),e.length>95&&(e=e.substring(0,95)),this.$set(this.configDialog,"walletAddress",e),e.length>0&&e.length,this.$nextTick(()=>{this.$forceUpdate()})},handleMiningAccountInput(t){if(!t)return void this.$set(this.configDialog,"miningAccount","");let e=t.replace(/[^\u0020-\u007E]/g,"");e=e.replace(/[^a-zA-Z0-9\-_]/g,""),e.length>50&&(e=e.substring(0,50)),this.$set(this.configDialog,"miningAccount",e),this.$nextTick(()=>{this.$forceUpdate()})},handleConfigSelectionChange(t){const e=(t||[]).map(t=>t&&t.id).filter(t=>null!=t);this.$set(this.configDialog,"selectedMachineIds",e),this.$nextTick(()=>{this.$forceUpdate()}),console.log("机器选择变化:",{selectionCount:t?t.length:0,selectedIds:e,allSelected:t||[]})},buildSelectedMachinesForConfig(){const t=[];if(this.pendingCheckoutAll&&this.pendingCheckoutAll.length)this.pendingCheckoutAll.forEach(({shop:e,items:a})=>{(a||[]).forEach(a=>{t.push({id:a.id,product:e&&(e.name||""),user:a.user,miner:a.miner,type:a.type,algorithm:a.algorithm})})});else if(this.pendingCheckoutShop&&this.pendingCheckoutShop.shop&&Array.isArray(this.pendingCheckoutShop.payload)){const e=this.pendingCheckoutShop.shop,a=Array.isArray(e.productMachineDtoList)?e.productMachineDtoList:[],i=new Set(this.pendingCheckoutShop.payload.map(t=>t.machineId));a.forEach(a=>{i.has(a.id)&&t.push({id:a.id,product:e&&(e.name||""),user:a.user,miner:a.miner,type:a.type,algorithm:a.algorithm})})}return t},isConfigFormValid(){const t=Array.isArray(this.configDialog.coinAlgoValue)?this.configDialog.coinAlgoValue:[],e=Array.isArray(this.configDialog.poolValue)?this.configDialog.poolValue:[],a=String(this.configDialog.walletAddress||"").trim(),i=String(this.configDialog.miningAccount||"").trim(),s=2===t.length,o=2===e.length,r=a.length>0,n=i.length>0,l=s&&o&&r&&n;return l||console.log("表单验证失败:",{coinAlgo:t,coinAlgoValid:s,pool:e,poolValid:o,wallet:a,walletValid:r,account:i,accountValid:n}),l},handleConfigConfirm(){const t=this.unconfiguredMachinesList;if(t.length>0){let a=[];try{const t=this.$refs.configTable;if(t&&"function"===typeof t.selection){const e=t.selection()||[];a=e.map(t=>t&&t.id).filter(t=>null!=t)}else t&&Array.isArray(t.selection)&&(a=t.selection.map(t=>t&&t.id).filter(t=>null!=t))}catch(e){a=this.configDialog.selectedMachineIds||[]}if(0===a.length&&(a=this.configDialog.selectedMachineIds||[]),!Array.isArray(a)||0===a.length)return void this.$message.warning("请至少勾选一台机器进行配置");const i=Array.isArray(this.configDialog.coinAlgoValue)?this.configDialog.coinAlgoValue:[],s=Array.isArray(this.configDialog.poolValue)?this.configDialog.poolValue:[];if(2!==i.length)return void this.$message.warning("请选择币种和算法");if(2!==s.length)return void this.$message.warning("请选择矿池和模型");const o=t.filter(t=>a.includes(t.id));if(0===o.length)return void this.$message.warning("所选机器已配置,请选择未配置的机器");const r=this.configDialog.poolValue||[],n=r[0],l=r[1];let c="",d="",u=!1;const h=(this.configDialog.poolOptions||[]).find(t=>t.value===n);if(h){c=h.label||"";const t=(h.children||[]).find(t=>t.value===l);t&&t.raw&&(d=t.label||"",u=t.raw.walletMining||!1)}if(u){const t=String(this.configDialog.walletAddress||"").trim();if(!t||0===t.length)return void this.$message.warning("请输入钱包地址");if(t.length<26||t.length>95)return void this.$message.warning("钱包地址长度应在26-95个字符之间")}else{const t=String(this.configDialog.miningAccount||"").trim();if(!t||0===t.length)return void this.$message.warning("请输入挖矿账户")}for(const t of o){const e=String(t._workerId||"").trim();if(!e||0===e.length)return void this.$message.warning(`机器ID ${t.id} 请输入矿工号`)}const p=this.toUpperText(i[0]||""),m=String(i[1]||""),g=u?String(this.configDialog.walletAddress||"").trim():"",f=u?"":String(this.configDialog.miningAccount||"").trim();o.forEach(t=>{this.configDialog.configuredMachines.push({id:t.id,coin:p,algorithm:m,poolName:c,modelName:d,walletAddress:g,miningAccount:f,workerId:String(t._workerId||"").trim(),walletMining:u,type:t.type,poolId:n,coinConfigId:l,originalAlgorithm:t.algorithm,machineData:t})});const y=new Set((this.configDialog.selectedMachines||[]).map(t=>t.id)),w=new Set((this.configDialog.configuredMachines||[]).map(t=>t.id)),v=Array.from(y).filter(t=>!w.has(t));v.length>0?this.fetchGetMachineSupportCoinAndAlgorithm(v).then(()=>{if(!this.machineSupportData||0===this.machineSupportData.length)return void this.$message({message:"加载配置信息失败,请重试",type:"error",showClose:!0});const t=Array.isArray(this.machineSupportData)?this.machineSupportData:[];this.configDialog.coinAlgoOptions=(t||[]).map(t=>({label:this.toUpperText(t&&t.coin),value:t&&t.coin,children:Array.isArray(t&&t.algorithmList)?t.algorithmList.map(t=>({label:t&&t.algorithm?String(t.algorithm):"",value:t&&t.algorithm?String(t.algorithm):""})):[]})),0===this.configDialog.coinAlgoOptions.length&&(this.configDialog.coinAlgoOptions=[])}).catch(t=>{console.error("重新获取币种/算法支持数据失败:",t),this.$message({message:"加载配置信息失败,请重试",type:"error",showClose:!0})}):this.configDialog.coinAlgoOptions=[],this.$set(this.configDialog,"selectedMachineIds",[]),this.$set(this.configDialog,"poolValue",[]),this.$set(this.configDialog,"coinAlgoValue",[]),this.$set(this.configDialog,"coin",""),this.$set(this.configDialog,"algorithm",""),this.$set(this.configDialog,"walletAddress",""),this.$set(this.configDialog,"miningAccount","");const C=this.unconfiguredMachinesList;C.forEach(t=>{this.$set(t,"_workerId",""),this.$set(t,"_walletMining",null)}),this.$nextTick(()=>{try{const t=this.$refs.configTable;t&&"function"===typeof t.clearSelection&&t.clearSelection()}catch(e){}});const b=this.unconfiguredMachinesList;b.length>0&&this.$message.success(`已配置 ${o.length} 台机器,还有 ${b.length} 台待配置`)}else{const t=new Set((this.configDialog.selectedMachines||[]).map(t=>t.id)),a=new Set((this.configDialog.configuredMachines||[]).map(t=>t.id)),i=Array.from(t).every(t=>a.has(t));if(!i)return void this.$message.warning("请完成所有机器的配置");if(this.configDialog.visible=!1,this.pendingCheckoutAll&&this.pendingCheckoutAll.length)this.showConfirmDialogAll();else{try{const t=this.pendingCheckoutShop&&this.pendingCheckoutShop.shop;if(t){const e=this.paySelectionMap[t.id]||"",[a,i]=String(e).split("|");this.selectedChain=a||"",this.selectedCoin=i||""}else this.selectedChain="",this.selectedCoin=""}catch(e){this.selectedChain="",this.selectedCoin=""}this.showConfirmDialog()}}},handleConfigCancel(){this.configDialog.visible=!1,this.configDialog.configuredMachines=[],this.configDialog.selectedMachineIds=[],this.configDialog.walletAddress="",this.configDialog.miningAccount="",this.configDialog.workerId="",this.configDialog.poolValue=[],this.configDialog.poolRawData=[],this.configDialog.coinAlgoValue=[],this.reapplySelectionsForPendingShop()},handleConfigPrev(){this.configDialog.visible=!1,this.noticeDialog.visible=!0,this.noticeDialog.checked=!1,this.startNoticeCountdown()},openPaySelectDialog(){},showConfirmDialog(){if(!this.pendingCheckoutShop)return;const{shop:t,payload:e}=this.pendingCheckoutShop;this.$nextTick(()=>this.reapplySelectionsForPendingShop());const a=Array.isArray(t.productMachineDtoList)?t.productMachineDtoList:[],i=(new Map,new Set(e.map(t=>t.machineId))),s=[];a.forEach(e=>{if(i.has(e.id)&&this.isOnShelf(e)){const a=this.getMachineUnitPriceBySelection(t,e);if(null==a)return;const i=Math.max(1,Math.floor(Number(e.leaseTime||1))),o=Number(a||0),r=Number(o)*i;s.push({id:e.id,type:e.type,algorithm:e.algorithm||"",unitPrice:Number(o||0),leaseTime:i,numbers:Number(e.numbers||1),subtotal:Number(r||0)})}});const o=this.paySelectionMap[t.id]||"",[r,n]=String(o).split("|"),l=this.toUpperText(n||""),c=`${r} - ${l}`,d=Array.isArray(t&&t.payConfigList)?t.payConfigList:[],u=d.find(t=>String(t&&t.payChain).toUpperCase()===String(r).toUpperCase()&&String(t&&t.payCoin).toUpperCase()===String(n).toUpperCase()),h=Number(u&&u.deductibleAmount||0),p=Number(u&&u.fee||0),m=s.reduce((t,e)=>t+Number(e.subtotal||0),0),g=m>=h||h<=0,f={shopId:t.id,shopName:t.name||"",coinSymbol:l,payLabel:c,items:s,deductibleAmount:h,fee:p,enough:g,groupSubtotal:m};this.confirmDialog.shops=[f],this.confirmDialog.count=s.length;const y={},w=(t,e)=>t+this.toCents(e);if(l){let t=s.reduce((t,e)=>w(t,e.subtotal||0),0);!g&&p>0&&(t+=this.toCents(p)),y[l]=Number(this.centsToText(t))}this.confirmDialog.totalsByCoin=y,this.confirmDialog.visible=!0},showConfirmDialogAll(){const t=[],e=new Map;let a=0;const i=Array.isArray(this.shops)?this.shops:[];i.forEach(i=>{const s=this.selectedMachinesMap[i.id];if(!s||!s.size)return;const o=this.paySelectionMap[i.id]||"",[r,n]=String(o).split("|"),l=this.toUpperText(n||""),c=`${r} - ${l}`,d=Array.isArray(i&&i.payConfigList)?i.payConfigList:[],u=d.find(t=>String(t&&t.payChain).toUpperCase()===String(r).toUpperCase()&&String(t&&t.payCoin).toUpperCase()===String(n).toUpperCase()),h=Number(u&&u.deductibleAmount||0),p=Number(u&&u.fee||0),m=[],g=Array.isArray(i.productMachineDtoList)?i.productMachineDtoList:[];let f=0;if(g.forEach(t=>{if(!s.has(t.id)||!this.isOnShelf(t))return;const o=this.getMachineUnitPriceBySelection(i,t);if(null==o)return;const r=Math.max(1,Math.floor(Number(t.leaseTime||1))),n=Number(o||0),c=Number(n)*r;m.push({id:t.id,type:t.type,algorithm:t.algorithm||"",unitPrice:n,leaseTime:r,numbers:Number(t.numbers||1),subtotal:c}),f+=c;const d=e.get(l)||0;e.set(l,d+this.toCents(c)),a+=1}),m.length){const a=f>=h||h<=0;if(!a&&p>0){const t=e.get(l)||0;e.set(l,t+this.toCents(p))}t.push({shopId:i.id,shopName:i.name||"",coinSymbol:l,payLabel:c,items:m,deductibleAmount:h,fee:p,enough:a,groupSubtotal:f})}});const s={};e.forEach((t,e)=>{s[e]=Number(this.centsToText(t))}),this.confirmDialog.shops=t,this.confirmDialog.count=a,this.confirmDialog.totalsByCoin=s,this.confirmDialog.visible=!0},showGoogleCodeDialog(){this.googleCodeDialog.visible=!0,this.googleCodeDialog.code="",this.googleCodeDialog.error="",this.googleCodeDialog.loading=!1,this.$nextTick(()=>{this.$refs.googleCodeInput&&this.$refs.googleCodeInput.focus()})},handleGoogleCodeInput(t){this.googleCodeDialog.code=t.replace(/\D/g,""),this.googleCodeDialog.error&&(this.googleCodeDialog.error="")},async handleGoogleCodeSubmit(){if(this.isGoogleCodeValid){this.googleCodeDialog.loading=!0,this.googleCodeDialog.error="";try{const t=await this.executeCheckout(this.googleCodeDialog.code);t?(this.googleCodeDialog.visible=!1,this.googleCodeDialog.code="",this.googleCodeDialog.error=""):this.googleCodeDialog.error="订单创建失败,请检查后重试"}catch(t){this.googleCodeDialog.error="订单创建失败,请重试",console.error("订单创建异常:",t)}finally{this.googleCodeDialog.loading=!1}}else this.googleCodeDialog.error="请输入6位数字验证码"},handleGoogleCodeCancel(){this.googleCodeDialog.visible=!1,this.googleCodeDialog.code="",this.googleCodeDialog.error="",this.googleCodeDialog.loading=!1,this.reapplySelectionsForPendingShop(),this.pendingCheckoutShop=null},handleGoogleCodePrev(){this.googleCodeDialog.visible=!1,this.googleCodeDialog.code="",this.googleCodeDialog.error="",this.googleCodeDialog.loading=!1,this.pendingCheckoutAll&&this.pendingCheckoutAll.length?this.showConfirmDialogAll():this.showConfirmDialog()},handleLeaseTimeChange(t){t.leaseTime<1?t.leaseTime=1:t.leaseTime>365?t.leaseTime=365:t.leaseTime=Math.floor(t.leaseTime)},getRowMaxPurchaseForCart(t){const e=Number(t&&t.canSaleNumbers);return!Number.isFinite(e)||e<1?1:Math.floor(e)},handleNumbersChange(t,e){if(!t)return;if(1===Number(t.type)){try{this.$set(t,"numbers",Number(t.numbers||1))}catch(s){t.numbers=1}return}let a=Number(e);Number.isFinite(a)||(a=1),a<1&&(a=1);const i=this.getRowMaxPurchaseForCart(t);a>i&&(a=i),a=Math.floor(a);try{this.$set(t,"numbers",a)}catch(s){t.numbers=a}},handleLeaseTimeInput(t,e){if(""===e||null===e||void 0===e)return void(t.leaseTime=1);const a=Number(e);isNaN(a)?t.leaseTime=1:t.leaseTime=a%1===0?a<1?1:a>365?365:a:Math.floor(a)},handleProductExpandChange(t,e,a){const i=this.$refs["productTable-"+(t&&t.id)];if(!i||!e)return;const s=i.selection||[],o=Array.isArray(s)&&s.some(t=>t&&t.id===e.id);o&&this.$nextTick(()=>{this.applyInnerSelection(e,!0)})},isProductSelected(t,e){const a=this.$refs["productTable-"+(t&&t.id)];if(!a||!e)return!1;const i=a.selection||[];return Array.isArray(i)&&i.some(t=>t&&t.id===e.id)},formatPayTooltip(t){return`${t.payChain} - ${this.toUpperText(t.payCoin)}`},formatMachineType(t){const e=Number(t);return 0===e?"ASIC":1===e?"GPU":""},formatWalletAddress(t){if(!t||"string"!==typeof t)return"-";const e=t.trim();return e.length<=20?e:`${e.substring(0,10)}...${e.substring(e.length-10)}`},typeClass(t){const e=Number(t);return 1===e?"gpu":0===e?"asic":""}}}},8837:function(t,e,a){a.r(e),a.d(e,{__esModule:function(){return s.B},default:function(){return l}});var i=a(4679),s=a(5502),o=s.A,r=a(845),n=(0,r.A)(o,i.XX,i.Yp,!1,null,"fe47c9d8",null),l=n.exports},8872:function(t,e,a){a.r(e),a.d(e,{__esModule:function(){return s.B},default:function(){return l}});var i=a(2308),s=a(8732),o=s.A,r=a(845),n=(0,r.A)(o,i.XX,i.Yp,!1,null,"2abe49ac",null),l=n.exports},9146:function(t,e,a){Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=void 0,a(4114);var i=a(9662);e["default"]={name:"ProductList",data(){return{products:[],loading:!1,powerList:[],currencyList:[{path:"nexaAccess",value:"nexa",label:"nexa",imgUrl:"https://m2pool.com/img/nexa.png",name:"course.NEXAcourse",show:!0,amount:1e4},{path:"grsAccess",value:"grs",label:"grs",imgUrl:"https://m2pool.com/img/grs.svg",name:"course.GRScourse",show:!0,amount:1},{path:"monaAccess",value:"mona",label:"mona",imgUrl:"https://m2pool.com/img/mona.svg",name:"course.MONAcourse",show:!0,amount:1},{path:"dgbsAccess",value:"dgbs",label:"dgb(skein)",imgUrl:"https://m2pool.com/img/dgb.svg",name:"course.dgbsCourse",show:!0,amount:1},{path:"dgbqAccess",value:"dgbq",label:"dgb(qubit)",imgUrl:"https://m2pool.com/img/dgb.svg",name:"course.dgbqCourse",show:!0,amount:1},{path:"dgboAccess",value:"dgbo",label:"dgb(odocrypt)",imgUrl:"https://m2pool.com/img/dgb.svg",name:"course.dgboCourse",show:!0,amount:1},{path:"rxdAccess",value:"rxd",label:"radiant(rxd)",imgUrl:"https://m2pool.com/img/rxd.png",name:"course.RXDcourse",show:!0,amount:100},{path:"enxAccess",value:"enx",label:"Entropyx(enx)",imgUrl:"https://m2pool.com/img/enx.svg",name:"course.ENXcourse",show:!0,amount:5e3},{path:"alphminingPool",value:"alph",label:"alephium",imgUrl:"https://m2pool.com/img/alph.svg",name:"course.alphCourse",show:!0,amount:1}],screenCurrency:"",searchAlgorithm:"",params:{pageNum:"1",pageSize:"10",keyword:""},productListLoading:!1}},mounted(){this.fetchShopList()},methods:{async fetchShopList(t){this.productListLoading=!0;try{const e={pageNum:this.params.pageNum,pageSize:this.params.pageSize},a=t&&"object"===typeof t?t.keyword:this.params.keyword;a&&(e.keyword=a);const s=await(0,i.getShopList)(e);!s||0!==s.code&&200!==s.code?this.products=[]:this.products=Array.isArray(s.rows)?s.rows:[]}catch(e){console.error("获取店铺列表失败:",e),this.products=[]}this.productListLoading=!1},handleAlgorithmSearch(){const t=(this.searchAlgorithm||"").trim();this.params.keyword=t,this.fetchShopList(t?{keyword:t}:void 0)},handleAlgorithmClear(){this.searchAlgorithm="",this.params.keyword="",this.fetchShopList()},handleProductClick(t){const e=t&&(null!=t.shopId?t.shopId:t.id);void 0!==e&&null!==e&&this.$router.push(`/product/${e}`)}}}},9197:function(t,e,a){a.r(e),a.d(e,{default:function(){return n}});var i=a(1968),s=a(845),o={},r=(0,s.A)(o,i.XX,i.Yp,!1,null,null,null),n=r.exports},9252:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.coinList=void 0;e.coinList=[{path:"nexaAccess",value:"nexa",label:"nexa",imgUrl:"https://m2pool.com/img/nexa.png",name:"course.NEXAcourse",show:!0,amount:1e4},{path:"grsAccess",value:"grs",label:"grs",imgUrl:"https://m2pool.com/img/grs.svg",name:"course.GRScourse",show:!0,amount:1},{path:"monaAccess",value:"mona",label:"mona",imgUrl:"https://m2pool.com/img/mona.svg",name:"course.MONAcourse",show:!0,amount:1},{path:"dgbsAccess",value:"dgbs",label:"dgb(skein)",imgUrl:"https://m2pool.com/img/dgb.svg",name:"course.dgbsCourse",show:!0,amount:1},{path:"dgbqAccess",value:"dgbq",label:"dgb(qubit)",imgUrl:"https://m2pool.com/img/dgb.svg",name:"course.dgbqCourse",show:!0,amount:1},{path:"dgboAccess",value:"dgbo",label:"dgb(odocrypt)",imgUrl:"https://m2pool.com/img/dgb.svg",name:"course.dgboCourse",show:!0,amount:1},{path:"rxdAccess",value:"rxd",label:"radiant(rxd)",imgUrl:"https://m2pool.com/img/rxd.png",name:"course.RXDcourse",show:!0,amount:100},{path:"enxAccess",value:"enx",label:"Entropyx(enx)",imgUrl:"https://m2pool.com/img/enx.svg",name:"course.ENXcourse",show:!0,amount:5e3},{path:"alphminingPool",value:"alph",label:"alephium",imgUrl:"https://m2pool.com/img/alph.svg",name:"course.alphCourse",show:!0,amount:1}]},9266:function(t,e,a){a.r(e),a.d(e,{__esModule:function(){return s.B},default:function(){return l}});var i=a(3574),s=a(346),o=s.A,r=a(845),n=(0,r.A)(o,i.XX,i.Yp,!1,null,"538996de",null),l=n.exports},9273:function(t,e){e.Yp=e.XX=void 0;e.XX=function(){var t=this,e=t._self._c;return e("div",{staticClass:"auth-container"},[t._m(0),e("div",{staticClass:"auth-card"},[e("div",{staticClass:"close-btn",attrs:{title:"返回商城"},on:{click:t.goToShop}},[e("i",{staticClass:"el-icon-close"})]),t._m(1),e("el-form",{ref:"resetForm",staticClass:"auth-form",attrs:{model:t.resetForm,rules:t.resetRules},nativeOn:{submit:function(e){return e.preventDefault(),t.handleReset.apply(null,arguments)}}},[e("el-form-item",{attrs:{prop:"email"}},[e("el-input",{attrs:{placeholder:"请输入注册时的邮箱","prefix-icon":"el-icon-message",size:"large",clearable:""},model:{value:t.resetForm.email,callback:function(e){t.$set(t.resetForm,"email",e)},expression:"resetForm.email"}})],1),e("el-form-item",{attrs:{prop:"code"}},[e("div",{staticClass:"code-input-wrapper"},[e("el-input",{attrs:{placeholder:"请输入邮箱验证码","prefix-icon":"el-icon-key",size:"large",maxlength:"10",clearable:""},model:{value:t.resetForm.code,callback:function(e){t.$set(t.resetForm,"code",e)},expression:"resetForm.code"}}),e("el-button",{staticClass:"send-code-btn",attrs:{type:"primary",size:"large",disabled:t.countdown>0,loading:t.sendingCode},on:{click:t.handleSendCode}},[t._v(" "+t._s(t.countdown>0?`${t.countdown}秒后重试`:"获取验证码")+" ")])],1)]),e("el-form-item",{attrs:{prop:"password"}},[e("el-input",{attrs:{type:"password",placeholder:"请输入新密码(8-32位)","prefix-icon":"el-icon-lock",size:"large","show-password":"",clearable:""},model:{value:t.resetForm.password,callback:function(e){t.$set(t.resetForm,"password",e)},expression:"resetForm.password"}}),e("div",{staticClass:"password-tip"},[e("i",{staticClass:"el-icon-info"}),e("span",[t._v("密码需包含大小写字母、数字和特殊字符,长度8-32位")])]),t.resetForm.password?e("div",{staticClass:"password-strength"},[e("span",{staticClass:"strength-label"},[t._v("密码强度:")]),e("span",{class:["strength-bar",t.passwordStrengthClass]},[t._v(" "+t._s(t.passwordStrengthText)+" ")])]):t._e()],1),e("el-form-item",{attrs:{prop:"confirmPassword"}},[e("el-input",{attrs:{type:"password",placeholder:"请再次输入新密码","prefix-icon":"el-icon-lock",size:"large","show-password":"",clearable:""},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleReset.apply(null,arguments)}},model:{value:t.resetForm.confirmPassword,callback:function(e){t.$set(t.resetForm,"confirmPassword",e)},expression:"resetForm.confirmPassword"}})],1),e("el-form-item",[e("el-button",{staticClass:"auth-submit-btn",attrs:{type:"primary",size:"large",loading:t.loading},on:{click:t.handleReset}},[t._v(" "+t._s(t.loading?"重置中...":"确认重置")+" ")])],1),e("div",{staticClass:"auth-footer"},[e("router-link",{staticClass:"link-text link-primary",attrs:{to:"/login"}},[e("i",{staticClass:"el-icon-back"}),t._v(" 返回登录 ")])],1)],1)],1)])},e.Yp=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"auth-background"},[e("div",{staticClass:"bg-circle circle-1"}),e("div",{staticClass:"bg-circle circle-2"}),e("div",{staticClass:"bg-circle circle-3"})])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"auth-header"},[e("h1",{staticClass:"auth-title"},[t._v("重置密码")]),e("p",{staticClass:"auth-subtitle"},[t._v("通过邮箱验证码重置您的密码")])])}]},9325:function(t,e,a){var i=a(3999)["default"];Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=void 0;var s=i(a(5471)),o=i(a(1973)),r=a(3723);s.default.use(o.default);const n=new o.default({mode:"history",base:"/",routes:r.mainRoutes});n.beforeEach((t,e,a)=>{t.meta&&t.meta.title?document.title=`${t.meta.title} - Power Leasing`:document.title="Power Leasing - 电商系统",t.meta&&t.meta.allAuthority&&console.log(`访问页面: ${t.meta.title}, 权限: ${t.meta.allAuthority.join(", ")}`),a()}),n.onError(t=>{console.error("路由错误:",t)});e["default"]=n},9526:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=void 0;e["default"]={401:"认证失败,无法访问系统资源,请重新登录",403:"当前操作没有权限",404:"访问资源不存在",default:"系统未知错误,请反馈给管理员"}},9585:function(t,e,a){a.r(e),a.d(e,{__esModule:function(){return s.B},default:function(){return l}});var i=a(8639),s=a(6616),o=s.A,r=a(845),n=(0,r.A)(o,i.XX,i.Yp,!1,null,"7fc650d5",null),l=n.exports},9628:function(t,e){e.Yp=e.XX=void 0;e.XX=function(){var t=this,e=t._self._c;return e("div",{staticClass:"checkout-page"},[e("h1",{staticClass:"page-title"},[t._v("订单结算")]),t.loading?e("div",{staticClass:"loading"},[e("el-loading-spinner"),t._v(" 加载中... ")],1):0===t.cartItems.length?e("div",{staticClass:"empty-cart"},[e("div",{staticClass:"empty-icon"},[t._v("🛒")]),e("h2",[t._v("购物车是空的")]),e("p",[t._v("请先添加商品到购物车")]),e("router-link",{staticClass:"shop-now-btn",attrs:{to:"/productList"}},[t._v(" 去购物 ")])],1):e("div",{staticClass:"checkout-content"},[e("div",{staticClass:"order-summary"},[e("h2",{staticClass:"section-title"},[t._v("订单摘要")]),e("div",{staticClass:"order-items"},t._l(t.cartItems,function(a){return e("div",{key:a.id,staticClass:"order-item"},[e("div",{staticClass:"item-image"},[e("img",{attrs:{src:a.image,alt:a.title}})]),e("div",{staticClass:"item-info"},[e("h3",{staticClass:"item-title"},[t._v(t._s(a.title))]),e("div",{staticClass:"item-price"},[t._v("¥"+t._s(a.price))])]),e("div",{staticClass:"item-quantity"},[e("span",{staticClass:"quantity-label"},[t._v("数量:")]),e("span",{staticClass:"quantity-value"},[t._v(t._s(a.quantity))])]),e("div",{staticClass:"item-total"},[e("span",{staticClass:"total-label"},[t._v("小计:")]),e("span",{staticClass:"total-price"},[t._v("¥"+t._s((a.price*a.quantity).toFixed(2)))])])])}),0),e("div",{staticClass:"order-total"},[e("div",{staticClass:"total-row"},[e("span",[t._v("商品总数:")]),e("span",[t._v(t._s(t.summary.totalQuantity)+" 件")])]),e("div",{staticClass:"total-row"},[e("span",[t._v("商品种类:")]),e("span",[t._v(t._s(t.cartItems.length)+" 种")])]),e("div",{staticClass:"total-row final-total"},[e("span",[t._v("订单总计:")]),e("span",{staticClass:"final-amount"},[t._v("¥"+t._s(t.summary.totalPrice.toFixed(2)))])])])]),e("div",{staticClass:"checkout-form"},[e("h2",{staticClass:"section-title"},[t._v("收货信息")]),e("form",{staticClass:"form",on:{submit:function(e){return e.preventDefault(),t.handleSubmit.apply(null,arguments)}}},[e("div",{staticClass:"form-row"},[e("div",{staticClass:"form-group"},[e("label",{staticClass:"form-label",attrs:{for:"name"}},[t._v("收货人姓名 *")]),e("input",{directives:[{name:"model",rawName:"v-model",value:t.form.name,expression:"form.name"}],staticClass:"form-input",attrs:{id:"name",type:"text",required:"",placeholder:"请输入收货人姓名","aria-describedby":"name-error"},domProps:{value:t.form.name},on:{input:function(e){e.target.composing||t.$set(t.form,"name",e.target.value)}}}),t.errors.name?e("div",{staticClass:"error-message",attrs:{id:"name-error"}},[t._v(" "+t._s(t.errors.name)+" ")]):t._e()]),e("div",{staticClass:"form-group"},[e("label",{staticClass:"form-label",attrs:{for:"phone"}},[t._v("联系电话 *")]),e("input",{directives:[{name:"model",rawName:"v-model",value:t.form.phone,expression:"form.phone"}],staticClass:"form-input",attrs:{id:"phone",type:"tel",required:"",placeholder:"请输入联系电话","aria-describedby":"phone-error"},domProps:{value:t.form.phone},on:{input:function(e){e.target.composing||t.$set(t.form,"phone",e.target.value)}}}),t.errors.phone?e("div",{staticClass:"error-message",attrs:{id:"phone-error"}},[t._v(" "+t._s(t.errors.phone)+" ")]):t._e()])]),e("div",{staticClass:"form-group"},[e("label",{staticClass:"form-label",attrs:{for:"address"}},[t._v("收货地址 *")]),e("textarea",{directives:[{name:"model",rawName:"v-model",value:t.form.address,expression:"form.address"}],staticClass:"form-textarea",attrs:{id:"address",rows:"3",required:"",placeholder:"请输入详细收货地址","aria-describedby":"address-error"},domProps:{value:t.form.address},on:{input:function(e){e.target.composing||t.$set(t.form,"address",e.target.value)}}}),t.errors.address?e("div",{staticClass:"error-message",attrs:{id:"address-error"}},[t._v(" "+t._s(t.errors.address)+" ")]):t._e()]),e("div",{staticClass:"form-group"},[e("label",{staticClass:"form-label",attrs:{for:"note"}},[t._v("备注")]),e("textarea",{directives:[{name:"model",rawName:"v-model",value:t.form.note,expression:"form.note"}],staticClass:"form-textarea",attrs:{id:"note",rows:"2",placeholder:"可选:订单备注信息"},domProps:{value:t.form.note},on:{input:function(e){e.target.composing||t.$set(t.form,"note",e.target.value)}}})]),e("div",{staticClass:"form-actions"},[e("router-link",{staticClass:"back-btn",attrs:{to:"/cart"}},[t._v(" 返回购物车 ")]),e("button",{staticClass:"submit-btn",attrs:{type:"submit",disabled:t.submitting,"aria-label":"提交订单"}},[t.submitting?e("span",[t._v("提交中...")]):e("span",[t._v("提交订单")])])],1)])])])])},e.Yp=[]},9635:function(t,e){e.Yp=e.XX=void 0;e.XX=function(){var t=this,e=t._self._c;return e("div",{staticClass:"receipt-page"},[e("div",{staticClass:"card",attrs:{"aria-label":"提现记录",tabindex:"0"}},[t._m(0),t.loading?e("div",{staticClass:"loading"},[e("i",{staticClass:"el-icon-loading",attrs:{"aria-label":"加载中",role:"img"}}),t._v(" 加载中... ")]):e("div",[e("div",{staticClass:"table-wrap"},[e("el-table",{staticClass:"withdraw-table",attrs:{data:t.rows,border:"",stripe:"",size:"small","header-cell-style":{textAlign:"left"},"cell-style":{textAlign:"left"}}},[e("el-table-column",{attrs:{label:"申请时间",width:"140"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(t.formatFullTime(e.row.createTime)))]}}])}),e("el-table-column",{attrs:{label:"提现金额",width:"70","show-overflow-tooltip":"",align:"right"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",{staticClass:"amount-red"},[t.formatAmount(a.row.amount,a.row.coin||a.row.toSymbol||"USDT").truncated?e("el-tooltip",{attrs:{content:`-${t.formatAmount(a.row.amount,a.row.coin||a.row.toSymbol||"USDT").full}`,placement:"top"}},[e("span",[t._v(" -"+t._s(t.formatAmount(a.row.amount,a.row.coin||a.row.toSymbol||"USDT").text)+" "),e("i",{staticClass:"el-icon-more amount-more"})])]):e("span",[t._v(" -"+t._s(t.formatAmount(a.row.amount,a.row.coin||a.row.toSymbol||"USDT").text)+" ")])],1)]}}])}),e("el-table-column",{attrs:{label:"手续费",width:"70","show-overflow-tooltip":"",align:"right"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",{staticClass:"mono"},[t._v(t._s(t.formatAmount(a.row.serviceCharge,a.row.coin||a.row.toSymbol||"USDT").text))])]}}])}),e("el-table-column",{attrs:{label:"提现链",width:"100","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(t.formatChain(e.row.toChain||e.row.chain)))]}}])}),e("el-table-column",{attrs:{label:"币种",width:"80","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(String(e.row.coin||e.row.toSymbol||"").toUpperCase()))]}}])}),e("el-table-column",{attrs:{label:"收款地址","min-width":"320","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-tooltip",{attrs:{content:a.row.toAddress,placement:"top"}},[e("span",{staticClass:"mono-ellipsis"},[t._v(t._s(a.row.toAddress))])]),e("el-button",{attrs:{type:"text",size:"mini"},on:{click:function(e){return e.stopPropagation(),t.copy(a.row.toAddress)}}},[t._v("复制")])]}}])}),e("el-table-column",{attrs:{label:"交易HASH",width:"300","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-tooltip",{attrs:{content:a.row.txHash,placement:"top"}},[e("span",{staticClass:"mono-ellipsis"},[t._v(t._s(a.row.txHash))])]),a.row.txHash?e("el-button",{attrs:{type:"text",size:"mini"},on:{click:function(e){return e.stopPropagation(),t.copy(a.row.txHash)}}},[t._v("复制")]):t._e()]}}])}),e("el-table-column",{attrs:{label:"状态",width:"90"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-tag",{attrs:{type:t.getStatusType(a.row.status),size:"small"}},[t._v(t._s(t.getStatusText(a.row.status)))])]}}])}),e("el-table-column",{attrs:{label:"状态更新时间",width:"140"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(t.formatFullTime(e.row.updateTime)))]}}])})],1)],1),t.rows.length?t._e():e("div",{staticClass:"empty"},[e("div",{staticClass:"empty-icon"},[t._v("🏧")]),e("div",{staticClass:"empty-text"},[t._v("暂无提现记录")])]),e("div",{staticClass:"pagination"},[e("el-pagination",{attrs:{background:"",layout:"prev, pager, next, jumper","current-page":t.pageNum,"page-size":t.pageSize,total:t.total},on:{"update:currentPage":function(e){t.pageNum=e},"update:current-page":function(e){t.pageNum=e},"current-change":t.fetchList}})],1)])])])},e.Yp=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"card-header"},[e("h3",{staticClass:"card-title"},[t._v("提现记录")])])}]},9660:function(t,e,a){Object.defineProperty(e,"B",{value:!0}),e.A=void 0;var i=a(4180);e.A={name:"AccountOrderDetail",data(){return{loading:!1,order:{},items:[]}},created(){this.load()},methods:{async load(){const t=this.$route.params.id;if(t)try{this.loading=!0;const e=await(0,i.getOrdersByIds)({orderId:t}),a=null!=(e&&e.data)?e.data:e;let s={};Array.isArray(a)&&a.length?s=a[0]:a&&"object"===typeof a?s=a:Array.isArray(e&&e.rows)&&e.rows.length&&(s=e.rows[0]),this.order=s||{},this.items=Array.isArray(s&&s.orderItemDtoList)?s.orderItemDtoList:[]}catch(e){console.log("获取订单详情失败")}finally{this.loading=!1}else this.$message({message:"订单ID缺失",type:"error",showClose:!0})},getOrderStatusText(t){const e=Number(t);return 7===e?"进行中":8===e?"已完成":String(null==t?"":t)},formatDateTime(t){if(!t)return"—";try{const e=String(t);return e.includes("T")?e.replace("T"," "):e}catch(e){return String(t)}},formatMachineType(t){if(null===t||void 0===t)return"—";const e=Number(t);return 0===e?"ASIC":1===e?"GPU":"—"}}}},9662:function(t,e,a){var i=a(3999)["default"];Object.defineProperty(e,"__esModule",{value:!0}),e.addGoodsV2=b,e.createProduct=r,e.deleteMachine=w,e.deleteProduct=c,e.getList=o,e.getMachineInfo=d,e.getMachineInfoById=p,e.getOwnedById=h,e.getOwnedList=u,e.getPayTypes=m,e.getProductList=n,e.getShopList=v,e.getShopMachineList=C,e.getShopMachineListForSeller=g,e.updateAsicMachine=y,e.updateGpuMachine=f,e.updateProduct=l;var s=i(a(5720));function o(t){return(0,s.default)({url:"/lease/product/getList",method:"get",data:t})}function r(t){return(0,s.default)({url:"/lease/product/add",method:"post",data:t})}function n(t){return(0,s.default)({url:"/lease/product/getList",method:"post",data:t})}function l(t){return(0,s.default)({url:"/lease/product/update",method:"post",data:t})}function c(t){return(0,s.default)({url:"/lease/product/delete",method:"post",data:{id:t}})}function d(t){return(0,s.default)({url:"/lease/product/getMachineInfo",method:"post",data:t})}function u(t){return(0,s.default)({url:"/lease/product/getOwnedList",method:"post",data:t})}function h(t){return(0,s.default)({url:"/lease/product/getOwnedById",method:"post",data:t})}function p(t){return(0,s.default)({url:"/lease/product/getMachineInfoById",method:"post",data:t})}function m(t){return(0,s.default)({url:"/lease/product/getPayTypes",method:"post",data:t})}function g(t){return(0,s.default)({url:"/lease/v2/product/machine/getShopMachineListForSeller",method:"post",data:t})}function f(t){return(0,s.default)({url:"/lease/v2/product/machine/updateGpuMachine",method:"post",data:t})}function y(t){return(0,s.default)({url:"/lease/v2/product/machine/updateAsicMachine",method:"post",data:t})}function w(t){return(0,s.default)({url:"/lease/v2/product/machine/deleteMachine",method:"post",data:t})}function v(t){return(0,s.default)({url:"/lease/v2/product/machine/getShopList",method:"post",data:t})}function C(t){return(0,s.default)({url:"/lease/v2/product/machine/getShopMachineList",method:"post",data:t})}function b(t){return(0,s.default)({url:"/lease/v2/shopping/cart/addGoodsV2",method:"post",data:t})}},9810:function(t,e,a){a.r(e),a.d(e,{__esModule:function(){return s.B},default:function(){return l}});var i=a(2300),s=a(2570),o=s.A,r=a(845),n=(0,r.A)(o,i.XX,i.Yp,!1,null,"4cbf061c",null),l=n.exports},9814:function(t,e,a){Object.defineProperty(e,"B",{value:!0}),e.A=void 0,a(4114),a(8111),a(8237);var i=a(5952),s=a(6067),o=a(5844);e.A={name:"Header",data(){return{user:null,cart:[],cartServerCount:0,navigation:s.mainNavigation,userEmail:"",isLoggedIn:!1}},computed:{cartItemCount(){return Number.isFinite(this.cartServerCount)?this.cartServerCount:0},breadcrumbs(){return(0,s.getBreadcrumb)(this.$route.path)}},watch:{},mounted(){this.updateLoginStatus(),this.loadCart(),window.addEventListener("storage",this.handleStorageChange),this.loadServerCartCount(),window.addEventListener("cart-updated",this.handleCartUpdated),window.addEventListener("login-status-changed",this.handleLoginStatusChanged),this.loadUserEmail()},beforeDestroy(){window.removeEventListener("storage",this.handleStorageChange),window.removeEventListener("cart-updated",this.handleCartUpdated),window.removeEventListener("login-status-changed",this.handleLoginStatusChanged)},methods:{isNavActive(t){const e=this.$route&&this.$route.path||"";return("/account/security-settings"!==e||"/account"!==t)&&(e===t||"/"!==t&&e.startsWith(t+"/"))},loadCart(){this.cart=(0,i.readCart)()},async loadServerCartCount(){try{const t=await(0,o.getGoodsListV2)();let e=0;Array.isArray(t&&t.rows)?e=t.rows.reduce((t,e)=>{const a=Array.isArray(e&&e.cartMachineInfoDtoList)?e.cartMachineInfoDtoList:[];return t+a.length},0):Array.isArray(t&&t.data&&t.data.rows)&&(e=t.data.rows.reduce((t,e)=>{const a=Array.isArray(e&&e.cartMachineInfoDtoList)?e.cartMachineInfoDtoList:[];return t+a.length},0)),this.cartServerCount=Number.isFinite(e)?e:0}catch(t){console.error("加载购物车数量失败:",t)}},handleStorageChange(t){"power_leasing_cart_v1"===t.key?(this.loadCart(),this.loadServerCartCount()):"leasToken"===t.key&&(this.updateLoginStatus(),t.newValue?this.loadUserEmail():this.userEmail="")},handleLoginStatusChanged(){this.updateLoginStatus(),this.isLoggedIn?this.loadUserEmail():this.userEmail=""},updateLoginStatus(){try{const t=localStorage.getItem("leasToken");this.isLoggedIn=!!t&&"null"!==t&&"undefined"!==t}catch(t){this.isLoggedIn=!1}},handleCartUpdated(t){try{const e=t&&t.detail&&Number(t.detail.count);if(Number.isFinite(e))return void(this.cartServerCount=e)}catch(e){}this.loadServerCartCount()},goToLogin(){this.$router.push("/login")},goToRegister(){this.$router.push("/register")},loadUserEmail(){try{const t=localStorage.getItem("userInfo");if(t){const e=JSON.parse(t);this.userEmail=e.userName||e.email||e.username||"用户"}}catch(t){console.error("读取用户信息失败:",t),this.userEmail=""}},handleLogout(){localStorage.removeItem("leasToken"),localStorage.removeItem("userInfo"),localStorage.removeItem("leasEmail"),localStorage.removeItem("userId"),localStorage.removeItem("username"),this.updateLoginStatus(),this.user=null,this.cart=[],this.userEmail="",window.dispatchEvent(new CustomEvent("login-status-changed")),this.$message.success("退出登录成功"),this.$router.push("/login")},getBreadcrumbPath(t){const e=["/productList","/cart","/checkout"];return 0===t?"/productList":t=o)&&Object.keys(a.O).every(function(t){return a.O[t](i[l])})?i.splice(l--,1):(n=!1,o0&&t[d-1][2]>o;d--)t[d]=t[d-1];t[d]=[i,s,o]}}(),function(){a.d=function(t,e){for(var i in e)a.o(e,i)&&!a.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})}}(),function(){a.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"===typeof window)return window}}()}(),function(){a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}}(),function(){a.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}}(),function(){a.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t}}(),function(){a.p="/"}(),function(){var t={524:0};a.O.j=function(e){return 0===t[e]};var e=function(e,i){var s,o,r=i[0],n=i[1],l=i[2],c=0;if(r.some(function(e){return 0!==t[e]})){for(s in n)a.o(n,s)&&(a.m[s]=n[s]);if(l)var d=l(a)}for(e&&e(i);c\n
\n \n
\n

新增商品

\n

创建新的商品信息

\n
\n \n \n \n \n \n \n\n \n \n \n 矿机\n \n \n \n\n \n \n \n \n \n \n\n \n \n \n \n\n \n \n\n \n \n\n\n \n \n\n \n \n\n \n \n\n \n \n \n 上架\n 下架\n \n \n\n \n \n
\n 创建商品\n 重置\n 取消\n
\n
\n
\n
\n
\n\n\n\n\n ","\n\n\n\n\n","/**\r\n * 全局输入表情符号拦截守卫(极简,无侵入)\r\n * 作用:拦截所有原生 input/textarea 的输入事件,移除 Emoji,并重新派发 input 事件以同步 v-model\r\n * 注意:\r\n * - 跳过正在输入法合成阶段(compositionstart ~ compositionend),避免影响中文输入\r\n * - 默认对所有可编辑 input/textarea 生效;如需个别放行,可在元素上加 data-allow-emoji=\"true\"\r\n */\r\nexport const initNoEmojiGuard = () => {\r\n if (typeof window === 'undefined') return\r\n if (window.__noEmojiGuardInitialized) return\r\n window.__noEmojiGuardInitialized = true\r\n\r\n // 覆盖常见 Emoji、旗帜、杂项符号、ZWJ、变体选择符、组合键帽\r\n const emojiPattern = /[\\u{1F300}-\\u{1FAFF}]|[\\u{1F1E6}-\\u{1F1FF}]|[\\u{2600}-\\u{26FF}]|[\\u{2700}-\\u{27BF}]|[\\u{FE0F}]|[\\u{200D}]|[\\u{20E3}]/gu\r\n\r\n /**\r\n * 判断是否是需要拦截的可编辑元素\r\n * @param {EventTarget} el 事件目标\r\n * @returns {boolean}\r\n */\r\n const isEditableTarget = (el) => {\r\n if (!el || !(el instanceof Element)) return false\r\n if (el.getAttribute && el.getAttribute('data-allow-emoji') === 'true') return false\r\n const tag = el.tagName\r\n if (tag === 'INPUT') {\r\n const type = (el.getAttribute('type') || 'text').toLowerCase()\r\n // 排除不会产生文本的类型\r\n const disallow = ['checkbox', 'radio', 'file', 'hidden', 'button', 'submit', 'reset', 'range', 'color', 'date', 'datetime-local', 'month', 'time', 'week']\r\n return disallow.indexOf(type) === -1\r\n }\r\n if (tag === 'TEXTAREA') return true\r\n return false\r\n }\r\n\r\n // 记录输入法合成状态\r\n const setComposing = (el, composing) => {\r\n try { el.__noEmojiComposing = composing } catch (e) {}\r\n }\r\n const isComposing = (el) => !!(el && el.__noEmojiComposing)\r\n\r\n // 结束合成时做一次清洗\r\n document.addEventListener('compositionstart', (e) => {\r\n if (!isEditableTarget(e.target)) return\r\n setComposing(e.target, true)\r\n }, true)\r\n document.addEventListener('compositionend', (e) => {\r\n if (!isEditableTarget(e.target)) return\r\n setComposing(e.target, false)\r\n sanitizeAndRedispatch(e.target)\r\n }, true)\r\n\r\n // 主输入拦截:捕获阶段尽早处理\r\n document.addEventListener('input', (e) => {\r\n const target = e.target\r\n if (!isEditableTarget(target)) return\r\n if (isComposing(target)) return\r\n sanitizeAndRedispatch(target)\r\n }, true)\r\n\r\n /**\r\n * 清洗目标元素的值并在变更时重新派发 input 事件\r\n * @param {HTMLInputElement|HTMLTextAreaElement} target\r\n */\r\n function sanitizeAndRedispatch(target) {\r\n const before = String(target.value ?? '')\r\n if (!before) return\r\n if (!emojiPattern.test(before)) return\r\n const selectionStart = target.selectionStart\r\n const selectionEnd = target.selectionEnd\r\n const after = before.replace(emojiPattern, '')\r\n if (after === before) return\r\n target.value = after\r\n try {\r\n // 重置光标,尽量贴近原位置\r\n if (typeof selectionStart === 'number' && typeof selectionEnd === 'number') {\r\n const removed = before.length - after.length\r\n const nextPos = Math.max(0, selectionStart - removed)\r\n target.setSelectionRange(nextPos, nextPos)\r\n }\r\n } catch (e) {}\r\n // 重新派发 input 事件以同步 v-model\r\n const evt = new Event('input', { bubbles: true })\r\n target.dispatchEvent(evt)\r\n }\r\n}\r\n\r\n\r\n","import mod from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./fundsFlow.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./fundsFlow.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./fundsFlow.vue?vue&type=template&id=147a043d&scoped=true\"\nimport script from \"./fundsFlow.vue?vue&type=script&lang=js\"\nexport * from \"./fundsFlow.vue?vue&type=script&lang=js\"\nimport style0 from \"./fundsFlow.vue?vue&type=style&index=0&id=147a043d&prod&scoped=true&lang=css\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"147a043d\",\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"account-page\"},[_c('div',{staticClass:\"account-layout\"},[_c('aside',{staticClass:\"sidebar\"},[_c('nav',{staticClass:\"side-nav\"},[_c('div',{staticClass:\"user-role\",attrs:{\"role\":\"group\",\"aria-label\":\"导航分组切换\"}},[_c('button',{staticClass:\"role-button\",class:{ active: _vm.activeRole === 'buyer' && !_vm.isSecuritySettingsPage },attrs:{\"aria-pressed\":_vm.activeRole === 'buyer' && !_vm.isSecuritySettingsPage,\"tabindex\":\"0\"},on:{\"click\":function($event){return _vm.handleClickRole('buyer')},\"keydown\":[function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"enter\",13,$event.key,\"Enter\"))return null;$event.preventDefault();return _vm.handleClickRole('buyer')},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"space\",32,$event.key,[\" \",\"Spacebar\"]))return null;$event.preventDefault();return _vm.handleClickRole('buyer')}]}},[_vm._v(\"买家相关\")]),_c('button',{staticClass:\"role-button\",class:{ active: _vm.activeRole === 'seller' && !_vm.isSecuritySettingsPage },attrs:{\"aria-pressed\":_vm.activeRole === 'seller' && !_vm.isSecuritySettingsPage,\"tabindex\":\"0\"},on:{\"click\":function($event){return _vm.handleClickRole('seller')},\"keydown\":[function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"enter\",13,$event.key,\"Enter\"))return null;$event.preventDefault();return _vm.handleClickRole('seller')},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"space\",32,$event.key,[\" \",\"Spacebar\"]))return null;$event.preventDefault();return _vm.handleClickRole('seller')}]}},[_vm._v(\"卖家相关\")])]),_vm._l((_vm.displayedLinks),function(item){return _c('router-link',{key:item.to,class:['side-link', _vm.isActiveLink(item.to) ? 'active' : ''],attrs:{\"to\":item.to}},[_vm._v(_vm._s(item.label))])})],2)]),_c('section',{staticClass:\"content\"},[_c('router-view')],1)])])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"receipt-page\"},[_c('div',{staticClass:\"card\",attrs:{\"aria-label\":\"收款记录\",\"tabindex\":\"0\"}},[_vm._m(0),(_vm.loading)?_c('div',{staticClass:\"loading\"},[_c('i',{staticClass:\"el-icon-loading\",attrs:{\"aria-label\":\"加载中\",\"role\":\"img\"}}),_vm._v(\" 加载中... \")]):_c('div',[_c('el-table',{ref:\"receiptTable\",staticStyle:{\"width\":\"100%\",\"table-layout\":\"auto\"},attrs:{\"data\":_vm.rows,\"border\":\"\",\"stripe\":\"\",\"size\":\"small\",\"row-key\":_vm.getRowKey,\"expand-row-keys\":_vm.expandedRowKeys,\"row-class-name\":_vm.getRowClassName,\"header-cell-style\":{ textAlign: 'left' },\"cell-style\":{ textAlign: 'left' }},on:{\"row-click\":_vm.handleRowClick,\"expand-change\":_vm.handleExpandChange}},[(_vm.rows.length > 0)?_c('el-table-column',{attrs:{\"type\":\"expand\",\"width\":\"46\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('div',{staticClass:\"detail-panel\"},[_c('div',{staticClass:\"detail-grid\"},[_c('div',{staticClass:\"detail-item\"},[_c('span',{staticClass:\"detail-label\"},[_vm._v(\"订单号\")]),_c('span',{staticClass:\"detail-value mono\"},[_vm._v(_vm._s(scope.row.orderId || '-'))])]),_c('div',{staticClass:\"detail-item\"},[_c('span',{staticClass:\"detail-label\"},[_vm._v(\"付款链\")]),_c('span',{staticClass:\"detail-value\"},[_c('span',{staticClass:\"badge\"},[_vm._v(_vm._s(_vm.formatChain(scope.row.fromChain) || '-'))])])]),_c('div',{staticClass:\"detail-item\"},[_c('span',{staticClass:\"detail-label\"},[_vm._v(\"付款币种\")]),_c('span',{staticClass:\"detail-value\"},[_c('span',{staticClass:\"badge badge-blue\"},[_vm._v(_vm._s(String((scope.row.fromSymbol || scope.row.coin) || '') .toUpperCase()))])])]),_c('div',{staticClass:\"detail-item detail-item-full\"},[_c('span',{staticClass:\"detail-label\"},[_vm._v(\"付款地址\")]),_c('span',{staticClass:\"detail-value address\"},[_c('span',{staticClass:\"mono-ellipsis\",attrs:{\"title\":scope.row.fromAddress}},[_vm._v(_vm._s(scope.row.fromAddress || '-'))]),(scope.row.fromAddress)?_c('el-button',{attrs:{\"type\":\"text\",\"size\":\"mini\"},on:{\"click\":function($event){$event.stopPropagation();return _vm.copy(scope.row.fromAddress)}}},[_vm._v(\"复制\")]):_vm._e()],1)])])])]}}],null,false,2778494901)}):_vm._e(),_c('el-table-column',{attrs:{\"label\":\"支付时间\",\"width\":\"160\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_vm._v(_vm._s(_vm.formatFullTime(scope.row.createTime)))]}}])}),_c('el-table-column',{attrs:{\"label\":\"收款金额(USDT)\",\"width\":\"140\",\"align\":\"right\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('span',{staticClass:\"amount-green\"},[(_vm.formatAmount(scope.row.realAmount, scope.row.coin || scope.row.toSymbol || 'USDT').truncated)?_c('el-tooltip',{attrs:{\"content\":`+${_vm.formatAmount(scope.row.realAmount, scope.row.coin || scope.row.toSymbol || 'USDT').full}`,\"placement\":\"top\"}},[_c('span',[_vm._v(\" +\"+_vm._s(_vm.formatAmount(scope.row.realAmount, scope.row.coin || scope.row.toSymbol || 'USDT').text)+\" \"),_c('i',{staticClass:\"el-icon-more amount-more\"})])]):_c('span',[_vm._v(\" +\"+_vm._s(_vm.formatAmount(scope.row.realAmount, scope.row.coin || scope.row.toSymbol || 'USDT').text)+\" \")])],1)]}}])}),_c('el-table-column',{attrs:{\"label\":\"收款链\",\"width\":\"140\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_vm._v(_vm._s(_vm.formatChain(scope.row.toChain)))]}}])}),_c('el-table-column',{attrs:{\"label\":\"收款币种\",\"width\":\"100\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_vm._v(_vm._s(String(scope.row.coin || '').toUpperCase()))]}}])}),_c('el-table-column',{attrs:{\"label\":\"收款地址\",\"min-width\":\"200\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('span',{staticClass:\"mono-ellipsis\",attrs:{\"title\":scope.row.toAddress}},[_vm._v(_vm._s(scope.row.toAddress))]),_c('el-button',{attrs:{\"type\":\"text\",\"size\":\"mini\"},on:{\"click\":function($event){$event.stopPropagation();return _vm.copy(scope.row.toAddress)}}},[_vm._v(\"复制\")])]}}])}),_c('el-table-column',{attrs:{\"label\":\"交易HASH\",\"min-width\":\"200\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('span',{staticClass:\"mono-ellipsis\",attrs:{\"title\":scope.row.txHash}},[_vm._v(_vm._s(scope.row.txHash))]),(scope.row.txHash)?_c('el-button',{attrs:{\"type\":\"text\",\"size\":\"mini\"},on:{\"click\":function($event){$event.stopPropagation();return _vm.copy(scope.row.txHash)}}},[_vm._v(\"复制\")]):_vm._e()]}}])}),_c('el-table-column',{attrs:{\"label\":\"支付状态\",\"width\":\"120\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('el-tag',{attrs:{\"type\":_vm.getStatusType(scope.row.status),\"size\":\"small\"}},[_vm._v(_vm._s(_vm.getStatusText(scope.row.status)))])]}}])}),_c('el-table-column',{attrs:{\"label\":\"状态更新时间\",\"width\":\"160\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_vm._v(_vm._s(_vm.formatFullTime(scope.row.updateTime)))]}}])})],1),(!_vm.rows.length)?_c('div',{staticClass:\"empty\"},[_c('div',{staticClass:\"empty-icon\"},[_vm._v(\"💳\")]),_c('div',{staticClass:\"empty-text\"},[_vm._v(\"暂无收款记录\")])]):_vm._e(),_c('div',{staticClass:\"pagination\"},[_c('el-pagination',{attrs:{\"background\":\"\",\"layout\":\"prev, pager, next, jumper\",\"current-page\":_vm.page,\"page-size\":_vm.pageSize,\"total\":_vm.total},on:{\"update:currentPage\":function($event){_vm.page=$event},\"update:current-page\":function($event){_vm.page=$event},\"current-change\":_vm.fetchList}})],1)],1)])])\n}\nvar staticRenderFns = [function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"card-header\"},[_c('h3',{staticClass:\"card-title\"},[_vm._v(\"收款记录\")])])\n}]\n\nexport { render, staticRenderFns }","import mod from \"-!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./idnex.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./idnex.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./idnex.vue?vue&type=template&id=0f1fd789\"\nimport script from \"./idnex.vue?vue&type=script&lang=js\"\nexport * from \"./idnex.vue?vue&type=script&lang=js\"\nimport style0 from \"./idnex.vue?vue&type=style&index=0&id=0f1fd789&prod&lang=scss\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import request from '../utils/request'\r\n\r\n//新增机器\r\nexport function addSingleOrBatchMachine(data) {\r\n return request({\r\n url: `/lease/product/machine/addSingleOrBatchMachine`,\r\n method: 'post',\r\n data\r\n })\r\n}\r\n\r\n\r\n//根据矿机id 删除商品矿机\r\nexport function deleteMachine(data) {\r\n return request({\r\n url: `/lease/product/machine/delete`,\r\n method: 'post',\r\n data\r\n })\r\n}\r\n\r\n\r\n//根据挖矿账户获取矿机列表\r\nexport function getUserMachineList(data) {\r\n return request({\r\n url: `/lease/product/machine/getUserMachineList`,\r\n method: 'post',\r\n data\r\n })\r\n}\r\n\r\n\r\n\r\n//根据 登录账户 获取挖矿账户及挖矿币种集合\r\nexport function getUserMinersList(data) {\r\n return request({\r\n url: `/lease/product/machine/getUserMinersList`,\r\n method: 'post',\r\n data\r\n })\r\n}\r\n\r\n\r\n//编辑矿机 + 矿机上下架\r\nexport function updateMachine(data) {\r\n return request({\r\n url: `/lease/product/machine/updateMachine`,\r\n method: 'post',\r\n data\r\n })\r\n}\r\n\r\n\r\n\r\n//获取矿机列表\r\nexport function getMachineListForUpdate(data) {\r\n return request({\r\n url: `/lease/product/machine/getMachineListForUpdate`,\r\n method: 'post',\r\n data\r\n })\r\n}\r\n\r\n\r\n//GPU下载客户端\r\nexport function downloadClient() {\r\n return request({\r\n url: `/lease/user/downloadClient`,\r\n method: 'get',\r\n responseType: 'blob' // 关键:必须设置为 blob 才能正确下载二进制文件\r\n })\r\n}\r\n\r\n\r\n//卖家页面---新增ASIC矿机\r\nexport function addAsicMachine(data) {\r\n return request({\r\n url: `/lease/v2/product/machine/addAsicMachine`,\r\n method: 'post',\r\n data\r\n })\r\n}\r\n\r\n///添加出售机器的币种获取ASIC\r\nexport function getSupportCoin() {\r\n return request({\r\n url: `/lease/v2/product/machine/getSupportCoin`,\r\n method: 'get', \r\n })\r\n}\r\n\r\n///添加出售机器的对应币种的算法获取ASIC\r\n/**\r\n * 根据币种获取支持的算法列表\r\n * @param {string} coin - 币种名称,例如 'BTC', 'ETH' 等\r\n * @returns {Promise} 返回算法列表\r\n */\r\nexport function getSupportAlgo(coin) {\r\n return request({\r\n url: `/lease/v2/product/machine/getSupportAlgo`,\r\n method: 'get',\r\n params: { coin } // 使用 params,request 拦截器会自动将参数拼接到 URL 查询字符串中\r\n })\r\n}\r\n\r\n\r\n","import mod from \"-!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./content.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./content.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./content.vue?vue&type=template&id=9935370e&scoped=true\"\nimport script from \"./content.vue?vue&type=script&lang=js\"\nexport * from \"./content.vue?vue&type=script&lang=js\"\nimport style0 from \"./content.vue?vue&type=style&index=0&id=9935370e&prod&scoped=true&lang=css\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"9935370e\",\n null\n \n)\n\nexport default component.exports","\n\n\n\n\n\n","import mod from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./index.vue?vue&type=template&id=5eac5e84&scoped=true\"\nimport script from \"./index.vue?vue&type=script&lang=js\"\nexport * from \"./index.vue?vue&type=script&lang=js\"\nimport style0 from \"./index.vue?vue&type=style&index=0&id=5eac5e84&prod&scoped=true&lang=css\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"5eac5e84\",\n null\n \n)\n\nexport default component.exports","\n\n\n\n\n\n","import mod from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./withdrawalHistory.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./withdrawalHistory.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./withdrawalHistory.vue?vue&type=template&id=37492658&scoped=true\"\nimport script from \"./withdrawalHistory.vue?vue&type=script&lang=js\"\nexport * from \"./withdrawalHistory.vue?vue&type=script&lang=js\"\nimport style0 from \"./withdrawalHistory.vue?vue&type=style&index=0&id=37492658&prod&scoped=true&lang=css\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"37492658\",\n null\n \n)\n\nexport default component.exports","import Vue from 'vue'\r\nimport App from './App.vue'\r\nimport router from './router'\r\nimport store from './store'\r\nimport ElementUI from 'element-ui';\r\nimport 'element-ui/lib/theme-chalk/index.css';\r\n// 引入登录信息处理\r\n// import './utils/loginInfo.js';\r\n// 全局输入防表情守卫(极简、无侵入)\r\nimport { initNoEmojiGuard } from './utils/noEmojiGuard.js';\r\n\r\nconsole.log = ()=>{} //全局关闭打印\r\n\r\n\r\nVue.config.productionTip = false\r\nVue.use(ElementUI);\r\n// 初始化全局防表情拦截器\r\ninitNoEmojiGuard();\r\nconst vm = new Vue({\r\n router,\r\n store,\r\n render: h => h(App)\r\n}).$mount('#app')\r\n\r\n// 将 Vue 实例挂载到 window 上,供 request.js 等工具使用\r\nwindow.vm = vm\r\n","import mod from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./shopNew.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./shopNew.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./shopNew.vue?vue&type=template&id=462a5e76&scoped=true\"\nimport script from \"./shopNew.vue?vue&type=script&lang=js\"\nexport * from \"./shopNew.vue?vue&type=script&lang=js\"\nimport style0 from \"./shopNew.vue?vue&type=style&index=0&id=462a5e76&prod&scoped=true&lang=css\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"462a5e76\",\n null\n \n)\n\nexport default component.exports","\n\n\n\n","\n\n\n\n\n\n","import mod from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./sellerFundsFlow.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./sellerFundsFlow.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./sellerFundsFlow.vue?vue&type=template&id=68da2d3a&scoped=true\"\nimport script from \"./sellerFundsFlow.vue?vue&type=script&lang=js\"\nexport * from \"./sellerFundsFlow.vue?vue&type=script&lang=js\"\nimport style0 from \"./sellerFundsFlow.vue?vue&type=style&index=0&id=68da2d3a&prod&scoped=true&lang=css\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"68da2d3a\",\n null\n \n)\n\nexport default component.exports","import request from '../utils/request'\r\n\r\n//获取谷歌验证器二维码和密钥\r\nexport function getBindInfo(data) {\r\n return request({\r\n url: `/lease/auth/getBindInfo`,\r\n method: 'post',\r\n data\r\n })\r\n }\r\n\r\n\r\n //绑定谷歌验证码\r\nexport function bindGoogle(data) {\r\n return request({\r\n url: `/lease/auth/bindGoogle`,\r\n method: 'post',\r\n data\r\n })\r\n }\r\n\r\n \r\n //开启谷歌验证器 发送邮箱验证码\r\nexport function sendOpenGoogleCode(data) {\r\n return request({\r\n url: `/lease/auth/sendOpenGoogleCode`,\r\n method: 'post',\r\n data\r\n })\r\n }\r\n\r\n\r\n //关闭双重验证\r\nexport function closeStepTwo(data) {\r\n return request({\r\n url: `/lease/auth/closeStepTwo`,\r\n method: 'post',\r\n data\r\n })\r\n }\r\n\r\n \r\n //关闭谷歌验证器 发送邮箱验证码\r\nexport function sendCloseGoogleCode(data) {\r\n return request({\r\n url: `/lease/auth/sendCloseGoogleCode`,\r\n method: 'post',\r\n data\r\n })\r\n }\r\n\r\n //谷歌验证开启状态\r\nexport function getGoogleStatus(data) {\r\n return request({\r\n url: `/lease/auth/getGoogleStatus`,\r\n method: 'post',\r\n data\r\n })\r\n }\r\n\r\n\r\n //开启谷歌验证\r\nexport function openStepTwo(data) {\r\n return request({\r\n url: `/lease/auth/openStepTwo`,\r\n method: 'post',\r\n data\r\n })\r\n }","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"auth-container\"},[_vm._m(0),_c('div',{staticClass:\"auth-card\"},[_c('div',{staticClass:\"close-btn\",attrs:{\"title\":\"返回商城\"},on:{\"click\":_vm.goToShop}},[_c('i',{staticClass:\"el-icon-close\"})]),_vm._m(1),_c('el-form',{ref:\"registerForm\",staticClass:\"auth-form\",attrs:{\"model\":_vm.registerForm,\"rules\":_vm.registerRules},nativeOn:{\"submit\":function($event){$event.preventDefault();return _vm.handleRegister.apply(null, arguments)}}},[_c('el-form-item',{attrs:{\"prop\":\"email\"}},[_c('el-input',{attrs:{\"placeholder\":\"请输入邮箱\",\"prefix-icon\":\"el-icon-message\",\"size\":\"large\",\"clearable\":\"\"},model:{value:(_vm.registerForm.email),callback:function ($$v) {_vm.$set(_vm.registerForm, \"email\", $$v)},expression:\"registerForm.email\"}})],1),_c('el-form-item',{attrs:{\"prop\":\"code\"}},[_c('div',{staticClass:\"code-input-wrapper\"},[_c('el-input',{attrs:{\"placeholder\":\"请输入邮箱验证码\",\"prefix-icon\":\"el-icon-key\",\"size\":\"large\",\"maxlength\":\"10\",\"clearable\":\"\"},model:{value:(_vm.registerForm.code),callback:function ($$v) {_vm.$set(_vm.registerForm, \"code\", $$v)},expression:\"registerForm.code\"}}),_c('el-button',{staticClass:\"send-code-btn\",attrs:{\"type\":\"primary\",\"size\":\"large\",\"disabled\":_vm.countdown > 0,\"loading\":_vm.sendingCode},on:{\"click\":_vm.handleSendCode}},[_vm._v(\" \"+_vm._s(_vm.countdown > 0 ? `${_vm.countdown}秒后重试` : '获取验证码')+\" \")])],1)]),_c('el-form-item',{attrs:{\"prop\":\"password\"}},[_c('el-input',{attrs:{\"type\":\"password\",\"placeholder\":\"请输入密码(8-32位)\",\"prefix-icon\":\"el-icon-lock\",\"size\":\"large\",\"show-password\":\"\",\"clearable\":\"\"},model:{value:(_vm.registerForm.password),callback:function ($$v) {_vm.$set(_vm.registerForm, \"password\", $$v)},expression:\"registerForm.password\"}}),_c('div',{staticClass:\"password-tip\"},[_c('i',{staticClass:\"el-icon-info\"}),_c('span',[_vm._v(\"密码需包含大小写字母、数字和特殊字符,长度8-32位\")])]),(_vm.registerForm.password)?_c('div',{staticClass:\"password-strength\"},[_c('span',{staticClass:\"strength-label\"},[_vm._v(\"密码强度:\")]),_c('span',{class:['strength-bar', _vm.passwordStrengthClass]},[_vm._v(\" \"+_vm._s(_vm.passwordStrengthText)+\" \")])]):_vm._e()],1),_c('el-form-item',{attrs:{\"prop\":\"confirmPassword\"}},[_c('el-input',{attrs:{\"type\":\"password\",\"placeholder\":\"请再次输入密码\",\"prefix-icon\":\"el-icon-lock\",\"size\":\"large\",\"show-password\":\"\",\"clearable\":\"\"},nativeOn:{\"keyup\":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"enter\",13,$event.key,\"Enter\"))return null;return _vm.handleRegister.apply(null, arguments)}},model:{value:(_vm.registerForm.confirmPassword),callback:function ($$v) {_vm.$set(_vm.registerForm, \"confirmPassword\", $$v)},expression:\"registerForm.confirmPassword\"}})],1),_c('el-form-item',{attrs:{\"prop\":\"agree\"}},[_c('el-checkbox',{model:{value:(_vm.registerForm.agree),callback:function ($$v) {_vm.$set(_vm.registerForm, \"agree\", $$v)},expression:\"registerForm.agree\"}},[_vm._v(\" 我已阅读并同意 \"),_c('a',{staticClass:\"link-text\",attrs:{\"href\":\"#\"},on:{\"click\":function($event){$event.preventDefault();}}},[_vm._v(\"《用户协议》\")]),_vm._v(\" 和 \"),_c('a',{staticClass:\"link-text\",attrs:{\"href\":\"#\"},on:{\"click\":function($event){$event.preventDefault();}}},[_vm._v(\"《隐私政策》\")])])],1),_c('el-form-item',[_c('el-button',{staticClass:\"auth-submit-btn\",attrs:{\"type\":\"primary\",\"size\":\"large\",\"loading\":_vm.loading},on:{\"click\":_vm.handleRegister}},[_vm._v(\" \"+_vm._s(_vm.loading ? '注册中...' : '立即注册')+\" \")])],1),_c('div',{staticClass:\"auth-footer\"},[_c('span',{staticClass:\"footer-text\"},[_vm._v(\"已有账号?\")]),_c('router-link',{staticClass:\"link-text link-primary\",attrs:{\"to\":\"/login\"}},[_vm._v(\" 立即登录 \")])],1)],1)],1)])\n}\nvar staticRenderFns = [function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"auth-background\"},[_c('div',{staticClass:\"bg-circle circle-1\"}),_c('div',{staticClass:\"bg-circle circle-2\"}),_c('div',{staticClass:\"bg-circle circle-3\"})])\n},function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"auth-header\"},[_c('h1',{staticClass:\"auth-title\"},[_vm._v(\"欢迎注册\")]),_c('p',{staticClass:\"auth-subtitle\"},[_vm._v(\"创建您的 Power Leasing 账号\")])])\n}]\n\nexport { render, staticRenderFns }","\n\n\n\n","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{attrs:{\"id\":\"app\"}},[_c('router-view')],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n\r\n\r\n","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('el-container',{staticClass:\"containerApp\",staticStyle:{\"width\":\"100vw\",\"height\":\"100vh\"}},[_c('el-header',{staticClass:\"el-header\"},[_c('comHeard')],1),_c('el-main',{staticClass:\"el-main\"},[_c('appMain')],1)],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./purchasedMachineDetail.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./purchasedMachineDetail.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./purchasedMachineDetail.vue?vue&type=template&id=d056bf30&scoped=true\"\nimport script from \"./purchasedMachineDetail.vue?vue&type=script&lang=js\"\nexport * from \"./purchasedMachineDetail.vue?vue&type=script&lang=js\"\nimport style0 from \"./purchasedMachineDetail.vue?vue&type=style&index=0&id=d056bf30&prod&scoped=true&lang=css\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"d056bf30\",\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"panel\"},[_c('h2',{staticClass:\"panel-title\"},[_vm._v(\"我的店铺\")]),_c('div',{staticClass:\"panel-body\"},[_c('el-card',{staticClass:\"guide-card\",staticStyle:{\"margin-bottom\":\"16px\"},attrs:{\"shadow\":\"never\"}},[_c('div',{staticClass:\"guide-header\",attrs:{\"slot\":\"header\"},slot:\"header\"},[_vm._v(\"店铺层级说明\")]),_c('div',{staticClass:\"guide-content\"},[_c('p',{staticClass:\"hierarchy\"},[_vm._v(\"层级结构:店铺 → 商品 → 出售机器\")]),_c('ol',{staticClass:\"guide-steps\"},[_c('li',[_c('b',[_vm._v(\"店铺(唯一)\")]),_vm._v(\":每个用户在平台\"),_c('strong',[_vm._v(\"仅能创建一个店铺\")]),_vm._v(\"。创建成功后, 请在本页点击 \"),_c('b',[_vm._v(\"钱包绑定\")]),_vm._v(\",配置自己的收款地址(支持不同链与币种)。 \")]),_c('li',[_c('b',[_vm._v(\"创建商品\")]),_vm._v(\":完成钱包绑定后,即可在“我的店铺”页面 点击\"),_c('b',[_vm._v(\"新增商品\")]),_vm._v(\"按钮。 \"),_c('ul',{staticClass:\"guide-substeps\"},[_c('li',[_c('b',[_vm._v(\"ASIC 商品创建\")]),_vm._v(\":选择矿机种类为 ASIC,填写页面商品信息后创建,商品可按 \"),_c('b',[_vm._v(\"币种\")]),_vm._v(\" 进行分类管理,创建的商品会在商城对买家展示; 商品可理解为“不同算法、币种的机器集合分类”。 \")]),_c('li',[_c('b',[_vm._v(\"GPU 商品创建\")]),_vm._v(\":选择矿机种类为 GPU,查看页面注意事项并下载对应客户端,启动后读取自动创建。创建完成请进入 \"),_c('b',[_vm._v(\"商品列表\")]),_vm._v(\" 为该商品手动配置售价等相关信息并上架。 \")])])])]),_c('div',{staticClass:\"guide-note\"},[_vm._v(\"提示:建议先创建店铺 → 完成钱包绑定 → 创建商品的顺序,避免漏配导致无法收款或无法下单。\")])])]),(_vm.loaded && _vm.hasShop)?_c('el-card',{staticClass:\"shop-card\",attrs:{\"shadow\":\"hover\"}},[_c('div',{staticClass:\"shop-row\"},[_c('div',{staticClass:\"shop-cover\"},[_c('img',{attrs:{\"src\":_vm.shop.image || _vm.defaultCover,\"alt\":\"店铺封面\"}})]),_c('div',{staticClass:\"shop-info\"},[_c('div',{staticClass:\"shop-title\"},[_c('span',{staticClass:\"name\"},[_vm._v(_vm._s(_vm.shop.name || '未命名店铺'))]),_c('el-tag',{attrs:{\"size\":\"small\",\"type\":_vm.shopStateTagType}},[_vm._v(\" \"+_vm._s(_vm.shopStateText)+\" \")])],1),_c('div',{staticClass:\"desc\"},[_vm._v(_vm._s(_vm.shop.description || '这家店还没有描述~'))]),_c('div',{staticClass:\"meta\"},[_c('span',[_vm._v(\"手续费率:\"+_vm._s(_vm.formatFeeRate(_vm.shop.feeRate)))])]),_c('div',{staticClass:\"actions\"},[_c('el-button',{attrs:{\"size\":\"small\",\"type\":\"primary\"},on:{\"click\":_vm.handleOpenEdit}},[_vm._v(\"修改店铺\")]),_c('el-button',{attrs:{\"size\":\"small\",\"type\":\"warning\"},on:{\"click\":_vm.handleToggleShop}},[_vm._v(\" \"+_vm._s(_vm.shop.state === 2 ? '开启店铺' : '关闭店铺')+\" \")]),_c('el-button',{attrs:{\"size\":\"small\",\"type\":\"danger\"},on:{\"click\":_vm.handleDelete}},[_vm._v(\"删除店铺\")]),_c('el-button',{attrs:{\"size\":\"small\",\"type\":\"success\"},on:{\"click\":_vm.handleAddProduct}},[_vm._v(\"新增商品\")]),_c('el-button',{attrs:{\"size\":\"small\",\"type\":\"success\"},on:{\"click\":_vm.handleWalletBind}},[_vm._v(\"钱包绑定\")])],1)])])]):_vm._e(),(_vm.loaded && _vm.hasShop)?_c('el-card',{staticClass:\"shop-config-card\",staticStyle:{\"margin-top\":\"16px\"},attrs:{\"shadow\":\"never\"}},[_c('div',{staticClass:\"clearfix\",attrs:{\"slot\":\"header\"},slot:\"header\"},[_c('span',[_vm._v(\"已绑定钱包\")])]),_c('el-table',{staticStyle:{\"width\":\"100%\"},attrs:{\"data\":_vm.shopConfigs,\"border\":\"\"}},[_c('el-table-column',{attrs:{\"prop\":\"chain\",\"label\":\"链\",\"width\":\"120\"}}),_c('el-table-column',{attrs:{\"label\":\"支付币种\",\"width\":\"120\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('div',{staticClass:\"coin-list\"},[(Array.isArray(scope.row.children) && scope.row.children.length)?_vm._l((scope.row.children),function(c,idx){return _c('el-tooltip',{key:idx,attrs:{\"content\":String(c && c.payCoin ? c.payCoin : '').toUpperCase(),\"placement\":\"top\"}},[(c && c.image)?_c('img',{staticClass:\"coin-img\",attrs:{\"src\":c.image,\"alt\":(c.payCoin || '').toUpperCase()}}):_vm._e()])}):[_vm._v(\" \"+_vm._s(String(scope.row.payCoin || '').toUpperCase())+\" \")]],2)]}}],null,false,569036476)}),_c('el-table-column',{attrs:{\"prop\":\"payAddress\",\"label\":\"收款钱包地址\",\"show-overflow-tooltip\":\"\"}}),_c('el-table-column',{attrs:{\"label\":\"余额\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('span',{staticClass:\"balance-num\"},[_vm._v(_vm._s(_vm.formatAmount(scope.row)))]),_c('span',{staticClass:\"balance-unit\"},[_vm._v(\" \"+_vm._s(_vm.formatCoin(scope.row)))])]}}],null,false,59971880)}),_c('el-table-column',{attrs:{\"label\":\"操作\",\"width\":\"240\",\"fixed\":\"right\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('el-button',{staticStyle:{\"color\":\"#409EFF\"},attrs:{\"type\":\"text\"},on:{\"click\":function($event){return _vm.handleWithdraw(scope.row)}}},[_vm._v(\"提现\")]),_c('el-divider',{attrs:{\"direction\":\"vertical\"}}),_c('el-button',{attrs:{\"type\":\"text\"},on:{\"click\":function($event){return _vm.handleEditConfig(scope.row)}}},[_vm._v(\"修改\")]),_c('el-divider',{attrs:{\"direction\":\"vertical\"}}),_c('el-button',{staticStyle:{\"color\":\"#e74c3c\"},attrs:{\"type\":\"text\"},on:{\"click\":function($event){return _vm.handleDeleteConfig(scope.row)}}},[_vm._v(\"删除\")])]}}],null,false,1325460802)})],1)],1):(_vm.loaded && !_vm.hasShop)?_c('div',{staticClass:\"no-shop\"},[_c('el-empty',{attrs:{\"description\":\"暂无店铺\"}},[_c('el-button',{attrs:{\"type\":\"primary\"},on:{\"click\":_vm.handleGoNew}},[_vm._v(\"新建店铺\")])],1)],1):_c('el-empty',{attrs:{\"description\":\"正在加载店铺信息...\"}}),_c('el-dialog',{attrs:{\"title\":_vm.withdrawDialogTitle,\"visible\":_vm.withdrawDialogVisible,\"width\":\"720px\",\"close-on-click-modal\":false,\"close-on-press-escape\":false},on:{\"update:visible\":function($event){_vm.withdrawDialogVisible=$event}}},[_c('el-form',{ref:\"withdrawForm\",attrs:{\"model\":_vm.withdrawForm,\"rules\":_vm.withdrawRules,\"label-width\":\"120px\"}},[_c('el-form-item',{attrs:{\"label\":\"提现链\"}},[_c('el-input',{attrs:{\"value\":String((_vm.currentWithdrawRow.chain || '')).toUpperCase(),\"disabled\":true}})],1),_c('el-form-item',{attrs:{\"label\":\"提现币种\"}},[_c('el-input',{attrs:{\"value\":_vm.displayWithdrawSymbol,\"disabled\":true}})],1),_c('el-form-item',{attrs:{\"label\":\"提现金额\",\"prop\":\"amount\"}},[_c('el-input',{attrs:{\"placeholder\":\"请输入提现金额\",\"inputmode\":\"decimal\"},on:{\"input\":_vm.handleAmountInput},model:{value:(_vm.withdrawForm.amount),callback:function ($$v) {_vm.$set(_vm.withdrawForm, \"amount\", $$v)},expression:\"withdrawForm.amount\"}},[_c('template',{slot:\"append\"},[_vm._v(_vm._s(_vm.displayWithdrawSymbol))])],2),_c('div',{staticClass:\"balance-info\"},[_vm._v(\" 可用余额: \"+_vm._s(_vm.availableWithdrawBalance)+\" \"+_vm._s(_vm.displayWithdrawSymbol)+\" \")])],1),_c('el-form-item',{attrs:{\"label\":\"手续费\"}},[_c('el-input',{attrs:{\"disabled\":true},model:{value:(_vm.withdrawForm.fee),callback:function ($$v) {_vm.$set(_vm.withdrawForm, \"fee\", $$v)},expression:\"withdrawForm.fee\"}},[_c('template',{slot:\"append\"},[_vm._v(_vm._s(_vm.displayWithdrawSymbol))])],2),_c('div',{staticClass:\"fee-info\"},[_vm._v(\"网络手续费: \"+_vm._s(_vm.withdrawForm.fee || '0')+\" \"+_vm._s(_vm.displayWithdrawSymbol))])],1),_c('el-form-item',{attrs:{\"label\":\"实际到账\"}},[_c('el-input',{attrs:{\"value\":_vm.actualAmount,\"disabled\":true}},[_c('template',{slot:\"append\"},[_vm._v(_vm._s(_vm.displayWithdrawSymbol))])],2),_c('div',{staticClass:\"actual-amount-info\"},[_vm._v(\"实际到账: \"+_vm._s(_vm.actualAmount)+\" \"+_vm._s(_vm.displayWithdrawSymbol))])],1),_c('el-form-item',{attrs:{\"label\":\"收款地址\",\"prop\":\"toAddress\"}},[_c('el-input',{ref:\"withdrawToAddressInput\",attrs:{\"placeholder\":\"请输入收款钱包地址\",\"disabled\":!_vm.withdrawAddressEditable},model:{value:(_vm.withdrawForm.toAddress),callback:function ($$v) {_vm.$set(_vm.withdrawForm, \"toAddress\", $$v)},expression:\"withdrawForm.toAddress\"}},[_c('template',{slot:\"append\"},[_c('el-button',{attrs:{\"type\":\"text\"},on:{\"click\":_vm.handleEditAddressClick}},[_vm._v(\"修改\")])],1)],2),_c('div',{staticClass:\"address-tip\"},[_vm._v(\"请确认地址正确,错误地址将导致资产丢失\")])],1),_c('el-form-item',{attrs:{\"label\":\"谷歌验证码\",\"prop\":\"googleCode\"}},[_c('el-input',{attrs:{\"placeholder\":\"请输入6位谷歌验证码\",\"maxlength\":\"6\"},on:{\"input\":_vm.handleGoogleCodeInput},model:{value:(_vm.withdrawForm.googleCode),callback:function ($$v) {_vm.$set(_vm.withdrawForm, \"googleCode\", $$v)},expression:\"withdrawForm.googleCode\"}},[_c('template',{slot:\"prepend\"},[_c('i',{staticClass:\"el-icon-key\"})])],2)],1)],1),_c('div',{staticClass:\"dialog-footer\",attrs:{\"slot\":\"footer\"},slot:\"footer\"},[_c('el-button',{on:{\"click\":function($event){_vm.withdrawDialogVisible = false}}},[_vm._v(\"取消\")]),_c('el-button',{attrs:{\"type\":\"primary\",\"loading\":_vm.withdrawLoading},on:{\"click\":_vm.confirmWithdraw}},[_vm._v(\"确认提现\")])],1)],1),_c('el-dialog',{attrs:{\"title\":\"修改店铺\",\"visible\":_vm.visibleEdit,\"width\":\"520px\"},on:{\"update:visible\":function($event){_vm.visibleEdit=$event}}},[_c('div',{staticClass:\"row\"},[_c('label',{staticClass:\"label\"},[_vm._v(\"店铺名称\")]),_c('el-input',{attrs:{\"placeholder\":\"请输入店铺名称\",\"maxlength\":30,\"show-word-limit\":\"\"},model:{value:(_vm.editForm.name),callback:function ($$v) {_vm.$set(_vm.editForm, \"name\", $$v)},expression:\"editForm.name\"}})],1),_c('div',{staticClass:\"row\"},[_c('label',{staticClass:\"label\"},[_vm._v(\"店铺描述\")]),_c('el-input',{attrs:{\"type\":\"textarea\",\"rows\":3,\"placeholder\":\"请输入描述\",\"maxlength\":300,\"show-word-limit\":\"\"},model:{value:(_vm.editForm.description),callback:function ($$v) {_vm.$set(_vm.editForm, \"description\", $$v)},expression:\"editForm.description\"}})],1),_c('div',{staticClass:\"row\"},[_c('label',{staticClass:\"label\"},[_vm._v(\"手续费比例\")]),_c('el-input',{attrs:{\"placeholder\":\"比例区间 0.01 - 0.1 之间,最多6位小数\"},on:{\"input\":_vm.handleEditFeeRateInput},model:{value:(_vm.editForm.feeRate),callback:function ($$v) {_vm.$set(_vm.editForm, \"feeRate\", $$v)},expression:\"editForm.feeRate\"}})],1),_c('span',{staticClass:\"dialog-footer\",attrs:{\"slot\":\"footer\"},slot:\"footer\"},[_c('el-button',{on:{\"click\":function($event){_vm.visibleEdit=false}}},[_vm._v(\"取消\")]),_c('el-button',{attrs:{\"type\":\"primary\"},on:{\"click\":_vm.submitEdit}},[_vm._v(\"保存\")])],1)]),_c('el-dialog',{attrs:{\"title\":\"修改配置\",\"visible\":_vm.visibleConfigEdit,\"width\":\"560px\"},on:{\"update:visible\":function($event){_vm.visibleConfigEdit=$event},\"close\":_vm.handleConfigEditClose}},[_c('div',{staticClass:\"row\"},[_c('label',{staticClass:\"label\"},[_vm._v(\"钱包地址\")]),_c('el-input',{attrs:{\"placeholder\":\"请输入钱包地址\"},model:{value:(_vm.configForm.payAddress),callback:function ($$v) {_vm.$set(_vm.configForm, \"payAddress\", $$v)},expression:\"configForm.payAddress\"}})],1),_c('div',{staticClass:\"row\"},[_c('label',{staticClass:\"label\"},[_vm._v(\"谷歌验证码\")]),_c('el-input',{attrs:{\"placeholder\":\"请输入6位谷歌验证码\",\"maxlength\":\"6\"},on:{\"input\":_vm.handleConfigGoogleCodeInput},model:{value:(_vm.configForm.googleCode),callback:function ($$v) {_vm.$set(_vm.configForm, \"googleCode\", $$v)},expression:\"configForm.googleCode\"}},[_c('template',{slot:\"prepend\"},[_c('i',{staticClass:\"el-icon-key\"})])],2)],1),_c('span',{staticClass:\"dialog-footer\",attrs:{\"slot\":\"footer\"},slot:\"footer\"},[_c('el-button',{on:{\"click\":function($event){_vm.visibleConfigEdit=false}}},[_vm._v(\"取消\")]),_c('el-button',{attrs:{\"type\":\"primary\"},on:{\"click\":_vm.submitConfigEdit}},[_vm._v(\"确认修改\")])],1)])],1)])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{directives:[{name:\"loading\",rawName:\"v-loading\",value:(_vm.loading),expression:\"loading\"}],staticClass:\"cart-page\"},[_c('h1',{staticClass:\"page-title\"},[_vm._v(\"购物车\")]),(_vm.loading)?_c('div',{staticClass:\"loading\"},[_c('i',{staticClass:\"el-icon-loading\",attrs:{\"aria-label\":\"加载中\",\"role\":\"img\"}}),_vm._v(\" 加载中... \")]):(_vm.isCartEmpty)?_c('div',{staticClass:\"empty-cart\"},[_c('div',{staticClass:\"empty-icon\"},[_vm._v(\"🛒\")]),_c('h2',[_vm._v(\"购物车是空的\")]),_c('p',[_vm._v(\"快去添加一些商品吧!\")]),_c('router-link',{staticClass:\"shop-now-btn\",attrs:{\"to\":\"/productList\"}},[_vm._v(\" 去购物 \")])],1):_c('div',{staticClass:\"cart-content\"},[_c('p',{staticStyle:{\"color\":\"#9E44F1\",\"font-size\":\"14px\",\"margin-bottom\":\"10px\"}},[_vm._v(\"注意:各店铺支持多种支付方式,请选择店铺支付方式后提交订单结算\")]),_c('el-table',{ref:\"shopTable\",staticStyle:{\"width\":\"100%\"},attrs:{\"data\":_vm.shops,\"border\":\"\",\"row-key\":'id',\"expand-row-keys\":_vm.expandedShopKeys,\"header-cell-style\":{ textAlign: 'left' },\"cell-style\":{ textAlign: 'left' }},on:{\"expand-change\":_vm.handleGuardExpand}},[_c('el-table-column',{attrs:{\"type\":\"expand\",\"width\":\"46\",\"expandable\":() => false},scopedSlots:_vm._u([{key:\"default\",fn:function(shopScope){return [_c('el-table',{ref:'innerTable-' + shopScope.row.id,staticStyle:{\"width\":\"100%\"},attrs:{\"data\":shopScope.row.productMachineDtoList || [],\"size\":\"small\",\"border\":\"\",\"row-key\":'id',\"reserve-selection\":\"\",\"row-class-name\":_vm.getMachineRowClassName,\"header-cell-style\":{ textAlign: 'left' },\"cell-style\":{ textAlign: 'left' }},on:{\"selection-change\":sels => _vm.handleShopInnerSelectionChange(shopScope.row, sels)}},[_c('el-table-column',{attrs:{\"type\":\"selection\",\"width\":\"46\",\"selectable\":row => _vm.isRowSelectableByShop(shopScope.row, row)}}),_c('el-table-column',{attrs:{\"prop\":\"name\",\"label\":\"商品名称\"}}),_c('el-table-column',{attrs:{\"prop\":\"type\",\"label\":\"矿机种类\",\"width\":\"80\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('el-tag',{class:['type-tag', _vm.typeClass(scope.row.type)],attrs:{\"disable-transitions\":\"\"}},[_vm._v(\" \"+_vm._s(_vm.formatMachineType(scope.row.type))+\" \")])]}}],null,true)}),_c('el-table-column',{attrs:{\"prop\":\"id\",\"label\":\"机器ID\",\"width\":\"80\"}}),_c('el-table-column',{attrs:{\"prop\":\"algorithm\",\"label\":\"最大收益算法\"}}),_c('el-table-column',{attrs:{\"label\":\"可售数量\",\"min-width\":\"40\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_vm._v(\" \"+_vm._s(Number(scope.row.canSaleNumbers || 0))+\" \")]}}],null,true)}),_c('el-table-column',{attrs:{\"label\":\"购买数量\",\"min-width\":\"80\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('el-input-number',{attrs:{\"min\":1,\"max\":_vm.getRowMaxPurchaseForCart(scope.row),\"precision\":0,\"step\":1,\"size\":\"mini\",\"controls\":false,\"disabled\":Number(scope.row.type) === 1},on:{\"change\":val => _vm.handleNumbersChange(scope.row, val)},model:{value:(scope.row.numbers),callback:function ($$v) {_vm.$set(scope.row, \"numbers\", $$v)},expression:\"scope.row.numbers\"}})]}}],null,true)}),_c('el-table-column',{attrs:{\"label\":\"最大可租(天)\",\"min-width\":\"50\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_vm._v(_vm._s(scope.row.maxLeaseDays != null ? scope.row.maxLeaseDays : ''))]}}],null,true)}),_c('el-table-column',{attrs:{\"label\":\"租赁天数\",\"width\":\"145\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('el-input-number',{attrs:{\"min\":1,\"max\":_vm.getRowMaxLeaseDaysLocal(scope.row),\"precision\":0,\"step\":1,\"size\":\"mini\",\"controls-position\":\"right\"},on:{\"change\":function($event){return _vm.handleLeaseTimeChange(scope.row)},\"input\":function($event){return _vm.handleLeaseTimeInput(scope.row, $event)}},model:{value:(scope.row.leaseTime),callback:function ($$v) {_vm.$set(scope.row, \"leaseTime\", $$v)},expression:\"scope.row.leaseTime\"}})]}}],null,true)}),_c('el-table-column',{attrs:{\"prop\":\"price\",\"width\":\"120\"},scopedSlots:_vm._u([{key:\"header\",fn:function(){return [_vm._v(\"单价(\"+_vm._s(_vm.getSelectedCoinSymbolForShop(shopScope.row) || 'USDT')+\")\")]},proxy:true},{key:\"default\",fn:function(scope){return [(_vm.getMachineUnitPriceBySelection(shopScope.row, scope.row) != null)?[_c('span',{staticClass:\"price-strong\"},[(_vm.formatAmount(_vm.getMachineUnitPriceBySelection(shopScope.row, scope.row), _vm.getSelectedCoinSymbolForShop(shopScope.row)).truncated)?_c('el-tooltip',{attrs:{\"content\":_vm.formatAmount(_vm.getMachineUnitPriceBySelection(shopScope.row, scope.row), _vm.getSelectedCoinSymbolForShop(shopScope.row)).full,\"placement\":\"top\"}},[_c('span',[_vm._v(\" \"+_vm._s(_vm.formatAmount(_vm.getMachineUnitPriceBySelection(shopScope.row, scope.row), _vm.getSelectedCoinSymbolForShop(shopScope.row)).text)+\" \"),_c('i',{staticClass:\"el-icon-more amount-more\"})])]):_c('span',[_vm._v(\" \"+_vm._s(_vm.formatAmount(_vm.getMachineUnitPriceBySelection(shopScope.row, scope.row), _vm.getSelectedCoinSymbolForShop(shopScope.row)).text)+\" \")])],1)]:[_vm._v(\"-\")]]}}],null,true)}),_c('el-table-column',{attrs:{\"label\":\"机器状态\",\"width\":\"110\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('el-tag',{attrs:{\"type\":(Number(scope.row.del) === 1 || Number(scope.row.state) === 1) ? 'info' : 'success'}},[_vm._v(\" \"+_vm._s((Number(scope.row.del) === 1 || Number(scope.row.state) === 1) ? '下架' : '上架')+\" \")])]}}],null,true)}),_c('el-table-column',{attrs:{\"min-width\":\"120\"},scopedSlots:_vm._u([{key:\"header\",fn:function(){return [_vm._v(\"机器总价(\"+_vm._s(_vm.getSelectedCoinSymbolForShop(shopScope.row) || 'USDT')+\")\")]},proxy:true},{key:\"default\",fn:function(scope){return [(_vm.getMachineUnitPriceBySelection(shopScope.row, scope.row) != null)?[_c('span',{staticClass:\"price-strong\"},[(_vm.formatAmount(_vm.getMachineUnitPriceBySelection(shopScope.row, scope.row) * Number(scope.row.leaseTime || 1), _vm.getSelectedCoinSymbolForShop(shopScope.row)).truncated)?_c('el-tooltip',{attrs:{\"content\":_vm.formatAmount(_vm.getMachineUnitPriceBySelection(shopScope.row, scope.row) * Number(scope.row.leaseTime || 1), _vm.getSelectedCoinSymbolForShop(shopScope.row)).full,\"placement\":\"top\"}},[_c('span',[_vm._v(\" \"+_vm._s(_vm.formatAmount(_vm.getMachineUnitPriceBySelection(shopScope.row, scope.row) * Number(scope.row.leaseTime || 1), _vm.getSelectedCoinSymbolForShop(shopScope.row)).text)+\" \"),_c('i',{staticClass:\"el-icon-more amount-more\"})])]):_c('span',[_vm._v(\" \"+_vm._s(_vm.formatAmount(_vm.getMachineUnitPriceBySelection(shopScope.row, scope.row) * Number(scope.row.leaseTime || 1), _vm.getSelectedCoinSymbolForShop(shopScope.row)).text)+\" \")])],1)]:[_vm._v(\"-\")]]}}],null,true)})],1)]}}])}),_c('el-table-column',{attrs:{\"prop\":\"name\",\"label\":\"店铺名称\"}}),_c('el-table-column',{attrs:{\"prop\":\"totalMachine\",\"label\":\"机器总数\"}}),_c('el-table-column',{attrs:{\"prop\":\"totalPrice\"},scopedSlots:_vm._u([{key:\"header\",fn:function(){return [_vm._v(\" 总价(\"+_vm._s(_vm.getSelectedCoinSymbolForShopHeader())+\") \")]},proxy:true},{key:\"default\",fn:function(scope){return [_c('span',{staticClass:\"price-strong\"},[(_vm.formatAmount(_vm.displayShopTotalBySelection(scope.row), _vm.getSelectedCoinSymbolForShop(scope.row)).truncated)?_c('el-tooltip',{attrs:{\"content\":_vm.formatAmount(_vm.displayShopTotalBySelection(scope.row), _vm.getSelectedCoinSymbolForShop(scope.row)).full,\"placement\":\"top\"}},[_c('span',[_vm._v(\" \"+_vm._s(_vm.formatAmount(_vm.displayShopTotalBySelection(scope.row), _vm.getSelectedCoinSymbolForShop(scope.row)).text)+\" \"),_c('i',{staticClass:\"el-icon-more amount-more\"})])]):_c('span',[_vm._v(\" \"+_vm._s(_vm.formatAmount(_vm.displayShopTotalBySelection(scope.row), _vm.getSelectedCoinSymbolForShop(scope.row)).text)+\" \")])],1)]}}])}),_c('el-table-column',{attrs:{\"label\":\"支付方式\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('el-select',{staticStyle:{\"min-width\":\"180px\"},attrs:{\"placeholder\":\"请选择\",\"size\":\"mini\"},on:{\"change\":val => _vm.handleShopPayChange(scope.row, val)},scopedSlots:_vm._u([{key:\"prefix\",fn:function(){return [(_vm.getSelectedPayIcon(scope.row))?_c('img',{staticStyle:{\"width\":\"16px\",\"height\":\"16px\",\"margin-right\":\"6px\",\"border-radius\":\"3px\"},attrs:{\"src\":_vm.getSelectedPayIcon(scope.row),\"alt\":_vm.getSelectedCoinSymbolForShop(scope.row)}}):_vm._e()]},proxy:true}],null,true),model:{value:(_vm.paySelectionMap[scope.row.id]),callback:function ($$v) {_vm.$set(_vm.paySelectionMap, scope.row.id, $$v)},expression:\"paySelectionMap[scope.row.id]\"}},_vm._l((_vm.getShopPayOptions(scope.row)),function(opt,idx){return _c('el-option',{key:idx,attrs:{\"value\":opt.value,\"label\":opt.label}},[_c('div',{staticStyle:{\"display\":\"flex\",\"align-items\":\"center\",\"gap\":\"8px\"}},[_c('img',{staticStyle:{\"width\":\"18px\",\"height\":\"18px\",\"border-radius\":\"3px\"},attrs:{\"src\":opt.icon,\"alt\":opt.label}}),_c('span',[_vm._v(_vm._s(opt.label))])])])}),1)]}}])})],1),_c('div',{staticClass:\"summary-actions\",staticStyle:{\"margin-top\":\"16px\",\"display\":\"flex\",\"gap\":\"12px\",\"justify-content\":\"flex-end\"}},[_c('div',{staticClass:\"summary-inline\",staticStyle:{\"color\":\"#666\"}},[_vm._v(\" 已选机器:\"),_c('b',[_vm._v(_vm._s(_vm.selectedMachineCount))]),_vm._v(\" 台 \"),_c('span',{staticStyle:{\"margin-left\":\"12px\"}},[_vm._v(\"金额合计:\")]),(Object.keys(_vm.selectedTotalByCoin || {}).length)?_vm._l((_vm.selectedTotalByCoin),function(amt,coin){return _c('span',{key:coin,staticStyle:{\"margin-left\":\"8px\"}},[_c('span',{staticClass:\"price-strong\"},[(_vm.formatAmount(amt, coin).truncated)?_c('el-tooltip',{attrs:{\"content\":_vm.formatAmount(amt, coin).full,\"placement\":\"top\"}},[_c('span',[_vm._v(\" \"+_vm._s(coin)+\": \"+_vm._s(_vm.formatAmount(amt, coin).text)+\" \"),_c('i',{staticClass:\"el-icon-more amount-more\"})])]):_c('span',[_vm._v(_vm._s(coin)+\": \"+_vm._s(_vm.formatAmount(amt, coin).text))])],1)])}):[_c('span',{staticClass:\"price-strong\"},[_vm._v(\"-\")])]],2),_c('div',{staticClass:\"actions-inline\",staticStyle:{\"display\":\"flex\",\"gap\":\"12px\"}},[_c('el-button',{attrs:{\"type\":\"danger\",\"disabled\":!_vm.selectedMachineCount},on:{\"click\":_vm.handleRemoveSelectedMachines}},[_vm._v(\"删除所选机器\")]),_c('el-button',{attrs:{\"type\":\"warning\",\"plain\":\"\",\"loading\":_vm.clearOffLoading},on:{\"click\":_vm.handleClearOffShelf}},[_vm._v(\"清除已下架商品\")]),_c('el-button',{attrs:{\"type\":\"primary\",\"disabled\":!_vm.selectedMachineCount},on:{\"click\":_vm.handleCheckoutSelected}},[_vm._v(\"结算选中机器\")])],1)]),_c('el-dialog',{attrs:{\"visible\":_vm.confirmDialog.visible,\"width\":\"80vw\",\"close-on-click-modal\":false,\"title\":`确认结算(共 ${_vm.confirmDialog.count} 台机器)`},on:{\"update:visible\":function($event){return _vm.$set(_vm.confirmDialog, \"visible\", $event)}},scopedSlots:_vm._u([{key:\"footer\",fn:function(){return [_c('el-button',{on:{\"click\":_vm.handleConfirmDialogPrev}},[_vm._v(\"上一步\")]),_c('el-button',{on:{\"click\":function($event){_vm.confirmDialog.visible=false}}},[_vm._v(\"取消\")]),_c('el-button',{attrs:{\"type\":\"primary\"},on:{\"click\":_vm.confirmPay}},[_vm._v(\"确认结算\")])]},proxy:true}])},[_c('div',[_vm._l((_vm.confirmDialog.shops),function(grp){return _c('div',{key:grp.shopId,staticStyle:{\"margin-bottom\":\"18px\"}},[_c('div',{staticStyle:{\"display\":\"flex\",\"align-items\":\"center\",\"justify-content\":\"space-between\",\"margin\":\"8px 0 6px 0\"}},[_c('div',{staticStyle:{\"font-weight\":\"600\",\"color\":\"#2c3e50\"}},[_vm._v(\" 店铺:\"+_vm._s(grp.shopName || grp.shopId)+\" \"),_c('span',{staticStyle:{\"margin-left\":\"12px\",\"color\":\"#666\",\"font-weight\":\"400\"}},[_vm._v(\"支付方式:\"+_vm._s(grp.payLabel))])]),_c('div',[(grp.coinSymbol)?[(grp.enough)?_c('span',{staticStyle:{\"color\":\"#16a34a\",\"font-weight\":\"600\"}},[_vm._v(\" 已满足起付额 \"+_vm._s(_vm.formatAmount(grp.deductibleAmount || 0, grp.coinSymbol).text)+\" \")]):_c('span',{staticStyle:{\"color\":\"#ef4444\",\"font-weight\":\"600\"}},[_vm._v(\" 金额不足最低起付额 \"+_vm._s(_vm.formatAmount(grp.deductibleAmount || 0, grp.coinSymbol).text)+\" ,收取手续费 \"+_vm._s(_vm.formatAmount(grp.fee || 0, grp.coinSymbol).text)+\" \")])]:_vm._e()],2)]),_c('el-table',{attrs:{\"data\":grp.items,\"max-height\":\"260\",\"border\":\"\",\"stripe\":\"\",\"header-cell-style\":{ textAlign: 'left' },\"cell-style\":{ textAlign: 'left' }}},[_c('el-table-column',{attrs:{\"label\":\"矿机种类\",\"min-width\":\"120\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('el-tag',{class:['type-tag', _vm.typeClass(scope.row.type)],staticStyle:{\"font-size\":\"14px\"},attrs:{\"disable-transitions\":\"\"}},[_vm._v(\" \"+_vm._s(_vm.formatMachineType(scope.row.type))+\" \")])]}}],null,true)}),_c('el-table-column',{attrs:{\"prop\":\"id\",\"label\":\"机器ID\",\"min-width\":\"160\"}}),_c('el-table-column',{attrs:{\"prop\":\"algorithm\",\"label\":\"最大收益算法\",\"min-width\":\"140\"}}),_c('el-table-column',{attrs:{\"prop\":\"unitPrice\",\"min-width\":\"140\"},scopedSlots:_vm._u([{key:\"header\",fn:function(){return [_vm._v(\"单价(\"+_vm._s(grp.coinSymbol || 'USDT')+\")\")]},proxy:true},{key:\"default\",fn:function(scope){return [_c('span',{staticClass:\"price-strong\"},[(_vm.formatAmount(scope.row.unitPrice, grp.coinSymbol).truncated)?_c('el-tooltip',{attrs:{\"content\":_vm.formatAmount(scope.row.unitPrice, grp.coinSymbol).full,\"placement\":\"top\"}},[_c('span',[_vm._v(\" \"+_vm._s(_vm.formatAmount(scope.row.unitPrice, grp.coinSymbol).text)+\" \"),_c('i',{staticClass:\"el-icon-more amount-more\"})])]):_c('span',[_vm._v(_vm._s(_vm.formatAmount(scope.row.unitPrice, grp.coinSymbol).text))])],1)]}}],null,true)}),_c('el-table-column',{attrs:{\"prop\":\"leaseTime\",\"label\":\"租赁天数\",\"min-width\":\"120\"}}),_c('el-table-column',{attrs:{\"prop\":\"numbers\",\"label\":\"购买数量\",\"min-width\":\"120\"}}),_c('el-table-column',{attrs:{\"prop\":\"subtotal\",\"min-width\":\"140\"},scopedSlots:_vm._u([{key:\"header\",fn:function(){return [_vm._v(\"小计(\"+_vm._s(grp.coinSymbol || 'USDT')+\")\")]},proxy:true},{key:\"default\",fn:function(scope){return [_c('span',{staticClass:\"price-strong\"},[(_vm.formatAmount(scope.row.subtotal, grp.coinSymbol).truncated)?_c('el-tooltip',{attrs:{\"content\":_vm.formatAmount(scope.row.subtotal, grp.coinSymbol).full,\"placement\":\"top\"}},[_c('span',[_vm._v(\" \"+_vm._s(_vm.formatAmount(scope.row.subtotal, grp.coinSymbol).text)+\" \"),_c('i',{staticClass:\"el-icon-more amount-more\"})])]):_c('span',[_vm._v(_vm._s(_vm.formatAmount(scope.row.subtotal, grp.coinSymbol).text))])],1)]}}],null,true)})],1)],1)}),_c('div',{staticStyle:{\"margin-top\":\"12px\",\"text-align\":\"right\"}},[_c('span',{staticStyle:{\"margin-right\":\"8px\"}},[_vm._v(\"总金额:\")]),(Object.keys(_vm.confirmDialog.totalsByCoin || {}).length)?_vm._l((_vm.confirmDialog.totalsByCoin),function(amt,coin){return _c('span',{key:coin,staticStyle:{\"margin-left\":\"12px\"}},[_vm._v(\" \"+_vm._s(coin)+\": \"),_c('span',{staticClass:\"price-strong\"},[(_vm.formatAmount(amt, coin).truncated)?_c('el-tooltip',{attrs:{\"content\":_vm.formatAmount(amt, coin).full,\"placement\":\"top\"}},[_c('span',[_vm._v(\" \"+_vm._s(_vm.formatAmount(amt, coin).text)+\" \"),_c('i',{staticClass:\"el-icon-more amount-more\"})])]):_c('span',[_vm._v(_vm._s(_vm.formatAmount(amt, coin).text))])],1)])}):[_vm._v(\"-\")]],2)],2)]),_c('el-dialog',{attrs:{\"visible\":_vm.noticeDialog.visible,\"width\":\"60vw\",\"title\":\"下单须知\",\"show-close\":false,\"close-on-click-modal\":false,\"close-on-press-escape\":false},on:{\"update:visible\":function($event){return _vm.$set(_vm.noticeDialog, \"visible\", $event)}},scopedSlots:_vm._u([{key:\"footer\",fn:function(){return [_c('el-button',{attrs:{\"type\":\"primary\",\"disabled\":_vm.noticeDialog.countdown > 0},on:{\"click\":_vm.handleNoticeAcknowledge}},[_vm._v(\" 同意并下单\"+_vm._s(_vm.noticeDialog.countdown > 0 ? `(${_vm.noticeDialog.countdown}s)` : '')+\" \")])]},proxy:true}])},[_c('div',{staticClass:\"notice-content\"},[_c('p',{staticClass:\"notice-title\"},[_vm._v(\"尊敬的客户,感谢您选择我们的服务。在您下单前,请务必仔细阅读并完全理解以下须知条款。一旦您点击\\\" 同意并下单\\\"或完成支付流程,即视为您已充分阅读、理解并同意接受本须知的全部内容约束。\")]),_c('ol',{staticClass:\"notice-list\"},[_c('li',[_c('b',[_vm._v(\"预授权冻结:\")]),_vm._v(\"为保障订单顺利执行,在下单成功后,系统将立即对您数字钱包或账户中与订单全款总额等值的资金进行预授权冻结。此操作并非即时划转,而是为确保您有足够的资金用于每日支付。\")]),_c('li',[_c('b',[_vm._v(\"每日结算支付:\")]),_vm._v(\"本服务采用\\\"按日结算\\\"模式。冻结的资金将根据租赁协议约定的每日费用,每日自动划转相应的金额给卖家。划转操作通常在每个UTC日结束时自动执行。\")]),_c('li',[_c('b',[_vm._v(\"资金解冻:\")]),_vm._v(\"当租赁服务到期或因其他原因终止后,系统中剩余的、未被划转的冻结资金将立即解除冻结,并返还至您的可用余额中。\")]),_c('li',[_c('b',[_vm._v(\"订单生效:\")]),_vm._v(\" 您的订单在支付流程完成且资金成功冻结后立即生效。系统将开始为您配置相应的矿机或算力资源。\")]),_c('li',[_c('b',[_vm._v(\"不可取消政策:\")]),_vm._v(\" 鉴于算力服务一经提供即无法退回的特性,所有订单一旦生效,即不可取消、不可退款、不可转让。您无法在租赁期内单方面中止服务或要求退还已冻结及已支付的费用。\")]),_c('li',[_c('b',[_vm._v(\"免责声明:\")]),_vm._v(\"因不可抗力(如自然灾害、政策变动等)导致订单延迟或无法履行,我们不承担相应责任。\")]),_c('li',[_c('b',[_vm._v(\"算力波动:\")]),_vm._v(\"您所租赁的算力产生的收益取决于区块链网络难度、全球总算力、币价波动、矿池运气等多种外部因素。我们仅提供稳定的算力输出,不对您的最终收益做出任何承诺或保证。\")])]),_c('p',{staticClass:\"notice-title\"},[_vm._v(\"再次提醒:数字资产挖矿存在较高市场风险,收益波动巨大,过去业绩不代表未来表现。请根据自身的风险承受能力谨慎决策。您下单的行为即代表您已充分了解并自愿承担所有相关风险。\")]),_c('div',{staticClass:\"notice-ack\"},[_c('el-checkbox',{staticStyle:{\"color\":\"#e74c3c\"},model:{value:(_vm.noticeDialog.checked),callback:function ($$v) {_vm.$set(_vm.noticeDialog, \"checked\", $$v)},expression:\"noticeDialog.checked\"}},[_vm._v(\"我已阅读并同意上述注意事项\")])],1)])]),_c('el-dialog',{attrs:{\"visible\":_vm.configDialog.visible,\"width\":\"80vw\",\"title\":\"矿机配置\",\"close-on-click-modal\":false,\"close-on-press-escape\":false},on:{\"update:visible\":function($event){return _vm.$set(_vm.configDialog, \"visible\", $event)}},scopedSlots:_vm._u([{key:\"footer\",fn:function(){return [_c('el-button',{on:{\"click\":_vm.handleConfigPrev}},[_vm._v(\"上一步\")]),_c('el-button',{on:{\"click\":_vm.handleConfigCancel}},[_vm._v(\"取消\")]),_c('el-button',{attrs:{\"type\":\"primary\"},on:{\"click\":_vm.handleConfigConfirm}},[_vm._v(\" \"+_vm._s(_vm.unconfiguredMachinesList.length > 0 ? '确认配置' : '下一步')+\" \")])]},proxy:true}])},[_c('div',[(_vm.configDialog.selectedMachines && _vm.configDialog.selectedMachines.length > 0)?_c('div',[_c('div',{staticStyle:{\"display\":\"flex\",\"align-items\":\"center\",\"gap\":\"12px\",\"margin-bottom\":\"12px\"}},[_c('div',{staticStyle:{\"font-weight\":\"600\",\"color\":\"#2c3e50\"}},[_vm._v(\"选择币种/算法\")]),_c('el-cascader',{staticStyle:{\"min-width\":\"320px\"},attrs:{\"options\":_vm.configDialog.coinAlgoOptions,\"props\":{ checkStrictly: false },\"clearable\":\"\",\"placeholder\":\"请选择币种与算法\",\"size\":\"small\"},on:{\"change\":_vm.handleCoinAlgoChange},model:{value:(_vm.configDialog.coinAlgoValue),callback:function ($$v) {_vm.$set(_vm.configDialog, \"coinAlgoValue\", $$v)},expression:\"configDialog.coinAlgoValue\"}}),_c('div',{staticStyle:{\"font-weight\":\"600\",\"color\":\"#2c3e50\",\"white-space\":\"nowrap\"}},[_vm._v(\"选择矿池/模型\")]),_c('el-cascader',{staticStyle:{\"width\":\"240px\"},attrs:{\"options\":_vm.configDialog.poolOptions,\"props\":{ checkStrictly: false },\"clearable\":\"\",\"placeholder\":\"请选择矿池与模型\",\"size\":\"small\",\"disabled\":!_vm.configDialog.coinAlgoValue || _vm.configDialog.coinAlgoValue.length !== 2},on:{\"change\":_vm.handlePoolValueChange},model:{value:(_vm.configDialog.poolValue),callback:function ($$v) {_vm.$set(_vm.configDialog, \"poolValue\", $$v)},expression:\"configDialog.poolValue\"}})],1),(_vm.unconfiguredMachinesList.length > 0)?_c('div',[_c('div',{staticStyle:{\"font-weight\":\"600\",\"color\":\"#2c3e50\",\"margin-bottom\":\"8px\",\"font-size\":\"14px\"}},[(!_vm.configDialog.coinAlgoValue || _vm.configDialog.coinAlgoValue.length !== 2)?[_vm._v(\" 待配置机器(共 \"+_vm._s(_vm.unconfiguredMachinesList.length)+\" 台) \")]:[_vm._v(\" 支持该币种/算法的机器(共 \"+_vm._s(_vm.unconfiguredMachinesList.length)+\" 台) \")]],2),_c('el-table',{ref:\"configTable\",attrs:{\"data\":_vm.unconfiguredMachinesList,\"max-height\":\"300\",\"border\":\"\",\"stripe\":\"\",\"row-key\":\"id\",\"reserve-selection\":\"\",\"header-cell-style\":{ textAlign: 'left', fontSize: '14px' },\"cell-style\":{ textAlign: 'left', fontSize: '14px' }},on:{\"selection-change\":_vm.handleConfigSelectionChange}},[_c('el-table-column',{attrs:{\"type\":\"selection\",\"width\":\"46\"}}),_c('el-table-column',{attrs:{\"label\":\"矿机种类\",\"width\":\"120\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('el-tag',{class:['type-tag', _vm.typeClass(scope.row.type)],staticStyle:{\"font-size\":\"14px\"},attrs:{\"disable-transitions\":\"\"}},[_vm._v(\" \"+_vm._s(_vm.formatMachineType(scope.row.type))+\" \")])]}}],null,false,2555332731)}),_c('el-table-column',{attrs:{\"prop\":\"id\",\"label\":\"机器ID\",\"width\":\"120\"}}),_c('el-table-column',{attrs:{\"prop\":\"algorithm\",\"label\":\"最大收益算法\",\"min-width\":\"140\"}}),(_vm.getCurrentWalletMining() !== null)?_c('el-table-column',{attrs:{\"label\":\"矿工号\",\"min-width\":\"160\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('el-input',{attrs:{\"placeholder\":\"矿工号\",\"size\":\"mini\",\"clearable\":\"\",\"maxlength\":\"40\"},on:{\"input\":val => _vm.handleMachineWorkerIdInput(scope.row, val)},model:{value:(scope.row._workerId),callback:function ($$v) {_vm.$set(scope.row, \"_workerId\", $$v)},expression:\"scope.row._workerId\"}})]}}],null,false,46571769)}):_vm._e()],1)],1):_vm._e(),(_vm.getCurrentWalletMining() !== null)?_c('div',{staticStyle:{\"margin-top\":\"16px\"}},[(_vm.getCurrentWalletMining() === true)?_c('div',{staticStyle:{\"display\":\"flex\",\"align-items\":\"center\",\"gap\":\"12px\"}},[_c('label',{staticStyle:{\"font-weight\":\"600\",\"color\":\"#2c3e50\",\"min-width\":\"100px\"}},[_vm._v(\"钱包地址:\")]),_c('el-input',{staticStyle:{\"flex\":\"1\",\"max-width\":\"500px\"},attrs:{\"placeholder\":\"请输入钱包地址\",\"clearable\":\"\",\"maxlength\":\"95\"},on:{\"input\":_vm.handleWalletAddressInput},model:{value:(_vm.configDialog.walletAddress),callback:function ($$v) {_vm.$set(_vm.configDialog, \"walletAddress\", $$v)},expression:\"configDialog.walletAddress\"}})],1):_vm._e(),(_vm.getCurrentWalletMining() === false)?_c('div',{staticStyle:{\"display\":\"flex\",\"align-items\":\"center\",\"gap\":\"12px\"}},[_c('label',{staticStyle:{\"font-weight\":\"600\",\"color\":\"#2c3e50\",\"min-width\":\"100px\"}},[_vm._v(\"挖矿账户:\")]),_c('el-input',{staticStyle:{\"flex\":\"1\",\"max-width\":\"500px\"},attrs:{\"placeholder\":\"请输入挖矿账户\",\"clearable\":\"\",\"maxlength\":\"40\"},on:{\"input\":_vm.handleMiningAccountInput},model:{value:(_vm.configDialog.miningAccount),callback:function ($$v) {_vm.$set(_vm.configDialog, \"miningAccount\", $$v)},expression:\"configDialog.miningAccount\"}})],1):_vm._e()]):(_vm.configDialog.coinAlgoValue && _vm.configDialog.coinAlgoValue.length === 2 && _vm.getCurrentWalletMining() === null)?_c('div',{staticStyle:{\"margin-top\":\"16px\",\"color\":\"#909399\",\"font-size\":\"14px\"}},[_vm._v(\" 请先选择矿池/模型 \")]):(_vm.configDialog.coinAlgoValue && _vm.configDialog.coinAlgoValue.length === 2 && _vm.unconfiguredMachinesList.length === 0)?_c('div',{staticStyle:{\"margin-bottom\":\"12px\",\"color\":\"#909399\",\"font-size\":\"14px\"}},[_vm._v(\" 当前选择的币种/算法下没有可配置的机器 \")]):_vm._e(),(_vm.unsupportedMachinesList.length > 0)?_c('div',{staticStyle:{\"margin-top\":\"16px\"}},[_c('div',{staticStyle:{\"font-weight\":\"600\",\"color\":\"#f56c6c\",\"margin-bottom\":\"8px\",\"font-size\":\"14px\"}},[_vm._v(\" 不支持该币种/算法的机器(共 \"+_vm._s(_vm.unsupportedMachinesList.length)+\" 台) \")]),_c('el-table',{attrs:{\"data\":_vm.unsupportedMachinesList,\"max-height\":\"200\",\"border\":\"\",\"stripe\":\"\",\"header-cell-style\":{ textAlign: 'left', fontSize: '14px' },\"cell-style\":{ textAlign: 'left', fontSize: '14px' }}},[_c('el-table-column',{attrs:{\"label\":\"矿机种类\",\"width\":\"120\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('el-tag',{class:['type-tag', _vm.typeClass(scope.row.type)],staticStyle:{\"font-size\":\"14px\"},attrs:{\"disable-transitions\":\"\"}},[_vm._v(\" \"+_vm._s(_vm.formatMachineType(scope.row.type))+\" \")])]}}],null,false,2555332731)}),_c('el-table-column',{attrs:{\"prop\":\"id\",\"label\":\"机器ID\",\"width\":\"120\"}}),_c('el-table-column',{attrs:{\"prop\":\"algorithm\",\"label\":\"最大收益算法\",\"min-width\":\"140\"}})],1)],1):_vm._e()]):_vm._e(),(_vm.configDialog.configuredMachines.length > 0)?_c('div',{staticStyle:{\"margin-top\":\"24px\"}},[_c('div',{staticStyle:{\"font-weight\":\"600\",\"color\":\"#2c3e50\",\"margin-bottom\":\"12px\",\"font-size\":\"16px\"}},[_vm._v(\"已配置机器\")]),_c('el-table',{attrs:{\"data\":_vm.configDialog.configuredMachines,\"max-height\":\"300\",\"border\":\"\",\"stripe\":\"\",\"header-cell-style\":{ textAlign: 'left', fontSize: '14px' },\"cell-style\":{ textAlign: 'left', fontSize: '14px' }}},[_c('el-table-column',{attrs:{\"label\":\"矿机种类\",\"width\":\"120\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('el-tag',{class:['type-tag', _vm.typeClass(scope.row.type)],staticStyle:{\"font-size\":\"14px\"},attrs:{\"disable-transitions\":\"\"}},[_vm._v(\" \"+_vm._s(_vm.formatMachineType(scope.row.type))+\" \")])]}}],null,false,2555332731)}),_c('el-table-column',{attrs:{\"prop\":\"id\",\"label\":\"机器ID\",\"width\":\"120\"}}),_c('el-table-column',{attrs:{\"prop\":\"coin\",\"label\":\"币种\",\"width\":\"120\"}}),_c('el-table-column',{attrs:{\"prop\":\"algorithm\",\"label\":\"算法\",\"min-width\":\"140\"}}),_c('el-table-column',{attrs:{\"prop\":\"poolName\",\"label\":\"矿池\",\"min-width\":\"140\"}}),_c('el-table-column',{attrs:{\"prop\":\"modelName\",\"label\":\"模型\",\"min-width\":\"140\"}}),_c('el-table-column',{attrs:{\"label\":\"钱包地址\",\"min-width\":\"200\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [(scope.row.walletAddress)?_c('el-tooltip',{attrs:{\"content\":scope.row.walletAddress,\"placement\":\"top\"}},[_c('span',{staticClass:\"mono-ellipsis\",staticStyle:{\"font-family\":\"monospace\"}},[_vm._v(_vm._s(_vm.formatWalletAddress(scope.row.walletAddress)))])]):_c('span',[_vm._v(\"-\")])]}}],null,false,2449193566)}),(_vm.hasConfiguredMiningAccount)?_c('el-table-column',{attrs:{\"prop\":\"miningAccount\",\"label\":\"挖矿账户\",\"min-width\":\"140\"}}):_vm._e(),(_vm.hasConfiguredWorkerId)?_c('el-table-column',{attrs:{\"prop\":\"workerId\",\"label\":\"矿工号\",\"min-width\":\"140\"}}):_vm._e()],1)],1):_vm._e()])]),_c('el-dialog',{attrs:{\"visible\":_vm.googleCodeDialog.visible,\"width\":\"480px\",\"title\":\"安全验证\",\"show-close\":false,\"close-on-click-modal\":false,\"close-on-press-escape\":false},on:{\"update:visible\":function($event){return _vm.$set(_vm.googleCodeDialog, \"visible\", $event)}},scopedSlots:_vm._u([{key:\"footer\",fn:function(){return [_c('div',{staticClass:\"dialog-footer\"},[_c('el-button',{on:{\"click\":_vm.handleGoogleCodePrev}},[_vm._v(\"上一步\")]),_c('el-button',{on:{\"click\":_vm.handleGoogleCodeCancel}},[_vm._v(\"取消\")]),_c('el-button',{attrs:{\"type\":\"primary\",\"loading\":_vm.googleCodeDialog.loading,\"disabled\":!_vm.isGoogleCodeValid},on:{\"click\":_vm.handleGoogleCodeSubmit}},[_vm._v(\" \"+_vm._s(_vm.googleCodeDialog.loading ? '验证中...' : '确认验证')+\" \")])],1)]},proxy:true}])},[_c('div',{staticClass:\"google-code-content\"},[_c('div',{staticClass:\"verification-icon\"},[_c('i',{staticClass:\"el-icon-lock\",staticStyle:{\"font-size\":\"48px\",\"color\":\"#409EFF\"}})]),_c('div',{staticClass:\"verification-title\"},[_c('h3',[_vm._v(\"请输入谷歌验证码\")]),_c('p',{staticClass:\"verification-desc\"},[_vm._v(\"为了保障您的账户安全,请输入您的谷歌验证器中的6位验证码\")])]),_c('div',{staticClass:\"code-input-wrapper\"},[_c('el-input',{ref:\"googleCodeInput\",staticClass:\"code-input\",attrs:{\"placeholder\":\"请输入6位验证码\",\"maxlength\":\"6\",\"size\":\"large\"},on:{\"input\":_vm.handleGoogleCodeInput},nativeOn:{\"keyup\":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"enter\",13,$event.key,\"Enter\"))return null;return _vm.handleGoogleCodeSubmit.apply(null, arguments)}},scopedSlots:_vm._u([{key:\"prepend\",fn:function(){return [_c('i',{staticClass:\"el-icon-key\"})]},proxy:true}]),model:{value:(_vm.googleCodeDialog.code),callback:function ($$v) {_vm.$set(_vm.googleCodeDialog, \"code\", $$v)},expression:\"googleCodeDialog.code\"}})],1),(_vm.googleCodeDialog.error)?_c('div',{staticClass:\"code-error\"},[_c('i',{staticClass:\"el-icon-warning\"}),_c('span',[_vm._v(_vm._s(_vm.googleCodeDialog.error))])]):_vm._e()])])],1),_c('el-dialog',{attrs:{\"visible\":_vm.settlementSuccessfulVisible,\"width\":\"480px\",\"append-to-body\":\"\",\"close-on-click-modal\":false,\"close-on-press-escape\":false},on:{\"update:visible\":function($event){_vm.settlementSuccessfulVisible=$event},\"close\":_vm.handleCloseSuccessDialog},scopedSlots:_vm._u([{key:\"footer\",fn:function(){return [_c('el-button',{attrs:{\"type\":\"primary\"},on:{\"click\":_vm.handleCloseSuccessDialog}},[_vm._v(\"已知晓\")])]},proxy:true}])},[_c('div',{staticStyle:{\"text-align\":\"center\",\"padding\":\"20px 0\"}},[_c('div',{staticStyle:{\"font-size\":\"48px\",\"color\":\"#52c41a\",\"margin-bottom\":\"16px\"}},[_vm._v(\"✓\")]),_c('div',{staticStyle:{\"font-size\":\"18px\",\"color\":\"#333\",\"margin-bottom\":\"12px\"}},[_vm._v(\"请求结算处理成功\")]),_c('div',{staticStyle:{\"color\":\"#666\",\"line-height\":\"1.6\"}},[_vm._v(\" 请在订单列表页面查看结算状态\"),_c('br'),_vm._v(\" 结算成功会自动更新钱包余额 \")])])])],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"header-container\"},[_c('nav',{staticClass:\"navbar\"},[_c('div',{staticClass:\"nav-left\"},_vm._l((_vm.navigation),function(nav){return _c('router-link',{key:nav.path,staticClass:\"nav-btn\",class:{ active: _vm.isNavActive(nav.path) },attrs:{\"to\":nav.path,\"title\":nav.description}},[_c('span',{staticClass:\"nav-icon\"},[_vm._v(_vm._s(nav.icon))]),_c('span',{staticClass:\"nav-text\"},[_vm._v(_vm._s(nav.name))]),(nav.path === '/cart')?_c('span',{staticClass:\"cart-count\"},[_vm._v(\"(\"+_vm._s(_vm.cartItemCount)+\")\")]):_vm._e()])}),1),_c('div',{staticClass:\"nav-right\"},[(!_vm.isLoggedIn)?_c('div',{staticClass:\"auth-buttons\"},[_c('button',{staticClass:\"auth-btn register-btn\",on:{\"click\":_vm.goToRegister}},[_vm._v(\" 注册 \")]),_c('button',{staticClass:\"auth-btn login-btn\",on:{\"click\":_vm.goToLogin}},[_vm._v(\" 登录 \")])]):_c('div',{staticClass:\"user-info\"},[_c('span',{staticClass:\"user-email\"},[_vm._v(_vm._s(_vm.userEmail))]),_c('router-link',{staticClass:\"security-link\",attrs:{\"to\":\"/account/security-settings\",\"active-class\":\"active\"}},[_vm._v(\" 安全设置 \")]),_c('el-button',{staticClass:\"logout-btn\",attrs:{\"type\":\"text\",\"size\":\"small\"},on:{\"click\":_vm.handleLogout}},[_vm._v(\" 退出 \")])],1)])])])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"product-machine-add\"},[_c('div',{staticClass:\"header\"},[_c('el-button',{attrs:{\"type\":\"text\"},on:{\"click\":_vm.handleBack}},[_vm._v(\"返回\")]),_c('h2',{staticClass:\"title\"},[_vm._v(\"创建商品\")])],1),_c('el-card',{staticClass:\"form-card\",attrs:{\"shadow\":\"never\"}},[_c('el-form',{ref:\"machineForm\",attrs:{\"model\":_vm.form,\"rules\":_vm.rules,\"label-width\":\"160px\",\"size\":\"small\"}},[_c('el-form-item',{attrs:{\"label\":\"矿机种类\"}},[_c('el-radio-group',{on:{\"change\":_vm.handleMachineCategoryChange},model:{value:(_vm.form.machineCategory),callback:function ($$v) {_vm.$set(_vm.form, \"machineCategory\", $$v)},expression:\"form.machineCategory\"}},[_c('el-radio',{attrs:{\"label\":\"ASIC\"}},[_vm._v(\"ASIC\")]),_c('el-radio',{attrs:{\"label\":\"GPU\"}},[_vm._v(\"GPU\")])],1)],1),(_vm.form.machineCategory === 'GPU')?_c('div',{staticClass:\"gpu-guide-section\"},[_c('el-card',{staticClass:\"gpu-guide-card\",attrs:{\"shadow\":\"never\"}},[_c('div',{staticClass:\"gpu-guide-content\"},[_c('div',{staticClass:\"gpu-guide-title\"},[_vm._v(\"注意事项:\")]),_c('ol',{staticClass:\"gpu-guide-list\"},[_c('li',[_vm._v(\" GPU商品需先点击下方按钮,下载并在GPU所在主机启动客户端,在下载包中会有启动客户端的操作指引文档 \")]),_c('li',[_vm._v(\" 成功在GPU主机启动客户端后,GPU信息会自行添加至商品列表中,点击下方前往商品列表按钮可以前往该页面 \")]),_c('li',[_vm._v(\" 客户端和您的卖家账号绑定,如果您需要在本卖家账号\"),(_vm.userEmail)?_c('span',[_vm._v(\" (\"+_vm._s(_vm.userEmail)+\")\")]):_vm._e(),_vm._v(\"添加多个GPU商品,可通过下列两种方法实现:\"),_c('br'),_vm._v(\" 方法一:点击下方下载客户端按钮,将下载好的完整客户端包复制到不同的GPU主机并且启动,启动后客户端所在主机的GPU数据会自动添加到商品列表中 (推荐) \"),_c('br'),_vm._v(\" 方法二:在不同的客户端主机登陆您的卖家账号,进入本页面,点击下载对应操作系统客户端,成功启动客户端后也可自动添加GPU数据到商品列表中 \")]),_c('li',[_vm._v(\"目前只支持NVIDIA系列GPU\")])]),_c('div',{staticClass:\"gpu-guide-buttons\"},[_c('el-button',{attrs:{\"type\":\"primary\"},on:{\"click\":function($event){return _vm.handleDownloadClient('windows')}}},[_vm._v(\"Windows 客户端下载\")]),_c('el-button',{attrs:{\"type\":\"primary\"},on:{\"click\":function($event){return _vm.handleDownloadClient('linux')}}},[_vm._v(\"Linux 客户端下载\")]),_c('el-button',{attrs:{\"type\":\"success\"},on:{\"click\":_vm.handleGpuClientStarted}},[_vm._v(\"前往商品列表\")])],1)])])],1):_vm._e(),(_vm.form.machineCategory === 'ASIC')?_c('el-form-item',{attrs:{\"label\":\"币种/算法/算力/单位\",\"prop\":\"coinAndAlgoList\",\"required\":true}},[_c('div',{staticClass:\"coin-algo-rows\"},_vm._l((_vm.form.coinAndAlgoList),function(row,idx){return _c('div',{key:idx,staticClass:\"coin-algo-line\"},[_c('el-select',{staticClass:\"coin-input\",attrs:{\"placeholder\":\"请选择币种\",\"loading\":_vm.loadingCoins,\"filterable\":\"\",\"clearable\":\"\"},on:{\"change\":function($event){return _vm.handleCoinChange(idx, $event)}},model:{value:(row.coin),callback:function ($$v) {_vm.$set(row, \"coin\", $$v)},expression:\"row.coin\"}},_vm._l((_vm.coinOptions),function(coin){return _c('el-option',{key:coin,attrs:{\"label\":coin,\"value\":coin}})}),1),_c('el-select',{staticClass:\"algo-input\",attrs:{\"placeholder\":\"请选择算法\",\"loading\":_vm.loadingAlgos[idx],\"disabled\":!row.coin,\"filterable\":\"\",\"clearable\":\"\"},model:{value:(row.algorithm),callback:function ($$v) {_vm.$set(row, \"algorithm\", $$v)},expression:\"row.algorithm\"}},_vm._l(((_vm.algoOptionsMap[row.coin] || [])),function(algo){return _c('el-option',{key:algo,attrs:{\"label\":algo,\"value\":algo}})}),1),_c('el-input',{staticClass:\"power-input\",attrs:{\"placeholder\":\"理论算力\",\"inputmode\":\"decimal\"},on:{\"input\":function($event){return _vm.handleCoinRowTheoryInput(idx)}},model:{value:(row.theoryPower),callback:function ($$v) {_vm.$set(row, \"theoryPower\", $$v)},expression:\"row.theoryPower\"}}),_c('el-select',{staticClass:\"unit-select\",attrs:{\"placeholder\":\"单位\"},on:{\"change\":function($event){return _vm.handleCoinRowUnitChange(idx, $event)}},model:{value:(row.unit),callback:function ($$v) {_vm.$set(row, \"unit\", $$v)},expression:\"row.unit\"}},[_c('el-option',{attrs:{\"label\":\"KH/S\",\"value\":\"KH/S\"}}),_c('el-option',{attrs:{\"label\":\"MH/S\",\"value\":\"MH/S\"}}),_c('el-option',{attrs:{\"label\":\"GH/S\",\"value\":\"GH/S\"}}),_c('el-option',{attrs:{\"label\":\"TH/S\",\"value\":\"TH/S\"}}),_c('el-option',{attrs:{\"label\":\"PH/S\",\"value\":\"PH/S\"}})],1),_c('el-button',{staticClass:\"op-btn\",attrs:{\"type\":\"primary\",\"icon\":\"el-icon-plus\",\"circle\":\"\",\"aria-label\":'新增一行'},on:{\"click\":_vm.handleAddCoinAlgoRow}}),(_vm.form.coinAndAlgoList.length > 1)?_c('el-button',{staticClass:\"op-btn\",attrs:{\"icon\":\"el-icon-minus\",\"circle\":\"\",\"aria-label\":'删除该行'},on:{\"click\":function($event){return _vm.handleRemoveCoinAlgoRow(idx)}}}):_vm._e()],1)}),0)]):_vm._e(),(_vm.form.machineCategory === 'ASIC')?_c('el-form-item',{attrs:{\"label\":\"矿机型号\",\"prop\":\"type\",\"required\":true}},[_c('el-input',{staticStyle:{\"width\":\"50%\"},attrs:{\"placeholder\":\"示例:龍珠\",\"maxlength\":20},on:{\"input\":_vm.handleTypeInput},model:{value:(_vm.form.type),callback:function ($$v) {_vm.$set(_vm.form, \"type\", $$v)},expression:\"form.type\"}})],1):_vm._e(),(_vm.form.machineCategory === 'ASIC')?_c('el-form-item',{attrs:{\"label\":\"最大租赁天数\",\"prop\":\"maxLeaseDays\"}},[_c('el-input',{staticStyle:{\"width\":\"50%\"},attrs:{\"placeholder\":\"1-365\",\"inputmode\":\"numeric\"},on:{\"input\":function($event){return _vm.handleNumeric('maxLeaseDays')}},model:{value:(_vm.form.maxLeaseDays),callback:function ($$v) {_vm.$set(_vm.form, \"maxLeaseDays\", $$v)},expression:\"form.maxLeaseDays\"}},[_c('template',{slot:\"append\"},[_vm._v(\"天\")])],2)],1):_vm._e(),(_vm.form.machineCategory === 'ASIC')?_c('el-form-item',{attrs:{\"label\":\"功耗\",\"prop\":\"powerDissipation\"}},[_c('el-input',{staticStyle:{\"width\":\"50%\"},attrs:{\"inputmode\":\"decimal\"},on:{\"input\":function($event){return _vm.handleNumeric('powerDissipation')}},model:{value:(_vm.form.powerDissipation),callback:function ($$v) {_vm.$set(_vm.form, \"powerDissipation\", $$v)},expression:\"form.powerDissipation\"}},[_c('template',{slot:\"append\"},[_vm._v(\"kw/h\")])],2)],1):_vm._e(),(_vm.form.machineCategory === 'ASIC')?_c('el-form-item',{attrs:{\"label\":\"统一售价\",\"prop\":_vm.payTypeDefs && _vm.payTypeDefs.length ? 'costMap' : 'cost',\"required\":true}},[_c('span',{attrs:{\"slot\":\"label\"},slot:\"label\"},[_vm._v(\"统一售价\")]),(_vm.payTypeDefs && _vm.payTypeDefs.length)?_c('div',{staticClass:\"cost-multi\"},_vm._l((_vm.payTypeDefs),function(pt){return _c('div',{key:pt.key,staticClass:\"cost-item\"},[_c('el-input',{staticStyle:{\"width\":\"50%\"},attrs:{\"placeholder\":\"请输入价格\",\"inputmode\":\"decimal\"},on:{\"input\":(val) => _vm.handleCostMapInput(pt.key, val)},model:{value:(_vm.form.costMap[pt.key]),callback:function ($$v) {_vm.$set(_vm.form.costMap, pt.key, $$v)},expression:\"form.costMap[pt.key]\"}},[_c('template',{slot:\"append\"},[_vm._v(_vm._s(pt.label))])],2)],1)}),0):_c('el-input',{staticStyle:{\"width\":\"50%\"},attrs:{\"placeholder\":\"请输入成本(USDT)\",\"inputmode\":\"decimal\"},on:{\"input\":function($event){return _vm.handleNumeric('cost')}},model:{value:(_vm.form.cost),callback:function ($$v) {_vm.$set(_vm.form, \"cost\", $$v)},expression:\"form.cost\"}},[_c('template',{slot:\"append\"},[_vm._v(\"USDT\")])],2)],1):_vm._e(),(_vm.form.machineCategory === 'ASIC')?_c('el-form-item',{attrs:{\"label\":\"出售机器数量(台)\",\"prop\":\"sellCount\",\"required\":true}},[_c('el-input',{staticStyle:{\"width\":\"50%\"},attrs:{\"placeholder\":\"0 - 9999\",\"inputmode\":\"numeric\"},on:{\"input\":_vm.handleSellCountInput,\"blur\":_vm.handleSellCountBlur},model:{value:(_vm.form.sellCount),callback:function ($$v) {_vm.$set(_vm.form, \"sellCount\", $$v)},expression:\"form.sellCount\"}})],1):_vm._e()],1)],1),(_vm.form.machineCategory === 'ASIC')?_c('div',{staticClass:\"actions\"},[_c('el-button',{on:{\"click\":_vm.handleBack}},[_vm._v(\"取消\")]),_c('el-button',{attrs:{\"type\":\"primary\",\"loading\":_vm.saving},on:{\"click\":_vm.handleSave}},[_vm._v(\"确认创建\")])],1):_vm._e(),_c('el-dialog',{attrs:{\"title\":\"请确认上架信息\",\"visible\":_vm.confirmVisible,\"width\":\"560px\"},on:{\"update:visible\":function($event){_vm.confirmVisible=$event}}},[_c('div',{staticStyle:{\"text-align\":\"left\",\"line-height\":\"1.9\"}},[_c('div',[_vm._v(\" 币种:\"),_c('b',[_vm._v(_vm._s(_vm.confirmData.coin))])]),_c('div',[_vm._v(\" 算法:\"),_c('b',[_vm._v(_vm._s(_vm.confirmData.algorithm))])]),_c('div',[_vm._v(\" 最大租赁天数:\"),_c('b',[_vm._v(_vm._s(_vm.confirmData.maxLeaseDays || \"-\"))])]),_c('div',[_vm._v(\" 出售机器数量:\"),_c('b',[_vm._v(_vm._s(_vm.confirmData.saleNumbers || \"-\"))])]),_c('div',{staticStyle:{\"margin-top\":\"8px\"}},[_vm._v(\"售价:\")]),_c('el-table',{staticStyle:{\"width\":\"100%\"},attrs:{\"data\":_vm.confirmData.priceList,\"border\":\"\",\"size\":\"mini\"}},[_c('el-table-column',{attrs:{\"prop\":\"chain\",\"label\":\"链\",\"width\":\"120\"}}),_c('el-table-column',{attrs:{\"prop\":\"coin\",\"label\":\"币种\",\"width\":\"120\"}}),_c('el-table-column',{attrs:{\"label\":\"价格\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_vm._v(\" \"+_vm._s(scope.row.price)+\" \")]}}])})],1),_c('p',{staticStyle:{\"color\":\"#666\",\"margin-top\":\"12px\"}},[_vm._v(\" 请仔细确认以上参数无误后提交。 \")])],1),_c('span',{staticClass:\"dialog-footer\",attrs:{\"slot\":\"footer\"},slot:\"footer\"},[_c('el-button',{on:{\"click\":function($event){_vm.confirmVisible = false}}},[_vm._v(\"取消\")]),_c('el-button',{attrs:{\"type\":\"primary\",\"loading\":_vm.saving},on:{\"click\":_vm.doSubmit}},[_vm._v(\"确认提交\")])],1)])],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n","import request from '../utils/request'\r\n\r\n//注册\r\nexport function register(data) {\r\n return request({\r\n url: `/lease/auth/register`,\r\n method: 'post',\r\n data\r\n })\r\n}\r\n\r\n\r\n//登录\r\nexport function getLogin(data) {\r\n return request({\r\n url: `/lease/auth/login`,\r\n method: 'post',\r\n data\r\n })\r\n }\r\n\r\n\r\n \r\n//退出登录\r\nexport function getLogout(data) {\r\n return request({\r\n url: `/lease/auth/logout`,\r\n method: 'post',\r\n data\r\n })\r\n }\r\n\r\n \r\n//发送登录验证码\r\nexport function sendLoginCode(data) {\r\n return request({\r\n url: `/lease/auth/sendLoginCode`,\r\n method: 'post',\r\n data\r\n })\r\n }\r\n\r\n\r\n //发送注册验证码\r\nexport function sendEmailCode(data) {\r\n return request({\r\n url: `/lease/auth/sendRegisterCode`,\r\n method: 'post',\r\n data\r\n })\r\n }\r\n\r\n\r\n //发送修改密码验证码\r\nexport function sendUpdatePwdCode(data) {\r\n return request({\r\n url: `/lease/auth/sendUpdatePwdCode`,\r\n method: 'post',\r\n data\r\n })\r\n }\r\n\r\n\r\n //修改密码\r\nexport function updatePassword(data) {\r\n return request({\r\n url: `/lease/auth/updatePassword`,\r\n method: 'post',\r\n data\r\n })\r\n }\r\n\r\n\r\n //注销账户\r\nexport function closeAccount(data) {\r\n return request({\r\n url: `/lease/auth/closeAccount`,\r\n method: 'post',\r\n data\r\n })\r\n}\r\n\r\n\r\n //注销邮箱验证码\r\n export function sendCloseAccount(data) {\r\n return request({\r\n url: `/lease/auth/sendCloseAccount`,\r\n method: 'post',\r\n data\r\n })\r\n }\r\n\r\n \r\n //个人中心修改密码\r\n export function updatePasswordInCenter(data) {\r\n return request({\r\n url: `/lease/auth/updatePasswordInCenter`,\r\n method: 'post',\r\n data\r\n })\r\n }\r\n\r\n\r\n \r\n\r\n\r\n\r\n\r\n\r\n","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"recharge-record-container\"},[_vm._m(0),_c('div',{staticClass:\"tab-container\"},[_c('el-tabs',{on:{\"tab-click\":_vm.handleTabClick},model:{value:(_vm.activeTab),callback:function ($$v) {_vm.activeTab=$$v},expression:\"activeTab\"}},[_c('el-tab-pane',{attrs:{\"label\":\"充值中\",\"name\":\"pending\"}},[_c('div',{staticClass:\"tab-content\"},[_c('div',{staticClass:\"list-header\"},[_c('span',{staticClass:\"list-title\"},[_vm._v(\"充值中 (\"+_vm._s(_vm.pendingRecharges.length)+\")\")]),_c('el-button',{attrs:{\"type\":\"primary\",\"size\":\"small\"},on:{\"click\":_vm.refreshData}},[_c('i',{staticClass:\"el-icon-refresh\"}),_vm._v(\" 刷新 \")])],1),_c('div',{directives:[{name:\"loading\",rawName:\"v-loading\",value:(_vm.loading),expression:\"loading\"}],staticClass:\"recharge-list\"},[_vm._l((_vm.pendingRecharges),function(item){return _c('div',{key:item.id,staticClass:\"recharge-item pending\",on:{\"click\":function($event){return _vm.showDetail(item)}}},[_c('div',{staticClass:\"item-main\"},[_c('div',{staticClass:\"item-left\"},[_c('div',{staticClass:\"amount\"},[_vm._v(\" \"+_vm._s(item.amount)+\" \"+_vm._s(item.fromSymbol || \"USDT\")+\" \")]),_c('div',{staticClass:\"chain\"},[_vm._v(_vm._s(_vm.getChainName(item.fromChain)))])]),_c('div',{staticClass:\"item-right\"},[_c('div',{staticClass:\"status pending-status\"},[_c('i',{staticClass:\"el-icon-loading\"}),_vm._v(\" \"+_vm._s(_vm.getStatusText(item.status))+\" \")]),_c('div',{staticClass:\"time\"},[_vm._v(_vm._s(_vm.formatTime(item.createTime)))])])]),_c('div',{staticClass:\"item-footer\"},[_c('div',{staticClass:\"footer-left\"},[_c('span',{staticClass:\"address\"},[_vm._v(_vm._s(_vm.formatAddress(item.address)))]),(item.txHash)?_c('span',{staticClass:\"tx-hash\"},[_c('i',{staticClass:\"el-icon-link\"}),_vm._v(\" \"+_vm._s(_vm.formatAddress(item.txHash))+\" \")]):_vm._e()]),_c('i',{staticClass:\"el-icon-arrow-right\"})])])}),(_vm.pendingRecharges.length === 0)?_c('div',{staticClass:\"empty-state\"},[_c('i',{staticClass:\"el-icon-document\"}),_c('p',[_vm._v(\"暂无充值中的记录\")])]):_vm._e()],2)])]),_c('el-tab-pane',{attrs:{\"label\":\"充值成功\",\"name\":\"success\"}},[_c('div',{staticClass:\"tab-content\"},[_c('div',{staticClass:\"list-header\"},[_c('span',{staticClass:\"list-title\"},[_vm._v(\"充值成功 (\"+_vm._s(_vm.successRecharges.length)+\")\")]),_c('el-button',{attrs:{\"type\":\"primary\",\"size\":\"small\"},on:{\"click\":_vm.refreshData}},[_c('i',{staticClass:\"el-icon-refresh\"}),_vm._v(\" 刷新 \")])],1),_c('div',{directives:[{name:\"loading\",rawName:\"v-loading\",value:(_vm.loading),expression:\"loading\"}],staticClass:\"recharge-list\"},[_vm._l((_vm.successRecharges),function(item){return _c('div',{key:item.id,staticClass:\"recharge-item success\",on:{\"click\":function($event){return _vm.showDetail(item)}}},[_c('div',{staticClass:\"item-main\"},[_c('div',{staticClass:\"item-left\"},[_c('div',{staticClass:\"amount\"},[_vm._v(\" \"+_vm._s(item.amount)+\" \"+_vm._s(item.fromSymbol || \"USDT\")+\" \")]),_c('div',{staticClass:\"chain\"},[_vm._v(_vm._s(_vm.getChainName(item.fromChain)))])]),_c('div',{staticClass:\"item-right\"},[_c('div',{staticClass:\"status success-status\"},[_c('i',{staticClass:\"el-icon-check\"}),_vm._v(\" \"+_vm._s(_vm.getStatusText(item.status))+\" \")]),_c('div',{staticClass:\"time\"},[_vm._v(_vm._s(_vm.formatTime(item.createTime)))])])]),_c('div',{staticClass:\"item-footer\"},[_c('div',{staticClass:\"footer-left\"},[_c('span',{staticClass:\"address\"},[_vm._v(_vm._s(_vm.formatAddress(item.address)))]),(item.txHash)?_c('span',{staticClass:\"tx-hash\"},[_c('i',{staticClass:\"el-icon-link\"}),_vm._v(\" \"+_vm._s(_vm.formatAddress(item.txHash))+\" \")]):_vm._e()]),_c('i',{staticClass:\"el-icon-arrow-right\"})])])}),(_vm.successRecharges.length === 0)?_c('div',{staticClass:\"empty-state\"},[_c('i',{staticClass:\"el-icon-document\"}),_c('p',[_vm._v(\"暂无充值成功的记录\")])]):_vm._e()],2)])]),_c('el-tab-pane',{attrs:{\"label\":\"充值失败\",\"name\":\"failed\"}},[_c('div',{staticClass:\"tab-content\"},[_c('div',{staticClass:\"list-header\"},[_c('span',{staticClass:\"list-title\"},[_vm._v(\"充值失败 (\"+_vm._s(_vm.failedRecharges.length)+\")\")]),_c('el-button',{attrs:{\"type\":\"primary\",\"size\":\"small\"},on:{\"click\":_vm.refreshData}},[_c('i',{staticClass:\"el-icon-refresh\"}),_vm._v(\" 刷新 \")])],1),_c('div',{directives:[{name:\"loading\",rawName:\"v-loading\",value:(_vm.loading),expression:\"loading\"}],staticClass:\"recharge-list\"},[_vm._l((_vm.failedRecharges),function(item){return _c('div',{key:item.id,staticClass:\"recharge-item failed\",on:{\"click\":function($event){return _vm.showDetail(item)}}},[_c('div',{staticClass:\"item-main\"},[_c('div',{staticClass:\"item-left\"},[_c('div',{staticClass:\"amount\"},[_vm._v(\" \"+_vm._s(item.amount)+\" \"+_vm._s(item.fromSymbol || \"USDT\")+\" \")]),_c('div',{staticClass:\"chain\"},[_vm._v(_vm._s(_vm.getChainName(item.fromChain)))])]),_c('div',{staticClass:\"item-right\"},[_c('div',{staticClass:\"status failed-status\"},[_c('i',{staticClass:\"el-icon-close\"}),_vm._v(\" \"+_vm._s(_vm.getStatusText(item.status))+\" \")]),_c('div',{staticClass:\"time\"},[_vm._v(_vm._s(_vm.formatTime(item.createTime)))])])]),_c('div',{staticClass:\"item-footer\"},[_c('div',{staticClass:\"footer-left\"},[_c('span',{staticClass:\"address\"},[_vm._v(_vm._s(_vm.formatAddress(item.address)))]),(item.txHash)?_c('span',{staticClass:\"tx-hash\"},[_c('i',{staticClass:\"el-icon-link\"}),_vm._v(\" \"+_vm._s(_vm.formatAddress(item.txHash))+\" \")]):_vm._e()]),_c('i',{staticClass:\"el-icon-arrow-right\"})])])}),(_vm.failedRecharges.length === 0)?_c('div',{staticClass:\"empty-state\"},[_c('i',{staticClass:\"el-icon-document\"}),_c('p',[_vm._v(\"暂无充值失败的记录\")])]):_vm._e()],2)])])],1),_c('el-row',[_c('el-col',{staticStyle:{\"display\":\"flex\",\"justify-content\":\"center\"},attrs:{\"span\":24}},[_c('el-pagination',{staticStyle:{\"margin\":\"0 auto\",\"margin-top\":\"10px\"},attrs:{\"current-page\":_vm.currentPage,\"page-sizes\":_vm.pageSizes,\"page-size\":_vm.pagination.pageSize,\"layout\":\"total, sizes, prev, pager, next, jumper\",\"total\":_vm.total},on:{\"size-change\":_vm.handleSizeChange,\"current-change\":_vm.handleCurrentChange,\"update:currentPage\":function($event){_vm.currentPage=$event},\"update:current-page\":function($event){_vm.currentPage=$event}}})],1)],1)],1),_c('el-dialog',{attrs:{\"title\":\"充值详情\",\"visible\":_vm.detailDialogVisible,\"width\":\"600px\"},on:{\"update:visible\":function($event){_vm.detailDialogVisible=$event},\"close\":_vm.closeDetail}},[(_vm.selectedItem)?_c('div',{staticClass:\"detail-content\"},[_c('div',{staticClass:\"detail-section\"},[_c('h3',{staticClass:\"section-title\"},[_vm._v(\"基本信息\")]),_c('div',{staticClass:\"detail-list\"},[_c('div',{staticClass:\"detail-row\"},[_c('span',{staticClass:\"detail-label\"},[_vm._v(\"充值ID\")]),_c('span',{staticClass:\"detail-value\"},[_vm._v(_vm._s(_vm.selectedItem.id))])]),_c('div',{staticClass:\"detail-row\"},[_c('span',{staticClass:\"detail-label\"},[_vm._v(\"充值金额\")]),_c('span',{staticClass:\"detail-value amount\"},[_vm._v(_vm._s(_vm.selectedItem.amount)+\" \"+_vm._s(_vm.selectedItem.fromSymbol || \"USDT\"))])]),_c('div',{staticClass:\"detail-row\"},[_c('span',{staticClass:\"detail-label\"},[_vm._v(\"区块链网络\")]),_c('span',{staticClass:\"detail-value\"},[_vm._v(_vm._s(_vm.getChainName(_vm.selectedItem.fromChain)))])]),_c('div',{staticClass:\"detail-row\"},[_c('span',{staticClass:\"detail-label\"},[_vm._v(\"充值状态\")]),_c('span',{staticClass:\"detail-value\"},[_c('el-tag',{attrs:{\"type\":_vm.getStatusType(_vm.selectedItem.status)}},[_vm._v(\" \"+_vm._s(_vm.getStatusText(_vm.selectedItem.status))+\" \")])],1)])])]),_c('div',{staticClass:\"detail-section\"},[_c('h3',{staticClass:\"section-title\"},[_vm._v(\"地址信息\")]),_c('div',{staticClass:\"detail-list\"},[_c('div',{staticClass:\"detail-row\"},[_c('span',{staticClass:\"detail-label\"},[_vm._v(\"充值地址\")]),_c('div',{staticClass:\"address-container\"},[_c('span',{staticClass:\"detail-value address\"},[_vm._v(_vm._s(_vm.selectedItem.address))]),_c('el-button',{attrs:{\"type\":\"text\",\"size\":\"small\"},on:{\"click\":function($event){return _vm.copyAddress(_vm.selectedItem.address)}}},[_vm._v(\" 复制 \")])],1)]),(_vm.selectedItem.txHash)?_c('div',{staticClass:\"detail-row\"},[_c('span',{staticClass:\"detail-label\"},[_vm._v(\"交易哈希\")]),_c('div',{staticClass:\"address-container\"},[_c('span',{staticClass:\"detail-value address\"},[_vm._v(_vm._s(_vm.selectedItem.txHash))]),_c('el-button',{attrs:{\"type\":\"text\",\"size\":\"small\"},on:{\"click\":function($event){return _vm.copyAddress(_vm.selectedItem.txHash)}}},[_vm._v(\" 复制 \")])],1)]):_vm._e()])]),_c('div',{staticClass:\"detail-section\"},[_c('h3',{staticClass:\"section-title\"},[_vm._v(\"时间信息\")]),_c('div',{staticClass:\"detail-list\"},[_c('div',{staticClass:\"detail-row\"},[_c('span',{staticClass:\"detail-label\"},[_vm._v(\"充值时间\")]),_c('span',{staticClass:\"detail-value\"},[_vm._v(_vm._s(_vm.formatFullTime(_vm.selectedItem.createTime)))])])])])]):_vm._e(),_c('div',{staticClass:\"dialog-footer\",attrs:{\"slot\":\"footer\"},slot:\"footer\"},[_c('el-button',{on:{\"click\":_vm.closeDetail}},[_vm._v(\"关闭\")])],1)])],1)\n}\nvar staticRenderFns = [function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"page-header\"},[_c('h1',{staticClass:\"page-title\"},[_vm._v(\"充值记录\")]),_c('p',{staticClass:\"page-subtitle\"},[_vm._v(\"查看您的充值申请和到账状态\")])])\n}]\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"panel\"},[_c('h2',{staticClass:\"panel-title\"},[_vm._v(\"新增店铺\")]),_c('div',{staticClass:\"panel-body\"},[_c('div',{staticClass:\"row\"},[_c('label',{staticClass:\"label required\"},[_vm._v(\"店铺名称\")]),_c('el-input',{attrs:{\"placeholder\":\"请输入店铺名称\",\"maxlength\":30,\"show-word-limit\":\"\"},model:{value:(_vm.form.name),callback:function ($$v) {_vm.$set(_vm.form, \"name\", $$v)},expression:\"form.name\"}})],1),_c('div',{staticClass:\"row\"},[_c('label',{staticClass:\"label\"},[_vm._v(\"店铺描述\")]),_c('div',{staticClass:\"textarea-wrapper\"},[_c('el-input',{attrs:{\"type\":\"textarea\",\"rows\":4,\"maxlength\":300,\"placeholder\":\"请输入店铺描述\",\"show-word-limit\":\"\"},on:{\"input\":_vm.handleDescriptionInput},model:{value:(_vm.form.description),callback:function ($$v) {_vm.$set(_vm.form, \"description\", $$v)},expression:\"form.description\"}})],1)]),_c('div',{staticClass:\"row\"},[_c('label',{staticClass:\"label required\"},[_vm._v(\"手续费比例\")]),_c('el-input',{attrs:{\"placeholder\":\"比例区间 0.01 - 0.1 之间,最多6位小数\"},on:{\"input\":_vm.handleFeeRateInput},model:{value:(_vm.form.feeRate),callback:function ($$v) {_vm.$set(_vm.form, \"feeRate\", $$v)},expression:\"form.feeRate\"}})],1),_vm._m(0),_c('div',{staticClass:\"row\",staticStyle:{\"margin-top\":\"50px\"}},[_c('div',{staticClass:\"actions-center\"},[_c('el-button',{staticClass:\"btn-wide\",attrs:{\"type\":\"primary\"},on:{\"click\":_vm.handleCreate}},[_vm._v(\"创建店铺\")])],1)])])])\n}\nvar staticRenderFns = [function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"row\",staticStyle:{\"margin-top\":\"-6px\"}},[_c('div'),_c('div',{staticStyle:{\"color\":\"#909399\",\"font-size\":\"12px\",\"text-align\":\"left\"}},[_vm._v(\" 为提升您的店铺曝光,您可为平台交易设置手续费比例,该手续费为商家向平台支付的交易佣金,手续费比例将作为影响店铺排名的关键因素,该比例越高,您的店铺排名就越靠前。 \")])])\n}]\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n","import mod from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./register.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./register.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./register.vue?vue&type=template&id=0cdcb380&scoped=true\"\nimport script from \"./register.vue?vue&type=script&lang=js\"\nexport * from \"./register.vue?vue&type=script&lang=js\"\nimport style0 from \"./register.vue?vue&type=style&index=0&id=0cdcb380&prod&scoped=true&lang=css\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"0cdcb380\",\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"account-products\"},[_c('div',{staticClass:\"toolbar\"},[_vm._m(0),_c('div',{staticClass:\"right-area\"},[_c('el-select',{staticClass:\"mr-12\",staticStyle:{\"width\":\"140px\"},attrs:{\"placeholder\":\"矿机种类\",\"size\":\"small\"},on:{\"change\":_vm.handleTypeChange},model:{value:(_vm.listParams.type),callback:function ($$v) {_vm.$set(_vm.listParams, \"type\", $$v)},expression:\"listParams.type\"}},[_c('el-option',{attrs:{\"label\":'ASIC',\"value\":0}}),_c('el-option',{attrs:{\"label\":'GPU',\"value\":1}})],1),_c('el-input',{staticClass:\"mr-12\",staticStyle:{\"width\":\"280px\"},attrs:{\"placeholder\":_vm.searchPlaceholder,\"size\":\"small\",\"clearable\":\"\"},on:{\"clear\":_vm.handleClear},nativeOn:{\"keyup\":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"enter\",13,$event.key,\"Enter\"))return null;return _vm.handleSearch.apply(null, arguments)}},model:{value:(_vm.searchKeyword),callback:function ($$v) {_vm.searchKeyword=$$v},expression:\"searchKeyword\"}}),_c('el-button',{attrs:{\"type\":\"primary\",\"size\":\"small\"},on:{\"click\":_vm.handleSearch}},[_vm._v(\"搜索\")]),_c('el-button',{staticClass:\"ml-8\",attrs:{\"size\":\"small\"},on:{\"click\":_vm.handleReset}},[_vm._v(\"重置\")])],1)]),(_vm.payTypes && _vm.payTypes.length)?_c('div',{staticClass:\"paytypes-bar\"},[_c('span',{staticClass:\"pt-label\"},[_vm._v(\"支持结算方式:\")]),_c('div',{staticClass:\"pt-icons\"},_vm._l((_vm.payTypes),function(pt,idx){return _c('el-tooltip',{key:idx,attrs:{\"content\":_vm.formatPayTypeHead(pt),\"placement\":\"top\",\"open-delay\":80}},[_c('img',{staticClass:\"paytype-icon\",attrs:{\"src\":_vm.getPayImage(pt),\"alt\":_vm.formatPayTypeHead(pt)}})])}),1)]):_vm._e(),(_vm.listParams.type === 0 && _vm.payTypes && _vm.payTypes.length)?_c('div',{staticClass:\"price-select-bar\",staticStyle:{\"margin\":\"8px 0 4px\",\"display\":\"flex\",\"justify-content\":\"flex-end\",\"align-items\":\"center\"}},[_c('span',{staticStyle:{\"margin-right\":\"8px\",\"color\":\"#606266\",\"font-size\":\"14px\"}},[_vm._v(\"筛选售价:\")]),_c('el-select',{staticStyle:{\"width\":\"220px\"},attrs:{\"size\":\"small\",\"placeholder\":\"选择价格展示币种\"},on:{\"change\":_vm.handlePayTypeChange},model:{value:(_vm.selectedPayKey),callback:function ($$v) {_vm.selectedPayKey=$$v},expression:\"selectedPayKey\"}},[_c('template',{slot:\"prefix\"},[(_vm.getSelectedPayImage())?_c('img',{staticClass:\"paytype-icon\",staticStyle:{\"width\":\"16px\",\"height\":\"16px\",\"border-radius\":\"3px\",\"margin-right\":\"6px\"},attrs:{\"src\":_vm.getSelectedPayImage()}}):_vm._e()]),_vm._l((_vm.payTypes),function(pt,idx){return _c('el-option',{key:'pt-opt-top-' + idx,attrs:{\"label\":_vm.formatPayTypeHead(pt),\"value\":_vm.buildPayKey(pt)}},[_c('span',{staticStyle:{\"display\":\"inline-flex\",\"align-items\":\"center\",\"gap\":\"6px\"}},[_c('img',{staticClass:\"paytype-icon\",attrs:{\"src\":_vm.getPayImage(pt)}}),_c('span',[_vm._v(_vm._s(_vm.formatPayTypeHead(pt)))])])])})],2)],1):_vm._e(),(_vm.listParams.type === 0)?_c('el-table',{directives:[{name:\"loading\",rawName:\"v-loading\",value:(_vm.loading),expression:\"loading\"}],key:'asic-table',staticStyle:{\"width\":\"100%\"},attrs:{\"data\":_vm.shopMachineList || [],\"border\":\"\",\"stripe\":\"\"}},[_c('el-table-column',{attrs:{\"label\":\"矿机类型\",\"width\":\"100\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('el-tag',{attrs:{\"type\":scope.row.type == 0 ? 'warning' : 'success'}},[_vm._v(\" \"+_vm._s(scope.row.type == 0 ? 'ASIC' : 'GPU')+\" \")])]}}],null,false,1255276155)}),_c('el-table-column',{attrs:{\"label\":\"币种\",\"min-width\":\"140\",\"show-overflow-tooltip\":\"\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('div',{staticClass:\"ellipsis-cell\"},[_vm._v(_vm._s(_vm.getRowCoinText(scope.row)))])]}}],null,false,3296547820)}),_c('el-table-column',{attrs:{\"label\":\"算法\",\"min-width\":\"160\",\"show-overflow-tooltip\":\"\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('div',{staticClass:\"ellipsis-cell\"},[_vm._v(_vm._s(_vm.getRowAlgorithmText(scope.row)))])]}}],null,false,1057179176)}),_c('el-table-column',{attrs:{\"prop\":\"name\",\"label\":\"矿机型号\"}}),_c('el-table-column',{attrs:{\"label\":\"理论算力\",\"min-width\":\"170\",\"show-overflow-tooltip\":\"\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('div',{staticClass:\"ellipsis-cell\"},[_vm._v(_vm._s(_vm.getTheoryText(scope.row)))])]}}],null,false,4122576080)}),_c('el-table-column',{attrs:{\"label\":\"功耗(kw/h)\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('span',[_vm._v(_vm._s(_vm.getPowerDissText(scope.row)))])]}}],null,false,2386465872)}),_c('el-table-column',{attrs:{\"prop\":\"saleNumbers\",\"label\":\"总机器数量\"}}),_c('el-table-column',{attrs:{\"prop\":\"saleOutNumbers\",\"label\":\"已售数量\"}}),_c('el-table-column',{attrs:{\"prop\":\"maxLeaseDays\",\"label\":\"最大租赁天数\"}}),_c('el-table-column',{scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('span',{staticClass:\"price-strong\"},[_vm._v(_vm._s(_vm.getRowPriceText(scope.row)))])]}}],null,false,1822165360)},[_c('template',{slot:\"header\"},[_c('div',{staticStyle:{\"display\":\"flex\",\"align-items\":\"center\",\"gap\":\"8px\"}},[_c('span',[_vm._v(\"售价\")])])])],2),_c('el-table-column',{attrs:{\"label\":\"状态\",\"width\":\"80\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('el-tag',{attrs:{\"type\":scope.row.state === 0 ? 'success' : 'info'}},[_vm._v(\" \"+_vm._s(scope.row.state === 0 ? '上架' : '下架')+\" \")])]}}],null,false,4131197732)}),_c('el-table-column',{attrs:{\"label\":\"操作\",\"fixed\":\"right\",\"width\":\"140\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('el-button',{attrs:{\"type\":\"text\",\"size\":\"small\"},on:{\"click\":function($event){return _vm.handleEdit(scope.row)}}},[_vm._v(\"修改\")]),_c('el-button',{staticStyle:{\"color\":\"#f56c6c\"},attrs:{\"type\":\"text\",\"size\":\"small\"},on:{\"click\":function($event){return _vm.handleDelete(scope.row)}}},[_vm._v(\"删除\")])]}}],null,false,198470154)})],1):_c('el-table',{key:'gpu-table-' + String(_vm.listParams.type),staticStyle:{\"width\":\"100%\"},attrs:{\"data\":_vm.shopMachineList || [],\"border\":\"\",\"stripe\":\"\"}},[_c('el-table-column',{attrs:{\"label\":\"矿机类型\",\"width\":\"100\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('el-tag',{attrs:{\"type\":scope.row.type == 1 ? 'success' : 'warning'}},[_vm._v(\" \"+_vm._s(scope.row.type == 1 ? 'GPU' : 'ASIC')+\" \")])]}}])}),_c('el-table-column',{attrs:{\"prop\":\"miner\",\"label\":\"矿机编号\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('span',[_vm._v(_vm._s(scope.row.miner || '-'))])]}}])}),_c('el-table-column',{attrs:{\"prop\":\"name\",\"label\":\"显卡型号\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('span',[_vm._v(_vm._s(scope.row.name || '-'))])]}}])}),_c('el-table-column',{attrs:{\"label\":\"状态\",\"width\":\"180\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('div',{staticClass:\"gpu-state\"},[_c('el-switch',{attrs:{\"active-value\":0,\"inactive-value\":1,\"value\":(_vm.updateMap[_vm.getRowId(scope.row)] && _vm.updateMap[_vm.getRowId(scope.row)].state) != null ? _vm.updateMap[_vm.getRowId(scope.row)].state : 1},on:{\"change\":function($event){return _vm.handleToggleState(scope.row, $event)}}}),_c('span',{staticClass:\"gpu-state-text\",class:{ on: ((_vm.updateMap[_vm.getRowId(scope.row)] && _vm.updateMap[_vm.getRowId(scope.row)].state) === 0) }},[_vm._v(\" \"+_vm._s(((_vm.updateMap[_vm.getRowId(scope.row)] && _vm.updateMap[_vm.getRowId(scope.row)].state) === 0) ? '上架' : '下架')+\" \")])],1)]}}])}),_c('el-table-column',{attrs:{\"label\":\"售价\",\"min-width\":\"300\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('div',{staticClass:\"gpu-price-row\"},_vm._l((_vm.payTypes),function(pt,idx){return _c('div',{key:idx,staticClass:\"gpu-price-item\"},[_c('span',{staticClass:\"gpu-price-label\"},[_vm._v(_vm._s(_vm.formatPayTypeHead(pt)))]),_c('el-input',{staticClass:\"gpu-price-input\",attrs:{\"size\":\"small\",\"value\":_vm.getPriceValue(_vm.getRowId(scope.row), pt),\"placeholder\":\"价格\"},on:{\"input\":function($event){return _vm.handlePriceInput(scope.row, pt, $event)},\"blur\":function($event){return _vm.handlePriceBlur(scope.row, pt)}}})],1)}),0)]}}])}),_c('el-table-column',{attrs:{\"label\":\"最大租赁天数\",\"width\":\"160\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('el-input',{staticStyle:{\"width\":\"120px\"},attrs:{\"size\":\"small\",\"value\":String((_vm.updateMap[_vm.getRowId(scope.row)] && _vm.updateMap[_vm.getRowId(scope.row)].maxLeaseDays) || ''),\"placeholder\":\"1-365\"},on:{\"input\":function($event){return _vm.handleMaxLeaseDaysInput(scope.row, $event)}}})]}}])}),_c('el-table-column',{attrs:{\"label\":\"操作\",\"fixed\":\"right\",\"width\":\"120\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('el-button',{staticStyle:{\"color\":\"#f56c6c\"},attrs:{\"type\":\"text\",\"size\":\"small\"},on:{\"click\":function($event){return _vm.handleDelete(scope.row)}}},[_vm._v(\"删除\")])]}}])})],1),(_vm.listParams.type === 0)?_c('div',{staticClass:\"pagination\"},[_c('el-pagination',{attrs:{\"background\":\"\",\"layout\":\"total, sizes, prev, pager, next, jumper\",\"total\":_vm.total,\"current-page\":_vm.pagination.pageNum,\"page-sizes\":[10, 20, 50, 100],\"page-size\":_vm.pagination.pageSize},on:{\"update:currentPage\":function($event){return _vm.$set(_vm.pagination, \"pageNum\", $event)},\"update:current-page\":function($event){return _vm.$set(_vm.pagination, \"pageNum\", $event)},\"update:pageSize\":function($event){return _vm.$set(_vm.pagination, \"pageSize\", $event)},\"update:page-size\":function($event){return _vm.$set(_vm.pagination, \"pageSize\", $event)},\"size-change\":_vm.handleSizeChange,\"current-change\":_vm.handleCurrentChange}})],1):_c('div',{staticStyle:{\"margin-top\":\"12px\",\"display\":\"flex\",\"justify-content\":\"space-between\",\"align-items\":\"center\"}},[_c('el-button',{attrs:{\"type\":\"primary\"},on:{\"click\":_vm.handleUpdateGpu}},[_vm._v(\"更新商品信息\")]),_c('el-pagination',{attrs:{\"background\":\"\",\"layout\":\"total, sizes, prev, pager, next, jumper\",\"total\":_vm.total,\"current-page\":_vm.pagination.pageNum,\"page-sizes\":[10, 20, 50, 100],\"page-size\":_vm.pagination.pageSize},on:{\"update:currentPage\":function($event){return _vm.$set(_vm.pagination, \"pageNum\", $event)},\"update:current-page\":function($event){return _vm.$set(_vm.pagination, \"pageNum\", $event)},\"update:pageSize\":function($event){return _vm.$set(_vm.pagination, \"pageSize\", $event)},\"update:page-size\":function($event){return _vm.$set(_vm.pagination, \"pageSize\", $event)},\"size-change\":_vm.handleSizeChange,\"current-change\":_vm.handleCurrentChange}})],1),_c('el-dialog',{attrs:{\"visible\":_vm.editDialog.visible,\"close-on-click-modal\":false,\"width\":\"70VW\",\"title\":'编辑商品 - ' + ((_vm.editDialog.form && _vm.editDialog.form.name) ? _vm.editDialog.form.name : '')},on:{\"update:visible\":function($event){return _vm.$set(_vm.editDialog, \"visible\", $event)}},scopedSlots:_vm._u([{key:\"footer\",fn:function(){return [_c('el-button',{on:{\"click\":function($event){_vm.editDialog.visible = false}}},[_vm._v(\"取消\")]),_c('el-button',{attrs:{\"type\":\"primary\",\"loading\":_vm.editDialog.saving},on:{\"click\":_vm.handleSaveEdit}},[_vm._v(\"确认修改\")])]},proxy:true}])},[(_vm.editDialog.form)?_c('el-form',{ref:\"editForm\",staticClass:\"edit-form\",attrs:{\"model\":_vm.editDialog.form,\"label-width\":\"160px\"}},[_c('el-form-item',{attrs:{\"label\":\"矿机型号\"}},[_c('el-input',{attrs:{\"maxlength\":\"60\"},model:{value:(_vm.editDialog.form.name),callback:function ($$v) {_vm.$set(_vm.editDialog.form, \"name\", (typeof $$v === 'string'? $$v.trim(): $$v))},expression:\"editDialog.form.name\"}})],1),_c('el-form-item',{attrs:{\"label\":\"币种/算法/算力/单位\"}},[_c('div',{staticClass:\"coin-algo-rows\"},_vm._l((_vm.editDialog.form.coinAndAlgoList),function(row,idx){return _c('div',{key:'edit-ca-' + idx,staticClass:\"coin-algo-line\"},[_c('el-select',{staticClass:\"coin-input\",attrs:{\"placeholder\":\"请选择币种\",\"loading\":_vm.loadingCoins,\"filterable\":\"\",\"clearable\":\"\"},on:{\"change\":function($event){return _vm.editHandleCoinChange(idx, $event)}},model:{value:(row.coin),callback:function ($$v) {_vm.$set(row, \"coin\", $$v)},expression:\"row.coin\"}},_vm._l((_vm.coinOptions),function(coin){return _c('el-option',{key:coin,attrs:{\"label\":coin,\"value\":coin}})}),1),_c('el-select',{staticClass:\"algo-input\",attrs:{\"placeholder\":\"请选择算法\",\"loading\":_vm.loadingAlgos[idx],\"disabled\":!row.coin,\"filterable\":\"\",\"clearable\":\"\"},model:{value:(row.algorithm),callback:function ($$v) {_vm.$set(row, \"algorithm\", $$v)},expression:\"row.algorithm\"}},_vm._l(((_vm.algoOptionsMap[row.coin] || [])),function(algo){return _c('el-option',{key:algo,attrs:{\"label\":algo,\"value\":algo}})}),1),_c('el-input',{staticClass:\"power-input\",attrs:{\"placeholder\":\"理论算力\",\"inputmode\":\"decimal\"},on:{\"input\":function($event){return _vm.editHandleRowTheoryInput(idx)}},model:{value:(row.theoryPower),callback:function ($$v) {_vm.$set(row, \"theoryPower\", $$v)},expression:\"row.theoryPower\"}}),_c('el-select',{staticClass:\"unit-select\",attrs:{\"placeholder\":\"单位\"},on:{\"change\":function($event){return _vm.editHandleRowUnitChange(idx, $event)}},model:{value:(row.unit),callback:function ($$v) {_vm.$set(row, \"unit\", $$v)},expression:\"row.unit\"}},[_c('el-option',{attrs:{\"label\":\"KH/S\",\"value\":\"KH/S\"}}),_c('el-option',{attrs:{\"label\":\"MH/S\",\"value\":\"MH/S\"}}),_c('el-option',{attrs:{\"label\":\"GH/S\",\"value\":\"GH/S\"}}),_c('el-option',{attrs:{\"label\":\"TH/S\",\"value\":\"TH/S\"}}),_c('el-option',{attrs:{\"label\":\"PH/S\",\"value\":\"PH/S\"}})],1),_c('el-button',{staticClass:\"op-btn\",attrs:{\"type\":\"primary\",\"icon\":\"el-icon-plus\",\"circle\":\"\",\"aria-label\":'新增一行'},on:{\"click\":_vm.editHandleAddRow}}),((_vm.editDialog.form.coinAndAlgoList || []).length > 1)?_c('el-button',{staticClass:\"op-btn\",attrs:{\"icon\":\"el-icon-minus\",\"circle\":\"\",\"aria-label\":'删除该行'},on:{\"click\":function($event){return _vm.editHandleRemoveRow(idx)}}}):_vm._e()],1)}),0)]),_c('el-form-item',{attrs:{\"label\":\"最大租赁天数\"}},[_c('el-input',{staticStyle:{\"width\":\"200px\"},attrs:{\"placeholder\":\"1-365\"},on:{\"input\":function($event){_vm.editDialog.form.maxLeaseDays = (String(_vm.editDialog.form.maxLeaseDays||'').replace(/[^\\d]/g,''))}},model:{value:(_vm.editDialog.form.maxLeaseDays),callback:function ($$v) {_vm.$set(_vm.editDialog.form, \"maxLeaseDays\", $$v)},expression:\"editDialog.form.maxLeaseDays\"}})],1),_c('el-form-item',{staticClass:\"align-like-input\",attrs:{\"label\":\"状态\"}},[_c('el-radio-group',{model:{value:(_vm.editDialog.form.state),callback:function ($$v) {_vm.$set(_vm.editDialog.form, \"state\", $$v)},expression:\"editDialog.form.state\"}},[_c('el-radio',{attrs:{\"label\":0}},[_vm._v(\"上架\")]),_c('el-radio',{attrs:{\"label\":1}},[_vm._v(\"下架\")])],1)],1),_c('el-form-item',{attrs:{\"label\":\"功耗(kw/h)\"}},[_c('el-input',{staticStyle:{\"width\":\"200px\"},attrs:{\"placeholder\":\"功耗\"},on:{\"input\":function($event){_vm.editDialog.form.powerDissipation = (String(_vm.editDialog.form.powerDissipation||'').replace(/[^\\\\d.]/g,''))}},model:{value:(_vm.editDialog.form.powerDissipation),callback:function ($$v) {_vm.$set(_vm.editDialog.form, \"powerDissipation\", $$v)},expression:\"editDialog.form.powerDissipation\"}})],1),_c('el-form-item',{attrs:{\"label\":\"出售数量(台)\"}},[_c('el-input',{staticStyle:{\"width\":\"200px\"},attrs:{\"placeholder\":\"整数\"},on:{\"input\":function($event){_vm.editDialog.form.saleNumbers = (String(_vm.editDialog.form.saleNumbers||'').replace(/[^\\d]/g,''))}},model:{value:(_vm.editDialog.form.saleNumbers),callback:function ($$v) {_vm.$set(_vm.editDialog.form, \"saleNumbers\", $$v)},expression:\"editDialog.form.saleNumbers\"}})],1),_c('el-form-item',{attrs:{\"label\":\"售价(多币种)\"}},[_c('div',{staticClass:\"gpu-price-row\"},_vm._l((_vm.editDialog.priceList),function(pl,idx){return _c('div',{key:'ep-' + idx,staticClass:\"gpu-price-item\"},[_c('span',{staticClass:\"gpu-price-label\"},[_vm._v(_vm._s(_vm.formatPayTypeHead(pl)))]),_c('el-input',{staticClass:\"gpu-price-input\",attrs:{\"size\":\"small\",\"value\":pl.price,\"placeholder\":\"价格\"},on:{\"input\":function($event){return _vm.handleEditPriceInput(idx, $event)}}})],1)}),0)])],1):_vm._e()],1)],1)\n}\nvar staticRenderFns = [function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"left-area\"},[_c('h2',{staticClass:\"page-title\"},[_vm._v(\"商品列表\")])])\n}]\n\nexport { render, staticRenderFns }","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"funds-page\"},[_c('h3',{staticClass:\"title\",staticStyle:{\"margin-bottom\":\"18px\",\"text-align\":\"left\"}},[_vm._v(\"资金流水\")]),_c('div',{staticClass:\"tabs-card\"},[_c('el-tabs',{on:{\"tab-click\":_vm.handleTab},model:{value:(_vm.active),callback:function ($$v) {_vm.active=$$v},expression:\"active\"}},[_c('el-tab-pane',{attrs:{\"label\":\"充值记录\",\"name\":\"recharge\"}},[_c('div',{staticClass:\"list-wrap\"},[_c('div',{staticClass:\"list-header\"},[_c('span',{staticClass:\"list-title\"},[_vm._v(\"全部充值 (\"+_vm._s(_vm.rechargeRows.length)+\")\")]),_c('el-button',{attrs:{\"type\":\"primary\",\"size\":\"small\"},on:{\"click\":_vm.loadRecharge}},[_vm._v(\"刷新\")])],1),_c('div',{directives:[{name:\"loading\",rawName:\"v-loading\",value:(_vm.loading.recharge),expression:\"loading.recharge\"}],staticClass:\"record-list\"},[_vm._l((_vm.rechargeRows),function(row,idx){return _c('div',{key:_vm.getRowKey(row, idx),staticClass:\"record-item\",class:_vm.statusClass(row.status),on:{\"click\":function($event){return _vm.toggleExpand('recharge', row, idx)}}},[_c('div',{staticClass:\"item-main\"},[_c('div',{staticClass:\"item-left\"},[_c('div',{staticClass:\"amount\"},[(_vm.formatAmount(row.amount, row.fromSymbol).truncated)?_c('el-tooltip',{attrs:{\"content\":`${_vm.formatAmount(row.amount, row.fromSymbol).full} ${(row.fromSymbol || 'USDT').toUpperCase()}`,\"placement\":\"top\"}},[_c('span',[_vm._v(\" + \"+_vm._s(_vm.formatAmount(row.amount, row.fromSymbol).text)+\" \"+_vm._s((row.fromSymbol || 'USDT').toUpperCase())+\" \"),_c('i',{staticClass:\"el-icon-more amount-more\"})])]):_c('span',[_vm._v(\" + \"+_vm._s(_vm.formatAmount(row.amount, row.fromSymbol).text)+\" \"+_vm._s((row.fromSymbol || 'USDT').toUpperCase())+\" \")])],1),_c('div',{staticClass:\"chain\"},[_vm._v(_vm._s(_vm.formatChain(row.fromChain)))])]),_c('div',{staticClass:\"item-right\"},[_c('div',{staticClass:\"status\"},[_c('el-tag',{attrs:{\"type\":_vm.getRechargeStatusType(row.status),\"size\":\"small\"}},[_vm._v(_vm._s(_vm.getRechargeStatusText(row.status)))])],1),_c('div',{staticClass:\"time\"},[_vm._v(_vm._s(_vm.formatFullTime(row.createTime)))])])]),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.isExpanded('recharge', row, idx)),expression:\"isExpanded('recharge', row, idx)\"}],staticClass:\"expand-panel\"},[_c('div',{staticClass:\"expand-grid\"},[_c('div',{staticClass:\"expand-item\"},[_c('span',{staticClass:\"label\"},[_vm._v(\"充值地址\")]),_c('div',{staticClass:\"value value-row\"},[_c('span',{staticClass:\"mono-ellipsis\",attrs:{\"title\":row.fromAddress}},[_vm._v(_vm._s(row.fromAddress))]),_c('el-button',{attrs:{\"type\":\"text\",\"size\":\"mini\",\"icon\":\"el-icon-document-copy\"},on:{\"click\":function($event){$event.stopPropagation();return _vm.handleCopy(row.fromAddress, '充值地址')}}},[_vm._v(\"复制\")])],1)]),(row.txHash)?_c('div',{staticClass:\"expand-item\"},[_c('span',{staticClass:\"label\"},[_vm._v(\"交易哈希\")]),_c('div',{staticClass:\"value value-row\"},[_c('span',{staticClass:\"mono-ellipsis\",attrs:{\"title\":row.txHash}},[_vm._v(_vm._s(row.txHash))]),_c('el-button',{attrs:{\"type\":\"text\",\"size\":\"mini\",\"icon\":\"el-icon-document-copy\"},on:{\"click\":function($event){$event.stopPropagation();return _vm.handleCopy(row.txHash, '交易哈希')}}},[_vm._v(\"复制\")])],1)]):_vm._e()])])])}),(!_vm.rechargeRows.length)?_c('div',{staticClass:\"empty\"},[_vm._v(\"暂无充值记录\")]):_vm._e()],2)])]),_c('el-tab-pane',{attrs:{\"label\":\"提现记录\",\"name\":\"withdraw\"}},[_c('div',{staticClass:\"list-wrap\"},[_c('div',{staticClass:\"list-header\"},[_c('span',{staticClass:\"list-title\"},[_vm._v(\"全部提现 (\"+_vm._s(_vm.withdrawRows.length)+\")\")]),_c('el-button',{attrs:{\"type\":\"primary\",\"size\":\"small\"},on:{\"click\":_vm.loadWithdraw}},[_vm._v(\"刷新\")])],1),_c('div',{directives:[{name:\"loading\",rawName:\"v-loading\",value:(_vm.loading.withdraw),expression:\"loading.withdraw\"}],staticClass:\"record-list\"},[_vm._l((_vm.withdrawRows),function(row,idx){return _c('div',{key:_vm.getRowKey(row, idx),staticClass:\"record-item\",class:_vm.statusClass(row.status),on:{\"click\":function($event){return _vm.toggleExpand('withdraw', row, idx)}}},[_c('div',{staticClass:\"item-main\"},[_c('div',{staticClass:\"item-left\"},[_c('div',{staticClass:\"amount\"},[(_vm.formatAmount(row.amount, row.toSymbol).truncated)?_c('el-tooltip',{attrs:{\"content\":`${_vm.formatAmount(row.amount, row.toSymbol).full} ${(row.toSymbol || 'USDT').toUpperCase()}`,\"placement\":\"top\"}},[_c('span',[_vm._v(\" - \"+_vm._s(_vm.formatAmount(row.amount, row.toSymbol).text)+\" \"+_vm._s((row.toSymbol || 'USDT').toUpperCase())+\" \"),_c('i',{staticClass:\"el-icon-more amount-more\"})])]):_c('span',[_vm._v(\" - \"+_vm._s(_vm.formatAmount(row.amount, row.toSymbol).text)+\" \"+_vm._s((row.toSymbol || 'USDT').toUpperCase())+\" \")])],1),_c('div',{staticClass:\"chain\"},[_vm._v(_vm._s(_vm.formatChain(row.toChain)))])]),_c('div',{staticClass:\"item-right\"},[_c('div',{staticClass:\"status\"},[_c('el-tag',{attrs:{\"type\":_vm.getWithdrawStatusType(row.status),\"size\":\"small\"}},[_vm._v(_vm._s(_vm.getWithdrawStatusText(row.status)))])],1),_c('div',{staticClass:\"time\"},[_vm._v(_vm._s(_vm.formatFullTime(row.createTime)))])])]),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.isExpanded('withdraw', row, idx)),expression:\"isExpanded('withdraw', row, idx)\"}],staticClass:\"expand-panel\"},[_c('div',{staticClass:\"expand-grid\"},[_c('div',{staticClass:\"expand-item\"},[_c('span',{staticClass:\"label\"},[_vm._v(\"收款地址\")]),_c('div',{staticClass:\"value value-row\"},[_c('span',{staticClass:\"mono-ellipsis\",attrs:{\"title\":row.toAddress}},[_vm._v(_vm._s(row.toAddress))]),_c('el-button',{attrs:{\"type\":\"text\",\"size\":\"mini\",\"icon\":\"el-icon-document-copy\"},on:{\"click\":function($event){$event.stopPropagation();return _vm.handleCopy(row.toAddress, '收款地址')}}},[_vm._v(\"复制\")])],1)]),(row.txHash)?_c('div',{staticClass:\"expand-item\"},[_c('span',{staticClass:\"label\"},[_vm._v(\"交易哈希\")]),_c('div',{staticClass:\"value value-row\"},[_c('span',{staticClass:\"mono-ellipsis\",attrs:{\"title\":row.txHash}},[_vm._v(_vm._s(row.txHash))]),_c('el-button',{attrs:{\"type\":\"text\",\"size\":\"mini\",\"icon\":\"el-icon-document-copy\"},on:{\"click\":function($event){$event.stopPropagation();return _vm.handleCopy(row.txHash, '交易哈希')}}},[_vm._v(\"复制\")])],1)]):_vm._e()])])])}),(!_vm.withdrawRows.length)?_c('div',{staticClass:\"empty\"},[_vm._v(\"暂无提现记录\")]):_vm._e()],2)])]),_c('el-tab-pane',{attrs:{\"label\":\"消费记录\",\"name\":\"consume\"}},[_c('div',{staticClass:\"list-wrap\"},[_c('div',{staticClass:\"list-header\"},[_c('span',{staticClass:\"list-title\"},[_vm._v(\"全部消费 (\"+_vm._s(_vm.consumeRows.length)+\")\")]),_c('el-button',{attrs:{\"type\":\"primary\",\"size\":\"small\"},on:{\"click\":_vm.loadConsume}},[_vm._v(\"刷新\")])],1),_c('div',{directives:[{name:\"loading\",rawName:\"v-loading\",value:(_vm.loading.consume),expression:\"loading.consume\"}],staticClass:\"record-list\"},[_vm._l((_vm.consumeRows),function(row,idx){return _c('div',{key:_vm.getRowKey(row, idx),staticClass:\"record-item\",class:_vm.statusClass(row.status),on:{\"click\":function($event){return _vm.toggleExpand('consume', row, idx)}}},[_c('div',{staticClass:\"item-main\"},[_c('div',{staticClass:\"item-left\"},[_c('div',{staticClass:\"amount\"},[(_vm.formatAmount(row.realAmount, row.fromSymbol).truncated)?_c('el-tooltip',{attrs:{\"content\":`${_vm.formatAmount(row.realAmount, row.fromSymbol).full} ${(row.fromSymbol || 'USDT').toUpperCase()}`,\"placement\":\"top\"}},[_c('span',[_vm._v(\" - \"+_vm._s(_vm.formatAmount(row.realAmount, row.fromSymbol).text)+\" \"+_vm._s((row.fromSymbol || 'USDT').toUpperCase())+\" \"),_c('i',{staticClass:\"el-icon-more amount-more\"})])]):_c('span',[_vm._v(\" - \"+_vm._s(_vm.formatAmount(row.realAmount, row.fromSymbol).text)+\" \"+_vm._s((row.fromSymbol || 'USDT').toUpperCase())+\" \")])],1),_c('div',{staticClass:\"chain\"},[_vm._v(_vm._s(_vm.formatChain(row.fromChain)))])]),_c('div',{staticClass:\"item-right\"},[_c('div',{staticClass:\"status\"},[_c('el-tag',{attrs:{\"type\":_vm.getPayStatusType(row.status),\"size\":\"small\"}},[_vm._v(_vm._s(_vm.getPayStatusText(row.status)))])],1),_c('div',{staticClass:\"time\"},[_vm._v(_vm._s(_vm.formatFullTime(row.createTime || row.time)))])])]),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.isExpanded('consume', row, idx)),expression:\"isExpanded('consume', row, idx)\"}],staticClass:\"expand-panel\"},[_c('div',{staticClass:\"expand-grid\"},[_c('div',{staticClass:\"expand-item\"},[_c('span',{staticClass:\"label\"},[_vm._v(\"订单号\")]),_c('div',{staticClass:\"value value-row\"},[_c('span',{staticClass:\"mono-ellipsis\",attrs:{\"title\":row.orderId}},[_vm._v(_vm._s(row.orderId || ''))]),_c('el-button',{attrs:{\"type\":\"text\",\"size\":\"mini\",\"icon\":\"el-icon-document-copy\"},on:{\"click\":function($event){$event.stopPropagation();return _vm.handleCopy(row.orderId, '订单号')}}},[_vm._v(\"复制\")])],1)]),_c('div',{staticClass:\"expand-item\"},[_c('span',{staticClass:\"label\"},[_vm._v(\"支付地址\")]),_c('div',{staticClass:\"value value-row\"},[_c('span',{staticClass:\"mono-ellipsis\",attrs:{\"title\":row.fromAddress}},[_vm._v(_vm._s(row.fromAddress || ''))]),_c('el-button',{attrs:{\"type\":\"text\",\"size\":\"mini\",\"icon\":\"el-icon-document-copy\"},on:{\"click\":function($event){$event.stopPropagation();return _vm.handleCopy(row.fromAddress, '支付地址')}}},[_vm._v(\"复制\")])],1)]),_c('div',{staticClass:\"expand-item\"},[_c('span',{staticClass:\"label\"},[_vm._v(\"收款地址\")]),_c('div',{staticClass:\"value value-row\"},[_c('span',{staticClass:\"mono-ellipsis\",attrs:{\"title\":row.toAddress}},[_vm._v(_vm._s(row.toAddress || ''))]),_c('el-button',{attrs:{\"type\":\"text\",\"size\":\"mini\",\"icon\":\"el-icon-document-copy\"},on:{\"click\":function($event){$event.stopPropagation();return _vm.handleCopy(row.toAddress, '收款地址')}}},[_vm._v(\"复制\")])],1)]),(row.txHash)?_c('div',{staticClass:\"expand-item\"},[_c('span',{staticClass:\"label\"},[_vm._v(\"交易哈希\")]),_c('div',{staticClass:\"value value-row\"},[_c('span',{staticClass:\"mono-ellipsis\",attrs:{\"title\":row.txHash}},[_vm._v(_vm._s(row.txHash))]),_c('el-button',{attrs:{\"type\":\"text\",\"size\":\"mini\",\"icon\":\"el-icon-document-copy\"},on:{\"click\":function($event){$event.stopPropagation();return _vm.handleCopy(row.txHash, '交易哈希')}}},[_vm._v(\"复制\")])],1)]):_vm._e()])])])}),(!_vm.consumeRows.length)?_c('div',{staticClass:\"empty\"},[_vm._v(\"暂无消费记录\")]):_vm._e()],2)])])],1),_c('el-row',[_c('el-col',{staticStyle:{\"display\":\"flex\",\"justify-content\":\"center\"},attrs:{\"span\":24}},[_c('el-pagination',{staticStyle:{\"margin\":\"0 auto\",\"margin-top\":\"10px\"},attrs:{\"current-page\":_vm.currentPage,\"page-sizes\":_vm.pageSizes,\"page-size\":_vm.pagination.pageSize,\"layout\":\"total, sizes, prev, pager, next, jumper\",\"total\":_vm.total},on:{\"size-change\":_vm.handleSizeChange,\"current-change\":_vm.handleCurrentChange,\"update:currentPage\":function($event){_vm.currentPage=$event},\"update:current-page\":function($event){_vm.currentPage=$event}}})],1)],1)],1)])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n","import mod from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./receiptRecord.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./receiptRecord.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./receiptRecord.vue?vue&type=template&id=115b6a3a&scoped=true\"\nimport script from \"./receiptRecord.vue?vue&type=script&lang=js\"\nexport * from \"./receiptRecord.vue?vue&type=script&lang=js\"\nimport style0 from \"./receiptRecord.vue?vue&type=style&index=0&id=115b6a3a&prod&scoped=true&lang=css\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"115b6a3a\",\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"product-new\"},[_c('el-card',{staticClass:\"product-form-card\"},[_c('div',{staticClass:\"card-header\",attrs:{\"slot\":\"header\"},slot:\"header\"},[_c('h2',[_vm._v(\"新增商品\")]),_c('p',{staticClass:\"subtitle\"},[_vm._v(\"创建新的商品信息\")])]),_c('el-form',{ref:\"productForm\",staticClass:\"product-form\",attrs:{\"model\":_vm.form,\"rules\":_vm.rules,\"label-width\":\"120px\"}},[_c('el-form-item',{attrs:{\"label\":\"商品名称\",\"prop\":\"name\"}},[_c('el-input',{attrs:{\"placeholder\":\"请输入商品名称,如:Nexa-M2-Miner\",\"maxlength\":\"30\",\"show-word-limit\":\"\"},model:{value:(_vm.form.name),callback:function ($$v) {_vm.$set(_vm.form, \"name\", $$v)},expression:\"form.name\"}})],1),_c('el-form-item',{staticClass:\"align-like-input\",attrs:{\"label\":\"商品类型\",\"prop\":\"type\"}},[_c('el-radio-group',{model:{value:(_vm.form.type),callback:function ($$v) {_vm.$set(_vm.form, \"type\", $$v)},expression:\"form.type\"}},[_c('el-radio',{attrs:{\"label\":0}},[_vm._v(\"矿机\")])],1)],1),_c('el-form-item',{attrs:{\"label\":\"挖矿币种\",\"prop\":\"coin\"}},[_c('el-select',{staticStyle:{\"width\":\"100%\"},attrs:{\"placeholder\":\"请选择挖矿币种\"},model:{value:(_vm.form.coin),callback:function ($$v) {_vm.$set(_vm.form, \"coin\", $$v)},expression:\"form.coin\"}},_vm._l((_vm.coinOptions),function(coin){return _c('el-option',{key:coin.value,attrs:{\"label\":coin.label,\"value\":coin.value}})}),1)],1),_c('el-form-item',{attrs:{\"label\":\"商品描述\",\"prop\":\"description\"}},[_c('el-input',{attrs:{\"type\":\"textarea\",\"rows\":4,\"placeholder\":\"请输入商品描述\",\"maxlength\":\"100\",\"show-word-limit\":\"\"},model:{value:(_vm.form.description),callback:function ($$v) {_vm.$set(_vm.form, \"description\", $$v)},expression:\"form.description\"}})],1),_c('el-form-item',{staticClass:\"align-like-input\",attrs:{\"label\":\"商品状态\",\"prop\":\"state\"}},[_c('el-radio-group',{model:{value:(_vm.form.state),callback:function ($$v) {_vm.$set(_vm.form, \"state\", $$v)},expression:\"form.state\"}},[_c('el-radio',{attrs:{\"label\":0}},[_vm._v(\"上架\")]),_c('el-radio',{attrs:{\"label\":1}},[_vm._v(\"下架\")])],1)],1),_c('el-form-item',{staticClass:\"actions-row\"},[_c('div',{staticClass:\"form-actions\"},[_c('el-button',{attrs:{\"type\":\"primary\",\"size\":\"medium\",\"loading\":_vm.submitting},on:{\"click\":_vm.handleSubmit}},[_vm._v(\"创建商品\")]),_c('el-button',{attrs:{\"size\":\"medium\"},on:{\"click\":_vm.handleReset}},[_vm._v(\"重置\")]),_c('el-button',{attrs:{\"size\":\"medium\"},on:{\"click\":_vm.handleCancel}},[_vm._v(\"取消\")])],1)])],1)],1)],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/**\n * @file 路由配置文件\n * @description 定义所有电商页面的路由配置\n */\n\n// 认证相关路由(独立布局,无Header)\nexport const authRoutes = [\n {\n path: '/login',\n name: 'Login',\n component: () => import('../views/auth/login.vue'),\n meta: {\n title: '用户登录',\n description: '登录到您的账户',\n requiresAuth: false // 不需要登录即可访问\n }\n },\n {\n path: '/register',\n name: 'Register',\n component: () => import('../views/auth/register.vue'),\n meta: {\n title: '用户注册',\n description: '创建新账户',\n requiresAuth: false\n }\n },\n {\n path: '/reset-password',\n name: 'ResetPassword',\n component: () => import('../views/auth/reset-password.vue'),\n meta: {\n title: '重置密码',\n description: '重置您的账户密码',\n requiresAuth: false\n }\n }\n]\n\n// 商品相关路由\nexport const productRoutes = [\n {\n path: '/productList',\n name: 'productList',\n \n component: () => import('../views/productList/index.vue'),\n meta: {\n title: '商品列表',\n description: '浏览所有可用商品',\n allAuthority: ['all']\n }\n },\n {\n path: '/product/:id',\n name: 'productDetail',\n component: () => import('../views/productDetail/index.vue'),\n meta: {\n title: '商品详情',\n description: '查看商品详细信息',\n allAuthority: ['all']\n }\n }\n]\n\n// 购物车相关路由\nexport const cartRoutes = [\n {\n path: '/cart',\n name: 'cart',\n component: () => import('../views/cart/index.vue'),\n meta: {\n title: '购物车',\n description: '管理购物车商品',\n allAuthority: ['all']\n }\n }\n]\n\n// 结算相关路由\nexport const checkoutRoutes = [\n {\n path: '/checkout',\n name: 'checkout',\n component: () => import('../views/checkout/index.vue'),\n meta: {\n title: '订单结算',\n description: '完成订单结算',\n allAuthority: ['all']\n }\n }\n]\n\n// 个人中心相关路由\nexport const accountRoutes = [\n {\n path: '/account',\n name: 'account',\n component: () => import('../views/account/index.vue'),\n redirect: '/account/shops',\n meta: {\n title: '个人中心',\n description: '管理个人资料和店铺',\n allAuthority: ['all']\n },\n children: [\n {\n path: 'wallet',\n name: 'Wallet',\n component: () => import('../views/account/wallet.vue'),\n meta: {\n title: '我的钱包',\n description: '查看钱包余额、充值和提现',\n allAuthority: ['all']\n }\n },\n {//充值记录\n path: 'rechargeRecord',\n name: 'RechargeRecord',\n component: () => import('../views/account/rechargeRecord.vue'),\n meta: {\n title: '充值记录',\n description: '查看充值记录',\n allAuthority: ['all']\n }\n },\n {//提现记录\n path: 'withdrawalHistory',\n name: 'WithdrawalHistory',\n component: () => import('../views/account/withdrawalHistory.vue'),\n meta: {\n title: '提现记录',\n description: '查看提现记录',\n allAuthority: ['all']\n }\n },\n {\n path: 'receipt-record',\n name: 'accountReceiptRecord',\n component: () => import('../views/account/receiptRecord.vue'),\n meta: {\n title: '收款记录',\n description: '卖家收款流水记录',\n allAuthority: ['all']\n }\n },\n {\n path: 'withdraw-record',\n name: 'accountWithdrawRecord',\n component: () => import('../views/account/withdrawRecord.vue'),\n meta: {\n title: '提现记录',\n description: '卖家提现流水记录',\n allAuthority: ['all']\n }\n },\n {\n path: 'shop-new',\n name: 'accountShopNew',\n component: () => import('../views/account/shopNew.vue'),\n meta: {\n title: '新增店铺',\n description: '创建新的店铺',\n allAuthority: ['all']\n }\n },\n {\n path: 'shop-config',\n name: 'accountShopConfig',\n component: () => import('../views/account/shopConfig.vue'),\n meta: {\n title: '钱包绑定',\n description: '绑定店铺收款钱包',\n allAuthority: ['all']\n }\n },\n {\n path: 'shops',\n name: 'accountMyShops',\n component: () => import('../views/account/myShops.vue'),\n meta: {\n title: '我的店铺',\n description: '查看我的店铺信息',\n allAuthority: ['all']\n }\n },\n {\n path: 'product-new',\n name: 'accountProductNew',\n component: () => import('../views/account/productNew.vue'),\n meta: {\n title: '新增商品',\n description: '创建新的商品',\n allAuthority: ['all']\n }\n },\n {\n path: 'products',\n name: 'accountProducts',\n component: () => import('../views/account/products.vue'),\n meta: {\n title: '商品列表',\n description: '管理店铺下的商品列表',\n allAuthority: ['all']\n }\n },\n {\n path: 'purchased-machine-config',\n name: 'accountPurchasedMachineConfig',\n component: () => import('../views/account/purchasedMachineConfig.vue'),\n meta: {\n title: '已购商品',\n description: '查看已购买商品的配置信息',\n allAuthority: ['all']\n }\n },\n {\n path: 'purchased-machine-detail/:id',\n name: 'purchasedMachineDetail',\n component: () => import('../views/account/purchasedMachineDetail.vue'),\n meta: {\n title: '已购商品详情',\n description: '查看已购买商品的详细信息',\n allAuthority: ['all']\n }\n },\n {\n path: 'funds-flow',\n name: 'accountFundsFlow',\n component: () => import('../views/account/fundsFlow.vue'),\n meta: {\n title: '资金流水',\n description: '充值/提现/消费记录切换查看',\n allAuthority: ['all']\n }\n },\n {\n path: 'seller-funds-flow',\n name: 'accountSellerFundsFlow',\n component: () => import('../views/account/sellerFundsFlow.vue'),\n meta: {\n title: '资金流水',\n description: '卖家收款/提现流水记录',\n allAuthority: ['all']\n }\n },\n {\n path: 'orders',\n name: 'accountOrders',\n component: () => import('../views/account/orders.vue'),\n meta: {\n title: '订单列表',\n description: '查看与管理订单(按状态筛选)',\n allAuthority: ['all']\n }\n },\n {\n path: 'seller-orders',\n name: 'accountSellerOrders',\n component: () => import('../views/account/SellerOrders.vue'),\n meta: {\n title: '已售出订单',\n description: '卖家侧订单列表',\n allAuthority: ['all']\n }\n },\n {\n path: 'order-detail/:id',\n name: 'accountOrderDetail',\n component: () => import('../views/account/orderDetail.vue'),\n meta: {\n title: '订单详情',\n description: '查看订单详细信息',\n allAuthority: ['all']\n }\n },\n {\n path: 'product-detail/:id',\n name: 'accountProductDetail',\n component: () => import('../views/account/productDetail.vue'),\n meta: {\n title: '商品详情',\n description: '个人中心 - 商品详情',\n allAuthority: ['all']\n }\n },\n {\n path: 'product-machine-add',\n name: 'accountProductMachineAdd',\n component: () => import('../views/account/productMachineAdd.vue'),\n meta: {\n title: '添加出售机器',\n description: '为商品添加出售机器',\n allAuthority: ['all']\n }\n },\n {\n path: 'security-settings',\n name: 'accountSecuritySettings',\n component: () => import('../views/account/securitySettings.vue'),\n meta: {\n title: '安全设置',\n description: '管理账户安全选项',\n allAuthority: ['all']\n }\n }\n ]\n }\n]\n\n// 所有子路由\nexport const childrenRoutes = [\n ...productRoutes,\n ...cartRoutes,\n ...checkoutRoutes,\n ...accountRoutes\n]\n\n// 主路由配置\nexport const mainRoutes = [\n // 认证路由(独立布局,无Header)\n ...authRoutes,\n \n // 主应用路由(带Layout)\n {\n path: '/',\n name: 'Home',\n component: () => import('../Layout/idnex.vue'),\n redirect: '/productList',\n children: childrenRoutes\n },\n \n // 404页面重定向到商品列表\n {\n path: '*',\n redirect: '/productList'\n }\n]\n\nexport default mainRoutes ","import mod from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./shopConfig.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./shopConfig.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./shopConfig.vue?vue&type=template&id=255bc54a&scoped=true\"\nimport script from \"./shopConfig.vue?vue&type=script&lang=js\"\nexport * from \"./shopConfig.vue?vue&type=script&lang=js\"\nimport style0 from \"./shopConfig.vue?vue&type=style&index=0&id=255bc54a&prod&scoped=true&lang=css\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"255bc54a\",\n null\n \n)\n\nexport default component.exports","\n\n\n\n\n\n","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"panel\"},[_c('h2',{staticClass:\"panel-title page-title\"},[_vm._v(\"钱包绑定\")]),_c('div',{directives:[{name:\"loading\",rawName:\"v-loading\",value:(_vm.loading),expression:\"loading\"}],staticClass:\"panel-body\"},[_c('el-form',{staticClass:\"config-form\",attrs:{\"model\":_vm.form,\"label-width\":\"120px\"}},[_c('el-form-item',{attrs:{\"label\":\"选择链/币种\"}},[_c('el-cascader',{staticStyle:{\"width\":\"420px\"},attrs:{\"options\":_vm.options,\"props\":_vm.cascaderProps,\"show-all-levels\":false,\"clearable\":\"\",\"filterable\":\"\"},on:{\"change\":_vm.handleChange,\"expand-change\":_vm.handleExpandChange},scopedSlots:_vm._u([{key:\"default\",fn:function({ node, data }){return [_c('span',{staticClass:\"custom-node\",attrs:{\"aria-label\":\"cascader-item\",\"tabindex\":\"0\"},on:{\"click\":function($event){$event.stopPropagation();return _vm.handleItemClick(node, data)}}},[_c('span',{staticClass:\"node-label\"},[_vm._v(_vm._s(data.label))]),(node.isLeaf && node.checked)?_c('span',{staticClass:\"leaf-checked\",attrs:{\"aria-hidden\":\"true\"}},[_vm._v(\"✓\")]):_vm._e()])]}}]),model:{value:(_vm.value),callback:function ($$v) {_vm.value=$$v},expression:\"value\"}})],1),_c('el-form-item',{attrs:{\"label\":\"已选择币种\"}},[_c('div',{staticClass:\"selected-coins\",attrs:{\"aria-label\":\"selected-coins\",\"tabindex\":\"0\"}},[_vm._l((_vm.selectedCoins),function(coin){return _c('el-tag',{key:coin,attrs:{\"type\":\"warning\",\"effect\":\"light\",\"closable\":\"\",\"disable-transitions\":\"\"},on:{\"close\":function($event){return _vm.handleRemoveSelectedCoin(coin)}}},[_vm._v(\" \"+_vm._s(coin)+\" \")])}),(_vm.selectedCoins.length === 0)?_c('span',{staticClass:\"placeholder\"},[_vm._v(\"未选择\")]):_vm._e()],2)]),_c('el-form-item',{attrs:{\"label\":\"收款钱包地址\"}},[_c('el-input',{attrs:{\"placeholder\":\"请输入\"},model:{value:(_vm.form.payAddress),callback:function ($$v) {_vm.$set(_vm.form, \"payAddress\", $$v)},expression:\"form.payAddress\"}})],1),_c('el-form-item',[_c('el-button',{staticStyle:{\"width\":\"200px\"},attrs:{\"type\":\"primary\"},on:{\"click\":_vm.handleSave}},[_vm._v(\"确认绑定\")])],1)],1),_c('el-dialog',{attrs:{\"visible\":_vm.preCheck.visible,\"width\":\"80vw\",\"close-on-click-modal\":false,\"title\":\"检测到关联商品\"},on:{\"update:visible\":function($event){return _vm.$set(_vm.preCheck, \"visible\", $event)},\"close\":_vm.handlePreCheckClose},scopedSlots:_vm._u([{key:\"footer\",fn:function(){return [_c('el-button',{on:{\"click\":function($event){_vm.preCheck.visible = false}}},[_vm._v(\"取消\")]),_c('el-button',{attrs:{\"type\":\"primary\",\"disabled\":!_vm.canSubmitPreCheck},on:{\"click\":_vm.handleConfirmBindAfterPreview}},[_vm._v(\"继续绑定\")])]},proxy:true}])},[_c('div',{staticStyle:{\"margin-bottom\":\"10px\"}},[_c('el-alert',{attrs:{\"type\":\"warning\",\"closable\":false,\"show-icon\":\"\",\"description\":\"检测到以下商品与本次绑定的链/币相关。继续绑定后,可能需要为这些商品配置该新链下的价格。是否继续?\"}})],1),_c('p',{staticStyle:{\"color\":\"red\",\"font-size\":\"12px\",\"margin-top\":\"6px\",\"text-align\":\"right\"}},[_vm._v(\"* 请填写每个商品对应币种的价格,商品包含机器统一设置价格,如需单台修改请在商品列表-详情页操作\")]),_c('el-table',{attrs:{\"data\":_vm.preCheck.rows,\"height\":\"360\",\"border\":\"\",\"header-cell-style\":{ textAlign: 'left' },\"cell-style\":{ textAlign: 'left' }}},[_c('el-table-column',{attrs:{\"label\":\"商品名称\",\"min-width\":\"160\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_vm._v(_vm._s(scope.row.name || scope.row.productName || scope.row.title || scope.row.product || '-'))]}}])}),_c('el-table-column',{attrs:{\"label\":\"链\",\"min-width\":\"120\"},scopedSlots:_vm._u([{key:\"default\",fn:function(){return [_vm._v(\" \"+_vm._s((_vm.form.chain || '').toUpperCase())+\" \")]},proxy:true}])}),_c('el-table-column',{attrs:{\"label\":\"币种\",\"min-width\":\"120\"},scopedSlots:_vm._u([{key:\"default\",fn:function(){return [_vm._v(\" \"+_vm._s(_vm.form.payCoin.split(',').map(s=>s.trim().toUpperCase()).join(','))+\" \")]},proxy:true}])}),_c('el-table-column',{attrs:{\"label\":\"总矿机数\",\"min-width\":\"100\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_vm._v(_vm._s(scope.row.totalMachineNumber != null ? scope.row.totalMachineNumber : (scope.row.total || scope.row.totalMachines || '-')))]}}])}),_c('el-table-column',{attrs:{\"label\":\"商品状态\",\"min-width\":\"100\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_vm._v(_vm._s(Number(scope.row.state) === 1 ? '下架' : '上架'))]}}])}),_vm._l((_vm.coinsForBind),function(sym){return _c('el-table-column',{key:'price-'+sym,attrs:{\"label\":sym + ' 价格',\"min-width\":\"160\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('el-input',{staticClass:\"price-input\",attrs:{\"size\":\"mini\",\"placeholder\":\"请输入\",\"inputmode\":\"decimal\"},scopedSlots:_vm._u([{key:\"append\",fn:function(){return [_vm._v(_vm._s(sym))]},proxy:true}],null,true),model:{value:(_vm.preCheck.rowPrices[_vm.getRowKey(scope.row, scope.$index)][sym]),callback:function ($$v) {_vm.$set(_vm.preCheck.rowPrices[_vm.getRowKey(scope.row, scope.$index)], sym, $$v)},expression:\"preCheck.rowPrices[getRowKey(scope.row, scope.$index)][sym]\"}})]}}],null,true)})})],2)],1)],1)])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import request from '../utils/request'\r\n\r\n//创建订单及订单详情\r\nexport function addOrders(data) {\r\n return request({\r\n url: `/lease/order/info/addOrders`,\r\n method: 'post',\r\n data\r\n })\r\n}\r\n\r\n\r\n//取消订单\r\nexport function cancelOrder(data) {\r\n return request({\r\n url: `/lease/order/info/cancelOrder`,\r\n method: 'post',\r\n data\r\n })\r\n}\r\n\r\n\r\n//根据订单id查询订单信息\r\nexport function getOrdersByIds(data) {\r\n return request({\r\n url: `/lease/order/info/getOrdersByIds`,\r\n method: 'post',\r\n data\r\n })\r\n}\r\n\r\n\r\n//查询订单列表(买家侧)\r\nexport function getOrdersByStatus(data) {\r\n return request({\r\n url: `/lease/order/info/getOrdersByStatus`,\r\n method: 'post',\r\n data\r\n })\r\n}\r\n\r\n//查询订单列表(卖家侧)\r\nexport function getOrdersByStatusForSeller(data) {\r\n return request({\r\n url: `/lease/order/info/getOrdersByStatusForSeller`,\r\n method: 'post',\r\n data\r\n })\r\n}\r\n\r\n\r\n//结算前链和币种查询\r\nexport function getChainAndListForSeller(data) {\r\n return request({\r\n url: `/lease/shop/getChainAndListForSeller`,\r\n method: 'post',\r\n data\r\n })\r\n}\r\n\r\n//获取实时币价\r\nexport function getCoinPrice(data) {\r\n return request({\r\n url: `/lease/order/info/getCoinPrice`,\r\n method: 'post',\r\n data\r\n })\r\n}\r\n\r\n\r\n//获取支持的算法币种\r\nexport function getMachineSupportCoinAndAlgorithm(data) {\r\n return request({\r\n url: `/lease/v2/order/info/getMachineSupportCoinAndAlgorithm`,\r\n method: 'post',\r\n data\r\n })\r\n}\r\n\r\n//获取支持的矿池 和模型\r\nexport function getMachineSupportPool(data) {\r\n return request({\r\n url: `/lease/v2/order/info/getMachineSupportPool`,\r\n method: 'post',\r\n data\r\n })\r\n}\r\n\r\n\r\n//创建订单\r\nexport function addOrdersV2(data) {\r\n return request({\r\n url: `/lease/v2/order/info/addOrdersV2`,\r\n method: 'post',\r\n data\r\n })\r\n}\r\n\r\n\r\n\r\n\r\n//已购矿机配置\r\nexport function getPurchasedItems(data) {\r\n return request({\r\n url: `/lease/v2/order/info/getPurchasedItems`,\r\n method: 'post',\r\n data\r\n })\r\n}\r\n\r\n//已购商品详情\r\nexport function getPurchasedInfoV2(data) {\r\n return request({\r\n url: `/lease/v2/order/info/getPurchasedInfo`,\r\n method: 'post',\r\n data\r\n })\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n","\r\n\r\n\r\n\r\n\r\n\r\n\r\n","\nimport { getProductById } from '../../utils/productService'\nimport { getMachineInfo, getPayTypes,getShopMachineList,addGoodsV2 } from '../../api/products'\nimport { truncateAmountByCoin, truncateTo6 } from '../../utils/amount'\nimport { getGoodsListV2 } from '../../api/shoppingCart'\n\nexport default {\n name: 'ProductDetail',\n data() {\n return {\n product: null,\n loading: false,\n // 默认展开的行keys\n expandedRowKeys: [],\n selectedMap: {},\n // 新接口:单层矿机列表 & 支付方式\n machineList: [],\n paymentMethodList: [],\n // 筛选状态\n selectedPayKey: null,\n filters: {\n chain: '',\n coin: '',\n minPrice: null,\n maxPrice: null,\n minPower: null,\n maxPower: null,\n minPowerDissipation: null,\n maxPowerDissipation: null,\n unit: 'GH/S'\n },\n // 实际算力单位选项\n powerUnitOptions: ['KH/S', 'MH/S', 'GH/S', 'TH/S', 'PH/S'],\n // 排序状态:true 升序,false 降序\n sortStates: {\n priceSort: true,\n powerSort: true,\n powerDissipationSort: true\n },\n // 当前激活的排序字段(仅当用户点击后才会传参)\n activeSortField: '',\n // 首次进入时是否已按价格币种设置过支付方式筛选默认值\n payFilterDefaultApplied: false,\n params: {\n id: \"\",\n pageNum: 1,\n pageSize: 10,\n\n\n },\n confirmAddDialog: {\n visible: false,\n items: []\n },\n // 购物车中已存在的当前商品机器集合:id 与 user|miner 组合键\n cartMachineIdSet: new Set(),\n cartCompositeKeySet: new Set(),\n cartLoaded: false,\n machinesLoaded: false,\n /**\n * 可展开的产品系列数据\n * 每个系列(group)包含多个可选条目(variants)\n */\n productListData: [\n // {\n // id: 'grp-1',\n // group: 'A系列',\n // summary: {\n // theoryPower: '56T',\n // computingPower: '54T',\n // powerDissipation: '3200W',\n // algorithm: 'power',\n // type: 'A-Pro',\n // count: 3,\n // price: '¥1000+'\n // },\n // variants: [\n // { id: 'A-1', model: 'A1', theoryPower: '14T', computingPower: '13.5T', powerDissipation: '780W', algorithm: 'power', stock: 50, price: 999, quantity: 1 },\n // { id: 'A-2', model: 'A2', theoryPower: '18T', computingPower: '17.2T', powerDissipation: '900W', algorithm: 'power', stock: 40, price: 1299, quantity: 1 },\n // { id: 'A-3', model: 'A3', theoryPower: '24T', computingPower: '23.1T', powerDissipation: '1520W', algorithm: 'power', stock: 30, price: 1699, quantity: 1 }\n // ]\n // },\n // {\n // id: 'grp-2',\n // group: 'B系列',\n // summary: {\n // theoryPower: '72T',\n // computingPower: '70T',\n // powerDissipation: '4100W',\n // algorithm: 'power',\n // type: 'B-Max',\n // count: 2,\n // price: '¥2000+'\n // },\n // variants: [\n // { id: 'B-1', model: 'B1', theoryPower: '32T', computingPower: '31.2T', powerDissipation: '1800W', algorithm: 'power', stock: 28, price: 2199, quantity: 1 },\n // { id: 'B-2', model: 'B2', theoryPower: '40T', computingPower: '38.8T', powerDissipation: '2300W', algorithm: 'power', stock: 18, price: 2699, quantity: 1 }\n // ]\n // }\n ],\n tableData: [\n // {\n // theoryPower: \"55656\",//理论算力\n // computingPower: \"44545\",//实际算力\n // powerDissipation: \"5565\",//功耗\n // algorithm: \"power\",//算法\n // type: \"型号1\",//矿机型号\n // number:2001, \n // cost:\"1000\",//价格 \n // },\n // {\n // theoryPower: \"55656\",//理论算力\n // computingPower: \"44545\",//实际算力\n // powerDissipation: \"5565\",//功耗\n // algorithm: \"power\",//算法\n // type: \"型号1\",//矿机型号\n // number:2001, \n // cost:\"1000\",//价格 \n // },\n // {\n // theoryPower: \"55656\",//理论算力\n // computingPower: \"44545\",//实际算力\n // powerDissipation: \"5565\",//功耗\n // algorithm: \"power\",//算法\n // type: \"型号1\",//矿机型号\n // number:2001, \n // cost:\"1000\",//价格 \n // },\n // {\n // theoryPower: \"55656\",//理论算力\n // computingPower: \"44545\",//实际算力\n // powerDissipation: \"5565\",//功耗\n // algorithm: \"power\",//算法\n // type: \"型号1\",//矿机型号\n // number:2001, \n // cost:\"1000\",//价格 \n // },\n\n ],\n productDetailLoading: false,\n pageSizes: [10, 20, 50],\n currentPage: 1,\n total: 0,\n // 动态列表(模拟渲染)\n dynamicMeta: {},\n dynamicColumns: [],\n dynamicRows: [],\n dynamicSearch: {\n visible: false,\n keyword: ''\n },\n // 矿机种类:0-ASIC,1-GPU(默认GPU)\n machineType: 1,\n \n\n }\n },\n mounted() {\n // 读取用户上次选择的矿机种类(0: ASIC, 1: GPU)\n try{\n const savedType = Number(window && window.localStorage ? window.localStorage.getItem('pl_machineType') : NaN)\n if (savedType === 0 || savedType === 1) {\n this.machineType = savedType\n }\n }catch(e){/* noop */}\n // 不再使用本地模拟数据,动态表格完全依赖后端返回的 columns/rows\n // 仅当路由携带 shopId 时,才发起店铺商品请求\n const routeShopId =\n (this.$route && this.$route.params && (this.$route.params.shopId || this.$route.params.id)) ||\n (this.$route && this.$route.query && this.$route.query.shopId)\n if (routeShopId) {\n this.params.id = routeShopId\n this.product = true\n this.fetchGetMachineInfo(this.buildQueryParams())\n this.fetchPayTypes()\n } else {\n this.$message.warning('缺少店铺ID(shopId),无法加载商品列表')\n this.product = false\n }\n },\n methods: {\n // 动态表格单元格格式化(金额/算力/天数/文本)- 统一最多显示6位小数,hover展示完整\n formatDynamicCell(row, col) {\n try{\n let val = row[col.key]\n if (val === null || val === undefined || val === '') return { text: '—', full: '—', truncated: false }\n if (col.type === 'amount') {\n // 价格列:单位取 priceList 里的 coin;默认取第一条;选择支付方式后按选择展示\n if (col.key === 'price') {\n if (Array.isArray(row.priceList) && row.priceList.length) {\n const pv = this.getDisplayPrice(row)\n const pc = this.getDisplayPriceCoin(row)\n if (pv !== null && pv !== undefined) val = pv\n const nPrice = val\n const t = truncateTo6(nPrice)\n const coinUnit = (pc || '').toString().toUpperCase()\n return {\n text: coinUnit ? `${t.text} ${coinUnit}` : t.text,\n full: coinUnit ? `${t.full} ${coinUnit}` : t.full,\n truncated: t.truncated\n }\n }\n // 无 priceList:仅展示数值,不附加任何单位\n const t = truncateTo6(val)\n return { text: t.text, full: t.full, truncated: t.truncated }\n }\n // 列级优先:若列声明 currency=USDT,则固定展示为 \"xx.xx USDT\"\n const colCurrency = (col.currency || '').toString().toUpperCase()\n if (colCurrency === 'USDT') {\n const t = truncateTo6(val)\n return { text: `${t.text} USDT`, full: `${t.full} USDT`, truncated: t.truncated }\n }\n // 兜底:不再使用 meta 的货币符号,直接返回数值\n const t = truncateTo6(val)\n return { text: t.text, full: t.full, truncated: t.truncated }\n }\n if (col.type === 'hashrate') {\n // 接口已返回带单位的内容,直接返回字符串值,不拼接单位\n const s = String(val || '')\n return { text: s, full: s, truncated: false }\n }\n if (col.type === 'days') {\n const n = Number(val)\n if (!Number.isFinite(n)) return { text: String(val), full: String(val), truncated: false }\n const s = `${Math.floor(n)} 天`\n return { text: s, full: s, truncated: false }\n }\n const s = String(val)\n return { text: s, full: s, truncated: false }\n }catch(e){ return { text: '—', full: '—', truncated: false } }\n },\n /**\n * 如果存在 priceList,则用第一条的 chain|coin 作为默认筛选值,\n * 使“支付方式筛选”与价格列默认展示一致\n */\n ensureDefaultPayFilterFromPrices() {\n try{\n if (this.payFilterDefaultApplied) return\n const rows = Array.isArray(this.dynamicRows) ? this.dynamicRows : []\n const firstWithPriceList = rows.find(r => Array.isArray(r && r.priceList) && r.priceList.length)\n if (!firstWithPriceList) return\n const first = firstWithPriceList.priceList[0]\n const chain = String(first && first.chain || '').trim()\n const coin = String(first && first.coin || '').trim()\n if (!chain && !coin) return\n this.selectedPayKey = `${chain}|${coin}`\n this.filters.chain = chain\n this.filters.coin = coin\n this.payFilterDefaultApplied = true\n }catch(e){ /* noop */ }\n },\n /**\n * 获取行在当前支付方式下的展示价格\n * 优先匹配 selectedPayKey(chain|coin),否则回退 priceList[0];再否则回退 row.price\n */\n getDisplayPrice(row){\n try{\n const list = Array.isArray(row && row.priceList) ? row.priceList : []\n if (!list.length) return row && row.price\n const key = this.selectedPayKey\n if (key) {\n const [chainRaw, coinRaw] = String(key).split('|')\n const chain = String(chainRaw || '').toUpperCase().trim()\n const coin = String(coinRaw || '').toUpperCase().trim()\n const hit = list.find(it =>\n String(it && it.chain).toUpperCase().trim() === chain &&\n String(it && it.coin).toUpperCase().trim() === coin\n )\n if (hit && hit.price !== undefined && hit.price !== null) return hit.price\n }\n const first = list[0]\n if (first && first.price !== undefined && first.price !== null) return first.price\n return row && row.price\n }catch(e){ return row && row.price }\n },\n /**\n * 获取行在当前支付方式下价格的币种(coin)\n */\n getDisplayPriceCoin(row){\n try{\n const list = Array.isArray(row && row.priceList) ? row.priceList : []\n if (!list.length) return ''\n const key = this.selectedPayKey\n if (key) {\n const [chainRaw, coinRaw] = String(key).split('|')\n const chain = String(chainRaw || '').toUpperCase().trim()\n const coin = String(coinRaw || '').toUpperCase().trim()\n const hit = list.find(it =>\n String(it && it.chain).toUpperCase().trim() === chain &&\n String(it && it.coin).toUpperCase().trim() === coin\n )\n if (hit && hit.coin) return String(hit.coin)\n }\n const first = list[0]\n return first && first.coin ? String(first.coin) : ''\n }catch(e){ return '' }\n },\n _truncate(num, decimals=2){\n try{\n const f = Math.pow(10, decimals)\n return (Math.floor(Number(num)*f)/f).toFixed(decimals)\n }catch(e){ return String(num) }\n },\n // 判断是否为“框出来部分”的最后一列(最后一个 hashrate 列)\n isLastHashrateColumn(colIdx){\n try{\n const cols = this.getRenderedColumns()\n for (let i = cols.length - 1; i >= 0; i--) {\n if (String(cols[i] && cols[i].type).toLowerCase() === 'hashrate') {\n return i === colIdx\n }\n }\n return false\n }catch(e){ return false }\n },\n // 仅渲染前 8 个算力列,后接其它非算力列(如收益、回收期)\n getRenderedColumns(){\n try{\n const cols = Array.isArray(this.dynamicColumns) ? this.dynamicColumns : []\n const hashrate = cols.filter(c => String(c && c.type).toLowerCase() === 'hashrate').slice(0, 8)\n const others = cols.filter(c => String(c && c.type).toLowerCase() !== 'hashrate')\n return [...hashrate, ...others]\n }catch(e){ return [] }\n },\n // 打开动态搜索弹窗\n handleOpenDynamicSearch(){\n this.dynamicSearch.visible = true\n this.dynamicSearch.keyword = ''\n },\n // 确认搜索:向后端请求新的 columns/rows,替换动态表格\n async handleConfirmDynamicSearch(){\n const keyword = (this.dynamicSearch.keyword || '').trim()\n this.dynamicSearch.visible = false\n await this.fetchDynamicTable({ shopId: this.params.id, type: 1, keyword })\n },\n // 拉取动态表格数据(占位实现:如果后端已就绪,直接替换为真实接口)\n async fetchDynamicTable(params){\n try{\n // 这里预留与后端对接:\n // 期待返回格式:{ code, data: { meta, columns, rows } }\n // 示例中用本地 mock 演示:根据 keyword 过滤/调整列\n // 如果没有 keyword,就还原初始 mock\n if (!params || !params.keyword) {\n return\n }\n // 简单模拟:当 keyword 命中 'ERG',只保留 ERG + 价格/型号/回收期 等少量列\n const kw = String(params.keyword).toUpperCase()\n const baseCols = (this.dynamicColumns || []).filter(c => ['model','price','maxLeaseDays','monthIncome'].includes(c.key))\n const hitCols = (this.dynamicColumns || []).filter(c => String(c.label || c.key).toUpperCase().includes(kw))\n const nextCols = [...(baseCols.length?baseCols:[this.dynamicColumns[0]||[]]), ...hitCols]\n if (nextCols.length) {\n this.dynamicColumns = nextCols\n // 行数据无需特别处理(真实环境后端会按列同步返回),这里保留原 rows\n }\n }catch(e){\n // eslint-disable-next-line no-console\n console.warn('fetchDynamicTable mock error', e)\n }\n },\n // 切换矿机种类:0-ASIC,1-GPU\n handleMachineTypeChange(){\n // 切换前清空所有已勾选状态与确认弹窗\n try {\n if (Array.isArray(this.dynamicRows)) {\n this.dynamicRows.forEach(r => { if (r) this.$set(r, '_selected', false) })\n }\n if (this.confirmAddDialog) {\n this.confirmAddDialog.items = []\n this.confirmAddDialog.visible = false\n }\n } catch (e) { /* noop */ }\n // 变更类型后,重新请求数据与支付方式\n this.fetchGetMachineInfo(this.buildQueryParams())\n this.fetchPayTypes()\n // 本地记住用户选择\n try{\n if (window && window.localStorage) {\n window.localStorage.setItem('pl_machineType', String(this.machineType))\n }\n }catch(e){/* noop */}\n },\n // 行币种:优先行内 payCoin > coin,其次取全局表头币种\n getRowCoin(row) {\n try {\n const c = (row && (row.payCoin || row.coin)) || this.getPriceCoinSymbol() || ''\n return String(c).toUpperCase()\n } catch (e) { return '' }\n },\n // 金额格式化:不补0、不四舍五入;返回 {text,truncated,full}\n formatAmount(value, coin) {\n return truncateAmountByCoin(value, coin)\n },\n // 数值格式化:最多6位小数,截断不补0\n formatNum6(value) {\n return truncateTo6(value)\n },\n /**\n * 首次加载时,将“支付方式筛选”的默认选中值设为与价格列币种一致,\n * 并同步 filters.chain/filters.coin;仅执行一次,不触发额外查询。\n */\n ensureDefaultPayFilterSelection() {\n try {\n if (this.payFilterDefaultApplied) return\n const payList = Array.isArray(this.paymentMethodList) ? this.paymentMethodList : []\n if (!payList.length) return\n const coinSymbol = (this.getPriceCoinSymbol && this.getPriceCoinSymbol()) || ''\n if (!coinSymbol) return\n const hit = payList.find(it => String(it && it.payCoin).toUpperCase() === String(coinSymbol).toUpperCase())\n if (!hit) return\n const key = `${hit.payChain || ''}|${hit.payCoin || ''}`\n this.selectedPayKey = key\n this.filters.chain = String(hit.payChain || '').trim()\n this.filters.coin = String(hit.payCoin || '').trim()\n this.payFilterDefaultApplied = true\n } catch (e) { /* noop */ }\n },\n // 切换排序:field in ['priceSort','powerSort','powerDissipationSort']\n handleToggleSort(field) {\n try {\n if (!this.sortStates) this.sortStates = {}\n if (this.activeSortField !== field) {\n // 切换到新的字段:默认从升序开始(true)\n // 先将其它字段复位为升序(▲)\n Object.keys(this.sortStates).forEach(k => { this.sortStates[k] = true })\n this.activeSortField = field\n // 后端默认升序,首次点击应为降序\n this.sortStates[field] = false\n } else {\n // 同一字段:升降序切换\n this.sortStates[field] = !this.sortStates[field]\n }\n const params = this.buildQueryParams()\n this.fetchGetMachineInfo(params)\n } catch (e) { /* noop */ }\n },\n // 组合查询参数:店铺入口,必须包含 shopId 与 type(0-ASIC,1-GPU)\n buildQueryParams() {\n const q = { shopId: this.params.id, type: this.machineType }\n // 分页参数始终透传\n try {\n if (this.params && this.params.pageNum != null) q.pageNum = this.params.pageNum\n if (this.params && this.params.pageSize != null) q.pageSize = this.params.pageSize\n } catch (e) { /* noop */ }\n // 仅当用户真实填写(>0)时才传参;默认/空值不传\n const addNum = (obj, key, name) => {\n const raw = obj[key]\n if (raw === null || raw === undefined || raw === '') return\n const n = Number(raw)\n if (Number.isFinite(n) && n > 0) q[name] = n\n }\n // 支付方式条件:有值才传\n if (this.filters.chain && String(this.filters.chain).trim()) q.chain = String(this.filters.chain).trim()\n if (this.filters.coin && String(this.filters.coin).trim()) q.coin = String(this.filters.coin).trim()\n if (this.filters.unit && String(this.filters.unit).trim()) q.unit = String(this.filters.unit).trim()\n addNum(this.filters, 'minPrice', 'minPrice')\n addNum(this.filters, 'maxPrice', 'maxPrice')\n addNum(this.filters, 'minPower', 'minPower')\n addNum(this.filters, 'maxPower', 'maxPower')\n addNum(this.filters, 'minPowerDissipation', 'minPowerDissipation')\n addNum(this.filters, 'maxPowerDissipation', 'maxPowerDissipation')\n // 排序参数:仅在用户点击某一列后传当前列\n try {\n if (this.activeSortField) {\n const s = this.sortStates || {}\n q[this.activeSortField] = !!s[this.activeSortField]\n }\n } catch (e) { /* noop */ }\n return q\n },\n // 拉取支付方式(兼容 shopId)\n async fetchPayTypes() {\n try {\n // 现规则:商品详情由店铺入口进入,使用 shopId 查询支付方式\n // 为兼容后端两种入参,优先传 shopId,后端若仍使用 productId 也能兼容处理\n const res = await getPayTypes({ shopId: this.params.id, productId: this.params.id })\n // 接口示例:{ code: 0, data: [ { payChain, payCoin, payCoinImage, shopId } ], msg: '' }\n if (res && (res.code === 0 || res.code === 200)) {\n const list = Array.isArray(res.data) ? res.data : []\n this.paymentMethodList = list\n // 支付方式加载后尝试设置默认筛选\n this.ensureDefaultPayFilterSelection()\n }\n } catch (e) {\n // 忽略错误,保持页面可用\n this.paymentMethodList = []\n }\n },\n\n async fetchGetMachineInfo(params) {\n this.productDetailLoading = true\n // 改为使用店铺机器列表接口\n const res = await getShopMachineList(params)\n if (res && (res.code === 200 || res.code === 0)) {\n const root = (res && res.data) ? res.data : res\n const columns = Array.isArray(root.columns) ? root.columns : (Array.isArray(res.columns) ? res.columns : [])\n const rows = Array.isArray(root.rows) ? root.rows : (Array.isArray(res.rows) ? res.rows : [])\n const total = Number(root.total != null ? root.total : (res.total != null ? res.total : 0))\n this.total = Number.isFinite(total) ? total : 0\n // 动态表格:列与行\n this.dynamicColumns = columns\n this.dynamicRows = rows.map(r => ({\n saleNumbers: 0,\n saleOutNumbers: 0,\n leaseTime: 1,\n purchaseQuantity: 1,\n _selected: false,\n ...r\n }))\n // 根据 rows 的 priceList 设置默认支付方式\n this.ensureDefaultPayFilterFromPrices()\n // 若后端同步返回支付方式,刷新本地支付方式\n try {\n const payList = root && root.payConfigList\n if (Array.isArray(payList) && payList.length) {\n this.paymentMethodList = payList\n this.ensureDefaultPayFilterSelection()\n }\n } catch (e) { /* noop */ }\n }\n\n this.productDetailLoading = false\n },\n /**\n * 加载商品详情\n */\n async loadProduct() {\n try {\n this.loading = true\n const productId = this.$route.params.id\n this.product = await getProductById(productId)\n\n if (!this.product) {\n this.$message({\n message: '商品不存在',\n type: 'error',\n showClose: true\n })\n }\n } catch (error) {\n console.error('加载商品详情失败:', error)\n this.$message({\n message: '加载商品详情失败,请稍后重试',\n type: 'error',\n showClose: true\n })\n } finally {\n this.loading = false\n }\n },\n //加入购物车\n async fetchAddCart(params) {\n const res = await addCart(params)\n\n return res\n },\n //查询购物车列表\n async fetchGetGoodsList(params) {\n const res = await getGoodsListV2(params)\n // 统计当前商品在购物车中已有的机器ID,用于禁用和默认勾选\n try {\n const productId = this.params && this.params.id ? Number(this.params.id) : Number(this.$route.params.id)\n // 兼容两种返回结构:1) 旧:直接是商品分组数组 2) 新:店铺数组 → shoppingCartInfoDtoList\n const rawRows = Array.isArray(res && res.rows)\n ? res.rows\n : Array.isArray(res && res.data && res.data.rows)\n ? res.data.rows\n : Array.isArray(res && res.data)\n ? res.data\n : []\n // 扁平化为商品分组\n const groups = rawRows.length && rawRows[0] && Array.isArray(rawRows[0].shoppingCartInfoDtoList)\n ? rawRows.flatMap(shop => Array.isArray(shop.shoppingCartInfoDtoList) ? shop.shoppingCartInfoDtoList : [])\n : rawRows\n const matched = groups.filter(g => Number(g.productId) === productId)\n const ids = new Set()\n const compositeKeys = new Set()\n matched.forEach(r => {\n const list = Array.isArray(r.productMachineDtoList) ? r.productMachineDtoList : []\n list.forEach(m => {\n if (!m) return\n if (m.id !== undefined && m.id !== null) ids.add(String(m.id))\n if (m.user && m.miner) compositeKeys.add(`${String(m.user)}|${String(m.miner)}`)\n })\n })\n this.cartMachineIdSet = ids\n this.cartCompositeKeySet = compositeKeys\n // 计算购物车总数量并通知头部,避免页面初次加载时徽标显示为0\n try {\n const totalCount = groups.reduce((sum, g) => sum + (Array.isArray(g && g.productMachineDtoList) ? g.productMachineDtoList.length : 0), 0)\n if (Number.isFinite(totalCount)) {\n window.dispatchEvent(new CustomEvent('cart-updated', { detail: { count: totalCount } }))\n }\n } catch (e) { /* noop */ }\n // 展开表格渲染后,默认勾选并禁用这些行\n this.$nextTick(() => {\n this.cartLoaded = true\n this.autoSelectAndDisable()\n })\n } catch (e) {\n console.warn('解析购物车数据失败', e)\n }\n },\n\n /**\n * 处理返回\n */\n handleBack() {\n this.$router.push('/productList')\n },\n\n\n\n /**\n * 点击系列行:切换展开/收起\n * @param {Object} row - 当前行\n */\n handleSeriesRowClick(row) {\n const key = row.id\n const lockedIds = Object.keys(this.selectedMap).filter(k => (this.selectedMap[k] || []).length > 0)\n const opened = this.expandedRowKeys.includes(key)\n if (opened) {\n // 关闭当前行,仅保留已勾选的行展开\n this.expandedRowKeys = lockedIds\n } else {\n // 打开当前行,同时保留已勾选的行展开\n this.expandedRowKeys = Array.from(new Set([key, ...lockedIds]))\n }\n },\n\n /**\n * 外层系列行样式\n */\n handleGetSeriesRowClassName() {\n return 'series-clickable-row'\n },\n\n // 子表选择变化\n handleInnerSelectionChange(parentRow, selections) {\n const key = parentRow.id\n this.$set(this.selectedMap, key, selections)\n const lockedIds = Object.keys(this.selectedMap).filter(k => (this.selectedMap[k] || []).length > 0)\n // 更新展开:锁定的行始终展开\n const openedSet = new Set(this.expandedRowKeys)\n lockedIds.forEach(id => openedSet.add(id))\n // 清理不再勾选且不是当前展开的行\n this.expandedRowKeys = Array.from(openedSet).filter(id => lockedIds.includes(id) || id === key || this.expandedRowKeys.includes(id))\n },\n\n // 展开行变化时:已取消自动与购物车对比,无需勾选/禁用\n handleExpandChange(row, expandedRows) {\n // no-op\n },\n\n // 已取消对比购物车的自动勾选/禁用逻辑\n autoSelectAndDisable() { },\n\n // 选择器可选控制:已在购物车中的机器不可再选\n isSelectable(row, index) {\n // 不再通过 selectable 禁用,以便勾选可见;通过行样式和交互阻止点击\n return true\n },\n\n // 判断在特定父行下是否已选择(配合自定义checkbox使用)\n isSelectedByParent(parentRow, row) {\n const key = parentRow && parentRow.id\n const list = (key && this.selectedMap[key]) || []\n return !!list.find(it => it && it.id === row.id)\n },\n\n // 手动切换选择(自定义checkbox与 selectedMap 同步),并维护每行的 _selected 状态\n handleManualSelect(parentRow, row, checked) {\n // 禁用:已售出或售出中的机器不可选择\n if (row && (row.saleState === 1 || row.saleState === 2)) {\n this.$message.warning('该机器已售出或售出中,无法选择')\n this.$set(row, '_selected', false)\n return\n }\n // 无价格:不可选择\n try {\n const hasPrice = (Array.isArray(row && row.priceList) && row.priceList.some(it => it && it.price !== null && it.price !== undefined))\n || (row && row.price !== null && row.price !== undefined && row.price !== '')\n if (!hasPrice) {\n this.$message.warning('该机器暂无价格,无法选择')\n this.$set(row, '_selected', false)\n return\n }\n } catch (e) { /* noop */ }\n const key = parentRow.id\n const list = (this.selectedMap[key] && [...this.selectedMap[key]]) || []\n const idx = list.findIndex(it => it && it.id === row.id)\n if (checked && idx === -1) list.push(row)\n if (!checked && idx > -1) list.splice(idx, 1)\n this.$set(this.selectedMap, key, list)\n this.$set(row, '_selected', !!checked)\n },\n\n // 为子表中已在购物车的行添加只读样式,并阻止点击取消\n handleGetInnerRowClass({ row }) {\n if (!row) return ''\n return (row.saleState === 1 || row.saleState === 2) ? 'sold-row' : ''\n },\n\n /**\n * 子行:减少数量\n * @param {number} groupIndex - 系列索引\n * @param {number} variantIndex - 变体索引\n */\n handleDecreaseVariantQuantity(groupIndex, variantIndex) {\n const item = this.productListData[groupIndex].variants[variantIndex]\n if (item.quantity > 1) {\n item.quantity--\n }\n },\n\n /**\n * 子行:增加数量\n * @param {number} groupIndex - 系列索引\n * @param {number} variantIndex - 变体索引\n */\n handleIncreaseVariantQuantity(groupIndex, variantIndex) {\n const item = this.productListData[groupIndex].variants[variantIndex]\n if (item.quantity < 99) {\n item.quantity++\n }\n },\n\n /**\n * 子行:输入数量校验\n * @param {number} groupIndex - 系列索引\n * @param {number} variantIndex - 变体索引\n */\n handleVariantQuantityInput(groupIndex, variantIndex) {\n const item = this.productListData[groupIndex].variants[variantIndex]\n const q = Number(item.quantity)\n if (!q || q < 1) item.quantity = 1\n if (q > 99) item.quantity = 99\n },\n\n /**\n * 子行:加入购物车\n * @param {Object} variant - 子项行数据\n */\n handleAddVariantToCart(variant) {\n if (!variant || !variant.onlyKey) return\n try {\n addToCart({\n id: variant.onlyKey,\n title: variant.model,\n price: variant.price,\n quantity: variant.quantity\n })\n this.$message.success(`已添加 ${variant.quantity} 件 ${variant.model} 到购物车`)\n variant.quantity = 1\n } catch (error) {\n console.error('添加到购物车失败:', error)\n\n }\n },\n // 统一加入购物车\n handleAddSelectedToCart() {\n const allSelected = Object.values(this.selectedMap).flat().filter(Boolean)\n if (!allSelected.length) {\n this.$message.warning('请先勾选至少一台矿机')\n return\n }\n try {\n allSelected.forEach(item => {\n addToCart({\n id: item.onlyKey || item.id,\n title: item.type || item.model || '矿机',\n price: item.price,\n quantity: 1,\n leaseTime: Number(item.leaseTime || 1)\n })\n })\n this.$message.success(`已加入 ${allSelected.length} 台矿机到购物车`)\n this.selectedMap = {}\n } catch (e) {\n console.error('统一加入购物车失败', e)\n\n }\n },\n // 打开确认弹窗(基于动态表格的勾选行)\n handleOpenAddToCartDialog() {\n const rows = Array.isArray(this.dynamicRows) ? this.dynamicRows : []\n const picked = rows.filter(r => !!r && !!r._selected)\n if (!picked.length) {\n this.$message.warning('请先勾选至少一台矿机')\n return\n }\n this.confirmAddDialog.items = picked.map(r => ({\n ...r,\n leaseTime: Number(r.leaseTime || 1),\n purchaseQuantity: Number(r.purchaseQuantity || 1)\n }))\n this.confirmAddDialog.visible = true\n },\n // 确认加入:调用 addGoodsV2(按条提交),GPU 不传 numbers\n async handleConfirmAddSelectedToCart() {\n const items = Array.isArray(this.confirmAddDialog.items) ? this.confirmAddDialog.items.filter(Boolean) : []\n if (!items.length) {\n this.$message.warning('请先勾选至少一台矿机')\n return\n }\n try {\n // 按接口要求:一次性传数组,每个对象代表一个勾选商品\n const payload = items.map(it => {\n const obj = {\n id: it.id,\n leaseTime: Number(it.leaseTime || 1)\n }\n if (this.machineType === 0) {\n obj.numbers = Number(it.purchaseQuantity || 1)\n }\n return obj\n })\n const res = await addGoodsV2(payload)\n if (res && (res.code === 0 || res.code === 200)) {\n this.$message({\n message: `已加入 ${items.length} 台矿机到购物车`,\n type: 'success',\n duration: 3000,\n showClose: true\n })\n }\n \n this.confirmAddDialog.visible = false\n // 清空勾选\n try {\n (this.dynamicRows || []).forEach(r => { if (r) this.$set(r, '_selected', false) })\n } catch (e) { /* noop */ }\n // 通知头部刷新\n try { window.dispatchEvent(new CustomEvent('cart-updated')) } catch (e) { /* noop */ }\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error('addGoodsV2 error:', e)\n this.$message.error('加入购物车失败,请稍后重试')\n }\n },\n\n // 取消所有商品勾选(内层表格的自定义 checkbox)\n clearAllSelections() {\n try {\n // 清空选中映射(遗留字段)\n this.selectedMap = {}\n if (Array.isArray(this.machineList) && this.machineList.length) {\n this.machineList.forEach(m => { if (m) this.$set(m, '_selected', false) })\n return\n }\n const groups = Array.isArray(this.productListData) ? this.productListData : []\n groups.forEach(g => {\n const list = Array.isArray(g.productMachines) ? g.productMachines : []\n list.forEach(m => { if (m) this.$set(m, '_selected', false) })\n })\n } catch (e) { /* noop */ }\n },\n\n /**\n * 减少数量\n * @param {number} rowIndex - 表格行索引\n */\n handleDecreaseQuantity(rowIndex) {\n if (this.tableData[rowIndex].quantity > 1) {\n this.tableData[rowIndex].quantity--\n }\n },\n\n /**\n * 增加数量\n * @param {number} rowIndex - 表格行索引\n */\n handleIncreaseQuantity(rowIndex) {\n if (this.tableData[rowIndex].quantity < 99) {\n this.tableData[rowIndex].quantity++\n }\n },\n\n /**\n * 处理数量输入\n * @param {number} rowIndex - 表格行索引\n */\n handleQuantityInput(rowIndex) {\n const quantity = this.tableData[rowIndex].quantity\n if (quantity < 1) {\n this.tableData[rowIndex].quantity = 1\n } else if (quantity > 99) {\n this.tableData[rowIndex].quantity = 99\n }\n },\n\n /**\n * 处理数量输入框失焦\n * @param {number} rowIndex - 表格行索引\n */\n handleQuantityBlur(rowIndex) {\n const quantity = this.tableData[rowIndex].quantity\n if (!quantity || quantity < 1) {\n this.tableData[rowIndex].quantity = 1\n } else if (quantity > 99) {\n this.tableData[rowIndex].quantity = 99\n }\n },\n\n /**\n * 添加到购物车\n * @param {Object} rowData - 表格行数据\n */\n handleAddToCart(rowData) {\n if (!rowData || rowData.quantity < 1) {\n this.$message.warning('请选择有效的数量')\n return\n }\n\n try {\n addToCart({\n id: rowData.date, // 使用矿机名称作为ID\n title: rowData.date,\n price: rowData.price,\n quantity: rowData.quantity,\n leaseTime: Number(rowData.leaseTime || 1)\n })\n\n this.$message.success(`已添加 ${rowData.quantity} 件 ${rowData.date} 到购物车`)\n\n // 重置数量\n rowData.quantity = 1\n } catch (error) {\n console.error('添加到购物车失败:', error)\n this.$message.error('添加到购物车失败,请稍后重试')\n }\n },\n handleSizeChange(val) {\n console.log(`每页 ${val} 条`);\n this.params.pageSize = val;\n this.params.pageNum = 1;\n this.currentPage = 1;\n // 携带当前激活的排序字段\n this.fetchGetMachineInfo(this.buildQueryParams());\n \n },\n handleCurrentChange(val) {\n console.log(`当前页: ${val}`);\n this.params.pageNum = val;\n // 携带当前激活的排序字段\n this.fetchGetMachineInfo(this.buildQueryParams());\n },\n }\n}","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"auth-container\"},[_vm._m(0),_c('div',{staticClass:\"auth-card\"},[_c('div',{staticClass:\"close-btn\",attrs:{\"title\":\"返回商城\"},on:{\"click\":_vm.goToShop}},[_c('i',{staticClass:\"el-icon-close\"})]),_vm._m(1),_c('el-form',{ref:\"loginForm\",staticClass:\"auth-form\",attrs:{\"model\":_vm.loginForm,\"rules\":_vm.loginRules},nativeOn:{\"submit\":function($event){$event.preventDefault();return _vm.handleLogin.apply(null, arguments)}}},[_c('el-form-item',{attrs:{\"prop\":\"email\"}},[_c('el-input',{attrs:{\"placeholder\":\"请输入邮箱\",\"prefix-icon\":\"el-icon-message\",\"size\":\"large\",\"clearable\":\"\"},nativeOn:{\"keyup\":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"enter\",13,$event.key,\"Enter\"))return null;return _vm.handleLogin.apply(null, arguments)}},model:{value:(_vm.loginForm.email),callback:function ($$v) {_vm.$set(_vm.loginForm, \"email\", $$v)},expression:\"loginForm.email\"}})],1),_c('el-form-item',{attrs:{\"prop\":\"password\"}},[_c('el-input',{attrs:{\"type\":\"password\",\"placeholder\":\"请输入密码(8-32位)\",\"prefix-icon\":\"el-icon-lock\",\"size\":\"large\",\"show-password\":\"\",\"clearable\":\"\"},nativeOn:{\"keyup\":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"enter\",13,$event.key,\"Enter\"))return null;return _vm.handleLogin.apply(null, arguments)}},model:{value:(_vm.loginForm.password),callback:function ($$v) {_vm.$set(_vm.loginForm, \"password\", $$v)},expression:\"loginForm.password\"}}),_c('div',{staticClass:\"password-tip\"},[_c('i',{staticClass:\"el-icon-info\"}),_c('span',[_vm._v(\"密码需包含大小写字母、数字和特殊字符,长度8-32位\")])])],1),_c('el-form-item',{attrs:{\"prop\":\"code\"}},[_c('div',{staticClass:\"code-input-wrapper\"},[_c('el-input',{attrs:{\"placeholder\":\"请输入邮箱验证码\",\"prefix-icon\":\"el-icon-key\",\"size\":\"large\",\"maxlength\":\"10\",\"clearable\":\"\"},nativeOn:{\"keyup\":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"enter\",13,$event.key,\"Enter\"))return null;return _vm.handleLogin.apply(null, arguments)}},model:{value:(_vm.loginForm.code),callback:function ($$v) {_vm.$set(_vm.loginForm, \"code\", $$v)},expression:\"loginForm.code\"}}),_c('el-button',{staticClass:\"send-code-btn\",attrs:{\"type\":\"primary\",\"size\":\"large\",\"disabled\":_vm.countdown > 0,\"loading\":_vm.sendingCode},on:{\"click\":_vm.handleSendCode}},[_vm._v(\" \"+_vm._s(_vm.countdown > 0 ? `${_vm.countdown}秒后重试` : '获取验证码')+\" \")])],1)]),_c('div',{staticClass:\"auth-options\"},[_c('span'),_c('router-link',{staticClass:\"link-text\",attrs:{\"to\":\"/reset-password\"}},[_vm._v(\" 忘记密码? \")])],1),_c('el-form-item',[_c('el-button',{staticClass:\"auth-submit-btn\",attrs:{\"type\":\"primary\",\"size\":\"large\",\"loading\":_vm.loading},on:{\"click\":_vm.handleLogin}},[_vm._v(\" \"+_vm._s(_vm.loading ? '登录中...' : '登录')+\" \")])],1),_c('div',{staticClass:\"auth-footer\"},[_c('span',{staticClass:\"footer-text\"},[_vm._v(\"还没有账号?\")]),_c('router-link',{staticClass:\"link-text link-primary\",attrs:{\"to\":\"/register\"}},[_vm._v(\" 立即注册 \")])],1)],1)],1)])\n}\nvar staticRenderFns = [function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"auth-background\"},[_c('div',{staticClass:\"bg-circle circle-1\"}),_c('div',{staticClass:\"bg-circle circle-2\"}),_c('div',{staticClass:\"bg-circle circle-3\"})])\n},function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"auth-header\"},[_c('h1',{staticClass:\"auth-title\"},[_vm._v(\"欢迎登录\")]),_c('p',{staticClass:\"auth-subtitle\"},[_vm._v(\"Power Leasing - 算力租赁平台\")])])\n}]\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n\r\n\r\n\r\n","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{directives:[{name:\"loading\",rawName:\"v-loading\",value:(_vm.statusLoading),expression:\"statusLoading\"}],staticClass:\"security-settings\"},[_c('div',{staticClass:\"security-item-wrapper\"},[_c('div',{staticClass:\"security-item\"},[_vm._m(0),_c('div',{staticClass:\"security-right\"},[_c('span',{staticClass:\"security-status\",class:_vm.getStatusClass},[_vm._v(\" \"+_vm._s(_vm.getStatusText)+\" \")]),_c('el-button',{staticClass:\"security-btn two-factor-btn\",attrs:{\"type\":\"text\",\"loading\":_vm.loading},on:{\"click\":_vm.handleButtonClick}},[_vm._v(\" \"+_vm._s(_vm.getButtonText)+\" \")])],1)]),_c('div',{staticClass:\"security-divider\"})]),_c('div',{staticClass:\"security-item-wrapper\"},[_c('div',{staticClass:\"security-item\"},[_vm._m(1),_c('div',{staticClass:\"security-right\"},[_c('el-button',{staticClass:\"security-btn change-password-btn\",attrs:{\"type\":\"text\"},on:{\"click\":_vm.handleChangePassword}},[_vm._v(\" 修改 \")])],1)]),_c('div',{staticClass:\"security-divider\"})]),_c('div',{staticClass:\"security-item-wrapper\"},[_c('div',{staticClass:\"security-item\"},[_vm._m(2),_c('div',{staticClass:\"security-right\"},[_c('el-button',{staticClass:\"security-btn delete-account-btn\",attrs:{\"type\":\"text\"},on:{\"click\":_vm.handleDeleteAccount}},[_vm._v(\" 注销 \")])],1)]),_c('div',{staticClass:\"security-divider\"})]),_c('el-dialog',{attrs:{\"title\":\"开启双重验证 - 步骤 1/2\",\"visible\":_vm.step1Visible,\"width\":\"600px\",\"close-on-click-modal\":false},on:{\"update:visible\":function($event){_vm.step1Visible=$event},\"close\":_vm.handleStep1Close}},[_c('div',{staticClass:\"step1-content\"},[_c('div',{staticClass:\"instruction-text\"},[_c('p',[_vm._v(\"请使用您手机上的谷歌身份验证器 (Google Authenticator) 或其它兼容应用程序扫描下方二维码,也可手动输入以下密钥。\")])]),_c('div',{staticClass:\"qr-section\"},[(_vm.qrCodeUrl)?_c('div',{staticClass:\"qr-code-wrapper\"},[_c('img',{staticClass:\"qr-code\",attrs:{\"src\":_vm.getQrCodeSrc,\"alt\":\"二维码\"}})]):_c('div',{staticClass:\"qr-loading\"},[_c('i',{staticClass:\"el-icon-loading\"}),_c('span',[_vm._v(\"加载中...\")])])]),_c('div',{staticClass:\"secret-key-section\"},[_c('div',{staticClass:\"secret-key-label\"},[_vm._v(\"或手动输入密钥:\")]),_c('div',{staticClass:\"secret-key-input-group\"},[_c('el-input',{staticClass:\"secret-key-input\",attrs:{\"readonly\":\"\"},model:{value:(_vm.secretKey),callback:function ($$v) {_vm.secretKey=$$v},expression:\"secretKey\"}}),_c('el-button',{attrs:{\"type\":\"primary\",\"disabled\":!_vm.secretKey},on:{\"click\":_vm.handleCopySecret}},[_vm._v(\" 复制 \")])],1)]),_c('div',{staticClass:\"warning-box\"},[_c('i',{staticClass:\"el-icon-warning\"}),_c('div',{staticClass:\"warning-text\"},[_c('p',[_vm._v(\"请妥善保存密钥,避免被盗或丢失。如遇手机丢失等情况,可通过该密钥恢复您的谷歌验证。如密钥丢失,需要提交工单通过人工客服重置,处理时间需7天。\")])])])]),_c('span',{staticClass:\"dialog-footer\",attrs:{\"slot\":\"footer\"},slot:\"footer\"},[_c('el-button',{on:{\"click\":function($event){_vm.step1Visible = false}}},[_vm._v(\"取消\")]),_c('el-button',{attrs:{\"type\":\"primary\",\"disabled\":!_vm.qrCodeUrl || !_vm.secretKey},on:{\"click\":_vm.handleNextToStep2}},[_vm._v(\" 下一步 \")])],1)]),_c('el-dialog',{attrs:{\"title\":\"开启双重验证 - 步骤 2/2\",\"visible\":_vm.step2Visible,\"width\":\"500px\",\"close-on-click-modal\":false},on:{\"update:visible\":function($event){_vm.step2Visible=$event},\"close\":_vm.handleStep2Close}},[_c('el-form',{ref:\"verifyForm\",attrs:{\"model\":_vm.verifyForm,\"rules\":_vm.verifyRules,\"label-position\":\"top\"}},[_c('el-form-item',{attrs:{\"label\":\"登录密码\",\"prop\":\"password\"}},[_c('el-input',{attrs:{\"type\":\"password\",\"placeholder\":\"请输入密码(8-32位)\",\"show-password\":\"\",\"clearable\":\"\"},model:{value:(_vm.verifyForm.password),callback:function ($$v) {_vm.$set(_vm.verifyForm, \"password\", $$v)},expression:\"verifyForm.password\"}}),_c('div',{staticClass:\"password-tip\"},[_c('i',{staticClass:\"el-icon-info\"}),_c('span',[_vm._v(\"密码需包含大小写字母、数字和特殊字符,长度8-32位\")])])],1),_c('el-form-item',{attrs:{\"label\":\"邮箱验证码\",\"prop\":\"emailCode\"}},[_c('div',{staticClass:\"code-input-group\"},[_c('el-input',{staticClass:\"code-input\",attrs:{\"placeholder\":\"请输入邮箱验证码\",\"maxlength\":\"10\",\"clearable\":\"\"},model:{value:(_vm.verifyForm.emailCode),callback:function ($$v) {_vm.$set(_vm.verifyForm, \"emailCode\", $$v)},expression:\"verifyForm.emailCode\"}}),_c('el-button',{attrs:{\"type\":\"primary\",\"loading\":_vm.sendingCode,\"disabled\":_vm.countdown > 0},on:{\"click\":_vm.handleSendEmailCode}},[_vm._v(\" \"+_vm._s(_vm.countdown > 0 ? `${_vm.countdown}秒后重试` : '发送验证码')+\" \")])],1),_c('div',{staticClass:\"help-link\"},[_c('a',{attrs:{\"href\":\"javascript:void(0)\"},on:{\"click\":_vm.handleCannotGetCode}},[_vm._v(\"无法获取验证码?\")])])]),_c('el-form-item',{attrs:{\"label\":\"谷歌验证码\",\"prop\":\"googleCode\"}},[_c('el-input',{attrs:{\"placeholder\":\"请输入6位动态口令\",\"maxlength\":\"6\"},on:{\"input\":_vm.handleGoogleCodeInput},model:{value:(_vm.verifyForm.googleCode),callback:function ($$v) {_vm.$set(_vm.verifyForm, \"googleCode\", $$v)},expression:\"verifyForm.googleCode\"}}),_c('div',{staticClass:\"help-link\"},[_c('a',{attrs:{\"href\":\"javascript:void(0)\"},on:{\"click\":_vm.handleCannotGetGoogleCode}},[_vm._v(\"无法获取验证码?\")])])],1)],1),_c('span',{staticClass:\"dialog-footer\",attrs:{\"slot\":\"footer\"},slot:\"footer\"},[_c('el-button',{on:{\"click\":_vm.handleBackToStep1}},[_vm._v(\"上一步\")]),_c('el-button',{attrs:{\"type\":\"primary\",\"loading\":_vm.submitting},on:{\"click\":_vm.handleConfirm}},[_vm._v(\" 确定 \")])],1)],1),_c('el-dialog',{attrs:{\"title\":\"关闭双重验证\",\"visible\":_vm.closeDialogVisible,\"width\":\"500px\",\"close-on-click-modal\":false},on:{\"update:visible\":function($event){_vm.closeDialogVisible=$event},\"close\":_vm.handleCloseDialogClose}},[_c('el-form',{ref:\"closeForm\",attrs:{\"model\":_vm.closeForm,\"rules\":_vm.closeRules,\"label-position\":\"top\"}},[_c('el-form-item',{attrs:{\"label\":\"邮箱验证码\",\"prop\":\"emailCode\"}},[_c('div',{staticClass:\"code-input-group\"},[_c('el-input',{staticClass:\"code-input\",attrs:{\"placeholder\":\"请输入邮箱验证码\",\"maxlength\":\"10\",\"clearable\":\"\"},model:{value:(_vm.closeForm.emailCode),callback:function ($$v) {_vm.$set(_vm.closeForm, \"emailCode\", $$v)},expression:\"closeForm.emailCode\"}}),_c('el-button',{attrs:{\"type\":\"primary\",\"loading\":_vm.sendingCloseCode,\"disabled\":_vm.closeCountdown > 0},on:{\"click\":_vm.handleSendCloseEmailCode}},[_vm._v(\" \"+_vm._s(_vm.closeCountdown > 0 ? `${_vm.closeCountdown}秒后重试` : '发送验证码')+\" \")])],1)]),_c('el-form-item',{attrs:{\"label\":\"谷歌验证码\",\"prop\":\"googleCode\"}},[_c('el-input',{attrs:{\"placeholder\":\"请输入6位动态口令\",\"maxlength\":\"6\",\"clearable\":\"\"},on:{\"input\":_vm.handleCloseGoogleCodeInput},model:{value:(_vm.closeForm.googleCode),callback:function ($$v) {_vm.$set(_vm.closeForm, \"googleCode\", $$v)},expression:\"closeForm.googleCode\"}})],1)],1),_c('span',{staticClass:\"dialog-footer\",attrs:{\"slot\":\"footer\"},slot:\"footer\"},[_c('el-button',{on:{\"click\":function($event){_vm.closeDialogVisible = false}}},[_vm._v(\"取消\")]),_c('el-button',{attrs:{\"type\":\"primary\",\"loading\":_vm.closing},on:{\"click\":_vm.handleConfirmClose}},[_vm._v(\" 确定 \")])],1)],1),_c('el-dialog',{attrs:{\"title\":\"开启双重验证\",\"visible\":_vm.openDialogVisible,\"width\":\"500px\",\"close-on-click-modal\":false},on:{\"update:visible\":function($event){_vm.openDialogVisible=$event},\"close\":_vm.handleOpenDialogClose}},[_c('el-form',{ref:\"openForm\",attrs:{\"model\":_vm.openForm,\"rules\":_vm.openRules,\"label-position\":\"top\"}},[_c('el-form-item',{attrs:{\"label\":\"邮箱验证码\",\"prop\":\"emailCode\"}},[_c('div',{staticClass:\"code-input-group\"},[_c('el-input',{staticClass:\"code-input\",attrs:{\"placeholder\":\"请输入邮箱验证码\",\"maxlength\":\"10\",\"clearable\":\"\"},model:{value:(_vm.openForm.emailCode),callback:function ($$v) {_vm.$set(_vm.openForm, \"emailCode\", $$v)},expression:\"openForm.emailCode\"}}),_c('el-button',{attrs:{\"type\":\"primary\",\"loading\":_vm.sendingOpenCode,\"disabled\":_vm.openCountdown > 0},on:{\"click\":_vm.handleSendOpenEmailCode}},[_vm._v(\" \"+_vm._s(_vm.openCountdown > 0 ? `${_vm.openCountdown}秒后重试` : '发送验证码')+\" \")])],1)]),_c('el-form-item',{attrs:{\"label\":\"谷歌验证码\",\"prop\":\"googleCode\"}},[_c('el-input',{attrs:{\"placeholder\":\"请输入6位动态口令\",\"maxlength\":\"6\",\"clearable\":\"\"},on:{\"input\":_vm.handleOpenGoogleCodeInput},model:{value:(_vm.openForm.googleCode),callback:function ($$v) {_vm.$set(_vm.openForm, \"googleCode\", $$v)},expression:\"openForm.googleCode\"}})],1)],1),_c('span',{staticClass:\"dialog-footer\",attrs:{\"slot\":\"footer\"},slot:\"footer\"},[_c('el-button',{on:{\"click\":function($event){_vm.openDialogVisible = false}}},[_vm._v(\"取消\")]),_c('el-button',{attrs:{\"type\":\"primary\",\"loading\":_vm.opening},on:{\"click\":_vm.handleConfirmOpen}},[_vm._v(\" 确定 \")])],1)],1),_c('el-dialog',{attrs:{\"title\":\"修改密码\",\"visible\":_vm.changePasswordDialogVisible,\"width\":\"500px\",\"close-on-click-modal\":false},on:{\"update:visible\":function($event){_vm.changePasswordDialogVisible=$event},\"close\":_vm.handleChangePasswordDialogClose}},[_c('el-form',{ref:\"changePasswordForm\",attrs:{\"model\":_vm.changePasswordForm,\"rules\":_vm.changePasswordRules,\"label-position\":\"top\"}},[_c('el-form-item',{attrs:{\"label\":\"用户邮箱\"}},[_c('el-input',{staticClass:\"email-display\",attrs:{\"value\":_vm.userEmail,\"readonly\":\"\",\"disabled\":\"\"}})],1),_c('el-form-item',{attrs:{\"label\":\"邮箱验证码\",\"prop\":\"emailCode\"}},[_c('div',{staticClass:\"code-input-group\"},[_c('el-input',{staticClass:\"code-input\",attrs:{\"placeholder\":\"请输入邮箱验证码\",\"maxlength\":\"10\",\"clearable\":\"\"},model:{value:(_vm.changePasswordForm.emailCode),callback:function ($$v) {_vm.$set(_vm.changePasswordForm, \"emailCode\", $$v)},expression:\"changePasswordForm.emailCode\"}}),_c('el-button',{attrs:{\"type\":\"primary\",\"loading\":_vm.sendingChangePasswordCode,\"disabled\":_vm.changePasswordCountdown > 0},on:{\"click\":_vm.handleSendChangePasswordCode}},[_vm._v(\" \"+_vm._s(_vm.changePasswordCountdown > 0 ? `${_vm.changePasswordCountdown}秒后重试` : '获取验证码')+\" \")])],1)]),_c('el-form-item',{attrs:{\"label\":\"新密码\",\"prop\":\"password\"}},[_c('el-input',{attrs:{\"type\":\"password\",\"placeholder\":\"请输入新密码(8-32位)\",\"show-password\":\"\",\"clearable\":\"\"},model:{value:(_vm.changePasswordForm.password),callback:function ($$v) {_vm.$set(_vm.changePasswordForm, \"password\", $$v)},expression:\"changePasswordForm.password\"}}),_c('div',{staticClass:\"password-tip\"},[_c('i',{staticClass:\"el-icon-info\"}),_c('span',[_vm._v(\"密码需包含大小写字母、数字和特殊字符,长度8-32位\")])])],1),_c('el-form-item',{attrs:{\"label\":\"确认新密码\",\"prop\":\"confirmPassword\"}},[_c('el-input',{attrs:{\"type\":\"password\",\"placeholder\":\"请再次输入新密码\",\"show-password\":\"\",\"clearable\":\"\"},model:{value:(_vm.changePasswordForm.confirmPassword),callback:function ($$v) {_vm.$set(_vm.changePasswordForm, \"confirmPassword\", $$v)},expression:\"changePasswordForm.confirmPassword\"}})],1),_c('el-form-item',{attrs:{\"label\":\"谷歌验证码\",\"prop\":\"googleCode\"}},[_c('el-input',{attrs:{\"placeholder\":\"请输入6位动态口令\",\"maxlength\":\"6\",\"clearable\":\"\"},on:{\"input\":_vm.handleChangePasswordGoogleCodeInput},model:{value:(_vm.changePasswordForm.googleCode),callback:function ($$v) {_vm.$set(_vm.changePasswordForm, \"googleCode\", $$v)},expression:\"changePasswordForm.googleCode\"}})],1)],1),_c('span',{staticClass:\"dialog-footer\",attrs:{\"slot\":\"footer\"},slot:\"footer\"},[_c('el-button',{on:{\"click\":function($event){_vm.changePasswordDialogVisible = false}}},[_vm._v(\"取消\")]),_c('el-button',{attrs:{\"type\":\"primary\",\"loading\":_vm.changingPassword},on:{\"click\":_vm.handleConfirmChangePassword}},[_vm._v(\" 确认修改 \")])],1)],1),_c('el-dialog',{attrs:{\"title\":\"注销账号\",\"visible\":_vm.deleteAccountDialogVisible,\"width\":\"500px\",\"close-on-click-modal\":false},on:{\"update:visible\":function($event){_vm.deleteAccountDialogVisible=$event},\"close\":_vm.handleDeleteAccountDialogClose}},[_c('el-form',{ref:\"deleteAccountForm\",attrs:{\"model\":_vm.deleteAccountForm,\"rules\":_vm.deleteAccountRules,\"label-position\":\"top\"}},[_c('el-form-item',{attrs:{\"label\":\"用户邮箱\"}},[_c('el-input',{staticClass:\"email-display\",attrs:{\"value\":_vm.userEmail,\"readonly\":\"\",\"disabled\":\"\"}})],1),_c('el-form-item',{attrs:{\"label\":\"邮箱验证码\",\"prop\":\"emailCode\"}},[_c('div',{staticClass:\"code-input-group\"},[_c('el-input',{staticClass:\"code-input\",attrs:{\"placeholder\":\"请输入邮箱验证码\",\"maxlength\":\"10\",\"clearable\":\"\"},model:{value:(_vm.deleteAccountForm.emailCode),callback:function ($$v) {_vm.$set(_vm.deleteAccountForm, \"emailCode\", $$v)},expression:\"deleteAccountForm.emailCode\"}}),_c('el-button',{attrs:{\"type\":\"primary\",\"loading\":_vm.sendingDeleteAccountCode,\"disabled\":_vm.deleteAccountCountdown > 0},on:{\"click\":_vm.handleSendDeleteAccountCode}},[_vm._v(\" \"+_vm._s(_vm.deleteAccountCountdown > 0 ? `${_vm.deleteAccountCountdown}秒后重试` : '获取验证码')+\" \")])],1)]),_c('el-form-item',{attrs:{\"label\":\"谷歌验证码\",\"prop\":\"googleCode\"}},[_c('el-input',{attrs:{\"placeholder\":\"请输入6位动态口令\",\"maxlength\":\"6\",\"clearable\":\"\"},on:{\"input\":_vm.handleDeleteAccountGoogleCodeInput},model:{value:(_vm.deleteAccountForm.googleCode),callback:function ($$v) {_vm.$set(_vm.deleteAccountForm, \"googleCode\", $$v)},expression:\"deleteAccountForm.googleCode\"}})],1)],1),_c('span',{staticClass:\"dialog-footer\",attrs:{\"slot\":\"footer\"},slot:\"footer\"},[_c('el-button',{on:{\"click\":function($event){_vm.deleteAccountDialogVisible = false}}},[_vm._v(\"取消\")]),_c('el-button',{attrs:{\"type\":\"danger\",\"loading\":_vm.deletingAccount},on:{\"click\":_vm.handleConfirmDeleteAccount}},[_vm._v(\" 确定注销 \")])],1)],1)],1)\n}\nvar staticRenderFns = [function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"security-left\"},[_c('div',{staticClass:\"security-icon\"},[_c('i',{staticClass:\"el-icon-lock\"})]),_c('div',{staticClass:\"security-info\"},[_c('div',{staticClass:\"security-title\"},[_vm._v(\"双重验证\")]),_c('p',{staticClass:\"security-desc\"},[_vm._v(\"用于登录帐户、结算订单、提现、修改登录密码等,涉及账户安全的重要操作。\")])])])\n},function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"security-left\"},[_c('div',{staticClass:\"security-icon\"},[_c('i',{staticClass:\"el-icon-edit\"})]),_c('div',{staticClass:\"security-info\"},[_c('div',{staticClass:\"security-title\"},[_vm._v(\"修改密码\")]),_c('p',{staticClass:\"security-desc\"},[_vm._v(\"定期修改密码可以提高账户安全性,建议使用强密码并定期更换。\")])])])\n},function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"security-left\"},[_c('div',{staticClass:\"security-icon\"},[_c('i',{staticClass:\"el-icon-warning\"})]),_c('div',{staticClass:\"security-info\"},[_c('div',{staticClass:\"security-title\"},[_vm._v(\"注销账号\")]),_c('p',{staticClass:\"security-desc\"},[_vm._v(\"注销账号将永久删除您的账户和所有相关数据,此操作不可恢复,请谨慎操作。\")])])])\n}]\n\nexport { render, staticRenderFns }","import mod from \"-!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./header.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./header.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./header.vue?vue&type=template&id=67d9e74a&scoped=true\"\nimport script from \"./header.vue?vue&type=script&lang=js\"\nexport * from \"./header.vue?vue&type=script&lang=js\"\nimport style0 from \"./header.vue?vue&type=style&index=0&id=67d9e74a&prod&scoped=true&lang=css\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"67d9e74a\",\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"purchased-machine-detail\"},[_c('div',{staticClass:\"toolbar\"},[_c('div',{staticClass:\"left-area\"},[_c('el-button',{staticClass:\"back-btn\",attrs:{\"type\":\"text\",\"icon\":\"el-icon-arrow-left\"},on:{\"click\":_vm.handleBack}},[_vm._v(\" 返回 \")]),_c('h2',{staticClass:\"page-title\"},[_vm._v(\"已购商品详情\")])],1)]),_c('div',{directives:[{name:\"loading\",rawName:\"v-loading\",value:(_vm.loading),expression:\"loading\"}],staticClass:\"detail-content\"},[(_vm.detailData)?_c('el-card',{staticClass:\"detail-card\"},[_c('div',{staticClass:\"card-header\",attrs:{\"slot\":\"header\"},slot:\"header\"},[_c('span',[_vm._v(\"基本信息\")])]),_c('el-descriptions',{attrs:{\"column\":2,\"border\":\"\"}},[_c('el-descriptions-item',{attrs:{\"label\":\"挖矿账户\"}},[_vm._v(\" \"+_vm._s(_vm.detailData.poolUser || '—')+\" \")]),_c('el-descriptions-item',{attrs:{\"label\":\"矿池名称\"}},[_vm._v(\" \"+_vm._s(_vm.detailData.pool || '—')+\" \")]),_c('el-descriptions-item',{attrs:{\"label\":\"矿池挖矿地址\"}},[(_vm.detailData.poolUrl)?_c('div',{staticClass:\"address-item\"},[_c('span',{staticClass:\"mono-ellipsis\"},[_vm._v(_vm._s(_vm.detailData.poolUrl))]),_c('el-button',{staticClass:\"copy-btn\",attrs:{\"type\":\"text\",\"size\":\"mini\",\"icon\":\"el-icon-document-copy\"},on:{\"click\":function($event){return _vm.handleCopy(_vm.detailData.poolUrl, '矿池挖矿地址')}}},[_vm._v(\" 复制 \")])],1):_c('span',[_vm._v(\"—\")])]),_c('el-descriptions-item',{attrs:{\"label\":\"矿池所挖币种\"}},[_vm._v(\" \"+_vm._s(_vm.detailData.coin || '—')+\" \")]),_c('el-descriptions-item',{attrs:{\"label\":\"币种对应算法\"}},[_vm._v(\" \"+_vm._s(_vm.detailData.algorithm || '—')+\" \")]),_c('el-descriptions-item',{attrs:{\"label\":\"收款钱包\"}},[(_vm.detailData.walletAddress)?_c('div',{staticClass:\"address-item\"},[_c('span',{staticClass:\"mono-ellipsis\",staticStyle:{\"font-family\":\"monospace\"}},[_vm._v(_vm._s(_vm.detailData.walletAddress))]),_c('el-button',{staticClass:\"copy-btn\",attrs:{\"type\":\"text\",\"size\":\"mini\",\"icon\":\"el-icon-document-copy\"},on:{\"click\":function($event){return _vm.handleCopy(_vm.detailData.walletAddress, '收款钱包')}}},[_vm._v(\" 复制 \")])],1):_c('span',[_vm._v(\"—\")])]),(_vm.detailData.watchUrl)?_c('el-descriptions-item',{attrs:{\"label\":\"挖矿信息页面地址\"}},[_c('div',{staticClass:\"address-item\"},[_c('span',{staticClass:\"mono-ellipsis\"},[_vm._v(_vm._s(_vm.detailData.watchUrl))]),_c('el-button',{staticClass:\"copy-btn\",attrs:{\"type\":\"text\",\"size\":\"mini\",\"icon\":\"el-icon-document-copy\"},on:{\"click\":function($event){return _vm.handleCopy(_vm.detailData.watchUrl, '挖矿信息页面地址')}}},[_vm._v(\" 复制 \")])],1)]):_vm._e()],1)],1):_vm._e(),(_vm.detailData)?_c('el-card',{staticClass:\"detail-card\"},[_c('div',{staticClass:\"card-header\",attrs:{\"slot\":\"header\"},slot:\"header\"},[_c('span',[_vm._v(\"已购矿机信息\")])]),(_vm.purchasedMachinesList && _vm.purchasedMachinesList.length > 0)?_c('el-table',{staticStyle:{\"width\":\"100%\"},attrs:{\"data\":_vm.purchasedMachinesList,\"border\":\"\",\"stripe\":\"\",\"header-cell-style\":{ textAlign: 'left' },\"cell-style\":{ textAlign: 'left' }}},[_c('el-table-column',{attrs:{\"prop\":\"workerId\",\"label\":\"矿工号\",\"min-width\":\"120\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('span',[_vm._v(_vm._s(scope.row.workerId || '—'))])]}}],null,false,3323832681)}),_c('el-table-column',{attrs:{\"prop\":\"power\",\"label\":\"实时算力\",\"min-width\":\"140\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('span',[_vm._v(_vm._s(scope.row.power || '—'))])]}}],null,false,1271444333)}),_c('el-table-column',{attrs:{\"prop\":\"recordTime\",\"label\":\"最近实时算力记录时间\",\"min-width\":\"180\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('span',[_vm._v(_vm._s(_vm.formatDateTime(scope.row.recordTime)))])]}}],null,false,889773213)}),_c('el-table-column',{attrs:{\"prop\":\"startTime\",\"label\":\"挖矿开始时间\",\"min-width\":\"160\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('span',[_vm._v(_vm._s(_vm.formatDateTime(scope.row.startTime)))])]}}],null,false,1820455728)}),_c('el-table-column',{attrs:{\"prop\":\"endTime\",\"label\":\"挖矿结束时间\",\"min-width\":\"160\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('span',[_vm._v(_vm._s(_vm.formatDateTime(scope.row.endTime)))])]}}],null,false,1075225151)}),_c('el-table-column',{attrs:{\"prop\":\"status\",\"label\":\"状态\",\"width\":\"140\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('el-tag',{attrs:{\"type\":_vm.getStatusType(scope.row.status)}},[_vm._v(\" \"+_vm._s(_vm.getStatusText(scope.row.status))+\" \")])]}}],null,false,2263538733)})],1):_c('div',{staticClass:\"empty-table\"},[_c('p',[_vm._v(\"暂无矿机信息\")])])],1):_vm._e(),(!_vm.loading && !_vm.detailData)?_c('div',{staticClass:\"empty-state\"},[_c('p',[_vm._v(\"未找到详情信息\")])]):_vm._e()],1)])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n","// 金额截断显示工具(不补0、不四舍五入)\n// 规则:\n// - USDT: 最多6位小数\n// - ETH: 最多8位小数\n// - 其他币种: 最多6位小数\n// 返回 { text, truncated, full }\n\nexport function getMaxDecimalsByCoin() {\n // 全站统一:最多 6 位小数\n return 6;\n}\n\nexport function truncateAmountRaw(value, maxDecimals) {\n if (value === null || value === undefined) {\n return { text: '0', truncated: false, full: '0' };\n }\n const raw = String(value);\n if (!raw) return { text: '0', truncated: false, full: '0' };\n // 非数字字符串直接返回原值\n if (!/^-?\\d+(\\.\\d+)?$/.test(raw)) {\n return { text: raw, truncated: false, full: raw };\n }\n const isNegative = raw.startsWith('-');\n const abs = isNegative ? raw.slice(1) : raw;\n const [intPart, decPart = ''] = abs.split('.');\n const keep = decPart.slice(0, Math.max(0, maxDecimals));\n const truncated = decPart.length > maxDecimals;\n const text = (isNegative ? '-' : '') + (keep ? `${intPart}.${keep}` : intPart);\n return { text, truncated, full: raw };\n}\n\nexport function truncateAmountByCoin(value, coin) {\n const max = getMaxDecimalsByCoin(coin);\n return truncateAmountRaw(value, max);\n}\n\n// 默认 6 位截断(非币种语境也可复用)\nexport function truncateTo6(value) {\n return truncateAmountRaw(value, 6);\n}\n\n","// 全局 loading 状态管理器\r\nclass LoadingManager {\r\n constructor() {\r\n this.loadingStates = new Map(); // 存储所有 loading 状态\r\n this.setupListeners();\r\n }\r\n \r\n setupListeners() {\r\n // 监听网络重试完成事件\r\n window.addEventListener('network-retry-complete', () => {\r\n this.resetAllLoadingStates();\r\n });\r\n }\r\n \r\n // 设置 loading 状态\r\n setLoading(componentId, stateKey, value) {\r\n const key = `${componentId}:${stateKey}`;\r\n this.loadingStates.set(key, {\r\n value,\r\n timestamp: Date.now()\r\n });\r\n }\r\n \r\n // 获取 loading 状态\r\n getLoading(componentId, stateKey) {\r\n const key = `${componentId}:${stateKey}`;\r\n const state = this.loadingStates.get(key);\r\n return state ? state.value : false;\r\n }\r\n \r\n // 重置所有 loading 状态\r\n resetAllLoadingStates() {\r\n // 清除所有处于加载状态的组件\r\n const componentsToUpdate = [];\r\n \r\n this.loadingStates.forEach((state, key) => {\r\n if (state.value === true) {\r\n const [componentId, stateKey] = key.split(':');\r\n componentsToUpdate.push({ componentId, stateKey });\r\n this.loadingStates.set(key, { value: false, timestamp: Date.now() });\r\n }\r\n });\r\n \r\n // 使用事件通知各组件更新\r\n window.dispatchEvent(new CustomEvent('reset-loading-states', {\r\n detail: { componentsToUpdate }\r\n }));\r\n }\r\n \r\n // 重置特定组件的所有 loading 状态\r\n resetComponentLoadingStates(componentId) {\r\n const componentsToUpdate = [];\r\n \r\n this.loadingStates.forEach((state, key) => {\r\n if (key.startsWith(`${componentId}:`) && state.value === true) {\r\n const stateKey = key.split(':')[1];\r\n componentsToUpdate.push({ componentId, stateKey });\r\n this.loadingStates.set(key, { value: false, timestamp: Date.now() });\r\n }\r\n });\r\n \r\n return componentsToUpdate;\r\n }\r\n }\r\n \r\n // 创建单例实例\r\n const loadingManager = new LoadingManager();\r\n export default loadingManager;","import mod from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./index.vue?vue&type=template&id=e9fc8b4a&scoped=true\"\nimport script from \"./index.vue?vue&type=script&lang=js\"\nexport * from \"./index.vue?vue&type=script&lang=js\"\nimport style0 from \"./index.vue?vue&type=style&index=0&id=e9fc8b4a&prod&scoped=true&lang=css\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"e9fc8b4a\",\n null\n \n)\n\nexport default component.exports","import mod from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./SellerOrders.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./SellerOrders.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./SellerOrders.vue?vue&type=template&id=b8adaf98&scoped=true\"\nimport script from \"./SellerOrders.vue?vue&type=script&lang=js\"\nexport * from \"./SellerOrders.vue?vue&type=script&lang=js\"\nimport style0 from \"./SellerOrders.vue?vue&type=style&index=0&id=b8adaf98&prod&scoped=true&lang=css\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"b8adaf98\",\n null\n \n)\n\nexport default component.exports","import Vue from 'vue'\nimport Vuex from 'vuex'\n\nVue.use(Vuex)\n\nexport default new Vuex.Store({\n state: {\n },\n getters: {\n },\n mutations: {\n },\n actions: {\n },\n modules: {\n }\n})\n","import mod from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./productDetail.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./productDetail.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./productDetail.vue?vue&type=template&id=69d09b20&scoped=true\"\nimport script from \"./productDetail.vue?vue&type=script&lang=js\"\nexport * from \"./productDetail.vue?vue&type=script&lang=js\"\nimport style0 from \"./productDetail.vue?vue&type=style&index=0&id=69d09b20&prod&scoped=true&lang=css\"\nimport style1 from \"./productDetail.vue?vue&type=style&index=1&id=69d09b20&prod&lang=css\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"69d09b20\",\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"funds-page\"},[_c('h3',{staticClass:\"title\"},[_vm._v(\"资金流水\")]),_c('div',{staticClass:\"tabs-card\",attrs:{\"aria-label\":\"资金流水tab\",\"tabindex\":\"0\"}},[_c('el-tabs',{on:{\"tab-click\":_vm.handleTabClick},model:{value:(_vm.activeTab),callback:function ($$v) {_vm.activeTab=$$v},expression:\"activeTab\"}},[_c('el-tab-pane',{attrs:{\"label\":\"收款记录\",\"name\":\"receipt\"}}),_c('el-tab-pane',{attrs:{\"label\":\"提现记录\",\"name\":\"withdraw\"}})],1),_c('keep-alive',[_c(_vm.activeComponentName,{tag:\"component\"})],1)],1)])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{directives:[{name:\"loading\",rawName:\"v-loading\",value:(_vm.productListLoading),expression:\"productListLoading\"}],staticClass:\"product-list\"},[_c('section',{staticClass:\"container\"},[_c('h1',{staticClass:\"page-title\"},[_vm._v(\"商品列表\")]),_c('section',{staticClass:\"filter-section\"},[_c('div',{staticClass:\"filter-row\"},[_c('el-input',{staticClass:\"search-input\",attrs:{\"size\":\"middle\",\"placeholder\":\"输入币种或算法搜索\",\"clearable\":\"\"},on:{\"clear\":_vm.handleAlgorithmClear},nativeOn:{\"keyup\":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"enter\",13,$event.key,\"Enter\"))return null;return _vm.handleAlgorithmSearch.apply(null, arguments)}},scopedSlots:_vm._u([{key:\"append\",fn:function(){return [_c('el-button',{attrs:{\"type\":\"primary\"},on:{\"click\":_vm.handleAlgorithmSearch}},[_vm._v(\"搜索\")])]},proxy:true}]),model:{value:(_vm.searchAlgorithm),callback:function ($$v) {_vm.searchAlgorithm=$$v},expression:\"searchAlgorithm\"}})],1)]),_c('div',{staticClass:\"product-list-grid\"},[_vm._l((_vm.products),function(product,idx){return _c('div',{key:product.shopId || product.id || idx,staticClass:\"product-item\",attrs:{\"tabindex\":\"0\",\"aria-label\":\"查看详情\"},on:{\"click\":function($event){return _vm.handleProductClick(product)}}},[_c('img',{staticClass:\"product-image\",attrs:{\"src\":require(\"../../assets/imgs/commodity.png\"),\"alt\":product.name}}),_c('div',{staticClass:\"product-info\"},[_c('h4',{staticClass:\"title-line\"},[_c('span',{staticClass:\"label\"},[_vm._v(\"店铺:\")]),_c('span',{staticClass:\"value ellipsis\",attrs:{\"title\":product.shopName || product.name}},[_vm._v(_vm._s(product.shopName || product.name))])]),_c('p',{staticClass:\"info-line coin-line\"},[_c('span',{staticClass:\"label\"},[_vm._v(\"币种:\")]),_c('el-tooltip',{attrs:{\"content\":product.coin,\"placement\":\"top\",\"open-delay\":80}},[_c('span',{staticClass:\"value ellipsis\",attrs:{\"tabindex\":\"0\",\"aria-label\":`币种 ${product.coin}`}},[_vm._v(_vm._s(product.coin))])])],1),_c('p',{staticClass:\"info-line algorithm-line\"},[_c('span',{staticClass:\"label\"},[_vm._v(\"算法:\")]),_c('el-tooltip',{attrs:{\"content\":product.algorithm,\"placement\":\"top\",\"open-delay\":80}},[_c('span',{staticClass:\"value ellipsis\",attrs:{\"tabindex\":\"0\",\"aria-label\":`算法 ${product.algorithm}`}},[_vm._v(_vm._s(product.algorithm))])])],1),_c('div',{staticClass:\"product-footer\"},[_c('div',{staticClass:\"paytypes\"},[_c('span',{staticClass:\"paytypes-label\"},[_vm._v(\"支付方式:\")]),_vm._l(((product.payTypes || [])),function(pt,idx){return _c('el-tooltip',{key:idx,attrs:{\"content\":_vm.formatPayType(pt),\"placement\":\"top\",\"open-delay\":80}},[_c('img',{staticClass:\"paytype-icon\",attrs:{\"src\":pt.image,\"alt\":_vm.formatPayType(pt)}})])})],2),_c('div',{staticClass:\"right-meta\"},[_c('span',{staticClass:\"product-sold\",attrs:{\"aria-label\":\"已售数量\"}},[_vm._v(\"已售:\"+_vm._s(product && product.saleNumber != null ? product.saleNumber : 0))])])])])])}),(_vm.products.length === 0 && !_vm.productListLoading)?_c('div',{staticClass:\"empty-state\"},[_c('i',{staticClass:\"el-icon-goods\"}),_c('p',[_vm._v(\"暂无商品数据\")]),_c('p',{staticStyle:{\"font-size\":\"12px\",\"color\":\"#999\",\"margin-top\":\"8px\"}},[_vm._v(\"请检查网络连接或联系管理员\")])]):_vm._e()],2)])])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n\r\n\r\n\r\n","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"content-container\"},[_c('router-view')],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./index.vue?vue&type=template&id=c3bf12ce&scoped=true\"\nimport script from \"./index.vue?vue&type=script&lang=js\"\nexport * from \"./index.vue?vue&type=script&lang=js\"\nimport style0 from \"./index.vue?vue&type=style&index=0&id=c3bf12ce&prod&scoped=true&lang=css\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"c3bf12ce\",\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"orders-page\"},[_c('h2',{staticClass:\"title\"},[_vm._v(\"订单列表\")]),_c('el-tabs',{on:{\"tab-click\":_vm.handleTabClick},model:{value:(_vm.active),callback:function ($$v) {_vm.active=$$v},expression:\"active\"}},[_c('el-tab-pane',{attrs:{\"label\":\"订单进行中\",\"name\":\"7\"}},[_c('order-list',{attrs:{\"items\":_vm.orders[7],\"show-checkout\":true,\"on-cancel\":_vm.handleCancelOrder,\"empty-text\":\"暂无进行中的订单\"}})],1),_c('el-tab-pane',{attrs:{\"label\":\"订单已完成\",\"name\":\"8\"}},[_c('order-list',{attrs:{\"items\":_vm.orders[8],\"show-checkout\":false,\"empty-text\":\"暂无已完成的订单\"}})],1)],1)],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import request from '../utils/request'\r\n\r\n//商品列表\r\nexport function getAddShop(data) {\r\n return request({\r\n url: `/lease/shop/addShop`,\r\n method: 'post',\r\n data\r\n })\r\n}\r\n\r\n// 我的店铺(获取当前用户店铺信息)\r\nexport function getMyShop(params) {\r\n return request({\r\n url: `/lease/shop/getShopByUserEmail`,\r\n method: 'get',\r\n params\r\n })\r\n}\r\n\r\n// 更新店铺\r\nexport function updateShop(data) {\r\n return request({\r\n url: `/lease/shop/updateShop`,\r\n method: 'post',\r\n data\r\n })\r\n}\r\n\r\n// 删除店铺\r\nexport function deleteShop(id) {\r\n return request({\r\n url: `/lease/shop/deleteShop`,\r\n method: 'post',\r\n data: { id }\r\n })\r\n}\r\n\r\n// 查询店铺信息(根据ID)\r\nexport function queryShop(data) {\r\n return request({\r\n url: `/lease/shop/getShopById`,\r\n method: 'post',\r\n data\r\n })\r\n}\r\n\r\n// 关闭店铺\r\nexport function closeShop(id) {\r\n return request({\r\n url: `/lease/shop/closeShop`,\r\n method: 'post',\r\n data: { id }\r\n })\r\n}\r\n\r\n// 根据 店铺id 查询店铺商品配置信息列表\r\nexport function getShopConfig(id) {\r\n return request({\r\n url: `/lease/shop/getShopConfig`,\r\n method: 'post',\r\n data: { id }\r\n })\r\n}\r\n\r\n\r\n// 新增商铺配置\r\nexport function addShopConfig(data) {\r\n return request({\r\n url: `/lease/shop/addShopConfig`,\r\n method: 'post',\r\n data\r\n })\r\n}\r\n\r\n// 根据配置id 修改配置\r\nexport function updateShopConfig(data) {\r\n return request({\r\n url: `/lease/shop/updateShopConfig`,\r\n method: 'post',\r\n data\r\n })\r\n}\r\n\r\n// 根据配置id 删除配置\r\nexport function deleteShopConfig(data) {\r\n return request({\r\n url: `/lease/shop/deleteShopConfig`,\r\n method: 'post',\r\n data\r\n })\r\n}\r\n\r\n\r\n// 钱包配置(用于修改卖家钱包地址)----获取链(一级)和币(二级) 下拉列表(获取本系统支持的链和币种)\r\nexport function getChainAndCoin(data) {\r\n return request({\r\n url: `/lease/shop/getChainAndCoin`,\r\n method: 'post',\r\n data\r\n })\r\n}\r\n\r\n\r\n// 卖家绑定钱包明细\r\nexport function getShopConfigV2(data) {\r\n return request({\r\n url: `/lease/v2/shop/getShopConfigV2`,\r\n method: 'post',\r\n data\r\n })\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import axios from 'axios'\nimport errorCode from './errorCode'\nimport { Notification, MessageBox, Message } from 'element-ui'\nimport loadingManager from './loadingManager';\nimport errorNotificationManager from './errorNotificationManager';\n\n \nconst pendingRequestMap = new Map(); //处理Request aborted 错误\n\nfunction getRequestKey(config) { //处理Request aborted 错误 生成唯一 key 的函数\n const { url, method, params, data } = config;\n return [url, method, JSON.stringify(params), JSON.stringify(data)].join('&');\n}\n// 创建axios实例\nconst service = axios.create({\n // axios中请求配置有baseURL选项,表示请求URL公共部分\n baseURL: process.env.VUE_APP_BASE_API,\n // 超时\n timeout: 10000,\n})\n\n// 网络错误相关配置\nconst NETWORK_ERROR_THROTTLE_TIME = 5000; // 错误提示节流时间\nconst RETRY_DELAY = 2000; // 重试间隔时间\nconst MAX_RETRY_TIMES = 3; // 最大重试次数\nconst RETRY_WINDOW = 60000; // 60秒重试窗口\nlet lastNetworkErrorTime = 0; // 上次网络错误提示时间\nlet pendingRequests = new Map();\n\n\n// 网络状态监听器\n// 网络状态最后提示时间\nlet lastNetworkStatusTime = {\n online: 0,\n offline: 0\n};\n\n// 创建一个全局标志,确保每次网络恢复只显示一次提示\nlet networkRecoveryInProgress = false;\n\n// 网络状态监听器\nwindow.addEventListener('online', () => {\n const now = Date.now();\n \n // 避免短时间内多次触发\n if (networkRecoveryInProgress) {\n console.log('[网络] 网络恢复处理已在进行中,忽略重复事件');\n return;\n }\n \n networkRecoveryInProgress = true;\n \n // 严格检查是否应该显示提示\n if (now - lastNetworkStatusTime.online > 30000) { // 30秒内不重复提示\n lastNetworkStatusTime.online = now;\n \n try {\n if (window.vm && window.vm.$message) {\n // 确保消息只显示一次\n window.vm.$message({\n message: window.vm.$i18n.t('home.networkReconnected') || '网络已重新连接,正在恢复数据...',\n type: 'success',\n duration: 5000,\n showClose: true,\n });\n console.log('[网络] 显示网络恢复提示, 时间:', new Date().toLocaleTimeString());\n }\n } catch (e) {\n console.error('[网络] 显示网络恢复提示失败:', e);\n }\n } else {\n console.log('[网络] 抑制重复的网络恢复提示, 间隔过短:', now - lastNetworkStatusTime.online + 'ms');\n }\n\n // 网络恢复时,重试所有待处理的请求\n const pendingPromises = [];\n \n pendingRequests.forEach(async (request, key) => {\n if (now - request.timestamp <= RETRY_WINDOW) {\n try {\n // 获取新的响应数据\n const response = await service(request.config);\n pendingPromises.push(response);\n \n // 执行请求特定的回调\n if (request.callback && typeof request.callback === 'function') {\n request.callback(response);\n }\n \n // 处理特定类型的请求\n if (window.vm) {\n // 处理图表数据请求\n if (request.config.url.includes('getPoolPower') && response && response.data) {\n // 触发图表更新事件\n window.dispatchEvent(new CustomEvent('chart-data-updated', { \n detail: { type: 'poolPower', data: response.data } \n }));\n }\n else if (request.config.url.includes('getNetPower') && response && response.data) {\n window.dispatchEvent(new CustomEvent('chart-data-updated', { \n detail: { type: 'netPower', data: response.data } \n }));\n }\n else if (request.config.url.includes('getBlockInfo') && response && response.rows) {\n window.dispatchEvent(new CustomEvent('chart-data-updated', { \n detail: { type: 'blockInfo', data: response.rows } \n }));\n }\n }\n \n pendingRequests.delete(key);\n } catch (error) {\n console.error('重试请求失败:', error);\n pendingRequests.delete(key);\n }\n } else {\n pendingRequests.delete(key);\n }\n });\n \n // 等待所有请求完成\n Promise.allSettled(pendingPromises).then(() => {\n // 重置所有 loading 状态\n if (loadingManager) {\n loadingManager.resetAllLoadingStates();\n }\n \n // 手动重置一些关键的 loading 状态\n if (window.vm) {\n // 常见的加载状态\n const commonLoadingProps = [\n 'minerChartLoading', 'reportBlockLoading', 'apiPageLoading', \n 'MiningLoading', 'miniLoading', 'bthLoading', 'editLoading'\n ];\n \n commonLoadingProps.forEach(prop => {\n if (typeof window.vm[prop] !== 'undefined') {\n window.vm[prop] = false;\n }\n });\n\n // 重置所有以Loading结尾的状态\n Object.keys(window.vm).forEach(key => {\n if (key.endsWith('Loading')) {\n window.vm[key] = false;\n }\n });\n\n\n }\n \n // 触发网络重试完成事件\n window.dispatchEvent(new CustomEvent('network-retry-complete'));\n \n // 重置网络恢复标志\n setTimeout(() => {\n networkRecoveryInProgress = false;\n }, 5000); // 5秒后允许再次处理网络恢复\n });\n});\n\n // 使用错误提示管理器控制网络断开提示\nwindow.addEventListener('offline', () => {\n if (window.vm && window.vm.$message && errorNotificationManager.canShowError('networkOffline')) {\n window.vm.$message({\n message: window.vm.$i18n.t('home.networkOffline') || '网络连接已断开,系统将在恢复连接后自动重试',\n type: 'error',\n duration: 5000,\n showClose: true,\n });\n }\n});\n\nservice.defaults.retry = 2;// 重试次数\nservice.defaults.retryDelay = 2000;\nservice.defaults.shouldRetry = (error) => {\n // 只有网络错误或超时错误才进行重试\n return error.message === \"Network Error\" || error.message.includes(\"timeout\");\n};\n\nlocalStorage.setItem('superReportError', \"\")\nlet superReportError = localStorage.getItem('superReportError')\nwindow.addEventListener(\"setItem\", () => {\n superReportError = localStorage.getItem('superReportError')\n});\n\n// request拦截器\nservice.interceptors.request.use(config => {\n superReportError = \"\"\n // retryCount =0\n localStorage.setItem('superReportError', \"\")\n // 是否需要设置 token\n let token\n try {\n token = JSON.parse(localStorage.getItem('leasToken'))\n } catch (e) {\n console.log(e);\n }\n if (token) {\n config.headers['Authorization'] = token\n }\n\nconsole.log(token,\"if就覅飞机飞机\");\n\n if (config.method == 'get' && config.data) {\n config.params = config.data\n }\n // get请求映射params参数\n if (config.method === 'get' && config.params) {\n let url = config.url + '?';\n for (const propName of Object.keys(config.params)) {\n const value = config.params[propName];\n var part = encodeURIComponent(propName) + \"=\";\n if (value !== null && typeof (value) !== \"undefined\") {\n if (typeof value === 'object') {\n for (const key of Object.keys(value)) {\n if (value[key] !== null && typeof (value[key]) !== 'undefined') {\n let params = propName + '[' + key + ']';\n let subPart = encodeURIComponent(params) + '=';\n url += subPart + encodeURIComponent(value[key]) + '&';\n }\n }\n } else {\n url += part + encodeURIComponent(value) + \"&\";\n }\n }\n }\n url = url.slice(0, -1);\n config.params = {};\n config.url = url;\n }\n\n // 生成请求唯一key 处理Request aborted 错误\n const requestKey = getRequestKey(config);\n\n // 如果有相同请求,先取消 处理Request aborted 错误\n if (pendingRequestMap.has(requestKey)) {\n const cancel = pendingRequestMap.get(requestKey);\n cancel(); // 取消上一次请求\n pendingRequestMap.delete(requestKey);\n }\n\n // 创建新的CancelToken 处理Request aborted 错误\n config.cancelToken = new axios.CancelToken(cancel => {\n pendingRequestMap.set(requestKey, cancel);\n });\n\n return config\n}, error => {\n Promise.reject(error)\n})\n\n// 响应拦截器\nservice.interceptors.response.use(res => {\n\n // 请求完成后移除\n const requestKey = getRequestKey(res.config);\n pendingRequestMap.delete(requestKey);\n \n // 特殊处理:如果是 blob 类型响应(文件下载),直接返回原始响应对象\n // 因为 blob 数据不是 JSON,不能解析 res.data.code\n if (res.config.responseType === 'blob' || res.data instanceof Blob) {\n // 检查响应状态码\n if (res.status >= 200 && res.status < 300) {\n return res // 返回完整响应对象,包含 headers 等信息\n } else {\n // blob 响应但状态码异常,尝试读取错误信息\n return Promise.reject(new Error(`下载失败,状态码: ${res.status}`))\n }\n }\n \n // 未设置状态码则默认成功状态\n const code = res.data.code || 200;\n // 获取错误信息\n const msg = errorCode[code] || res.data.msg || errorCode['default']\n if (code === 421) {\n localStorage.setItem('cs_disconnect_all', Date.now().toString()); //告知客服页面断开连接\n localStorage.removeItem('leasToken')\n // 触发登录状态变化事件,通知头部组件更新\n window.dispatchEvent(new CustomEvent('login-status-changed'))\n // 系统状态已过期,请重新点击SUPPORT按钮进入 \n superReportError = localStorage.getItem('superReportError')\n if (!superReportError) {\n superReportError = 421\n localStorage.setItem('superReportError', superReportError)\n \n // 获取 i18n 文本,如果 window.vm 不存在则使用默认中文\n const getText = (key, defaultValue) => {\n if (window.vm && window.vm.$i18n) {\n return window.vm.$i18n.t(key) || defaultValue\n }\n return defaultValue\n }\n \n // 获取路由跳转路径\n const getLoginPath = () => {\n if (window.vm && window.vm.$i18n && window.vm.$i18n.locale) {\n return `/${window.vm.$i18n.locale}/login`\n }\n return '/login'\n }\n \n const getHomePath = () => {\n if (window.vm && window.vm.$i18n && window.vm.$i18n.locale) {\n return `/${window.vm.$i18n.locale}/`\n }\n return '/'\n }\n \n MessageBox.confirm(\n getText('user.loginExpired', '登录状态已过期'), \n getText('user.overduePrompt', '您的登录状态已过期,请重新登录'), \n {\n distinguishCancelAndClose: true,\n confirmButtonText: getText('user.login', '登录'),\n cancelButtonText: getText('user.Home', '返回首页'),\n closeOnClickModal: false, // 点击空白处不关闭对话框\n showClose: false, // 隐藏关闭按钮\n type: 'warning'\n }\n ).then(() => {\n // 跳转到登录页\n if (window.vm && window.vm.$router) {\n window.vm.$router.push(getLoginPath())\n } else {\n window.location.href = getLoginPath()\n }\n localStorage.removeItem('token')\n localStorage.removeItem('superReportError')\n }).catch(() => {\n // 跳转到首页\n if (window.vm && window.vm.$router) {\n window.vm.$router.push(getHomePath())\n } else {\n window.location.href = getHomePath()\n }\n localStorage.removeItem('leasToken')\n localStorage.removeItem('superReportError')\n });\n }\n\n\n return Promise.reject('登录状态已过期')\n } else if (code >= 500 && !superReportError) {\n superReportError = 500\n localStorage.setItem('superReportError', superReportError)\n Message({\n dangerouslyUseHTMLString: true,\n message: msg,\n type: 'error',\n showClose: true\n })\n // throw msg; // 抛出错误,中断请求链并触发后续的错误处理逻辑\n // return Promise.reject(new Error(msg))\n } else if (code !== 200) {\n\n\n\n Notification.error({\n title: msg\n })\n return Promise.reject('error')\n\n } else {\n\n return res.data\n }\n\n\n\n\n},\n error => {\n\n // 主动取消的请求,直接忽略,不提示\n if (\n error.code === 'ERR_CANCELED' ||\n (error.message && error.message.includes('canceled')) ||\n error.message?.includes('Request aborted')\n ) {\n // 静默处理,不提示,不冒泡\n return new Promise(() => {}); // 返回pending Promise,阻止控制台报错\n }\n\n\n\n \n // 请求异常也要移除 处理Request aborted 错误\n if (error.config) {\n const requestKey = getRequestKey(error.config);\n pendingRequestMap.delete(requestKey);\n }\n\n\n let { message } = error;\n if (message == \"Network Error\" || message.includes(\"timeout\")) {\n if (!navigator.onLine) {\n // 断网状态,添加到重试队列\n const requestKey = JSON.stringify({\n url: error.config.url,\n method: error.config.method,\n params: error.config.params,\n data: error.config.data\n });\n \n // 根据URL确定请求类型并记录回调\n let callback = null;\n if (error.config.url.includes('getPoolPower')) {\n callback = (data) => {\n if (window.vm) {\n // 清除loading状态\n window.vm.minerChartLoading = false;\n }\n };\n } else if (error.config.url.includes('getBlockInfo')) {\n callback = (data) => {\n if (window.vm) {\n window.vm.reportBlockLoading = false;\n }\n };\n }\n \n if (!pendingRequests.has(requestKey)) {\n pendingRequests.set(requestKey, {\n config: error.config,\n timestamp: Date.now(),\n retryCount: 0,\n callback: callback\n });\n \n console.log('请求已加入断网重连队列:', error.config.url);\n }\n } else {\n // 网络已连接,但请求失败,尝试重试\n // 确保 config 中有 __retryCount 字段\n error.config.__retryCount = error.config.__retryCount || 0;\n \n // 判断是否可以重试\n if (error.config.__retryCount < service.defaults.retry && service.defaults.shouldRetry(error)) {\n // 增加重试计数\n error.config.__retryCount += 1;\n \n console.log(`[请求重试] ${error.config.url} - 第 ${error.config.__retryCount} 次重试`);\n \n // 创建新的Promise等待一段时间后重试\n return new Promise(resolve => {\n setTimeout(() => {\n resolve(service(error.config));\n }, service.defaults.retryDelay);\n });\n }\n \n // 达到最大重试次数,不再重试\n console.log(`[请求失败] ${error.config.url} - 已达到最大重试次数`);\n }\n }\n\n if (!superReportError) {\n superReportError = \"error\"\n localStorage.setItem('superReportError', superReportError)\n //使用错误提示管理器errorNotificationManager\n if (errorNotificationManager.canShowError(message)) {\n if (message == \"Network Error\") {\n Message({\n message: window.vm.$i18n.t(`home.NetworkError`),\n type: 'error',\n duration: 4 * 1000,\n showClose: true\n });\n }\n else if (message.includes(\"timeout\")) {\n Message({\n message: window.vm.$i18n.t(`home.requestTimeout`),\n type: 'error',\n duration: 5 * 1000,\n showClose: true\n });\n }\n else if (message.includes(\"Request failed with status code\")) {\n Message({\n message: \"系统接口\" + message.substr(message.length - 3) + \"异常\",\n type: 'error',\n duration: 5 * 1000,\n showClose: true\n });\n } else {\n Message({\n message: message,\n type: 'error',\n duration: 5 * 1000,\n showClose: true\n });\n }\n } else {\n // 避免完全不提示,可以在控制台记录被抑制的错误\n console.log('[错误提示] 已抑制重复错误:', message);\n }\n }\n\n\n\n\n return Promise.reject(error)\n\n }\n)\n\n\n\nexport default service","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"account-purchased-machine-config\"},[_vm._m(0),_c('el-table',{directives:[{name:\"loading\",rawName:\"v-loading\",value:(_vm.loading),expression:\"loading\"}],staticStyle:{\"width\":\"100%\"},attrs:{\"data\":_vm.tableData,\"border\":\"\",\"stripe\":\"\",\"header-cell-style\":{ textAlign: 'left' },\"cell-style\":{ textAlign: 'left' }}},[_c('el-table-column',{attrs:{\"prop\":\"coin\",\"label\":\"币种\",\"width\":\"100\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('span',[_vm._v(_vm._s(scope.row.coin || '—'))])]}}])}),_c('el-table-column',{attrs:{\"prop\":\"algorithm\",\"label\":\"算法\",\"min-width\":\"120\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('span',[_vm._v(_vm._s(scope.row.algorithm || '—'))])]}}])}),_c('el-table-column',{attrs:{\"prop\":\"pool\",\"label\":\"矿池\",\"min-width\":\"140\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('span',[_vm._v(_vm._s(scope.row.pool || '—'))])]}}])}),_c('el-table-column',{attrs:{\"prop\":\"walletAddress\",\"label\":\"钱包地址\",\"min-width\":\"200\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('div',{staticClass:\"address-cell\"},[(scope.row.walletAddress)?_c('span',{staticClass:\"mono-ellipsis\",staticStyle:{\"font-family\":\"monospace\"}},[_vm._v(_vm._s(scope.row.walletAddress))]):_c('span',[_vm._v(\"—\")]),(scope.row.walletAddress)?_c('el-button',{staticClass:\"copy-btn\",attrs:{\"type\":\"text\",\"size\":\"mini\",\"icon\":\"el-icon-document-copy\"},on:{\"click\":function($event){return _vm.handleCopy(scope.row.walletAddress, '钱包地址')}}},[_vm._v(\" 复制 \")]):_vm._e()],1)]}}])}),_c('el-table-column',{attrs:{\"prop\":\"poolUrl\",\"label\":\"矿池地址\",\"min-width\":\"200\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('div',{staticClass:\"address-cell\"},[(scope.row.poolUrl)?_c('span',{staticClass:\"mono-ellipsis\"},[_vm._v(_vm._s(scope.row.poolUrl))]):_c('span',[_vm._v(\"—\")]),(scope.row.poolUrl)?_c('el-button',{staticClass:\"copy-btn\",attrs:{\"type\":\"text\",\"size\":\"mini\",\"icon\":\"el-icon-document-copy\"},on:{\"click\":function($event){return _vm.handleCopy(scope.row.poolUrl, '矿池地址')}}},[_vm._v(\" 复制 \")]):_vm._e()],1)]}}])}),_c('el-table-column',{attrs:{\"label\":\"操作\",\"width\":\"120\",\"fixed\":\"right\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('el-button',{attrs:{\"type\":\"text\",\"size\":\"mini\"},on:{\"click\":function($event){return _vm.handleViewDetail(scope.row)}}},[_vm._v(\" 详情 \")])]}}])})],1),_c('div',{staticClass:\"pagination\"},[_c('el-pagination',{attrs:{\"background\":\"\",\"layout\":\"total, sizes, prev, pager, next, jumper\",\"total\":_vm.total,\"current-page\":_vm.pagination.pageNum,\"page-sizes\":[10, 20, 50, 100],\"page-size\":_vm.pagination.pageSize},on:{\"update:currentPage\":function($event){return _vm.$set(_vm.pagination, \"pageNum\", $event)},\"update:current-page\":function($event){return _vm.$set(_vm.pagination, \"pageNum\", $event)},\"update:pageSize\":function($event){return _vm.$set(_vm.pagination, \"pageSize\", $event)},\"update:page-size\":function($event){return _vm.$set(_vm.pagination, \"pageSize\", $event)},\"size-change\":_vm.handleSizeChange,\"current-change\":_vm.handleCurrentChange}})],1)],1)\n}\nvar staticRenderFns = [function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"toolbar\"},[_c('div',{staticClass:\"left-area\"},[_c('h2',{staticClass:\"page-title\"},[_vm._v(\"已购商品\")])])])\n}]\n\nexport { render, staticRenderFns }","\n\n\n\n","import mod from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./purchasedMachineConfig.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./purchasedMachineConfig.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./purchasedMachineConfig.vue?vue&type=template&id=f22fc604&scoped=true\"\nimport script from \"./purchasedMachineConfig.vue?vue&type=script&lang=js\"\nexport * from \"./purchasedMachineConfig.vue?vue&type=script&lang=js\"\nimport style0 from \"./purchasedMachineConfig.vue?vue&type=style&index=0&id=f22fc604&prod&scoped=true&lang=css\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"f22fc604\",\n null\n \n)\n\nexport default component.exports","import request from '../utils/request'\r\n\r\n//加入购物车\r\nexport function addCart(data) {\r\n return request({\r\n url: `/lease/shopping/cart/addGoods`,\r\n method: 'post',\r\n data\r\n })\r\n}\r\n\r\n\r\n//查询购物车列表\r\nexport function getGoodsList(data) {\r\n return request({\r\n url: `/lease/shopping/cart/getGoodsList`,\r\n method: 'post',\r\n data\r\n })\r\n }\r\n //删除购物车商品 批量\r\nexport function deleteBatchGoods(data) {\r\n return request({\r\n url: `/lease/shopping/cart/deleteBatchGoods`,\r\n method: 'post',\r\n data\r\n })\r\n }\r\n\r\n \r\n // 批量删除购物车中已下架商品\r\nexport function deleteBatchGoodsForIsDelete(data) {\r\n return request({\r\n url: `/lease/shopping/cart/deleteBatchGoodsForIsDelete`,\r\n method: 'post',\r\n data\r\n })\r\n}\r\n\r\n//购物车列表V2\r\nexport function getGoodsListV2(data) {\r\n return request({\r\n url: `/lease/v2/shopping/cart/getGoodsListV2`,\r\n method: 'post',\r\n data\r\n })\r\n}\r\n\r\n\r\n//批量删除购物车中已下架商品\r\nexport function deleteBatchGoodsForIsDeleteV2(data) {\r\n return request({\r\n url: `/lease/v2/shopping/cart/deleteBatchGoodsForIsDeleteV2`,\r\n method: 'post',\r\n data\r\n })\r\n}\r\n\r\n\r\n\r\n//批批量删除购物车中商品\r\nexport function deleteBatchGoodsV2(data) {\r\n return request({\r\n url: `/lease/v2/shopping/cart/deleteBatchGoodsV2`,\r\n method: 'post',\r\n data\r\n })\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n","/**\n * @file 购物车管理(轻量,无 Vuex)\n * @description 提供添加、更新、删除、清空、查询购物车的函数。使用 localStorage 持久化。\n */\n\nconst STORAGE_KEY = 'power_leasing_cart_v1';\n\n/**\n * @typedef {Object} CartItem\n * @property {string} id - 商品ID\n * @property {string} title - 商品标题\n * @property {number} price - 单价\n * @property {number} quantity - 数量\n * @property {string} image - 图片URL\n */\n\n/**\n * 读取本地购物车\n * @returns {CartItem[]}\n */\nexport const readCart = () => {\n try {\n const raw = window.localStorage.getItem(STORAGE_KEY);\n if (!raw) return [];\n const parsed = JSON.parse(raw);\n if (!Array.isArray(parsed)) return [];\n return parsed.filter(Boolean);\n } catch (error) {\n console.error('[cartManager] readCart error:', error);\n return [];\n }\n}\n\n/**\n * 持久化购物车\n * @param {CartItem[]} cart\n */\nconst writeCart = (cart) => {\n try {\n window.localStorage.setItem(STORAGE_KEY, JSON.stringify(cart));\n // 同步派发购物车更新事件(总数量),用于头部徽标等全局更新\n try {\n const count = cart.reduce((s, c) => s + Number(c.quantity || 0), 0)\n window.dispatchEvent(new CustomEvent('cart-updated', { detail: { count } }))\n } catch (e) { /* noop */ }\n } catch (error) {\n console.error('[cartManager] writeCart error:', error);\n }\n}\n\n/**\n * 添加到购物车(若已存在则数量累加)\n * @param {CartItem} item\n * @returns {CartItem[]}\n */\nexport const addToCart = (item) => {\n if (!item || !item.id) return readCart();\n const cart = readCart();\n const index = cart.findIndex((c) => c.id === item.id);\n if (index >= 0) {\n const next = [...cart];\n next[index] = {\n ...next[index],\n quantity: Math.max(1, Number(next[index].quantity || 0) + Number(item.quantity || 1))\n };\n writeCart(next);\n return next;\n }\n const next = [...cart, { ...item, quantity: Math.max(1, Number(item.quantity || 1)) }];\n writeCart(next);\n return next;\n}\n\n/**\n * 更新数量\n * @param {string} productId\n * @param {number} quantity\n * @returns {CartItem[]}\n */\nexport const updateQuantity = (productId, quantity) => {\n const cart = readCart();\n const next = cart\n .map((c) => (c.id === productId ? { ...c, quantity: Math.max(1, Number(quantity) || 1) } : c));\n writeCart(next);\n return next;\n}\n\n/**\n * 移除商品\n * @param {string} productId\n * @returns {CartItem[]}\n */\nexport const removeFromCart = (productId) => {\n const cart = readCart();\n const next = cart.filter((c) => c.id !== productId);\n writeCart(next);\n return next;\n}\n\n/**\n * 清空购物车\n * @returns {CartItem[]}\n */\nexport const clearCart = () => {\n writeCart([]);\n return [];\n}\n\n/**\n * 计算总价\n * @returns {{ totalQuantity: number, totalPrice: number }}\n */\nexport const computeSummary = () => {\n const cart = readCart();\n const totalQuantity = cart.reduce((sum, cur) => sum + Number(cur.quantity || 0), 0);\n const totalPrice = cart.reduce((sum, cur) => sum + Number(cur.quantity || 0) * Number(cur.price || 0), 0);\n return { totalQuantity, totalPrice };\n}\n\nexport default {\n readCart,\n addToCart,\n updateQuantity,\n removeFromCart,\n clearCart,\n computeSummary\n}\n\n","import mod from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./reset-password.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./reset-password.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./reset-password.vue?vue&type=template&id=278fc602&scoped=true\"\nimport script from \"./reset-password.vue?vue&type=script&lang=js\"\nexport * from \"./reset-password.vue?vue&type=script&lang=js\"\nimport style0 from \"./reset-password.vue?vue&type=style&index=0&id=278fc602&prod&scoped=true&lang=css\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"278fc602\",\n null\n \n)\n\nexport default component.exports","/**\n * @file 导航配置文件\n * @description 定义所有可用的导航链接和菜单结构\n */\n\n// 主导航配置\nexport const mainNavigation = [\n {\n path: '/productList',\n name: '商城',\n icon: '🛍️',\n description: '浏览所有商品'\n },\n {\n path: '/cart',\n name: '购物车',\n icon: '🛒',\n description: '管理购物车商品'\n },\n // {\n // path: '/checkout',\n // name: '结算',\n // icon: '💳',\n // description: '完成订单结算'\n // },\n {\n path: '/account',\n name: '个人中心',\n icon: '👤',\n description: '管理个人资料和店铺'\n }\n]\n\n// 面包屑导航配置\nexport const breadcrumbConfig = {\n '/productList': ['首页', '商品列表'],\n '/product': ['首页', '商品列表', '商品详情'],\n '/cart': ['首页', '购物车'],\n '/checkout': ['首页', '购物车', '订单结算'],\n '/account': ['首页', '个人中心'],\n '/account/wallet': ['首页', '个人中心', '我的钱包'],\n '/account/shop-new': ['首页', '个人中心', '新增店铺'],\n '/account/shop-config': ['首页', '个人中心', '店铺配置'],\n '/account/shops': ['首页', '个人中心', '我的店铺'],\n '/account/product-new': ['首页', '个人中心', '新增商品'],\n '/account/products': ['首页', '个人中心', '商品列表']\n}\n\n// 获取面包屑导航\nexport const getBreadcrumb = (path) => {\n // 处理动态路由\n if (path.startsWith('/product/')) {\n return breadcrumbConfig['/product']\n }\n \n return breadcrumbConfig[path] || ['首页']\n}\n\n// 检查路由权限\nexport const checkRoutePermission = (route, userPermissions = []) => {\n if (!route.meta || !route.meta.allAuthority) {\n return true\n }\n \n const requiredPermissions = route.meta.allAuthority\n \n // 如果权限要求是 'all',则所有人都可以访问\n if (requiredPermissions.includes('all')) {\n return true\n }\n \n // 检查用户是否有所需权限\n return requiredPermissions.some(permission => \n userPermissions.includes(permission)\n )\n}\n\n// 获取页面标题\nexport const getPageTitle = (route) => {\n if (route.meta && route.meta.title) {\n return `${route.meta.title} - Power Leasing`\n }\n return 'Power Leasing - 电商系统'\n}\n\n// 获取页面描述\nexport const getPageDescription = (route) => {\n if (route.meta && route.meta.description) {\n return route.meta.description\n }\n return 'Power Leasing 电商系统 - 专业的电力设备租赁平台'\n}\n\nexport default {\n mainNavigation,\n breadcrumbConfig,\n getBreadcrumb,\n checkRoutePermission,\n getPageTitle,\n getPageDescription\n} ","\r\n\r\n\r\n\r\n\r\n\r\n","\n\n\n\n\n\n","import request from '../utils/request'\n\n//钱包余额\nexport function getWalletInfo(data) {\n return request({\n url: `/lease/user/getWalletInfo`,\n method: 'post',\n data\n })\n}\n\n//余额提现\nexport function withdrawBalance(data) {\n return request({\n url: `/lease/user/withdrawBalance`,\n method: 'post',\n data\n })\n}\n\n\n\n//余额充值记录\nexport function balanceRechargeList(data) {\n return request({\n url: `/lease/user/balanceRechargeList`,\n method: 'post',\n data\n })\n}\n\n\n//提现记录\nexport function balanceWithdrawList(data) {\n return request({\n url: `/lease/user/balanceWithdrawList`,\n method: 'post',\n data\n })\n}\n\n\n// 卖家收款记录\nexport function sellerReceiptList(data) {\n return request({\n url: `/lease/user/balancePayList`,\n method: 'post',\n data\n })\n}\n\n\n//钱包绑定\nexport function addWalletShopConfig(data) {\n return request({\n url: `/lease/shop/addShopConfig`,\n method: 'post',\n data\n })\n}\n\n//获取支持的链和币种\nexport function getChainAndList(data) {\n return request({\n url: `/lease/shop/getChainAndList`,\n method: 'post',\n data\n })\n}\n\n\n//获取钱包绑定列表\nexport function getShopConfig(data) {\n return request({\n url: `/lease/shop/getShopConfig`,\n method: 'post',\n data\n })\n}\n\n\n//创建钱包\nexport function bindWallet(data) {\n return request({\n url: `/lease/user/bindWallet`,\n method: 'post',\n data\n })\n}\n\n//资金流水\nexport function transactionRecord(data) {\n return request({\n url: `/lease/user/transactionRecord`,\n method: 'post',\n data\n })\n}\n\n//钱包的最近交易\nexport function getRecentlyTransaction(data) {\n return request({\n url: `/lease/user/getRecentlyTransaction`,\n method: 'post',\n data\n })\n}\n\n//绑定钱包前查询商品列表\nexport function getProductListForShopWalletConfig(data) {\n return request({\n url: `/lease/product/getProductListForShopWalletConfig`,\n method: 'post',\n data\n })\n}\n\n\n//设置之前商品列表的新链的机器价格\nexport function updateProductListForShopWalletConfig(data) {\n return request({\n url: `/lease/product/updateProductListForShopWalletConfig`,\n method: 'post',\n data\n })\n}\n\n// 卖家绑定钱包明细\nexport function getShopConfigV2(data) {\n return request({\n url: `/lease/v2/shop/getShopConfigV2`,\n method: 'post',\n data\n })\n}\n\n\n// 卖家提现\nexport function withdrawBalanceForSeller(data) {\n return request({\n url: `/lease/v2/shop/withdrawBalanceForSeller`,\n method: 'post',\n data\n })\n}\n\n\n// 修改钱包配置\nexport function balanceWithdrawListV2(data) {\n return request({\n url: `/lease/v2/shop/balanceWithdrawList`,\n method: 'post',\n data\n })\n}\n\n// 修改店铺钱包配置 V2\nexport function updateShopConfigV2(data) {\n return request({\n url: `/lease/v2/shop/updateShopConfigV2`,\n method: 'post',\n data\n })\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","import mod from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./withdrawRecord.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./withdrawRecord.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./withdrawRecord.vue?vue&type=template&id=72b1f929&scoped=true\"\nimport script from \"./withdrawRecord.vue?vue&type=script&lang=js\"\nexport * from \"./withdrawRecord.vue?vue&type=script&lang=js\"\nimport style0 from \"./withdrawRecord.vue?vue&type=style&index=0&id=72b1f929&prod&scoped=true&lang=css\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"72b1f929\",\n null\n \n)\n\nexport default component.exports","\n\n\n\n\n\n","import mod from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./products.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./products.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./products.vue?vue&type=template&id=2d7e2698&scoped=true\"\nimport script from \"./products.vue?vue&type=script&lang=js\"\nexport * from \"./products.vue?vue&type=script&lang=js\"\nimport style0 from \"./products.vue?vue&type=style&index=0&id=2d7e2698&prod&scoped=true&lang=css\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"2d7e2698\",\n null\n \n)\n\nexport default component.exports","import mod from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./rechargeRecord.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./rechargeRecord.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./rechargeRecord.vue?vue&type=template&id=5cf693fa&scoped=true\"\nimport script from \"./rechargeRecord.vue?vue&type=script&lang=js\"\nexport * from \"./rechargeRecord.vue?vue&type=script&lang=js\"\nimport style0 from \"./rechargeRecord.vue?vue&type=style&index=0&id=5cf693fa&prod&scoped=true&lang=css\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"5cf693fa\",\n null\n \n)\n\nexport default component.exports","import mod from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./OrderList.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./OrderList.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./OrderList.vue?vue&type=template&id=1fca51c3&scoped=true\"\nimport script from \"./OrderList.vue?vue&type=script&lang=js\"\nexport * from \"./OrderList.vue?vue&type=script&lang=js\"\nimport style0 from \"./OrderList.vue?vue&type=style&index=0&id=1fca51c3&prod&scoped=true&lang=css\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"1fca51c3\",\n null\n \n)\n\nexport default component.exports","/**\r\n * RSA 加密工具\r\n * 使用 jsencrypt 库进行 RSA 公钥加密\r\n */\r\n\r\n// 导入 jsencrypt\r\nimport JSEncrypt from 'jsencrypt'\r\n\r\n// RSA 公钥(Base64 格式,不带 BEGIN/END 标记)\r\nconst RSA_PUBLIC_KEY_BASE64 = `MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsQVIKYozXCfnXUw8+omYLdcdL1pTzmQh35YPsvn22wM4SQJKvMmXmcS6bI5Bu+5zCjL0F56DzfKz0BNZEwb46UshUOO+KFBUr8CxjYE8NOgIsoe5FUn57O6er9/KySaWlkpGZX49K+l3e90R+dFUEfRE/ijYpeZWkLRwcgWZ+2u6HGpl9h/eF6XD0aW9asDjdAbxUQ48TlaWgfP+OHC+Zy2GKGQG16EcDMczrN6a2HbFnwRIUKrFP67UqyRq11BTUziOhXLY8J0MFuwXUk2OY4VpqjrJjHHjlHYADjIL/5K4Io2AhRU9+QSsKFR2wGxi4e8vw2IXDzscrDuah/7YSwIDAQAB`\r\n\r\n// RSA 公钥(PEM 格式)\r\nconst RSA_PUBLIC_KEY = `-----BEGIN PUBLIC KEY-----\r\n${RSA_PUBLIC_KEY_BASE64}\r\n-----END PUBLIC KEY-----`\r\n\r\n/**\r\n * 获取 JSEncrypt 构造函数\r\n * @returns {Function} JSEncrypt 构造函数\r\n */\r\nfunction getJSEncrypt() {\r\n // 优先使用已导入的 JSEncrypt\r\n if (JSEncrypt) {\r\n return JSEncrypt\r\n }\r\n \r\n // 尝试从全局获取(可能通过 CDN 引入)\r\n if (typeof window !== 'undefined' && window.JSEncrypt) {\r\n return window.JSEncrypt\r\n }\r\n \r\n return null\r\n}\r\n\r\n/**\r\n * RSA 加密函数(同步版本)\r\n * @param {string} plainText - 要加密的明文\r\n * @returns {string|null} 加密后的密文(Base64 编码),失败返回 null\r\n */\r\nexport function rsaEncryptSync(plainText) {\r\n if (!plainText || typeof plainText !== 'string') {\r\n console.error('RSA 加密:输入必须是非空字符串')\r\n return null\r\n }\r\n\r\n try {\r\n const Encrypt = getJSEncrypt()\r\n if (!Encrypt) {\r\n console.error('JSEncrypt 未加载')\r\n return null\r\n }\r\n\r\n const encrypt = new Encrypt()\r\n encrypt.setPublicKey(RSA_PUBLIC_KEY)\r\n const encrypted = encrypt.encrypt(plainText)\r\n \r\n if (!encrypted) {\r\n console.error('RSA 加密失败:返回值为空')\r\n return null\r\n }\r\n \r\n return encrypted\r\n } catch (error) {\r\n console.error('RSA 加密异常:', error)\r\n return null\r\n }\r\n}\r\n\r\n/**\r\n * RSA 加密函数(异步版本,兼容同步调用)\r\n * @param {string} plainText - 要加密的明文\r\n * @returns {Promise} 加密后的密文(Base64 编码),失败返回 null\r\n */\r\nexport async function rsaEncrypt(plainText) {\r\n if (!plainText || typeof plainText !== 'string') {\r\n console.error('RSA 加密:输入必须是非空字符串')\r\n return null\r\n }\r\n\r\n try {\r\n const Encrypt = getJSEncrypt()\r\n if (!Encrypt) {\r\n console.error('JSEncrypt 未加载')\r\n return null\r\n }\r\n\r\n const encrypt = new Encrypt()\r\n encrypt.setPublicKey(RSA_PUBLIC_KEY)\r\n const encrypted = encrypt.encrypt(plainText)\r\n \r\n if (!encrypted) {\r\n console.error('RSA 加密失败:返回值为空')\r\n return null\r\n }\r\n \r\n return encrypted\r\n } catch (error) {\r\n console.error('RSA 加密异常:', error)\r\n return null\r\n }\r\n}\r\n","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{directives:[{name:\"loading\",rawName:\"v-loading\",value:(_vm.productDetailLoading),expression:\"productDetailLoading\"}],staticClass:\"product-detail\"},[(_vm.loading)?_c('div',{staticClass:\"loading\"},[_c('i',{staticClass:\"el-icon-loading\",attrs:{\"aria-label\":\"加载中\",\"role\":\"img\"}}),_vm._v(\" 加载中... \")]):(_vm.product)?_c('div',{staticClass:\"detail-container\"},[_c('h2',{staticStyle:{\"margin\":\"10px\",\"text-align\":\"left\",\"margin-top\":\"28px\"}},[_vm._v(\"商品详情-选择矿机\")]),_c('section',{staticClass:\"pay-methods\",attrs:{\"aria-label\":\"支付方式\"}},[_c('div',{staticClass:\"pay-label\",attrs:{\"tabindex\":\"0\",\"aria-label\":\"支付方式标签\"}},[_vm._v(\"支付方式:\")]),_c('ul',{staticClass:\"pay-list\",attrs:{\"role\":\"list\",\"aria-label\":\"支付方式列表\"}},_vm._l((_vm.paymentMethodList),function(item,index){return _c('li',{key:index,staticClass:\"pay-item\",attrs:{\"aria-label\":`支付方式: ${item.payChain}`}},[_c('el-tooltip',{attrs:{\"content\":_vm.formatPayTooltip(item),\"placement\":\"top\",\"open-delay\":80}},[_c('img',{staticClass:\"pay-icon\",attrs:{\"src\":_vm.getPayImageUrl(item),\"alt\":`${(item.payChain || '').toUpperCase()} ${(item.payCoin || '').toUpperCase()}`.trim(),\"title\":_vm.formatPayTooltip(item),\"tabindex\":\"0\",\"role\":\"img\"},on:{\"keydown\":[function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"enter\",13,$event.key,\"Enter\"))return null;$event.preventDefault();return _vm.handlePayIconKeyDown(item)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"space\",32,$event.key,[\" \",\"Spacebar\"]))return null;$event.preventDefault();return _vm.handlePayIconKeyDown(item)}]}})])],1)}),0)]),_c('section',{staticClass:\"filter-bar\",attrs:{\"aria-label\":\"筛选条件\"}},[_c('div',{staticClass:\"filter-grid\"},[_c('div',{staticClass:\"filter-cell\"},[_c('label',{staticClass:\"filter-title\"},[_vm._v(\"矿机种类\")]),_c('div',{staticStyle:{\"display\":\"inline-flex\",\"align-items\":\"center\"}},[_c('el-radio-group',{attrs:{\"size\":\"small\"},on:{\"change\":_vm.handleMachineTypeChange},model:{value:(_vm.machineType),callback:function ($$v) {_vm.machineType=$$v},expression:\"machineType\"}},[_c('el-radio-button',{attrs:{\"label\":1}},[_vm._v(\"GPU\")]),_c('el-radio-button',{attrs:{\"label\":0}},[_vm._v(\"ASIC\")])],1)],1)]),_c('div',{staticClass:\"filter-cell\"},[_c('label',{staticClass:\"filter-title\",attrs:{\"for\":\"payFilter\"}},[_vm._v(\"支付方式筛选\")]),_c('el-select',{staticClass:\"filter-control\",staticStyle:{\"max-width\":\"260px\"},attrs:{\"id\":\"payFilter\",\"placeholder\":\"全部\",\"clearable\":\"\",\"filterable\":\"\",\"size\":\"small\"},on:{\"change\":_vm.handlePayFilterChange},scopedSlots:_vm._u([{key:\"prefix\",fn:function(){return [(_vm.getSelectedPayIcon())?_c('img',{staticStyle:{\"width\":\"16px\",\"height\":\"16px\",\"border-radius\":\"3px\",\"margin-right\":\"6px\"},attrs:{\"src\":_vm.getSelectedPayIcon(),\"alt\":\"\"}}):_vm._e()]},proxy:true}]),model:{value:(_vm.selectedPayKey),callback:function ($$v) {_vm.selectedPayKey=$$v},expression:\"selectedPayKey\"}},_vm._l((_vm.paymentMethodList),function(opt,i){return _c('el-option',{key:i,attrs:{\"label\":_vm.formatPayTooltip(opt),\"value\":`${opt.payChain || ''}|${opt.payCoin || ''}`}},[_c('div',{staticClass:\"pay-opt\"},[_c('img',{staticClass:\"pay-icon\",attrs:{\"src\":_vm.getPayImageUrl(opt),\"alt\":\"\"}}),_c('span',[_vm._v(_vm._s((opt.payChain || '').toUpperCase())+\" - \"+_vm._s((opt.payCoin || '').toUpperCase()))])])])}),1)],1),_c('div',{staticClass:\"filter-cell center-title\"},[_c('label',{staticClass:\"filter-title\"},[_vm._v(\"单价区间\"),(_vm.getPriceCoinSymbol())?_c('span',[_vm._v(\"(\"+_vm._s(_vm.getPriceCoinSymbol())+\")\")]):_vm._e()]),_c('div',{staticClass:\"range-controls\"},[_c('el-input-number',{staticClass:\"filter-control\",attrs:{\"min\":0,\"step\":1,\"precision\":0,\"controls\":false,\"size\":\"small\"},model:{value:(_vm.filters.minPrice),callback:function ($$v) {_vm.$set(_vm.filters, \"minPrice\", $$v)},expression:\"filters.minPrice\"}}),_c('span',{staticClass:\"filter-sep\"},[_vm._v(\"-\")]),_c('el-input-number',{staticClass:\"filter-control\",attrs:{\"min\":0,\"step\":1,\"precision\":0,\"controls\":false,\"size\":\"small\"},model:{value:(_vm.filters.maxPrice),callback:function ($$v) {_vm.$set(_vm.filters, \"maxPrice\", $$v)},expression:\"filters.maxPrice\"}})],1)]),_c('div',{staticClass:\"filter-cell filter-actions\"},[_c('div',{staticClass:\"action-row\"},[_c('el-button',{attrs:{\"type\":\"primary\",\"size\":\"small\",\"aria-label\":\"执行筛选\"},on:{\"click\":_vm.handleSearchFilters}},[_vm._v(\"筛选查询\")]),_c('el-button',{attrs:{\"size\":\"small\",\"aria-label\":\"重置筛选\"},on:{\"click\":_vm.handleResetFilters}},[_vm._v(\"重置\")])],1)])])]),(_vm.dynamicColumns && _vm.dynamicColumns.length)?_c('section',{staticClass:\"dynamic-hashrate\",attrs:{\"aria-label\":\"动态收益表\"}},[_c('el-table',{staticClass:\"dynamic-table\",attrs:{\"data\":_vm.dynamicRows,\"border\":\"\",\"stripe\":\"\",\"size\":\"small\",\"header-cell-style\":{ textAlign: 'left' },\"cell-style\":{ textAlign: 'left' }}},[_c('el-table-column',{attrs:{\"width\":\"46\",\"fixed\":\"left\"},scopedSlots:_vm._u([{key:\"default\",fn:function({ row }){return [_c('el-checkbox',{attrs:{\"title\":_vm.isRowDisabled(row) ? (row && (row.saleState === 1 || row.saleState === 2) ? '该机器已售出或售出中,无法选择' : '该机器暂无价格,无法选择') : '选择该矿机',\"disabled\":_vm.isRowDisabled(row)},on:{\"change\":checked => _vm.handleManualSelectFlat(row, checked)},model:{value:(row._selected),callback:function ($$v) {_vm.$set(row, \"_selected\", $$v)},expression:\"row._selected\"}})]}}],null,false,1048063571)}),_vm._l((_vm.getRenderedColumns()),function(col,colIdx){return _c('el-table-column',{key:col.key || colIdx,attrs:{\"prop\":col.key,\"label\":col.label,\"fixed\":col.fixed || false,\"show-overflow-tooltip\":\"\"},scopedSlots:_vm._u([{key:\"header\",fn:function(){return [_c('div',{staticClass:\"col-header\",attrs:{\"title\":col.label}},[(col.icon)?_c('img',{staticClass:\"col-icon\",attrs:{\"src\":col.icon,\"alt\":\"\"}}):_vm._e(),_c('span',[_vm._v(_vm._s(col.label))]),(_vm.isLastHashrateColumn(colIdx))?_c('el-button',{staticClass:\"more-action\",attrs:{\"type\":\"text\"},on:{\"click\":function($event){$event.stopPropagation();return _vm.handleOpenDynamicSearch.apply(null, arguments)}}},[_vm._v(\"更多\")]):_vm._e()],1)]},proxy:true},{key:\"default\",fn:function({ row }){return [_c('span',{class:_vm.getCellClass(col)},[(_vm.formatDynamicCell(row, col).truncated)?_c('el-tooltip',{attrs:{\"content\":_vm.formatDynamicCell(row, col).full,\"placement\":\"top\"}},[_c('span',[_vm._v(_vm._s(_vm.formatDynamicCell(row, col).text))])]):_c('span',[_vm._v(_vm._s(_vm.formatDynamicCell(row, col).text))])],1)]}}],null,true)})}),(_vm.machineType === 0)?_c('el-table-column',{attrs:{\"prop\":\"saleNumbers\",\"label\":\"总机器数\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('span',[_vm._v(_vm._s(scope.row.saleNumbers != null ? scope.row.saleNumbers : '—'))])]}}],null,false,1658856336)}):_vm._e(),(_vm.machineType === 0)?_c('el-table-column',{attrs:{\"prop\":\"saleOutNumbers\",\"label\":\"已售数量\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('span',[_vm._v(_vm._s(scope.row.saleOutNumbers != null ? scope.row.saleOutNumbers : '—'))])]}}],null,false,1678042608)}):_vm._e(),_c('el-table-column',{attrs:{\"prop\":\"leaseTime\",\"label\":\"租赁天数(天)\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('el-input-number',{staticClass:\"input-full\",attrs:{\"min\":1,\"max\":_vm.getRowMaxLeaseDays(scope.row),\"precision\":0,\"step\":1,\"controls\":false,\"size\":\"mini\"},on:{\"change\":val => _vm.handleLeaseDaysChange(scope.row, val)},model:{value:(scope.row.leaseTime),callback:function ($$v) {_vm.$set(scope.row, \"leaseTime\", $$v)},expression:\"scope.row.leaseTime\"}})]}}],null,false,1697156763)}),(_vm.machineType === 0)?_c('el-table-column',{attrs:{\"prop\":\"purchaseQuantity\",\"label\":\"购买数量\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('el-input-number',{staticClass:\"input-full\",attrs:{\"min\":1,\"max\":_vm.getRowMaxPurchase(scope.row),\"precision\":0,\"step\":1,\"controls\":false,\"size\":\"mini\",\"disabled\":_vm.getRowMaxPurchase(scope.row) <= 0},on:{\"change\":val => _vm.handlePurchaseQuantityChange(scope.row, val)},model:{value:(scope.row.purchaseQuantity),callback:function ($$v) {_vm.$set(scope.row, \"purchaseQuantity\", $$v)},expression:\"scope.row.purchaseQuantity\"}})]}}],null,false,3016046336)}):_vm._e(),_c('el-table-column',{attrs:{\"prop\":\"totalAmount\",\"label\":\"总价\",\"header-align\":\"left\",\"align\":\"left\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('span',{staticClass:\"price-strong\"},[_vm._v(_vm._s(_vm.formatConfirmTotalText(scope.row)))])]}}],null,false,1059681298)})],2),_c('el-dialog',{attrs:{\"title\":\"搜索币种/算法\",\"visible\":_vm.dynamicSearch.visible,\"width\":\"420px\"},on:{\"update:visible\":function($event){return _vm.$set(_vm.dynamicSearch, \"visible\", $event)}}},[_c('div',{staticClass:\"dynamic-search-bar\",staticStyle:{\"display\":\"flex\",\"gap\":\"10px\",\"align-items\":\"center\"}},[_c('el-input',{attrs:{\"placeholder\":\"输入币种代码或算法关键词\",\"clearable\":\"\"},nativeOn:{\"keyup\":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"enter\",13,$event.key,\"Enter\"))return null;return _vm.handleConfirmDynamicSearch.apply(null, arguments)}},model:{value:(_vm.dynamicSearch.keyword),callback:function ($$v) {_vm.$set(_vm.dynamicSearch, \"keyword\", $$v)},expression:\"dynamicSearch.keyword\"}}),_c('el-button',{attrs:{\"type\":\"primary\"},on:{\"click\":_vm.handleConfirmDynamicSearch}},[_vm._v(\"搜索\")])],1)])],1):_vm._e(),_c('div',{staticStyle:{\"margin\":\"18px\",\"text-align\":\"right\"}},[_c('el-button',{attrs:{\"type\":\"primary\",\"size\":\"small\"},on:{\"click\":_vm.handleOpenAddToCartDialog}},[_vm._v(\"加入购物车\")])],1),_c('el-dialog',{attrs:{\"visible\":_vm.confirmAddDialog.visible,\"width\":\"70vw\",\"title\":`确认加入购物车(共 ${_vm.confirmAddDialog.items.length} 台)`},on:{\"update:visible\":function($event){return _vm.$set(_vm.confirmAddDialog, \"visible\", $event)}},scopedSlots:_vm._u([{key:\"footer\",fn:function(){return [_c('el-button',{on:{\"click\":function($event){_vm.confirmAddDialog.visible = false}}},[_vm._v(\"取消\")]),_c('el-button',{attrs:{\"type\":\"primary\"},on:{\"click\":_vm.handleConfirmAddSelectedToCart}},[_vm._v(\"确认加入\")])]},proxy:true}])},[_c('div',[_c('el-table',{attrs:{\"data\":_vm.confirmAddDialog.items,\"height\":\"360\",\"border\":\"\",\"stripe\":\"\",\"header-cell-style\":{ textAlign: 'left' },\"cell-style\":{ textAlign: 'left' }}},[_c('el-table-column',{attrs:{\"prop\":\"model\",\"label\":\"型号\",\"header-align\":\"left\",\"align\":\"left\"}}),_c('el-table-column',{attrs:{\"prop\":\"price\",\"label\":\"价格\",\"header-align\":\"left\",\"align\":\"left\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('span',{staticClass:\"price-strong\"},[(_vm.formatDynamicCell(scope.row, { key: 'price', type: 'amount' }).truncated)?_c('el-tooltip',{attrs:{\"content\":_vm.formatDynamicCell(scope.row, { key: 'price', type: 'amount' }).full,\"placement\":\"top\"}},[_c('span',[_vm._v(_vm._s(_vm.formatDynamicCell(scope.row, { key: 'price', type: 'amount' }).text))])]):_c('span',[_vm._v(_vm._s(_vm.formatDynamicCell(scope.row, { key: 'price', type: 'amount' }).text))])],1)]}}])}),_c('el-table-column',{attrs:{\"prop\":\"leaseTime\",\"label\":\"租赁天数(天)\",\"header-align\":\"left\",\"align\":\"left\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_vm._v(_vm._s(Number(scope.row.leaseTime || 1)))]}}])}),(_vm.machineType === 0)?_c('el-table-column',{attrs:{\"prop\":\"purchaseQuantity\",\"label\":\"购买数量\",\"header-align\":\"left\",\"align\":\"left\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_vm._v(_vm._s(Number(scope.row.purchaseQuantity || 0)))]}}],null,false,1092190239)}):_vm._e(),_c('el-table-column',{attrs:{\"prop\":\"totalAmount\",\"label\":\"总价\",\"header-align\":\"left\",\"align\":\"left\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('span',{staticClass:\"price-strong\"},[_vm._v(_vm._s(_vm.formatConfirmTotalText(scope.row)))])]}}])})],1)],1)]),_c('el-row',{staticStyle:{\"margin-bottom\":\"20px\"}},[_c('el-col',{staticStyle:{\"display\":\"flex\",\"justify-content\":\"center\"},attrs:{\"span\":24}},[_c('el-pagination',{staticStyle:{\"margin\":\"0 auto\",\"margin-top\":\"10px\"},attrs:{\"current-page\":_vm.currentPage,\"page-sizes\":_vm.pageSizes,\"page-size\":_vm.params.pageSize,\"layout\":\"total, sizes, prev, pager, next, jumper\",\"total\":_vm.total},on:{\"size-change\":_vm.handleSizeChange,\"current-change\":_vm.handleCurrentChange,\"update:currentPage\":function($event){_vm.currentPage=$event},\"update:current-page\":function($event){_vm.currentPage=$event}}})],1)],1)],1):_c('div',{staticClass:\"not-found\"},[_c('h2',[_vm._v(\"商品不存在\")]),_c('p',[_vm._v(\"抱歉,您查找的商品不存在或已被删除。\")]),_c('button',{staticClass:\"back-btn\",on:{\"click\":_vm.handleBack}},[_vm._v(\"返回商品列表\")])])])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n\r\n\r\n\r\n","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{directives:[{name:\"loading\",rawName:\"v-loading\",value:(_vm.payLoading),expression:\"payLoading\"}]},[(!_vm.safeItems.length)?_c('div',{staticClass:\"empty\"},[_vm._v(_vm._s(_vm.emptyText))]):_c('el-table',{attrs:{\"data\":_vm.safeItems,\"border\":\"\",\"header-cell-style\":{ textAlign: 'left' },\"cell-style\":{ textAlign: 'left' }}},[_c('el-table-column',{attrs:{\"type\":\"expand\",\"width\":\"46\"},scopedSlots:_vm._u([{key:\"default\",fn:function(outer){return [_c('el-table',{attrs:{\"data\":outer.row.orderItemDtoList || [],\"size\":\"small\",\"border\":\"\",\"header-cell-style\":{ textAlign: 'left' },\"cell-style\":{ textAlign: 'left' },\"row-key\":\"productMachineId\"}},[_c('el-table-column',{attrs:{\"prop\":\"productMachineId\",\"label\":\"机器ID\",\"min-width\":\"120\"}}),_c('el-table-column',{attrs:{\"label\":\"矿机类型\",\"min-width\":\"100\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_vm._v(_vm._s(_vm.formatMachineType(scope.row && scope.row.type)))]}}],null,true)}),_c('el-table-column',{attrs:{\"prop\":\"payCoin\",\"label\":\"币种\",\"min-width\":\"100\"}}),_c('el-table-column',{attrs:{\"prop\":\"address\",\"label\":\"收款地址\",\"min-width\":\"240\"}}),_c('el-table-column',{attrs:{\"prop\":\"leaseTime\",\"label\":\"租赁天数\",\"min-width\":\"100\"}}),_c('el-table-column',{attrs:{\"label\":\"购买数量\",\"min-width\":\"100\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_vm._v(_vm._s(scope.row && scope.row.numbers != null ? scope.row.numbers : '—'))]}}],null,true)}),_c('el-table-column',{attrs:{\"prop\":\"price\",\"label\":\"单价(USDT)\",\"min-width\":\"240\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('span',{staticClass:\"value strong\"},[(_vm.formatAmount(scope.row.price, scope.row.payCoin || 'USDT').truncated)?_c('el-tooltip',{attrs:{\"content\":_vm.formatAmount(scope.row.price, scope.row.payCoin || 'USDT').full,\"placement\":\"top\"}},[_c('span',[_vm._v(\" \"+_vm._s(_vm.formatAmount(scope.row.price, scope.row.payCoin || 'USDT').text)+\" \"),_c('i',{staticClass:\"el-icon-more amount-more\"})])]):_c('span',[_vm._v(_vm._s(_vm.formatAmount(scope.row.price, scope.row.payCoin || 'USDT').text))])],1)]}}],null,true)})],1)]}}])}),_c('el-table-column',{attrs:{\"label\":\"店铺\",\"width\":\"120\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_vm._v(_vm._s(scope.row && scope.row.shopName || '—'))]}}])}),_c('el-table-column',{attrs:{\"label\":\"订单号\",\"min-width\":\"220\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('span',{staticClass:\"value mono\"},[_vm._v(_vm._s(scope.row && scope.row.orderNumber || '—'))])]}}])}),_c('el-table-column',{attrs:{\"label\":\"创建时间\",\"width\":\"160\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_vm._v(_vm._s(_vm.formatDateTime(scope.row && scope.row.createTime)))]}}])}),_c('el-table-column',{attrs:{\"label\":\"商品数\",\"min-width\":\"70\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_vm._v(_vm._s(Array.isArray(scope.row && scope.row.orderItemDtoList) ? scope.row.orderItemDtoList.length : 0))]}}])}),_c('el-table-column',{attrs:{\"label\":\"总金额(USDT)\",\"width\":\"120\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('span',{staticClass:\"value strong\"},[(_vm.formatAmount(scope.row && scope.row.totalPrice, 'USDT').truncated)?_c('el-tooltip',{attrs:{\"content\":_vm.formatAmount(scope.row && scope.row.totalPrice, 'USDT').full,\"placement\":\"top\"}},[_c('span',[_vm._v(\" \"+_vm._s(_vm.formatAmount(scope.row && scope.row.totalPrice, 'USDT').text)+\" \"),_c('i',{staticClass:\"el-icon-more amount-more\"})])]):_c('span',[_vm._v(_vm._s(_vm.formatAmount(scope.row && scope.row.totalPrice, 'USDT').text))])],1)]}}])}),_c('el-table-column',{attrs:{\"width\":\"160\"},scopedSlots:_vm._u([{key:\"header\",fn:function(){return [_c('el-tooltip',{attrs:{\"placement\":\"top\",\"effect\":\"dark\"}},[_c('div',{attrs:{\"slot\":\"content\"},slot:\"content\"},[_vm._v(\" 实际支付金额/理论支付金额:\"),_c('br'),_vm._v(\" 1. 实际支付金额是按照矿机实际算力计算支付金额\"),_c('br'),_vm._v(\" 2. 理论支付金额是卖家定义出售价格 \")]),_c('span',{staticStyle:{\"display\":\"inline-flex\",\"align-items\":\"center\",\"gap\":\"6px\"}},[_c('i',{staticClass:\"el-icon-question\",staticStyle:{\"color\":\"#909399\"},attrs:{\"aria-label\":\"说明\",\"role\":\"img\"}}),_vm._v(\" 已支付金额(USDT) \")])])]},proxy:true},{key:\"default\",fn:function(scope){return [_c('span',{staticClass:\"value strong\"},[(_vm.formatAmount(scope.row && scope.row.payAmount, 'USDT').truncated)?_c('el-tooltip',{attrs:{\"content\":_vm.formatAmount(scope.row && scope.row.payAmount, 'USDT').full,\"placement\":\"top\"}},[_c('span',[_vm._v(\" \"+_vm._s(_vm.formatAmount(scope.row && scope.row.payAmount, 'USDT').text)+\" \"),_c('i',{staticClass:\"el-icon-more amount-more\"})])]):_c('span',[_vm._v(_vm._s(_vm.formatAmount(scope.row && scope.row.payAmount, 'USDT').text))])],1)]}}])}),_c('el-table-column',{attrs:{\"label\":\"订单完成时间\",\"width\":\"160\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_vm._v(_vm._s(_vm.formatDateTime(scope.row && scope.row.endTime)))]}}])}),_c('el-table-column',{attrs:{\"label\":\"操作\",\"min-width\":\"60\",\"fixed\":\"right\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('el-button',{staticStyle:{\"margin-right\":\"8px\"},attrs:{\"size\":\"mini\"},on:{\"click\":function($event){return _vm.handleGoDetail(scope.row)}}},[_vm._v(\"详情\")]),(_vm.shouldShowActions(scope.row))?[_c('el-button',{attrs:{\"type\":\"primary\",\"size\":\"mini\"},on:{\"click\":function($event){return _vm.handleCheckout(scope.row)}}},[_vm._v(\"去结算\")])]:_vm._e()]}}])})],1),_c('el-dialog',{attrs:{\"visible\":_vm.dialogVisible,\"width\":\"520px\",\"title\":\"请扫码支付\"},on:{\"update:visible\":function($event){_vm.dialogVisible=$event}}},[_c('div',{staticStyle:{\"text-align\":\"left\",\"margin-bottom\":\"12px\",\"color\":\"#666\"}},[_c('div',{staticStyle:{\"margin-bottom\":\"6px\"}},[_vm._v(\"总金额(USDT): \"),_c('b',[(_vm.formatAmount(_vm.paymentDialog.totalPrice, 'USDT').truncated)?_c('el-tooltip',{attrs:{\"content\":_vm.formatAmount(_vm.paymentDialog.totalPrice, 'USDT').full,\"placement\":\"top\"}},[_c('span',[_vm._v(\" \"+_vm._s(_vm.formatAmount(_vm.paymentDialog.totalPrice, 'USDT').text)+\" \"),_c('i',{staticClass:\"el-icon-more amount-more\"})])]):_c('span',[_vm._v(_vm._s(_vm.formatAmount(_vm.paymentDialog.totalPrice, 'USDT').text))])],1)]),_c('div',{staticStyle:{\"margin-bottom\":\"6px\",\"display\":\"flex\",\"align-items\":\"center\",\"gap\":\"6px\"}},[_c('el-tooltip',{attrs:{\"placement\":\"top\",\"effect\":\"dark\"}},[_c('div',{attrs:{\"slot\":\"content\"},slot:\"content\"},[_vm._v(\" 实际支付金额/理论支付金额:\"),_c('br'),_vm._v(\" 1. 实际支付金额是按照矿机实际算力计算支付金额\"),_c('br'),_vm._v(\" 2. 理论支付金额是卖家定义出售价格 \")]),_c('i',{staticClass:\"el-icon-question\",staticStyle:{\"color\":\"#909399\"},attrs:{\"aria-label\":\"说明\",\"role\":\"img\"}})]),_c('span',[_vm._v(\"已支付金额(USDT):\")]),_c('b',{staticClass:\"value strong\"},[(_vm.formatAmount(_vm.paymentDialog.payAmount, 'USDT').truncated)?_c('el-tooltip',{attrs:{\"content\":_vm.formatAmount(_vm.paymentDialog.payAmount, 'USDT').full,\"placement\":\"top\"}},[_c('span',[_vm._v(\" \"+_vm._s(_vm.formatAmount(_vm.paymentDialog.payAmount, 'USDT').text)+\" \"),_c('i',{staticClass:\"el-icon-more amount-more\"})])]):_c('span',[_vm._v(_vm._s(_vm.formatAmount(_vm.paymentDialog.payAmount, 'USDT').text))])],1)],1),_c('div',{staticStyle:{\"margin-bottom\":\"6px\"}},[_vm._v(\"待支付金额(USDT): \"),_c('b',{staticClass:\"value strong\"},[(_vm.formatAmount(_vm.paymentDialog.noPayAmount, 'USDT').truncated)?_c('el-tooltip',{attrs:{\"content\":_vm.formatAmount(_vm.paymentDialog.noPayAmount, 'USDT').full,\"placement\":\"top\"}},[_c('span',[_vm._v(\" \"+_vm._s(_vm.formatAmount(_vm.paymentDialog.noPayAmount, 'USDT').text)+\" \"),_c('i',{staticClass:\"el-icon-more amount-more\"})])]):_c('span',[_vm._v(_vm._s(_vm.formatAmount(_vm.paymentDialog.noPayAmount, 'USDT').text))])],1)])]),_c('div',{staticStyle:{\"text-align\":\"center\"}},[(_vm.paymentDialog.img)?_c('img',{staticStyle:{\"width\":\"180px\",\"height\":\"180px\",\"margin-top\":\"18px\"},attrs:{\"src\":_vm.paymentDialog.img,\"alt\":\"支付二维码\"}}):_c('div',{staticStyle:{\"color\":\"#666\"}},[_vm._v(\"未返回支付二维码\")])]),_c('p',{staticStyle:{\"margin-bottom\":\"6px\",\"color\":\"red\",\"text-align\":\"left\"}},[_vm._v(\"注意:如果已经支付对应金额,不要在重复支付,待系统确认后会自动更新订单状态。因个人原因重复支付导致无法退款,平台不承担任何责任。\")]),_c('span',{staticClass:\"dialog-footer\",attrs:{\"slot\":\"footer\"},slot:\"footer\"},[_c('el-button',{on:{\"click\":function($event){_vm.dialogVisible=false}}},[_vm._v(\"关闭\")])],1)])],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n ","/**\r\n * 错误提示管理器\r\n * 用于控制错误提示的频率,避免短时间内重复显示相同类型的错误\r\n */\r\nclass ErrorNotificationManager {\r\n constructor() {\r\n // 记录最近显示的错误信息\r\n this.recentErrors = new Map();\r\n // 默认节流时间 (30秒)\r\n this.throttleTime = 3000;\r\n // 错误类型映射\r\n this.errorTypes = {\r\n 'Network Error': 'network',\r\n 'timeout': 'timeout',\r\n 'Request failed with status code': 'statusCode',\r\n // 添加网络状态类型\r\n 'networkReconnected': 'networkStatus',\r\n 'NetworkError': 'network'\r\n };\r\n }\r\n\r\n /**\r\n * 获取错误类型\r\n * @param {String} message 错误信息\r\n * @returns {String} 错误类型\r\n */\r\n getErrorType(message) {\r\n for (const [key, type] of Object.entries(this.errorTypes)) {\r\n if (message.includes(key)) {\r\n return type;\r\n }\r\n }\r\n return 'unknown';\r\n }\r\n\r\n /**\r\n * 检查是否可以显示错误\r\n * @param {String} message 错误信息\r\n * @returns {Boolean} 是否可以显示\r\n */\r\n canShowError(message) {\r\n const errorType = this.getErrorType(message);\r\n const now = Date.now();\r\n \r\n // 检查同类型的错误是否最近已经显示过\r\n if (this.recentErrors.has(errorType)) {\r\n const lastTime = this.recentErrors.get(errorType);\r\n if (now - lastTime < this.throttleTime) {\r\n console.log(`[错误提示] 已抑制重复错误: ${errorType}`);\r\n return false;\r\n }\r\n }\r\n \r\n // 更新最后显示时间\r\n this.recentErrors.set(errorType, now);\r\n return true;\r\n }\r\n\r\n /**\r\n * 清理过期的错误记录\r\n */\r\n cleanup() {\r\n const now = Date.now();\r\n this.recentErrors.forEach((time, type) => {\r\n if (now - time > this.throttleTime) {\r\n this.recentErrors.delete(type);\r\n }\r\n });\r\n }\r\n}\r\n\r\n// 创建单例实例\r\nconst errorNotificationManager = new ErrorNotificationManager();\r\nexport default errorNotificationManager;","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"order-detail-page\"},[_c('h2',{staticClass:\"title\"},[_vm._v(\"订单详情\")]),(_vm.loading)?_c('div',{staticClass:\"loading\"},[_vm._v(\"加载中...\")]):_c('div',[_c('el-card',{staticClass:\"section\"},[_c('div',{staticClass:\"row\"},[_c('span',{staticClass:\"label\"},[_vm._v(\"订单ID:\")]),_c('span',{staticClass:\"value mono\"},[_vm._v(_vm._s(_vm.order.id || '—'))])]),_c('div',{staticClass:\"row\"},[_c('span',{staticClass:\"label\"},[_vm._v(\"订单号:\")]),_c('span',{staticClass:\"value mono\"},[_vm._v(_vm._s(_vm.order.orderNumber || '—'))])]),_c('div',{staticClass:\"row\"},[_c('span',{staticClass:\"label\"},[_vm._v(\"状态:\")]),_c('span',{staticClass:\"value\"},[_vm._v(_vm._s(_vm.getOrderStatusText(_vm.order.status)))])]),_c('div',{staticClass:\"row\"},[_c('span',{staticClass:\"label\"},[_vm._v(\"店铺:\")]),_c('span',{staticClass:\"value\"},[_vm._v(_vm._s(_vm.order.shopName || '—'))])]),_c('div',{staticClass:\"row\"},[_c('span',{staticClass:\"label\"},[_vm._v(\"金额(USDT):\")]),_c('span',{staticClass:\"value strong\"},[_vm._v(_vm._s(_vm.order.totalPrice))])]),_c('div',{staticClass:\"row\"},[_c('span',{staticClass:\"label\"},[_vm._v(\"创建时间:\")]),_c('span',{staticClass:\"value\"},[_vm._v(_vm._s(_vm.formatDateTime(_vm.order.createTime)))])]),_c('div',{staticClass:\"row\"},[_c('span',{staticClass:\"label\"},[_vm._v(\"订单完成时间:\")]),_c('span',{staticClass:\"value\"},[_vm._v(_vm._s(_vm.formatDateTime(_vm.order.endTime)))])])]),_c('el-card',{staticClass:\"section\",staticStyle:{\"margin-top\":\"12px\"}},[_c('div',{staticClass:\"sub-title\"},[_vm._v(\"机器列表\")]),_c('el-table',{staticStyle:{\"width\":\"100%\"},attrs:{\"data\":_vm.items,\"border\":\"\",\"size\":\"small\",\"header-cell-style\":{ textAlign: 'left' },\"cell-style\":{ textAlign: 'left' }}},[_c('el-table-column',{attrs:{\"prop\":\"productMachineId\",\"label\":\"机器ID\",\"min-width\":\"120\"}}),_c('el-table-column',{attrs:{\"label\":\"矿机类型\",\"min-width\":\"100\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_vm._v(_vm._s(_vm.formatMachineType(scope.row && scope.row.type)))]}}])}),_c('el-table-column',{attrs:{\"prop\":\"payCoin\",\"label\":\"币种\",\"min-width\":\"100\"}}),_c('el-table-column',{attrs:{\"prop\":\"leaseTime\",\"label\":\"租赁天数\",\"min-width\":\"100\"}}),_c('el-table-column',{attrs:{\"label\":\"购买数量\",\"min-width\":\"100\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_vm._v(_vm._s(scope.row && scope.row.numbers != null ? scope.row.numbers : '—'))]}}])}),_c('el-table-column',{attrs:{\"prop\":\"price\",\"label\":\"单价(USDT)\",\"min-width\":\"120\"}}),_c('el-table-column',{attrs:{\"prop\":\"address\",\"label\":\"收款地址\",\"min-width\":\"240\"}})],1)],1),_c('div',{staticClass:\"actions\"},[_c('el-button',{on:{\"click\":function($event){return _vm.$router.back()}}},[_vm._v(\"返回\")])],1)],1)])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n\r\n","\n\n\n\n ","/**\r\n * @file 商品数据服务(轻量静态数据源)\r\n * @description 提供商品列表与详情查询。无需后端即可演示。\r\n */\r\n\r\n/**\r\n * @typedef {Object} Product\r\n * @property {string} id - 商品唯一标识\r\n * @property {string} title - 商品标题\r\n * @property {string} description - 商品描述\r\n * @property {number} price - 商品单价(元)\r\n * @property {string} image - 商品图片URL(此处使用占位图)\r\n */\r\n\r\n/**\r\n * 内置演示商品数据\r\n * 使用简短且清晰的字段,满足演示所需\r\n * @type {Product[]}\r\n */\r\nconst products = [\r\n {\r\n id: 'p1001',\r\n title: '新能源充电桩(家用)',\r\n description: '7kW 单相,智能预约,支持远程监控。',\r\n price: 1299,\r\n image: 'https://via.placeholder.com/300x200?text=%E5%85%85%E7%94%B5%E6%A1%A9'\r\n },\r\n {\r\n id: 'p1002',\r\n title: '工业电能表',\r\n description: '三相四线,远程抄表,Modbus 通信。',\r\n price: 899,\r\n image: 'https://via.placeholder.com/300x200?text=%E7%94%B5%E8%83%BD%E8%A1%A8'\r\n },\r\n {\r\n id: 'p1003',\r\n title: '配电柜(入门版)',\r\n description: 'IP54 防护,内置断路器与防雷模块。',\r\n price: 5599,\r\n image: 'https://via.placeholder.com/300x200?text=%E9%85%8D%E7%94%B5%E6%9F%9C'\r\n },\r\n {\r\n id: 'p1004',\r\n title: '工矿照明灯',\r\n description: '120W 高亮,耐腐蚀,适配多场景。',\r\n price: 329,\r\n image: 'https://via.placeholder.com/300x200?text=%E7%85%A7%E6%98%8E%E7%81%AF'\r\n }\r\n]\r\n\r\n/**\r\n * 获取全部商品\r\n * @returns {Promise}\r\n */\r\nexport const listProducts = async () => {\r\n return Promise.resolve(products);\r\n}\r\n\r\n/**\r\n * 根据ID获取商品\r\n * @param {string} productId - 商品ID\r\n * @returns {Promise}\r\n */\r\nexport const getProductById = async (productId) => {\r\n const product = products.find((p) => p.id === productId);\r\n return Promise.resolve(product);\r\n}\r\n\r\nexport default {\r\n listProducts,\r\n getProductById\r\n}\r\n\r\n","import mod from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./productMachineAdd.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./productMachineAdd.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./productMachineAdd.vue?vue&type=template&id=a9befda4&scoped=true\"\nimport script from \"./productMachineAdd.vue?vue&type=script&lang=js\"\nexport * from \"./productMachineAdd.vue?vue&type=script&lang=js\"\nimport style0 from \"./productMachineAdd.vue?vue&type=style&index=0&id=a9befda4&prod&scoped=true&lang=css\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"a9befda4\",\n null\n \n)\n\nexport default component.exports","import mod from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./index.vue?vue&type=template&id=6b6c93c3&scoped=true\"\nimport script from \"./index.vue?vue&type=script&lang=js\"\nexport * from \"./index.vue?vue&type=script&lang=js\"\nimport style0 from \"./index.vue?vue&type=style&index=0&id=6b6c93c3&prod&scoped=true&lang=scss\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"6b6c93c3\",\n null\n \n)\n\nexport default component.exports","\r\n\r\n\r\n\r\n","import mod from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./orders.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./orders.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./orders.vue?vue&type=template&id=2ad2c7c3&scoped=true\"\nimport script from \"./orders.vue?vue&type=script&lang=js\"\nexport * from \"./orders.vue?vue&type=script&lang=js\"\nimport style0 from \"./orders.vue?vue&type=style&index=0&id=2ad2c7c3&prod&scoped=true&lang=css\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"2ad2c7c3\",\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"account-product-detail\"},[_c('div',{staticClass:\"header\"},[_c('el-button',{attrs:{\"type\":\"text\"},on:{\"click\":_vm.handleBack}},[_vm._v(\"返回\")]),_c('h2',{staticClass:\"title\"},[_vm._v(\"商品详情\")])],1),_c('el-card',{staticClass:\"detail-card\",attrs:{\"shadow\":\"never\"}},[_c('el-form',{staticClass:\"detail-form\",attrs:{\"model\":_vm.product,\"label-width\":\"90px\",\"size\":\"small\"}},[_c('el-row',{attrs:{\"gutter\":16}},[_c('el-col',{attrs:{\"span\":12}},[_c('el-form-item',{attrs:{\"label\":\"商品ID\"}},[_c('el-input',{attrs:{\"value\":_vm.product && _vm.product.id,\"disabled\":\"\"}})],1)],1),_c('el-col',{attrs:{\"span\":12}},[_c('el-form-item',{attrs:{\"label\":\"店铺ID\"}},[_c('el-input',{attrs:{\"value\":_vm.product && _vm.product.shopId,\"disabled\":\"\"}})],1)],1),_c('el-col',{attrs:{\"span\":12}},[_c('el-form-item',{attrs:{\"label\":\"名称\"}},[_c('el-input',{attrs:{\"value\":_vm.product && _vm.product.name,\"disabled\":\"\"}})],1)],1),_c('el-col',{attrs:{\"span\":12}},[_c('el-form-item',{attrs:{\"label\":\"币种\"}},[_c('el-input',{attrs:{\"value\":_vm.product && _vm.product.coin,\"disabled\":\"\"}})],1)],1),_c('el-col',{attrs:{\"span\":12}},[_c('el-form-item',{attrs:{\"label\":\"算法\"}},[_c('el-input',{attrs:{\"value\":_vm.product && _vm.product.algorithm,\"disabled\":\"\"}})],1)],1),_c('el-col',{attrs:{\"span\":12}},[_c('el-form-item',{attrs:{\"label\":\"类型\"}},[_c('el-input',{attrs:{\"value\":_vm.product && (_vm.product.type === 1 ? '算力套餐' : '挖矿机器'),\"disabled\":\"\"}})],1)],1),_c('el-col',{attrs:{\"span\":12}},[_c('el-form-item',{attrs:{\"label\":\"状态\"}},[_c('el-input',{attrs:{\"value\":_vm.product && (_vm.product.state === 1 ? '下架' : '上架'),\"disabled\":\"\"}})],1)],1),_c('el-col',{attrs:{\"span\":12}}),_c('el-col',{attrs:{\"span\":24}},[_c('el-form-item',{attrs:{\"label\":\"描述\"}},[_c('el-input',{attrs:{\"type\":\"textarea\",\"rows\":3,\"value\":_vm.product && _vm.product.description,\"disabled\":\"\"}})],1)],1)],1)],1)],1),_c('el-card',{directives:[{name:\"loading\",rawName:\"v-loading\",value:(_vm.updateLoading),expression:\"updateLoading\"}],staticClass:\"detail-card\",attrs:{\"shadow\":\"never\"}},[_c('div',{staticClass:\"section-title\",attrs:{\"slot\":\"header\"},slot:\"header\"},[_vm._v(\"机器组合\")]),(_vm.machineList && _vm.machineList.length)?_c('div',[_c('el-table',{staticStyle:{\"width\":\"100%\"},attrs:{\"data\":_vm.machineList,\"border\":\"\",\"stripe\":\"\"}},[_c('el-table-column',{attrs:{\"prop\":\"user\",\"label\":\"挖矿账户\"}}),_c('el-table-column',{attrs:{\"prop\":\"id\",\"label\":\"矿机ID\"}}),_c('el-table-column',{attrs:{\"prop\":\"miner\",\"label\":\"机器编号\"}}),_c('el-table-column',{attrs:{\"label\":\"实际算力\",\"width\":\"100\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_vm._v(_vm._s(scope.row.computingPower)+\" \"+_vm._s(scope.row.unit || ''))]}}],null,false,881627289)},[_c('template',{slot:\"header\"},[_c('el-tooltip',{attrs:{\"content\":\"实际算力为该机器在本矿池过去24H的平均算力\",\"effect\":\"dark\",\"placement\":\"top\"}},[_c('i',{staticClass:\"el-icon-question label-help\",attrs:{\"aria-label\":\"帮助\",\"tabindex\":\"0\"}})]),_c('span',[_vm._v(\"实际算力\")])],1)],2),_c('el-table-column',{attrs:{\"label\":\"理论算力\",\"min-width\":\"140\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('el-input',{class:{ 'changed-input': _vm.isCellChanged(scope.row, 'theoryPower') },staticStyle:{\"max-width\":\"260px\"},attrs:{\"size\":\"small\",\"inputmode\":\"decimal\",\"disabled\":_vm.isRowDisabled(scope.row)},on:{\"input\":function($event){return _vm.handleTheoryPowerInput(scope.$index)},\"blur\":function($event){return _vm.handleTheoryPowerBlur(scope.$index)}},model:{value:(scope.row.theoryPower),callback:function ($$v) {_vm.$set(scope.row, \"theoryPower\", $$v)},expression:\"scope.row.theoryPower\"}},[_c('template',{slot:\"append\"},[_c('el-select',{staticClass:\"append-select append-select--unit\",staticStyle:{\"width\":\"90px\"},attrs:{\"size\":\"mini\",\"disabled\":_vm.isRowDisabled(scope.row)},model:{value:(scope.row.unit),callback:function ($$v) {_vm.$set(scope.row, \"unit\", $$v)},expression:\"scope.row.unit\"}},_vm._l((_vm.unitOptions),function(u){return _c('el-option',{key:u,attrs:{\"label\":u,\"value\":u}})}),1)],1)],2)]}}],null,false,1615065668)}),_c('el-table-column',{attrs:{\"label\":\"功耗(kw/h)\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('el-input',{class:{ 'changed-input': _vm.isCellChanged(scope.row, 'powerDissipation') },staticStyle:{\"max-width\":\"260px\"},attrs:{\"size\":\"small\",\"inputmode\":\"decimal\",\"disabled\":_vm.isRowDisabled(scope.row)},on:{\"input\":function($event){return _vm.handleNumericCell(scope.$index, 'powerDissipation')},\"blur\":function($event){return _vm.handlePowerDissipationBlur(scope.$index)}},model:{value:(scope.row.powerDissipation),callback:function ($$v) {_vm.$set(scope.row, \"powerDissipation\", $$v)},expression:\"scope.row.powerDissipation\"}})]}}],null,false,2013801812)}),_c('el-table-column',{attrs:{\"label\":\"型号\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('el-input',{class:{ 'changed-input': _vm.isCellChanged(scope.row, 'type') },staticStyle:{\"max-width\":\"180px\"},attrs:{\"size\":\"small\",\"maxlength\":20,\"disabled\":_vm.isRowDisabled(scope.row)},on:{\"input\":function($event){return _vm.handleTypeCell(scope.$index)}},model:{value:(scope.row.type),callback:function ($$v) {_vm.$set(scope.row, \"type\", $$v)},expression:\"scope.row.type\"}})]}}],null,false,4182654038)}),_c('el-table-column',{attrs:{\"label\":\"售价\",\"width\":\"188\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('el-input',{class:{ 'changed-input': _vm.isCellChanged(scope.row, 'price') },staticStyle:{\"max-width\":\"260px\"},attrs:{\"size\":\"small\",\"inputmode\":\"decimal\",\"disabled\":_vm.isRowDisabled(scope.row)},on:{\"input\":function($event){return _vm.handleNumericCell(scope.$index, 'price')},\"blur\":function($event){return _vm.handlePriceBlur(scope.$index)}},model:{value:(scope.row._priceEditing),callback:function ($$v) {_vm.$set(scope.row, \"_priceEditing\", $$v)},expression:\"scope.row._priceEditing\"}},[_c('template',{slot:\"append\"},[_c('el-select',{staticClass:\"append-select append-select--coin\",staticStyle:{\"width\":\"120px\"},attrs:{\"size\":\"mini\"},on:{\"change\":function($event){return _vm.handlePayTypeChange(scope.$index)}},model:{value:(scope.row._selectedPayIndex),callback:function ($$v) {_vm.$set(scope.row, \"_selectedPayIndex\", $$v)},expression:\"scope.row._selectedPayIndex\"}},_vm._l(((scope.row.priceList || [])),function(pt,i){return _c('el-option',{key:pt.payTypeId || i,attrs:{\"label\":[String(pt.chain||'').toUpperCase(), String(pt.coin||'').toUpperCase()].filter(Boolean).join('-'),\"value\":i}})}),1)],1)],2)]}}],null,false,3035245774)},[_c('template',{slot:\"header\"},[_c('el-tooltip',{attrs:{\"effect\":\"dark\",\"placement\":\"top\"}},[_c('div',{attrs:{\"slot\":\"content\"},slot:\"content\"},[_vm._v(\" 卖家最终收款金额 = 机器售价 × 波动率\"),_c('br'),_vm._v(\" 波动率规则:\"),_c('br'),_vm._v(\" 1)0% - 5%(包含5%):波动率 = 1(按售价结算)\"),_c('br'),_vm._v(\" 2)5%以上:波动率 = 实际算力 / 理论算力,且不会超过 1,即最终结算时不会超过机器售价 \")]),_c('i',{staticClass:\"el-icon-question label-help\",attrs:{\"aria-label\":\"帮助\",\"tabindex\":\"0\"}})]),_c('span',[_vm._v(\"售价(按结算币种)\")])],1)],2),_c('el-table-column',{attrs:{\"label\":\"最大租赁天数(天)\",\"width\":\"100\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('el-input',{class:{ 'changed-input': _vm.isCellChanged(scope.row, 'maxLeaseDays') },staticStyle:{\"max-width\":\"260px\"},attrs:{\"size\":\"small\",\"inputmode\":\"numeric\",\"disabled\":_vm.isRowDisabled(scope.row)},on:{\"input\":function($event){return _vm.handleMaxLeaseDaysInput(scope.$index)},\"blur\":function($event){return _vm.handleMaxLeaseDaysBlur(scope.$index)}},model:{value:(scope.row.maxLeaseDays),callback:function ($$v) {_vm.$set(scope.row, \"maxLeaseDays\", $$v)},expression:\"scope.row.maxLeaseDays\"}},[_c('template',{slot:\"append\"},[_vm._v(\"天\")])],2)]}}],null,false,3414109227)}),_c('el-table-column',{attrs:{\"label\":\"上下架\",\"min-width\":\"140\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('el-switch',{attrs:{\"active-value\":0,\"inactive-value\":1,\"active-text\":\"上架\",\"inactive-text\":\"下架\",\"disabled\":_vm.isRowDisabled(scope.row)},on:{\"change\":function($event){return _vm.handleStateChange(scope.$index)}},model:{value:(scope.row.state),callback:function ($$v) {_vm.$set(scope.row, \"state\", $$v)},expression:\"scope.row.state\"}})]}}],null,false,1620801377)}),_c('el-table-column',{attrs:{\"label\":\"售出状态\",\"min-width\":\"100\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('el-tag',{attrs:{\"type\":scope.row.saleState === 0 ? 'info' : (scope.row.saleState === 1 ? 'danger' : 'warning')}},[_vm._v(\" \"+_vm._s(scope.row.saleState === 0 ? '未售出' : (scope.row.saleState === 1 ? '已售出' : '售出中'))+\" \")])]}}],null,false,1904393654)}),_c('el-table-column',{attrs:{\"label\":\"操作\",\"fixed\":\"right\",\"min-width\":\"120\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('el-button',{staticStyle:{\"color\":\"#f56c6c\"},attrs:{\"type\":\"text\",\"size\":\"small\",\"disabled\":_vm.isRowDisabled(scope.row)},on:{\"click\":function($event){return _vm.handleDeleteMachine(scope.row)}}},[_vm._v(\"删除\")])]}}],null,false,979761678)})],1)],1):_c('div',{staticClass:\"empty-text\"},[_vm._v(\"暂无组合数据\")])]),(_vm.machineList && _vm.machineList.length)?_c('div',{staticClass:\"actions\"},[_c('el-button',{attrs:{\"type\":\"primary\"},on:{\"click\":_vm.handleOpenConfirm}},[_vm._v(\"提交修改机器\")])],1):_vm._e(),_c('el-dialog',{attrs:{\"title\":\"确认提交修改\",\"visible\":_vm.confirmVisible,\"width\":\"520px\"},on:{\"update:visible\":function($event){_vm.confirmVisible=$event}}},[_c('div',[_c('p',[_vm._v(\"请仔细确认已选择机器机器组合里的机器价格及相关参数定义。\")]),_c('p',[_vm._v(\"机器修改上架后,一经售出,在机器出售期间不能修改价格及机器参数。\")])]),_c('span',{staticClass:\"dialog-footer\",attrs:{\"slot\":\"footer\"},slot:\"footer\"},[_c('el-button',{on:{\"click\":function($event){_vm.confirmVisible = false}}},[_vm._v(\"取消\")]),_c('el-button',{attrs:{\"type\":\"primary\"},on:{\"click\":_vm.handleSubmitMachines}},[_vm._v(\"确认提交修改\")])],1)])],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"withdrawal-history-container\"},[_vm._m(0),_c('div',{staticClass:\"tab-container\"},[_c('el-tabs',{on:{\"tab-click\":_vm.handleTabClick},model:{value:(_vm.activeTab),callback:function ($$v) {_vm.activeTab=$$v},expression:\"activeTab\"}},[_c('el-tab-pane',{attrs:{\"label\":\"提现中\",\"name\":\"pending\"}},[_c('div',{staticClass:\"tab-content\"},[_c('div',{staticClass:\"list-header\"},[_c('span',{staticClass:\"list-title\"},[_vm._v(\"提现中 (\"+_vm._s(_vm.total)+\")\")]),_c('el-button',{attrs:{\"type\":\"primary\",\"size\":\"small\"},on:{\"click\":_vm.refreshData}},[_c('i',{staticClass:\"el-icon-refresh\"}),_vm._v(\" 刷新 \")])],1),_c('div',{directives:[{name:\"loading\",rawName:\"v-loading\",value:(_vm.loading),expression:\"loading\"}],staticClass:\"withdrawal-list\"},[_vm._l((_vm.pendingWithdrawals),function(item){return _c('div',{key:item.id,staticClass:\"withdrawal-item pending\",on:{\"click\":function($event){return _vm.showDetail(item)}}},[_c('div',{staticClass:\"item-main\"},[_c('div',{staticClass:\"item-left\"},[_c('div',{staticClass:\"amount\"},[_vm._v(_vm._s(item.amount)+\" \"+_vm._s(item.toSymbol || 'USDT'))]),_c('div',{staticClass:\"chain\"},[_vm._v(_vm._s(_vm.getChainName(item.toChain)))])]),_c('div',{staticClass:\"item-right\"},[_c('div',{staticClass:\"status pending-status\"},[_c('i',{staticClass:\"el-icon-loading\"}),_vm._v(\" \"+_vm._s(_vm.getStatusText(item.status))+\" \")]),_c('div',{staticClass:\"time\"},[_vm._v(_vm._s(_vm.formatTime(item.createTime)))])])]),_c('div',{staticClass:\"item-footer\"},[_c('div',{staticClass:\"footer-left\"},[_c('span',{staticClass:\"address\"},[_vm._v(_vm._s(_vm.formatAddress(item.toAddress)))]),(item.txHash)?_c('span',{staticClass:\"tx-hash\"},[_c('i',{staticClass:\"el-icon-link\"}),_vm._v(\" \"+_vm._s(_vm.formatAddress(item.txHash))+\" \")]):_vm._e()]),_c('i',{staticClass:\"el-icon-arrow-right\"})])])}),(_vm.pendingWithdrawals.length === 0)?_c('div',{staticClass:\"empty-state\"},[_c('i',{staticClass:\"el-icon-document\"}),_c('p',[_vm._v(\"暂无提现中的记录\")])]):_vm._e()],2)])]),_c('el-tab-pane',{attrs:{\"label\":\"提现成功\",\"name\":\"success\"}},[_c('div',{staticClass:\"tab-content\"},[_c('div',{staticClass:\"list-header\"},[_c('span',{staticClass:\"list-title\"},[_vm._v(\"提现成功 (\"+_vm._s(_vm.total)+\")\")]),_c('el-button',{attrs:{\"type\":\"primary\",\"size\":\"small\"},on:{\"click\":_vm.refreshData}},[_c('i',{staticClass:\"el-icon-refresh\"}),_vm._v(\" 刷新 \")])],1),_c('div',{directives:[{name:\"loading\",rawName:\"v-loading\",value:(_vm.loading),expression:\"loading\"}],staticClass:\"withdrawal-list\"},[_vm._l((_vm.successWithdrawals),function(item){return _c('div',{key:item.id,staticClass:\"withdrawal-item success\",on:{\"click\":function($event){return _vm.showDetail(item)}}},[_c('div',{staticClass:\"item-main\"},[_c('div',{staticClass:\"item-left\"},[_c('div',{staticClass:\"amount\"},[_vm._v(_vm._s(item.amount)+\" \"+_vm._s(item.toSymbol || 'USDT'))]),_c('div',{staticClass:\"chain\"},[_vm._v(_vm._s(_vm.getChainName(item.toChain)))])]),_c('div',{staticClass:\"item-right\"},[_c('div',{staticClass:\"status success-status\"},[_c('i',{staticClass:\"el-icon-check\"}),_vm._v(\" \"+_vm._s(_vm.getStatusText(item.status))+\" \")]),_c('div',{staticClass:\"time\"},[_vm._v(_vm._s(_vm.formatTime(item.createTime)))])])]),_c('div',{staticClass:\"item-footer\"},[_c('div',{staticClass:\"footer-left\"},[_c('span',{staticClass:\"address\"},[_vm._v(_vm._s(_vm.formatAddress(item.toAddress)))]),(item.txHash)?_c('span',{staticClass:\"tx-hash\"},[_c('i',{staticClass:\"el-icon-link\"}),_vm._v(\" \"+_vm._s(_vm.formatAddress(item.txHash))+\" \")]):_vm._e()]),_c('i',{staticClass:\"el-icon-arrow-right\"})])])}),(_vm.successWithdrawals.length === 0)?_c('div',{staticClass:\"empty-state\"},[_c('i',{staticClass:\"el-icon-document\"}),_c('p',[_vm._v(\"暂无提现成功的记录\")])]):_vm._e()],2)])]),_c('el-tab-pane',{attrs:{\"label\":\"提现失败\",\"name\":\"failed\"}},[_c('div',{staticClass:\"tab-content\"},[_c('div',{staticClass:\"list-header\"},[_c('span',{staticClass:\"list-title\"},[_vm._v(\"提现失败 (\"+_vm._s(_vm.total)+\")\")]),_c('el-button',{attrs:{\"type\":\"primary\",\"size\":\"small\"},on:{\"click\":_vm.refreshData}},[_c('i',{staticClass:\"el-icon-refresh\"}),_vm._v(\" 刷新 \")])],1),_c('div',{directives:[{name:\"loading\",rawName:\"v-loading\",value:(_vm.loading),expression:\"loading\"}],staticClass:\"withdrawal-list\"},[_vm._l((_vm.failedWithdrawals),function(item){return _c('div',{key:item.id,staticClass:\"withdrawal-item failed\",on:{\"click\":function($event){return _vm.showDetail(item)}}},[_c('div',{staticClass:\"item-main\"},[_c('div',{staticClass:\"item-left\"},[_c('div',{staticClass:\"amount\"},[_vm._v(_vm._s(item.amount)+\" \"+_vm._s(item.toSymbol || 'USDT'))]),_c('div',{staticClass:\"chain\"},[_vm._v(_vm._s(_vm.getChainName(item.toChain)))])]),_c('div',{staticClass:\"item-right\"},[_c('div',{staticClass:\"status failed-status\"},[_c('i',{staticClass:\"el-icon-close\"}),_vm._v(\" \"+_vm._s(_vm.getStatusText(item.status))+\" \")]),_c('div',{staticClass:\"time\"},[_vm._v(_vm._s(_vm.formatTime(item.createTime)))])])]),_c('div',{staticClass:\"item-footer\"},[_c('div',{staticClass:\"footer-left\"},[_c('span',{staticClass:\"address\"},[_vm._v(_vm._s(_vm.formatAddress(item.toAddress)))]),(item.txHash)?_c('span',{staticClass:\"tx-hash\"},[_c('i',{staticClass:\"el-icon-link\"}),_vm._v(\" \"+_vm._s(_vm.formatAddress(item.txHash))+\" \")]):_vm._e()]),_c('i',{staticClass:\"el-icon-arrow-right\"})])])}),(_vm.failedWithdrawals.length === 0)?_c('div',{staticClass:\"empty-state\"},[_c('i',{staticClass:\"el-icon-document\"}),_c('p',[_vm._v(\"暂无提现失败的记录\")])]):_vm._e()],2)])])],1),_c('el-row',[_c('el-col',{staticStyle:{\"display\":\"flex\",\"justify-content\":\"center\"},attrs:{\"span\":24}},[_c('el-pagination',{staticStyle:{\"margin\":\"0 auto\",\"margin-top\":\"10px\"},attrs:{\"current-page\":_vm.currentPage,\"page-sizes\":_vm.pageSizes,\"page-size\":_vm.pagination.pageSize,\"layout\":\"total, sizes, prev, pager, next, jumper\",\"total\":_vm.total},on:{\"size-change\":_vm.handleSizeChange,\"current-change\":_vm.handleCurrentChange,\"update:currentPage\":function($event){_vm.currentPage=$event},\"update:current-page\":function($event){_vm.currentPage=$event}}})],1)],1)],1),_c('el-dialog',{attrs:{\"title\":\"提现详情\",\"visible\":_vm.detailDialogVisible,\"width\":\"600px\"},on:{\"update:visible\":function($event){_vm.detailDialogVisible=$event},\"close\":_vm.closeDetail}},[(_vm.selectedItem)?_c('div',{staticClass:\"detail-content\"},[_c('div',{staticClass:\"detail-section\"},[_c('h3',{staticClass:\"section-title\"},[_vm._v(\"基本信息\")]),_c('div',{staticClass:\"detail-list\"},[_c('div',{staticClass:\"detail-row\"},[_c('span',{staticClass:\"detail-label\"},[_vm._v(\"提现ID\")]),_c('span',{staticClass:\"detail-value\"},[_vm._v(_vm._s(_vm.selectedItem.id))])]),_c('div',{staticClass:\"detail-row\"},[_c('span',{staticClass:\"detail-label\"},[_vm._v(\"提现金额\")]),_c('span',{staticClass:\"detail-value amount\"},[_vm._v(_vm._s(_vm.selectedItem.amount)+\" \"+_vm._s(_vm.selectedItem.toSymbol || 'USDT'))])]),_c('div',{staticClass:\"detail-row\"},[_c('span',{staticClass:\"detail-label\"},[_vm._v(\"区块链网络\")]),_c('span',{staticClass:\"detail-value\"},[_vm._v(_vm._s(_vm.getChainName(_vm.selectedItem.toChain)))])]),_c('div',{staticClass:\"detail-row\"},[_c('span',{staticClass:\"detail-label\"},[_vm._v(\"提现状态\")]),_c('span',{staticClass:\"detail-value\"},[_c('el-tag',{attrs:{\"type\":_vm.getStatusType(_vm.selectedItem.status)}},[_vm._v(\" \"+_vm._s(_vm.getStatusText(_vm.selectedItem.status))+\" \")])],1)])])]),_c('div',{staticClass:\"detail-section\"},[_c('h3',{staticClass:\"section-title\"},[_vm._v(\"地址信息\")]),_c('div',{staticClass:\"detail-list\"},[_c('div',{staticClass:\"detail-row\"},[_c('span',{staticClass:\"detail-label\"},[_vm._v(\"收款地址\")]),_c('div',{staticClass:\"address-container\"},[_c('span',{staticClass:\"detail-value address\"},[_vm._v(_vm._s(_vm.selectedItem.toAddress))]),_c('el-button',{attrs:{\"type\":\"text\",\"size\":\"small\"},on:{\"click\":function($event){return _vm.copyAddress(_vm.selectedItem.toAddress)}}},[_vm._v(\" 复制 \")])],1)]),_c('div',{staticClass:\"detail-row\"},[_c('span',{staticClass:\"detail-label\"},[_vm._v(\"交易哈希\")]),_c('div',{staticClass:\"address-container\"},[_c('span',{staticClass:\"detail-value address\"},[_vm._v(_vm._s(_vm.selectedItem.txHash))]),(_vm.selectedItem.txHash)?_c('el-button',{attrs:{\"type\":\"text\",\"size\":\"small\"},on:{\"click\":function($event){return _vm.copyAddress(_vm.selectedItem.txHash)}}},[_vm._v(\" 复制 \")]):_vm._e()],1)])])]),_c('div',{staticClass:\"detail-section\"},[_c('h3',{staticClass:\"section-title\"},[_vm._v(\"时间信息\")]),_c('div',{staticClass:\"detail-list\"},[_c('div',{staticClass:\"detail-row\"},[_c('span',{staticClass:\"detail-label\"},[_vm._v(\"提现时间\")]),_c('span',{staticClass:\"detail-value\"},[_vm._v(_vm._s(_vm.formatFullTime(_vm.selectedItem.createTime)))])]),(_vm.selectedItem.updateTime)?_c('div',{staticClass:\"detail-row\"},[_c('span',{staticClass:\"detail-label\"},[_vm._v(\"完成时间\")]),_c('span',{staticClass:\"detail-value\"},[_vm._v(_vm._s(_vm.formatFullTime(_vm.selectedItem.updateTime)))])]):_vm._e()])])]):_vm._e(),_c('div',{staticClass:\"dialog-footer\",attrs:{\"slot\":\"footer\"},slot:\"footer\"},[_c('el-button',{on:{\"click\":_vm.closeDetail}},[_vm._v(\"关闭\")])],1)])],1)\n}\nvar staticRenderFns = [function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"page-header\"},[_c('h1',{staticClass:\"page-title\"},[_vm._v(\"提现记录\")]),_c('p',{staticClass:\"page-subtitle\"},[_vm._v(\"查看您的提现申请和交易状态\")])])\n}]\n\nexport { render, staticRenderFns }","\n\n \n \n \n \n \n ","import mod from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./login.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./login.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./login.vue?vue&type=template&id=1cc6346a&scoped=true\"\nimport script from \"./login.vue?vue&type=script&lang=js\"\nexport * from \"./login.vue?vue&type=script&lang=js\"\nimport style0 from \"./login.vue?vue&type=style&index=0&id=1cc6346a&prod&scoped=true&lang=css\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"1cc6346a\",\n null\n \n)\n\nexport default component.exports","\r\n\r\n\r\n\r\n\r\n\r\n","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"wallet-container\"},[_c('div',{staticClass:\"wallet-toolbar\",attrs:{\"role\":\"region\",\"aria-label\":\"钱包操作\"}},[_c('el-button',{staticClass:\"create-wallet-btn\",attrs:{\"type\":\"primary\"},on:{\"click\":_vm.openCreateWallet}},[_c('i',{staticClass:\"el-icon-plus\",staticStyle:{\"margin-right\":\"6px\"}}),_vm._v(\"充值 \")])],1),_c('section',{staticClass:\"wallet-card-section\"},_vm._l((_vm.walletList),function(w){return _c('div',{key:w.id,staticClass:\"wallet-card\"},[_c('div',{staticClass:\"wallet-header\"},[_c('h2',{staticClass:\"wallet-title\"},[_c('i',{staticClass:\"el-icon-wallet\"}),_vm._v(\" 我的钱包 \"),_c('el-tag',{staticStyle:{\"margin-left\":\"8px\"},attrs:{\"size\":\"mini\",\"effect\":\"dark\"}},[_vm._v(\" \"+_vm._s((w.fromChain || w.chain || '').toUpperCase())+\" \"+_vm._s((w.fromSymbol || w.coin || '').toUpperCase())+\" \")])],1),_c('div',{staticClass:\"wallet-balance\"},[_c('div',{staticClass:\"balance-item\"},[_c('span',{staticClass:\"balance-label\"},[_vm._v(\"可用余额\")]),_c('span',{staticClass:\"balance-amount\"},[_vm._v(_vm._s((w.walletBalance || w.balance || 0))+\" \"+_vm._s(_vm.displaySymbol(w)))])]),_c('div',{staticClass:\"balance-item\"},[_c('el-tooltip',{attrs:{\"placement\":\"top\",\"effect\":\"dark\"}},[_c('div',{attrs:{\"slot\":\"content\"},slot:\"content\"},[_vm._v(\" 冻结金额不能使用或提现,以下情况会冻结钱包余额:\"),_c('br'),_vm._v(\" 1. 下单机器后会冻结订单对应金额\"),_c('br'),_vm._v(\" 2. 提交提现后,金额正在提现中 \")]),_c('i',{staticClass:\"el-icon-question balance-tip-icon\"})]),_c('span',{staticClass:\"balance-label\"},[_vm._v(\"冻结余额\")]),_c('span',{staticClass:\"balance-amount frozen\"},[_vm._v(_vm._s((w.blockedBalance || 0))+\" \"+_vm._s(_vm.displaySymbol(w)))])],1),_c('el-button',{staticClass:\"withdraw-inline-btn\",attrs:{\"type\":\"success\",\"size\":\"mini\"},on:{\"click\":function($event){return _vm.handleWithdraw(w)}}},[_vm._v(\" 提现 \")])],1)])])}),0),_c('div',{staticClass:\"transaction-section\"},[_c('h3',{staticClass:\"section-title\"},[_vm._v(\"最近交易\")]),_c('div',{staticClass:\"transaction-list\"},[_vm._l((_vm.recentTransactions),function(transaction){return _c('div',{key:transaction.id,staticClass:\"transaction-item\"},[_c('div',{staticClass:\"transaction-info\"},[_c('span',{staticClass:\"transaction-type\"},[_vm._v(_vm._s(transaction.type))]),_c('span',{staticClass:\"transaction-time\"},[_vm._v(_vm._s(transaction.time))]),_c('el-tag',{staticClass:\"transaction-status\",attrs:{\"size\":\"mini\",\"type\":transaction.statusTagType || 'info'}},[_vm._v(\" \"+_vm._s(transaction.statusText || '-')+\" \")])],1),_c('div',{staticClass:\"transaction-amount\",class:transaction.amount > 0 ? 'positive' : 'negative'},[_vm._v(\" \"+_vm._s(transaction.amount > 0 ? '+' : '')+_vm._s(transaction.amountText)+\" USDT \")])])}),(_vm.recentTransactions.length === 0)?_c('div',{staticClass:\"empty-state\"},[_vm._v(\" 暂无交易记录 \")]):_vm._e()],2)]),_c('el-dialog',{attrs:{\"title\":\"钱包余额充值\",\"visible\":_vm.rechargeDialogVisible,\"width\":\"660px\"},on:{\"update:visible\":function($event){_vm.rechargeDialogVisible=$event},\"close\":_vm.resetRechargeForm}},[_c('div',{staticClass:\"recharge-content\"},[_c('div',{staticClass:\"wallet-address-section\"},[_c('h4',{staticClass:\"section-title\"},[_vm._v(\"钱包地址\")]),_c('div',{staticClass:\"charge-meta\"},[_c('el-tag',{staticClass:\"meta-tag\",attrs:{\"size\":\"small\",\"effect\":\"dark\",\"type\":\"warning\"}},[_c('i',{staticClass:\"el-icon-link\"}),_c('span',{staticClass:\"meta-title\"},[_vm._v(\"充值链:\")]),_c('span',{staticClass:\"meta-val\"},[_vm._v(_vm._s((_vm.WalletData.fromChain || _vm.WalletData.chain || '').toString().toUpperCase()))])]),_c('el-tag',{staticClass:\"meta-tag\",attrs:{\"size\":\"small\",\"effect\":\"dark\",\"type\":\"warning\"}},[_c('i',{staticClass:\"el-icon-coin\"}),_c('span',{staticClass:\"meta-title\"},[_vm._v(\"充值币种:\")]),_c('span',{staticClass:\"meta-val\"},[_vm._v(_vm._s((_vm.WalletData.fromSymbol || _vm.WalletData.coin || '').toString().toUpperCase()))])])],1),_c('div',{staticClass:\"address-container\"},[_c('el-input',{staticClass:\"address-input\",attrs:{\"readonly\":\"\",\"disabled\":true},model:{value:(_vm.WalletData.fromAddress),callback:function ($$v) {_vm.$set(_vm.WalletData, \"fromAddress\", $$v)},expression:\"WalletData.fromAddress\"}}),_c('el-button',{staticClass:\"copy-btn\",attrs:{\"type\":\"primary\",\"size\":\"small\"},on:{\"click\":function($event){return _vm.copyAddress(_vm.WalletData.fromAddress)}}},[_vm._v(\" 复制 \")])],1),_c('p',{staticClass:\"address-tip\"},[_vm._v(\"请向此地址转账非\"+_vm._s(_vm.displaySymbol(_vm.WalletData))+\"资产,否则资产将无法找回.\")])]),_c('div',{staticClass:\"qr-code-section\"},[_c('h4',{staticClass:\"section-title\"},[_vm._v(\"扫码充值\")]),_c('div',{staticClass:\"qr-code-container\"},[_c('div',{ref:\"qrCodeRef\",staticClass:\"qr-code\"}),_c('p',{staticClass:\"qr-tip\"},[_vm._v(\"使用支持\"+_vm._s(_vm.displaySymbol(_vm.WalletData))+\"的钱包扫描二维码\")])])]),_c('div',{staticClass:\"recharge-notice\"},[_c('h4',{staticClass:\"section-title\"},[_vm._v(\"充值说明\")]),_c('ul',{staticClass:\"notice-list\"},[_c('li',[_vm._v(\"充值后请耐心等待余额更新或在资金流水页面查看最新充值记录\")]),_c('li',[_vm._v(\"最小充值金额:10 \"+_vm._s(_vm.displaySymbol(_vm.WalletData)))])])])]),_c('div',{staticClass:\"dialog-footer\",attrs:{\"slot\":\"footer\"},slot:\"footer\"},[_c('el-button',{on:{\"click\":function($event){_vm.rechargeDialogVisible = false}}},[_vm._v(\"关闭\")])],1)]),_c('el-dialog',{attrs:{\"title\":\"USDT提现\",\"visible\":_vm.withdrawDialogVisible,\"width\":\"720px\",\"close-on-click-modal\":false,\"close-on-press-escape\":false},on:{\"update:visible\":function($event){_vm.withdrawDialogVisible=$event},\"close\":_vm.resetWithdrawForm}},[_c('el-form',{ref:\"withdrawForm\",attrs:{\"model\":_vm.withdrawForm,\"rules\":_vm.withdrawRules,\"label-width\":\"120px\"}},[_c('el-form-item',{attrs:{\"label\":\"提现链\"}},[_c('el-input',{staticStyle:{\"width\":\"100%\"},attrs:{\"value\":(_vm.WalletData.fromChain || _vm.WalletData.chain || _vm.withdrawForm.toChain || '').toString().toUpperCase(),\"disabled\":true}})],1),_c('el-form-item',{attrs:{\"label\":\"提现币种\"}},[_c('el-input',{staticStyle:{\"width\":\"100%\"},attrs:{\"value\":_vm.displayWithdrawSymbol,\"disabled\":true}})],1),_c('el-form-item',{attrs:{\"label\":\"提现金额\",\"prop\":\"amount\"}},[_c('el-input',{staticStyle:{\"width\":\"100%\"},attrs:{\"placeholder\":\"请输入提现金额\",\"inputmode\":\"decimal\"},on:{\"input\":_vm.handleAmountInput},model:{value:(_vm.withdrawForm.amount),callback:function ($$v) {_vm.$set(_vm.withdrawForm, \"amount\", $$v)},expression:\"withdrawForm.amount\"}},[_c('template',{slot:\"append\"},[_vm._v(_vm._s(_vm.displayWithdrawSymbol))])],2),_c('div',{staticClass:\"balance-info\"},[_c('div',{staticClass:\"balance-total\"},[_vm._v(\"钱包总余额:\"+_vm._s(_vm.totalBalance)+\" \"+_vm._s(_vm.displayWithdrawSymbol))]),_c('div',{staticClass:\"balance-row\"},[_c('span',[_vm._v(\"可用余额:\"+_vm._s(_vm.availableWithdrawBalance)+\" \"+_vm._s(_vm.displayWithdrawSymbol))]),_c('span',{staticClass:\"divider\"},[_vm._v(\"|\")]),_c('span',{staticClass:\"frozen-info\"},[_c('el-tooltip',{attrs:{\"placement\":\"top\",\"effect\":\"dark\"}},[_c('div',{attrs:{\"slot\":\"content\"},slot:\"content\"},[_vm._v(\" 冻结金额不能使用或提现,以下情况会冻结钱包余额:\"),_c('br'),_vm._v(\" 1. 下单机器后会冻结订单对应金额\"),_c('br'),_vm._v(\" 2. 提交提现后,金额正在提现中 \")]),_c('i',{staticClass:\"el-icon-question frozen-tip-icon\"})]),_vm._v(\" 冻结余额:\"+_vm._s((_vm.WalletData.blockedBalance || 0))+\" \"+_vm._s(_vm.displayWithdrawSymbol)+\" \"),_c('span',{staticClass:\"frozen-tip\"},[_vm._v(\"(购买机器下单后冻结,不可提现)\")])],1)])])],1),_c('el-form-item',{attrs:{\"label\":\"手续费\"}},[_c('el-input',{staticStyle:{\"width\":\"100%\"},attrs:{\"placeholder\":\"手续费\",\"disabled\":true},model:{value:(_vm.withdrawForm.fee),callback:function ($$v) {_vm.$set(_vm.withdrawForm, \"fee\", $$v)},expression:\"withdrawForm.fee\"}},[_c('template',{slot:\"append\"},[_vm._v(_vm._s(_vm.displayWithdrawSymbol))])],2),_c('div',{staticClass:\"fee-info\"},[_vm._v(\" 网络手续费:\"+_vm._s(_vm.withdrawForm.fee || '0.00')+\" \"+_vm._s(_vm.displayWithdrawSymbol)+\" \")])],1),_c('el-form-item',{attrs:{\"label\":\"实际到账\"}},[_c('el-input',{staticStyle:{\"width\":\"100%\"},attrs:{\"placeholder\":\"实际到账金额\",\"disabled\":true},model:{value:(_vm.actualAmount),callback:function ($$v) {_vm.actualAmount=$$v},expression:\"actualAmount\"}},[_c('template',{slot:\"append\"},[_vm._v(_vm._s(_vm.displayWithdrawSymbol))])],2),_c('div',{staticClass:\"actual-amount-info\"},[_vm._v(\" 实际到账:\"+_vm._s(_vm.actualAmount)+\" \"+_vm._s(_vm.displayWithdrawSymbol)+\" \")])],1),_c('el-form-item',{attrs:{\"label\":\"收款地址\",\"prop\":\"toAddress\"}},[_c('el-input',{staticStyle:{\"width\":\"100%\"},attrs:{\"type\":\"textarea\",\"rows\":3,\"placeholder\":\"请输入收款钱包地址\"},model:{value:(_vm.withdrawForm.toAddress),callback:function ($$v) {_vm.$set(_vm.withdrawForm, \"toAddress\", $$v)},expression:\"withdrawForm.toAddress\"}}),_c('div',{staticClass:\"address-tip\"},[_vm._v(\" 请确保地址正确,错误地址将导致资产丢失 \")])],1),_c('el-form-item',{attrs:{\"label\":\"谷歌验证码\",\"prop\":\"googleCode\"}},[_c('el-input',{ref:\"googleCodeInput\",staticStyle:{\"width\":\"100%\"},attrs:{\"placeholder\":\"请输入6位谷歌验证码\",\"maxlength\":\"6\"},on:{\"input\":_vm.handleGoogleCodeInput},model:{value:(_vm.withdrawForm.googleCode),callback:function ($$v) {_vm.$set(_vm.withdrawForm, \"googleCode\", $$v)},expression:\"withdrawForm.googleCode\"}},[_c('template',{slot:\"prepend\"},[_c('i',{staticClass:\"el-icon-key\"})])],2),_c('div',{staticClass:\"google-code-tip\"},[_vm._v(\" 为了保障您的账户安全,请输入您的谷歌验证器中的6位验证码 \")])],1)],1),_c('div',{staticClass:\"dialog-footer\",attrs:{\"slot\":\"footer\"},slot:\"footer\"},[_c('el-button',{on:{\"click\":function($event){_vm.withdrawDialogVisible = false}}},[_vm._v(\"取消\")]),_c('el-button',{attrs:{\"type\":\"primary\",\"loading\":_vm.withdrawLoading},on:{\"click\":_vm.confirmWithdraw}},[_vm._v(\"确认提现\")])],1)],1),_c('el-dialog',{attrs:{\"title\":\"链上充值\",\"visible\":_vm.createDialogVisible,\"close-on-click-modal\":false,\"close-on-press-escape\":false,\"width\":\"520px\"},on:{\"update:visible\":function($event){_vm.createDialogVisible=$event}}},[_c('el-form',{attrs:{\"label-width\":\"120px\"}},[_c('el-form-item',{attrs:{\"label\":\"选择充值链/币种\"}},[_c('el-cascader',{staticStyle:{\"width\":\"100%\"},attrs:{\"options\":_vm.options},model:{value:(_vm.createValue),callback:function ($$v) {_vm.createValue=$$v},expression:\"createValue\"}})],1)],1),_c('div',{staticClass:\"dialog-footer\",attrs:{\"slot\":\"footer\"},slot:\"footer\"},[_c('el-button',{on:{\"click\":function($event){_vm.createDialogVisible = false}}},[_vm._v(\"取消\")]),_c('el-button',{attrs:{\"type\":\"primary\",\"loading\":_vm.createLoading},on:{\"click\":_vm.confirmCreateWallet}},[_vm._v(\"确定\")])],1)],1)],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./orderDetail.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./orderDetail.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./orderDetail.vue?vue&type=template&id=31af0562&scoped=true\"\nimport script from \"./orderDetail.vue?vue&type=script&lang=js\"\nexport * from \"./orderDetail.vue?vue&type=script&lang=js\"\nimport style0 from \"./orderDetail.vue?vue&type=style&index=0&id=31af0562&prod&scoped=true&lang=css\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"31af0562\",\n null\n \n)\n\nexport default component.exports","\n\n\n\n ","import mod from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./securitySettings.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./securitySettings.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./securitySettings.vue?vue&type=template&id=fe47c9d8&scoped=true\"\nimport script from \"./securitySettings.vue?vue&type=script&lang=js\"\nexport * from \"./securitySettings.vue?vue&type=script&lang=js\"\nimport style0 from \"./securitySettings.vue?vue&type=style&index=0&id=fe47c9d8&prod&scoped=true&lang=css\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"fe47c9d8\",\n null\n \n)\n\nexport default component.exports","import mod from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./index.vue?vue&type=template&id=2abe49ac&scoped=true\"\nimport script from \"./index.vue?vue&type=script&lang=js\"\nexport * from \"./index.vue?vue&type=script&lang=js\"\nimport style0 from \"./index.vue?vue&type=style&index=0&id=2abe49ac&prod&scoped=true&lang=css\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"2abe49ac\",\n null\n \n)\n\nexport default component.exports","import { getShopList } from '../../api/products'\nexport default {\n name: 'ProductList',\n data() {\n return {\n products: [\n // {\n // id: 1,\n // name: \"Nexa\",\n // price: `10000~20000`,\n // image: \"https://img.yzcdn.cn/vant/apple-1.jpg\",\n // desc: \"NexaPow\",\n // },\n // {\n // id: 2,\n // name: \"grs\",\n // price: `10000~20000`,\n // image: \"https://img.yzcdn.cn/vant/apple-1.jpg\",\n // desc: \"groestl\",\n // },\n // {\n // id: 3,\n // name: \"mona\",\n // price: `10000~20000`,\n // image: \"https://img.yzcdn.cn/vant/apple-1.jpg\",\n // desc: \"Lyra2REv2\",\n // },\n // {\n // id: 4,\n // name: \"dgb\",\n // price: `10000~20000`,\n // image: \"https://img.yzcdn.cn/vant/apple-1.jpg\",\n // desc: \"DigiByte(Skein)\",\n // },\n ],\n loading: false,\n powerList: [\n // {\n // value: 1,\n // label: \"NexaPow\",\n // children: [\n // {\n // value: 1 - 1,\n // label: \"挖矿账户1\",\n // },\n // {\n // value: 1 - 2,\n // label: \"挖矿账户2\",\n // },\n // ],\n // },\n // {\n // value: 2,\n // label: \"Grepow\",\n // children: [\n // {\n // value: 2 - 1,\n // label: \"挖矿账户1\",\n // },\n // {\n // value: 2 - 2,\n // label: \"挖矿账户2\",\n // },\n // ],\n // },\n // {\n // value: 3,\n // label: \"mofang\",\n // children: [\n // {\n // value: 3 - 1,\n // label: \"挖矿账户1\",\n // },\n // ],\n // },\n ], \n currencyList: [\n {\n path: \"nexaAccess\",\n value: \"nexa\",\n label: \"nexa\",\n\n imgUrl: `https://m2pool.com/img/nexa.png`,\n name: \"course.NEXAcourse\",\n show: true,\n amount: 10000,\n },\n {\n path: \"grsAccess\",\n value: \"grs\",\n label: \"grs\",\n\n imgUrl: `https://m2pool.com/img/grs.svg`,\n name: \"course.GRScourse\",\n show: true,\n amount: 1,\n },\n {\n path: \"monaAccess\",\n value: \"mona\",\n label: \"mona\",\n\n imgUrl: `https://m2pool.com/img/mona.svg`,\n name: \"course.MONAcourse\",\n show: true,\n amount: 1,\n },\n {\n path: \"dgbsAccess\",\n value: \"dgbs\",\n // label: \"dgb-skein-pool1\",\n label: \"dgb(skein)\",\n\n imgUrl: `https://m2pool.com/img/dgb.svg`,\n name: \"course.dgbsCourse\",\n show: true,\n amount: 1,\n },\n {\n path: \"dgbqAccess\",\n value: \"dgbq\",\n // label: \"dgb(qubit-pool1)\",\n label: \"dgb(qubit)\",\n\n imgUrl: `https://m2pool.com/img/dgb.svg`,\n name: \"course.dgbqCourse\",\n show: true,\n amount: 1,\n },\n {\n path: \"dgboAccess\",\n value: \"dgbo\",\n // label: \"dgb-odocrypt-pool1\",\n label: \"dgb(odocrypt)\",\n\n imgUrl: `https://m2pool.com/img/dgb.svg`,\n name: \"course.dgboCourse\",\n show: true,\n amount: 1,\n },\n {\n path: \"rxdAccess\",\n value: \"rxd\",\n label: \"radiant(rxd)\",\n\n imgUrl: `https://m2pool.com/img/rxd.png`,\n name: \"course.RXDcourse\",\n show: true,\n amount: 100,\n },\n {\n path: \"enxAccess\",\n value: \"enx\",\n label: \"Entropyx(enx)\",\n\n imgUrl: `https://m2pool.com/img/enx.svg`,\n name: \"course.ENXcourse\",\n show: true,\n amount: 5000,\n },\n {\n path: \"alphminingPool\",\n value: \"alph\",\n label: \"alephium\",\n\n imgUrl: `https://m2pool.com/img/alph.svg`,\n name: \"course.alphCourse\",\n show: true,\n amount: 1,\n },\n ],\n screenCurrency: \"\",\n searchAlgorithm: \"\",\n params:{\n pageNum: \"1\",\n pageSize: \"10\",\n keyword:\"\"\n },\n productListLoading:false,\n }\n },\n mounted() {\n this.fetchShopList()\n },\n methods: {\n // 获取商场页面的店铺列表\n async fetchShopList(params) {\n this.productListLoading = true\n try{\n // 仅允许 pageNum、pageSize、keyword 三个参数\n const payload = {\n pageNum: this.params.pageNum,\n pageSize: this.params.pageSize\n }\n const kw = params && typeof params === 'object' ? params.keyword : this.params.keyword\n if (kw) payload.keyword = kw\n const res = await getShopList(payload)\n if (res && (res.code === 0 || res.code === 200)) {\n // 这里直接将店铺列表赋值到 products,用于页面渲染\n this.products = Array.isArray(res.rows) ? res.rows : []\n } else {\n this.products = []\n }\n }catch(e){\n console.error('获取店铺列表失败:', e)\n this.products = []\n }\n this.productListLoading = false\n },\n \n // 算法搜索(使用同一接口,传入 algorithm 参数)\n handleAlgorithmSearch() {\n const keyword = (this.searchAlgorithm || '').trim()\n this.params.keyword = keyword\n this.fetchShopList(keyword ? { keyword } : undefined)\n \n },\n // 清空搜索关键字\n handleAlgorithmClear() {\n this.searchAlgorithm = \"\"\n this.params.keyword = \"\"\n this.fetchShopList()\n },\n handleProductClick(product) {\n\n const id = (product && (product.shopId != null ? product.shopId : product.id)) \n if (id !== undefined && id !== null) {\n this.$router.push(`/product/${id}`); \n } \n\n \n },\n\n\n\n }\n}","import { render, staticRenderFns } from \"./App.vue?vue&type=template&id=662f903c\"\nvar script = {}\nimport style0 from \"./App.vue?vue&type=style&index=0&id=662f903c&prod&lang=scss\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","export const coinList = [\r\n {\r\n path: \"nexaAccess\",\r\n value: \"nexa\",\r\n label: \"nexa\",\r\n\r\n imgUrl: `https://m2pool.com/img/nexa.png`,\r\n name: \"course.NEXAcourse\",\r\n show: true,\r\n amount: 10000,\r\n },\r\n {\r\n path: \"grsAccess\",\r\n value: \"grs\",\r\n label: \"grs\",\r\n\r\n imgUrl: `https://m2pool.com/img/grs.svg`,\r\n name: \"course.GRScourse\",\r\n show: true,\r\n amount: 1,\r\n },\r\n {\r\n path: \"monaAccess\",\r\n value: \"mona\",\r\n label: \"mona\",\r\n\r\n imgUrl: `https://m2pool.com/img/mona.svg`,\r\n name: \"course.MONAcourse\",\r\n show: true,\r\n amount: 1,\r\n },\r\n {\r\n path: \"dgbsAccess\",\r\n value: \"dgbs\",\r\n // label: \"dgb-skein-pool1\",\r\n label: \"dgb(skein)\",\r\n\r\n imgUrl: `https://m2pool.com/img/dgb.svg`,\r\n name: \"course.dgbsCourse\",\r\n show: true,\r\n amount: 1,\r\n },\r\n {\r\n path: \"dgbqAccess\",\r\n value: \"dgbq\",\r\n // label: \"dgb(qubit-pool1)\",\r\n label: \"dgb(qubit)\",\r\n\r\n imgUrl: `https://m2pool.com/img/dgb.svg`,\r\n name: \"course.dgbqCourse\",\r\n show: true,\r\n amount: 1,\r\n },\r\n {\r\n path: \"dgboAccess\",\r\n value: \"dgbo\",\r\n // label: \"dgb-odocrypt-pool1\",\r\n label: \"dgb(odocrypt)\",\r\n\r\n imgUrl: `https://m2pool.com/img/dgb.svg`,\r\n name: \"course.dgboCourse\",\r\n show: true,\r\n amount: 1,\r\n },\r\n {\r\n path: \"rxdAccess\",\r\n value: \"rxd\",\r\n label: \"radiant(rxd)\",\r\n\r\n imgUrl: `https://m2pool.com/img/rxd.png`,\r\n name: \"course.RXDcourse\",\r\n show: true,\r\n amount: 100,\r\n },\r\n {\r\n path: \"enxAccess\",\r\n value: \"enx\",\r\n label: \"Entropyx(enx)\",\r\n\r\n imgUrl: `https://m2pool.com/img/enx.svg`,\r\n name: \"course.ENXcourse\",\r\n show: true,\r\n amount: 5000,\r\n },\r\n {\r\n path: \"alphminingPool\",\r\n value: \"alph\",\r\n label: \"alephium\",\r\n\r\n imgUrl: `https://m2pool.com/img/alph.svg`,\r\n name: \"course.alphCourse\",\r\n show: true,\r\n amount: 1,\r\n },\r\n ]","import mod from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./productNew.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./productNew.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./productNew.vue?vue&type=template&id=538996de&scoped=true\"\nimport script from \"./productNew.vue?vue&type=script&lang=js\"\nexport * from \"./productNew.vue?vue&type=script&lang=js\"\nimport style0 from \"./productNew.vue?vue&type=style&index=0&id=538996de&prod&scoped=true&lang=css\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"538996de\",\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"auth-container\"},[_vm._m(0),_c('div',{staticClass:\"auth-card\"},[_c('div',{staticClass:\"close-btn\",attrs:{\"title\":\"返回商城\"},on:{\"click\":_vm.goToShop}},[_c('i',{staticClass:\"el-icon-close\"})]),_vm._m(1),_c('el-form',{ref:\"resetForm\",staticClass:\"auth-form\",attrs:{\"model\":_vm.resetForm,\"rules\":_vm.resetRules},nativeOn:{\"submit\":function($event){$event.preventDefault();return _vm.handleReset.apply(null, arguments)}}},[_c('el-form-item',{attrs:{\"prop\":\"email\"}},[_c('el-input',{attrs:{\"placeholder\":\"请输入注册时的邮箱\",\"prefix-icon\":\"el-icon-message\",\"size\":\"large\",\"clearable\":\"\"},model:{value:(_vm.resetForm.email),callback:function ($$v) {_vm.$set(_vm.resetForm, \"email\", $$v)},expression:\"resetForm.email\"}})],1),_c('el-form-item',{attrs:{\"prop\":\"code\"}},[_c('div',{staticClass:\"code-input-wrapper\"},[_c('el-input',{attrs:{\"placeholder\":\"请输入邮箱验证码\",\"prefix-icon\":\"el-icon-key\",\"size\":\"large\",\"maxlength\":\"10\",\"clearable\":\"\"},model:{value:(_vm.resetForm.code),callback:function ($$v) {_vm.$set(_vm.resetForm, \"code\", $$v)},expression:\"resetForm.code\"}}),_c('el-button',{staticClass:\"send-code-btn\",attrs:{\"type\":\"primary\",\"size\":\"large\",\"disabled\":_vm.countdown > 0,\"loading\":_vm.sendingCode},on:{\"click\":_vm.handleSendCode}},[_vm._v(\" \"+_vm._s(_vm.countdown > 0 ? `${_vm.countdown}秒后重试` : '获取验证码')+\" \")])],1)]),_c('el-form-item',{attrs:{\"prop\":\"password\"}},[_c('el-input',{attrs:{\"type\":\"password\",\"placeholder\":\"请输入新密码(8-32位)\",\"prefix-icon\":\"el-icon-lock\",\"size\":\"large\",\"show-password\":\"\",\"clearable\":\"\"},model:{value:(_vm.resetForm.password),callback:function ($$v) {_vm.$set(_vm.resetForm, \"password\", $$v)},expression:\"resetForm.password\"}}),_c('div',{staticClass:\"password-tip\"},[_c('i',{staticClass:\"el-icon-info\"}),_c('span',[_vm._v(\"密码需包含大小写字母、数字和特殊字符,长度8-32位\")])]),(_vm.resetForm.password)?_c('div',{staticClass:\"password-strength\"},[_c('span',{staticClass:\"strength-label\"},[_vm._v(\"密码强度:\")]),_c('span',{class:['strength-bar', _vm.passwordStrengthClass]},[_vm._v(\" \"+_vm._s(_vm.passwordStrengthText)+\" \")])]):_vm._e()],1),_c('el-form-item',{attrs:{\"prop\":\"confirmPassword\"}},[_c('el-input',{attrs:{\"type\":\"password\",\"placeholder\":\"请再次输入新密码\",\"prefix-icon\":\"el-icon-lock\",\"size\":\"large\",\"show-password\":\"\",\"clearable\":\"\"},nativeOn:{\"keyup\":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"enter\",13,$event.key,\"Enter\"))return null;return _vm.handleReset.apply(null, arguments)}},model:{value:(_vm.resetForm.confirmPassword),callback:function ($$v) {_vm.$set(_vm.resetForm, \"confirmPassword\", $$v)},expression:\"resetForm.confirmPassword\"}})],1),_c('el-form-item',[_c('el-button',{staticClass:\"auth-submit-btn\",attrs:{\"type\":\"primary\",\"size\":\"large\",\"loading\":_vm.loading},on:{\"click\":_vm.handleReset}},[_vm._v(\" \"+_vm._s(_vm.loading ? '重置中...' : '确认重置')+\" \")])],1),_c('div',{staticClass:\"auth-footer\"},[_c('router-link',{staticClass:\"link-text link-primary\",attrs:{\"to\":\"/login\"}},[_c('i',{staticClass:\"el-icon-back\"}),_vm._v(\" 返回登录 \")])],1)],1)],1)])\n}\nvar staticRenderFns = [function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"auth-background\"},[_c('div',{staticClass:\"bg-circle circle-1\"}),_c('div',{staticClass:\"bg-circle circle-2\"}),_c('div',{staticClass:\"bg-circle circle-3\"})])\n},function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"auth-header\"},[_c('h1',{staticClass:\"auth-title\"},[_vm._v(\"重置密码\")]),_c('p',{staticClass:\"auth-subtitle\"},[_vm._v(\"通过邮箱验证码重置您的密码\")])])\n}]\n\nexport { render, staticRenderFns }","import Vue from 'vue'\nimport VueRouter from 'vue-router'\nimport { mainRoutes } from './routes'\n\nVue.use(VueRouter)\n\nconst router = new VueRouter({\n mode: 'history',\n base: process.env.BASE_URL,\n routes: mainRoutes\n})\n\n// 路由守卫 - 设置页面标题和权限检查\nrouter.beforeEach((to, from, next) => {\n // 设置页面标题\n if (to.meta && to.meta.title) {\n document.title = `${to.meta.title} - Power Leasing`\n } else {\n document.title = 'Power Leasing - 电商系统'\n }\n \n // 检查权限\n if (to.meta && to.meta.allAuthority) {\n // 这里可以添加权限检查逻辑\n // 目前所有页面都是 ['all'] 权限,所以直接通过\n console.log(`访问页面: ${to.meta.title}, 权限: ${to.meta.allAuthority.join(', ')}`)\n }\n \n next()\n})\n\n// 路由错误处理\nrouter.onError((error) => {\n console.error('路由错误:', error)\n // 可以在这里添加错误处理逻辑,比如跳转到错误页面\n})\n\nexport default router\n","export default {\r\n '401': '认证失败,无法访问系统资源,请重新登录',\r\n '403': '当前操作没有权限',\r\n '404': '访问资源不存在',\r\n 'default': '系统未知错误,请反馈给管理员'\r\n}\r\n","import mod from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./wallet.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./wallet.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./wallet.vue?vue&type=template&id=7fc650d5&scoped=true\"\nimport script from \"./wallet.vue?vue&type=script&lang=js\"\nexport * from \"./wallet.vue?vue&type=script&lang=js\"\nimport style0 from \"./wallet.vue?vue&type=style&index=0&id=7fc650d5&prod&scoped=true&lang=css\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"7fc650d5\",\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"checkout-page\"},[_c('h1',{staticClass:\"page-title\"},[_vm._v(\"订单结算\")]),(_vm.loading)?_c('div',{staticClass:\"loading\"},[_c('el-loading-spinner'),_vm._v(\" 加载中... \")],1):(_vm.cartItems.length === 0)?_c('div',{staticClass:\"empty-cart\"},[_c('div',{staticClass:\"empty-icon\"},[_vm._v(\"🛒\")]),_c('h2',[_vm._v(\"购物车是空的\")]),_c('p',[_vm._v(\"请先添加商品到购物车\")]),_c('router-link',{staticClass:\"shop-now-btn\",attrs:{\"to\":\"/productList\"}},[_vm._v(\" 去购物 \")])],1):_c('div',{staticClass:\"checkout-content\"},[_c('div',{staticClass:\"order-summary\"},[_c('h2',{staticClass:\"section-title\"},[_vm._v(\"订单摘要\")]),_c('div',{staticClass:\"order-items\"},_vm._l((_vm.cartItems),function(item){return _c('div',{key:item.id,staticClass:\"order-item\"},[_c('div',{staticClass:\"item-image\"},[_c('img',{attrs:{\"src\":item.image,\"alt\":item.title}})]),_c('div',{staticClass:\"item-info\"},[_c('h3',{staticClass:\"item-title\"},[_vm._v(_vm._s(item.title))]),_c('div',{staticClass:\"item-price\"},[_vm._v(\"¥\"+_vm._s(item.price))])]),_c('div',{staticClass:\"item-quantity\"},[_c('span',{staticClass:\"quantity-label\"},[_vm._v(\"数量:\")]),_c('span',{staticClass:\"quantity-value\"},[_vm._v(_vm._s(item.quantity))])]),_c('div',{staticClass:\"item-total\"},[_c('span',{staticClass:\"total-label\"},[_vm._v(\"小计:\")]),_c('span',{staticClass:\"total-price\"},[_vm._v(\"¥\"+_vm._s((item.price * item.quantity).toFixed(2)))])])])}),0),_c('div',{staticClass:\"order-total\"},[_c('div',{staticClass:\"total-row\"},[_c('span',[_vm._v(\"商品总数:\")]),_c('span',[_vm._v(_vm._s(_vm.summary.totalQuantity)+\" 件\")])]),_c('div',{staticClass:\"total-row\"},[_c('span',[_vm._v(\"商品种类:\")]),_c('span',[_vm._v(_vm._s(_vm.cartItems.length)+\" 种\")])]),_c('div',{staticClass:\"total-row final-total\"},[_c('span',[_vm._v(\"订单总计:\")]),_c('span',{staticClass:\"final-amount\"},[_vm._v(\"¥\"+_vm._s(_vm.summary.totalPrice.toFixed(2)))])])])]),_c('div',{staticClass:\"checkout-form\"},[_c('h2',{staticClass:\"section-title\"},[_vm._v(\"收货信息\")]),_c('form',{staticClass:\"form\",on:{\"submit\":function($event){$event.preventDefault();return _vm.handleSubmit.apply(null, arguments)}}},[_c('div',{staticClass:\"form-row\"},[_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"form-label\",attrs:{\"for\":\"name\"}},[_vm._v(\"收货人姓名 *\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.form.name),expression:\"form.name\"}],staticClass:\"form-input\",attrs:{\"id\":\"name\",\"type\":\"text\",\"required\":\"\",\"placeholder\":\"请输入收货人姓名\",\"aria-describedby\":\"name-error\"},domProps:{\"value\":(_vm.form.name)},on:{\"input\":function($event){if($event.target.composing)return;_vm.$set(_vm.form, \"name\", $event.target.value)}}}),(_vm.errors.name)?_c('div',{staticClass:\"error-message\",attrs:{\"id\":\"name-error\"}},[_vm._v(\" \"+_vm._s(_vm.errors.name)+\" \")]):_vm._e()]),_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"form-label\",attrs:{\"for\":\"phone\"}},[_vm._v(\"联系电话 *\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.form.phone),expression:\"form.phone\"}],staticClass:\"form-input\",attrs:{\"id\":\"phone\",\"type\":\"tel\",\"required\":\"\",\"placeholder\":\"请输入联系电话\",\"aria-describedby\":\"phone-error\"},domProps:{\"value\":(_vm.form.phone)},on:{\"input\":function($event){if($event.target.composing)return;_vm.$set(_vm.form, \"phone\", $event.target.value)}}}),(_vm.errors.phone)?_c('div',{staticClass:\"error-message\",attrs:{\"id\":\"phone-error\"}},[_vm._v(\" \"+_vm._s(_vm.errors.phone)+\" \")]):_vm._e()])]),_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"form-label\",attrs:{\"for\":\"address\"}},[_vm._v(\"收货地址 *\")]),_c('textarea',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.form.address),expression:\"form.address\"}],staticClass:\"form-textarea\",attrs:{\"id\":\"address\",\"rows\":\"3\",\"required\":\"\",\"placeholder\":\"请输入详细收货地址\",\"aria-describedby\":\"address-error\"},domProps:{\"value\":(_vm.form.address)},on:{\"input\":function($event){if($event.target.composing)return;_vm.$set(_vm.form, \"address\", $event.target.value)}}}),(_vm.errors.address)?_c('div',{staticClass:\"error-message\",attrs:{\"id\":\"address-error\"}},[_vm._v(\" \"+_vm._s(_vm.errors.address)+\" \")]):_vm._e()]),_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"form-label\",attrs:{\"for\":\"note\"}},[_vm._v(\"备注\")]),_c('textarea',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.form.note),expression:\"form.note\"}],staticClass:\"form-textarea\",attrs:{\"id\":\"note\",\"rows\":\"2\",\"placeholder\":\"可选:订单备注信息\"},domProps:{\"value\":(_vm.form.note)},on:{\"input\":function($event){if($event.target.composing)return;_vm.$set(_vm.form, \"note\", $event.target.value)}}})]),_c('div',{staticClass:\"form-actions\"},[_c('router-link',{staticClass:\"back-btn\",attrs:{\"to\":\"/cart\"}},[_vm._v(\" 返回购物车 \")]),_c('button',{staticClass:\"submit-btn\",attrs:{\"type\":\"submit\",\"disabled\":_vm.submitting,\"aria-label\":\"提交订单\"}},[(_vm.submitting)?_c('span',[_vm._v(\"提交中...\")]):_c('span',[_vm._v(\"提交订单\")])])],1)])])])])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"receipt-page\"},[_c('div',{staticClass:\"card\",attrs:{\"aria-label\":\"提现记录\",\"tabindex\":\"0\"}},[_vm._m(0),(_vm.loading)?_c('div',{staticClass:\"loading\"},[_c('i',{staticClass:\"el-icon-loading\",attrs:{\"aria-label\":\"加载中\",\"role\":\"img\"}}),_vm._v(\" 加载中... \")]):_c('div',[_c('div',{staticClass:\"table-wrap\"},[_c('el-table',{staticClass:\"withdraw-table\",attrs:{\"data\":_vm.rows,\"border\":\"\",\"stripe\":\"\",\"size\":\"small\",\"header-cell-style\":{ textAlign: 'left' },\"cell-style\":{ textAlign: 'left' }}},[_c('el-table-column',{attrs:{\"label\":\"申请时间\",\"width\":\"140\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_vm._v(_vm._s(_vm.formatFullTime(scope.row.createTime)))]}}])}),_c('el-table-column',{attrs:{\"label\":\"提现金额\",\"width\":\"70\",\"show-overflow-tooltip\":\"\",\"align\":\"right\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('span',{staticClass:\"amount-red\"},[(_vm.formatAmount(scope.row.amount, scope.row.coin || scope.row.toSymbol || 'USDT').truncated)?_c('el-tooltip',{attrs:{\"content\":`-${_vm.formatAmount(scope.row.amount, scope.row.coin || scope.row.toSymbol || 'USDT').full}`,\"placement\":\"top\"}},[_c('span',[_vm._v(\" -\"+_vm._s(_vm.formatAmount(scope.row.amount, scope.row.coin || scope.row.toSymbol || 'USDT').text)+\" \"),_c('i',{staticClass:\"el-icon-more amount-more\"})])]):_c('span',[_vm._v(\" -\"+_vm._s(_vm.formatAmount(scope.row.amount, scope.row.coin || scope.row.toSymbol || 'USDT').text)+\" \")])],1)]}}])}),_c('el-table-column',{attrs:{\"label\":\"手续费\",\"width\":\"70\",\"show-overflow-tooltip\":\"\",\"align\":\"right\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('span',{staticClass:\"mono\"},[_vm._v(_vm._s(_vm.formatAmount(scope.row.serviceCharge, scope.row.coin || scope.row.toSymbol || 'USDT').text))])]}}])}),_c('el-table-column',{attrs:{\"label\":\"提现链\",\"width\":\"100\",\"show-overflow-tooltip\":\"\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_vm._v(_vm._s(_vm.formatChain(scope.row.toChain || scope.row.chain)))]}}])}),_c('el-table-column',{attrs:{\"label\":\"币种\",\"width\":\"80\",\"show-overflow-tooltip\":\"\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_vm._v(_vm._s(String(scope.row.coin || scope.row.toSymbol || '').toUpperCase()))]}}])}),_c('el-table-column',{attrs:{\"label\":\"收款地址\",\"min-width\":\"320\",\"show-overflow-tooltip\":\"\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('el-tooltip',{attrs:{\"content\":scope.row.toAddress,\"placement\":\"top\"}},[_c('span',{staticClass:\"mono-ellipsis\"},[_vm._v(_vm._s(scope.row.toAddress))])]),_c('el-button',{attrs:{\"type\":\"text\",\"size\":\"mini\"},on:{\"click\":function($event){$event.stopPropagation();return _vm.copy(scope.row.toAddress)}}},[_vm._v(\"复制\")])]}}])}),_c('el-table-column',{attrs:{\"label\":\"交易HASH\",\"width\":\"300\",\"show-overflow-tooltip\":\"\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('el-tooltip',{attrs:{\"content\":scope.row.txHash,\"placement\":\"top\"}},[_c('span',{staticClass:\"mono-ellipsis\"},[_vm._v(_vm._s(scope.row.txHash))])]),(scope.row.txHash)?_c('el-button',{attrs:{\"type\":\"text\",\"size\":\"mini\"},on:{\"click\":function($event){$event.stopPropagation();return _vm.copy(scope.row.txHash)}}},[_vm._v(\"复制\")]):_vm._e()]}}])}),_c('el-table-column',{attrs:{\"label\":\"状态\",\"width\":\"90\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('el-tag',{attrs:{\"type\":_vm.getStatusType(scope.row.status),\"size\":\"small\"}},[_vm._v(_vm._s(_vm.getStatusText(scope.row.status)))])]}}])}),_c('el-table-column',{attrs:{\"label\":\"状态更新时间\",\"width\":\"140\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_vm._v(_vm._s(_vm.formatFullTime(scope.row.updateTime)))]}}])})],1)],1),(!_vm.rows.length)?_c('div',{staticClass:\"empty\"},[_c('div',{staticClass:\"empty-icon\"},[_vm._v(\"🏧\")]),_c('div',{staticClass:\"empty-text\"},[_vm._v(\"暂无提现记录\")])]):_vm._e(),_c('div',{staticClass:\"pagination\"},[_c('el-pagination',{attrs:{\"background\":\"\",\"layout\":\"prev, pager, next, jumper\",\"current-page\":_vm.pageNum,\"page-size\":_vm.pageSize,\"total\":_vm.total},on:{\"update:currentPage\":function($event){_vm.pageNum=$event},\"update:current-page\":function($event){_vm.pageNum=$event},\"current-change\":_vm.fetchList}})],1)])])])\n}\nvar staticRenderFns = [function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"card-header\"},[_c('h3',{staticClass:\"card-title\"},[_vm._v(\"提现记录\")])])\n}]\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n","import request from '../utils/request'\n\n//商品列表\nexport function getList(data) {\n return request({\n url: `/lease/product/getList`,\n method: 'get',\n data\n })\n}\n\n//创建商品 新增商品\nexport function createProduct(data) {\n return request({\n url: `/lease/product/add`,\n method: 'post',\n data\n })\n}\n\n//获取商品列表\nexport function getProductList(data) {\n return request({\n url: `/lease/product/getList`,\n method: 'post',\n data\n })\n}\n\n// 更新商品\nexport function updateProduct(data) {\n return request({\n url: `/lease/product/update`,\n method: 'post',\n data\n })\n}\n\n// 删除商品\nexport function deleteProduct(id) {\n return request({\n url: `/lease/product/delete`,\n method: 'post',\n data: { id }\n })\n}\n\n\n\n// 查询单个商品详情\nexport function getMachineInfo(data) {\n return request({\n url: `/lease/product/getMachineInfo`,\n method: 'post', \n data\n })\n}\n\n\n// 已购商品\nexport function getOwnedList(data) {\n return request({\n url: `/lease/product/getOwnedList`,\n method: 'post', \n data\n })\n}\n\n\n\n// 已购商品详情\nexport function getOwnedById(data) {\n return request({\n url: `/lease/product/getOwnedById`,\n method: 'post', \n data\n })\n}\n\n// 查商品详情里面的商品信息\nexport function getMachineInfoById(data) {\n return request({\n url: `/lease/product/getMachineInfoById`,\n method: 'post', \n data\n })\n}\n\n\n// 查获取商城商品支持的支付方式\nexport function getPayTypes(data) {\n return request({\n url: `/lease/product/getPayTypes`,\n method: 'post', \n data\n })\n}\n\n\n// 卖家页面---矿机列表\nexport function getShopMachineListForSeller(data) {\n return request({\n url: `/lease/v2/product/machine/getShopMachineListForSeller`,\n method: 'post', \n data\n })\n}\n\n\n// 更新设置GPU商品列表的信息\nexport function updateGpuMachine(data) {\n return request({\n url: `/lease/v2/product/machine/updateGpuMachine`,\n method: 'post', \n data\n })\n}\n\n\n// 修改商品列表ASIC商品信息\nexport function updateAsicMachine(data) {\n return request({\n url: `/lease/v2/product/machine/updateAsicMachine`,\n method: 'post', \n data\n })\n}\n\n\n\n// 删除ASIC 或者GPU\nexport function deleteMachine(data) {\n return request({\n url: `/lease/v2/product/machine/deleteMachine`,\n method: 'post', \n data\n })\n}\n\n\n\n// 获取商场页面的店铺列表\nexport function getShopList(data) {\n return request({\n url: `/lease/v2/product/machine/getShopList`,\n method: 'post', \n data\n })\n}\n\n\n// 获取店铺详情\nexport function getShopMachineList(data) {\n return request({\n url: `/lease/v2/product/machine/getShopMachineList`,\n method: 'post', \n data\n })\n}\n\n\n\n// 获取店铺详情\nexport function addGoodsV2(data) {\n return request({\n url: `/lease/v2/shopping/cart/addGoodsV2`,\n method: 'post', \n data\n })\n}\n\n\n\n\n\n\n\n\n\n","import mod from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./myShops.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./myShops.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./myShops.vue?vue&type=template&id=4cbf061c&scoped=true\"\nimport script from \"./myShops.vue?vue&type=script&lang=js\"\nexport * from \"./myShops.vue?vue&type=script&lang=js\"\nimport style0 from \"./myShops.vue?vue&type=style&index=0&id=4cbf061c&prod&scoped=true&lang=css\"\nimport style1 from \"./myShops.vue?vue&type=style&index=1&id=4cbf061c&prod&lang=css\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"4cbf061c\",\n null\n \n)\n\nexport default component.exports","\n\n\n\n\n ","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"orders-page\"},[_c('h2',{staticClass:\"title\"},[_vm._v(\"已售出订单\")]),_c('el-tabs',{on:{\"tab-click\":_vm.handleTabClick},model:{value:(_vm.active),callback:function ($$v) {_vm.active=$$v},expression:\"active\"}},[_c('el-tab-pane',{attrs:{\"label\":\"订单进行中\",\"name\":\"7\"}},[_c('order-list',{attrs:{\"items\":_vm.orders[7],\"show-checkout\":false,\"is-seller\":true,\"empty-text\":\"暂无进行中的订单\"}})],1),_c('el-tab-pane',{attrs:{\"label\":\"订单已完成\",\"name\":\"8\"}},[_c('order-list',{attrs:{\"items\":_vm.orders[8],\"show-checkout\":false,\"is-seller\":true,\"empty-text\":\"暂无已完成的订单\"}})],1)],1)],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","__webpack_require__.amdO = {};","var deferred = [];\n__webpack_require__.O = function(result, chunkIds, fn, priority) {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = function(module) {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.p = \"/\";","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t524: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkpower_leasing\"] = self[\"webpackChunkpower_leasing\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [504], function() { return __webpack_require__(1406); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["_coinList","require","_products","exports","name","data","notOnlySpaces","rule","value","callback","trim","length","Error","containsEmoji","text","emojiPattern","test","noEmoji","submitting","form","type","coin","description","image","state","shopId","rules","required","message","trigger","validator","min","max","computed","coinOptions","coinList","label","created","$route","query","Number","methods","fetchAddProduct","params","res","createProduct","code","$message","msg","showClose","$router","push","handleSubmit","valid","$refs","productForm","validate","error","console","handleReset","resetFields","handleCancel","_order","_OrderList","_interopRequireDefault","components","OrderList","active","orders","loading","urlStatus","status","String","savedStatus","localStorage","getItem","initial","fetchOrders","fetchCancelOrder","cancelOrder","handleCancelOrder","orderId","handleTabClick","tab","setItem","e","warn","key","getOrdersByStatus","payload","list","Array","isArray","rows","$set","log","initNoEmojiGuard","window","__noEmojiGuardInitialized","isEditableTarget","el","Element","getAttribute","tag","tagName","toLowerCase","disallow","indexOf","setComposing","composing","__noEmojiComposing","isComposing","sanitizeAndRedispatch","target","before","selectionStart","selectionEnd","after","replace","removed","nextPos","Math","setSelectionRange","evt","Event","bubbles","dispatchEvent","document","addEventListener","component","_vm","this","_c","_self","staticClass","attrs","class","activeRole","isSecuritySettingsPage","on","$event","handleClickRole","_k","keyCode","preventDefault","_v","_l","displayedLinks","item","to","isActiveLink","_s","_machine","product","ranges","machineList","productId","confirmVisible","stateSnapshot","fieldSnapshot","updateLoading","unitOptions","id","fetchDetail","fetchMachineList","handlePayTypeChange","index","row","sel","_selectedPayIndex","priceList","_priceEditing","price","isRowDisabled","saleState","handleOpenConfirm","warning","getMachineInfoById","productMachineRangeList","getMachineListForUpdate","map","r","first","refreshStateSnapshot","refreshFieldSnapshot","snapshot","i","priceMap","forEach","p","payTypeId","theoryPower","powerDissipation","maxLeaseDays","isCellChanged","snap","pt","pid","cur","ori","current","original","restoreStateSnapshot","currentRow","prevState","updateMachineList","updateMachine","success","deleteMachine","handleTheoryPowerInput","rowItem","v","firstDot","slice","endsWithDot","endsWith","parts","split","intPart","decPart","handleNumericCell","d","handlePriceBlur","raw","pattern","handleMaxLeaseDaysInput","handleMaxLeaseDaysBlur","n","isInteger","handleTheoryPowerBlur","handlePowerDissipationBlur","handleTypeCell","handleStateChange","handleDeleteMachine","$confirm","confirmButtonText","cancelButtonText","handleSubmitMachines","powerPattern","pricePattern","isOnlySpaces","rowLabel","miner","theoryRaw","priceRaw","typeRaw","dissRaw","daysRaw","m","unit","handleBack","back","_m","ref","staticStyle","getRowKey","expandedRowKeys","getRowClassName","textAlign","handleRowClick","handleExpandChange","scopedSlots","_u","fn","scope","formatChain","fromChain","fromSymbol","toUpperCase","fromAddress","stopPropagation","copy","_e","formatFullTime","createTime","formatAmount","realAmount","toSymbol","truncated","full","toChain","toAddress","txHash","getStatusType","getStatusText","updateTime","page","pageSize","total","fetchList","_request","addSingleOrBatchMachine","request","url","method","getUserMachineList","getUserMinersList","downloadClient","responseType","addAsicMachine","getSupportCoin","getSupportAlgo","activeIndex","userEmail","buyerLinks","sellerLinks","userInitial","email","path","mounted","getVal","JSON","parse","val","savedRole","setActiveRoleByRoute","role","stringify","firstPath","qFrom","from","sessionStorage","buyerPrefixes","sellerPrefixes","shouldBuyer","some","shouldSeller","pathLike","prefixes","watch","immediate","handler","_user","_rsaEncrypt","validateEmail","emailReg","validatePassword","regexPassword","validateConfirmPassword","registerForm","password","validateAgree","confirmPassword","agree","registerRules","sendingCode","countdown","timer","passwordStrength","pwd","strength","passwordStrengthText","passwordStrengthClass","beforeDestroy","clearInterval","goToShop","go","handleSendCode","validateField","sendEmailCode","startCountdown","setInterval","handleRegister","passwordPlain","encryptedPassword","syncEncrypted","rsaEncryptSync","asyncEncrypted","rsaEncrypt","register","_vue","_App","_router","_store","_elementUi","_noEmojiGuard","Vue","config","productionTip","use","ElementUI","vm","router","store","render","h","App","$mount","_cartManager","_index","mixins","Index","formatPayType","chain","handleAddToCart","addToCart","title","quantity","_shops","feeRate","hasEmoji","str","emojiRegex","handleFeeRateInput","fetchAddShop","getAddShop","handleDescriptionInput","substring","handleCreate","hasShop","rateRaw","rateNum","decOk","includes","isFinite","toString","getBindInfo","bindGoogle","sendOpenGoogleCode","closeStepTwo","sendCloseGoogleCode","getGoogleStatus","openStepTwo","nativeOn","apply","arguments","model","$$v","expression","getOrdersByStatusForSeller","slot","loaded","shop","defaultCover","shopStateTagType","shopStateText","formatFeeRate","handleOpenEdit","handleToggleShop","handleDelete","handleAddProduct","handleWalletBind","shopConfigs","children","c","idx","payCoin","formatCoin","handleWithdraw","handleEditConfig","handleDeleteConfig","handleGoNew","withdrawDialogTitle","withdrawDialogVisible","withdrawForm","withdrawRules","currentWithdrawRow","displayWithdrawSymbol","handleAmountInput","amount","availableWithdrawBalance","fee","actualAmount","withdrawAddressEditable","handleEditAddressClick","handleGoogleCodeInput","googleCode","withdrawLoading","confirmWithdraw","visibleEdit","editForm","handleEditFeeRateInput","submitEdit","visibleConfigEdit","handleConfigEditClose","configForm","payAddress","handleConfigGoogleCodeInput","submitConfigEdit","directives","rawName","isCartEmpty","shops","expandedShopKeys","handleGuardExpand","expandable","shopScope","productMachineDtoList","getMachineRowClassName","sels","handleShopInnerSelectionChange","isRowSelectableByShop","typeClass","formatMachineType","canSaleNumbers","getRowMaxPurchaseForCart","handleNumbersChange","numbers","getRowMaxLeaseDaysLocal","handleLeaseTimeChange","handleLeaseTimeInput","leaseTime","getSelectedCoinSymbolForShop","proxy","getMachineUnitPriceBySelection","del","getSelectedCoinSymbolForShopHeader","displayShopTotalBySelection","handleShopPayChange","getSelectedPayIcon","paySelectionMap","getShopPayOptions","opt","icon","selectedMachineCount","Object","keys","selectedTotalByCoin","amt","handleRemoveSelectedMachines","clearOffLoading","handleClearOffShelf","handleCheckoutSelected","confirmDialog","visible","count","handleConfirmDialogPrev","confirmPay","grp","shopName","payLabel","coinSymbol","enough","deductibleAmount","items","unitPrice","subtotal","totalsByCoin","noticeDialog","handleNoticeAcknowledge","checked","configDialog","handleConfigPrev","handleConfigCancel","handleConfigConfirm","unconfiguredMachinesList","selectedMachines","coinAlgoOptions","checkStrictly","handleCoinAlgoChange","coinAlgoValue","poolOptions","handlePoolValueChange","poolValue","fontSize","handleConfigSelectionChange","getCurrentWalletMining","handleMachineWorkerIdInput","_workerId","handleWalletAddressInput","walletAddress","handleMiningAccountInput","miningAccount","unsupportedMachinesList","configuredMachines","formatWalletAddress","hasConfiguredMiningAccount","hasConfiguredWorkerId","googleCodeDialog","handleGoogleCodePrev","handleGoogleCodeCancel","isGoogleCodeValid","handleGoogleCodeSubmit","settlementSuccessfulVisible","handleCloseSuccessDialog","navigation","nav","isNavActive","cartItemCount","isLoggedIn","handleLogout","goToRegister","goToLogin","handleMachineCategoryChange","machineCategory","handleDownloadClient","handleGpuClientStarted","coinAndAlgoList","loadingCoins","handleCoinChange","loadingAlgos","algorithm","algoOptionsMap","algo","handleCoinRowTheoryInput","handleCoinRowUnitChange","handleAddCoinAlgoRow","handleRemoveCoinAlgoRow","handleTypeInput","handleNumeric","payTypeDefs","handleCostMapInput","costMap","cost","handleSellCountInput","handleSellCountBlur","sellCount","saving","handleSave","confirmData","saleNumbers","doSubmit","_wallet","_amount","recharge","withdraw","consume","rechargeRows","withdrawRows","consumeRows","expandedKeys","Set","pageSizes","currentPage","pagination","pageNum","getStatusByTab","loadList","truncateAmountByCoin","handleTab","pane","clear","tabName","indexPart","stable","__key","isExpanded","has","toggleExpand","add","typeKey","getTypeKeyByStatus","transactionRecord","mapped","loadByStatus","getTabByStatus","loadRecharge","loadWithdraw","loadConsume","statusClass","getRechargeStatusType","s","getRechargeStatusText","getWithdrawStatusType","getWithdrawStatusText","getPayStatusType","getPayStatusText","tron","trx","eth","ethereum","bsc","polygon","matic","time","Date","toLocaleString","formatTime","formatTrunc","decimals","num","factor","pow","trunc","padded","padEnd","handleSizeChange","handleCurrentChange","handleCopy","navigator","clipboard","writeText","ta","createElement","style","position","left","body","appendChild","focus","select","execCommand","removeChild","getLogin","getLogout","sendLoginCode","sendUpdatePwdCode","updatePassword","closeAccount","sendCloseAccount","updatePasswordInCenter","activeTab","pendingRecharges","refreshData","showDetail","getChainName","formatAddress","address","successRecharges","failedRecharges","detailDialogVisible","closeDetail","selectedItem","copyAddress","chainLabel","chainValue","payCoins","productOptions","editCoinOptionsApi","chainOptions","shopLoading","canCreateShop","editCoinOptions","selectedCoinLabels","Map","o","get","sym","balance","formatDec6","amountInt","toScaledInt","feeInt","formatDec6FromInt","fetchMyShop","formatBalance","serviceCharge","charge","validateWithdrawAmount","validateGoogleCode","$nextTick","input","withdrawToAddressInput","toAddressPlain","fromAddressPlain","encryptedToAddress","encryptedFromAddress","withdrawBalanceForSeller","fetchShopConfigs","undefined","toFixed","match","amountStr","normalized","re","RegExp","scale","round","decPartRaw","intVal","sign","abs","floor","padStart","amtInt","balanceInt","actualInt","fixed","resetShopState","getMyShop","getShopConfigV2","updateShopConfig","deleteShopConfig","getChainAndCoin","preSelected","filter","hasBind","join","payCoinStr","addr","encryptedPayAddress","gcode","updateShopConfigV2","removeSelectedCoin","labelUpper","queryShop","updateShop","deleteShop","setTimeout","isClosed","confirmMsg","closeShop","props","default","emptyText","showCheckout","Boolean","onCancel","Function","isSeller","payLoading","orderDialog","qrContent","dialogVisible","paymentDialog","totalPrice","payAmount","noPayAmount","img","safeItems","buildQrSrc","startsWith","formatDateTime","typeNum","handleCheckout","handleGoDetail","then","catch","shouldShowActions","handleTypeChange","listParams","searchPlaceholder","handleClear","handleSearch","searchKeyword","payTypes","formatPayTypeHead","getPayImage","selectedPayKey","getSelectedPayImage","buildPayKey","shopMachineList","getRowCoinText","getRowAlgorithmText","getTheoryText","getPowerDissText","getRowPriceText","handleEdit","updateMap","getRowId","handleToggleState","getPriceValue","handlePriceInput","handleUpdateGpu","editDialog","handleSaveEdit","editHandleCoinChange","editHandleRowTheoryInput","editHandleRowUnitChange","editHandleAddRow","editHandleRemoveRow","pl","handleEditPriceInput","productName","validateCoinAlgoRows","miners","minersLoading","selectedMiner","machineOptions","machinesLoading","selectedMachineRows","lastCostBaseline","lastCostMapBaseline","lastTypeBaseline","lastMaxLeaseDaysBaseline","lastPowerDissipationBaseline","lastTheoryPowerBaseline","lastUnitBaseline","gpuDialogVisible","clientDownloadUrl","process","VUE_APP_GPU_CLIENT_URL","hasDownloadedClient","productMachineURDVos","user","initPayTypesFromRoute","validateCost","validateCostMap","getPayTypes","loadSupportCoins","power","sort","loadAlgorithmsForCoin","algorithms","last","newIndex","splice","buildCoinCsvFromRows","set","token","t","buildAlgoCsvFromRows","handleCoinsInput","coinsInput","handleAlgorithmsInput","algorithmsInput","normalizeCsv","upper","arr","buildPriceList","defs","priceNum","seen","it","payChain","payCoinImage","nextCostMap","types","downloadUrl","defaults","baseURL","a","href","click","decodeURIComponent","values","initCostMap","syncMaxLeaseDaysToRows","syncCostToRows","newCost","oldBaseline","updateMachineType","handleRowPowerDissipationInput","handleRowPowerDissipationBlur","handleRowTheoryPowerInput","handleRowTheoryPowerBlur","handleRowUnitChange","rowNum","handleRowMaxLeaseDaysInput","handleRowMaxLeaseDaysBlur","handleRowPriceInput","handleRowPriceMapInput","handleRowPriceMapBlur","handleRowPriceBlur","handleRowTypeInput","handleRowTypeBlur","currentState","fetchMiners","coinKey","additionalProperties1","handleMinerChange","userMinerVo","ok","machineForm","invalidTypeRowIndex","findIndex","coinStr","algoStr","duration","authRoutes","Promise","resolve","_interopRequireWildcard2","meta","requiresAuth","productRoutes","allAuthority","cartRoutes","checkoutRoutes","accountRoutes","redirect","childrenRoutes","mainRoutes","resetForm","resetRules","options","cascaderProps","handleChange","node","handleItemClick","isLeaf","selectedCoins","handleRemoveSelectedCoin","preCheck","handlePreCheckClose","canSubmitPreCheck","handleConfirmBindAfterPreview","totalMachineNumber","totalMachines","coinsForBind","rowPrices","$index","addOrders","getOrdersByIds","getChainAndListForSeller","getCoinPrice","getMachineSupportCoinAndAlgorithm","getMachineSupportPool","addOrdersV2","getPurchasedItems","getPurchasedInfoV2","range","keyword","withKeys","__rowKey","isOpen","expandedRows","area","handleRangeChange","sellerReceiptList","_productService","_shoppingCart","selectedMap","paymentMethodList","filters","minPrice","maxPrice","minPower","maxPower","minPowerDissipation","maxPowerDissipation","powerUnitOptions","sortStates","priceSort","powerSort","powerDissipationSort","activeSortField","payFilterDefaultApplied","confirmAddDialog","cartMachineIdSet","cartCompositeKeySet","cartLoaded","machinesLoaded","productListData","tableData","productDetailLoading","dynamicMeta","dynamicColumns","dynamicRows","dynamicSearch","machineType","savedType","NaN","routeShopId","fetchGetMachineInfo","buildQueryParams","fetchPayTypes","formatDynamicCell","col","pv","getDisplayPrice","pc","getDisplayPriceCoin","nPrice","truncateTo6","coinUnit","colCurrency","currency","ensureDefaultPayFilterFromPrices","firstWithPriceList","find","chainRaw","coinRaw","hit","_truncate","f","isLastHashrateColumn","colIdx","cols","getRenderedColumns","hashrate","others","handleOpenDynamicSearch","handleConfirmDynamicSearch","fetchDynamicTable","kw","baseCols","hitCols","nextCols","handleMachineTypeChange","getRowCoin","getPriceCoinSymbol","formatNum6","ensureDefaultPayFilterSelection","payList","handleToggleSort","field","k","q","addNum","obj","getShopMachineList","root","columns","saleOutNumbers","purchaseQuantity","_selected","payConfigList","loadProduct","getProductById","fetchAddCart","addCart","fetchGetGoodsList","getGoodsListV2","rawRows","groups","shoppingCartInfoDtoList","flatMap","matched","g","ids","compositeKeys","totalCount","reduce","sum","CustomEvent","detail","autoSelectAndDisable","handleSeriesRowClick","lockedIds","opened","handleGetSeriesRowClassName","handleInnerSelectionChange","parentRow","selections","openedSet","isSelectable","isSelectedByParent","handleManualSelect","hasPrice","handleGetInnerRowClass","handleDecreaseVariantQuantity","groupIndex","variantIndex","variants","handleIncreaseVariantQuantity","handleVariantQuantityInput","handleAddVariantToCart","variant","onlyKey","handleAddSelectedToCart","allSelected","flat","handleOpenAddToCartDialog","picked","handleConfirmAddSelectedToCart","addGoodsV2","clearAllSelections","productMachines","handleDecreaseQuantity","rowIndex","handleIncreaseQuantity","handleQuantityInput","handleQuantityBlur","rowData","date","loginForm","loginRules","handleLogin","currentChain","multiple","emitPath","prices","getChainAndList","coinUpper","next","lastChain","expanded","expand","nodes","validateAddressByChain","toUpperOptions","src","FetchAddWalletShopConfig","encryptedParams","addWalletShopConfig","targetChain","filtered","preCheckBeforeBind","getProductListForShopWalletConfig","isSuccess","submitBindWithPrice","coins","collectMachineGroups","pushId","productMachineId","productMachineIdList","machines","machineIds","machineGroups","priceStr","symbol","productMachineForWalletConfigVoList","updateProductListForShopWalletConfig","resetPreCheckPrices","selectedCoinsDisplay","statusLoading","getStatusClass","handleButtonClick","getButtonText","handleChangePassword","handleDeleteAccount","step1Visible","handleStep1Close","qrCodeUrl","getQrCodeSrc","secretKey","handleCopySecret","handleNextToStep2","step2Visible","handleStep2Close","verifyForm","verifyRules","emailCode","handleSendEmailCode","handleCannotGetCode","handleCannotGetGoogleCode","handleBackToStep1","handleConfirm","closeDialogVisible","handleCloseDialogClose","closeForm","closeRules","sendingCloseCode","closeCountdown","handleSendCloseEmailCode","handleCloseGoogleCodeInput","closing","handleConfirmClose","openDialogVisible","handleOpenDialogClose","openForm","openRules","sendingOpenCode","openCountdown","handleSendOpenEmailCode","handleOpenGoogleCodeInput","opening","handleConfirmOpen","changePasswordDialogVisible","handleChangePasswordDialogClose","changePasswordForm","changePasswordRules","sendingChangePasswordCode","changePasswordCountdown","handleSendChangePasswordCode","handleChangePasswordGoogleCodeInput","changingPassword","handleConfirmChangePassword","deleteAccountDialogVisible","handleDeleteAccountDialogClose","deleteAccountForm","deleteAccountRules","sendingDeleteAccountCode","deleteAccountCountdown","handleSendDeleteAccountCode","handleDeleteAccountGoogleCodeInput","deletingAccount","handleConfirmDeleteAccount","detailData","poolUser","pool","poolUrl","watchUrl","purchasedMachinesList","workerId","recordTime","startTime","endTime","_receiptRecord","_withdrawRecord","AccountReceiptRecord","AccountWithdrawRecord","activeComponentName","syncTabFromRoute","getMaxDecimalsByCoin","truncateAmountRaw","maxDecimals","isNegative","keep","LoadingManager","constructor","loadingStates","setupListeners","resetAllLoadingStates","setLoading","componentId","stateKey","timestamp","now","getLoading","componentsToUpdate","resetComponentLoadingStates","loadingManager","_vuex","Vuex","Store","getters","mutations","actions","modules","productListLoading","handleAlgorithmClear","handleAlgorithmSearch","searchAlgorithm","products","handleProductClick","saleNumber","_verification","isEnabled","countdownTimer","closeCountdownTimer","openCountdownTimer","deleteAccountCountdownTimer","changePasswordCountdownTimer","googleStatus","getButtonType","check2FAStatus","loadUserEmail","handleDisable2FA","handleEnable2FA","secret","startCloseCountdown","eCode","gCode","clearValidate","startOpenCountdown","info","startChangePasswordCountdown","startDeleteAccountCountdown","dangerouslyUseHTMLString","removeItem","getShopConfig","addShopConfig","_axios","_errorCode","_loadingManager","_errorNotificationManager","pendingRequestMap","getRequestKey","service","axios","create","timeout","RETRY_WINDOW","pendingRequests","lastNetworkStatusTime","online","offline","networkRecoveryInProgress","$i18n","toLocaleTimeString","pendingPromises","async","response","delete","allSettled","commonLoadingProps","prop","errorNotificationManager","canShowError","retry","retryDelay","shouldRetry","superReportError","interceptors","headers","propName","part","encodeURIComponent","subPart","requestKey","cancel","cancelToken","CancelToken","reject","Blob","errorCode","getText","defaultValue","getLoginPath","locale","getHomePath","MessageBox","confirm","distinguishCancelAndClose","closeOnClickModal","location","Notification","Message","onLine","__retryCount","minerChartLoading","reportBlockLoading","retryCount","substr","handleViewDetail","rechargeRecords","totalPage","statusFilter","loadRechargeRecords","balanceRechargeList","records","chainNames","statusTypeMap","timeStr","diff","toLocaleDateString","fallbackCopyAddress","textArea","err","viewOnExplorer","explorers","open","statusMap","getGoodsList","deleteBatchGoods","deleteBatchGoodsForIsDelete","deleteBatchGoodsForIsDeleteV2","deleteBatchGoodsV2","STORAGE_KEY","readCart","parsed","writeCart","cart","updateQuantity","removeFromCart","clearCart","computeSummary","totalQuantity","mainNavigation","breadcrumbConfig","getBreadcrumb","checkRoutePermission","route","userPermissions","requiredPermissions","permission","getPageTitle","getPageDescription","fetchTableData","size","machineId","statusNum","MACHINE_TYPE_KEY","updateArr","unitCoin","initOptions","saved","parseInt","getPayTypesList","ensureGpuDraft","computeUnitFromFirstRow","deep","headerCoinSymbol","editLoadAlgorithmsForCoin","coinAndPowerId","uniq","fallback","algos","slogithm","selChain","selCoin","c1","c2","getPayTypeByKey","getSelectedCoinSymbol","getRowPriceBySelected","getFirstPriceText","Unit","produceMachineId","updateGpuMachineInfo","updateGpuMachine","fetchShopMachineListForSeller","getShopMachineListForSeller","nextMap","template","normalizePriceList","sourceList","prevList","fromSource","fromPrev","exist","merged","effect","defaultState","rowId","ensurePriceObj","normalizeGpuPrice","isBlur","hasDot","out","fixedInt","isNaN","expectedPriceCount","priceMissing","norm","invalid","fetchMachineInfo","getMachineInfo","handleView","srcList","priceSrc","coinPattern","algoPattern","days","sale","credentials","hasAnyPrice","updateAsicMachine","handleAddMachine","payTypesParam","pts","getWalletInfo","withdrawBalance","balanceWithdrawList","bindWallet","getRecentlyTransaction","balanceWithdrawListV2","_wallet2","walletBalance","blockedBalance","walletList","WalletData","rechargeDialogVisible","qrCodeGenerated","validateAddress","createDialogVisible","createLoading","createValue","tokenOptions","recentTransactions","availableTokens","result","totalBalance","available","parseFloat","blocked","fetchWalletInfo","updateFeeByChain","fetchRecentlyTransaction","displaySymbol","w","openCreateWallet","confirmCreateWallet","walletInfo","generateQRCode","rawAmt","signAmt","typeLabel","statusTextMap","statusTagTypeMap","amountText","formatApiTime","statusText","statusTagType","scaledIntToString","fetchBalanceRechargeList","requestParams","fetchBalanceWithdrawList","handleRecharge","wallet","addressToCopy","qrcode","qrContainer","qrCodeRef","innerHTML","alt","width","height","borderRadius","onerror","onChainChange","hasUSDT","walletCharge","feeMap","resetWithdrawForm","resetRechargeForm","totalRequired","availableBalance","totalBalanceInt","totalText","availableBalanceInt","isValid","addTransactionRecord","getFullYear","getMonth","getDate","getHours","getMinutes","unshift","_jsencrypt","RSA_PUBLIC_KEY_BASE64","RSA_PUBLIC_KEY","getJSEncrypt","JSEncrypt","plainText","Encrypt","encrypt","setPublicKey","encrypted","formatPayTooltip","getPayImageUrl","handlePayIconKeyDown","handlePayFilterChange","handleSearchFilters","handleResetFilters","handleManualSelectFlat","getCellClass","getRowMaxLeaseDays","handleLeaseDaysChange","getRowMaxPurchase","handlePurchaseQuantityChange","formatConfirmTotalText","ETH","TRON","outer","orderItemDtoList","orderNumber","cartItems","phone","note","errors","summary","loadCart","validateForm","order","customer","toISOString","ErrorNotificationManager","recentErrors","throttleTime","errorTypes","getErrorType","entries","errorType","lastTime","cleanup","getOrderStatusText","comHeard","appMain","multiplyAsDecimal","toIntScale","int","BigInt","frac","whole","intStr","safe","acc","sc","neg","absStr","pad","repeat","truncateDecimalString","lease","nums","qty","mul","hasValidPrice","hasPriceList","maxLeaseDay","max_lease_days","getFirstCoinSymbol","debug","handleGetRowClass","listProducts","withdrawalRecords","pendingWithdrawals","successWithdrawals","failedWithdrawals","loadWithdrawalRecords","computingPower","u","accessToken","access_token","userInfo","userName","expires_in","purchasedMachines","errorMsg","transaction","selectedGroups","selectedMachinesMap","expandedGroupKeys","creatingOrder","successDialog","noticeTimer","pendingCheckoutShop","pendingCheckoutAll","machineSupportData","algorithmOptions","poolRawData","selectedMachineIds","payDialog","selectedChain","selectedCoin","selectedPrice","paramsV2","isAllSelected","hasShops","hasGroups","selectedTotal","byCoin","toUpperText","prev","canCheckout","payCoinSymbol","allMachines","configuredIds","unconfigured","coinAlgo","coinData","algoData","algorithmList","supportedMachineIds","canProceedToNextStep","dialog","selectedIds","hasSelection","account","coinAlgoValid","poolValid","walletValid","accountValid","formValid","allMachineIds","allConfigured","every","configured","fetchGetGoodsListV2","startNoticeCountdown","reapplySelectionsForPendingShop","$forceUpdate","fetchGetMachineSupportPool","opts","poolName","poolId","miningCoinInfoList","modelName","coinConfigId","fetchGetMachineSupportCoinAndAlgorithm","machineIdList","sp","cartMachineInfoDtoList","_origLeaseTime","sortedMachines","sortMachinesByShelfStatus","ensureDefaultPaySelection","toCents","decRaw","decTwo","cents","centsToText","isRowSelectable","isOnShelf","b","aOnShelf","bOnShelf","fetchChainAndListForSeller","labelSrc","getAllGroups","cfg","hasMachinePriceForSelection","machine","applyInnerSelectionFromSet","isShopLeaseChanged","totalCents","totalPriceList","orig","computeShopTotal","priceCents","computeShopTotalDisplay","backendVal","hasBackend","modified","buildDeletePayload","cartInfoId","fetchAddOrdersV2","orderInfoVoList","orderMiningInfoDtoList","fetchDeleteBatchGoods","handleOuterExpandChange","handleShopExpandChange","withShopKeys","sIdx","handleGroupSelectionChange","handleGroupSelectionChangeForShop","applyInnerSelection","shouldSelectAll","inner","clearSelection","toggleRowSelection","selIds","toggleSelectAll","table","outerTable","calcGroupTotal","group","countMachines","handleCheckoutShop","selectedSet","onShelfMachines","executeCheckout","idSet","walletMining","plainWalletAddress","encryptedWalletAddress","dataStr","showGoogleCodeDialog","openConfigDialog","buildSelectedMachinesForConfig","refreshAlgorithmOptions","handleConfigCoinChange","handleConfigAlgorithmChange","tb","configTable","poolOption","modelOption","handleMachineWalletAddressInput","handleMachineMiningAccountInput","selection","selectionCount","isConfigFormValid","originalAlgorithm","machineData","remainingMachineIds","remainingUnconfigured","remaining","showConfirmDialogAll","showConfirmDialog","openPaySelectDialog","baseUnit","leaseDays","cfgList","cfgHit","groupSubtotal","totals","centsAdd","tCents","totalsCentsByCoin","totalsObj","googleCodeInput","numValue","handleProductExpandChange","selectedRows","isSelected","isProductSelected","powerList","currencyList","imgUrl","show","screenCurrency","fetchShopList","getShopList","script","_vueRouter","_routes","VueRouter","mode","base","routes","beforeEach","onError","domProps","load","one","getList","getProductList","updateProduct","deleteProduct","getOwnedList","getOwnedById","_navigation","cartServerCount","breadcrumbs","updateLoginStatus","handleStorageChange","loadServerCartCount","handleCartUpdated","handleLoginStatusChanged","removeEventListener","currentPath","event","newValue","userInfoStr","username","getBreadcrumbPath","paths","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","module","__webpack_modules__","call","amdO","deferred","O","chunkIds","priority","notFulfilled","Infinity","fulfilled","j","definition","defineProperty","enumerable","globalThis","prototype","hasOwnProperty","Symbol","toStringTag","nmd","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","chunkLoadingGlobal","self","bind","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file