main
syt 3 months ago
commit 3fdec6c488
  1. 163
      App.vue
  2. 20
      index.html
  3. 24
      main.js
  4. 72
      manifest.json
  5. 69
      pages.json
  6. 208
      pages/award/index.vue
  7. 328
      pages/check/index.vue
  8. 102
      pages/clear/index.vue
  9. 312
      pages/declare/index.vue
  10. 127
      pages/index/index.vue
  11. 127
      pages/index/init.vue
  12. 173
      pages/schedule/index.vue
  13. 327
      pages/score/index.vue
  14. BIN
      static/1.png
  15. BIN
      static/2.png
  16. BIN
      static/3.png
  17. BIN
      static/4.png
  18. BIN
      static/avatar.png
  19. BIN
      static/bg.png
  20. BIN
      static/bg3.png
  21. BIN
      static/bottom.png
  22. BIN
      static/hd1-bg.png
  23. BIN
      static/hd2-bg.png
  24. BIN
      static/logo.png
  25. BIN
      static/logo2.png
  26. BIN
      static/logo3.png
  27. BIN
      static/small-logo.png
  28. 10
      uni.promisify.adaptor.js
  29. 76
      uni.scss
  30. 0
      unpackage/dist/build/.automator/h5/.automator.json
  31. 2
      unpackage/dist/build/h5/index.html
  32. BIN
      unpackage/dist/build/h5/static/1.png
  33. BIN
      unpackage/dist/build/h5/static/2.png
  34. BIN
      unpackage/dist/build/h5/static/3.png
  35. BIN
      unpackage/dist/build/h5/static/4.png
  36. BIN
      unpackage/dist/build/h5/static/avatar.png
  37. BIN
      unpackage/dist/build/h5/static/bg.png
  38. BIN
      unpackage/dist/build/h5/static/bg3.png
  39. BIN
      unpackage/dist/build/h5/static/bottom.png
  40. BIN
      unpackage/dist/build/h5/static/hd1-bg.png
  41. BIN
      unpackage/dist/build/h5/static/hd2-bg.png
  42. BIN
      unpackage/dist/build/h5/static/img/1.d0983c8c.png
  43. BIN
      unpackage/dist/build/h5/static/img/2.841280d3.png
  44. BIN
      unpackage/dist/build/h5/static/img/3.a70ff1ac.png
  45. BIN
      unpackage/dist/build/h5/static/img/4.518972aa.png
  46. BIN
      unpackage/dist/build/h5/static/img/bg.817cb0cc.png
  47. BIN
      unpackage/dist/build/h5/static/img/bg3.891accd5.png
  48. BIN
      unpackage/dist/build/h5/static/img/bottom.89599388.png
  49. BIN
      unpackage/dist/build/h5/static/img/logo.a8ef51b9.png
  50. BIN
      unpackage/dist/build/h5/static/img/logo2.c1e5d0b6.png
  51. BIN
      unpackage/dist/build/h5/static/img/logo3.9c8258d0.png
  52. 1
      unpackage/dist/build/h5/static/index.b0707a6a.css
  53. 7
      unpackage/dist/build/h5/static/js/chunk-vendors.77e5a542.js
  54. 1
      unpackage/dist/build/h5/static/js/index.0dea3b84.js
  55. 1
      unpackage/dist/build/h5/static/js/pages-award-index.f9ec1df7.js
  56. 1
      unpackage/dist/build/h5/static/js/pages-check-index.b88f9c1d.js
  57. 1
      unpackage/dist/build/h5/static/js/pages-clear-index.c20f4e06.js
  58. 1
      unpackage/dist/build/h5/static/js/pages-declare-index.a671cf72.js
  59. 1
      unpackage/dist/build/h5/static/js/pages-index-index.3ef18d37.js
  60. 1
      unpackage/dist/build/h5/static/js/pages-index-init.78ce3166.js
  61. 1
      unpackage/dist/build/h5/static/js/pages-schedule-index.223e28d6.js
  62. 1
      unpackage/dist/build/h5/static/js/pages-score-index.c1b9047e.js
  63. BIN
      unpackage/dist/build/h5/static/logo.png
  64. BIN
      unpackage/dist/build/h5/static/logo2.png
  65. BIN
      unpackage/dist/build/h5/static/logo3.png
  66. BIN
      unpackage/dist/build/h5/static/small-logo.png
  67. 136
      webscoke/index.js

@ -0,0 +1,163 @@
<script>
export default {
onLaunch: function() {
console.log('App Launch')
},
onShow: function() {
},
onHide: function() {
console.log('App Hide')
}
}
</script>
<style lang="scss">
/*每个页面公共css */
.header{
width: 100%;
height: 184px;
box-sizing: border-box;
background: url(/static/hd2-bg.png) left top no-repeat;
background-size: auto 100%;
display: flex;
align-items: center;
.logo{
width: 130px;
height: 130px;
image{
width: 100%;
height: 100%;
}
margin-right: 88px;
margin-left: 50px;
}
.info{
flex: 1;
.a{
font-weight: bold;
font-size: 58px;
color: #FFFFFF;
}
.b{
font-weight: bold;
font-size: 48px;
color: #FFFFFF;
margin-top: 15px;
display: flex;
align-items: center;
justify-content: space-between;
.fs{
font-weight: bold;
font-size: 48px;
color: #FFFFFF;
margin-right: 50px;
text{
margin-right: 50px;
}
}
}
}
}
.header1{
width: 100%;
height: 136px;
box-sizing: border-box;
background: url(/static/hd1-bg.png) left top no-repeat;
background-size: auto 100%;
display: flex;
align-items: center;
.logo{
width: 245px;
height: 95px;
image{
width: 100%;
height: 100%;
}
margin-right: 25px;
margin-left: 45px;
}
.info{
flex: 1;
display: flex;
align-items: center;
justify-content: space-between;
.a{
font-weight: bold;
font-size: 73px;
color: #FFFFFF;
float: left;
}
.b{
float: right;
font-weight: bold;
font-size: 50px;
color: #FFFF00;
line-height: 46px;
margin-right: 20px;
text{
font-weight: 400;
font-size: 40rpx;
color: #FFFF00;
display: block;
}
}
}
}
@media screen and (min-width: 1200px) and (max-width: 1359px) {
.header{
.info{
.a{
font-size: 45px;
white-space: nowrap;
}
.b{
font-size: 36px;
white-space: nowrap;
margin-top: 30px;
.fs{
font-size: 36px;
margin-right: 10px;
text{
margin-right: 10px;
}
}
}
}
}
.header1{
.info{
.a{
font-size: 45px;
white-space: nowrap;
}
.b{
font-size: 30px;
text-align: right;
}
}
}
}
@media screen and (min-width: 1360px) and (max-width: 1500px) {
.header{
.info{
.b{
font-size: 36px;
white-space: nowrap;
.fs{
font-size: 36px;
margin-right: 20px;
}
}
}
}
.header1{
.info{
.a{
font-size: 45px;
white-space: nowrap;
}
}
}
}
</style>

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<script>
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
CSS.supports('top: constant(a)'))
document.write(
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
</script>
<title></title>
<!--preload-links-->
<!--app-context-->
</head>
<body>
<div id="app"><!--app-html--></div>
<script type="module" src="/main.js"></script>
</body>
</html>

@ -0,0 +1,24 @@
import App from './App'
// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
App.mpType = 'app'
import websocketUtils from '@/webscoke/index.js';
Vue.prototype.$websocketUtils = websocketUtils
const app = new Vue({
...App
})
app.$mount()
// #endif
// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
const app = createSSRApp(App)
return {
app
}
}
// #endif

