Commit d7687cb4 authored by xhx's avatar xhx

fix:进入委托调整

parent 7d9516a4
......@@ -14,7 +14,7 @@
</noscript>
<div id="app"></div>
<script>
console.log('v1.0.5')
console.log('v1.1.0')
</script>
<!-- built files will be auto injected -->
</body>
......
......@@ -4,7 +4,9 @@ import { sign } from '@/utils/bridge'
import { rawTransaction } from "@/type/request";
// import { test } from '@/utils/test'
const service = request(`${process.env.VUE_APP_CHAIN}`)
const url = process.env.NODE_ENV === 'development' ? '/chain' : process.env.VUE_APP_CHAIN
const service = request(`${url}`)
async function chainRequire(method: string, data: any[], b?: boolean, _this?: any, cb?:any){
const CancelToken = axios.CancelToken;
......
......@@ -69,6 +69,7 @@ export default Vue.extend({
if (this.timer) clearInterval(this.timer)
})
getUserInfo().then(res => {
console.log('inviter', res.data.data.inviter)
this.inviter = res.data.data.inviter
})
},
......
......@@ -178,16 +178,20 @@ export default Vue.extend({
startTime: string
}) {
service.getTicketAddress(this.address).then(r => {
const addr = r.data.result?.data
// 已经投过票,跳过封闭期
if (r.data.result?.data) {
checkBind(val.id).then(res => {
if (res.data.data.isSucc) {
Toast.clear()
this.$router.push({ path: '/details', query: { id: val.id || '1' }})
}
}).catch(() => {
if (addr) {
if (addr === val.minerAddr) {
Toast('该账号已绑定过票池')
})
}
// checkBind(val.id).then(res => {
// if (res.data.data.isSucc) {
// Toast.clear()
// this.$router.push({ path: '/details', query: { id: val.id || '1' }})
// }
// }).catch(() => {
// Toast('该账号已绑定过票池')
// })
} else {
// 未投过,检测封闭期是否到期,到期停止进入
const _now = Date.now()
......
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