Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
Community-Mining-Client
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mining
Community-Mining-Client
Commits
f96294cb
Commit
f96294cb
authored
Dec 09, 2021
by
xhx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:调整
parent
bf0cc816
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
40 deletions
+45
-40
.env.test
.env.test
+2
-2
index.vue
src/views/Details/index.vue
+5
-0
PoolList.vue
src/views/Home/PoolList.vue
+30
-37
index.vue
src/views/Home/index.vue
+8
-1
No files found.
.env.test
View file @
f96294cb
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
src/views/Details/index.vue
View file @
f96294cb
...
...
@@ -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
=>
{
// 已经绑定过
...
...
src/views/Home/PoolList.vue
View file @
f96294cb
...
...
@@ -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
()
...
...
src/views/Home/index.vue
View file @
f96294cb
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment