Commit b5232011 authored by xhx's avatar xhx

fix:树莓派相关代码调整

parent d02c7cae
......@@ -195,5 +195,17 @@ export default {
},
method: 'POST'
})
},
closeTicket: function(addr: string) {
return service.request({
data: {
method: 'ticket.CloseTickets',
params: [{
minerAddress: addr,
}]
},
method: 'POST'
})
}
}
\ No newline at end of file
This diff is collapsed.
......@@ -85,8 +85,6 @@ export default Vue.extend({
data() {
return {
showMenu: false,
paiWalletAddress: '',
isMining: false,
err: '',
isBind: false,
ticketCount: '' as any,
......@@ -97,6 +95,20 @@ export default Vue.extend({
}
},
computed: {
isMining(): boolean{
return !this.isLockWallet && this.miningBtyCount > 0 && this.blockSync
},
isLockWallet():boolean{ // 钱包是否锁定 true:锁定整个钱包 false:没有锁定整个钱包
const {isWalletLock,isTicketLock} = this.walletStatus;
return isWalletLock?isTicketLock:false
},
paiWalletAddress():string {
return (
(this.paiWalletInfo.acc &&
this.paiWalletInfo.acc.addr) ||
''
);
},
deviceSerial(): string {
return this.deviceInfo.serial || '';
},
......
......@@ -134,10 +134,10 @@ export default Vue.extend({
const resetWalletResult = await passwdInputProxy(resetWallet)(params.ip);
console.log('resetWalletResult', resetWalletResult);
// setTimeout(() => {
// this.$router.push({ name: 'index' });
// toast.clear();
// }, 30000);
setTimeout(() => {
// this.$router.push({ name: 'index' });
toast.clear();
}, 30000);
})
.catch(err => {
console.log('cancel')
......
......@@ -31,34 +31,34 @@ module.exports = {
},
}
},
configureWebpack: config => {
if (process.env.NODE_ENV === 'production') {
config.optimization = {
minimize: true,
minimizer: [
new TerserPlugin({
exclude: /node_modules/,
terserOptions: {
compress: {
drop_console: true,
drop_debugger: false,
pure_funcs: ['console.log'], // 移除console
}
}
})
]
}
// config.plugins = [
// new CompressionWebpackPlugin({
// filename: '[path][name].gz[query]',
// algorithm: 'gzip',
// test: /\.(js|css|json|ttf)(\?.*)?$/i,
// threshold: 0,
// minRatio: 0.8,
// })
// ]
}
}
// configureWebpack: config => {
// if (process.env.NODE_ENV === 'production') {
// config.optimization = {
// minimize: true,
// minimizer: [
// new TerserPlugin({
// exclude: /node_modules/,
// terserOptions: {
// compress: {
// drop_console: true,
// drop_debugger: false,
// pure_funcs: ['console.log'], // 移除console
// }
// }
// })
// ]
// }
// // config.plugins = [
// // new CompressionWebpackPlugin({
// // filename: '[path][name].gz[query]',
// // algorithm: 'gzip',
// // test: /\.(js|css|json|ttf)(\?.*)?$/i,
// // threshold: 0,
// // minRatio: 0.8,
// // })
// // ]
// }
// }
// pwa: {
// name: 'My App',
// themeColor: '#4DBA87',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment