Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
walk_daka_h5
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
穆启卓
walk_daka_h5
Commits
8d780488
Commit
8d780488
authored
Apr 03, 2019
by
穆启卓
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'remotes/origin/dev_yijun' into mutou
parents
9680b380
d826183e
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
267 additions
and
107 deletions
+267
-107
api.js
src/components/axios/api.js
+1
-1
fetch.js
src/components/axios/fetch.js
+10
-10
ChallengeDetail.vue
src/views/ChallengeDetail.vue
+4
-2
GoXCX.vue
src/views/GoXCX.vue
+1
-1
HaveJoinedGame.vue
src/views/HaveJoinedGame.vue
+216
-81
Rule.vue
src/views/Rule.vue
+35
-12
No files found.
src/components/axios/api.js
View file @
8d780488
...
@@ -235,7 +235,7 @@ export function track(key) {
...
@@ -235,7 +235,7 @@ export function track(key) {
method
:
'GET'
,
method
:
'GET'
,
params
:
{
params
:
{
//传过去的参数
//传过去的参数
p
:
`
study
`
,
p
:
`
bsdk
`
,
k
:
`
${
key
}
`
,
k
:
`
${
key
}
`
,
u
:
window
[
'userData'
]
?
window
[
'userData'
].
id
:
''
u
:
window
[
'userData'
]
?
window
[
'userData'
].
id
:
''
}
}
...
...
src/components/axios/fetch.js
View file @
8d780488
...
@@ -30,16 +30,16 @@ export function fetch(options) {
...
@@ -30,16 +30,16 @@ export function fetch(options) {
resolve
(
response
.
data
);
//把请求到的数据发到引用请求的地方
resolve
(
response
.
data
);
//把请求到的数据发到引用请求的地方
})
})
.
catch
(
error
=>
{
.
catch
(
error
=>
{
console
.
log
(
'请求异常信息:'
,
error
);
//
console.log('请求异常信息:', error);
console
.
log
(
error
);
//
console.log(error);
if
(
error
.
response
.
status
==
401
)
{
//
if (error.response.status == 401) {
localStorage
.
setItem
(
'last_url'
,
location
.
hash
.
slice
(
1
));
//
localStorage.setItem('last_url', location.hash.slice(1));
localStorage
.
setItem
(
'walk_userData'
,
''
);
//
localStorage.setItem('walk_userData', '');
location
.
replace
(
'#/Author'
);
//
location.replace('#/Author');
// this.$router.push({name:"Author"})
//
// this.$router.push({name:"Author"})
}
else
{
//
} else {
reject
(
error
);
//
reject(error);
}
//
}
});
});
});
});
...
...
src/views/ChallengeDetail.vue
View file @
8d780488
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<div
class=
"bonus-title"
v-else
>
达标奖励金(元)
</div>
<div
class=
"bonus-title"
v-else
>
达标奖励金(元)
</div>
<div
class=
"bonus-amount"
>
{{
pageData
.
bet_bonus
}}
</div>
<div
class=
"bonus-amount"
>
{{
pageData
.
bet_bonus
}}
</div>
</div>
</div>
<div
class=
"game-title"
>
{{
pageData
.
target_step
}}
步
三
日耐力赛
</div>
<div
class=
"game-title"
>
{{
pageData
.
target_step
}}
步
3
日耐力赛
</div>
<div
class=
"game-time"
>
开赛时间:
{{
pageData
.
start_format
}}
—
{{
pageData
.
end_format
}}
</div>
<div
class=
"game-time"
>
开赛时间:
{{
pageData
.
start_format
}}
—
{{
pageData
.
end_format
}}
</div>
<div
class=
"hr"
></div>
<div
class=
"hr"
></div>
<div
class=
"game-info-container"
>
<div
class=
"game-info-container"
>
...
@@ -67,7 +67,7 @@
...
@@ -67,7 +67,7 @@
if
(
window
[
"userData"
])
{
if
(
window
[
"userData"
])
{
this
.
userData
=
window
[
"userData"
]
this
.
userData
=
window
[
"userData"
]
}
else
{
}
else
{
let
localUserData
=
localStorage
.
getItem
(
"
bs
_userData"
)
let
localUserData
=
localStorage
.
getItem
(
"
walk
_userData"
)
if
(
localUserData
)
{
if
(
localUserData
)
{
window
[
"userData"
]
=
JSON
.
parse
(
localUserData
)
window
[
"userData"
]
=
JSON
.
parse
(
localUserData
)
this
.
userData
=
window
[
"userData"
]
this
.
userData
=
window
[
"userData"
]
...
@@ -135,9 +135,11 @@
...
@@ -135,9 +135,11 @@
imgUrl
:
result
.
img_url
,
// 分享图标
imgUrl
:
result
.
img_url
,
// 分享图标
success
:
function
(
res
)
{
success
:
function
(
res
)
{
console
.
log
(
"option4Success"
,
res
)
console
.
log
(
"option4Success"
,
res
)
this
.
showShareModal
=
false
},
},
fail
:
err
=>
{
fail
:
err
=>
{
console
.
log
(
"option4error"
,
err
)
console
.
log
(
"option4error"
,
err
)
this
.
showShareModal
=
false
}
}
}
}
// wx.onMenuShareTimeline(option4);
// wx.onMenuShareTimeline(option4);
...
...
src/views/GoXCX.vue
View file @
8d780488
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
</div>
</div>
</div>
</div>
<div
class=
"tip-title"
>
如何完成打卡?
</div>
<div
class=
"tip-title"
>
如何完成打卡?
</div>
<div
class=
"tip-content"
>
1、识别上方二维码,打开「
运动打卡
」小程序
</div>
<div
class=
"tip-content"
>
1、识别上方二维码,打开「
步步运动赚
」小程序
</div>
<div
class=
"tip-content"
>
2、在小程序中授权获取每日微信运动步数
</div>
<div
class=
"tip-content"
>
2、在小程序中授权获取每日微信运动步数
</div>
<div
class=
"tip-content"
>
3、退出小程序中,返回打卡页面
</div>
<div
class=
"tip-content"
>
3、退出小程序中,返回打卡页面
</div>
<div
class=
"tip-content"
>
4、成功获取每日微信运动步数,打卡成功
</div>
<div
class=
"tip-content"
>
4、成功获取每日微信运动步数,打卡成功
</div>
...
...
src/views/HaveJoinedGame.vue
View file @
8d780488
...
@@ -6,6 +6,10 @@
...
@@ -6,6 +6,10 @@
show_back=
"true"
show_back=
"true"
v-if=
"currentPage()==='HaveJoinedGame'"
v-if=
"currentPage()==='HaveJoinedGame'"
></Title>
></Title>
<div
class=
"game-rule-container"
@
click=
"goOtherPage('Rule')"
>
<img
src=
"../images/ChallengeDetail/ic_que.png"
>
活动规则
</div>
<div
class=
"game-bonus-container"
>
<div
class=
"game-bonus-container"
>
<div
class=
"bonus-title"
>
本期累计奖励金(元)
</div>
<div
class=
"bonus-title"
>
本期累计奖励金(元)
</div>
<div
class=
"bonus-amount"
>
{{
bet_bonus
|
moneyFormatter
}}
</div>
<div
class=
"bonus-amount"
>
{{
bet_bonus
|
moneyFormatter
}}
</div>
...
@@ -25,8 +29,7 @@
...
@@ -25,8 +29,7 @@
<div
class=
"game-scroll-item"
>
<div
class=
"game-scroll-item"
>
<div
class=
"item-title-status"
>
<div
class=
"item-title-status"
>
<div
class=
"item-title"
>
第
{{
item
.
days
}}
天
</div>
<div
class=
"item-title"
>
第
{{
item
.
days
}}
天
</div>
<div
<div
:class=
"item.status===0?'item-status0':item.status===1?'item-status1':item.status===2?'item-status2':'item-status2'"
:class=
"item.status===0?'item-status0':item.status===1?'item-status1':item.status===2?'item-status2':'item-status2'"
>
{{
item
.
status
===
0
?
'未开始'
:
item
.
status
===
1
?
'比赛中'
:
item
.
status
===
2
?
'已结束'
:
'已淘汰'
}}
>
{{
item
.
status
===
0
?
'未开始'
:
item
.
status
===
1
?
'比赛中'
:
item
.
status
===
2
?
'已结束'
:
'已淘汰'
}}
</div>
</div>
</div>
</div>
...
@@ -37,12 +40,22 @@
...
@@ -37,12 +40,22 @@
<div
class=
"item-progress-num"
>
<div
class=
"item-progress-num"
>
<div
class=
"item-num"
v-if=
"item.status===0"
>
还有
{{
item
.
format_tsp
||
'0秒'
}}
开始
</div>
<div
class=
"item-num"
v-if=
"item.status===0"
>
还有
{{
item
.
format_tsp
||
'0秒'
}}
开始
</div>
<template
v-else
>
<template
v-else
>
<div
class=
"item-progress"
:style=
"'width: '+item.rate/100*2.46+'rem;'"
></div>
<div
class=
"item-progress"
:style=
"'width: '+item.rate/100*2.46+'rem;'"
v-if=
"index ==0 || (index > 0 && record_list[index-1].status != 3)"
></div>
<div
class=
"item-num"
>
{{
item
.
step_num
}}
/
{{
target_steps
}}
步
</div>
<div
class=
"item-num"
>
<!-- //已淘汰 1-->
<!-- 0: 未开始 1:比赛中 2:已结束 3:已淘汰-->
<span
v-if=
"item.is_complete == 2"
>
未达标(
{{
item
.
step_num
}}
步)
</span>
<span
v-else-if=
"item.status == 3 && item.is_complete != 2"
>
已失去比赛资格
</span>
<span
v-else-if=
"item.is_complete == 1 && item.status == 2"
>
已达标(
{{
item
.
step_num
}}
步)
</span>
<span
v-else-if=
"item.status == 1 && item.is_complete == 1"
>
今天达标了
</span>
<!-- 今天进行中-->
<span
v-else-if=
"item.is_complete == 0 && item.status == 1"
>
(
{{
item
.
step_num
}}
/
{{
target_steps
}}
步)
</span>
</div>
</
template
>
</
template
>
</div>
</div>
</div>
</div>
</swiper-slide>
</swiper-slide>
<div
class=
"swiper-pagination"
slot=
"pagination"
style=
"opacity: 0"
></div>
</swiper>
</swiper>
<!-- </div>-->
<!-- </div>-->
<div
class=
"func-btn"
@
click=
"goOtherPage('GoXCX')"
>
提交今日步数
</div>
<div
class=
"func-btn"
@
click=
"goOtherPage('GoXCX')"
>
提交今日步数
</div>
...
@@ -57,7 +70,7 @@
...
@@ -57,7 +70,7 @@
<span>
每日24点前
</span>
打开「步步运动赚」小程序,手动提交今日步数,否则可能导致无法分钱哦!
<span>
每日24点前
</span>
打开「步步运动赚」小程序,手动提交今日步数,否则可能导致无法分钱哦!
</div>
</div>
<div
class=
"popup-text2"
>
注:微信暂不支持小程序实时更新步数
</div>
<div
class=
"popup-text2"
>
注:微信暂不支持小程序实时更新步数
</div>
<div
class=
"popup-btn1 green-btn"
>
邀请好友来参赛
</div>
<div
class=
"popup-btn1 green-btn"
@
click=
"inviteFriend"
>
邀请好友来参赛
</div>
<img
class=
"close-btn"
src=
"../images/common/pop_ic_close.png"
@
click=
"closePayPopup()"
>
<img
class=
"close-btn"
src=
"../images/common/pop_ic_close.png"
@
click=
"closePayPopup()"
>
</div>
</div>
</div>
</div>
...
@@ -78,7 +91,7 @@
...
@@ -78,7 +91,7 @@
</div>
</div>
<div
class=
"popup-text6"
>
{{popupData.target_steps}}步达标,今天走了{{popupData.step_num}}步
</div>
<div
class=
"popup-text6"
>
{{popupData.target_steps}}步达标,今天走了{{popupData.step_num}}步
</div>
<div
class=
"popup-text7"
>
契约金已返还至你的钱包
</div>
<div
class=
"popup-text7"
>
契约金已返还至你的钱包
</div>
<div
class=
"popup-btn1 green-btn"
>
邀请好友来打卡
</div>
<div
class=
"popup-btn1 green-btn"
@
click=
"inviteFriend"
>
邀请好友来打卡
</div>
<img
class=
"close-btn"
src=
"../images/common/pop_ic_close.png"
@
click=
"closePopup()"
>
<img
class=
"close-btn"
src=
"../images/common/pop_ic_close.png"
@
click=
"closePopup()"
>
</div>
</div>
</div>
</div>
...
@@ -101,21 +114,27 @@
...
@@ -101,21 +114,27 @@
<img
class=
"close-btn"
src=
"../images/common/pop_ic_close.png"
@
click=
"closePopup()"
>
<img
class=
"close-btn"
src=
"../images/common/pop_ic_close.png"
@
click=
"closePopup()"
>
</div>
</div>
</div>
</div>
<ShareModal
v-on:close=
"closeShareModal"
v-if=
"showShareModal"
></ShareModal>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
Title
from
"@/components/Title.vue"
;
import
Title
from
"@/components/Title.vue"
import
{
daka_status_detail
,
pop_up_windows
}
from
"@/components/axios/api"
;
import
{
daka_status_detail
,
pop_up_windows
,
shareContent
,
track
}
from
"@/components/axios/api"
import
{
swiper
,
swiperSlide
}
from
"vue-awesome-swiper"
;
import
ShareModal
from
"@/components/ShareModal.vue"
import
"swiper/dist/css/swiper.css"
;
import
{
swiper
,
swiperSlide
}
from
"vue-awesome-swiper"
import
"swiper/dist/css/swiper.css"
export
default
{
export
default
{
name
:
"HaveJoinedGame"
,
name
:
"HaveJoinedGame"
,
components
:
{
components
:
{
Title
,
Title
,
swiper
,
swiper
,
swiperSlide
swiperSlide
,
ShareModal
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -125,7 +144,11 @@ export default {
...
@@ -125,7 +144,11 @@ export default {
spaceBetween
:
10
,
spaceBetween
:
10
,
notNextTick
:
true
,
notNextTick
:
true
,
loop
:
false
,
loop
:
false
,
autoplay
:
false
autoplay
:
false
,
pagination
:
{
el
:
'.swiper-pagination'
,
clickable
:
false
}
},
},
showSwiper
:
false
,
showSwiper
:
false
,
bet_bonus
:
"0.00"
,
bet_bonus
:
"0.00"
,
...
@@ -137,26 +160,28 @@ export default {
...
@@ -137,26 +160,28 @@ export default {
record_list
:
[],
record_list
:
[],
popupData
:
{},
popupData
:
{},
current_day
:
0
,
current_day
:
0
,
userHavePaidGame
:
false
userHavePaidGame
:
false
,
};
showShareModal
:
false
,
userData
:
null
,
}
},
},
created
()
{
created
()
{
this
.
getPageData
();
this
.
getPageData
()
this
.
isPopup
();
this
.
isPopup
()
if
(
sessionStorage
.
getItem
(
"userHavePaidGame"
)
===
"true"
)
{
if
(
sessionStorage
.
getItem
(
"userHavePaidGame"
)
===
"true"
)
{
sessionStorage
.
setItem
(
"userHavePaidGame"
,
"false"
);
sessionStorage
.
setItem
(
"userHavePaidGame"
,
"false"
)
this
.
userHavePaidGame
=
true
;
this
.
userHavePaidGame
=
true
}
}
},
},
computed
:
{
computed
:
{
swiper
()
{
swiper
()
{
return
this
.
$refs
.
mySwiper
.
swiper
;
return
this
.
$refs
.
mySwiper
.
swiper
}
}
},
},
mounted
()
{
mounted
()
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
swiper
.
slideTo
(
this
.
current_day
,
1200
,
false
);
this
.
swiper
.
slideTo
(
this
.
current_day
,
1200
,
false
)
},
800
);
},
800
)
},
},
methods
:
{
methods
:
{
joinNextGame
()
{
joinNextGame
()
{
...
@@ -165,34 +190,56 @@ export default {
...
@@ -165,34 +190,56 @@ export default {
query
:
{
query
:
{
nextGame
:
true
nextGame
:
true
}
}
});
})
},
goOtherPage
(
pageName
)
{
if
(
pageName
==
'Rule'
){
// console.log('规则')
let
params
=
this
.
target_steps
let
p
=
0
console
.
log
(
params
)
if
(
params
==
3000
){
p
=
1
}
else
if
(
params
==
5000
){
p
=
2
}
else
if
(
params
==
8000
){
p
=
3
}
this
.
$router
.
push
({
name
:
pageName
,
params
:
{
level
:
p
}})
}
else
{
// console.log('提交步数')
this
.
$router
.
push
({
name
:
pageName
})
}
// let params = this.target_steps
// console.log('params',params)
// this.$router.push({name: pageName})
},
},
closePayPopup
()
{
closePayPopup
()
{
this
.
userHavePaidGame
=
false
;
this
.
userHavePaidGame
=
false
},
},
closePopup
()
{
closePopup
()
{
this
.
popupData
.
window
=
false
;
this
.
popupData
.
window
=
false
},
},
goback
()
{
goback
()
{
history
.
go
(
-
1
);
history
.
go
(
-
1
)
},
goOtherPage
(
pageName
)
{
this
.
$router
.
push
({
name
:
pageName
});
},
},
// goOtherPage(pageName) {
// this.$router.push({name: pageName})
// },
currentPage
()
{
currentPage
()
{
return
this
.
$router
.
history
.
current
.
name
;
return
this
.
$router
.
history
.
current
.
name
},
},
getPageData
()
{
getPageData
()
{
let
grade
=
1
;
let
grade
=
1
if
(
sessionStorage
.
getItem
(
"bushuType"
))
{
if
(
sessionStorage
.
getItem
(
"bushuType"
))
{
grade
=
sessionStorage
.
getItem
(
"bushuType"
);
grade
=
sessionStorage
.
getItem
(
"bushuType"
)
}
}
daka_status_detail
(
daka_status_detail
(
this
.
$route
.
query
.
week
,
this
.
$route
.
query
.
week
,
this
.
$route
.
query
.
week
?
grade
:
""
this
.
$route
.
query
.
week
?
grade
:
""
).
then
(
res
=>
{
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
const
pageData
=
res
.
data
;
const
pageData
=
res
.
data
if
(
pageData
.
record_list
&&
pageData
.
record_list
.
length
)
{
if
(
pageData
.
record_list
&&
pageData
.
record_list
.
length
)
{
pageData
.
record_list
.
forEach
((
item
,
index
)
=>
{
pageData
.
record_list
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
status
===
0
)
{
if
(
item
.
status
===
0
)
{
...
@@ -200,94 +247,166 @@ export default {
...
@@ -200,94 +247,166 @@ export default {
"interval"
+
index
,
"interval"
+
index
,
parseInt
((
item
.
tsp
*
1000
-
Date
.
now
())
/
1000
),
parseInt
((
item
.
tsp
*
1000
-
Date
.
now
())
/
1000
),
index
index
);
)
}
}
});
// if(item.days
<
currentDay
){
}
// if(item.step_num
<
item
.
target_steps
){
this
.
bet_bonus
=
pageData
.
bet_bonus
;
// console.log('未达标')
this
.
next_signup
=
pageData
.
next_signup
;
// }else{
this
.
period_end
=
pageData
.
period_end
;
//
this
.
period_start
=
pageData
.
period_start
;
// }
this
.
total_signup
=
pageData
.
total_signup
;
// }
this
.
target_steps
=
pageData
.
target_steps
;
})
this
.
record_list
=
pageData
.
record_list
;
}
this
.
current_day
=
pageData
.
current_day
-
1
;
this
.
bet_bonus
=
pageData
.
bet_bonus
this
.
showSwiper
=
true
;
this
.
next_signup
=
pageData
.
next_signup
}
this
.
period_end
=
pageData
.
period_end
});
this
.
period_start
=
pageData
.
period_start
this
.
total_signup
=
pageData
.
total_signup
this
.
target_steps
=
pageData
.
target_steps
this
.
record_list
=
pageData
.
record_list
this
.
current_day
=
pageData
.
current_day
-
1
this
.
showSwiper
=
true
}
})
},
},
isPopup
()
{
isPopup
()
{
pop_up_windows
().
then
(
res
=>
{
pop_up_windows
().
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
this
.
popupData
=
res
.
data
;
this
.
popupData
=
res
.
data
}
}
});
})
},
inviteFriend
()
{
console
.
log
(
"inviteFriend"
)
this
.
showShareModal
=
true
let
id
=
this
.
userData
.
id
// let id = 'yijun';
track
(
"free_contract_share"
)
let
links
=
`
${
location
.
href
.
split
(
"#"
)[
0
].
split
(
"?"
)[
0
]}
?inviter=
${
id
}
&from_type=free_contract&`
shareContent
(
"free_contract"
).
then
(
res
=>
{
let
result
=
res
.
data
console
.
log
(
"分享内容"
,
result
,
links
)
let
option1
=
{
title
:
result
.
title
,
// 分享标题
desc
:
result
.
desc
,
// 分享描述
link
:
links
,
// 分享链接
imgUrl
:
result
.
img_url
,
// 分享图标
success
:
function
(
res
)
{
track
(
"free_contract_share_act"
)
console
.
log
(
"option1Success"
,
res
)
}
}
wx
.
updateAppMessageShareData
(
option1
)
//微信分享菜单测试
let
option2
=
{
title
:
result
.
title
,
// 分享标题
desc
:
result
.
desc
,
// 分享描述
link
:
links
,
// 分享链接
imgUrl
:
result
.
img_url
,
// 分享图标
success
:
function
(
res
)
{
console
.
log
(
"option2Success"
,
res
)
}
}
let
option3
=
{
title
:
result
.
title
,
// 分享标题
desc
:
result
.
desc
,
// 分享描述
link
:
links
,
// 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
imgUrl
:
result
.
img_url
,
// 分享图标
success
:
function
(
res
)
{
// 用户点击了分享后执行的回调函数
track
(
"free_contract_share_act"
)
console
.
log
(
"option3Success"
,
res
)
},
fail
:
err
=>
{
console
.
log
(
"option3error"
,
err
)
}
}
wx
.
onMenuShareAppMessage
(
option3
)
let
option4
=
{
title
:
result
.
title
,
// 分享标题
link
:
links
,
// 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
imgUrl
:
result
.
img_url
,
// 分享图标
success
:
function
(
res
)
{
console
.
log
(
"option4Success"
,
res
)
},
fail
:
err
=>
{
console
.
log
(
"option4error"
,
err
)
}
}
// wx.onMenuShareTimeline(option4);
console
.
log
(
"option"
,
option1
,
option2
,
option3
,
option4
)
})
},
closeShareModal
()
{
this
.
showShareModal
=
false
},
},
//倒计时
//倒计时
countDown
(
intervalName
,
times
,
index
)
{
countDown
(
intervalName
,
times
,
index
)
{
clearInterval
(
this
[
intervalName
]);
clearInterval
(
this
[
intervalName
])
this
[
intervalName
]
=
null
;
this
[
intervalName
]
=
null
this
[
intervalName
]
=
setInterval
(()
=>
{
this
[
intervalName
]
=
setInterval
(()
=>
{
let
day
=
0
,
let
day
=
0
,
hour
=
0
,
hour
=
0
,
minute
=
0
,
minute
=
0
,
second
=
0
;
second
=
0
if
(
times
>
0
)
{
if
(
times
>
0
)
{
day
=
Math
.
floor
(
times
/
(
60
*
60
*
24
));
day
=
Math
.
floor
(
times
/
(
60
*
60
*
24
))
hour
=
Math
.
floor
(
times
/
(
60
*
60
))
-
day
*
24
;
hour
=
Math
.
floor
(
times
/
(
60
*
60
))
-
day
*
24
minute
=
Math
.
floor
(
times
/
60
)
-
day
*
24
*
60
-
hour
*
60
;
minute
=
Math
.
floor
(
times
/
60
)
-
day
*
24
*
60
-
hour
*
60
second
=
second
=
Math
.
floor
(
times
)
-
Math
.
floor
(
times
)
-
day
*
24
*
60
*
60
-
day
*
24
*
60
*
60
-
hour
*
60
*
60
-
hour
*
60
*
60
-
minute
*
60
;
minute
*
60
if
(
day
<
1
)
day
=
""
;
if
(
day
<
1
)
day
=
""
else
day
=
day
+
"天"
;
else
day
=
day
+
"天"
if
(
hour
<=
9
)
hour
=
"0"
+
hour
;
if
(
hour
<=
9
)
hour
=
"0"
+
hour
if
(
minute
<=
9
)
minute
=
"0"
+
minute
;
if
(
minute
<=
9
)
minute
=
"0"
+
minute
if
(
second
<=
9
)
second
=
"0"
+
second
;
if
(
second
<=
9
)
second
=
"0"
+
second
this
.
record_list
[
index
].
format_tsp
=
this
.
record_list
[
index
].
format_tsp
=
day
+
hour
+
"时"
+
minute
+
"分"
+
second
+
"秒"
;
day
+
hour
+
"时"
+
minute
+
"分"
+
second
+
"秒"
}
else
{
}
else
{
this
.
getPageData
();
this
.
getPageData
()
clearInterval
(
this
[
intervalName
]);
clearInterval
(
this
[
intervalName
])
}
}
times
--
;
times
--
// console.log('gagagag',intervalName, day + hour + "时" + minute + "分" + second + "秒")
// console.log('gagagag',intervalName, day + hour + "时" + minute + "分" + second + "秒")
// console.log('gagagag',times)
// console.log('gagagag',times)
// console.log('gagagag',this.format_tsp)
// console.log('gagagag',this.format_tsp)
},
1000
);
},
1000
)
}
}
},
},
filters
:
{
filters
:
{
moneyFormatter
(
val
)
{
moneyFormatter
(
val
)
{
if
(
val
&&
!
isNaN
(
val
))
{
if
(
val
&&
!
isNaN
(
val
))
{
return
Number
(
val
).
toFixed
(
2
);
return
Number
(
val
).
toFixed
(
2
)
}
else
{
}
else
{
return
"0.00"
;
return
"0.00"
}
}
}
}
}
}
}
};
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
.swiper-container
{
.swiper-container
{
/*margin-left: 0 !important;*/
/*margin-left: 0 !important;*/
}
}
.swiper-slide
{
.swiper-slide
{
width
:
5.1rem
;
width
:
5.1rem
;
height
:
2.68rem
;
height
:
2.68rem
;
}
}
.swiper-slide
img
{
.swiper-slide
img
{
width
:
5.1rem
;
width
:
5.1rem
;
height
:
2.68rem
;
height
:
2.68rem
;
}
}
.have-joined-game-page
{
.have-joined-game-page
{
//
width
:
100%
;
//
width
:
100%
;
min-height
:
100vh
;
min-height
:
100vh
;
background-color
:
rgb
(
70
,
88
,
149
);
background-color
:
rgb
(
70
,
88
,
149
);
...
@@ -301,6 +420,21 @@ export default {
...
@@ -301,6 +420,21 @@ export default {
overflow
:
hidden
;
overflow
:
hidden
;
position
:
relative
;
position
:
relative
;
padding-bottom
:
50px
;
padding-bottom
:
50px
;
.game-rule-container
{
display
:
flex
;
align-items
:
center
;
position
:
absolute
;
top
:
0.3rem
;
right
:
0.22rem
;
font-size
:
0.26rem
;
line-height
:
1
;
color
:
#465895
;
img
{
width
:
0.3rem
;
height
:
0.3rem
;
margin-right
:
0.1rem
;
}
.page-title
{
.page-title
{
width
:
100%
;
width
:
100%
;
...
@@ -308,6 +442,7 @@ export default {
...
@@ -308,6 +442,7 @@ export default {
left
:
0
;
left
:
0
;
top
:
0
;
top
:
0
;
}
}
}
.game-bonus-container
{
.game-bonus-container
{
width
:
6.4rem
;
width
:
6.4rem
;
...
@@ -395,7 +530,7 @@ export default {
...
@@ -395,7 +530,7 @@ export default {
box-sizing
:
border-box
;
box-sizing
:
border-box
;
overflow-x
:
scroll
;
overflow-x
:
scroll
;
white-space
:
nowrap
;
white-space
:
nowrap
;
-webkit-overflow-scrolling
:
touch
;
&::-webkit-scrollbar
{
&::-webkit-scrollbar
{
display
:
none
;
display
:
none
;
}
}
...
@@ -535,9 +670,9 @@ export default {
...
@@ -535,9 +670,9 @@ export default {
text-align
:
center
;
text-align
:
center
;
margin-top
:
0.3rem
;
margin-top
:
0.3rem
;
}
}
}
}
.game-status-popup
{
.game-status-popup
{
position
:
fixed
;
position
:
fixed
;
left
:
0
;
left
:
0
;
top
:
0
;
top
:
0
;
...
@@ -683,5 +818,5 @@ export default {
...
@@ -683,5 +818,5 @@ export default {
transform
:
translateX
(
-50%
);
transform
:
translateX
(
-50%
);
}
}
}
}
}
}
</
style
>
</
style
>
src/views/Rule.vue
View file @
8d780488
<
template
>
<
template
>
<div
class=
"rule-page"
>
<div
class=
"rule-page"
>
<Title
class=
"page-title"
title=
"活动规则与协议"
titleColor=
"#000"
@
goback=
"goback"
show_back=
"true"
arrowColor=
"black"
></Title>
<Title
class=
"page-title"
title=
"活动规则与协议"
titleColor=
"#000"
@
goback=
"goback"
show_back=
"true"
arrowColor=
"black"
></Title>
<div
class=
"section-title"
>
挑战玩法:
</div>
<div
class=
"section-title"
>
挑战玩法:
</div>
<img
class=
"game-way-img"
v-if=
"bushuType == 1"
src=
"../images/Rule/img_rule_0.png"
>
<img
class=
"game-way-img"
v-if=
"bushuType == 1"
src=
"../images/Rule/img_rule_0.png"
>
<img
class=
"game-way-img"
v-if=
"bushuType == 2"
src=
"../images/Rule/img_rule_1.png"
>
<img
class=
"game-way-img"
v-if=
"bushuType == 2"
src=
"../images/Rule/img_rule_1.png"
>
...
@@ -15,21 +16,29 @@
...
@@ -15,21 +16,29 @@
</div>
</div>
<div
class=
"section2-title"
>
参赛须知详情:
</div>
<div
class=
"section2-title"
>
参赛须知详情:
</div>
<div
class=
"content2-title"
>
一、比赛规则
</div>
<div
class=
"content2-title"
>
一、比赛规则
</div>
<div
class=
"content2-item"
>
每期比赛于比赛日00:00:00正式开始统计,到比赛日23: 59:59正式结束;用户缴纳当期比赛契约金后即可成功报名;比赛结束后达标用户将收到运动奖励金(奖励金等于达标用户本人运动契约金,加上均分未达标用户契约金的30%);
</div>
<div
class=
"content2-item"
>
每期比赛于比赛日00:00:00正式开始统计,到比赛日23:59:59正式结束;用户缴纳当期比赛契约金后即可成功报名;比赛结束后达标用户将收到运动奖励金(奖励金等于达标用户本人运动契约金,加上均分未达标用户契约金的30%);
</div>
<div
class=
"content2-item"
>
运动达标奖励金将于比赛结束后24小时内发放到达标用户账户中;
</div>
<div
class=
"content2-item"
>
运动达标奖励金将于比赛结束后24小时内发放到达标用户账户中;
</div>
<div
class=
"content2-title"
>
二、用户确认报名即认可平台判定结果,不再对该结果进行任何 形式抗辩
</div>
<div
class=
"content2-title"
>
二、用户确认报名即认可平台判定结果,不再对该结果进行任何形式抗辩
</div>
<div
class=
"content2-item"
>
每场比赛的判定结果,由平台根据比赛结束时(当期比赛最后一曰的23:59:59)的服务器后台获取的用户步数来判定,该步数会显示在当期比赛结束后的比赛详情页;用户报名成功即表示对平台 的判定结果表示认可,不再对该结果进行任何形式抗辩;
</div>
<div
class=
"content2-item"
>
每场比赛的判定结果,由平台根据比赛结束时(当期比赛最后一日的23:59:59)的服务器后台获取的用户步数来判定,该步数会显示在当期比赛结束后的比赛详情页;用户报名成功即表示对平台
的判定结果表示认可,不再对该结果进行任何形式抗辩;
</div>
<div
class=
"content2-title"
>
三、用户应保证设备的可靠性,以保证运动数据准确性
</div>
<div
class=
"content2-title"
>
三、用户应保证设备的可靠性,以保证运动数据准确性
</div>
<div
class=
"content2-item"
>
报名赛事的用户应保证自己设备的可靠性,例如保证电源电量充 足,保证计步服务在设备系统的运行白名单内,网络链接正常 等;为了更好的保证运动数据的可靠性,比赛期间请保证一定频次的手机微信登录;由于用户个人设备缺乏可靠性导致的投诉,平台不予处理;
</div>
<div
class=
"content2-item"
>
报名赛事的用户应保证自己设备的可靠性,例如保证电源电量充足,保证计步服务在设备系统的运行白名单内,网络链接正常
等;为了更好的保证运动数据的可靠性,比赛期间请保证一定频次的手机微信登录;由于用户个人设备缺乏可靠性导致的投诉,平台不予处理;
</div>
<div
class=
"content2-title"
>
四、其他说明
</div>
<div
class=
"content2-title"
>
四、其他说明
</div>
<div
class=
"content2-item"
>
奖金派发时’仅派发到小数点后两位,由此可能造成的奖金结余
将在合并至本组下期比赛奖金中一并派发;
</div>
<div
class=
"content2-item"
>
奖金派发时仅派发到小数点后两位,由此可能造成的奖金结余
将在合并至本组下期比赛奖金中一并派发;
</div>
<div
class=
"content2-item"
>
由于不可抗力因素导致当期比赛因故无法进行的,平台有权取消 当期比赛’并将在指定时间内将运动契约金原路退还给报名成功
用户;
</div>
<div
class=
"content2-item"
>
由于不可抗力因素导致当期比赛因故无法进行的,平台有权取消当期比赛’并将在指定时间内将运动契约金原路退还给报名成功
用户;
</div>
<div
class=
"ps"
>
注:Apple不是本赛事赞助者
</div>
<div
class=
"ps"
>
注:Apple不是本赛事赞助者
</div>
<br>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
Title
from
"@/components/Title.vue"
;
import
Title
from
"@/components/Title.vue"
export
default
{
export
default
{
name
:
"Rule"
,
name
:
"Rule"
,
components
:
{
components
:
{
...
@@ -38,17 +47,22 @@
...
@@ -38,17 +47,22 @@
data
()
{
data
()
{
return
{
return
{
bushuType
:
0
bushuType
:
0
};
}
},
},
mounted
(){
mounted
()
{
if
(
this
.
$route
.
params
.
level
)
{
this
.
bushuType
=
this
.
$route
.
params
.
level
}
else
{
let
LastLevel
=
Number
(
sessionStorage
.
getItem
(
'bushuType'
))
let
LastLevel
=
Number
(
sessionStorage
.
getItem
(
'bushuType'
))
if
(
LastLevel
)
{
if
(
LastLevel
)
{
this
.
bushuType
=
LastLevel
this
.
bushuType
=
LastLevel
}
}
}
},
},
methods
:
{
methods
:
{
goback
()
{
goback
()
{
history
.
go
(
-
1
);
history
.
go
(
-
1
)
},
},
}
}
}
}
...
@@ -61,6 +75,7 @@
...
@@ -61,6 +75,7 @@
flex-direction
:
column
;
flex-direction
:
column
;
align-items
:
center
;
align-items
:
center
;
padding-top
:
.96rem
;
padding-top
:
.96rem
;
.page-title
{
.page-title
{
font-weight
:
bold
;
font-weight
:
bold
;
width
:
100%
;
width
:
100%
;
...
@@ -69,6 +84,7 @@
...
@@ -69,6 +84,7 @@
left
:
0
;
left
:
0
;
top
:
0
;
top
:
0
;
}
}
.section-title
{
.section-title
{
width
:
6.72rem
;
width
:
6.72rem
;
font-size
:
.3rem
;
font-size
:
.3rem
;
...
@@ -78,21 +94,25 @@
...
@@ -78,21 +94,25 @@
text-align
:
left
;
text-align
:
left
;
margin-top
:
.44rem
;
margin-top
:
.44rem
;
}
}
.game-way-img
{
.game-way-img
{
width
:
6.15rem
;
width
:
6.15rem
;
height
:
1.09rem
;
height
:
1.09rem
;
margin-top
:
.3rem
;
margin-top
:
.3rem
;
margin-bottom
:
.14rem
;
margin-bottom
:
.14rem
;
}
}
.content1-container
{
.content1-container
{
width
:
6.7rem
;
width
:
6.7rem
;
margin-top
:
.2rem
;
margin-top
:
.2rem
;
.content1-item
{
.content1-item
{
font-size
:
.26rem
;
font-size
:
.26rem
;
line-height
:
.44rem
;
line-height
:
.44rem
;
color
:
#5a5a5a
;
color
:
#5a5a5a
;
}
}
}
}
.section2-title
{
.section2-title
{
width
:
6.72rem
;
width
:
6.72rem
;
font-size
:
.26rem
;
font-size
:
.26rem
;
...
@@ -100,6 +120,7 @@
...
@@ -100,6 +120,7 @@
color
:
#333
;
color
:
#333
;
margin-top
:
.4rem
;
margin-top
:
.4rem
;
}
}
.content2-title
{
.content2-title
{
width
:
6.72rem
;
width
:
6.72rem
;
font-size
:
.26rem
;
font-size
:
.26rem
;
...
@@ -107,6 +128,7 @@
...
@@ -107,6 +128,7 @@
color
:
#333
;
color
:
#333
;
margin-top
:
.2rem
;
margin-top
:
.2rem
;
}
}
.content2-item
{
.content2-item
{
width
:
6.72rem
;
width
:
6.72rem
;
font-size
:
.26rem
;
font-size
:
.26rem
;
...
@@ -114,6 +136,7 @@
...
@@ -114,6 +136,7 @@
color
:
#5a5a5a
;
color
:
#5a5a5a
;
margin-top
:
.14rem
;
margin-top
:
.14rem
;
}
}
.ps
{
.ps
{
width
:
6.72rem
;
width
:
6.72rem
;
font-size
:
.26rem
;
font-size
:
.26rem
;
...
...
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