Skip to content
This repository has been archived by the owner on Nov 5, 2021. It is now read-only.

Commit

Permalink
Version.1.4.0 Update
Browse files Browse the repository at this point in the history
  • Loading branch information
dzxrly committed May 3, 2020
1 parent 1d13a8e commit 3e5de28
Show file tree
Hide file tree
Showing 32 changed files with 288 additions and 100 deletions.
21 changes: 21 additions & 0 deletions BFVStatus-vue/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion BFVStatus-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"vue": "^2.5.2",
"vue-cordova": "^0.1.2",
"vue-router": "^3.0.1",
"vuex": "^3.1.2"
"vuex": "^3.1.2",
"vuex-persistedstate": "^3.0.1"
},
"devDependencies": {
"autoprefixer": "^7.1.2",
Expand Down
7 changes: 5 additions & 2 deletions BFVStatus-vue/src/components/ChartsView.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<template>
<div class="chartsView-wrap">
<div class="load" v-if="historyLoading">
<Loading></Loading>
</div>
<el-page-header class="pageHeader" @back="goBack">
<template slot="content">{{playerId}}的数据统计</template>
</el-page-header>
Expand All @@ -8,7 +11,7 @@
<el-tag size="mini" type="warning">更新于{{lastUpdateTime}}</el-tag>
</el-col>
</el-row>
<van-tabs v-model="activeTab" v-loading="historyLoading" class="vanTabs">
<van-tabs v-model="activeTab" class="vanTabs">
<van-tab title="K/D折线图" class="vanTab">
<el-row type="flex" justify="center">
<el-col :span="20">
Expand Down Expand Up @@ -256,13 +259,13 @@ export default {
var onSuccess = function (res) {
thisView.playerHistory = JSON.parse(res)
thisView.$store.commit('setHistory', res)
thisView.historyLoading = false
thisView.setMaxLen()
thisView.setInitSelectedValue()
thisView.kdDataInit()
thisView.killsDataInit()
thisView.spmDataInit()
thisView.drawKDLineChart()
thisView.historyLoading = false
}
var onError = function (res) {
thisView.historyLoading = false
Expand Down
57 changes: 57 additions & 0 deletions BFVStatus-vue/src/components/Loading.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<template>
<div class="load-ani">
<svg height="91" width="65">
<polyline class="load-logo" fill="none" :stroke="logoColor" stroke-width="2"
points="1,1 21,1 33,44 44,1 64,1 33,90 1,1"
stroke-linecap="round" stroke-linejoin="round"></polyline>
</svg>
<h3 class="load-text">加载中...</h3>
</div>
</template>

<script>
export default {
name: 'Loading',
data () {
return {
logoColor: '#409EFF'
}
}
}
</script>

<style scoped lang="stylus">
.load-ani {
position fixed
display flex
justify-content center
align-items center
min-height 100vh
width 100%
flex-direction column
background-color rgba(255, 255, 255, 0.8)
z-index 9999
pointer-events none
.load-text {
font-family Helvetica
font-size 14px
margin-top 10px
color #409EFF
}
.load-logo {
animation load-logo 2s infinite
--webkit-animation load-logo 2s infinite
stroke-dasharray 500
stroke-dashoffset 500
}
@keyframes load-logo {
from {
stroke-dashoffset 500
}
to {
stroke-dashoffset 0
}
}
}
</style>
46 changes: 39 additions & 7 deletions BFVStatus-vue/src/components/PlayerGameInfo.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<template>
<div class="playerGameInfo-wrap">
<div class="load" v-if="gameReportsTabPaneLoading">
<Loading></Loading>
</div>
<el-page-header @back="goBack" content="本局游戏详情" class="pageHeader"></el-page-header>
<div v-if="!gameReportsTabPaneLoading">
<el-row class="serverInfo-name" type="flex" justify="center">
<el-col :span="24">{{gameWholeInfo.data.metadata.serverName}}</el-col>
</el-row>
Expand Down Expand Up @@ -213,32 +217,55 @@
</el-table>
</el-tab-pane>
</el-tabs>
</div>
</div>
</template>

<script>
import {timestampToTime, mapCodeToCN, modeNameToCN, countryNameConvert, timeENGToCN, weaponNameConvert, vehicleNameConvert, gadgetNameConvert, secondsFormat} from '../js/convertPackage.js'
import { httpGet } from '../js/api'
export default {
name: 'PlayerGameInfo',
data () {
return {
gameWholeInfo: {},
playerCount: 0,
playerId: 'null'
playerId: 'null',
gameReportsTabPaneLoading: true
}
},
created () {
this.getGameWholeInfoData()
this.getPlayerCount()
this.getPlayerId()
this.popstateListener()
},
mounted () {
this.getGameInfo()
},
methods: {
getGameInfo () {
this.gameReportsTabPaneLoading = true
var thisView = this
var params = {
url: 'https://api.tracker.gg/api/v1/bfv/gamereports/' + thisView.$route.query.platform + '/direct/' + thisView.$route.query.id
}
var onSuccess = function (res) {
thisView.gameReportsTabPaneLoading = false
thisView.gameWholeInfo = JSON.parse(res)
thisView.getPlayerCount()
thisView.getPlayerId()
}
var onError = function () {
thisView.gameReportsTabPaneLoading = false
thisView.raiseError('查询失败', '未找到用户的游戏记录')
}
var onTimeOut = function () {
thisView.raiseError('查询失败', '连接超时')
thisView.gameReportsTabPaneLoading = false
}
httpGet(params, onSuccess, onError, onTimeOut, 45000)
},
getPlayerId () {
this.playerId = this.$store.getters.getUsername
},
getGameWholeInfoData () {
this.gameWholeInfo = this.$store.getters.getGameWholeInfo
},
goBack () {
this.$router.push({name: 'PlayerStatusInfoView'})
},
Expand All @@ -255,6 +282,11 @@ export default {
console.log('res:' + (row.metadata.name === this.playerId))
return 'success-row'
} else return ''
},
popstateListener () {
window.addEventListener('popstate', () => {
console.log('pop')
})
}
},
filters: {
Expand Down
58 changes: 31 additions & 27 deletions BFVStatus-vue/src/components/PlayerStatusInfoView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -313,22 +313,24 @@
<el-row class="instructionRow" type="flex" justify="center">
<el-col :span="24">
<p>结果仅供参考</p>
<p style="color: #F56C6C;">不能作为实锤或未开挂的证据!</p>
<p style="color: #F56C6C;">不推荐作为实锤或未开挂的证据!</p>
</el-col>
</el-row>
<el-divider>检测依据</el-divider>
<div class="isNotHackerRow">
<el-row>
<el-col :span="24">
<p>根据超过100击杀的武器进行计算,武器类型仅包含:<span style="font-weight: bolder">突击步枪、冲锋枪、固定式机枪、轻机枪、手枪型卡宾枪和手枪</span>。上述武器中如果存在爆头率高于50%或爆头率高于35%的武器数量超过30%将会被判定为外挂。</p>
<p>根据超过100击杀的武器进行计算:1、针对武器类型为:<span style="font-weight: bolder">突击步枪、冲锋枪、固定式机枪、轻机枪、手枪型卡宾枪和手枪</span>。
上述武器中如果爆头率高于50%或爆头率高于35%的武器数量超过30%将会被判定为外挂。
2、针对武器类型为:<span style="font-weight: bolder">手动枪机卡宾枪、单动式步枪</span>。上述武器中如果爆头率高于80%且KPM高于2的武器数量超过50%将会被判定为外挂</p>
</el-col>
</el-row>
</div>
<div class="checkRes">
<el-divider>检测结果</el-divider>
<el-row class="checkResRow" type="flex" justify="center">
<el-col :span="24">
<span>超过百杀的武器数量:<span style="color: #409EFF">{{over100KillsWeaponCount}}</span></span>
<span>超过百杀的非栓狙武器数量:<span style="color: #409EFF">{{over100KillsWeaponCount}}</span></span>
</el-col>
</el-row>
<el-row class="checkResRow" type="flex" justify="center">
Expand All @@ -341,6 +343,16 @@
<span>其中爆头率高于50%的武器数量:<span style="color: #409EFF">{{over50HeadshotWeaponCount}}</span></span>
</el-col>
</el-row>
<el-row class="checkResRow" type="flex" justify="center">
<el-col :span="24">
<span>超过百杀的栓狙武器数量:<span style="color: #409EFF">{{over100KillsSnipersCount}}</span></span>
</el-col>
</el-row>
<el-row class="checkResRow" type="flex" justify="center">
<el-col :span="24">
<span>其中爆头率高于80%且KPM高于2的数量:<span style="color: #409EFF">{{over80HSAnd2KpmCount}}</span></span>
</el-col>
</el-row>
</div>
</div>
</van-popup>
Expand Down Expand Up @@ -485,7 +497,9 @@ export default {
],
over100KillsWeaponCount: 0,
over50HeadshotWeaponCount: 0,
overSetHeadshotWeaponCount: 0
overSetHeadshotWeaponCount: 0,
over100KillsSnipersCount: 0,
over80HSAnd2KpmCount: 0
}
},
created () {
Expand Down Expand Up @@ -633,27 +647,15 @@ export default {
httpGet(params, onSuccess, onError, onTimeOut, 45000)
},
handleClick (row) {
this.gameReportsTabPaneLoading = true
var tempStore = this.$store
var thisView = this
var _this = this
var id = row.gameReportId
var params = {
url: 'https://api.tracker.gg/api/v1/bfv/gamereports/' + tempStore.getters.getPlatform + '/direct/' + id
}
var onSuccess = function (res) {
thisView.gameReportsTabPaneLoading = false
tempStore.commit('setGameWholeInfo', res)
thisView.$router.push({name: 'PlayerGameInfo', params: {gameReportId: id}})
}
var onError = function () {
thisView.gameReportsTabPaneLoading = false
thisView.raiseError('查询失败', '未找到用户的游戏记录')
}
var onTimeOut = function () {
thisView.raiseError('查询失败', '连接超时')
thisView.gameReportsTabPaneLoading = false
}
httpGet(params, onSuccess, onError, onTimeOut, 45000)
this.$router.push({
path: '/PlayerGameInfo',
query: {
id: id,
platform: _this.$store.getters.getPlatform
}
})
},
getWeaponsInfo () {
var tempStore = this.$store
Expand Down Expand Up @@ -771,12 +773,14 @@ export default {
this.showIsHackerPopup = true
},
hackerChecker () {
var res1 = checkIsHacker(this.weaponsInfo, 0.3, 0.35)
var res2 = checkIsHacker(this.weaponsInfo, 0, 0.5)
var res1 = checkIsHacker(this.weaponsInfo, 0.3, 0.35, 0.5, 0.8, 2)
var res2 = checkIsHacker(this.weaponsInfo, 0, 0.5, 0.5, 0.8, 2)
this.over100KillsWeaponCount = res1[2]
this.overSetHeadshotWeaponCount = res1[1]
this.over50HeadshotWeaponCount = res2[1]
if (res1[0] || res2[0]) this.mayBeHacker = 'isHacker'
this.over100KillsSnipersCount = res1[3]
this.over80HSAnd2KpmCount = res1[4]
if (res1[0] || res2[0] || res1[5]) this.mayBeHacker = 'isHacker'
else this.mayBeHacker = 'isNotHacker'
}
},
Expand Down
Loading

0 comments on commit 3e5de28

Please sign in to comment.