@ -0,0 +1,72 @@
{
"name" : "sport_big",
"appid" : "__UNI__0D1DD09",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
"transformPx" : false,
/* 5+App */
"app-plus" : {
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
},
/* */
"modules" : {},
/* */
"distribute" : {
/* android */
"android" : {
"permissions" : [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
},
/* ios */
"ios" : {},
/* SDK */
"sdkConfigs" : {}
}
},
/* */
"quickapp" : {},
/* */
"mp-weixin" : {
"appid" : "",
"setting" : {
"urlCheck" : false
},
"usingComponents" : true
},
"mp-alipay" : {
"usingComponents" : true
},
"mp-baidu" : {
"usingComponents" : true
},
"mp-toutiao" : {
"usingComponents" : true
},
"uniStatistics" : {
"enable" : false
},
"vueVersion" : "2"
}

@ -0,0 +1,69 @@
{
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
{
"path" : "pages/index/index",
"style" :
{
"navigationStyle": "custom"
}
},{
"path": "pages/award/index",
"style": {
"navigationStyle": "custom"
}
},
{
"path" : "pages/schedule/index",
"style" :
{
"navigationStyle": "custom"
}
},
{
"path" : "pages/clear/index",
"style" :
{
"navigationStyle": "custom"
}
},
{
"path" : "pages/check/index",
"style" :
{
"navigationStyle": "custom"
}
}
,{
"path" : "pages/score/index",
"style" :
{
"navigationStyle": "custom"
}
}
,{
"path" : "pages/declare/index",
"style" :
{
"navigationStyle": "custom"
}
}
,{
"path" : "pages/index/init",
"style" :
{
"navigationStyle": "custom"
}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
},
"uniIdRouter": {}
}

@ -0,0 +1,208 @@
<template>
<view class="home">
<view class="header1">
<view class="logo">
<image src="@/static/logo.png"></image>
</view>
<view class="info">
<view class="a">弹射者|{{saiName}}</view>
</view>
</view>
<view class="body">
<view class="a">
<image mode="widthFix" src="@/static/1.png"></image>
</view>
<view class="b" :style="{'justify-content': slist.length==2?'flex-start':'center'}">
<template v-for="(a,i) in slist">
<view class="item item-02" :key="i" v-if="a.ranking == 2">
<image src="@/static/2.png"></image>
<view class="name">{{a.athlete_name}}</view>
<view class="desc">{{a.ranking}}</view>
</view>
<view class="item item-01" :key="i" v-if="a.ranking == 1">
<image src="@/static/4.png"></image>
<view class="name">{{a.athlete_name}}</view>
<view class="desc">{{a.ranking}}</view>
</view>
<view class="item item-03" :key="i" v-if="a.ranking == 3">
<image src="@/static/3.png"></image>
<view class="name">{{a.athlete_name}}</view>
<view class="desc">{{a.ranking}}</view>
</view>
</template>
</view>
</view>
</view>
</template>
<script>
const app = getApp()
export default {
data() {
return {
saiName: "",
slist: []
}
},
onLoad() {
this.saiName = uni.getStorageSync("saiName");
this.slist = uni.getStorageSync("slist")?uni.getStorageSync("slist").list:[];
if(app.globalData.socketWBObj){
app.globalData.socketWBObj.closeSocket();
}
app.globalData.socketWBObj = new this.$websocketUtils(1);
//
uni.$on('socketMessage', res=>{
if(res){
var { cmd, data } = res.data !='链接成功'?JSON.parse(res.data):{};
//
if(cmd == 'score'){
uni.setStorageSync("slist",data)
uni.navigateTo({
url: '/pages/score/index'
})
}else if(cmd == 'declare') {//
uni.setStorageSync("slist",data)
uni.navigateTo({
url: '/pages/declare/index'
})
}else if(cmd == 'schedule') {//
uni.setStorageSync("slist",data)
uni.navigateTo({
url: '/pages/schedule/index'
})
}else if(cmd == 'check_in') {//
uni.navigateTo({
url: '/pages/check/index'
})
}else if(cmd == 'award') {//
this.slist = data.list
}else if(cmd == 'clear') {//
uni.navigateTo({
url: '/pages/clear/index'
})
}
}
})
},
methods: {
arrayUnique(arr, name) {
    var hash = {};
    return arr.reduce(function (item, next) {
        hash[next[name]]
            ? ""
            : (hash[next[name]] = true && item.push(next));
        return item;
    }, []);
},
}
}
</script>
<style lang="scss" scoped>
.body{
width: 100%;
min-height: calc(100vh - 136px);
background: url(@/static/bg.png) center center no-repeat;
background-size: cover;
.a{
width: 100%;
height: 108px;
text-align: center;
padding-top: 60px;
image{
width: 1390px;
height: 108px;
}
}
.b{
display: flex;
align-items: center;
padding: 0 10%;
justify-content: center;
margin-top: 20px;
.item{
flex:1;
max-width: 446px;
height: 662px;
margin: 0 5%;
background: url(@/static/bg.png) left top no-repeat;
background-size: contain;
text-align: center;
&-01{
order: 2;
}
&-02{
order: 1;
}
&-03{
order: 3;
}
image{
width: 300px;
height: 295px;
margin-top: 36px;
}
.name{
font-weight: bold;
font-size: 66px;
color: #FFFFFF;
margin-top: 76px;
}
.desc{
font-weight: bold;
font-size: 60px;
color: #FFFFFF;
margin-top: 36px;
}
}
}
}
@media screen and (min-width: 1200px) and (max-width: 1359px) {
.body{
.a{
image{
width: 1200px;
}
}
.b{
padding: 0 5%;
.item{
max-width: 300px;
.name{
font-size: 30px;
}
.desc{
font-size: 25px;
}
}
}
}
}
@media screen and (min-width: 1360px) and (max-width: 1500px) {
.body{
.a{
image{
width: 1360px;
}
}
.b{
padding: 0 5%;
.item{
max-width: 380px;
.name{
font-size: 40px;
}
.desc{
font-size: 30px;
}
}
}
}
}
</style>

