wangfukang 2 days ago
parent
commit
83bdad48f3
  1. 26
      package5/planet/adventure.vue
  2. 18
      package5/planet/index.vue

26
package5/planet/adventure.vue

@ -7,7 +7,7 @@
<scroll-view scroll-y class="page" :style="{paddingTop: (navHeight + 10) + 'px'}">
<view class="hero" v-if="isDailyMode">
<view class="hero-kicker">{{isSocialArea ? 'FRIEND ROCKET' : 'COLLEGE ROCKET'}}</view>
<view class="hero-kicker">{{useSocialText ? 'FRIEND ROCKET' : 'COLLEGE ROCKET'}}</view>
<view class="hero-title">{{pageTitle}}</view>
<view class="college-picker" @tap="openCollegePicker">
<text>{{college ? ('已选择' + teamLabel) : ('先选择' + teamLabel)}}</text>
@ -231,6 +231,7 @@
<script>
import { requireLoginToCurrentPage } from '@/utils/authRedirect.js'
import { buildHomeSharePath } from '@/utils/sharePath.js'
import { resolveCampusTextEnabled, shouldUseSocialText } from '@/utils/areaTextMode.js'
export default {
data() {
return {
@ -277,33 +278,37 @@
personalRewardList: [],
collegeRewardList: []
},
areaKind: 1
areaKind: 1,
campusTextEnabled: 0
}
},
computed: {
isSocialArea() {
return Number(this.areaKind) === 2
},
useSocialText() {
return shouldUseSocialText(this.areaKind, this.campusTextEnabled)
},
rankEventName() {
return this.isSocialArea ? '同城排位赛' : '学院排位赛'
return this.useSocialText ? '同城排位赛' : '学院排位赛'
},
teamLabel() {
return this.isSocialArea ? '战队' : '学院'
return this.useSocialText ? '战队' : '学院'
},
regionLabel() {
return this.isSocialArea ? '区域' : '校区'
return this.useSocialText ? '区域' : '校区'
},
anonymousUserLabel() {
return this.isSocialArea ? '匿名好友' : '匿名同学'
return this.useSocialText ? '匿名好友' : '匿名同学'
},
mysteryTeamLabel() {
return this.isSocialArea ? '神秘战队' : '神秘学院'
return this.useSocialText ? '神秘战队' : '神秘学院'
},
unknownTeamLabel() {
return this.isSocialArea ? '未知战队' : '未知学院'
return this.useSocialText ? '未知战队' : '未知学院'
},
defaultTeamShortName() {
return this.isSocialArea ? '好友战队' : '学院战队'
return this.useSocialText ? '好友战队' : '学院战队'
},
collegeName() {
return this.college || ('我的' + this.teamLabel)
@ -325,7 +330,7 @@
heroSub() {
if (this.isPkMode) return '同一房间使用完全一致的卡牌布局。每人只有一次机会,退出或失败都会记录成绩。'
if (this.isChallengeMode) return '复刻好友通关布局,挑战同一组卡牌,结束后会显示领先或落后秒数。'
return this.isSocialArea
return this.useSocialText
? '21:30结算战队榜券奖励,前三名战队参与者每人得3/2/1张星球券;个人最快通关前五名可获得现金奖励5/4/3/2/1元。'
: '21:30结算学院榜券奖励,前三名学院参与者每人得3/2/1张星球券;个人最快通关前五名可获得现金奖励5/4/3/2/1元。'
},
@ -547,6 +552,7 @@
}
const kind = area ? Number(area.areaKind) : 1
this.areaKind = kind === 2 ? 2 : 1
this.campusTextEnabled = resolveCampusTextEnabled(area)
},
initNavHeight() {
try {

18
package5/planet/index.vue

@ -92,7 +92,7 @@
id="guide-adventure"
class="guide-anchor-wrap"
:class="{'guide-focus-target': guideFocus.key === 'adventure'}">
<planet-adventure-entry :social-mode="isSocialArea" @start="goAdventure" @arena="goArena"></planet-adventure-entry>
<planet-adventure-entry :social-mode="useSocialText" @start="goAdventure" @arena="goArena"></planet-adventure-entry>
</view>
<view
@ -316,6 +316,7 @@
import planetAdventureEntry from '@/package5/components/planet/planet-adventure-entry.vue'
import { buildHomeSharePath } from '@/utils/sharePath.js'
import { requireLoginToCurrentPage } from '@/utils/authRedirect.js'
import { resolveCampusTextEnabled, shouldUseSocialText } from '@/utils/areaTextMode.js'
const SHARE_TARGET_PATH = '/package5/planet/index'
@ -376,6 +377,7 @@
taskDrawerVisible: false,
guidePausedStep: null,
areaKind: 1,
campusTextEnabled: 0,
guideFocus: {
show: false,
key: '',
@ -402,11 +404,14 @@
isSocialArea() {
return Number(this.areaKind) === 2
},
useSocialText() {
return shouldUseSocialText(this.areaKind, this.campusTextEnabled)
},
rankEventName() {
return this.isSocialArea ? '同城排位赛' : '学院排位赛'
return this.useSocialText ? '同城排位赛' : '学院排位赛'
},
teamLabel() {
return this.isSocialArea ? '战队' : '学院'
return this.useSocialText ? '战队' : '学院'
},
stars() {
const arr = []
@ -450,7 +455,7 @@
key: 'adventure',
icon: '赛',
name: this.rankEventName + '赢现金',
desc: this.isSocialArea ? '为战队冲榜,个人排名也有奖励' : '为学院冲榜,个人排名也有奖励'
desc: this.useSocialText ? '为战队冲榜,个人排名也有奖励' : '为学院冲榜,个人排名也有奖励'
},
{
key: 'pk',
@ -1220,10 +1225,11 @@
}
const kind = area ? Number(area.areaKind) : 1
this.areaKind = kind === 2 ? 2 : 1
this.campusTextEnabled = resolveCampusTextEnabled(area)
},
onRandomSearch() {
this.startSearch('/app/planet/search/random', {}, {
nickname: this.isSocialArea ? '随机同城玩家' : '随机同校区玩家'
nickname: this.useSocialText ? '随机同城玩家' : '随机同校区玩家'
})
},
onDailyCollect() {
@ -1250,7 +1256,7 @@
this.huntModal.phase = 'searching'
this.huntModal.result = null
this.huntModal.target = target || {
nickname: this.isSocialArea ? '同城玩家' : '同校区玩家'
nickname: this.useSocialText ? '同城玩家' : '同校区玩家'
}
setTimeout(() => { this.huntModal.phase = 'locking' }, 900)
setTimeout(() => { this.huntModal.phase = 'chasing' }, 1800)

Loading…
Cancel
Save