wangfukang 15 hours ago
parent
commit
098610ae86
  1. 47
      package1/components/planet/planet-header.vue
  2. 65
      package1/planet/adventure.vue
  3. 2
      package1/planet/more.vue
  4. 231
      package1/planet/pkHall.vue
  5. 16
      package1/planet/ticketLog.vue

47
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 {

65
package1/planet/adventure.vue

@ -2,11 +2,11 @@
<view class="boost">
<view class="nav" :style="{height: navHeight + 'px', paddingTop: statusBarHeight + 'px'}">
<view class="nav-back" @tap="goBack"><text></text></view>
<view class="nav-title">学院助推赛</view>
<view class="nav-title">{{isDailyMode ? '学院助推赛' : 'PK局'}}</view>
</view>
<scroll-view scroll-y class="page" :style="{paddingTop: (navHeight + 10) + 'px'}">
<view class="hero">
<view class="hero" v-if="isDailyMode">
<view class="hero-kicker">COLLEGE ROCKET</view>
<view class="hero-title">{{pageTitle}}</view>
<view class="college-picker" @tap="openCollegePicker">
@ -22,7 +22,7 @@
<view class="hero-sub">{{heroSub}}</view>
</view>
<view class="glory-card">
<view class="glory-card" v-if="isDailyMode">
<view class="section-head">
<text>今日最快通关榜</text>
<text>学院荣耀</text>
@ -65,7 +65,7 @@
</view>
<button class="arena-share" v-if="isPkMode" open-type="share">邀请同学来擂台</button>
<view class="start-strip" v-if="!playing && !cleared" @tap="startLevel">
<text>开始助推</text>
<text>{{isDailyMode ? '开始游戏' : '开始PK'}}</text>
<text>先点这里再开始消除卡牌</text>
</view>
<view class="start-strip done" v-if="cleared && isDailyMode">
@ -112,7 +112,7 @@
</view>
<view class="slot-wrap">
<view class="slot-title">助推 {{slots.length}}/{{slotLimit}}</view>
<view class="slot-title">消除 {{slots.length}}/{{slotLimit}}</view>
<view class="slots">
<view class="slot" v-for="cell in slotCells" :key="cell.key">
<text v-if="cell.icon">{{cell.icon}}</text>
@ -133,8 +133,7 @@
<view class="modal-card">
<view class="modal-title">{{modal.title}}</view>
<view class="modal-sub">{{modal.sub}}</view>
<view class="challenge-btn" v-if="modal.challenge" @tap="createChallenge">生成好友挑战卡</view>
<button class="challenge-share" v-if="shareChallenge" open-type="share">分享给好友挑战</button>
<button class="invite-share" v-if="modal.invite" open-type="share">邀请好友为学院助力</button>
<view class="main-btn" @tap="closeModal">知道了</view>
</view>
</view>
@ -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; }

2
package1/planet/more.vue

@ -12,7 +12,7 @@
<view>
<view class="hero-kicker">PLANET SUPPLY</view>
<view class="hero-title">轻量经营补给地图</view>
<view class="hero-sub">保留松鼠星际农场券树培育和防御塔成长玩法更轻更直接</view>
<view class="hero-sub">松鼠星际农场券树培育和防御塔成长玩法更轻更直接</view>
</view>
<view class="hero-ticket">
<text>{{home.myTicketCount || 0}}</text>

231
package1/planet/pkHall.vue

