diff --git a/package1/components/planet/planet-header.vue b/package1/components/planet/planet-header.vue index 316777e..16ea179 100644 --- a/package1/components/planet/planet-header.vue +++ b/package1/components/planet/planet-header.vue @@ -599,18 +599,20 @@ .ph-pool { position: relative; text-align: center; - margin-top: 10rpx; - padding: 4rpx 22rpx 10rpx; - color: #FFF7B8; - border-radius: 999rpx; + margin-top: 8rpx; + padding: 2rpx 26rpx 8rpx; + color: #FF8A00; + border-radius: 36rpx; background: - radial-gradient(circle at 50% 0%, rgba(255,255,255,0.68), transparent 34%), - linear-gradient(135deg, rgba(255,214,92,0.28), rgba(255,122,89,0.1)); + radial-gradient(circle at 28% 18%, rgba(255,255,255,0.98), rgba(255,255,255,0.38) 34%, transparent 56%), + linear-gradient(145deg, rgba(255,255,255,0.88), rgba(255,246,205,0.72)); + border: 2rpx solid rgba(255,226,128,0.82); + box-shadow: + inset 0 0 0 2rpx rgba(255,255,255,0.72), + 0 12rpx 28rpx rgba(255,184,77,0.18); text-shadow: - 0 2rpx 0 #8A4A00, - 0 8rpx 20rpx rgba(255,145,35,0.48), - 0 0 34rpx rgba(255,224,138,0.8); - filter: drop-shadow(0 12rpx 24rpx rgba(255,145,35,0.26)); + 0 2rpx 0 rgba(255,255,255,0.9), + 0 8rpx 16rpx rgba(255,138,0,0.22); overflow: hidden; transform-origin: center center; } @@ -620,11 +622,11 @@ position: absolute; left: -80rpx; top: 0; - width: 56rpx; + width: 64rpx; height: 100%; - background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.92), rgba(255,255,255,0)); + background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.95), rgba(255,255,255,0)); transform: skewX(-18deg); - animation: poolShine 1.8s ease-in-out infinite; + animation: poolShine 2.1s ease-in-out infinite; } .ph-pool::after { @@ -633,10 +635,9 @@ left: 24rpx; right: 24rpx; bottom: 6rpx; - height: 10rpx; + height: 8rpx; border-radius: 999rpx; - background: radial-gradient(circle, rgba(255,184,77,0.78), rgba(255,184,77,0)); - filter: blur(4rpx); + background: linear-gradient(90deg, rgba(255,184,77,0), rgba(255,184,77,0.36), rgba(255,184,77,0)); } .ph-pool.bong { @@ -660,21 +661,23 @@ .ph-pool-symbol { position: relative; z-index: 1; - font-size: 42rpx; + font-size: 40rpx; font-weight: 900; - color: #FFE08A; + color: #FFB000; + vertical-align: 8rpx; } .ph-pool-num { position: relative; z-index: 1; - font-size: 98rpx; + font-size: 102rpx; font-weight: 900; font-family: DIN, sans-serif; letter-spacing: -2rpx; - background: linear-gradient(180deg, #FFFFFF 0%, #FFF4A8 34%, #FFB52F 76%, #F77719 100%); - -webkit-background-clip: text; - color: transparent; + color: #FF8A00; + text-shadow: + 0 3rpx 0 #FFF2B7, + 0 10rpx 18rpx rgba(255,122,0,0.24); } .ph-pool-label { diff --git a/package1/planet/adventure.vue b/package1/planet/adventure.vue index a1f6df0..f17194a 100644 --- a/package1/planet/adventure.vue +++ b/package1/planet/adventure.vue @@ -2,11 +2,11 @@ - 学院助推赛 + {{isDailyMode ? '学院助推赛' : 'PK局'}} - + COLLEGE ROCKET {{pageTitle}} @@ -22,7 +22,7 @@ {{heroSub}} - + 今日最快通关榜 学院荣耀 @@ -65,7 +65,7 @@ - 开始助推 + {{isDailyMode ? '开始游戏' : '开始PK'}} 先点这里,再开始消除卡牌 @@ -112,7 +112,7 @@ - 助推槽 {{slots.length}}/{{slotLimit}} + 消除槽 {{slots.length}}/{{slotLimit}} {{cell.icon}} @@ -133,8 +133,7 @@ {{modal.title}} {{modal.sub}} - 生成好友挑战卡 - + 知道了 @@ -193,9 +192,9 @@ roomId: '', challengeId: '', fixedSeed: '', + inviteCollege: '', pkInfo: null, challengeInfo: null, - shareChallenge: null, gloryList: [], moveCount: 0, buildingLevel: false, @@ -323,6 +322,7 @@ this.roomId = options.roomId || '' this.challengeId = options.challengeId || '' this.fixedSeed = options.seed ? decodeURIComponent(options.seed) : '' + this.inviteCollege = options.college ? decodeURIComponent(options.college) : '' if (!this.ensureLoginForShare()) return this.userId = uni.getStorageSync('id') || '' this.nickname = uni.getStorageSync('nickName') || uni.getStorageSync('nickname') || '' @@ -332,6 +332,7 @@ if (area) this.regionId = JSON.parse(area).id || '' } catch (e) {} this.college = uni.getStorageSync('planetCollege_' + this.regionId) || '' + if (this.isDailyMode && this.inviteCollege) this.college = this.inviteCollege this.loadColleges() this.loadHome() this.loadGlory() @@ -360,12 +361,6 @@ } }, onShareAppMessage() { - if (this.shareChallenge) { - return { - title: `我用${this.shareChallenge.durationSeconds}秒通关学院助推赛,你敢挑战吗?`, - path: '/package1/planet/adventure?mode=challenge&challengeId=' + this.shareChallenge.id - } - } if (this.isPkMode && this.roomId) { const roomName = (this.pkInfo && this.pkInfo.roomName) || '星球擂台' return { @@ -373,9 +368,10 @@ path: '/package1/planet/adventure?mode=pk&roomId=' + this.roomId } } + const collegeParam = this.college ? ('?college=' + encodeURIComponent(this.college)) : '' return { - title: '学院助推赛,来帮学院冲榜', - path: '/package1/planet/adventure' + title: this.college ? `来为${this.college}助力,冲学院助推榜!` : '学院助推赛,来帮学院冲榜', + path: '/package1/planet/adventure' + collegeParam } }, methods: { @@ -1138,7 +1134,7 @@ } this.refreshCardState() if (card.coverDepth > 0) { - this.tui.toast('这张卡被压住了') + this.tui.toast('这张卡被压住了',300) return } if (card.removed || card.selected) return @@ -1233,7 +1229,13 @@ }).then(res => { if (res.code == 200) { this.cleared = true - this.modal = { show: true, title: '助推成功', sub: `${this.collegeName} 获得 ${progress} 点推进值,晚上21:30争夺学院荣誉。`, challenge: true, duration } + this.modal = { + show: true, + title: '助推成功', + sub: `${this.collegeName} 获得 ${progress} 点推进值。分享给好友继续为学院助力,每个人都会随机生成自己的关卡。`, + invite: true, + duration + } this.loadHome() this.loadGlory() } else { @@ -1318,28 +1320,6 @@ closeModal() { this.modal.show = false }, - createChallenge() { - const duration = this.modal.duration || Math.max(1, Math.floor((Date.now() - this.startTs) / 1000)) - this.tui.request('/app/planet/adventure/challenge/create', 'POST', { - userId: this.userId, - regionId: this.regionId, - nickname: this.nickname, - avatar: this.avatar, - college: this.college, - durationSeconds: duration - }).then(res => { - if (res.code != 200 || !res.result) { - this.tui.toast(res.message) - return - } - this.shareChallenge = { - id: res.result.id, - durationSeconds: duration - } - this.modal.sub = `我用 ${duration} 秒通关学院助推赛,你敢挑战吗?点击下方按钮分享给好友。` - this.modal.challenge = false - }) - }, openCollegePicker() { this.collegeModal = true }, @@ -1481,7 +1461,7 @@ .timer-pill.warning { background: #FFF4D7; color: #D88400; box-shadow: 0 8rpx 22rpx rgba(216,132,0,0.16); } .timer-pill.danger { background: #FFE8E8; color: #F04444; box-shadow: 0 8rpx 24rpx rgba(240,68,68,0.2); } .arena-share { margin: 18rpx 0 0; height: 64rpx; line-height: 64rpx; border-radius: 999rpx; background: linear-gradient(135deg, #7C3AED, #38BDF8); color: #fff; font-size: 24rpx; font-weight: 900; box-shadow: 0 12rpx 26rpx rgba(124,58,237,.16); } - .arena-share:after, .challenge-share:after { border: 0; } + .arena-share:after, .invite-share:after { border: 0; } .start-strip { margin-top: 20rpx; padding: 20rpx 24rpx; border-radius: 28rpx; background: linear-gradient(135deg, #35D6A6, #4FB7FF); color: #fff; display: flex; align-items: center; justify-content: space-between; box-shadow: 0 14rpx 34rpx rgba(53,214,166,0.2); } .start-strip text:first-child { font-size: 30rpx; font-weight: 900; } .start-strip text:last-child { font-size: 22rpx; opacity: .88; } @@ -1517,8 +1497,7 @@ .modal-card { width: 100%; border-radius: 42rpx; background: #fff; padding: 42rpx; text-align: center; } .modal-title { font-size: 40rpx; font-weight: 900; } .modal-sub { margin: 18rpx 0 30rpx; color: #6B817D; font-size: 26rpx; line-height: 1.55; } - .challenge-btn { margin-bottom: 18rpx; height: 76rpx; line-height: 76rpx; text-align: center; border-radius: 999rpx; background: linear-gradient(135deg, #7C3AED, #38BDF8); color: #fff; font-size: 27rpx; font-weight: 900; box-shadow: 0 14rpx 30rpx rgba(124,58,237,.18); } - .challenge-share { margin: 0 0 18rpx; height: 76rpx; line-height: 76rpx; border-radius: 999rpx; background: linear-gradient(135deg, #FF9C42, #FFD166); color: #fff; font-size: 27rpx; font-weight: 900; box-shadow: 0 14rpx 30rpx rgba(255,156,66,.18); } + .invite-share { margin: 0 0 18rpx; height: 76rpx; line-height: 76rpx; border-radius: 999rpx; background: linear-gradient(135deg, #35D6A6, #FFB84D); color: #fff; font-size: 27rpx; font-weight: 900; box-shadow: 0 14rpx 30rpx rgba(53,214,166,.18); } .college-modal { text-align: left; } .college-modal .modal-title, .college-modal .modal-sub { text-align: center; } .college-list { max-height: 560rpx; margin-bottom: 24rpx; } diff --git a/package1/planet/more.vue b/package1/planet/more.vue index 134b0b3..255d47f 100644 --- a/package1/planet/more.vue +++ b/package1/planet/more.vue @@ -12,7 +12,7 @@ PLANET SUPPLY 轻量经营补给地图 - 保留松鼠星际农场、券树培育和防御塔成长,玩法更轻更直接。 + 松鼠星际农场、券树培育和防御塔成长,玩法更轻更直接。 {{home.myTicketCount || 0}} diff --git a/package1/planet/pkHall.vue b/package1/planet/pkHall.vue index 34e3883..31e9e8c 100644 --- a/package1/planet/pkHall.vue +++ b/package1/planet/pkHall.vue @@ -5,7 +5,7 @@ 星球擂台 - + CAMPUS ARENA 同一关卡,拼手速和决策 @@ -13,30 +13,52 @@ 创建房间 - - - 我的房间 - - {{room.roomName || '星球擂台'}} - {{roomStatus(room.status)}} - + + 热门房间 + 我的房间 + 我的战绩 + + + + + 我的房间 + 刷新 + + + + {{room.roomName || '星球擂台'}} + {{room.playerCount || 0}}/{{room.maxPlayers || 2}} 人 · 入场 {{room.entryTickets || 1}} 券 · {{room._statusText}} + + + {{room.poolTickets || 0}} + 奖池 - 暂无房间 + + + 暂无房间,先开一间等同学来挑战 + {{myRoomsLoadText}} + + + + + 我的战绩 + 刷新 - - 我的战绩 - - {{record.cleared ? (record.durationSeconds + '秒通关') : '挑战失败'}} - {{record.rankNo ? ('第' + record.rankNo) : '待结算'}} + + + {{record._title}} + {{record._meta}} - 暂无战绩 + {{record._result}} + 暂无战绩,去擂台打一局 + {{myRecordsLoadText}} - + 热门房间 - 刷新 + 刷新 @@ -49,7 +71,7 @@ - 还没有公开擂台,先开一间等同学来挑战 + 还没有公开擂台,先开一间等同学来挑战 {{hotLoadText}} @@ -81,6 +103,7 @@ nickname: '', avatar: '', college: '', + activeTab: 'hotRooms', hotRooms: [], myRooms: [], myRecords: [], @@ -88,12 +111,20 @@ hotPageSize: 10, hotTotalPages: 1, hotLoading: false, + myRoomsPageNum: 1, + myRoomsPageSize: 10, + myRoomsTotalPages: 1, + myRoomsLoading: false, + myRecordsPageNum: 1, + myRecordsPageSize: 10, + myRecordsTotalPages: 1, + myRecordsLoading: false, showCreate: false, shareRoom: null, form: { roomName: '今晚冲榜局', - maxPlayers: 2, - tickets: 1, + maxPlayers: '', + tickets: '', password: '' } } @@ -103,6 +134,16 @@ if (this.hotLoading) return '正在加载更多房间...' if (this.hotPageNum >= this.hotTotalPages) return '没有更多擂台了' return '上滑加载更多擂台' + }, + myRoomsLoadText() { + if (this.myRoomsLoading) return '正在加载我的房间...' + if (this.myRoomsPageNum >= this.myRoomsTotalPages) return '没有更多房间了' + return '上滑加载更多房间' + }, + myRecordsLoadText() { + if (this.myRecordsLoading) return '正在加载我的战绩...' + if (this.myRecordsPageNum >= this.myRecordsTotalPages) return '没有更多战绩了' + return '上滑加载更多战绩' } }, onLoad(options) { @@ -126,7 +167,11 @@ if (area) this.regionId = JSON.parse(area).id || '' } catch (e) {} this.college = uni.getStorageSync('planetCollege_' + this.regionId) || '' - if (this.regionId) this.loadHall() + if (this.regionId) { + this.loadMyRooms(true) + this.loadMyRecords(true) + this.loadHotRooms(true) + } if (options.roomId) { this.joinRoom({ id: options.roomId }) } @@ -150,54 +195,93 @@ } catch (e) {} this.navHeight = this.statusBarHeight + 44 }, - loadHall() { - this.hotPageNum = 1 - this.hotTotalPages = 1 - this.hotRooms = [] - this.tui.request('/app/planet/adventure/pk/hall', 'POST', { - userId: this.userId, - regionId: this.regionId, - pageNumber: 1, - pageSize: this.hotPageSize - }, false, false, true).then(res => { - if (res.code == 200 && res.result) { - this.hotRooms = this.withKeys(res.result.hotRooms || [], 'hot_1') - this.hotPageNum = Number(res.result.hotPageNumber || 1) - this.hotTotalPages = Math.max(1, Number(res.result.hotTotalPages || 1)) - this.myRooms = this.withKeys(res.result.myRooms || [], 'mine') - this.myRecords = this.withKeys(res.result.myRecords || [], 'record') - } - }) + switchTab(tab) { + this.activeTab = tab + if (tab === 'myRooms' && !this.myRooms.length) this.loadMyRooms(true) + if (tab === 'myRecords' && !this.myRecords.length) this.loadMyRecords(true) + if (tab === 'hotRooms' && !this.hotRooms.length) this.loadHotRooms(true) }, - loadHotRooms(reset) { - if (this.hotLoading) return - if (!reset && this.hotPageNum >= this.hotTotalPages) return - const nextPage = reset ? 1 : this.hotPageNum + 1 - this.hotLoading = true - this.tui.request('/app/planet/adventure/pk/hall', 'POST', { + loadPageList(type, reset) { + const config = { + myRooms: { + url: '/app/planet/adventure/pk/myRooms', + listKey: 'myRooms', + pageKey: 'myRoomsPageNum', + sizeKey: 'myRoomsPageSize', + totalKey: 'myRoomsTotalPages', + loadingKey: 'myRoomsLoading', + prefix: 'mine' + }, + myRecords: { + url: '/app/planet/adventure/pk/myRecords', + listKey: 'myRecords', + pageKey: 'myRecordsPageNum', + sizeKey: 'myRecordsPageSize', + totalKey: 'myRecordsTotalPages', + loadingKey: 'myRecordsLoading', + prefix: 'record' + }, + hotRooms: { + url: '/app/planet/adventure/pk/hotRooms', + listKey: 'hotRooms', + pageKey: 'hotPageNum', + sizeKey: 'hotPageSize', + totalKey: 'hotTotalPages', + loadingKey: 'hotLoading', + prefix: 'hot' + } + }[type] + if (!config || this[config.loadingKey]) return + if (!reset && this[config.pageKey] >= this[config.totalKey]) return + const nextPage = reset ? 1 : this[config.pageKey] + 1 + if (reset) { + this[config.pageKey] = 1 + this[config.totalKey] = 1 + this[config.listKey] = [] + } + this[config.loadingKey] = true + this.tui.request(config.url, 'POST', { userId: this.userId, regionId: this.regionId, pageNumber: nextPage, - pageSize: this.hotPageSize + pageSize: this[config.sizeKey] }, false, false, true).then(res => { - this.hotLoading = false + this[config.loadingKey] = false if (res.code == 200 && res.result) { - const list = this.withKeys(res.result.hotRooms || [], 'hot_' + nextPage) - this.hotRooms = reset ? list : [...this.hotRooms, ...list] - this.hotPageNum = Number(res.result.hotPageNumber || nextPage) - this.hotTotalPages = Math.max(1, Number(res.result.hotTotalPages || 1)) + const records = this.withKeys(res.result.records || [], config.prefix + '_' + nextPage) + this[config.listKey] = reset ? records : this[config.listKey].concat(records) + this[config.pageKey] = Number(res.result.current || nextPage) + this[config.totalKey] = Math.max(1, Number(res.result.pages || 1)) } }).catch(() => { - this.hotLoading = false + this[config.loadingKey] = false }) }, - loadMoreHotRooms() { - this.loadHotRooms(false) + loadMyRooms(reset) { + this.loadPageList('myRooms', reset) + }, + loadMyRecords(reset) { + this.loadPageList('myRecords', reset) + }, + loadHotRooms(reset) { + this.loadPageList('hotRooms', reset) + }, + loadMoreActive() { + if (this.activeTab === 'myRooms') this.loadMyRooms(false) + else if (this.activeTab === 'myRecords') this.loadMyRecords(false) + else this.loadHotRooms(false) }, withKeys(list, prefix) { return list.map((item, index) => { item.password = '' item._key = item.id || (prefix + '_' + index) + item._statusText = this.roomStatus(item.status) + if (prefix.indexOf('record') === 0) { + item._title = this.recordTitle(item) + item._meta = this.recordMeta(item) + item._result = this.recordResult(item) + item._class = this.recordClass(item) + } return item }) }, @@ -222,7 +306,9 @@ return } this.showCreate = false - this.loadHall() + this.activeTab = 'myRooms' + this.loadMyRooms(true) + this.loadHotRooms(true) this.joinRoom(res.result) }) }, @@ -251,6 +337,29 @@ if (status === 3) return '已取消' return '等待中' }, + recordTitle(record) { + if (record.cleared === 1) return (record.durationSeconds || 0) + '秒通关' + return '挑战失败' + }, + recordMeta(record) { + const ticketText = '入场 ' + (record.entryTickets || 0) + ' 券' + if (record.rewardTickets > 0) return ticketText + ' · 奖励 +' + record.rewardTickets + return ticketText + ' · ' + (record.finishTime || record.createTime || '') + }, + recordResult(record) { + if (record.status === 1 || record.status === 0) return '待结算' + if (record.rewardTickets > 0) return '胜利' + if (record.status === 2 && record.cleared === 1 && record.rankNo === 1) return '胜利' + if ((record.status === 2 || record.status === 3 || record.status === 4) && record.rewardTickets === record.entryTickets && (!record.rankNo || record.rankNo === 0)) return '无人通关' + return '失败' + }, + recordClass(record) { + const result = this.recordResult(record) + if (result === '胜利') return 'win' + if (result === '无人通关') return 'refund' + if (result === '待结算') return 'pending' + return 'lose' + }, goBack() { const pages = getCurrentPages ? getCurrentPages() : [] if (pages.length > 1) { @@ -277,6 +386,9 @@ .hero-title { margin-top: 10rpx; font-size: 42rpx; font-weight: 900; } .hero-sub { margin-top: 14rpx; color: #667085; font-size: 24rpx; line-height: 1.55; } .create-btn, .main-btn { margin-top: 22rpx; height: 76rpx; line-height: 76rpx; border-radius: 999rpx; text-align: center; color: #fff; font-size: 28rpx; font-weight: 900; background: linear-gradient(135deg, #7C3AED, #38BDF8); box-shadow: 0 16rpx 34rpx rgba(124,58,237,.18); } + .arena-tabs { margin-bottom: 24rpx; padding: 8rpx; border-radius: 999rpx; background: rgba(255,255,255,.72); border: 2rpx solid rgba(255,255,255,.9); display: flex; gap: 8rpx; box-shadow: 0 14rpx 34rpx rgba(124,58,237,.08); } + .arena-tab { flex: 1; height: 66rpx; line-height: 66rpx; border-radius: 999rpx; text-align: center; color: #667085; font-size: 24rpx; font-weight: 900; } + .arena-tab.active { color: #fff; background: linear-gradient(135deg, #7C3AED, #38BDF8); box-shadow: 0 12rpx 26rpx rgba(124,58,237,.18); } .section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18rpx; color: #7C3AED; font-size: 23rpx; font-weight: 900; } .section-head text:first-child { color: #172033; font-size: 31rpx; } .room-card { margin-top: 16rpx; padding: 22rpx; border-radius: 30rpx; background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(238,247,255,.82)); display: flex; align-items: center; justify-content: space-between; border: 2rpx solid rgba(124,58,237,.10); } @@ -293,6 +405,15 @@ .mini-row { margin-top: 14rpx; padding: 16rpx; border-radius: 22rpx; background: rgba(248,250,252,.9); display: flex; justify-content: space-between; gap: 12rpx; font-size: 22rpx; color: #667085; } .mini-row text:first-child { color: #172033; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .mini-share { margin: 0; padding: 0 14rpx; min-width: 0; height: 40rpx; line-height: 40rpx; border-radius: 999rpx; background: #F4F3FF; color: #7C3AED; font-size: 18rpx; font-weight: 900; } + .record-card { margin-top: 16rpx; padding: 24rpx; border-radius: 30rpx; background: linear-gradient(135deg, rgba(255,255,255,.94), rgba(247,250,255,.84)); display: flex; align-items: center; justify-content: space-between; border: 2rpx solid rgba(124,58,237,.10); } + .record-main { flex: 1; min-width: 0; } + .record-title { color: #172033; font-size: 29rpx; font-weight: 900; } + .record-meta { margin-top: 8rpx; color: #667085; font-size: 22rpx; } + .record-badge { margin-left: 18rpx; min-width: 110rpx; height: 58rpx; line-height: 58rpx; border-radius: 999rpx; text-align: center; font-size: 23rpx; font-weight: 900; background: #EEF2FF; color: #7C3AED; } + .record-badge.win { background: linear-gradient(135deg, #FFB84D, #FF7A59); color: #fff; box-shadow: 0 12rpx 24rpx rgba(255,122,89,.18); } + .record-badge.lose { background: #FEE2E2; color: #EF4444; } + .record-badge.refund { background: #E0F2FE; color: #0284C7; } + .record-badge.pending { background: #F4F3FF; color: #7C3AED; } .empty { margin-top: 20rpx; color: #8A94A6; font-size: 24rpx; } .empty.small { font-size: 21rpx; } .load-more { margin-top: 24rpx; height: 58rpx; line-height: 58rpx; text-align: center; border-radius: 999rpx; background: rgba(238,242,255,.76); color: #7C3AED; font-size: 23rpx; font-weight: 900; } diff --git a/package1/planet/ticketLog.vue b/package1/planet/ticketLog.vue index 8c84b61..d10771d 100644 --- a/package1/planet/ticketLog.vue +++ b/package1/planet/ticketLog.vue @@ -231,7 +231,7 @@ this.raiderNoMore = false } this.raiderLoading = true - this.tui.request('/app/planet/search/raiders', 'POST', { + this.tui.request('/app/planet/hunt/raiders', 'POST', { userId: this.userId, regionId: this.regionId, pageNumber: this.raiderPageNumber, @@ -261,8 +261,8 @@ this.loadRaiders(false) }, raiderDesc(item) { - if (item.countered === 1) return '已被防御塔反击' - if (item.intercepted === 1) return '被防御塔拦截过' + if (item.result === 'shield') return '曾被防御塔挡下 · ' + (item.createTime || '') + if (item.result === 'fail') return '曾经追捕扑空 · ' + (item.createTime || '') return '偷走 ' + (item.gainTickets || 0) + ' 张券 · ' + (item.createTime || '') }, revengeRaider(item) { @@ -278,20 +278,14 @@ } this.huntTimers.push(setTimeout(() => { this.huntModal.phase = 'locking' }, 900)) this.huntTimers.push(setTimeout(() => { this.huntModal.phase = 'chasing' }, 1800)) - this.tui.request('/app/planet/search/target', 'POST', { + this.tui.request('/app/planet/hunt', 'POST', { userId: this.userId, regionId: this.regionId, toUserId: item.fromUserId }, false, false, true).then((res) => { this.huntTimers.push(setTimeout(() => { if (res.code == 200 && res.result) { - this.huntModal.result = { - result: res.result.countered ? 'shield' : (res.result.intercepted ? 'fail' : 'success'), - message: res.result.message, - gainTickets: res.result.gainTickets, - totalGain: res.result.gainTickets || 0, - remainHunt: res.result.remainSearchCount - } + this.huntModal.result = res.result this.huntModal.phase = 'result' this.loadPage(true) this.loadRaiders(true)