wangfukang 2 weeks ago
parent
commit
e7d3a0f376
  1. 1096
      components/tab-bar/homeGroupPending.vue
  2. 16
      components/tab-bar/myCenter.vue
  3. 40
      components/tab-bar/postList.vue
  4. 63
      components/tab-bar/release.vue
  5. 82
      components/tab-bar/tab-bar.vue

1096
components/tab-bar/homeGroupPending.vue

File diff suppressed because it is too large

16
components/tab-bar/myCenter.vue

@ -16,7 +16,7 @@
</view> </view>
<view class="school-row" hover-class="tap-soft" hover-stay-time="80" <view class="school-row" hover-class="tap-soft" hover-stay-time="80"
@tap.stop="navigatorTo('qiehuan')">{{schoolName1}} </view> @tap.stop="navigatorTo('qiehuan')">{{schoolName1}} </view>
<view class="identity-pill" @tap.stop="navigatorTo('qiehuan')">切换</view> <view class="identity-pill" @tap.stop="navigatorTo('qiehuan')">切换区</view>
</view> </view>
</view> </view>
<!-- <view class="ticket-card" hover-class="tap-soft" hover-stay-time="80" @tap="navigatorTo('blindBox')"> <!-- <view class="ticket-card" hover-class="tap-soft" hover-stay-time="80" @tap="navigatorTo('blindBox')">
@ -42,7 +42,7 @@
<view class="legal-btn fade-up" hover-class="tap-soft" hover-stay-time="80" <view class="legal-btn fade-up" hover-class="tap-soft" hover-stay-time="80"
style="animation-delay: 280ms;" @tap="openOfficialAccountPopup"> style="animation-delay: 280ms;" @tap="openOfficialAccountPopup">
<text class="legal-dot"></text> <text class="legal-dot"></text>
<text>关注公众号可实时接收ie/校园/二手消息</text> <text>关注公众号可实时接收ie//二手消息</text>
<text class="legal-arrow"></text> <text class="legal-arrow"></text>
</view> </view>
@ -155,7 +155,7 @@
<view class="official-account-card" @tap.stop> <view class="official-account-card" @tap.stop>
<view class="official-account-close" @tap="closeOfficialAccountPopup">×</view> <view class="official-account-close" @tap="closeOfficialAccountPopup">×</view>
<view class="official-account-title">关注公众号</view> <view class="official-account-title">关注公众号</view>
<view class="official-account-desc">关注后可实时接收 i/e校园校园二手消息提醒</view> <view class="official-account-desc">关注后可实时接收 i/e二手消息提醒</view>
<image <image
show-menu-by-longpress show-menu-by-longpress
class="official-account-qr" class="official-account-qr"
@ -221,13 +221,13 @@
<view class="area-popup-glow area-popup-glow-a"></view> <view class="area-popup-glow area-popup-glow-a"></view>
<view class="area-popup-glow area-popup-glow-b"></view> <view class="area-popup-glow area-popup-glow-b"></view>
<view class="campus-area-header"> <view class="campus-area-header">
<view class="campus-area-kicker">选择你的校园半径</view> <view class="campus-area-kicker">选择你的区域半径</view>
<view class="campus-area-title">你现在在哪个</view> <view class="campus-area-title">你现在在哪个区</view>
<view class="campus-area-subtitle">选定后会优先展示附近同学正在拼的内容</view> <view class="campus-area-subtitle">选定后会优先展示附近同学正在拼的内容</view>
</view> </view>
<view class="campus-area-search"> <view class="campus-area-search">
<text class="area-search-icon"></text> <text class="area-search-icon"></text>
<input v-model="areaKeyword" confirm-type="search" placeholder="搜索学校 / 校区 / 区域" <input v-model="areaKeyword" confirm-type="search" placeholder="搜索区域、学校"
placeholder-class="area-search-placeholder" /> placeholder-class="area-search-placeholder" />
</view> </view>
<scroll-view scroll-y class="campus-area-list"> <scroll-view scroll-y class="campus-area-list">
@ -240,7 +240,7 @@
<view class="area-item-action">进入</view> <view class="area-item-action">进入</view>
</view> </view>
<view class="campus-area-empty" v-if="filteredAreaList.length === 0"> <view class="campus-area-empty" v-if="filteredAreaList.length === 0">
<view class="area-empty-title">没找到这个</view> <view class="area-empty-title">没找到这个区</view>
<view class="area-empty-desc">换个关键词试试比如学校简称或区域名</view> <view class="area-empty-desc">换个关键词试试比如学校简称或区域名</view>
</view> </view>
</scroll-view> </scroll-view>
@ -387,7 +387,7 @@
action: 'planet' action: 'planet'
}, { }, {
type: 'school', type: 'school',
title: '学院奖金', title: '排位奖金',
subPre: '', subPre: '',
subEm: '有现金奖励哦', subEm: '有现金奖励哦',
subPost: '', subPost: '',

40
components/tab-bar/postList.vue

@ -3,11 +3,11 @@
<view class="fixed-header" :style="{ paddingTop: statusBarTop + 'px' }"> <view class="fixed-header" :style="{ paddingTop: statusBarTop + 'px' }">
<view class="brand-row"> <view class="brand-row">
<view class="brand"> <view class="brand">
<text class="brand-main">校园二手</text> <text class="brand-main">{{brandMainText}}</text>
<text class="brand-sub">鱼塘</text> <text class="brand-sub">鱼塘</text>
<view class="brand-fish"></view> <view class="brand-fish"></view>
</view> </view>
<view class="brand-slogan">物尽其用 · 让校园更美好</view> <view class="brand-slogan">{{brandSloganText}}</view>
</view> </view>
<view class="search-bar"> <view class="search-bar">
<uni-icons type="search" size="19" color="#8d9693"></uni-icons> <uni-icons type="search" size="19" color="#8d9693"></uni-icons>
@ -204,6 +204,12 @@
} }
export default { export default {
props: {
socialMode: {
type: Boolean,
default: false
}
},
data() { data() {
return { return {
menuButtonInfo: {}, menuButtonInfo: {},
@ -257,6 +263,24 @@
} }
}, },
computed: { computed: {
isSocialArea() {
return !!this.socialMode
},
brandMainText() {
return this.isSocialArea ? '同城二手' : '校园二手'
},
brandSloganText() {
return this.isSocialArea ? '物尽其用 · 让同城更便捷' : '物尽其用 · 让校园更美好'
},
defaultUserName() {
return this.isSocialArea ? '同城好友' : '校园同学'
},
defaultRegionName() {
return this.isSocialArea ? '本区' : '本校'
},
fishBadgeText() {
return this.isSocialArea ? '同城二手' : '校园二手'
},
categories() { categories() {
return this.baseCategories.concat(this.categoryList.map(item => item.name)) return this.baseCategories.concat(this.categoryList.map(item => item.name))
}, },
@ -580,7 +604,7 @@
}, },
normalizeRecords(records, isWant) { normalizeRecords(records, isWant) {
const area = this.getArea() const area = this.getArea()
const fallbackRegionName = area.title || area.name || uni.getStorageSync('schoolName') || '本校' const fallbackRegionName = area.title || area.name || uni.getStorageSync('schoolName') || this.defaultRegionName
return (Array.isArray(records) ? records : []).map(item => { return (Array.isArray(records) ? records : []).map(item => {
const images = this.parseJsonList(item.images) const images = this.parseJsonList(item.images)
const tags = this.parseJsonList(item.tags) const tags = this.parseJsonList(item.tags)
@ -593,9 +617,9 @@
originalPrice: item.originPrice, originalPrice: item.originPrice,
xiangyao: item.likeCount || 0, xiangyao: item.likeCount || 0,
browseCount: item.browseCount || 0, browseCount: item.browseCount || 0,
distance: item.distance || '本校', distance: item.distance || this.defaultRegionName,
icon: item.userAvatar || 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/f7227759d693497a8beab87ff437a875.png', icon: item.userAvatar || 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/f7227759d693497a8beab87ff437a875.png',
shopName: item.userName || '校园同学', shopName: item.userName || this.defaultUserName,
regionName: item.regionName || item.schoolName || item.areaName || fallbackRegionName, regionName: item.regionName || item.schoolName || item.areaName || fallbackRegionName,
tags: tags.length ? tags : (item.negotiable == 1 ? ['可小刀'] : []), tags: tags.length ? tags : (item.negotiable == 1 ? ['可小刀'] : []),
category: item.categoryName || '', category: item.categoryName || '',
@ -691,7 +715,7 @@
}) })
}, },
async goPublish(type) { async goPublish(type) {
const verified = await this.ensureVerified('发布校园二手信息') const verified = await this.ensureVerified(this.isSocialArea ? '发布二手信息' : '发布校园二手信息')
if (!verified) return if (!verified) return
uni.navigateTo({ uni.navigateTo({
url: '/package1/tabbar/fishRelease?type=' + (type || 'sell') url: '/package1/tabbar/fishRelease?type=' + (type || 'sell')
@ -704,7 +728,7 @@
}) })
}, },
async goFishSessions() { async goFishSessions() {
const verified = await this.ensureVerified('查看校园二手聊天') const verified = await this.ensureVerified(this.isSocialArea ? '查看二手聊天' : '查看校园二手聊天')
if (!verified) return if (!verified) return
uni.navigateTo({ uni.navigateTo({
url: '/package2/IdleTrad/sessionList' url: '/package2/IdleTrad/sessionList'
@ -723,7 +747,7 @@
profile: profile || {}, profile: profile || {},
actionText, actionText,
authDialog: { authDialog: {
badge: '校园二手', badge: this.fishBadgeText,
title: '实名认证', title: '实名认证',
content: actionText + '前需完成实名认证。半径里不会存储您的实名信息。', content: actionText + '前需完成实名认证。半径里不会存储您的实名信息。',
steps: [] steps: []

63
components/tab-bar/release.vue

@ -1,15 +1,15 @@
<template> <template>
<view class="campus-page"> <view class="campus-page">
<view class="header" :style="{ paddingTop: statusBarHeight + 'px' }"> <view class="header" :style="{ paddingTop: statusBarHeight + 'px' }">
<view class="brand-line"> <view class="brand-line">
<text class="brand">校园热榜</text> <text class="brand">{{brandTitle}}</text>
<text class="eating">热议中</text> <text class="eating">热议中</text>
</view> </view>
<view class="subtitle">每天都有新鲜事全校都在聊</view> <view class="subtitle">{{brandSubtitle}}</view>
<view class="search-line"> <view class="search-line">
<view class="search-box"> <view class="search-box">
<uni-icons type="search" size="19" color="#8a9692"></uni-icons> <uni-icons type="search" size="19" color="#8a9692"></uni-icons>
<input class="search-input" v-model.trim="keyword" placeholder="搜索校园热议、关键词" placeholder-class="placeholder" confirm-type="search" @confirm="search" /> <input class="search-input" v-model.trim="keyword" :placeholder="searchPlaceholder" placeholder-class="placeholder" confirm-type="search" @confirm="search" />
<view class="search-button" @tap="search">搜索</view> <view class="search-button" @tap="search">搜索</view>
</view> </view>
<view class="release-fab" @tap="goPublish"> <view class="release-fab" @tap="goPublish">
@ -36,7 +36,7 @@
<view <view
class="category-card" class="category-card"
:class="{ active: activeCategory === item.tone }" :class="{ active: activeCategory === item.tone }"
v-for="item in channels" v-for="item in displayChannels"
:key="item.tone" :key="item.tone"
@tap="selectCategory(item.tone)" @tap="selectCategory(item.tone)"
> >
@ -107,7 +107,7 @@
<image class="avatar" :src="displayAvatar(item)" mode="aspectFill"></image> <image class="avatar" :src="displayAvatar(item)" mode="aspectFill"></image>
<view class="author-main"> <view class="author-main">
<view class="author">{{displayName(item)}}</view> <view class="author">{{displayName(item)}}</view>
<view class="time">{{item.createTime || ''}} · <text class="time-category">{{item.categoryName || '本'}}</text></view> <view class="time">{{item.createTime || ''}} · <text class="time-category">{{item.categoryName || '本区域'}}</text></view>
</view> </view>
<view class="partner-action" v-if="canUsePartnerChat(item)" @tap.stop="goChat(item)">搭一下</view> <view class="partner-action" v-if="canUsePartnerChat(item)" @tap.stop="goChat(item)">搭一下</view>
</view> </view>
@ -249,6 +249,12 @@
const releaseIconDownloading = {} const releaseIconDownloading = {}
export default { export default {
props: {
socialMode: {
type: Boolean,
default: false
}
},
data() { data() {
return { return {
statusBarHeight: 24, statusBarHeight: 24,
@ -285,6 +291,37 @@
} }
}, },
computed: { computed: {
isSocialArea() {
return !!this.socialMode
},
brandTitle() {
return this.isSocialArea ? '同城热榜' : '校园热榜'
},
brandSubtitle() {
return this.isSocialArea ? '每天都有新鲜事,同城都在聊' : '每天都有新鲜事,全校都在聊'
},
searchPlaceholder() {
return this.isSocialArea ? '搜索同城热议、关键词' : '搜索校园热议、关键词'
},
circleName() {
return this.isSocialArea ? '同城圈' : '校园圈'
},
defaultUserName() {
return this.isSocialArea ? '半径好友' : '半径同学'
},
displayChannels() {
if (!this.isSocialArea) return this.channels
return this.channels.map((item) => {
const next = Object.assign({}, item)
if (item.tone === 'wall') {
next.name = '同城墙'
next.desc = '新鲜事'
} else if (item.tone === 'daily') {
next.desc = '吃饭逛街'
}
return next
})
},
headerHeight() { headerHeight() {
return this.statusBarHeight + (uni.upx2px ? uni.upx2px(204) : 102) return this.statusBarHeight + (uni.upx2px ? uni.upx2px(204) : 102)
}, },
@ -305,8 +342,8 @@
}, },
sectionTitle() { sectionTitle() {
if (this.activeCategory === 'mine') return '我的圈子' if (this.activeCategory === 'mine') return '我的圈子'
const item = this.channels.find(row => row.tone === this.activeCategory) const item = this.displayChannels.find(row => row.tone === this.activeCategory)
return item ? item.name : '校园圈' return item ? item.name : this.circleName
}, },
sectionSubTitle() { sectionSubTitle() {
if (this.postSortType === 'hot') return '按点赞和评论综合热度排序' if (this.postSortType === 'hot') return '按点赞和评论综合热度排序'
@ -696,7 +733,7 @@
try { return JSON.parse(item.tags) || [] } catch (e) { return [] } try { return JSON.parse(item.tags) || [] } catch (e) { return [] }
}, },
displayName(item) { displayName(item) {
return item && item.userName ? item.userName : '半径同学' return item && item.userName ? item.userName : this.defaultUserName
}, },
isAnonymousItem(item) { isAnonymousItem(item) {
if (!item) return false if (!item) return false
@ -709,6 +746,8 @@
|| item.isAnonymous === '1' || item.isAnonymous === '1'
|| item.isAnonymous === 'true' || item.isAnonymous === 'true'
|| item.userName === '半径同学' || item.userName === '半径同学'
|| item.userName === '半径好友'
|| item.userName === this.defaultUserName
}, },
displayAvatar(item) { displayAvatar(item) {
if (this.isAnonymousItem(item)) return this.defaultAvatar if (this.isAnonymousItem(item)) return this.defaultAvatar
@ -734,13 +773,13 @@
uni.navigateTo({ url: '/package1/post/postDetail?id=' + item.id + '&source=campus' }) uni.navigateTo({ url: '/package1/post/postDetail?id=' + item.id + '&source=campus' })
}, },
async goPublish() { async goPublish() {
const ok = await this.ensureVerified('发布校园圈内容') const ok = await this.ensureVerified(this.isSocialArea ? '发布同城圈内容' : '发布校园圈内容')
if (!ok) return if (!ok) return
uni.navigateTo({ url: '/package1/campus/campusRelease?type=' + (this.activeCategory === 'wall' || this.activeCategory === 'mine' ? 'wall' : this.activeCategory) }) uni.navigateTo({ url: '/package1/campus/campusRelease?type=' + (this.activeCategory === 'wall' || this.activeCategory === 'mine' ? 'wall' : this.activeCategory) })
}, },
async goChat(item) { async goChat(item) {
if (!this.canUsePartnerChat(item)) return if (!this.canUsePartnerChat(item)) return
const ok = await this.ensureVerified('联系校园圈搭子') const ok = await this.ensureVerified(this.isSocialArea ? '联系同城圈搭子' : '联系校园圈搭子')
if (!ok) return if (!ok) return
createCampusChatSession(item.id).then(session => { createCampusChatSession(item.id).then(session => {
if (!session || !session.sessionId) return if (!session || !session.sessionId) return
@ -797,7 +836,7 @@
return ensureIeVerifiedBeforeAction({ return ensureIeVerifiedBeforeAction({
profile: profile || {}, profile: profile || {},
actionText, actionText,
authDialog: { badge: '校园圈', title: '实名认证', desc: actionText + '前需完成实名认证' }, authDialog: { badge: this.circleName, title: '实名认证', desc: actionText + '前需完成实名认证' },
reload: getIeProfile, reload: getIeProfile,
requireProfileSetup: false requireProfileSetup: false
}) })

82
components/tab-bar/tab-bar.vue

@ -1,25 +1,25 @@
<template> <template>
<view class="tabbar-box"> <view class="tabbar-box">
<view class="bar-box" @click="clickBar(index)" v-for="(item,index) in tabList" :key="index" hover-class="none"> <view class="bar-box" @click="clickBar(index)" v-for="(item,index) in displayTabs" :key="item.pageIndex" hover-class="none">
<view class="red-dot" v-if="index == 0 && indexZhipaiCount > 0"> <view class="red-dot" v-if="item.pageIndex == 0 && indexZhipaiCount > 0">
{{formatBadgeCount(indexZhipaiCount)}} {{formatBadgeCount(indexZhipaiCount)}}
</view> </view>
<view class="red-dot" v-if="index == 1 && indexWorkerCount > 0"> <view class="red-dot" v-if="item.pageIndex == 1 && indexWorkerCount > 0">
{{formatBadgeCount(indexWorkerCount)}} {{formatBadgeCount(indexWorkerCount)}}
</view> </view>
<view class="red-dot" v-if="index == 2 && indexCampusCount > 0"> <view class="red-dot" v-if="item.pageIndex == 2 && indexCampusCount > 0">
{{formatBadgeCount(indexCampusCount)}} {{formatBadgeCount(indexCampusCount)}}
</view> </view>
<view class="red-dot" v-if="index == 3 && indexFishCount > 0"> <view class="red-dot" v-if="item.pageIndex == 3 && indexFishCount > 0">
{{formatBadgeCount(indexFishCount)}} {{formatBadgeCount(indexFishCount)}}
</view> </view>
<view class="red-dot" v-if="index == 4 && indexMyCount > 0"> <view class="red-dot" v-if="item.pageIndex == 4 && indexMyCount > 0">
{{formatBadgeCount(indexMyCount)}} {{formatBadgeCount(indexMyCount)}}
</view> </view>
<view class="img-box" v-if="index != 2" :class="item.shaking?'shaking':''"> <view class="img-box" v-if="item.pageIndex != 2" :class="item.shaking?'shaking':''">
<img :src="item.isCheck?item.tabIconSelect:item.tabIcon" alt="" /> <img :src="item.isCheck?item.tabIconSelect:item.tabIcon" alt="" />
</view> </view>
<view class="img-box uni-tab-icon" v-if="index == 2" :class="item.shaking?'shaking':''"> <view class="img-box uni-tab-icon" v-if="item.pageIndex == 2" :class="item.shaking?'shaking':''">
<uni-icons type="pyq" size="25" :color="item.isCheck?'#48D1CC':'#30363d'"></uni-icons> <uni-icons type="pyq" size="25" :color="item.isCheck?'#48D1CC':'#30363d'"></uni-icons>
</view> </view>
<view class="text-box" :style="{color:item.isCheck?'#48D1CC':'#000'}"> <view class="text-box" :style="{color:item.isCheck?'#48D1CC':'#000'}">
@ -35,30 +35,36 @@
return { return {
tabList: [{ tabList: [{
tabName: '首页', tabName: '首页',
pageIndex: 0,
tabIcon: '/static/images/tabbar/shouye1.png', tabIcon: '/static/images/tabbar/shouye1.png',
tabIconSelect: '/static/images/tabbar/shouye.png', tabIconSelect: '/static/images/tabbar/shouye.png',
isCheck: true, isCheck: true,
shaking:false shaking:false
}, { }, {
tabName: '配送', tabName: '配送',
pageIndex: 1,
hideInSocial: true,
tabIcon: '/static/images/tabbar/peisong1.png', tabIcon: '/static/images/tabbar/peisong1.png',
tabIconSelect: '/static/images/tabbar/peisong.png', tabIconSelect: '/static/images/tabbar/peisong.png',
isCheck: false, isCheck: false,
shaking:false shaking:false
}, { }, {
tabName: '校园圈', tabName: '校园圈',
pageIndex: 2,
tabIcon: '/static/images/tabbar/xiaoyuan.png', tabIcon: '/static/images/tabbar/xiaoyuan.png',
tabIconSelect: '', tabIconSelect: '',
isCheck: false, isCheck: false,
shaking:false shaking:false
}, { }, {
tabName: '鱼塘', tabName: '鱼塘',
pageIndex: 3,
tabIcon: '/static/images/tabbar/xianyu1.png', tabIcon: '/static/images/tabbar/xianyu1.png',
tabIconSelect: '/static/images/tabbar/xianyu.png', tabIconSelect: '/static/images/tabbar/xianyu.png',
isCheck: false, isCheck: false,
shaking:false shaking:false
}, { }, {
tabName: '我的', tabName: '我的',
pageIndex: 4,
tabIcon: '/static/images/tabbar/wode1.png', tabIcon: '/static/images/tabbar/wode1.png',
tabIconSelect: '/static/images/tabbar/wode.png', tabIconSelect: '/static/images/tabbar/wode.png',
isCheck: false, isCheck: false,
@ -81,22 +87,36 @@
type: Number, type: Number,
default: true default: true
}, },
//tab //tab
currentIndex: { currentIndex: {
type: Number, type: Number,
default: 0 default: 0
},
socialMode: {
type: Boolean,
default: false
}
},
computed: {
displayTabs() {
if (!this.socialMode) return this.tabList
return this.tabList
.filter((item) => !item.hideInSocial)
.map((item) => {
if (item.pageIndex === 2) {
return Object.assign({}, item, { tabName: '同城圈' })
}
return item
})
} }
}, },
watch: { watch: {
//currentIndex //currentIndex
currentIndex(newVal) { currentIndex(newVal) {
for (let i = 0; i < this.tabList.length; i++) { this.syncTabCheck(newVal)
if (newVal == i) { },
this.tabList[i].isCheck = true socialMode() {
} else { this.syncTabCheck(this.currentIndex)
this.tabList[i].isCheck = false
}
}
} }
}, },
mounted() { mounted() {
@ -104,6 +124,7 @@
uni.$on('fishUnreadChange', this.setFishUnreadCounts) uni.$on('fishUnreadChange', this.setFishUnreadCounts)
uni.$on('campusUnreadChange', this.setCampusUnreadCounts) uni.$on('campusUnreadChange', this.setCampusUnreadCounts)
this.setDeliveryStatusCounts(uni.getStorageSync('deliveryStatusCounts') || {}) this.setDeliveryStatusCounts(uni.getStorageSync('deliveryStatusCounts') || {})
this.syncTabCheck(this.currentIndex)
}, },
beforeDestroy() { beforeDestroy() {
uni.$off('deliveryStatusCountsChange', this.setDeliveryStatusCounts) uni.$off('deliveryStatusCountsChange', this.setDeliveryStatusCounts)
@ -111,6 +132,11 @@
uni.$off('campusUnreadChange', this.setCampusUnreadCounts) uni.$off('campusUnreadChange', this.setCampusUnreadCounts)
}, },
methods: { methods: {
syncTabCheck(pageIndex) {
for (let i = 0; i < this.tabList.length; i++) {
this.tabList[i].isCheck = this.tabList[i].pageIndex == pageIndex
}
},
hasLogin() { hasLogin() {
const token = uni.getStorageSync('hiver_token') const token = uni.getStorageSync('hiver_token')
return !!(token && typeof token === 'string' && token.trim() && token !== 'null' && token !== 'undefined') return !!(token && typeof token === 'string' && token.trim() && token !== 'null' && token !== 'undefined')
@ -149,25 +175,19 @@
} }
this.getWorkerCounts() this.getWorkerCounts()
}, },
//tab //tab
clickBar(index) { clickBar(index) {
for (let i = 0; i < this.tabList.length; i++) { const item = this.displayTabs[index]
if (index == i) { if (!item) return
this.$emit('tab-index', i); const pageIndex = item.pageIndex
this.$emit('tab-index', pageIndex);
this.getWorkerCounts() this.getWorkerCounts()
this.tabList[i].isCheck = true this.syncTabCheck(pageIndex)
if (this.tabList[i].shaking) return if (item.shaking) return
item.shaking = true
this.tabList[i].shaking = true
setTimeout(() => { setTimeout(() => {
this.tabList[i].shaking = false item.shaking = false
}, 500) }, 500)
} else {
this.tabList[i].isCheck = false
this.$forceUpdate()
}
}
}, },
getWorkerCounts(){ getWorkerCounts(){
const now = Date.now() const now = Date.now()

Loading…
Cancel
Save