Commit f96294cb authored by xhx's avatar xhx

fix:调整

parent bf0cc816
NODE_ENV='development'
VUE_APP_URL="http://172.16.100.59:8090"
#VUE_APP_URL="http://172.16.100.59:8092"
VUE_APP_CHAIN="http://172.16.100.59:8801"
\ No newline at end of file
VUE_APP_CHAIN="http://172.16.100.247:8801"
\ No newline at end of file
......@@ -54,7 +54,12 @@ export default Vue.extend({
})
},
getInfo() {
Toast.loading({
forbidClick: true,
duration: 0
})
poolInfo(this.$route.query.id as string).then((res: any) => {
Toast.clear()
this.info = res.data.data
checkBind(this.$route.query.id as string).then(res => {
// 已经绑定过
......
......@@ -105,6 +105,7 @@ export default Vue.extend({
page: this.page,
pageSize: this.pageSize
}).then((res: any) => {
Toast.clear()
if (this.refresh) {
this.refresh = false
this.lists = []
......@@ -114,6 +115,7 @@ export default Vue.extend({
this.count = +data.count
document.addEventListener('scroll', this.scrollEvent)
}).catch(e => {
Toast.clear()
const err = e.response
if (err.data?.code === 406 && err.data?.reason === 'USER_NOT_BIND') {
this.show = true
......@@ -162,32 +164,32 @@ export default Vue.extend({
sellDays: string,
startTime: string
}) {
// service.getTicketAddress(this.$store.state.app.address).then(r => {
service.getTicketAddress(this.$store.state.app.address).then(r => {
// 已经投过票,跳过封闭期
// if (r.data.result?.data) {
// checkBind(val.id).then(res => {
// if (res.data.data.isSucc) {
// Toast.clear()
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(() => {
// Toast('该账号已绑定过票池')
// })
// } else {
// // 未投过,检测封闭期是否到期,到期停止进入
// const _now = Date.now()
// const endTime = (+val.startTime + (+val.sellDays * 24 * 3600)) * 1000
// if (endTime < _now && val.sellDays !== '0') {
// Toast('该票池已过封闭期,您不能进入')
// } else {
// // 清除失败提示
// Toast.clear()
// this.$router.push({ path: '/details', query: { id: val.id || '1' }})
// }
// }
// }).catch(() => {
// Toast('网络异常')
// })
}
}).catch(() => {
Toast('该账号已绑定过票池')
})
} else {
// 未投过,检测封闭期是否到期,到期停止进入
const _now = Date.now()
const endTime = (+val.startTime + (+val.sellDays * 24 * 3600)) * 1000
if (endTime < _now && val.sellDays !== '0') {
Toast('该票池已过封闭期,您不能进入')
} else {
// 清除失败提示
Toast.clear()
this.$router.push({ path: '/details', query: { id: val.id || '1' }})
}
}
}).catch(() => {
Toast('网络异常')
})
},
addInvite(val: string) {
if (!val) {
......@@ -215,20 +217,11 @@ export default Vue.extend({
},
},
mounted() {
// getCurrentBTYAddress('',(res: string) => {
// console.log('BTY ADDRESS', res)
// this.$store.commit('app/SET_ADDRESS', res)
// getDeviceId('', (ret: string) => {
// console.log(ret, 'DEVICEID')
// this.$store.commit('app/SET_DEVICEID', ret)
// hasPoolAddr(res)
// this.getInfo()
// this.getCoins()
// this.getList()
// this.setTimer()
// })
// })
setTimeout(() => {
// Toast.loading({
// forbidClick: true,
// duration: 0
// })
this.getInfo()
this.getCoins()
this.getList()
......
......@@ -23,7 +23,7 @@ import Vue from 'vue'
import Header from '@/components/Header.vue'
import InfoCard from '@/views/Home/InfoCard.vue'
import PoolList from '@/views/Home/PoolList.vue'
import { Icon } from 'vant'
import { Icon, Toast } from 'vant'
export default Vue.extend({
components: {
Header,
......@@ -35,6 +35,12 @@ export default Vue.extend({
goMining() {
this.$router.push({ path: '/mine', query: {}})
},
},
mounted() {
Toast.loading({
duration: 0,
forbidClick: true
})
}
})
</script>
\ No newline at end of file
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