@ -0,0 +1,328 @@
<template>
<view class="home">
<view class="header1">
<view class="logo">
<image src="@/static/logo.png"></image>
</view>
<view class="info">
<view class="a">弹射者|{{saiName}}</view>
<view class="b">
<text>当前时间:{{date}}</text>
{{timer}}
</view>
</view>
</view>
<view class="body">
<view class="a">
<view class="xh"><text>序号</text></view>
<view class="xm"><text>项目</text></view>
<view class="jls"><text>检录室</text></view>
<view class="dyc"><text>第一次\n广播</text></view>
<view class="dec"><text>第二次\n广播</text></view>
<view class="dsc"><text>第三次\n广播</text></view>
<view class="gb"><text>关闭\n检录室</text></view>
<view class="jcsj"><text>进场时间</text></view>
<view class="bjsj"><text>比赛时间</text></view>
<view class="jl"><text>检录状态</text></view>
</view>
<view class="b">
<view class="item item-on" v-for="i in 3" :key="i">
<view class="xh"><text>1</text></view>
<view class="xm">男子U20组100米预赛第2组</view>
<view class="jls">2</view>
<view class="dyc">1027</view>
<view class="dec">1032</view>
<view class="dsc">1037</view>
<view class="gb">1042</view>
<view class="jcsj">1047</view>
<view class="bjsj">1052</view>
<view class="jl">
<text>检录结束</text>
</view>
</view>
<view class="item item-on" v-for="i in 3" :key="i">
<view class="xh"><text>1</text></view>
<view class="xm">男子U20组100米预赛第2组</view>
<view class="jls">2</view>
<view class="dyc">1027</view>
<view class="dec">1032</view>
<view class="dsc">1037</view>
<view class="gb">1042</view>
<view class="jcsj">1047</view>
<view class="bjsj">1052</view>
<view class="jl jl-on">
<text>正在检录</text>
</view>
</view>
<view class="item" v-for="i in 3" :key="i">
<view class="xh"><text>1</text></view>
<view class="xm">男子U20组100米预赛第2组</view>
<view class="jls">2</view>
<view class="dyc">1027</view>
<view class="dec">1032</view>
<view class="dsc">1037</view>
<view class="gb">1042</view>
<view class="jcsj">1047</view>
<view class="bjsj">1052</view>
<view class="jl">
<text>等待检录</text>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
let timer = null;
const app = getApp();
export default {
data() {
return {
date: "",
timer: "",
saiName: "",
id: "",
slist: []
}
},
onLoad() {
this.saiName = uni.getStorageSync("saiName");
this.id = uni.getStorageSync("sid");
this.initTime();
if(app.globalData.socketWBObj){
app.globalData.socketWBObj.closeSocket();
}
app.globalData.socketWBObj = new this.$websocketUtils(2);
//
uni.$on('socketMessage', res=>{
if(res){
var { cmd, data } = res.data !='链接成功'?JSON.parse(res.data):{};
//
if(cmd == 'score'){
uni.setStorageSync("slist",data)
uni.navigateTo({
url: '/pages/score/index'
})
}else if(cmd == 'declare') {//
uni.setStorageSync("slist",data)
uni.navigateTo({
url: '/pages/declare/index'
})
}else if(cmd == 'schedule') {//
uni.setStorageSync("slist",data)
uni.navigateTo({
url: '/pages/schedule/index'
})
}else if(cmd == 'check_in') {//
this.slist = data.list
}else if(cmd == 'award') {//
uni.setStorageSync("slist",data)
uni.navigateTo({
url: '/pages/check/index'
})
}else if(cmd == 'clear') {//
uni.navigateTo({
url: '/pages/clear/index'
})
}
}
})
},
destroyed() {
clearInterval(timer)
},
methods: {
initTime() {
const that = this;
that.formatTime();
clearInterval(timer)
timer = setInterval(function() {
that.formatTime()
},1000)
},
/**
* 当前时间格式化 formatTime(new Data())
*/
formatTime() {
const year = new Date().getFullYear()
const month = new Date().getMonth() + 1
const day = new Date().getDate()
const hour = new Date().getHours()
const minute = new Date().getMinutes()
const second = new Date().getSeconds()
this.date = [year, month, day].map(this.formatNumber).join('-')
this.timer = [hour, minute, second].map(this.formatNumber).join(':')
},
/**
* 数字补位
*/
formatNumber(n) {
n = n.toString()
return n[1] ? n : '0' + n
},
arrayUnique(arr, name) {
    var hash = {};
    return arr.reduce(function (item, next) {
        hash[next[name]]
            ? ""
            : (hash[next[name]] = true && item.push(next));
        return item;
    }, []);
},
}
}
</script>
<style lang="scss" scoped>
.body{
width: 100%;
min-height: calc(100vh - 136px);
background-color: #06138e;
.xh{
width: 8%;
}
.xm{
width: 400px;
}
.jls{
width: 10%;
}
.dyc{
width: 8%;
}
.dec{
width: 8%;
}
.dsc{
width: 8%;
}
.gb{
width: 8%;
}
.jcsj{
width: 8%;
}
.bjsj{
width: 8%;
}
.jl{
width: 10%;
padding-right: 30px;
box-sizing: border-box;
}
.a{
width: 100%;
height: 90px;
background-color: #0A59E5;
display: flex;
align-items: center;
font-weight: 400;
font-size: 30px;
color: #FFFFFF;
text-align: center;
justify-content: space-between;
}
.b{
.item{
height: 60px;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 30px;
color: #FFFFFF;
text-align: center;
&:nth-child(2n){
background-color: #0833B5;
}
.xh{
display: flex;
align-items: center;
justify-content: center;
text{
display: block;
width: 48px;
line-height: 34px;
background: #DD1D2B;
border-radius: 5px;
}
}
.jl{
padding-right: 30px;
box-sizing: border-box;
font-size: 30px;
white-space: nowrap;
}
&-on{
.jl{
text{
display: block;
width: 170px;
line-height: 32px;
background: #DD1D2B;
color: #FFFF00;
border-radius: 5px;
}
}
.jl-on{
text{
display: block;
width: 170px;
line-height: 32px;
background: #FFFF00;
color: #DD1D2B;
border-radius: 5px;
}
}
color: #FFFF00;
}
}
}
}
@media screen and (min-width: 1200px) and (max-width: 1359px) {
.body{
.a{
white-space: nowrap;
height: 70px;
font-size: 20px;
}
.b{
.item{
font-size: 20px;
.jl{
font-size: 20px;
text{
width: 100%;
}
}
}
}
}
}
@media screen and (min-width: 1360px) and (max-width: 1500px) {
.body{
.a{
font-size: 25px;
white-space: nowrap;
height: 70px;
}
.b{
.item{
font-size: 25px;
.jl{
font-size: 20px;
text{
width: 100%;
}
}
}
}
}
}
</style>

