(function(){var t={45:function(t,e){"use strict";e.Yp=e.XX=void 0;e.XX=function(){var t=this,e=t._self._c;return e("div",{staticClass:"account-purchased"},[e("div",{staticClass:"toolbar"},[t._m(0),e("div",{staticClass:"right-area"},[e("el-input",{staticClass:"mr-12",staticStyle:{width:"280px"},attrs:{placeholder:"输入币种或算法后搜索(可留空)",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)]),e("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.tableData,border:"",stripe:""}},[e("el-table-column",{attrs:{prop:"orderItemId",label:"订单项ID",width:"120"}}),e("el-table-column",{attrs:{prop:"productMachineId",label:"机器ID",width:"120"}}),e("el-table-column",{attrs:{prop:"purchasedComputingPower",label:"购买算力","min-width":"120"}}),e("el-table-column",{attrs:{prop:"type",label:"类型",width:"100"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-tag",{attrs:{type:1===a.row.type?"success":"info"}},[t._v(" "+t._s(1===a.row.type?"算力套餐":"挖矿机器")+" ")])]}}])}),e("el-table-column",{attrs:{prop:"status",label:"状态",width:"100"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-tag",{attrs:{type:1===a.row.status?"success":"info"}},[t._v(" "+t._s(1===a.row.status?"运行中":"已过期")+" ")])]}}])}),e("el-table-column",{attrs:{prop:"currentIncome",label:"当前收入","min-width":"120"}}),e("el-table-column",{attrs:{prop:"currentUsdtIncome",label:"当前USDT收入","min-width":"140"}}),e("el-table-column",{attrs:{prop:"estimatedEndIncome",label:"预计总收益","min-width":"120"}}),e("el-table-column",{attrs:{prop:"estimatedEndUsdtIncome",label:"预计USDT总收益","min-width":"160"}}),e("el-table-column",{attrs:{prop:"startTime",label:"开始时间","min-width":"160"}}),e("el-table-column",{attrs:{prop:"endTime",label:"结束时间","min-width":"160"}}),e("el-table-column",{attrs:{label:"操作",fixed:"right",width:"120"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-button",{attrs:{type:"text",size:"small"},on:{click:function(e){return t.handleView(a.row)}}},[t._v("详情")])]}}])})],1),e("div",{staticClass:"pagination"},[e("el-pagination",{attrs:{background:"",layout:"total, sizes, prev, pager, next, jumper",total:t.pagination.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:"left-area"},[e("h2",{staticClass:"page-title"},[t._v("已购商品")])])}]},204:function(t,e){"use strict";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=[]},432:function(t,e){"use strict";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=[]},445:function(t,e,a){"use strict";Object.defineProperty(e,"B",{value:!0}),e.A=void 0,a(4114);var s=a(5952);e.A={name:"Checkout",data(){return{cartItems:[],loading:!1,submitting:!1,form:{name:"",phone:"",address:"",note:""},errors:{}}},computed:{summary(){return(0,s.computeSummary)()}},mounted(){this.loadCart()},methods:{loadCart(){try{this.loading=!0,this.cartItems=(0,s.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,s.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("请完善收货信息")}}}},467:function(t,e,a){"use strict";a.r(e),a.d(e,{__esModule:function(){return i.B},default:function(){return n}});var s=a(3505),i=a(630),o=i.A,r=a(1656),l=(0,r.A)(o,s.XX,s.Yp,!1,null,null,null),n=l.exports},565:function(t,e,a){"use strict";Object.defineProperty(e,"B",{value:!0}),e.A=void 0;var s=a(9662),i=a(9252);e.A={name:"AccountPurchased",data(){return{loading:!1,searchKeyword:"",tableData:[],pagination:{pageNum:1,pageSize:10,total:0},coins:i.coinList||[]}},created(){this.fetchTableData()},methods:{async fetchTableData(){this.loading=!0;try{const t=await(0,s.getOwnedList)();!t||0!==t.code&&200!==t.code||(this.tableData=t.data.list,this.pagination.total=t.data.total)}catch(t){console.error("获取已购商品失败",t)}finally{this.loading=!1}},handleSearch(){this.pagination.pageNum=1,this.fetchTableData()},handleReset(){this.searchKeyword="",this.pagination.pageNum=1,this.pagination.pageSize=10,this.fetchTableData()},handleClear(){this.searchKeyword="",this.pagination.pageNum=1,this.fetchTableData()},handleSizeChange(t){this.pagination.pageSize=t,this.pagination.pageNum=1,this.fetchTableData()},handleCurrentChange(t){this.pagination.pageNum=t,this.fetchTableData()},handleView(t){this.$message.info("详情页暂未实现")}}}},630:function(t,e,a){"use strict";var s=a(3999)["default"];Object.defineProperty(e,"B",{value:!0}),e.A=void 0;var i=s(a(1774));e.A={components:{comHeard:()=>Promise.resolve().then(()=>(0,i.default)(a(9683))),appMain:()=>Promise.resolve().then(()=>(0,i.default)(a(2177)))}}},857:function(t,e,a){"use strict";Object.defineProperty(e,"B",{value:!0}),e.A=void 0,a(4114),a(8111),a(7588),a(8237);var s=a(5952),i=a(6067),o=a(5844);e.A={name:"Header",data(){return{user:null,cart:[],cartServerCount:0,navigation:i.mainNavigation}},computed:{cartItemCount(){return Number.isFinite(this.cartServerCount)?this.cartServerCount:0},breadcrumbs(){return(0,i.getBreadcrumb)(this.$route.path)}},watch:{},mounted(){this.loadCart(),window.addEventListener("storage",this.handleStorageChange),this.loadServerCartCount(),window.addEventListener("cart-updated",this.handleCartUpdated)},beforeDestroy(){window.removeEventListener("storage",this.handleStorageChange),window.removeEventListener("cart-updated",this.handleCartUpdated)},methods:{loadCart(){this.cart=(0,s.readCart)()},async loadServerCartCount(){try{const t=await(0,o.getGoodsList)(),e=Array.isArray(t&&t.rows)?t.rows:Array.isArray(t&&t.data&&t.data.rows)?t.data.rows:Array.isArray(t&&t.data)?t.data:Array.isArray(t)?t:[];let a=[];Array.isArray(e)&&e.length?Array.isArray(e[0]&&e[0].shoppingCartInfoDtoList)?e.forEach(t=>{Array.isArray(t&&t.shoppingCartInfoDtoList)&&a.push(...t.shoppingCartInfoDtoList)}):a=e:Array.isArray(t&&t.shoppingCartInfoDtoList)&&(a=t.shoppingCartInfoDtoList);let s=0;a.length?s=a.reduce((t,e)=>t+(Array.isArray(e&&e.productMachineDtoList)?e.productMachineDtoList.length:0),0):Array.isArray(t&&t.productMachineDtoList)&&(s=t.productMachineDtoList.length),this.cartServerCount=Number.isFinite(s)?s:0}catch(t){}},handleStorageChange(t){"power_leasing_cart_v1"===t.key&&(this.loadCart(),this.loadServerCartCount())},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()},handleLogout(){this.user=null,this.cart=[]},getBreadcrumbPath(t){const e=["/productList","/cart","/checkout"];return 0===t?"/productList":t{const e=Number(t.price);return Number.isFinite(e)&&e!==o?t:{...t,price:i}}),this.form.cost=i,this.lastCostBaseline=i},updateMachineType(){this.selectedMachineRows=this.selectedMachineRows.map(t=>t.type&&t.type!==this.lastTypeBaseline?t:{...t,type:this.form.type}),this.lastTypeBaseline=this.form.type},updateSelectedMachineRows(){const t=new Map;this.machineOptions.forEach(e=>{t.set(e.miner,e)});const e=[];this.selectedMachines.forEach(a=>{const s=t.get(a);if(s){const t=this.selectedMachineRows.find(t=>t.miner===a);e.push({user:s.user,coin:s.coin,miner:s.miner,price:t?t.price:this.form.cost,type:t?t.type:this.form.type,state:t?t.state:0})}}),this.selectedMachineRows=e},handleRowPriceInput(t){let e=String(this.selectedMachineRows[t].price??"");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):"")}this.$set(this.selectedMachineRows[t],"price",e)},handleRowTypeInput(t){this.$set(this.selectedMachineRows[t],"type",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(0,s.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 s=Array.isArray(e[t])?e[t]:[];s.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,this.machinesLoading=!1},async handleSave(){if(!this.form.productId)return void this.$message.warning("缺少商品ID");if(!this.selectedMiner)return void this.$message.warning("请先选择挖矿账户");if(!this.selectedMachines.length)return void this.$message.warning("请至少选择一台机器");const[t,e]=this.selectedMiner.split("|");this.saving=!0;try{const t={productId:this.form.productId,electricityBill:this.form.electricityBill,incomeRate:this.form.incomeRate,powerDissipation:this.form.powerDissipation,theoryPower:this.form.theoryPower,type:this.form.type,unit:this.form.unit,cost:this.form.cost,productMachineURDVos:this.selectedMachineRows.map(t=>({miner:t.miner,price:Number(t.price)||0,state:t.state||0,type:t.type||this.form.type,user:t.user}))};console.log(t,"请求参数");const e=await(0,s.addSingleOrBatchMachine)(t);!e||0!==e.code&&200!==e.code?this.$message.error(e?.msg||"添加失败"):(this.$message.success("添加成功"),this.$router.back())}catch(a){console.error("添加出售机器失败",a),console.log("添加失败")}finally{this.saving=!1}}},watch:{"form.electricityBill":function(){this.computeCost()},"form.incomeRate":function(){this.computeCost()},"form.powerDissipation":function(){this.computeCost()},"form.type":function(){this.updateMachineType()},selectedMachines(){this.updateSelectedMachineRows()}}}},1183:function(t,e,a){"use strict";a.r(e),a.d(e,{__esModule:function(){return i.B},default:function(){return n}});var s=a(7035),i=a(1083),o=i.A,r=a(1656),l=(0,r.A)(o,s.XX,s.Yp,!1,null,"1f989ae9",null),n=l.exports},1193:function(t,e,a){"use strict";var s=a(3999)["default"];Object.defineProperty(e,"__esModule",{value:!0}),e.addSingleOrBatchMachine=o,e.deleteMachine=r,e.getMachineListForUpdate=d,e.getUserMachineList=l,e.getUserMinersList=n,e.updateMachine=c;var i=s(a(5720));function o(t){return(0,i.default)({url:"/lease/product/machine/addSingleOrBatchMachine",method:"post",data:t})}function r(t){return(0,i.default)({url:"/lease/product/machine/delete",method:"post",data:t})}function l(t){return(0,i.default)({url:"/lease/product/machine/getUserMachineList",method:"post",data:t})}function n(t){return(0,i.default)({url:"/lease/product/machine/getUserMinersList",method:"post",data:t})}function c(t){return(0,i.default)({url:"/lease/product/machine/updateMachine",method:"post",data:t})}function d(t){return(0,i.default)({url:"/lease/product/machine/getMachineListForUpdate",method:"post",data:t})}},1269:function(t,e,a){"use strict";a.r(e),a.d(e,{__esModule:function(){return i.B},default:function(){return n}});var s=a(6112),i=a(445),o=i.A,r=a(1656),l=(0,r.A)(o,s.XX,s.Yp,!1,null,"c3bf12ce",null),n=l.exports},1406:function(t,e,a){"use strict";var s=a(3999)["default"],i=s(a(5471)),o=s(a(9486)),r=s(a(9325)),l=s(a(5129)),n=s(a(1052));a(1475),a(6804),console.log=()=>{},i.default.config.productionTip=!1,i.default.use(n.default),new i.default({router:r.default,store:l.default,render:t=>t(o.default)}).$mount("#app")},1553:function(t,e,a){"use strict";a.r(e),a.d(e,{__esModule:function(){return i.B},default:function(){return n}});var s=a(45),i=a(565),o=i.A,r=a(1656),l=(0,r.A)(o,s.XX,s.Yp,!1,null,"4df91873",null),n=l.exports},1682:function(t,e,a){"use strict";a.r(e),a.d(e,{__esModule:function(){return i.B},default:function(){return n}});var s=a(8752),i=a(5135),o=i.A,r=a(1656),l=(0,r.A)(o,s.XX,s.Yp,!1,null,"1f88593c",null),n=l.exports},1938:function(t,e,a){"use strict";a.r(e),a.d(e,{__esModule:function(){return i.B},default:function(){return n}});var s=a(9630),i=a(2605),o=i.A,r=a(1656),l=(0,r.A)(o,s.XX,s.Yp,!1,null,"35bc5cca",null),n=l.exports},2177:function(t,e,a){"use strict";a.r(e),a.d(e,{__esModule:function(){return i.B},default:function(){return n}});var s=a(432),i=a(8643),o=i.A,r=a(1656),l=(0,r.A)(o,s.XX,s.Yp,!1,null,"9935370e",null),n=l.exports},2370:function(t,e){"use strict";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.order.status))])]),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("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:{prop:"name",label:"名称","min-width":"160"}}),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:{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=[]},2605:function(t,e,a){"use strict";Object.defineProperty(e,"B",{value:!0}),e.A=void 0,a(8111),a(2489);var s=a(6299);e.A={name:"WithdrawalHistory",data(){return{activeTab:"pending",detailDialogVisible:!1,selectedItem:null,withdrawalRecords:[],pagination:{pageNum:1,pageSize:10,total:0,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,s.balanceWithdrawList)(e);!a||0!==a.code&&200!==a.code?this.$message({message:a?.msg||"获取提现记录失败",type:"error",showClose:!0}):(this.withdrawalRecords=a.rows||[],this.pagination.total=a.total||0,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,s=a-e;return s<6e4?"刚刚":s<36e5?`${Math.floor(s/6e4)}分钟前`:s<864e5?`${Math.floor(s/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}`},s=a[e];s?window.open(s,"_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()}}}},2606:function(t,e,a){"use strict";Object.defineProperty(e,"B",{value:!0}),e.A=void 0,a(4114);a(4180),e.A={name:"OrderList",props:{items:{type:Array,default:()=>[]},emptyText:{type:String,default:"暂无数据"},showCheckout:{type:Boolean,default:!1},onCancel:{type:Function,default:null}},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:{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)}},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{this.$router.push(`/account/order-detail/${e}`)}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}}}},2631:function(t,e,a){"use strict";var s=a(3999)["default"];Object.defineProperty(e,"B",{value:!0}),e.A=void 0;var i=a(4180),o=s(a(4235));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,i.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,i.getOrdersByStatus)({status:Number(t)}),s=null!=(a&&a.data)?a.data:a,o=Array.isArray(s)?s:Array.isArray(s&&s.rows)?s.rows:[];this.$set(this.orders,e,o)}catch(a){console.log(a,"获取订单失败")}finally{this.loading=!1}}}}},2660:function(t,e,a){"use strict";Object.defineProperty(e,"B",{value:!0}),e.A=void 0,a(4114),a(8111),a(3579);var s=a(9662);e.A={name:"AccountProducts",data(){return{loading:!1,searchKeyword:"",tableData:[],pagination:{pageNum:1,pageSize:10,total:0},coinOptions:[],editDialog:{visible:!1,saving:!1,form:null},total:0}},created(){this.initOptions(),this.fetchTableData()},methods:{initOptions(){try{const{coinList:t}=a(9252);this.coinOptions=Array.isArray(t)?t:[]}catch(t){this.coinOptions=[]}},async fetchMachineInfo(t){const e=await(0,s.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{const t=(this.searchKeyword||"").trim();let e,a;if(t){const s=t.toLowerCase(),i=(this.coinOptions||[]).some(t=>t.value&&String(t.value).toLowerCase()===s||t.label&&String(t.label).toLowerCase()===s);i?e=t:a=t}const i={pageNum:this.pagination.pageNum,pageSize:this.pagination.pageSize,coin:e||void 0,algorithm:a||void 0,userEmail:localStorage.getItem("userEmail")},o=await(0,s.getProductList)(i),r=o?.data?.records||o?.data?.list||o?.rows||o?.list||o?.data||[];this.tableData=Array.isArray(r)?r:[],this.total=o.total,console.log(this.tableData)}catch(t){console.error("获取商品列表失败",t),console.log("获取商品列表失败")}finally{this.loading=!1}},handleSearch(){this.pagination.pageNum=1,this.fetchTableData()},handleReset(){this.searchKeyword="",this.pagination.pageNum=1,this.pagination.pageSize=10,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){this.editDialog.form={...t},this.editDialog.visible=!0},async handleSaveEdit(){if(this.editDialog.form){this.editDialog.saving=!0;try{const t={id:this.editDialog.form.id,shopId:this.editDialog.form.shopId,name:this.editDialog.form.name,image:this.editDialog.form.image,coin:this.editDialog.form.coin,description:this.editDialog.form.description,type:this.editDialog.form.type,state:this.editDialog.form.state},e=await(0,s.updateProduct)(t);!e||0!==e.code&&200!==e.code?this.$message({message:e?.msg||"保存失败",type:"error",showClose:!0}):(this.$message({message:"保存成功",type:"success",showClose:!0}),this.editDialog.visible=!1,this.fetchTableData())}catch(t){console.error("保存商品失败",t),console.log("保存失败")}finally{this.editDialog.saving=!1}}},handleDelete(t){t&&t.id&&this.$confirm("确认删除该商品吗?删除后不可恢复","提示",{confirmButtonText:"删除",cancelButtonText:"取消",type:"warning"}).then(async()=>{try{const e=await(0,s.deleteProduct)(t.id);!e||0!==e.code&&200!==e.code?this.$message.error(e?.msg||"删除失败"):(this.$message.success("删除成功"),1===this.tableData.length&&this.pagination.pageNum>1&&(this.pagination.pageNum-=1),this.fetchTableData())}catch(e){console.error("删除商品失败",e),console.log("删除失败")}}).catch(()=>{})},handleSizeChange(t){this.pagination.pageSize=t,this.pagination.pageNum=1,this.fetchTableData()},handleCurrentChange(t){this.pagination.pageNum=t,this.fetchTableData()},handleClear(){this.searchKeyword="",this.pagination.pageNum=1,this.fetchTableData()},handleAddMachine(t){t&&t.id?this.$router.push({path:"/account/product-machine-add",query:{productId:t.id,coin:t.coin,name:t.name}}):this.$message.warning("缺少商品ID")}}}},2709:function(t,e){"use strict";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("label",{staticClass:"required",staticStyle:{"margin-bottom":"10px"}},[t._v("币种选择:")]),e("div",{staticClass:"filter-row"},[e("el-select",{ref:"screen",staticClass:"input",attrs:{size:"middle",placeholder:"请选择",clearable:""},on:{change:t.handleCurrencyChange,clear:t.handleCurrencyClear},model:{value:t.screenCurrency,callback:function(e){t.screenCurrency=e},expression:"screenCurrency"}},t._l(t.currencyList,function(a){return e("el-option",{key:a.value,attrs:{label:a.label,value:a.value}},[e("div",{staticStyle:{display:"flex","align-items":"center"}},[e("img",{staticStyle:{float:"left",width:"20px"},attrs:{src:a.imgUrl}}),e("span",{staticStyle:{float:"left","margin-left":"5px"}},[t._v(t._s(a.label))])])])}),1),e("el-input",{staticStyle:{width:"240px"},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(a){return e("div",{key:a.id,staticClass:"product-item",attrs:{tabindex:"0","aria-label":"查看详情"},on:{click:function(e){return t.handleProductClick(a)}}},[e("img",{staticClass:"product-image",attrs:{src:a.image||"https://img.yzcdn.cn/vant/apple-1.jpg",alt:a.name}}),e("div",{staticClass:"product-info"},[e("h4",[t._v("商品: "+t._s(a.name))]),e("p",{staticStyle:{"font-size":"16px","margin-top":"10px","font-weight":"bold"}},[t._v("算法: "+t._s(a.algorithm))]),e("div",{staticClass:"product-footer"},[e("span",{staticClass:"product-price"},[t._v("价格: "+t._s(t.formatPriceRange(a.priceRange)))]),t._v(" "),e("span",{staticStyle:{color:"#999","font-size":"12px"}},[t._v("USDT")])])])])}),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=[]},2882:function(t,e){"use strict";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&&t.product.priceRange,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:24}},[e("el-form-item",{attrs:{label:"图片"}},[e("div",{staticClass:"image-row"},[t.product&&t.product.image?e("el-image",{staticClass:"cover",attrs:{src:t.product.image,fit:"cover"}}):e("span",{staticClass:"placeholder"},[t._v("暂无图片")])],1)])],1),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",{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:"挖矿账户","min-width":"120"}}),e("el-table-column",{attrs:{prop:"id",label:"矿机ID","min-width":"60"}}),e("el-table-column",{attrs:{prop:"miner",label:"机器编号","min-width":"140"}}),e("el-table-column",{attrs:{label:"实时算力"},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("el-table-column",{attrs:{label:"理论算力","min-width":"140"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-input",{staticStyle:{"max-width":"160px"},attrs:{size:"small",inputmode:"decimal"},on:{input:function(e){return t.handleTheoryPowerInput(a.$index)}},model:{value:a.row.theoryPower,callback:function(e){t.$set(a.row,"theoryPower",e)},expression:"scope.row.theoryPower"}})]}}],null,!1,4224926861)}),e("el-table-column",{attrs:{label:"功耗(kw/h)","min-width":"140"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-input",{staticStyle:{"max-width":"160px"},attrs:{size:"small",inputmode:"decimal"},on:{input:function(e){return t.handleNumericCell(a.$index,"powerDissipation")}},model:{value:a.row.powerDissipation,callback:function(e){t.$set(a.row,"powerDissipation",e)},expression:"scope.row.powerDissipation"}},[e("template",{slot:"append"},[t._v("kw/h")])],2)]}}],null,!1,3177186304)}),e("el-table-column",{attrs:{label:"型号","min-width":"140"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-input",{staticStyle:{"max-width":"180px"},attrs:{size:"small",placeholder:"矿机型号"},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,3956255767)}),e("el-table-column",{attrs:{label:"单价($)","min-width":"140"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-input",{staticStyle:{"max-width":"180px"},attrs:{size:"small",inputmode:"decimal"},on:{input:function(e){return t.handleNumericCell(a.$index,"price")}},model:{value:a.row.price,callback:function(e){t.$set(a.row,"price",e)},expression:"scope.row.price"}},[e("template",{slot:"append"},[t._v("$")])],2)]}}],null,!1,114046513)}),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":"下架"},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,1911966664)}),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"},on:{click:function(e){return t.handleDeleteMachine(a.row)}}},[t._v("删除")])]}}],null,!1,3919195591)})],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.handleSubmitMachines}},[t._v("提交修改机器")])],1):t._e()],1)},e.Yp=[]},2919:function(t,e){"use strict";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("router-link",{staticClass:"side-link",attrs:{to:"/account/wallet","active-class":"active"}},[t._v("我的钱包")]),e("router-link",{staticClass:"side-link",attrs:{to:"/account/shops","active-class":"active"}},[t._v("我的店铺")]),e("router-link",{staticClass:"side-link",attrs:{to:"/account/products","active-class":"active"}},[t._v("商品列表")]),e("router-link",{staticClass:"side-link",attrs:{to:"/account/purchased","active-class":"active"}},[t._v("已购商品")]),e("router-link",{staticClass:"side-link",attrs:{to:"/account/orders","active-class":"active"}},[t._v("订单列表")]),e("router-link",{staticClass:"side-link",attrs:{to:"/account/rechargeRecord","active-class":"active"}},[t._v("充值记录")]),e("router-link",{staticClass:"side-link",attrs:{to:"/account/withdrawalHistory","active-class":"active"}},[t._v("提现记录")])],1)]),e("section",{staticClass:"content"},[e("router-view")],1)])])},e.Yp=[]},2959:function(t,e){"use strict";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:"productList"},[e("el-table",{ref:"seriesTable",staticStyle:{width:"100%"},attrs:{data:t.productListData,"row-key":"id","expand-row-keys":t.expandedRowKeys,"row-class-name":t.handleGetSeriesRowClassName,"header-cell-style":{textAlign:"left"},"cell-style":{textAlign:"left"}},on:{"expand-change":t.handleExpandChange,"row-click":t.handleSeriesRowClick}},[e("el-table-column",{attrs:{type:"expand",width:"46"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-table",{ref:"innerTable-"+a.row.id,staticStyle:{width:"100%"},attrs:{data:a.row.productMachines,size:"small","show-header":!0,"row-key":"id","reserve-selection":!1,"header-cell-style":{textAlign:"left"},"cell-style":{textAlign:"left"}}},[e("el-table-column",{attrs:{width:"46"},scopedSlots:t._u([{key:"default",fn:function(s){return[e("el-checkbox",{on:{change:e=>t.handleManualSelect(a.row,s.row,e)},model:{value:s.row._selected,callback:function(e){t.$set(s.row,"_selected",e)},expression:"scope.row._selected"}})]}}],null,!0)}),e("el-table-column",{attrs:{prop:"theoryPower",label:"理论算力",width:"280","header-align":"left",align:"left"}}),e("el-table-column",{attrs:{label:"实际算力",width:"230","header-align":"left",align:"left"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.computingPower)+" "+t._s(e.row.unit))]}}],null,!0)}),e("el-table-column",{attrs:{prop:"powerDissipation",label:"功耗(kw/h)",width:"230","header-align":"left",align:"left"}}),e("el-table-column",{attrs:{prop:"algorithm",label:"算法",width:"180","header-align":"left",align:"left"}}),e("el-table-column",{attrs:{prop:"theoryIncome",width:"220","header-align":"left",align:"left"},scopedSlots:t._u([{key:"header",fn:function(){return[t._v("单机理论收入(每日)("+t._s(a.row.coin||"")+")")]},proxy:!0}],null,!0)}),e("el-table-column",{attrs:{prop:"theoryUsdtIncome",label:"单机理论收入(每日/USDT)",width:"240","header-align":"left",align:"left"}}),e("el-table-column",{attrs:{prop:"type",label:"矿机型号","header-align":"left",align:"left"}}),e("el-table-column",{attrs:{label:"租赁天数(天)",width:"200","header-align":"left",align:"left"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-input-number",{attrs:{min:1,max:36500,size:"mini","controls-position":"right"},model:{value:a.row.leaseTime,callback:function(e){t.$set(a.row,"leaseTime",e)},expression:"scope.row.leaseTime"}})]}}],null,!0)})],1)]}}])}),e("el-table-column",{attrs:{label:"价格","header-align":"left",align:"left"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.productMachineRangeGroupDto&&e.row.productMachineRangeGroupDto.price))]}}])}),e("el-table-column",{attrs:{label:"理论算力范围",width:"280","header-align":"left",align:"left"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.productMachineRangeGroupDto&&e.row.productMachineRangeGroupDto.theoryPowerRange))]}}])}),e("el-table-column",{attrs:{label:"实际算力范围",width:"230","header-align":"left",align:"left"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.productMachineRangeGroupDto&&e.row.productMachineRangeGroupDto.computingPowerRange))]}}])}),e("el-table-column",{attrs:{label:"功耗范围",width:"230","header-align":"left",align:"left"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.productMachineRangeGroupDto&&e.row.productMachineRangeGroupDto.powerRange))]}}])}),e("el-table-column",{attrs:{label:"数量",width:"180","header-align":"left",align:"left"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.productMachineRangeGroupDto&&e.row.productMachineRangeGroupDto.number))]}}])})],1)],1),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:"60vw",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:"type",label:"型号",width:"160","header-align":"left",align:"left"}}),e("el-table-column",{attrs:{prop:"theoryPower",label:"理论算力",width:"160","header-align":"left",align:"left"}}),e("el-table-column",{attrs:{label:"算力",width:"160","header-align":"left",align:"left"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.computingPower)+" "+t._s(e.row.unit))]}}])}),e("el-table-column",{attrs:{prop:"algorithm",label:"算法",width:"120","header-align":"left",align:"left"}}),e("el-table-column",{attrs:{prop:"powerDissipation",label:"功耗(kw/h)",width:"160","header-align":"left",align:"left"}}),e("el-table-column",{attrs:{label:"租赁天数(天)",width:"160","header-align":"left",align:"left"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(Number(e.row.leaseTime||1)))]}}])}),e("el-table-column",{attrs:{prop:"price",label:"单价(USDT)",width:"160","header-align":"left",align:"left"}})],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=[]},3178:function(t,e){"use strict";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-card"},[e("div",{staticClass:"wallet-header"},[t._m(0),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(t.walletBalance)+" USDT")])]),e("div",{staticClass:"balance-item"},[e("span",{staticClass:"balance-label"},[t._v("冻结余额")]),e("span",{staticClass:"balance-amount frozen"},[t._v(t._s(t.blockedBalance)+" USDT")])])])]),e("div",{staticClass:"wallet-actions"},[e("el-button",{staticClass:"action-btn recharge-btn",attrs:{type:"primary",size:"large"},on:{click:t.handleRecharge}},[t._v(" 充值 ")]),e("el-button",{staticClass:"action-btn withdraw-btn",attrs:{type:"success",size:"large"},on:{click:t.handleWithdraw}},[t._v(" 提现 ")])],1)]),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("div",{staticClass:"transaction-amount",class:a.amount>0?"positive":"negative"},[t._v(" "+t._s(a.amount>0?"+":"")+t._s(a.amount)+" 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:"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("请向此地址转账USDT,到账后余额将自动更新")])]),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("使用支持USDT的钱包扫描二维码")])])]),e("div",{staticClass:"recharge-notice"},[e("h4",{staticClass:"section-title"},[t._v("充值说明")]),e("ul",{staticClass:"notice-list"},[e("li",[t._v("暂时仅支持USDT (TRC20) 网络转账")]),e("li",[t._v("最小充值金额:10 USDT")])])])]),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:"600px"},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:"选择链",prop:"chain"}},[e("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择区块链网络"},on:{change:t.onChainChange},model:{value:t.withdrawForm.toChain,callback:function(e){t.$set(t.withdrawForm,"toChain",e)},expression:"withdrawForm.toChain"}},t._l(t.chainOptions,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:"token"}},[e("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择提现币种",disabled:!t.withdrawForm.toChain},model:{value:t.withdrawForm.toSymbol,callback:function(e){t.$set(t.withdrawForm,"toSymbol",e)},expression:"withdrawForm.toSymbol"}},t._l(t.availableTokens,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:"amount"}},[e("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入提现金额"},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.withdrawForm.toSymbol||"USDT"))])],2),e("div",{staticClass:"balance-info"},[e("div",{staticClass:"balance-detail"},[e("span",[t._v("可用余额:"+t._s(t.walletBalance)+" USDT")])]),e("div",{staticClass:"balance-detail frozen-info"},[e("span",[t._v("冻结余额:"+t._s(t.blockedBalance)+" USDT")]),e("span",{staticClass:"frozen-tip"},[t._v("(购买机器下单后冻结,不可提现)")])])])],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.withdrawForm.toSymbol||"USDT"))])],2),e("div",{staticClass:"fee-info"},[t._v(" 网络手续费:"+t._s(t.withdrawForm.fee||"0.00")+" "+t._s(t.withdrawForm.toSymbol||"USDT")+" ")])],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.withdrawForm.toSymbol||"USDT"))])],2),e("div",{staticClass:"actual-amount-info"},[t._v(" 实际到账:"+t._s(t.actualAmount)+" "+t._s(t.withdrawForm.toSymbol||"USDT")+" ")])],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)],1)},e.Yp=[function(){var t=this,e=t._self._c;return e("h2",{staticClass:"wallet-title"},[e("i",{staticClass:"el-icon-wallet"}),t._v(" 我的钱包")])}]},3327:function(t,e,a){"use strict";a.r(e),a.d(e,{__esModule:function(){return i.B},default:function(){return n}});var s=a(7887),i=a(9373),o=i.A,r=a(1656),l=(0,r.A)(o,s.XX,s.Yp,!1,null,"a20a645e",null),n=l.exports},3505:function(t,e){"use strict";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=[]},3607:function(t,e){"use strict";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("查看您的充值申请和到账状态")])])}]},3723:function(t,e,a){"use strict";var s=a(3999)["default"];Object.defineProperty(e,"__esModule",{value:!0}),e.productRoutes=e.mainRoutes=e["default"]=e.childrenRoutes=e.checkoutRoutes=e.cartRoutes=e.accountRoutes=void 0;var i=s(a(1774));const o=e.productRoutes=[{path:"/productList",name:"productList",component:()=>Promise.resolve().then(()=>(0,i.default)(a(978))),meta:{title:"商品列表",description:"浏览所有可用商品",allAuthority:["all"]}},{path:"/product/:id",name:"productDetail",component:()=>Promise.resolve().then(()=>(0,i.default)(a(4506))),meta:{title:"商品详情",description:"查看商品详细信息",allAuthority:["all"]}}],r=e.cartRoutes=[{path:"/cart",name:"cart",component:()=>Promise.resolve().then(()=>(0,i.default)(a(3918))),meta:{title:"购物车",description:"管理购物车商品",allAuthority:["all"]}}],l=e.checkoutRoutes=[{path:"/checkout",name:"checkout",component:()=>Promise.resolve().then(()=>(0,i.default)(a(1269))),meta:{title:"订单结算",description:"完成订单结算",allAuthority:["all"]}}],n=e.accountRoutes=[{path:"/account",name:"account",component:()=>Promise.resolve().then(()=>(0,i.default)(a(8223))),redirect:"/account/wallet",meta:{title:"个人中心",description:"管理个人资料和店铺",allAuthority:["all"]},children:[{path:"wallet",name:"Wallet",component:()=>Promise.resolve().then(()=>(0,i.default)(a(9553))),meta:{title:"我的钱包",description:"查看钱包余额、充值和提现",allAuthority:["all"]}},{path:"rechargeRecord",name:"RechargeRecord",component:()=>Promise.resolve().then(()=>(0,i.default)(a(8539))),meta:{title:"充值记录",description:"查看充值记录",allAuthority:["all"]}},{path:"withdrawalHistory",name:"WithdrawalHistory",component:()=>Promise.resolve().then(()=>(0,i.default)(a(1938))),meta:{title:"提现记录",description:"查看提现记录",allAuthority:["all"]}},{path:"shop-new",name:"accountShopNew",component:()=>Promise.resolve().then(()=>(0,i.default)(a(9749))),meta:{title:"新增店铺",description:"创建新的店铺",allAuthority:["all"]}},{path:"shop-config",name:"accountShopConfig",component:()=>Promise.resolve().then(()=>(0,i.default)(a(7690))),meta:{title:"店铺配置",description:"配置店铺收款和支付方式",allAuthority:["all"]}},{path:"shops",name:"accountMyShops",component:()=>Promise.resolve().then(()=>(0,i.default)(a(1682))),meta:{title:"我的店铺",description:"查看我的店铺信息",allAuthority:["all"]}},{path:"product-new",name:"accountProductNew",component:()=>Promise.resolve().then(()=>(0,i.default)(a(3327))),meta:{title:"新增商品",description:"创建新的商品",allAuthority:["all"]}},{path:"products",name:"accountProducts",component:()=>Promise.resolve().then(()=>(0,i.default)(a(9348))),meta:{title:"商品列表",description:"管理店铺下的商品列表",allAuthority:["all"]}},{path:"purchased",name:"accountPurchased",component:()=>Promise.resolve().then(()=>(0,i.default)(a(1553))),meta:{title:"已购商品",description:"查看已购买的商品列表",allAuthority:["all"]}},{path:"orders",name:"accountOrders",component:()=>Promise.resolve().then(()=>(0,i.default)(a(7592))),meta:{title:"订单列表",description:"查看与管理订单(按状态筛选)",allAuthority:["all"]}},{path:"order-detail/:id",name:"accountOrderDetail",component:()=>Promise.resolve().then(()=>(0,i.default)(a(8098))),meta:{title:"订单详情",description:"查看订单详细信息",allAuthority:["all"]}},{path:"product-detail/:id",name:"accountProductDetail",component:()=>Promise.resolve().then(()=>(0,i.default)(a(5768))),meta:{title:"商品详情",description:"个人中心 - 商品详情",allAuthority:["all"]}},{path:"product-machine-add",name:"accountProductMachineAdd",component:()=>Promise.resolve().then(()=>(0,i.default)(a(1183))),meta:{title:"添加出售机器",description:"为商品添加出售机器",allAuthority:["all"]}}]}],c=e.childrenRoutes=[...o,...r,...l,...n],d=e.mainRoutes=[{path:"/",name:"Home",component:()=>Promise.resolve().then(()=>(0,i.default)(a(467))),redirect:"/productList",children:c},{path:"*",redirect:"/productList"}];e["default"]=d},3918:function(t,e,a){"use strict";a.r(e),a.d(e,{__esModule:function(){return i.B},default:function(){return n}});var s=a(6180),i=a(4091),o=i.A,r=a(1656),l=(0,r.A)(o,s.XX,s.Yp,!1,null,"18e767fa",null),n=l.exports},3970:function(t,e){"use strict";Object.defineProperty(e,"B",{value:!0}),e.A=void 0;e.A={name:"AccountPage"}},4091:function(t,e,a){"use strict";Object.defineProperty(e,"B",{value:!0}),e.A=void 0,a(4114),a(8111),a(2489),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 s=a(5844),i=a(4180);e.A={name:"Cart",data(){return{loading:!1,shops:[],groups:[],selectedGroups:[],selectedMachinesMap:{},confirmDialog:{visible:!1,items:[],count:0,total:0},expandedGroupKeys:[],expandedShopKeys:[],creatingOrder:!1,successDialog:{visible:!1},noticeDialog:{visible:!1,checked:!1,countdown:5},noticeTimer:null,pendingCheckoutShop:null,googleCodeDialog:{visible:!1,code:"",error:"",loading:!1}}},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(){let t=0;const e=e=>{const a=this.selectedMachinesMap[e.id],s=Array.isArray(e.productMachineDtoList)?e.productMachineDtoList:[];s.forEach(e=>{a&&a.has(e.id)&&(t+=Number(e.price||0)*Number(e.leaseTime||1))})};return Array.isArray(this.groups)&&this.groups.length?this.groups.forEach(e):Array.isArray(this.shops)&&this.shops.length&&this.shops.forEach(t=>(t.shoppingCartInfoDtoList||[]).forEach(e)),t},canCheckout(){return this.selectedMachineCount>0||this.selectedGroups.length>0},isGoogleCodeValid(){const t=this.googleCodeDialog.code;return/^\d{6}$/.test(t)}},mounted(){this.fetchGetGoodsList()},watch:{"noticeDialog.visible"(t){if(t)this.startNoticeCountdown();else if(this.noticeTimer){try{clearInterval(this.noticeTimer)}catch(e){}this.noticeTimer=null}}},beforeDestroy(){try{this.noticeTimer&&clearInterval(this.noticeTimer)}catch(t){}this.noticeTimer=null},methods:{getAllGroups(){if(Array.isArray(this.groups)&&this.groups.length)return this.groups;const t=[],e=Array.isArray(this.shops)?this.shops:[];return e.forEach(e=>{const a=Array.isArray(e.shoppingCartInfoDtoList)?e.shoppingCartInfoDtoList:[];a.forEach(e=>t.push(e))}),t},computeShopTotal(t){const e=Array.isArray(t&&t.shoppingCartInfoDtoList)?t.shoppingCartInfoDtoList:[];let a=0;return e.forEach(t=>{const e=Array.isArray(t.productMachineDtoList)?t.productMachineDtoList:[];e.forEach(t=>{const e=Number(t.price||0),s=Number(t.leaseTime||1);a+=e*s})}),a},buildDeletePayload(){const t=[],e=this.getAllGroups(),a=this.selectedMachineCount>0;return a?e.forEach(e=>{const a=this.selectedMachinesMap[e.id];if(!a||0===a.size)return;const s=Array.isArray(e.productMachineDtoList)?e.productMachineDtoList:[];s.forEach(s=>{a.has(s.id)&&t.push({machineId:s.id,productId:e.productId})})}):this.selectedGroups&&this.selectedGroups.length&&this.selectedGroups.forEach(e=>{const a=Array.isArray(e.productMachineDtoList)?e.productMachineDtoList:[];a.forEach(a=>t.push({machineId:a.id,productId:e.productId}))}),t.filter(t=>t&&null!=t.machineId)},async fetchAddOrders(t,e){try{const a={code:e,orderInfoVoList:t},s=await(0,i.addOrders)(a);return s}catch(a){return{code:-1,msg:"网络异常",data:null}}},async fetchDeleteBatchGoods(t){try{const e=await(0,s.deleteBatchGoods)(t);return e}catch(e){return{code:-1,msg:"网络异常"}}},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 t=Array.isArray(e)?e.map(t=>t&&(null!=t.id?String(t.id):void 0)).filter(Boolean):[];this.expandedShopKeys=t}catch(a){this.expandedShopKeys=[]}},async fetchGetGoodsList(t){try{this.loading=!0;const a=await(0,s.getGoodsList)(t),i=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(i.length&&i[0].shoppingCartInfoDtoList){const t=i.map((t,e)=>({...t,id:null!=t.id?String(t.id):`shop-${e}`,shoppingCartInfoDtoList:(t.shoppingCartInfoDtoList||[]).map((t,a)=>({...t,id:null!=t.id?String(t.id):null!=t.productId?`p-${t.productId}`:`g-${e}-${a}`}))}));this.shops=t;const e=t.reduce((t,e)=>t+(e.shoppingCartInfoDtoList||[]).reduce((t,e)=>t+(Array.isArray(e.productMachineDtoList)?e.productMachineDtoList.length:0),0),0);return void window.dispatchEvent(new CustomEvent("cart-updated",{detail:{count:e}}))}const o=i.map((t,e)=>({...t,id:t&&(null!=t.id?t.id:null!=t.productId?t.productId:`g-${e}`)}));this.groups=o,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(t){this.selectedGroups=t;const e=new Set(t.map(t=>t.id)),a=new Set(this.expandedGroupKeys);this.groups.forEach(t=>{e.has(t.id)?a.add(t.id):a.delete(t.id)}),this.expandedGroupKeys=Array.from(a),this.$nextTick(()=>{this.groups.forEach(t=>{const a=this.$refs["innerTable-"+t.id],s=Array.isArray(t.productMachineDtoList)?t.productMachineDtoList:[],i=e.has(t.id);if(a&&"function"===typeof a.clearSelection){try{a.clearSelection()}catch(o){}i?(s.forEach(t=>{try{a.toggleRowSelection(t,!0)}catch(o){}}),this.$set(this.selectedMachinesMap,t.id,new Set(s.map(t=>t.id)))):this.$set(this.selectedMachinesMap,t.id,new Set)}else this.$set(this.selectedMachinesMap,t.id,i?new Set(s.map(t=>t.id)):new Set)})})},handleGroupSelectionChangeForShop(t,e){const a=this.$refs["productTable-"+(t&&t.id)],s=Array.isArray(t&&t.shoppingCartInfoDtoList)?t.shoppingCartInfoDtoList:[],i=new Set(Array.isArray(e)?e.map(t=>t&&t.id):[]);this.$nextTick(()=>{if(a&&"function"===typeof a.toggleRowExpansion)try{s.forEach(t=>{const e=i.has(t.id);a.toggleRowExpansion(t,e)})}catch(t){}s.forEach(t=>{const e=Array.isArray(t.productMachineDtoList)?t.productMachineDtoList:[],a=i.has(t.id);this.$set(this.selectedMachinesMap,t.id,a?new Set(e.map(t=>t&&t.id)):new Set),this.applyInnerSelection(t,a)})})},applyInnerSelection(t,e,a=0){const s=this.$refs["innerTable-"+t.id],i=Array.isArray(t.productMachineDtoList)?t.productMachineDtoList:[];if(s&&"function"===typeof s.clearSelection){try{s.clearSelection()}catch(o){}e&&i.forEach(t=>{try{s.toggleRowSelection(t,!0)}catch(o){}})}else a>=5||this.$nextTick(()=>this.applyInnerSelection(t,e,a+1))},handleInnerSelectionChange(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)=>t+Number(e.price||0),0)},countMachines(t){const e=Array.isArray(t&&t.shoppingCartInfoDtoList)?t.shoppingCartInfoDtoList:[];return e.reduce((t,e)=>t+(Array.isArray(e.productMachineDtoList)?e.productMachineDtoList.length:0),0)},async handleCheckoutShop(t){if(!t)return;const e=Array.isArray(t.shoppingCartInfoDtoList)?t.shoppingCartInfoDtoList:[],a=[];e.forEach(e=>{const s=Array.isArray(e.productMachineDtoList)?e.productMachineDtoList:[];s.forEach(s=>{a.push({leaseTime:Number(s.leaseTime||1),machineId:s.id,productId:e.productId,shopId:t.id})})}),a.length?(this.pendingCheckoutShop={shop:t,payload:a},this.noticeDialog.visible=!0,this.noticeDialog.checked=!1,this.startNoticeCountdown()):this.$message({message:"该店铺下没有可结算的机器",type:"warning",showClose:!0})},async executeCheckout(t){if(!this.pendingCheckoutShop)return;const{shop:e,payload:a}=this.pendingCheckoutShop;this.creatingOrder=!0;try{const e=await this.fetchAddOrders(a,t);if(!e||200!==Number(e.code))return void this.$message({message:"结算失败,请重试",type:"error",showClose:!0});const s=String(e.data||"");s.includes("成功")?(await this.fetchGetGoodsList(),this.successDialog.visible=!0):this.$message({message:"结算失败,请重试",type:"error",showClose:!0})}catch(s){console.log("网络错误,请重试")}finally{this.creatingOrder=!1,this.pendingCheckoutShop=null}},handleCheckoutSelected(){let t=[];if(this.selectedMachineCount)this.groups.forEach(e=>{const a=this.selectedMachinesMap[e.id];if(!a||0===a.size)return;const s=Array.isArray(e.productMachineDtoList)?e.productMachineDtoList:[];s.forEach(s=>{a.has(s.id)&&t.push({product:e.name||"",coin:e.coin||"",machineId:s.id,user:s.user,miner:s.miner,price:Number(s.price||0)})})});else{if(!this.selectedGroups.length)return void this.$message({message:"请先选择商品或机器",type:"warning",showClose:!0});t=this.selectedGroups.flatMap(t=>{const e=Array.isArray(t.productMachineDtoList)?t.productMachineDtoList:[];return e.map(e=>({product:t.name||"",coin:t.coin||"",machineId:e.id,user:e.user,miner:e.miner,price:Number(e.price||0)}))})}this.confirmDialog.items=t,this.confirmDialog.count=t.length,this.confirmDialog.total=t.reduce((t,e)=>t+e.price,0),this.confirmDialog.visible=!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.fetchGetGoodsList(),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.$message({message:"已提交结算(示例)",type:"success",showClose:!0}),this.confirmDialog.visible=!1},handleCloseSuccessDialog(){try{this.successDialog.visible=!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)},handleNoticeAcknowledge(){this.noticeDialog.countdown>0||(this.noticeDialog.checked?(this.noticeDialog.visible=!1,this.showGoogleCodeDialog()):this.$message({message:'请先勾选"我已阅读并同意上述注意事项"',type:"warning",showClose:!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{await this.executeCheckout(this.googleCodeDialog.code),this.googleCodeDialog.visible=!1}catch(t){this.googleCodeDialog.error="验证码错误,请重新输入"}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.pendingCheckoutShop=null}}}},4180:function(t,e,a){"use strict";var s=a(3999)["default"];Object.defineProperty(e,"__esModule",{value:!0}),e.addOrders=o,e.cancelOrder=r,e.getOrdersByIds=l,e.getOrdersByStatus=n;var i=s(a(5720));function o(t){return(0,i.default)({url:"/lease/order/info/addOrders",method:"post",data:t})}function r(t){return(0,i.default)({url:"/lease/order/info/cancelOrder",method:"post",data:t})}function l(t){return(0,i.default)({url:"/lease/order/info/getOrdersByIds",method:"post",data:t})}function n(t){return(0,i.default)({url:"/lease/order/info/getOrdersByStatus",method:"post",data:t})}},4235:function(t,e,a){"use strict";a.r(e),a.d(e,{__esModule:function(){return i.B},default:function(){return n}});var s=a(9261),i=a(2606),o=i.A,r=a(1656),l=(0,r.A)(o,s.XX,s.Yp,!1,null,"d0bde52c",null),n=l.exports},4487:function(t,e,a){"use strict";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(7642),a(8004),a(3853),a(5876),a(2475),a(5024),a(1698);var s=a(7723),i=a(5952),o=a(9662),r=a(5844);e["default"]={name:"ProductDetail",data(){return{product:null,loading:!1,expandedRowKeys:[],selectedMap:{},params:{id:""},confirmAddDialog:{visible:!1,items:[]},cartMachineIdSet:new Set,cartCompositeKeySet:new Set,cartLoaded:!1,machinesLoaded:!1,productListData:[],tableData:[],productDetailLoading:!1}},mounted(){console.log(this.$route.params.id,"i叫哦附加费"),this.$route.params.id?(this.params.id=this.$route.params.id,this.product=!0,this.productListData&&this.productListData.length&&(this.expandedRowKeys=[this.productListData[0].id]),this.fetchGetMachineInfo(this.params)):(this.$message.error("商品不存在"),this.product=!1),this.fetchGetGoodsList()},methods:{async fetchGetMachineInfo(t){this.productDetailLoading=!0;const e=await(0,o.getMachineInfo)(t);if(console.log(e),e&&200===e.code){console.log(e.data,"res.rows");const t=Array.isArray(e.data)?e.data:[],a=t.map((t,e)=>{const a=`grp-${e}`,s=t.id||t.onlyKey||t.productMachineRangeGroupDto&&t.productMachineRangeGroupDto.id,i=Array.isArray(t.productMachines)&&t.productMachines.length>0?t.productMachines[0].id:void 0,o=Array.isArray(t.productMachines)?t.productMachines.map(t=>({...t,leaseTime:t&&t.leaseTime&&Number(t.leaseTime)>0?Number(t.leaseTime):1,_selected:!1})):[];return{...t,id:s||(i?`m-${i}`:a),productMachines:o}});this.productListData=a,!this.productListData.length||this.expandedRowKeys&&this.expandedRowKeys.length||(this.expandedRowKeys=[this.productListData[0].id]),this.$nextTick(()=>{this.machinesLoaded=!0})}this.productDetailLoading=!1},async loadProduct(){try{this.loading=!0;const t=this.$route.params.id;this.product=await(0,s.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(0,r.addCart)(t);return e},async fetchGetGoodsList(t){const e=await(0,r.getGoodsList)(t);try{const t=this.params&&this.params.id?Number(this.params.id):Number(this.$route.params.id),s=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:[],i=s.length&&s[0]&&Array.isArray(s[0].shoppingCartInfoDtoList)?s.flatMap(t=>Array.isArray(t.shoppingCartInfoDtoList)?t.shoppingCartInfoDtoList:[]):s,o=i.filter(e=>Number(e.productId)===t),r=new Set,l=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&&l.add(`${String(t.user)}|${String(t.miner)}`))})}),this.cartMachineIdSet=r,this.cartCompositeKeySet=l;try{const t=i.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),s=this.expandedRowKeys.includes(e);this.expandedRowKeys=s?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 s=Object.keys(this.selectedMap).filter(t=>(this.selectedMap[t]||[]).length>0),i=new Set(this.expandedRowKeys);s.forEach(t=>i.add(t)),this.expandedRowKeys=Array.from(i).filter(t=>s.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,s=a&&this.selectedMap[a]||[];return!!s.find(t=>t&&t.id===e.id)},handleManualSelect(t,e,a){const s=t.id,i=this.selectedMap[s]&&[...this.selectedMap[s]]||[],o=i.findIndex(t=>t&&t.id===e.id);a&&-1===o&&i.push(e),!a&&o>-1&&i.splice(o,1),this.$set(this.selectedMap,s,i),this.$set(e,"_selected",!!a)},getInnerRowClass(){return""},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],s=Number(a.quantity);(!s||s<1)&&(a.quantity=1),s>99&&(a.quantity=99)},handleAddVariantToCart(t){if(t&&t.onlyKey)try{(0,i.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=>{(0,i.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.productListData)?this.productListData:[],e=t.flatMap(t=>Array.isArray(t.productMachines)?t.productMachines.filter(t=>!!t&&!!t._selected):[]);e.length?(this.confirmAddDialog.items=e.slice(),this.confirmAddDialog.visible=!0,this.$nextTick(()=>{try{this.clearAllSelections()}catch(t){}})):this.$message.warning("请先勾选至少一台矿机")},async handleConfirmAddSelectedToCart(){const t=Array.isArray(this.confirmAddDialog.items)?this.confirmAddDialog.items.filter(Boolean):[];if(!t.length)return void this.$message.warning("请先勾选至少一台矿机");const e=this.params&&this.params.id?this.params.id:this.$route&&this.$route.params&&this.$route.params.id;if(!e)return void this.$message.error("商品ID缺失,无法加入购物车");const a=t.map(t=>({productId:e,productMachineId:t.id,leaseTime:Number(t.leaseTime||1)}));try{const e=await this.fetchAddCart(a);if(!e||e.code&&200!==Number(e.code))return void this.$message.error(e&&e.msg?e.msg:"加入购物车失败,请稍后重试");try{t.forEach(t=>{t&&t.id&&this.cartMachineIdSet.add(t.id),this.$set(t,"_selected",!1),this.$set(t,"_inCart",!0),(!t.leaseTime||Number(t.leaseTime)<=0)&&this.$set(t,"leaseTime",1)}),this.$nextTick(()=>this.autoSelectAndDisable())}catch(s){}this.$message({message:`已加入 ${t.length} 台矿机到购物车`,type:"success",duration:3e3,showClose:!0}),this.confirmAddDialog.visible=!1,this.selectedMap={},this.fetchGetMachineInfo(this.params),this.fetchGetGoodsList();try{window.dispatchEvent(new CustomEvent("cart-updated"))}catch(s){}}catch(s){console.error("加入购物车失败: ",s),this.$message.error("加入购物车失败,请稍后重试")}},clearAllSelections(){try{this.selectedMap={};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{(0,i.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("添加到购物车失败,请稍后重试")}}}}},4506:function(t,e,a){"use strict";a.r(e),a.d(e,{__esModule:function(){return i.B},default:function(){return n}});var s=a(2959),i=a(9073),o=i.A,r=a(1656),l=(0,r.A)(o,s.XX,s.Yp,!1,null,"3ccf0849",null),n=l.exports},4920:function(t,e){"use strict";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"},t._l(t.navigation,function(a){return e("router-link",{key:a.path,staticClass:"nav-btn",attrs:{to:a.path,"active-class":"active",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.Yp=[]},4994:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=void 0,a(4114),a(8111),a(7588);class s{constructor(){this.loadingStates=new Map,this.setupListeners()}setupListeners(){window.addEventListener("network-retry-complete",()=>{this.resetAllLoadingStates()})}setLoading(t,e,a){const s=`${t}:${e}`;this.loadingStates.set(s,{value:a,timestamp:Date.now()})}getLoading(t,e){const a=`${t}:${e}`,s=this.loadingStates.get(a);return!!s&&s.value}resetAllLoadingStates(){const t=[];this.loadingStates.forEach((e,a)=>{if(!0===e.value){const[e,s]=a.split(":");t.push({componentId:e,stateKey:s}),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,s)=>{if(s.startsWith(`${t}:`)&&!0===a.value){const a=s.split(":")[1];e.push({componentId:t,stateKey:a}),this.loadingStates.set(s,{value:!1,timestamp:Date.now()})}}),e}}const i=new s;e["default"]=i},5063:function(t,e,a){"use strict";Object.defineProperty(e,"B",{value:!0}),e.A=void 0,a(8111),a(3579);var s=a(6299);e.A={name:"WalletPage",data(){return{walletBalance:0,blockedBalance:0,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"}],googleCode:[{required:!0,message:"请输入谷歌验证码",trigger:"blur"},{validator:this.validateGoogleCode,trigger:"blur"}]},chainOptions:[{label:"Tron (TRC20)",value:"tron"}],tokenOptions:{tron:[{label:"USDT (TRC20)",value:"USDT"}]},recentTransactions:[{id:1,type:"充值",amount:500,time:"2024-01-15 14:30"},{id:2,type:"购买商品",amount:-89.5,time:"2024-01-14 10:20"},{id:3,type:"提现",amount:-200,time:"2024-01-13 16:45"},{id:4,type:"充值",amount:1e3,time:"2024-01-12 09:15"}]}},computed:{availableTokens(){return this.tokenOptions[this.withdrawForm.toChain]||[]},actualAmount(){const t=parseFloat(this.withdrawForm.amount)||0,e=parseFloat(this.withdrawForm.fee)||0,a=t-e;return a>0?a.toFixed(2):"0.00"},totalBalance(){const t=parseFloat(this.walletBalance)||0,e=parseFloat(this.blockedBalance)||0;return(t+e).toFixed(2)}},mounted(){this.fetchWalletInfo(),this.updateFeeByChain()},methods:{async fetchWalletInfo(t){try{const e=await(0,s.getWalletInfo)(t);!e||0!==e.code&&200!==e.code?this.$message({message:"获取钱包信息失败",type:"error",showClose:!0}):(this.walletBalance=e.data.balance,this.blockedBalance=e.data.blockedBalance||0,this.WalletData=e.data)}catch(e){console.error("获取钱包信息失败:",e)}},async fetchBalanceRechargeList(t={}){try{const e={pageNum:1,pageSize:20,...t};console.log("获取充值记录参数:",e);const a=await(0,s.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,s.balanceWithdrawList)(t);!e||0!==e.code&&200!==e.code||(this.balanceWithdrawList=e.data)},handleRecharge(){this.rechargeDialogVisible=!0,this.$nextTick(()=>{this.generateQRCode()})},handleWithdraw(){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={tron:"1.00",ethereum:"5.00",bsc:"0.50",polygon:"0.10"};this.withdrawForm.fee=t[this.withdrawForm.toChain]||"1.00"},async confirmWithdraw(){this.$refs.withdrawForm.validate(async t=>{if(t){this.withdrawLoading=!0;try{const t=await(0,s.withdrawBalance)({toChain:this.withdrawForm.toChain,toSymbol:this.withdrawForm.toSymbol,amount:parseFloat(this.withdrawForm.amount),toAddress:this.withdrawForm.toAddress,code:this.withdrawForm.googleCode});!t||0!==t.code&&200!==t.code?this.$message({message:t?.msg||"提现申请失败,请重试",type:"error",showClose:!0}):(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},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 s=parseFloat(e);if(isNaN(s)||s<=0)return void a(new Error("请输入有效的金额"));const i=parseFloat(this.withdrawForm.fee)||0,o=s+i;o>this.walletBalance?a(new Error(`提现金额加上手续费(${o.toFixed(2)} USDT)不能超过钱包余额`)):s<10?a(new Error("最小提现金额为10 USDT")):s<=i?a(new Error("提现金额必须大于手续费")):a()},handleGoogleCodeInput(t){this.withdrawForm.googleCode=t.replace(/\D/g,"")},validateGoogleCode(t,e,a){e?/^\d{6}$/.test(e)?a():a(new Error("谷歌验证码必须是6位数字")):a(new Error("请输入谷歌验证码"))},validateAddress(t,e,a){if(!e)return void a(new Error("请输入收款地址"));const s=this.withdrawForm.toChain;let i=!1;switch(s){case"tron":i=/^T[A-Za-z1-9]{33}$/.test(e);break;case"ethereum":i=/^0x[a-fA-F0-9]{40}$/.test(e);break;case"bsc":i=/^0x[a-fA-F0-9]{40}$/.test(e);break;case"polygon":i=/^0x[a-fA-F0-9]{40}$/.test(e);break;default:i=e.length>10}i?a():a(new Error("请输入正确的收款地址格式"))},addTransactionRecord(t,e){const a=new Date,s=`${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:s}),this.recentTransactions.length>10&&(this.recentTransactions=this.recentTransactions.slice(0,10))}}}},5129:function(t,e,a){"use strict";var s=a(3999)["default"];Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=void 0;var i=s(a(5471)),o=s(a(5353));i.default.use(o.default);e["default"]=new o.default.Store({state:{},getters:{},mutations:{},actions:{},modules:{}})},5135:function(t,e,a){"use strict";Object.defineProperty(e,"B",{value:!0}),e.A=void 0,a(4114);var s=a(5705),i=a(9252);e.A={name:"AccountMyShops",data(){return{loaded:!1,defaultCover:"https://dummyimage.com/120x120/eee/999.png&text=Shop",shop:{id:0,name:"",image:"",description:"",del:!0,state:0},visibleEdit:!1,editForm:{id:"",name:"",image:"",description:""},shopConfigs:[],visibleConfigEdit:!1,configForm:{id:"",payAddress:"",payCoin:"",payType:0,productId:0},productOptions:[],coinOptions:i.coinList||[],shopLoading:!1}},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}},created(){this.fetchMyShop()},methods:{resetShopState(){this.shop={id:0,name:"",image:"",description:"",del:!0,state:0},this.shopConfigs=[]},async fetchMyShop(){try{const t=await(0,s.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,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,s.getShopConfig)(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,s.updateShopConfig)(t);!e||0!==e.code&&200!==e.code?this.$message.error(e&&e.msg?e.msg:"保存失败"):(this.$message.success("保存成功"),this.visibleConfigEdit=!1,this.fetchShopConfigs(this.shop.id))},async deleteShopConfig(t){const e=await(0,s.deleteShopConfig)(t);!e||0!==e.code&&200!==e.code?this.$message.error(e&&e.msg?e.msg:"删除失败"):(this.$message.success("删除成功"),this.fetchShopConfigs(this.shop.id))},handleEditConfig(t){this.configForm={...t},this.visibleConfigEdit=!0},async handleDeleteConfig(t){this.deleteShopConfig({id:t.id})},submitConfigEdit(){this.updateShopConfig(this.configForm)},async handleOpenEdit(){try{this.visibleEdit=!0;const t=await(0,s.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}:(this.editForm={id:this.shop.id,name:this.shop.name,image:this.shop.image,description:this.shop.description},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},console.error("查询店铺详情失败:",t)}},async submitEdit(){try{const t={...this.editForm},e=await(0,s.updateShop)(t);!e||0!==e.code&&200!==e.code?this.$message({message:e.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,s.deleteShop)(this.shop.id);!t||0!==t.code&&200!==t.code?this.$message({message:t.msg||"删除失败",type:"error",showClose:!0}):(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,s.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-new",query:{shopId:this.shop.id}}):this.$message({message:"请先创建店铺",type:"warning",showClose:!0})}}}},5624:function(t,e){"use strict";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"},[t._v("店铺名称")]),e("el-input",{attrs:{placeholder:"请输入店铺名称"},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("el-input",{attrs:{type:"textarea",rows:4,placeholder:"请输入店铺描述"},model:{value:t.form.description,callback:function(e){t.$set(t.form,"description",e)},expression:"form.description"}})],1),e("div",{staticClass:"row"},[e("el-button",{attrs:{type:"primary"},on:{click:t.handleCreate}},[t._v("创建店铺")])],1)])])},e.Yp=[]},5705:function(t,e,a){"use strict";var s=a(3999)["default"];Object.defineProperty(e,"__esModule",{value:!0}),e.addShopConfig=h,e.closeShop=d,e.deleteShop=n,e.deleteShopConfig=m,e.getAddShop=o,e.getMyShop=r,e.getShopConfig=u,e.queryShop=c,e.updateShop=l,e.updateShopConfig=p;var i=s(a(5720));function o(t){return(0,i.default)({url:"/lease/shop/addShop",method:"post",data:t})}function r(t){return(0,i.default)({url:"/lease/shop/getShopByUserEmail",method:"get",params:t})}function l(t){return(0,i.default)({url:"/lease/shop/updateShop",method:"post",data:t})}function n(t){return(0,i.default)({url:"/lease/shop/deleteShop",method:"post",data:{id:t}})}function c(t){return(0,i.default)({url:"/lease/shop/getShopById",method:"post",data:t})}function d(t){return(0,i.default)({url:"/lease/shop/closeShop",method:"post",data:{id:t}})}function u(t){return(0,i.default)({url:"/lease/shop/getShopConfig",method:"post",data:{id:t}})}function h(t){return(0,i.default)({url:"/lease/shop/addShopConfig",method:"post",data:t})}function p(t){return(0,i.default)({url:"/lease/shop/updateShopConfig",method:"post",data:t})}function m(t){return(0,i.default)({url:"/lease/shop/deleteShopConfig",method:"post",data:t})}},5720:function(t,e,a){"use strict";var s=a(3999)["default"];Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=void 0,a(4114),a(8111),a(7588);var i=s(a(6425)),o=s(a(9526)),r=a(1052),l=s(a(4994)),n=s(a(7465));const c=new Map;function d(t){const{url:e,method:a,params:s,data:i}=t;return[e,a,JSON.stringify(s),JSON.stringify(i)].join("&")}const u=i.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,s)=>{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(s)}catch(i){console.error("重试请求失败:",i),p.delete(s)}else p.delete(s)}),Promise.allSettled(e).then(()=>{if(l.default&&l.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&&n.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("token"))}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 s of Object.keys(t.params)){const i=t.params[s];var a=encodeURIComponent(s)+"=";if(null!==i&&"undefined"!==typeof i)if("object"===typeof i){for(const t of Object.keys(i))if(null!==i[t]&&"undefined"!==typeof i[t]){let a=s+"["+t+"]",o=encodeURIComponent(a)+"=";e+=o+encodeURIComponent(i[t])+"&"}}else e+=a+encodeURIComponent(i)+"&"}e=e.slice(0,-1),t.params={},t.url=e}const s=d(t);if(c.has(s)){const t=c.get(s);t(),c.delete(s)}return t.cancelToken=new i.default.CancelToken(t=>{c.set(s,t)}),t},t=>{Promise.reject(t)}),u.interceptors.response.use(t=>{const e=d(t.config);c.delete(e);const a=t.data.code||200,s=o.default[a]||t.data.msg||o.default["default"];return 421===a?(localStorage.setItem("cs_disconnect_all",Date.now().toString()),localStorage.removeItem("token"),f=localStorage.getItem("superReportError"),f||(f=421,localStorage.setItem("superReportError",f),r.MessageBox.confirm(window.vm.$i18n.t("user.loginExpired"),window.vm.$i18n.t("user.overduePrompt"),{distinguishCancelAndClose:!0,confirmButtonText:window.vm.$i18n.t("user.login"),cancelButtonText:window.vm.$i18n.t("user.Home"),closeOnClickModal:!1,showClose:!1,type:"warning"}).then(()=>{window.vm.$router.push(`/${window.vm.$i18n.locale}/login`),localStorage.removeItem("token")}).catch(()=>{window.vm.$router.push(`/${window.vm.$i18n.locale}/`),localStorage.removeItem("token")})),Promise.reject("登录状态已过期")):a>=500&&!f?(f=500,localStorage.setItem("superReportError",f),void(0,r.Message)({dangerouslyUseHTMLString:!0,message:s,type:"error",showClose:!0})):200!==a?(r.Notification.error({title:s}),Promise.reject("error")):t.data},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),n.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},5768:function(t,e,a){"use strict";a.r(e),a.d(e,{__esModule:function(){return i.B},default:function(){return n}});var s=a(2882),i=a(8740),o=i.A,r=a(1656),l=(0,r.A)(o,s.XX,s.Yp,!1,null,"75685001",null),n=l.exports},5844:function(t,e,a){"use strict";var s=a(3999)["default"];Object.defineProperty(e,"__esModule",{value:!0}),e.addCart=o,e.deleteBatchGoods=l,e.getGoodsList=r;var i=s(a(5720));function o(t){return(0,i.default)({url:"/lease/shopping/cart/addGoods",method:"post",data:t})}function r(t){return(0,i.default)({url:"/lease/shopping/cart/getGoodsList",method:"post",data:t})}function l(t){return(0,i.default)({url:"/lease/shopping/cart/deleteBatchGoods",method:"post",data:t})}},5852:function(t,e){"use strict";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-input",{staticClass:"mr-12",staticStyle:{width:"280px"},attrs:{placeholder:"输入币种或算法关键字后回车/搜索",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)]),e("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.tableData,border:"",stripe:""}},[e("el-table-column",{attrs:{prop:"id",label:"ID",width:"80"}}),e("el-table-column",{attrs:{prop:"name",label:"名称","min-width":"160"}}),e("el-table-column",{attrs:{prop:"coin",label:"币种",width:"100"}}),e("el-table-column",{attrs:{prop:"priceRange",label:"价格范围",width:"150"}}),e("el-table-column",{attrs:{prop:"algorithm",label:"算法","min-width":"120"}}),e("el-table-column",{attrs:{prop:"type",label:"商品类型",width:"130"},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?"算力套餐":"挖矿机器套餐")+" ")])]}}])}),e("el-table-column",{attrs:{prop:"state",label:"状态",width:"100"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-tag",{attrs:{type:1===a.row.state?"info":"success"}},[t._v(" "+t._s(1===a.row.state?"下架":"上架")+" ")])]}}])}),e("el-table-column",{attrs:{label:"操作",fixed:"right",width:"220"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-button",{attrs:{type:"text",size:"small"},on:{click:function(e){return t.handleView(a.row)}}},[t._v("详情")]),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("删除")]),e("el-button",{attrs:{type:"text",size:"small"},on:{click:function(e){return t.handleAddMachine(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),e("el-dialog",{attrs:{visible:t.editDialog.visible,width:"620px",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":"100px"}},[e("el-form-item",{attrs:{label:"名称"}},[e("el-input",{attrs:{maxlength:"100","show-word-limit":""},model:{value:t.editDialog.form.name,callback:function(e){t.$set(t.editDialog.form,"name",e)},expression:"editDialog.form.name"}})],1),e("el-form-item",{attrs:{label:"图片路径"}},[e("el-input",{model:{value:t.editDialog.form.image,callback:function(e){t.$set(t.editDialog.form,"image",e)},expression:"editDialog.form.image"}})],1),e("el-form-item",{staticClass:"align-like-input",attrs:{label:"币种"}},[e("el-select",{staticStyle:{width:"200px"},attrs:{filterable:"",clearable:"",placeholder:"选择币种"},model:{value:t.editDialog.form.coin,callback:function(e){t.$set(t.editDialog.form,"coin",e)},expression:"editDialog.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",{staticClass:"align-like-input",attrs:{label:"商品类型"}},[e("el-radio-group",{model:{value:t.editDialog.form.type,callback:function(e){t.$set(t.editDialog.form,"type",e)},expression:"editDialog.form.type"}},[e("el-radio",{attrs:{label:0}},[t._v("挖矿机器套餐")]),e("el-radio",{attrs:{label:1}},[t._v("算力套餐")])],1)],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:"描述"}},[e("el-input",{attrs:{type:"textarea",rows:4,maxlength:"500","show-word-limit":""},model:{value:t.editDialog.form.description,callback:function(e){t.$set(t.editDialog.form,"description",e)},expression:"editDialog.form.description"}})],1)],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("商品列表")])])}]},5952:function(t,e,a){"use strict";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 s="power_leasing_cart_v1",i=()=>{try{const t=window.localStorage.getItem(s);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=i;const o=t=>{try{window.localStorage.setItem(s,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 i();const e=i(),a=e.findIndex(e=>e.id===t.id);if(a>=0){const s=[...e];return s[a]={...s[a],quantity:Math.max(1,Number(s[a].quantity||0)+Number(t.quantity||1))},o(s),s}const s=[...e,{...t,quantity:Math.max(1,Number(t.quantity||1))}];return o(s),s};e.addToCart=r;const l=(t,e)=>{const a=i(),s=a.map(a=>a.id===t?{...a,quantity:Math.max(1,Number(e)||1)}:a);return o(s),s};e.updateQuantity=l;const n=t=>{const e=i(),a=e.filter(e=>e.id!==t);return o(a),a};e.removeFromCart=n;const c=()=>(o([]),[]);e.clearCart=c;const d=()=>{const t=i(),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:i,addToCart:r,updateQuantity:l,removeFromCart:n,clearCart:c,computeSummary:d}},6026:function(t,e,a){"use strict";var s=a(3999)["default"];Object.defineProperty(e,"B",{value:!0}),e.A=void 0;a(7723);var i=a(5952),o=s(a(9146));e.A={mixins:[o.default],name:"ProductList",mounted(){},methods:{handleAddToCart(t){try{(0,i.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("添加到购物车失败,请稍后重试")}}}}},6067:function(t,e,a){"use strict";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 s=e.mainNavigation=[{path:"/productList",name:"商城",icon:"🛍️",description:"浏览所有商品"},{path:"/cart",name:"购物车",icon:"🛒",description:"管理购物车商品"},{path:"/account",name:"个人中心",icon:"👤",description:"管理个人资料和店铺"}],i=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/")?i["/product"]:i[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 l=t=>t.meta&&t.meta.title?`${t.meta.title} - Power Leasing`:"Power Leasing - 电商系统";e.getPageTitle=l;const n=t=>t.meta&&t.meta.description?t.meta.description:"Power Leasing 电商系统 - 专业的电力设备租赁平台";e.getPageDescription=n;e["default"]={mainNavigation:s,breadcrumbConfig:i,getBreadcrumb:o,checkRoutePermission:r,getPageTitle:l,getPageDescription:n}},6112:function(t,e){"use strict";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=[]},6180:function(t,e){"use strict";e.Yp=e.XX=void 0;e.XX=function(){var t=this,e=t._self._c;return e("div",{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("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.handleShopExpandChange}},[e("el-table-column",{attrs:{type:"expand",width:"46"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-table",{ref:"productTable-"+a.row.id,staticStyle:{width:"100%"},attrs:{data:a.row.shoppingCartInfoDtoList||[],border:"",size:"small","row-key":"id","header-cell-style":{textAlign:"left"},"cell-style":{textAlign:"left"}},on:{"selection-change":e=>t.handleGroupSelectionChangeForShop(a.row,e)}},[e("el-table-column",{attrs:{type:"selection",width:"46"}}),e("el-table-column",{attrs:{type:"expand",width:"46"},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","header-cell-style":{textAlign:"left"},"cell-style":{textAlign:"left"}},on:{"selection-change":e=>t.handleInnerSelectionChange(a.row,e)}},[e("el-table-column",{attrs:{type:"selection",width:"46"}}),e("el-table-column",{attrs:{prop:"miner",label:"机器编号","min-width":"160"}}),e("el-table-column",{attrs:{prop:"algorithm",label:"算法","min-width":"140"}}),e("el-table-column",{attrs:{prop:"powerDissipation",label:"功耗(kw/h)","min-width":"140"}}),e("el-table-column",{attrs:{prop:"theoryPower",label:"理论算力","min-width":"140"}}),e("el-table-column",{attrs:{prop:"theoryIncome","min-width":"200"},scopedSlots:t._u([{key:"header",fn:function(){return[t._v("单机理论收入(每日)("+t._s(a.row.coin||"")+")")]},proxy:!0}],null,!0)}),e("el-table-column",{attrs:{prop:"theoryUsdtIncome",label:"单机理论收入(每日/USDT)","min-width":"200"}}),e("el-table-column",{attrs:{prop:"price",label:"单价(USDT)","min-width":"120"}}),e("el-table-column",{attrs:{label:"租赁天数(天)","min-width":"140"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-input-number",{attrs:{min:1,max:36500,size:"mini","controls-position":"right"},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:{label:"机器总价(USDT)","min-width":"160"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s((Number(e.row.price||0)*Number(e.row.leaseTime||1)).toFixed(2)))]}}],null,!0)})],1)]}}],null,!0)}),e("el-table-column",{attrs:{prop:"name",label:"商品名称","min-width":"160"}}),e("el-table-column",{attrs:{prop:"coin",label:"币种","min-width":"120"}}),e("el-table-column",{attrs:{label:"机器数量","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s((e.row.productMachineDtoList||[]).length))]}}],null,!0)}),e("el-table-column",{attrs:{label:"总价(USDT)","min-width":"140"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",{staticClass:"price-strong"},[t._v(t._s(t.calcGroupTotal(a.row).toFixed(2)))])]}}],null,!0)})],1)]}}])}),e("el-table-column",{attrs:{prop:"name",label:"店铺名称","min-width":"220"}}),e("el-table-column",{attrs:{label:"商品数","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s((e.row.shoppingCartInfoDtoList||[]).length))]}}])}),e("el-table-column",{attrs:{label:"机器总数","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(t.countMachines(e.row)))]}}])}),e("el-table-column",{attrs:{label:"总价(USDT)","min-width":"140"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",{staticClass:"price-strong"},[t._v(t._s(t.computeShopTotal(a.row).toFixed(2)))])]}}])}),e("el-table-column",{attrs:{label:"操作","min-width":"160"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-button",{attrs:{type:"primary",size:"mini",loading:t.creatingOrder,disabled:t.creatingOrder},on:{click:function(e){return t.handleCheckoutShop(a.row)}}},[t._v("结算该店铺订单")])]}}])})],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("金额合计(USDT):"),e("b",[t._v(t._s(t.selectedTotal.toFixed(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("删除所选机器")])],1)]),e("el-dialog",{attrs:{visible:t.confirmDialog.visible,width:"720px",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:function(e){t.confirmDialog.visible=!1}}},[t._v("取消")]),e("el-button",{attrs:{type:"primary"},on:{click:t.confirmPay}},[t._v("确认结算")])]},proxy:!0}])},[e("div",[e("el-table",{attrs:{data:t.confirmDialog.items,height:"360",border:"",stripe:"","header-cell-style":{textAlign:"left"},"cell-style":{textAlign:"left"}}},[e("el-table-column",{attrs:{prop:"product",label:"商品","min-width":"160"}}),e("el-table-column",{attrs:{prop:"coin",label:"币种","min-width":"100"}}),e("el-table-column",{attrs:{prop:"machineId",label:"机器ID","min-width":"100"}}),e("el-table-column",{attrs:{prop:"user",label:"账户","min-width":"120"}}),e("el-table-column",{attrs:{prop:"miner",label:"机器编号","min-width":"160"}}),e("el-table-column",{attrs:{prop:"price",label:"单价(USDT)","min-width":"120"}})],1),e("div",{staticStyle:{"margin-top":"12px","text-align":"right"}},[t._v("总金额(USDT):"),e("b",[t._v(t._s(t.confirmDialog.total.toFixed(2)))])])],1)]),e("el-dialog",{attrs:{visible:t.successDialog.visible,width:"480px","close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(e){return t.$set(t.successDialog,"visible",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(" 结算成功会自动更新钱包余额 ")])])]),e("el-dialog",{attrs:{visible:t.noticeDialog.visible,width:"680px",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.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.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.Yp=[]},6299:function(t,e,a){"use strict";var s=a(3999)["default"];Object.defineProperty(e,"__esModule",{value:!0}),e.balanceRechargeList=l,e.balanceWithdrawList=n,e.getWalletInfo=o,e.withdrawBalance=r;var i=s(a(5720));function o(t){return(0,i.default)({url:"/lease/user/getWalletInfo",method:"post",data:t})}function r(t){return(0,i.default)({url:"/lease/user/withdrawBalance",method:"post",data:t})}function l(t){return(0,i.default)({url:"/lease/user/balanceRechargeList",method:"post",data:t})}function n(t){return(0,i.default)({url:"/lease/user/balanceWithdrawList",method:"post",data:t})}},6804:function(t,e,a){function s(t,e){try{const a=atob(t);let s="";for(let t=0;t{t-e>this.throttleTime&&this.recentErrors.delete(a)})}}const i=new s;e["default"]=i},7592:function(t,e,a){"use strict";a.r(e),a.d(e,{__esModule:function(){return i.B},default:function(){return n}});var s=a(204),i=a(2631),o=i.A,r=a(1656),l=(0,r.A)(o,s.XX,s.Yp,!1,null,"2ad2c7c3",null),n=l.exports},7690:function(t,e,a){"use strict";a.r(e),a.d(e,{__esModule:function(){return i.B},default:function(){return n}});var s=a(7424),i=a(8450),o=i.A,r=a(1656),l=(0,r.A)(o,s.XX,s.Yp,!1,null,"717ae586",null),n=l.exports},7723:function(t,e){"use strict";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"}],s=async()=>Promise.resolve(a);e.listProducts=s;const i=async t=>{const e=a.find(e=>e.id===t);return Promise.resolve(e)};e.getProductById=i;e["default"]={listProducts:s,getProductById:i}},7887:function(t,e){"use strict";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:"100","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("矿机")]),e("el-radio",{attrs:{label:1}},[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:"500","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",{attrs:{label:"商品图片",prop:"image"}},[e("el-input",{attrs:{placeholder:"请输入商品图片路径"},model:{value:t.form.image,callback:function(e){t.$set(t.form,"image",e)},expression:"form.image"}})],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=[]},8098:function(t,e,a){"use strict";a.r(e),a.d(e,{__esModule:function(){return i.B},default:function(){return n}});var s=a(2370),i=a(7217),o=i.A,r=a(1656),l=(0,r.A)(o,s.XX,s.Yp,!1,null,"fc55ef3a",null),n=l.exports},8223:function(t,e,a){"use strict";a.r(e),a.d(e,{__esModule:function(){return i.B},default:function(){return n}});var s=a(2919),i=a(3970),o=i.A,r=a(1656),l=(0,r.A)(o,s.XX,s.Yp,!1,null,"e4f3b2fc",null),n=l.exports},8284:function(t,e){"use strict";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=[]},8450:function(t,e,a){"use strict";Object.defineProperty(e,"B",{value:!0}),e.A=void 0;var s=a(5705);const i=["nexa","rxd","dgbo","dgbq","dgbs","alph","enx","grs","mona"],o=["usdt","usdc","busd"];e.A={name:"AccountShopConfig",data(){return{VIRTUAL_COINS:i,STABLE_COINS:o,productOptions:[],form:{payAddress:"nexa:nqtsq5g50jkkmklvjyaflg46c4nwuy46z9gzswqe3l0csc7g",payCoin:"",payType:0,productId:0,shopId:0},shop:{id:0,name:"",image:"",description:"",del:!0,state:0}}},mounted(){this.fetchMyShop()},methods:{async fetchMyShop(){try{const t=await(0,s.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,del:!!t.data.del,state:Number(t.data.state||0)},this.form.shopId=this.shop.id):this.$message.warning(t.msg||"未获取到店铺数据")}catch(t){console.error("获取店铺信息失败:",t)}finally{this.loaded=!0}},async addShopConfig(t){const e=await(0,s.addShopConfig)(t);!e||0!==e.code&&200!==e.code?this.$message.error(e.msg||"保存失败"):this.$message.success("已保存配置(示例)")},handleSave(){this.form.shopId=this.shop.id,this.form.shopId?this.addShopConfig(this.form):this.$message.warning("未查询到店铺信息")},handleReset(){this.form={payAddress:"",payCoin:"",payType:0,productId:0}}},computed:{coinOptions(){return 1===this.form.payType?o:i}},watch:{"form.payType"(t){this.form.payCoin=""}}}},8539:function(t,e,a){"use strict";a.r(e),a.d(e,{__esModule:function(){return i.B},default:function(){return n}});var s=a(3607),i=a(9288),o=i.A,r=a(1656),l=(0,r.A)(o,s.XX,s.Yp,!1,null,"1431fa92",null),n=l.exports},8643:function(t,e){"use strict";Object.defineProperty(e,"B",{value:!0}),e.A=void 0;e.A={name:"Content"}},8740:function(t,e,a){"use strict";Object.defineProperty(e,"B",{value:!0}),e.A=void 0,a(8111),a(1701);var s=a(9662),i=a(1193);e.A={name:"AccountProductDetail",data(){return{loading:!1,product:null,ranges:[],machineList:[],productId:null}},created(){this.productId=Number(this.$route.params.id),this.productId&&(this.fetchDetail({id:this.productId}),this.fetchMachineList({id:this.productId}))},methods:{async fetchDetail(t){this.loading=!0;try{const e=await(0,s.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,i.getMachineListForUpdate)(t);e&&200===e.code&&(this.machineList=e.rows)},async updateMachineList(t){const e=await(0,i.updateMachine)(t);e&&200===e.code&&(this.$message.success("更新成功"),this.fetchMachineList({id:this.productId}))},async deleteMachine(t){const e=await(0,i.deleteMachine)(t);e&&200===e.code&&(this.$message.success("删除成功"),this.fetchMachineList({id:this.productId}))},handleTheoryPowerInput(t){let e=String(this.machineList[t].theoryPower??"");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):"")}this.$set(this.machineList,t,{...this.machineList[t],theoryPower:e})},handleNumericCell(t,e){let a=String(this.machineList[t][e]??"");a=a.replace(/[^0-9.]/g,"");const s=a.indexOf(".");if(-1!==s&&(a=a.slice(0,s+1)+a.slice(s+1).replace(/\./g,"")),-1!==s){const[t,e]=a.split(".");a=t+"."+(e?e.slice(0,6):"")}const i={...this.machineList[t],[e]:a};this.$set(this.machineList,t,i)},handleTypeCell(t){const e={...this.machineList[t],type:this.machineList[t].type};this.$set(this.machineList,t,e)},handleStateChange(t){const e={...this.machineList[t],state:this.machineList[t].state};this.$set(this.machineList,t,e)},async handleDeleteMachine(t){if(t&&t.id)try{await this.$confirm("确定删除该矿机吗?删除后不可恢复","提示",{confirmButtonText:"删除",cancelButtonText:"取消",type:"warning"});const e=await(0,i.deleteMachine)({id:t.id});e&&200===e.code?(this.$message.success("删除成功"),this.fetchMachineList({id:this.productId})):this.$message.error(e?.msg||"删除失败")}catch(e){}},async handleSubmitMachines(){if(this.machineList&&this.machineList.length)try{await this.$confirm("确定提交当前列表中的所有修改吗?","确认提交",{confirmButtonText:"提交",cancelButtonText:"取消",type:"warning"});const t=this.machineList.map(t=>({id:t.id,powerDissipation:Number(t.powerDissipation??0),price:Number(t.price??0),state:Number(t.state??0),theoryPower:Number(t.theoryPower??0),type:t.type||"",unit:t.unit||""}));console.log(t,"payload"),await this.updateMachineList(t)}catch(t){}else this.$message.warning("没有可提交的数据")},handleBack(){this.$router.back()}}}},8752:function(t,e){"use strict";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"},[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:"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("新增商品")])],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:"修改店铺",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:"请输入店铺名称"},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:{placeholder:"请输入图片地址"},model:{value:t.editForm.image,callback:function(e){t.$set(t.editForm,"image",e)},expression:"editForm.image"}})],1),e("div",{staticClass:"row"},[e("label",{staticClass:"label"},[t._v("店铺描述")]),e("el-input",{attrs:{type:"textarea",rows:3,placeholder:"请输入描述"},model:{value:t.editForm.description,callback:function(e){t.$set(t.editForm,"description",e)},expression:"editForm.description"}})],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}}},[e("div",{staticClass:"row"},[e("label",{staticClass:"label"},[t._v("适用商品")]),e("el-select",{attrs:{placeholder:"请选择商品"},model:{value:t.configForm.productId,callback:function(e){t.$set(t.configForm,"productId",e)},expression:"configForm.productId"}},[e("el-option",{attrs:{value:0,label:"所有商品"}}),t._l(t.productOptions,function(t){return e("el-option",{key:t.id,attrs:{value:t.id,label:`${t.id} - ${t.name}`}})})],2)],1),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-radio-group",{model:{value:t.configForm.payType,callback:function(e){t.$set(t.configForm,"payType",e)},expression:"configForm.payType"}},[e("el-radio",{attrs:{label:0}},[t._v("虚拟币")]),e("el-radio",{attrs:{label:1}},[t._v("稳定币")])],1)],1),e("div",{staticClass:"row"},[e("label",{staticClass:"label"},[t._v("支付币种")]),e("el-select",{ref:"screen",staticClass:"input",attrs:{size:"middle",placeholder:"请选择"},model:{value:t.configForm.payCoin,callback:function(e){t.$set(t.configForm,"payCoin",e)},expression:"configForm.payCoin"}},t._l(t.coinOptions,function(a){return e("el-option",{key:a.value,attrs:{label:a.label,value:a.value}},[e("div",{staticStyle:{display:"flex","align-items":"center"}},[e("img",{staticStyle:{float:"left",width:"20px"},attrs:{src:a.imgUrl}}),e("span",{staticStyle:{float:"left","margin-left":"5px"}},[t._v(" "+t._s(a.label))])])])}),1)],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=[]},9073:function(t,e,a){"use strict";var s=a(3999)["default"];Object.defineProperty(e,"B",{value:!0}),e.A=void 0;var i=s(a(4487));e.A={name:"ProductDetail",mixins:[i.default]}},9146:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=void 0,a(4114);var s=a(9662);e["default"]={name:"ProductList",data(){return{products:[],loading:!1,powerList:[{value:1,label:"NexaPow",children:[{value:0,label:"挖矿账户1"},{value:-1,label:"挖矿账户2"}]},{value:2,label:"Grepow",children:[{value:1,label:"挖矿账户1"},{value:0,label:"挖矿账户2"}]},{value:3,label:"mofang",children:[{value:2,label:"挖矿账户1"}]}],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:{coin:"",algorithm:""},productListLoading:!1}},mounted(){this.fetchGetList()},methods:{formatPriceRange(t){try{if(null===t||void 0===t)return"0.00";const e=String(t);if(e.includes("-")){const[t,a]=e.split("-");return`${this._truncate2(t)}-${this._truncate2(a)}`}return this._truncate2(e)}catch(e){return"0.00"}},_truncate2(t){if(null===t||void 0===t)return"0.00";const e=String(t).trim();if(!e)return"0.00";const[a,s=""]=e.split("."),i=s.slice(0,2);return`${a}.${i.padEnd(2,"0")}`},handleCurrencyChange(t){try{if(t)this.params.coin=t,this.fetchGetList(this.params);else{const t={...this.params,coin:""};this.screenCurrency="",t.algorithm?this.fetchGetList({algorithm:t.algorithm}):this.fetchGetList()}}catch(e){console.error("处理币种变更失败",e)}},async fetchGetList(t){this.productListLoading=!0;try{const e=await(0,s.getProductList)(t);console.log("API响应:",e),e&&200===e.code?(this.products=e.rows||[],console.log("商品数据:",this.products)):(console.error("API返回错误:",e),this.products=[])}catch(e){console.error("获取商品列表失败:",e),this.products=[],this.products=[{id:1,name:"测试商品1",algorithm:"测试算法1",priceRange:"100-200",image:"https://img.yzcdn.cn/vant/apple-1.jpg"},{id:2,name:"测试商品2",algorithm:"测试算法2",priceRange:"200-300",image:"https://img.yzcdn.cn/vant/apple-1.jpg"}]}this.productListLoading=!1},handleAlgorithmSearch(){const t=(this.searchAlgorithm||"").trim(),e={...this.params};t?e.algorithm=t:delete e.algorithm,e.algorithm?this.fetchGetList({...e,coin:this.screenCurrency||void 0}):this.fetchGetList(this.screenCurrency?{coin:this.screenCurrency}:void 0)},handleCurrencyClear(){this.screenCurrency="",this.params.coin="";const t=(this.searchAlgorithm||"").trim();t?this.fetchGetList({algorithm:t}):this.fetchGetList()},handleAlgorithmClear(){this.searchAlgorithm="",this.params.algorithm="";const t=this.screenCurrency;t?this.fetchGetList({coin:t}):this.fetchGetList()},handleProductClick(t){(t.id||0==t.id)&&this.$router.push(`/product/${t.id}`)}}}},9252:function(t,e){"use strict";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}]},9261:function(t,e){"use strict";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(t){return[e("el-table",{attrs:{data:t.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:{prop:"name",label:"名称","min-width":"160"}}),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:{prop:"price",label:"单价(USDT)","min-width":"240"}})],1)]}}])}),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:"创建时间","min-width":"180"},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":"100"},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)","min-width":"140"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",{staticClass:"value strong"},[t._v(t._s(null!=(a.row&&a.row.totalPrice)?a.row.totalPrice:"—"))])]}}])}),e("el-table-column",{attrs:{label:"已支付金额(USDT)","min-width":"140"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",{staticClass:"value strong"},[t._v(t._s(null!=(a.row&&a.row.payAmount)?a.row.payAmount:"—"))])]}}])}),e("el-table-column",{attrs:{label:"待支付金额(USDT)","min-width":"140"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",{staticClass:"value strong"},[t._v(t._s(null!=(a.row&&a.row.noPayAmount)?a.row.noPayAmount:"—"))])]}}])}),e("el-table-column",{attrs:{label:"操作","min-width":"280",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._v(t._s(t.paymentDialog.totalPrice))])]),e("div",{staticStyle:{"margin-bottom":"6px"}},[t._v("已支付金额(USDT):"),e("b",{staticClass:"value strong"},[t._v(t._s(t.paymentDialog.payAmount))])]),e("div",{staticStyle:{"margin-bottom":"6px"}},[t._v("待支付金额(USDT):"),e("b",{staticClass:"value strong"},[t._v(t._s(t.paymentDialog.noPayAmount))])])]),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=[]},9288:function(t,e,a){"use strict";Object.defineProperty(e,"B",{value:!0}),e.A=void 0,a(8111),a(2489);var s=a(6299);e.A={name:"RechargeRecord",data(){return{activeTab:"pending",detailDialogVisible:!1,selectedItem:null,rechargeRecords:[],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,s.balanceRechargeList)(t);!e||0!==e.code&&200!==e.code||(this.rechargeRecords=e.data.rows||[],this.pagination.total=e.data.total||0,this.pagination.totalPage=e.data.totalPage||0,this.total=e.data.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,s=a-e;return s<6e4?"刚刚":s<36e5?`${Math.floor(s/6e4)}分钟前`:s<864e5?`${Math.floor(s/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}`},s=a[e];s?window.open(s,"_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()}}}},9325:function(t,e,a){"use strict";var s=a(3999)["default"];Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=void 0;var i=s(a(5471)),o=s(a(1973)),r=a(3723);i.default.use(o.default);const l=new o.default({mode:"history",base:"/",routes:r.mainRoutes});l.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()}),l.onError(t=>{console.error("路由错误:",t)});e["default"]=l},9348:function(t,e,a){"use strict";a.r(e),a.d(e,{__esModule:function(){return i.B},default:function(){return n}});var s=a(5852),i=a(2660),o=i.A,r=a(1656),l=(0,r.A)(o,s.XX,s.Yp,!1,null,"6b769b3a",null),n=l.exports},9373:function(t,e,a){"use strict";Object.defineProperty(e,"B",{value:!0}),e.A=void 0,a(4114);var s=a(9252),i=a(9662);e.A={name:"AccountProductNew",data(){return{submitting:!1,form:{name:"",type:0,coin:"",description:"",image:"",state:0,shopId:null},rules:{name:[{required:!0,message:"请输入商品名称",trigger:"blur"},{min:2,max:100,message:"商品名称长度在 2 到 100 个字符",trigger:"blur"}],type:[{required:!0,message:"请选择商品类型",trigger:"change"}],coin:[{required:!0,message:"请选择挖矿币种",trigger:"change"}],description:[{required:!0,message:"请输入商品描述",trigger:"blur"},{min:1,max:500,message:"商品描述长度在 1 到 500 个字符",trigger:"blur"}],image:[],state:[{required:!0,message:"请选择商品状态",trigger:"change"}]}}},computed:{coinOptions(){return s.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,i.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/shops"))},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")}}}},9486:function(t,e,a){"use strict";a.r(e),a.d(e,{default:function(){return l}});var s=a(8284),i=a(1656),o={},r=(0,i.A)(o,s.XX,s.Yp,!1,null,null,null),l=r.exports},9526:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=void 0;e["default"]={401:"认证失败,无法访问系统资源,请重新登录",403:"当前操作没有权限",404:"访问资源不存在",default:"系统未知错误,请反馈给管理员"}},9553:function(t,e,a){"use strict";a.r(e),a.d(e,{__esModule:function(){return i.B},default:function(){return n}});var s=a(3178),i=a(5063),o=i.A,r=a(1656),l=(0,r.A)(o,s.XX,s.Yp,!1,null,"72be8b67",null),n=l.exports},9630:function(t,e){"use strict";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.pendingWithdrawals.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:"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.successWithdrawals.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:"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.failedWithdrawals.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:"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("查看您的提现申请和交易状态")])])}]},9662:function(t,e,a){"use strict";var s=a(3999)["default"];Object.defineProperty(e,"__esModule",{value:!0}),e.createProduct=r,e.deleteProduct=c,e.getList=o,e.getMachineInfo=d,e.getMachineInfoById=h,e.getOwnedList=u,e.getProductList=l,e.updateProduct=n;var i=s(a(5720));function o(t){return(0,i.default)({url:"/lease/product/getList",method:"get",data:t})}function r(t){return(0,i.default)({url:"/lease/product/add",method:"post",data:t})}function l(t){return(0,i.default)({url:"/lease/product/getList",method:"post",data:t})}function n(t){return(0,i.default)({url:"/lease/product/update",method:"post",data:t})}function c(t){return(0,i.default)({url:"/lease/product/delete",method:"post",data:{id:t}})}function d(t){return(0,i.default)({url:"/lease/product/getMachineInfo",method:"post",data:t})}function u(t){return(0,i.default)({url:"/lease/product/getOwnedList",method:"post",data:t})}function h(t){return(0,i.default)({url:"/lease/product/getMachineInfoById",method:"post",data:t})}},9683:function(t,e,a){"use strict";a.r(e),a.d(e,{__esModule:function(){return i.B},default:function(){return n}});var s=a(4920),i=a(857),o=i.A,r=a(1656),l=(0,r.A)(o,s.XX,s.Yp,!1,null,"20c969ee",null),n=l.exports},9749:function(t,e,a){"use strict";a.r(e),a.d(e,{__esModule:function(){return i.B},default:function(){return n}});var s=a(5624),i=a(860),o=i.A,r=a(1656),l=(0,r.A)(o,s.XX,s.Yp,!1,null,"6523baa0",null),n=l.exports}},e={};function a(s){var i=e[s];if(void 0!==i)return i.exports;var o=e[s]={id:s,loaded:!1,exports:{}};return t[s].call(o.exports,o,o.exports,a),o.loaded=!0,o.exports}a.m=t,function(){a.amdO={}}(),function(){var t=[];a.O=function(e,s,i,o){if(!s){var r=1/0;for(d=0;d=o)&&Object.keys(a.O).every(function(t){return a.O[t](s[n])})?s.splice(n--,1):(l=!1,o0&&t[d-1][2]>o;d--)t[d]=t[d-1];t[d]=[s,i,o]}}(),function(){a.d=function(t,e){for(var s in e)a.o(e,s)&&!a.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})}}(),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(){var t={524:0};a.O.j=function(e){return 0===t[e]};var e=function(e,s){var i,o,r=s[0],l=s[1],n=s[2],c=0;if(r.some(function(e){return 0!==t[e]})){for(i in l)a.o(l,i)&&(a.m[i]=l[i]);if(n)var d=n(a)}for(e&&e(s);c