wangfukang 22 hours ago
parent
commit
2f26a73952
  1. 16
      components/tab-bar/postList.vue
  2. 20
      components/tab-bar/release.vue
  3. 23
      components/tab-bar/tab-bar.vue

16
components/tab-bar/postList.vue

@ -263,23 +263,23 @@
} }
}, },
computed: { computed: {
isSocialArea() { useSocialText() {
return !!this.socialMode return !!this.socialMode
}, },
brandMainText() { brandMainText() {
return this.isSocialArea ? '同城二手' : '校园二手' return this.useSocialText ? '同城二手' : '校园二手'
}, },
brandSloganText() { brandSloganText() {
return this.isSocialArea ? '物尽其用 · 让同城更便捷' : '物尽其用 · 让校园更美好' return this.useSocialText ? '物尽其用 · 让同城更便捷' : '物尽其用 · 让校园更美好'
}, },
defaultUserName() { defaultUserName() {
return this.isSocialArea ? '同城好友' : '校园同学' return this.useSocialText ? '同城好友' : '校园同学'
}, },
defaultRegionName() { defaultRegionName() {
return this.isSocialArea ? '本区' : '本校' return this.useSocialText ? '本区' : '本校'
}, },
fishBadgeText() { fishBadgeText() {
return this.isSocialArea ? '同城二手' : '校园二手' return this.useSocialText ? '同城二手' : '校园二手'
}, },
categories() { categories() {
return this.baseCategories.concat(this.categoryList.map(item => item.name)) return this.baseCategories.concat(this.categoryList.map(item => item.name))
@ -715,7 +715,7 @@
}) })
}, },
async goPublish(type) { async goPublish(type) {
const verified = await this.ensureVerified(this.isSocialArea ? '发布二手信息' : '发布校园二手信息') const verified = await this.ensureVerified(this.useSocialText ? '发布二手信息' : '发布校园二手信息')
if (!verified) return if (!verified) return
uni.navigateTo({ uni.navigateTo({
url: '/package1/tabbar/fishRelease?type=' + (type || 'sell') url: '/package1/tabbar/fishRelease?type=' + (type || 'sell')
@ -728,7 +728,7 @@
}) })
}, },
async goFishSessions() { async goFishSessions() {
const verified = await this.ensureVerified(this.isSocialArea ? '查看二手聊天' : '查看校园二手聊天') const verified = await this.ensureVerified(this.useSocialText ? '查看二手聊天' : '查看校园二手聊天')
if (!verified) return if (!verified) return
uni.navigateTo({ uni.navigateTo({
url: '/package2/IdleTrad/sessionList' url: '/package2/IdleTrad/sessionList'

20
components/tab-bar/release.vue

@ -292,30 +292,30 @@
} }
}, },
computed: { computed: {
isSocialArea() { useSocialText() {
return !!this.socialMode return !!this.socialMode
}, },
brandTitle() { brandTitle() {
return this.isSocialArea ? '同城热榜' : '校园热榜' return this.useSocialText ? '同频热榜' : '校园热榜'
}, },
brandSubtitle() { brandSubtitle() {
return this.isSocialArea ? '每天都有新鲜事,同城都在聊' : '每天都有新鲜事,全校都在聊' return this.useSocialText ? '每天都有新鲜事,同频都在聊' : '每天都有新鲜事,全校都在聊'
}, },
searchPlaceholder() { searchPlaceholder() {
return this.isSocialArea ? '搜索同城热议、关键词' : '搜索校园热议、关键词' return this.useSocialText ? '搜索同频热议、关键词' : '搜索校园热议、关键词'
}, },
circleName() { circleName() {
return this.isSocialArea ? '同城圈' : '校园圈' return this.useSocialText ? '同频圈' : '校园圈'
}, },
defaultUserName() { defaultUserName() {
return this.isSocialArea ? '半径好友' : '半径同学' return this.useSocialText ? '半径好友' : '半径同学'
}, },
displayChannels() { displayChannels() {
if (!this.isSocialArea) return this.channels if (!this.useSocialText) return this.channels
return this.channels.map((item) => { return this.channels.map((item) => {
const next = Object.assign({}, item) const next = Object.assign({}, item)
if (item.tone === 'wall') { if (item.tone === 'wall') {
next.name = '同城墙' next.name = '同频墙'
next.desc = '新鲜事' next.desc = '新鲜事'
} else if (item.tone === 'daily') { } else if (item.tone === 'daily') {
next.desc = '吃饭逛街' next.desc = '吃饭逛街'
@ -781,13 +781,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(this.isSocialArea ? '发布同城圈内容' : '发布校园圈内容') const ok = await this.ensureVerified(this.useSocialText ? '发布同频圈内容' : '发布校园圈内容')
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(this.isSocialArea ? '联系同城圈搭子' : '联系校园圈搭子') const ok = await this.ensureVerified(this.useSocialText ? '联系同频圈搭子' : '联系校园圈搭子')
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

23
components/tab-bar/tab-bar.vue

@ -95,6 +95,10 @@
type: Boolean, type: Boolean,
default: false default: false
}, },
socialTextMode: {
type: Boolean,
default: false
},
socialDeliveryEnabled: { socialDeliveryEnabled: {
type: Boolean, type: Boolean,
default: true default: true
@ -102,15 +106,16 @@
}, },
computed: { computed: {
displayTabs() { displayTabs() {
if (!this.socialMode) return this.tabList const tabs = this.socialMode
return this.tabList ? this.tabList.filter((item) => this.socialDeliveryEnabled || item.pageIndex !== 1)
.filter((item) => this.socialDeliveryEnabled || item.pageIndex !== 1) : this.tabList
.map((item) => { if (!this.socialTextMode) return tabs
if (item.pageIndex === 2) { return tabs.map((item) => {
return Object.assign({}, item, { tabName: '同城圈' }) if (item.pageIndex === 2) {
} return Object.assign({}, item, { tabName: '同城圈' })
return item }
}) return item
})
} }
}, },
watch: { watch: {

Loading…
Cancel
Save