@ -0,0 +1,102 @@
<template>
<view class="home">
<view class="header1">
<view class="logo">
<image src="@/static/logo.png"></image>
</view>
<view class="info">
<view class="a">弹射者|{{saiName}}</view>
</view>
</view>
<view class="body">
<view class="a">
<image mode="widthFix" src="@/static/logo3.png"></image>
</view>
</view>
</view>
</template>
<script>
const app = getApp();
export default {
data() {
return {
saiName: "",
id: ""
}
},
onLoad() {
this.saiName = uni.getStorageSync("saiName");
this.id = uni.getStorageSync("sid");
if(app.globalData.socketWBObj){
app.globalData.socketWBObj.closeSocket();
}
app.globalData.socketWBObj = new this.$websocketUtils(1);
//
uni.$on('socketMessage', res=>{
if(res.data){
var { cmd, data } = res.data !='链接成功'?JSON.parse(res.data):{};
//
if(cmd == 'score'){
uni.setStorageSync("slist",data)
uni.navigateTo({
url: '/pages/score/index'
})
}else if(cmd == 'declare') {//
uni.setStorageSync("slist",data)
uni.navigateTo({
url: '/pages/declare/index'
})
}else if(cmd == 'schedule') {//
uni.setStorageSync("slist",data)
uni.navigateTo({
url: '/pages/schedule/index'
})
}else if(cmd == 'check_in') {//
uni.navigateTo({
url: '/pages/check/index'
})
}else if(cmd == 'award') {//
uni.setStorageSync("slist",data)
uni.navigateTo({
url: '/pages/award/index'
})
}
}
})
},
methods: {
}
}
</script>
<style lang="scss" scoped>
.body{
width: 100%;
min-height: calc(100vh - 136px);
background: url(@/static/bg3.png) center center no-repeat;
background-size: cover;
.a{
width: 100%;
text-align: center;
padding-top: 210px;
image{
width: 1306px;
height: 513px;
}
}
}
@media screen and (min-width: 1200px) and (max-width: 1359px) {
.body{
.a{
padding-top: 190px;
image{
width: 100%;
}
}
}
}
</style>

@ -0,0 +1,312 @@
<template>
<view class="home">
<view class="header">
<view class="logo">
<image src="@/static/logo2.png"></image>
</view>
<view class="info">
<view class="a">弹射者|{{saiName}}</view>
<view class="b">{{subName}}
<view class="fs"><text>参赛名单</text>{{mr}}</view>
</view>
</view>
</view>
<view class="body">
<view class="a">
<view class="c">
<view class="d">
<view class="xh"><text>{{type==1?'道次':'序号'}}</text></view>
<view class="xm"><text>号码</text></view>
<view class="jls"><text>姓名</text></view>
<view class="dyc"><text>单位</text></view>
<view class="dsc"><text>备注</text></view>
</view>
<view class="e"></view>
</view>
</view>
<view class="b">
<view class="c">
<view class="d">
<template v-for="(a,i) in slist">
<view class="item" :class="a.id == declareInfo.id?'item-on':''" :key="i">
<view class="xh"><text>{{a.passage}}</text></view>
<view class="xm"><text>{{a.athlete_number}}</text></view>
<view class="jls">{{a.athlete_name}}</view>
<view class="dyc">{{a.club_name}}</view>
<view class="dec">{{a.remake}}</view>
</view>
</template>
</view>
<view class="e">
<image mode="widthFix" v-if="declareInfo.img_ur" :src="declareInfo.img_ur"></image>
</view>
</view>
<view class="items">
<image src="@/static/bottom.png"></image>
</view>
</view>
</view>
</view>
</template>
<script>
const app = getApp();
export default {
data() {
return {
slist: [],
saiName: "",
subName: "",
mr: "",
type: 1,
declareInfo: {}
}
},
onLoad() {
this.saiName = uni.getStorageSync("saiName");
var obj = uni.getStorageSync("slist")?uni.getStorageSync("slist"):{};
this.slist = obj.list
this.subName = obj.name+obj.group_name;
this.mr = obj.mr;
this.type = obj.type;
if(app.globalData.socketWBObj){
app.globalData.socketWBObj.closeSocket();
}
app.globalData.socketWBObj = new this.$websocketUtils(1);
//
uni.$on('socketMessage', res=>{
if(res){
var { cmd, data } = res.data !='链接成功'?JSON.parse(res.data):{};
//
if(cmd == 'score'){
uni.setStorageSync("slist",data)
uni.navigateTo({
url: '/pages/score/index'
})
}else if(cmd == 'declare') {//
var obj = data;
this.slist = obj.list
this.subName = obj.name+obj.group_name;
this.mr = obj.mr;
this.type = obj.type;
}else if(cmd == 'schedule') {//
uni.setStorageSync("slist",data)
uni.navigateTo({
url: '/pages/schedule/index'
})
}else if(cmd == 'check_in') {//
uni.setStorageSync("slist",data)
uni.navigateTo({
url: '/pages/check/index'
})
}else if(cmd == 'award') {//
uni.setStorageSync("slist",data)
uni.navigateTo({
url: '/pages/check/index'
})
}else if(cmd == 'clear') {//
uni.navigateTo({
url: '/pages/clear/index'
})
}else if(cmd == 'declareInfo') {
console.log(1111111111111,data)
this.declareInfo = data
this.$forceUpdate();
}
}
})
},
methods: {
arrayUnique(arr, name) {
    var hash = {};
    return arr.reduce(function (item, next) {
        hash[next[name]]
            ? ""
            : (hash[next[name]] = true && item.push(next));
        return item;
    }, []);
},
}
}
</script>
<style lang="scss" scoped>
.body{
width: 100%;
min-height: calc(100vh - 184px);
background: url(@/static/bg3.png) center center no-repeat;
background-size: cover;
.xh{
width: 10%;
}
.xm{
width: 15%;
text-align: left;
}
.jls{
width: 20%;
text-align: left;
}
.dyc{
width: 20%;
text-align: left;
}
.dec{
width: 20%;
text-align: left;
}
.dsc{
width: 15%;
text-align: left;
}
.a{
width: 100%;
background-color: #FFFFFF;
font-weight: 400;
font-size: 50px;
color: #DD1D2B;
text-align: center;
.d{
display: flex;
height: 66px;
align-items: center;
justify-content: space-between;
}
}
.c{
width: 100%;
display: flex;
align-items: center;
.d{
flex: 1;
}
.e{
width: 420px;
padding: 0 10px;
box-sizing: border-box;
display: flex;
align-items: center;
image{
width: 100%;
height: 100%;
}
}
}
.b{
.c{
align-items: inherit;
height: calc(100vh - 184px - 176px);
}
.d{
border-right: 1px solid #6286d7;
}
.items{
height: 88px;
display: flex;
align-items: center;
justify-content: flex-end;
border-top: 1px solid #6286d7;
image{
width: 415px;
height: 45px;
margin-right: 45rpx;
}
.timer{
font-weight: 500;
font-size: 36px;
color: #FFFFFF;
margin-left: 24px;
}
}
.item{
height: 82px;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 40px;
color: #FFFFFF;
text-align: center;
border-top: 1px solid #6286d7;
&-on{
background-color: #6286d7;
}
.xh{
display: flex;
align-items: center;
justify-content: center;
text{
display: block;
width: 94px;
line-height: 60px;
background: #DD1D2B;
border-radius: 5px;
}
}
.xm{
display: flex;
align-items: center;
text-align: center;
justify-content: center;
text{
display: block;
width: 140px;
line-height: 60px;
background: #f36337;
border-radius: 10px;
}
}
}
}
}
@media screen and (min-width: 1200px) and (max-width: 1359px) {
.body{
.a{
font-size: 36px;
}
.b{
.item{
font-size: 26px;
.xh{
text{
width: 60px;
}
}
}
}
.c .e{
width: 300px;
}
.dyc{
white-space: nowrap;
}
}
}
@media screen and (min-width: 1360px) and (max-width: 1500px) {
.body{
.a{
font-size: 36px;
}
.b{
.item{
font-size: 36px;
.xh{
text{
width: 60px;
}
}
}
}
.c .e{
width: 360px;
}
.dyc{
white-space: nowrap;
}
}
}
</style>

