Commit a79091bf 吴良建

变化关注位置

1 个父辈 e87b9a02
...@@ -55,18 +55,18 @@ ...@@ -55,18 +55,18 @@
autoHeight: true, autoHeight: true,
centeredSlides: true, centeredSlides: true,
centeredSlidesBounds: true, centeredSlidesBounds: true,
initialSlide: 1 initialSlide: 0
}, },
current: 1, current: 0,
tabs: [], tabs: [],
loading: false, loading: false,
timer: null timer: null
} }
}, },
async onLoad() { async onLoad() {
this.loading = true this.loading = true
await this.requestData() await this.requestData()
this.loading = false this.loading = false
}, },
async onPullDownRefresh() { async onPullDownRefresh() {
await this.requestData() await this.requestData()
...@@ -118,8 +118,7 @@ ...@@ -118,8 +118,7 @@
this.match_map.clear() this.match_map.clear()
} }
this.tabs.length = 0 this.tabs.length = 0
var followList = await followHelper.getFollowList()
this.match_map.set("关注", followList)
let zhongyao = [] let zhongyao = []
let wancheng = [] let wancheng = []
...@@ -138,6 +137,8 @@ ...@@ -138,6 +137,8 @@
this.match_map.set("重要", zhongyao) this.match_map.set("重要", zhongyao)
this.match_map.set("完赛", wancheng) this.match_map.set("完赛", wancheng)
var followList = await followHelper.getFollowList()
this.match_map.set("关注", followList)
for (let m of matchs) { for (let m of matchs) {
if (m.GameName) { if (m.GameName) {
...@@ -175,9 +176,9 @@ ...@@ -175,9 +176,9 @@
console.log(list[index]) console.log(list[index])
}, },
async startRealTime(ref) { async startRealTime(ref) {
if(this.current != 1) { if (this.current != 1) {
return return
} }
let query_data = `query{ let query_data = `query{
...@@ -265,16 +266,16 @@ ...@@ -265,16 +266,16 @@
onSwiperChange(swiper) { onSwiperChange(swiper) {
this.current = this.$refs.zSwiper.swiper.activeIndex this.current = this.$refs.zSwiper.swiper.activeIndex
console.log("---》" + this.tabs[this.current] + "--" + this.match_map.get(this.tabs[this.current])) console.log("---》" + this.tabs[this.current] + "--" + this.match_map.get(this.tabs[this.current]))
console.log('onSwiperChange:' + swiper.activeIndex) console.log('onSwiperChange:' + swiper.activeIndex)
var ref = this.$refs.MatchListRef[this.current] var ref = this.$refs.MatchListRef[this.current]
console.log(this.$refs.MatchListRef) console.log(this.$refs.MatchListRef)
if(this.current == 1) { if (this.current == 1) {
this.timer = setInterval(this.startRealTime(ref), 5 * 1000) this.timer = setInterval(this.startRealTime(ref), 5 * 1000)
} else { } else {
clearInterval(this.timer) clearInterval(this.timer)
} }
if (this.current === 0) { if (this.current === 0) {
var followList = followHelper.getFollowList() var followList = followHelper.getFollowList()
ref.onRefreshInfo(followList) ref.onRefreshInfo(followList)
......
<template> <template>
<view style="background-color: #F5F7FC; justify-content: center; height: 100vh; align-items: center;"> <view style="background-color: #F5F7FC; justify-content: center; height: 100vh; align-items: center;">
<view class="qh-u-header"> <view class="qh-u-header">
<text class="qh-u-title">我的</text>
<view>
<text class="qh-u-title">我的</text>
<text >设置</text>
</view>
<view <view
style="background-color: white; border-radius: 20rpx; style="background-color: white; border-radius: 20rpx;
...@@ -15,45 +20,14 @@ ...@@ -15,45 +20,14 @@
<text style="font-size: 36rpx; color: #333333; font-weight: 600;"> <text style="font-size: 36rpx; color: #333333; font-weight: 600;">
{{ this.hasLogin ? this.userName : '登陆/注册' }}</text> {{ this.hasLogin ? this.userName : '登陆/注册' }}</text>
<view style="margin-top: 15rpx;"> <view style="margin-top: 15rpx;">
<text style="font-size: 26rpx; color: #999999;">欢迎来到金球体育</text> <text style="font-size: 26rpx; color: #999999;">欢迎来到一定牛</text>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view style="background-color: white; border-radius: 10rpx;
margin-left: 34rpx; margin-right: 34rpx;
padding-left: 20rpx ; padding-right: 20rpx; margin-top: 10%; align-self: center;">
<view class="qh-list-c" @click="gotoSuggest()">
<view style="display: flex;">
<image src="../../static/mine_icons/mine_feedback_icon.png" style="width: 50rpx; height: 50rpx;" />
<text class="list-text">提建议/问题反馈</text>
</view>
<image src="../../static/mine_icons/mine_right_arrow.png" style="width: 40rpx; height: 40rpx;" />
</view>
<view class="qh-list-c" @tap="share">
<view style="display: flex;">
<image src="../../static/mine_icons/mine_share_icon.png" style="width: 50rpx; height: 50rpx;" />
<text class="list-text">分享给好友</text>
</view>
<image src="../../static/mine_icons/mine_right_arrow.png" style="width: 40rpx; height: 40rpx;" />
</view>
<view class="qh-list-c" @click="gotoSettings()">
<view style="display: flex;">
<image src="../../static/mine_icons/mine_settings_icon.png" style="width: 50rpx; height: 50rpx;" />
<text class="list-text">设置</text>
</view>
<image src="../../static/mine_icons/mine_right_arrow.png" style="width: 40rpx; height: 40rpx;" />
</view>
</view>
<view style="display: flex; justify-self: center; width: 100%; margin-top: 30rpx; justify-content: center;">
<view class="tip-text">在使用过程如遇问题,请咨询客服微信</view>
<view class="tip-text2" @click="copyweixin()">{{weixin}}</view>
</view>
</view> </view>
</template> </template>
...@@ -173,7 +147,7 @@ ...@@ -173,7 +147,7 @@
}, },
onLoad() { onLoad() {
}, },
onShow: function() { onShow: function() {
var userInfo = loginHelper.getUserInfo() var userInfo = loginHelper.getUserInfo()
if (userInfo) { if (userInfo) {
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!