@ -5,7 +5,7 @@
<view class="nav-title">星球擂台</view>
</view>
<scroll-view scroll-y class="page" :style="{paddingTop: (navHeight + 10) + 'px'}" @scrolltolower="loadMoreHotRooms">
<scroll-view scroll-y class="page" :style="{paddingTop: (navHeight + 10) + 'px'}" @scrolltolower="loadMoreActive">
<view class="hero">
<view class="hero-kicker">CAMPUS ARENA</view>
<view class="hero-title">同一关卡拼手速和决策</view>
@ -13,30 +13,52 @@
<view class="create-btn" @tap="showCreate = true">创建房间</view>
</view>
<view class="section duo">
<view class="panel">
<view class="section-head"><text>我的房间</text></view>
<view class="mini-row" v-for="room in myRooms" :key="room._key" @tap="joinRoom(room)">
<text>{{room.roomName || '星球擂台'}}</text>
<text>{{roomStatus(room.status)}}</text>
<button class="mini-share" open-type="share" @tap.stop="setShareRoom(room)">分享</button>
<view class="arena-tabs">
<view class="arena-tab" :class="{active: activeTab === 'hotRooms'}" @tap="switchTab('hotRooms')">热门房间</view>
<view class="arena-tab" :class="{active: activeTab === 'myRooms'}" @tap="switchTab('myRooms')">我的房间</view>
<view class="arena-tab" :class="{active: activeTab === 'myRecords'}" @tap="switchTab('myRecords')">我的战绩</view>
</view>
<view class="empty small" v-if="!myRooms.length">暂无房间</view>
<view class="section hot-section" v-if="activeTab === 'myRooms'">
<view class="section-head">
<text>我的房间</text>
<text @tap="loadMyRooms(true)">刷新</text>
</view>
<view class="room-card" v-for="room in myRooms" :key="room._key" @tap="joinRoom(room)">
<view class="room-main">
<view class="room-name">{{room.roomName || '星球擂台'}}</view>
<view class="room-meta">{{room.playerCount || 0}}/{{room.maxPlayers || 2}} · 入场 {{room.entryTickets || 1}} · {{room._statusText}}</view>
</view>
<view class="panel">
<view class="section-head"><text>我的战绩</text></view>
<view class="mini-row" v-for="record in myRecords" :key="record._key">
<text>{{record.cleared ? (record.durationSeconds + '秒通关') : '挑战失败'}}</text>
<text>{{record.rankNo ? ('第' + record.rankNo) : '待结算'}}</text>
<view class="room-pool">
<text>{{room.poolTickets || 0}}</text>
<text>奖池</text>
</view>
<view class="empty small" v-if="!myRecords.length">暂无战绩</view>
<button class="share-mini" open-type="share" @tap.stop="setShareRoom(room)">分享</button>
</view>
<view class="empty" v-if="!myRooms.length && !myRoomsLoading">暂无房间先开一间等同学来挑战</view>
<view class="load-more" v-if="myRooms.length">{{myRoomsLoadText}}</view>
</view>
<view class="section hot-section">
<view class="section hot-section" v-if="activeTab === 'myRecords'">
<view class="section-head">
<text>我的战绩</text>
<text @tap="loadMyRecords(true)">刷新</text>
</view>
<view class="record-card" v-for="record in myRecords" :key="record._key">
<view class="record-main">
<view class="record-title">{{record._title}}</view>
<view class="record-meta">{{record._meta}}</view>
</view>
<view class="record-badge" :class="record._class">{{record._result}}</view>
</view>
<view class="empty" v-if="!myRecords.length && !myRecordsLoading">暂无战绩去擂台打一局</view>
<view class="load-more" v-if="myRecords.length">{{myRecordsLoadText}}</view>
</view>
<view class="section hot-section" v-if="activeTab === 'hotRooms'">
<view class="section-head">
<text>热门房间</text>
<text @tap="loadHall">刷新</text>
<text @tap="loadHotRooms(true)">刷新</text>
</view>
<view class="room-card" v-for="room in hotRooms" :key="room._key" @tap="joinRoom(room)">
<view class="room-main">
@ -49,7 +71,7 @@
</view>
<button class="share-mini" open-type="share" @tap.stop="setShareRoom(room)">邀请</button>
</view>
<view class="empty" v-if="!hotRooms.length">还没有公开擂台先开一间等同学来挑战</view>
<view class="empty" v-if="!hotRooms.length && !hotLoading">还没有公开擂台先开一间等同学来挑战</view>
<view class="load-more" v-if="hotRooms.length">{{hotLoadText}}</view>
</view>
</scroll-view>
@ -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; }

16
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)

Loading…
Cancel
Save