@ -0,0 +1,127 @@
<template>
<view class="home">
<view class="header1">
<view class="logo">
<image src="@/static/logo.png"></image>
</view>
<view class="info">
<view class="a">弹射者</view>
</view>
</view>
<view class="body">
<view class="a">
<view class="item">赛事ID<input type="text" v-model="num" placeholder="请输入赛事id" /></view>
</view>
<view class="btn" @click="toEnter()">立即进入</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
num: "",
saiName: ""
}
},
onShow() {
uni.removeStorageSync("saiName")
uni.removeStorageSync("sid")
uni.removeStorageSync("slist")
},
methods: {
async getInfo() {
const that = this;
uni.request({
url: "https://sports.njrenzhou.cn/api/matchsDetails",
method: "post",
data: {
matchs_id: this.num
},
success(res) {
if(res.data.code == 200){
that.saiName = res.data.name
uni.setStorageSync("saiName",res.data.data.name);
uni.setStorageSync("sid", that.num)
uni.navigateTo({
url: "/pages/clear/index?id="+that.num
})
}
},
fail(err) {
console.log(err)
}
})
},
toEnter() {
if(!this.num) {
uni.showToast({
title: "请输入赛事ID",
icon: "none"
})
return ;
}
this.getInfo();
}
}
}
</script>
<style lang="scss" scoped>
.body{
width: 100%;
min-height: calc(100vh - 136px);
background: url(@/static/bg3.png) center center no-repeat;
background-size: cover;
.btn{
width: 420px;
line-height: 60px;
background-color: #2681ea;
text-align: center;
border-radius: 5px;
margin: 0 auto;
font-size: 20px;
color: #fff;
margin-top: 120px;
cursor: pointer;
}
.a{
padding-top: 200px;
overflow: hidden;
.item{
width: 420px;
line-height: 60px;
background-color: #fff;
text-align: center;
border-radius: 5px;
display: flex;
margin: 0 auto;
padding: 0 20px;
box-sizing: border-box;
font-size: 20px;
color: #212121;
input{
flex: 1;
height: 60px;
text-align: left;
margin-left: 20px;
font-size: 20px;
}
}
}
}
@media screen and (min-width: 1200px) and (max-width: 1359px) {
.body{
.a{
padding-top: 190px;
image{
width: 100%;
}
}
}
}
</style>

@ -0,0 +1,127 @@
<template>
<view class="home">
<view class="header1">
<view class="logo">
<image src="@/static/logo.png"></image>
</view>
<view class="info">
<view class="a">弹射者</view>
</view>
</view>
<view class="body">
<view class="a">
<view class="item">赛事ID<input type="text" v-model="num" placeholder="请输入赛事id" /></view>
</view>
<view class="btn" @click="toEnter()">立即进入</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
num: "",
saiName: ""
}
},
onShow() {
uni.removeStorageSync("saiName")
uni.removeStorageSync("sid")
uni.removeStorageSync("slist")
},
methods: {
async getInfo() {
const that = this;
uni.request({
url: "https://sports.njrenzhou.cn/api/matchsDetails",
method: "post",
data: {
matchs_id: this.num
},
success(res) {
if(res.data.code == 200){
that.saiName = res.data.name
uni.setStorageSync("saiName",res.data.data.name);
uni.setStorageSync("sid", that.num)
uni.navigateTo({
url: "/pages/check/index?id="+that.num
})
}
},
fail(err) {
console.log(err)
}
})
},
toEnter() {
if(!this.num) {
uni.showToast({
title: "请输入赛事ID",
icon: "none"
})
return ;
}
this.getInfo();
}
}
}
</script>
<style lang="scss" scoped>
.body{
width: 100%;
min-height: calc(100vh - 136px);
background: url(@/static/bg3.png) center center no-repeat;
background-size: cover;
.btn{
width: 420px;
line-height: 60px;
background-color: #2681ea;
text-align: center;
border-radius: 5px;
margin: 0 auto;
font-size: 20px;
color: #fff;
margin-top: 120px;
cursor: pointer;
}
.a{
padding-top: 200px;
overflow: hidden;
.item{
width: 420px;
line-height: 60px;
background-color: #fff;
text-align: center;
border-radius: 5px;
display: flex;
margin: 0 auto;
padding: 0 20px;
box-sizing: border-box;
font-size: 20px;
color: #212121;
input{
flex: 1;
height: 60px;
text-align: left;
margin-left: 20px;
font-size: 20px;
}
}
}
}
@media screen and (min-width: 1200px) and (max-width: 1359px) {
.body{
.a{
padding-top: 190px;
image{
width: 100%;
}
}
}
}
</style>

