|
@@ -1,6 +1,7 @@
|
|
|
<template>
|
|
|
<!-- 图片前缀 https://img.shuimuai.com/ -->
|
|
|
- <scroll-view id="index_container" @scroll="onListenScroll" scroll-y style="height: 100%;">
|
|
|
+ <scroll-view id="index_container" @scroll="onListenScroll" scroll-y style="height: 100%;"
|
|
|
+ :scroll-into-view="scroll_id" scroll-y>
|
|
|
<!-- 死底部分-->
|
|
|
<div class="index_container">
|
|
|
|
|
@@ -8,7 +9,7 @@
|
|
|
<van-row>
|
|
|
<van-col :span="12">
|
|
|
|
|
|
- <div class="userinfo " :class="{not_show:userinfo.user_id == false}">
|
|
|
+ <div class="userinfo " :class="{not_show:!userinfo.user_id}">
|
|
|
<van-row>
|
|
|
<van-col :span="5">
|
|
|
<van-image :src="userinfo.portrait" width="32px" height="32px"></van-image>
|
|
@@ -288,7 +289,7 @@
|
|
|
|
|
|
<!-- 特等奖 -->
|
|
|
<view class="gold_award_container last_sort" v-if="item.prize==0">
|
|
|
- <van-row >
|
|
|
+ <van-row>
|
|
|
<van-col span="2" offset="9" class="">
|
|
|
<van-image :src="item.portrait" alt="" class="avatar" width="25px" height="25px"></van-image>
|
|
|
</van-col>
|
|
@@ -420,7 +421,8 @@ export default {
|
|
|
},
|
|
|
icon_show: false,
|
|
|
// 是否悬浮
|
|
|
- is_fixed: false
|
|
|
+ is_fixed: false,
|
|
|
+ scroll_id: ''
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -455,10 +457,10 @@ export default {
|
|
|
to_info() {
|
|
|
if (!$this.userinfo.user_id) {
|
|
|
Toast.fail({
|
|
|
- message:'请登录水母智脑小程序后进行参与比赛',
|
|
|
- onClose(){
|
|
|
+ message: '请登录水母智脑小程序后进行参与比赛',
|
|
|
+ onClose() {
|
|
|
wx.navigateTo({
|
|
|
- url:"/pages/index/main"
|
|
|
+ url: "/pages/index/main"
|
|
|
})
|
|
|
}
|
|
|
})
|
|
@@ -487,14 +489,14 @@ export default {
|
|
|
|
|
|
//跳转比赛信息位置
|
|
|
to_rank() {
|
|
|
- window.location.href = '#rank_container'
|
|
|
+ $this.scroll_id = 'rank_container'
|
|
|
},
|
|
|
//时间产生变化时
|
|
|
onTimeChange($e) {
|
|
|
- $this.timeData = $e.mp.detail
|
|
|
- for (let $key in $e) {
|
|
|
- if ($e[$key].toString().length == 1) {
|
|
|
- $e[$key] = "0" + $e[$key]
|
|
|
+ let $datetime = $this.timeData = $e.mp.detail
|
|
|
+ for (let $key in $datetime) {
|
|
|
+ if ($datetime[$key].toString().length == 1) {
|
|
|
+ $datetime[$key] = "0" + $datetime[$key]
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -586,20 +588,29 @@ export default {
|
|
|
//计算倒计时
|
|
|
// 获取比赛结束日
|
|
|
let $time_result = cal_down_time($time)
|
|
|
+ console.log($time_result)
|
|
|
$this.complete_time = $time_result.differ
|
|
|
},
|
|
|
//监听滚动
|
|
|
onListenScroll(event) {
|
|
|
let $scrollTop = event.mp.detail.scrollTop
|
|
|
$this.is_fixed = $scrollTop > 400
|
|
|
+ $this.scroll_id = ''
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
+ reload_userinfo($this)
|
|
|
+ let $userinfo = wx.getStorageSync('userinfo')
|
|
|
+ //检查用户是否参与比赛了
|
|
|
+ checkJoined($this.activity_id, $userinfo.user_id).then((res) => {
|
|
|
+ let $res = res.data;
|
|
|
+ let $data = $res.data;
|
|
|
+ $this.joined = $data['match_status'] == 1
|
|
|
+ })
|
|
|
},
|
|
|
created() {
|
|
|
$this = this;
|
|
|
//获取浏览器信息
|
|
|
- reload_userinfo($this)
|
|
|
},
|
|
|
onLoad($options) {
|
|
|
$this.activity_id = $options.activity_id
|
|
@@ -807,7 +818,7 @@ page {
|
|
|
}
|
|
|
|
|
|
.diy_container .rank_container .rank_main .rank_main_list .my_score .rank_item {
|
|
|
- display: flex;
|
|
|
+ /*display: flex;*/
|
|
|
}
|
|
|
|
|
|
.diy_container .rank_container .rank_main .rank_main_list .my_score .rank_item .rank_num {
|
|
@@ -1069,12 +1080,14 @@ page {
|
|
|
.rank_header {
|
|
|
padding: 0px 25px;
|
|
|
}
|
|
|
-.last_sort{
|
|
|
+
|
|
|
+.last_sort {
|
|
|
padding: 10px 0px;
|
|
|
}
|
|
|
|
|
|
-.last_sort_ext{
|
|
|
+.last_sort_ext {
|
|
|
padding: 10px;
|
|
|
}
|
|
|
+
|
|
|
/*# sourceMappingURL=diy.css.map */
|
|
|
</style>
|