@ -0,0 +1,173 @@
<template>
<view class="home">
<view class="header">
<view class="logo">
<image src="@/static/logo2.png"></image>
</view>
<view class="info">
<view class="a">弹射者{{"|"+saiName}}</view>
<view class="b">{{subName}}</view>
</view>
</view>
<view class="body">
<view class="list">
<view class="item" v-for="(a,i) in slist" :key="i">
<view class="a">{{a.time}}</view>
<view class="b">{{a.name}}</view>
<view class="c">{{a.type_name}}</view>
</view>
</view>
<view class="items">
<image src="@/static/bottom.png"></image>
</view>
</view>
</view>
</template>
<script>
const app = getApp()
export default {
data() {
return {
slist: [],
saiName: ""
}
},
onLoad() {
this.saiName = uni.getStorageSync("saiName");
var obj = uni.getStorageSync("slist")?uni.getStorageSync("slist"):{};
this.slist = obj.list;
this.subName = obj.name+'('+obj.time+obj.type_name+')'+" 日程";
if(app.globalData.socketWBObj){
app.globalData.socketWBObj.closeSocket();
}
app.globalData.socketWBObj = new this.$websocketUtils(1);
//
uni.$on('socketMessage', res=>{
if(res){
var { cmd, data } = res.data !='链接成功'?JSON.parse(res.data):{};
//
if(cmd == 'score'){
uni.setStorageSync("slist",data)
uni.navigateTo({
url: '/pages/score/index'
})
}else if(cmd == 'declare') {//
uni.setStorageSync("slist",data)
uni.navigateTo({
url: '/pages/declare/index'
})
}else if(cmd == 'schedule') {//
var obj = data;
this.slist = obj.list;
this.subName = obj.name+'('+obj.time+obj.type_name+')'+" 日程";
}else if(cmd == 'check_in') {//
uni.setStorageSync("slist",data)
uni.navigateTo({
url: '/pages/check/index'
})
}else if(cmd == 'award') {//
uni.setStorageSync("slist",data)
uni.navigateTo({
url: '/pages/check/index'
})
}else if(cmd == 'clear') {//
uni.navigateTo({
url: '/pages/clear/index'
})
}
}
})
},
methods: {
arrayUnique(arr, name) {
    var hash = {};
    return arr.reduce(function (item, next) {
        hash[next[name]]
            ? ""
            : (hash[next[name]] = true && item.push(next));
        return item;
    }, []);
},
}
}
</script>
<style lang="scss" scoped>
.body{
min-height: calc(100vh - 186px);
background: url(@/static/bg3.png) center center no-repeat;
background-size: cover;
margin-top: 2px;
.items{
height: 88px;
display: flex;
align-items: center;
justify-content: flex-end;
border-top: 1px solid #6286d7;
image{
width: 415px;
height: 45px;
margin-right: 45rpx;
}
}
.list{
height: calc(100vh - 186px - 176px);
}
.item{
padding: 10px 0;
border-top: 1px solid #6286d7;
display: flex;
align-items: center;
justify-content: space-between;
&:first-child{
border-top: 1px solid transparent;
}
.a{
width: 203px;
line-height: 60px;
font-weight: bold;
font-size: 51rpx;
color: #FFFFFF;
text-align: center;
margin: 0 50px;
background-color: #DD1D2B;
border-radius: 10rpx;
}
.b{
flex: 1;
font-size: 51px;
color: #FFFFFF;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
margin-left: 5%;
}
.c{
width: 200px;
font-size: 51px;
color: #FFFFFF;
margin-right: 5%;
}
}
}
@media screen and (min-width: 1200px) and (max-width: 1359px) {
.body{
.item{
.a{
width: 170px;
font-size: 30px;
}
.b{
font-size: 30px;
}
.c{
font-size: 30px;
}
}
}
}
</style>

@ -0,0 +1,327 @@
<template>
<view class="home">
<view class="header">
<view class="logo">
<image src="@/static/logo2.png"></image>
</view>
<view class="info">
<view class="a">弹射者|{{saiName}}</view>
<view class="b">{{subName}}
<view class="fs"><text>{{mr}}</text>{{fs}}</view>
</view>
</view>
</view>
<view class="body">
<view class="a">
<view class="xh"><text>名次</text></view>
<view class="xm"><text>号码</text></view>
<view class="jls"><text>姓名</text></view>
<view class="dyc"><text>单位</text></view>
<view class="dec"><text>成绩</text></view>
<view class="dsc"><text>备注</text></view>
</view>
<view class="b">
<view class="list">
<view class="item" v-for="(a,i) in slist" :key="i">
<view class="xh"><text>{{a.passage}}</text></view>
<view class="xm"><text>{{a.athlete_number}}</text></view>
<view class="jls">{{a.athlete_name}}</view>
<view class="dyc">{{a.club_name}}</view>
<view class="dec">{{a.score}}<text v-if="a.score_remake">{{a.score_remake}}</text></view>
<view class="dsc">{{a.remake}}</view>
</view>
</view>
<view class="items">
<view class="timer">公告时间{{this.timer}}</view>
<image src="@/static/bottom.png"></image>
</view>
</view>
</view>
</view>
</template>
<script>
const app = getApp();
let timer = null;
export default {
data() {
return {
slist: [],
saiName: "",
subName: "",
mr: "",
type: 1,
fs: "",
timer: ""
}
},
onLoad() {
this.saiName = uni.getStorageSync("saiName")
var obj = uni.getStorageSync("slist")?uni.getStorageSync("slist"):{};
console.log(obj.list)
this.slist = obj.list
this.subName = obj.name+obj.group_name;
this.mr = obj.mr;
this.type = obj.type;
this.fs = obj.fs;
this.initTime();
if(app.globalData.socketWBObj){
app.globalData.socketWBObj.closeSocket();
}
app.globalData.socketWBObj = new this.$websocketUtils(1);
//
uni.$on('socketMessage', res=>{
if(res){
var { cmd, data } = res.data !='链接成功'?JSON.parse(res.data):{};
//
if(cmd == 'score'){
this.slist = data.list
}else if(cmd == 'declare') {//
uni.setStorageSync("slist",data)
uni.navigateTo({
url: '/pages/declare/index'
})
}else if(cmd == 'schedule') {//
uni.setStorageSync("slist",data)
uni.navigateTo({
url: '/pages/schedule/index'
})
}else if(cmd == 'check_in') {//
uni.navigateTo({
url: '/pages/check/index'
})
}else if(cmd == 'award') {//
uni.setStorageSync("slist",data)
uni.navigateTo({
url: '/pages/declare/index'
})
}else if(cmd == 'clear') {//
uni.navigateTo({
url: '/pages/clear/index'
})
}
}
})
},
destroyed() {
clearInterval(timer)
},
methods: {
arrayUnique(arr, name) {
    var hash = {};
    return arr.reduce(function (item, next) {
        hash[next[name]]
            ? ""
            : (hash[next[name]] = true && item.push(next));
        return item;
    }, []);
},
initTime() {
const that = this;
that.formatTime();
clearInterval(timer)
timer = setInterval(function() {
that.formatTime()
},1000)
},
/**
* 当前时间格式化 formatTime(new Data())
*/
formatTime() {
const year = new Date().getFullYear()
const month = new Date().getMonth() + 1
const day = new Date().getDate()
const hour = new Date().getHours()
const minute = new Date().getMinutes()
const second = new Date().getSeconds()
this.timer = [year, month, day].map(this.formatNumber).join('-') + ' ' + [hour, minute, second].map(this.formatNumber).join(':')
},
/**
* 数字补位
*/
formatNumber(n) {
n = n.toString()
return n[1] ? n : '0' + n
}
}
}
</script>
<style lang="scss" scoped>
.body{
width: 100%;
min-height: calc(100vh - 184px);
background: url(@/static/bg3.png) center center no-repeat;
background-size: cover;
.xh{
width: 10%;
}
.xm{
width: 15%;
text-align: left;
}
.jls{
width: 20%;
text-align: left;
}
.dyc{
width: 20%;
text-align: left;
}
.dec{
width: 20%;
text-align: left;
}
.dsc{
width: 15%;
text-align: left;
}
.a{
width: 100%;
height: 66px;
background-color: #FFFFFF;
display: flex;
align-items: center;
font-weight: 400;
font-size: 50px;
color: #DD1D2B;
text-align: center;
justify-content: space-between;
}
.b{
.items{
height: 88px;
display: flex;
align-items: center;
justify-content: space-between;
border-top: 1px solid #6286d7;
image{
width: 415px;
height: 45px;
margin-right: 45rpx;
}
.timer{
font-weight: 500;
font-size: 36px;
color: #FFFFFF;
margin-left: 24px;
}
}
.list{
height: calc(100vh - 184px - 176px);
}
.item{
height: 82px;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 40px;
color: #FFFFFF;
text-align: center;
border-top: 1px solid #6286d7;
&:first-child{
border-top-color: transparent;
}
.xh{
display: flex;
align-items: center;
justify-content: center;
text{
display: block;
width: 94px;
line-height: 60px;
background: #DD1D2B;
border-radius: 5px;
}
}
.dec{
display: flex;
align-items: center;
text{
padding: 0 10px;
display: block;
font-weight: bold;
border-radius: 10px;
font-size: 38px;
color: #000000;
line-height: 50px;
margin-left: 20px;
background: linear-gradient(to bottom, #d3b580, #d67a69);
}
}
.xm{
text-align: center;
display: flex;
align-items: center;
justify-content: flex-start;
text{
display: block;
width: 140px;
line-height: 60px;
background: #f36337;
border-radius: 10px;
}
}
}
}
}
@media screen and (min-width: 1200px) and (max-width: 1359px) {
.body{
.a{
font-size: 26px;
}
.b{
.item{
font-size: 26px;
.xh{
text{
width: 60px;
}
}
.dec{
text{
font-size: 26px;
}
}
}
.items{
.timer{
font-size: 26px;
}
}
}
.c .e{
width: 360px;
}
.dyc{
white-space: nowrap;
}
}
}
@media screen and (min-width: 1360px) and (max-width: 1500px) {
.body{
.a{
font-size: 36px;
}
.b{
.item{
font-size: 36px;
.xh{
text{
width: 60px;
}
}
}
}
.c .e{
width: 360px;
}
.dyc{
white-space: nowrap;
}
}
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 486 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 700 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 957 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 907 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 419 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 289 KiB

@ -0,0 +1,10 @@
uni.addInterceptor({
returnValue (res) {
if (!(!!res && (typeof res === "object" || typeof res === "function") && typeof res.then === "function")) {
return res;
}
return new Promise((resolve, reject) => {
res.then((res) => res[0] ? reject(res[0]) : resolve(res[1]));
});
},
});

@ -0,0 +1,76 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
$uni-color-primary: #007aff;
$uni-color-success: #4cd964;
$uni-color-warning: #f0ad4e;
$uni-color-error: #dd524d;
/* 文字基本颜色 */
$uni-text-color:#333;//基本色
$uni-text-color-inverse:#fff;//反色
$uni-text-color-grey:#999;//辅助灰色如加载更多的提示信息
$uni-text-color-placeholder: #808080;
$uni-text-color-disable:#c0c0c0;
/* 背景颜色 */
$uni-bg-color:#ffffff;
$uni-bg-color-grey:#f8f8f8;
$uni-bg-color-hover:#f1f1f1;//点击状态颜色
$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色
/* 边框颜色 */
$uni-border-color:#c8c7cc;
/* 尺寸变量 */
/* 文字尺寸 */
$uni-font-size-sm:12px;
$uni-font-size-base:14px;
$uni-font-size-lg:16px;
/* 图片尺寸 */
$uni-img-size-sm:20px;
$uni-img-size-base:26px;
$uni-img-size-lg:40px;
/* Border Radius */
$uni-border-radius-sm: 2px;
$uni-border-radius-base: 3px;
$uni-border-radius-lg: 6px;
$uni-border-radius-circle: 50%;
/* 水平间距 */
$uni-spacing-row-sm: 5px;
$uni-spacing-row-base: 10px;
$uni-spacing-row-lg: 15px;
/* 垂直间距 */
$uni-spacing-col-sm: 4px;
$uni-spacing-col-base: 8px;
$uni-spacing-col-lg: 12px;
/* 透明度 */
$uni-opacity-disabled: 0.3; // 组件禁用态的透明度
/* 文章场景相关 */
$uni-color-title: #2C405A; // 文章标题颜色
$uni-font-size-title:20px;
$uni-color-subtitle: #555555; // 二级标题颜色
$uni-font-size-subtitle:26px;
$uni-color-paragraph: #3F536E; // 文章段落颜色
$uni-font-size-paragraph:15px;

@ -0,0 +1,2 @@
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>sport_big</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/static/index.b0707a6a.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.77e5a542.js></script><script src=/static/js/index.0dea3b84.js></script></body></html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 486 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 700 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 957 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 907 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 486 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 700 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 957 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 419 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-clear-index"],{"0d7e":function(t,a,e){var n=e("34ec");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var i=e("4f06").default;i("4b28d94a",n,!0,{sourceMap:!1,shadowMode:!1})},"11df":function(t,a,e){"use strict";e.r(a);var n=e("4d22"),i=e("dfec");for(var s in i)"default"!==s&&function(t){e.d(a,t,(function(){return i[t]}))}(s);e("a9ab");var r,c=e("f0c5"),d=Object(c["a"])(i["default"],n["b"],n["c"],!1,null,"fd999252",null,!1,n["a"],r);a["default"]=d.exports},"1de5":function(t,a,e){"use strict";t.exports=function(t,a){return a||(a={}),t=t&&t.__esModule?t.default:t,"string"!==typeof t?t:(/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),a.hash&&(t+=a.hash),/["'() \t\n]/.test(t)||a.needQuotes?'"'.concat(t.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):t)}},"34ec":function(t,a,e){var n=e("24fb"),i=e("1de5"),s=e("725c");a=n(!1);var r=i(s);a.push([t.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 行为相关颜色 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */.body[data-v-fd999252]{width:100%;min-height:calc(100vh - 136px);background:url('+r+") 50% no-repeat;background-size:cover}.body .a[data-v-fd999252]{width:100%;text-align:center;padding-top:210px}.body .a uni-image[data-v-fd999252]{width:1306px;height:513px}@media screen and (min-width:1200px) and (max-width:1359px){.body .a[data-v-fd999252]{padding-top:190px}.body .a uni-image[data-v-fd999252]{width:100%}}",""]),t.exports=a},"4d22":function(t,a,e){"use strict";var n;e.d(a,"b",(function(){return i})),e.d(a,"c",(function(){return s})),e.d(a,"a",(function(){return n}));var i=function(){var t=this,a=t.$createElement,n=t._self._c||a;return n("v-uni-view",{staticClass:"home"},[n("v-uni-view",{staticClass:"header1"},[n("v-uni-view",{staticClass:"logo"},[n("v-uni-image",{attrs:{src:e("5286")}})],1),n("v-uni-view",{staticClass:"info"},[n("v-uni-view",{staticClass:"a"},[t._v("弹射者|"+t._s(t.saiName))])],1)],1),n("v-uni-view",{staticClass:"body"},[n("v-uni-view",{staticClass:"a"},[n("v-uni-image",{attrs:{mode:"widthFix",src:e("6dd0")}})],1)],1)],1)},s=[]},5286:function(t,a,e){t.exports=e.p+"static/img/logo.a8ef51b9.png"},"6dd0":function(t,a,e){t.exports=e.p+"static/img/logo3.9c8258d0.png"},"725c":function(t,a,e){t.exports=e.p+"static/img/bg3.891accd5.png"},a9ab:function(t,a,e){"use strict";var n=e("0d7e"),i=e.n(n);i.a},dfec:function(t,a,e){"use strict";e.r(a);var n=e("f2af"),i=e.n(n);for(var s in n)"default"!==s&&function(t){e.d(a,t,(function(){return n[t]}))}(s);a["default"]=i.a},f2af:function(t,a,e){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var n=getApp(),i={data:function(){return{saiName:"",id:""}},onLoad:function(){this.saiName=uni.getStorageSync("saiName"),this.id=uni.getStorageSync("sid"),n.globalData.socketWBObj&&n.globalData.socketWBObj.closeSocket(),n.globalData.socketWBObj=new this.$websocketUtils(1),uni.$on("socketMessage",(function(t){if(t.data){var a="链接成功"!=t.data?JSON.parse(t.data):{},e=a.cmd,n=a.data;"score"==e?(uni.setStorageSync("slist",n),uni.navigateTo({url:"/pages/score/index"})):"declare"==e?(uni.setStorageSync("slist",n),uni.navigateTo({url:"/pages/declare/index"})):"schedule"==e?(uni.setStorageSync("slist",n),uni.navigateTo({url:"/pages/schedule/index"})):"check_in"==e?uni.navigateTo({url:"/pages/check/index"}):"award"==e&&(uni.setStorageSync("slist",n),uni.navigateTo({url:"/pages/award/index"}))}}))},methods:{}};a.default=i}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 419 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 289 KiB

@ -0,0 +1,136 @@
class websocketUtils {
constructor(type) {
this.url = 'wss://sports.njrenzhou.cn/ws' //ws地址 拼接一下 此处用的是openId
this.data = null
this.isOpenSocket = false //避免重复连接
this.timeout = 10 //隔多久执行检测 单位秒(s)
this.sid = uni.getStorageSync("sid") //赛事id
this.type = type
this.heartbeatInterval = null //检测服务器端是否还存活
this.reconnectTimeOut = null //重连之后隔多久才再次重连
try {
return this.connectSocketInit()
} catch (e) {
console.log('===========连接错误捕获catch====================',e);
this.isOpenSocket = false
this.reconnect();
}
}
// 创建websocket连接
connectSocketInit() {
this.socketTask = uni.connectSocket({
url: this.url,
header: {
//头部可以添加所需字段如token
'content-type': 'application/json'
},
success:()=>{
console.log("============正准备建立websocket中================");
// 返回实例
return this.socketTask
},
});
this.socketTask.onOpen((res) => {
console.log("==============WebSocket连接正常=============");
clearTimeout(this.reconnectTimeOut)
clearInterval(this.heartbeatInterval)
this.isOpenSocket = true;
if(this.type ==2){
if(this.sid){
this.startCheck();
}
}else{
if(this.sid){
this.startStatement();
}
}
this.start();
// 只有连接正常打开中 ,才能正常收到消息
this.socketTask.onMessage((res) => {
console.log(res.data,'===============接收===onMessage===============')
//全局注册uniapp事件,在任何页面都能接受到
uni.$emit('socketMessage', res)
});
})
// socket关闭了会执行 此处
this.socketTask.onClose((e) => {
console.log("========已经被关闭了====================",e)
this.isOpenSocket = false;
// 加了flag判断是否为手动(用户主动关闭)
uni.$emit('onClose', 1)
e && e.reason == 'user' ? '' : this.reconnect();
})
}
//发送消息
send(value){
// 连接正常打开时 ,才能正常成功发送消息
this.socketTask.send({
data: value,
async success() {
console.log("===========消息发送成功===============");
},
});
}
//开启心跳检测
start(){
this.data={cmd:"ping"}
this.heartbeatInterval = setInterval(()=>{
console.log('======start====开启心跳检测====',this.data)
this.send(JSON.stringify(this.data));
},this.timeout * 1000)
}
startStatement() {
this.data={cmd:"statement",'matchs_id': this.sid}
this.send(JSON.stringify(this.data));
}
startCheck() {
this.data={cmd:"check",'matchs_id': this.sid}
this.send(JSON.stringify(this.data));
}
//重新连接
reconnect(){
//停止发送心跳
clearInterval(this.heartbeatInterval)
//如果不是人为关闭的话,进行重连
if(!this.isOpenSocket ){
this.reconnectTimeOut = setTimeout(()=>{
this.connectSocketInit();
},3000)
}
}
// 关闭 WebSocket 连接
closeSocket(reason = '关闭') {
const _this = this
this.socketTask.close({
reason,
success() {
_this.data = null
_this.isOpenSocket = false
_this.socketTask = null
clearTimeout(_this.reconnectTimeOut)
clearInterval(_this.heartbeatInterval)
console.log('===============关闭 WebSocket 成功===================')
// setTimeout(()=>{
// uni.navigateTo({
// url: "/pages/index/index"
// })
// },1000)
},
fail() {
console.log('===================关闭 WebSocket 失败=====================')
}
})
}
//将获取的消息导出外部
exportMessage(callback) {
this.socketTask.onMessage((res) => {
console.log(res,'===============exportMessage============')
return callback(res)
})
}
}
module.exports = websocketUtils
Loading…
Cancel
Save