xiongzhu hace 7 años
padre
commit
8b7e1b463e
Se han modificado 62 ficheros con 974 adiciones y 616 borrados
  1. 0 1
      config.xml
  2. 8 8
      platforms/android/android.json
  3. 1 1
      platforms/android/assets/www/dianjing.html
  4. 0 0
      platforms/android/assets/www/static/css/app.a84b2165ee004820129caadb2e5a9614.css
  5. 0 0
      platforms/android/assets/www/static/css/app.a84b2165ee004820129caadb2e5a9614.css.map
  6. 0 0
      platforms/android/assets/www/static/css/app.d33ae8e56dbfe5ce2e78a9c101c93f6f.css
  7. 0 0
      platforms/android/assets/www/static/css/app.d33ae8e56dbfe5ce2e78a9c101c93f6f.css.map
  8. BIN
      platforms/android/assets/www/static/img/icon_alert.16e4849.png
  9. BIN
      platforms/android/assets/www/static/img/icon_alert.549bd97.png
  10. 0 0
      platforms/android/assets/www/static/js/app.474b7b2d0b9b669a22a1.js
  11. 0 0
      platforms/android/assets/www/static/js/app.474b7b2d0b9b669a22a1.js.map
  12. 0 0
      platforms/android/assets/www/static/js/app.8b6fad880b0ac24bba84.js
  13. 0 0
      platforms/android/assets/www/static/js/app.8b6fad880b0ac24bba84.js.map
  14. 0 0
      platforms/android/assets/www/static/js/manifest.3ad1d5771e9b13dbdad2.js.map
  15. 1 1
      platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/drew.xcuserdatad/xcschemes/xcschememanagement.plist
  16. 5 5
      platforms/ios/ios.json
  17. 1 1
      platforms/ios/www/dianjing.html
  18. 0 0
      platforms/ios/www/static/css/app.a84b2165ee004820129caadb2e5a9614.css
  19. 0 0
      platforms/ios/www/static/css/app.a84b2165ee004820129caadb2e5a9614.css.map
  20. 0 0
      platforms/ios/www/static/css/app.d33ae8e56dbfe5ce2e78a9c101c93f6f.css
  21. 0 0
      platforms/ios/www/static/css/app.d33ae8e56dbfe5ce2e78a9c101c93f6f.css.map
  22. BIN
      platforms/ios/www/static/img/icon_alert.16e4849.png
  23. BIN
      platforms/ios/www/static/img/icon_alert.549bd97.png
  24. 0 0
      platforms/ios/www/static/js/app.474b7b2d0b9b669a22a1.js
  25. 0 0
      platforms/ios/www/static/js/app.474b7b2d0b9b669a22a1.js.map
  26. 0 0
      platforms/ios/www/static/js/app.8b6fad880b0ac24bba84.js
  27. 0 0
      platforms/ios/www/static/js/app.8b6fad880b0ac24bba84.js.map
  28. 0 0
      platforms/ios/www/static/js/manifest.3ad1d5771e9b13dbdad2.js.map
  29. BIN
      platforms/ios/电竞.xcworkspace/xcuserdata/drew.xcuserdatad/UserInterfaceState.xcuserstate
  30. 1 1
      platforms/ios/电竞/Classes/MainViewController.m
  31. 0 1
      platforms/ios/电竞/config.xml
  32. 1 1
      platforms/ios/电竞/电竞-Info.plist
  33. BIN
      vue/src/assets/icon_add.png
  34. BIN
      vue/src/assets/icon_alert.png
  35. BIN
      vue/src/assets/icon_contact.png
  36. 156 0
      vue/src/components/Contact/Main.vue
  37. 18 0
      vue/src/components/Contact/index.js
  38. 6 2
      vue/src/components/InputX.vue
  39. 242 0
      vue/src/components/MatchData.vue
  40. 0 1
      vue/src/components/Modal/main.vue
  41. 428 0
      vue/src/components/UploadScore/Main.vue
  42. 20 0
      vue/src/components/UploadScore/index.js
  43. 1 1
      vue/src/eventBus/index.js
  44. 0 1
      vue/src/main.js
  45. 2 1
      vue/src/main.less
  46. 8 8
      vue/src/pages/Apply.vue
  47. 0 551
      vue/src/pages/Map.vue
  48. 8 22
      vue/src/pages/MatchDetail.vue
  49. 65 7
      vue/src/pages/Mine.vue
  50. 1 1
      vue/src/pages/Search.vue
  51. 1 1
      www/dianjing.html
  52. 0 0
      www/static/css/app.a84b2165ee004820129caadb2e5a9614.css
  53. 0 0
      www/static/css/app.a84b2165ee004820129caadb2e5a9614.css.map
  54. 0 0
      www/static/css/app.d33ae8e56dbfe5ce2e78a9c101c93f6f.css
  55. 0 0
      www/static/css/app.d33ae8e56dbfe5ce2e78a9c101c93f6f.css.map
  56. BIN
      www/static/img/icon_alert.16e4849.png
  57. BIN
      www/static/img/icon_alert.549bd97.png
  58. 0 0
      www/static/js/app.474b7b2d0b9b669a22a1.js
  59. 0 0
      www/static/js/app.474b7b2d0b9b669a22a1.js.map
  60. 0 0
      www/static/js/app.8b6fad880b0ac24bba84.js
  61. 0 0
      www/static/js/app.8b6fad880b0ac24bba84.js.map
  62. 0 0
      www/static/js/manifest.3ad1d5771e9b13dbdad2.js.map

+ 0 - 1
config.xml

@@ -50,7 +50,6 @@
     </platform>
     <platform name="ios">
         <preference name="StatusBarOverlaysWebView" value="false" />
-        <preference name="KeyboardShrinksView" value="true" />
         <config-file parent="CFBundleLocalizations" target="*-Info.plist">
             <array>
                 <string>zh_CN</string>

+ 8 - 8
platforms/android/android.json

@@ -10,35 +10,35 @@
           "/*": [
             {
               "xml": "<uses-permission android:name=\"android.permission.INTERNET\" />",
-              "count": 42
+              "count": 54
             },
             {
               "xml": "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\" />",
-              "count": 21
+              "count": 27
             },
             {
               "xml": "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\" />",
-              "count": 21
+              "count": 27
             },
             {
               "xml": "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\" />",
-              "count": 22
+              "count": 28
             },
             {
               "xml": "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\" />",
-              "count": 21
+              "count": 27
             },
             {
               "xml": "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\" />",
-              "count": 22
+              "count": 28
             },
             {
               "xml": "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\" />",
-              "count": 21
+              "count": 27
             },
             {
               "xml": "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\" />",
-              "count": 21
+              "count": 27
             },
             {
               "xml": "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\" />",

+ 1 - 1
platforms/android/assets/www/dianjing.html

@@ -1 +1 @@
-<!DOCTYPE html><html><head><meta charset=utf-8><meta name=format-detection content="telephone=no"><meta name=apple-mobile-web-app-capable content=yes><meta name=viewport content="initial-scale=1,width=device-width,viewport-fit=cover,user-scalable=no"><script src=./cordova.js></script><title>dianjing</title><link href=./static/css/app.d33ae8e56dbfe5ce2e78a9c101c93f6f.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.2ca68079c50dfd870142.js></script><script type=text/javascript src=./static/js/app.474b7b2d0b9b669a22a1.js></script></body></html>
+<!DOCTYPE html><html><head><meta charset=utf-8><meta name=format-detection content="telephone=no"><meta name=apple-mobile-web-app-capable content=yes><meta name=viewport content="initial-scale=1,width=device-width,viewport-fit=cover,user-scalable=no"><script src=./cordova.js></script><title>dianjing</title><link href=./static/css/app.a84b2165ee004820129caadb2e5a9614.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.2ca68079c50dfd870142.js></script><script type=text/javascript src=./static/js/app.8b6fad880b0ac24bba84.js></script></body></html>

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
platforms/android/assets/www/static/css/app.a84b2165ee004820129caadb2e5a9614.css


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
platforms/android/assets/www/static/css/app.a84b2165ee004820129caadb2e5a9614.css.map


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
platforms/android/assets/www/static/css/app.d33ae8e56dbfe5ce2e78a9c101c93f6f.css


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
platforms/android/assets/www/static/css/app.d33ae8e56dbfe5ce2e78a9c101c93f6f.css.map


BIN
platforms/android/assets/www/static/img/icon_alert.16e4849.png


BIN
platforms/android/assets/www/static/img/icon_alert.549bd97.png


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
platforms/android/assets/www/static/js/app.474b7b2d0b9b669a22a1.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
platforms/android/assets/www/static/js/app.474b7b2d0b9b669a22a1.js.map


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
platforms/android/assets/www/static/js/app.8b6fad880b0ac24bba84.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
platforms/android/assets/www/static/js/app.8b6fad880b0ac24bba84.js.map


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
platforms/android/assets/www/static/js/manifest.3ad1d5771e9b13dbdad2.js.map


+ 1 - 1
platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/drew.xcuserdatad/xcschemes/xcschememanagement.plist

@@ -7,7 +7,7 @@
 		<key>Cordova.xcscheme</key>
 		<dict>
 			<key>orderHint</key>
-			<integer>3</integer>
+			<integer>2</integer>
 		</dict>
 		<key>CordovaLib.xcscheme</key>
 		<dict>

+ 5 - 5
platforms/ios/ios.json

@@ -10,31 +10,31 @@
           "CFBundleLocalizations": [
             {
               "xml": "<array><string>zh_CN</string></array>",
-              "count": 13
+              "count": 33
             }
           ],
           "NSCameraUsageDescription": [
             {
               "xml": "<string>需要相机权限才能继续使用</string>",
-              "count": 13
+              "count": 33
             }
           ],
           "NSPhotoLibraryUsageDescription": [
             {
               "xml": "<string>需要相册权限才能继续使用</string>",
-              "count": 13
+              "count": 33
             }
           ],
           "NSLocationWhenInUseUsageDescription": [
             {
               "xml": "<string>您的当前位置将会在地图上显示,并且用于获取周边的园区数据</string>",
-              "count": 13
+              "count": 33
             }
           ],
           "ITSAppUsesNonExemptEncryption": [
             {
               "xml": "<false />",
-              "count": 13
+              "count": 33
             }
           ]
         }

+ 1 - 1
platforms/ios/www/dianjing.html

@@ -1 +1 @@
-<!DOCTYPE html><html><head><meta charset=utf-8><meta name=format-detection content="telephone=no"><meta name=apple-mobile-web-app-capable content=yes><meta name=viewport content="initial-scale=1,width=device-width,viewport-fit=cover,user-scalable=no"><script src=./cordova.js></script><title>dianjing</title><link href=./static/css/app.d33ae8e56dbfe5ce2e78a9c101c93f6f.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.2ca68079c50dfd870142.js></script><script type=text/javascript src=./static/js/app.474b7b2d0b9b669a22a1.js></script></body></html>
+<!DOCTYPE html><html><head><meta charset=utf-8><meta name=format-detection content="telephone=no"><meta name=apple-mobile-web-app-capable content=yes><meta name=viewport content="initial-scale=1,width=device-width,viewport-fit=cover,user-scalable=no"><script src=./cordova.js></script><title>dianjing</title><link href=./static/css/app.a84b2165ee004820129caadb2e5a9614.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.2ca68079c50dfd870142.js></script><script type=text/javascript src=./static/js/app.8b6fad880b0ac24bba84.js></script></body></html>

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
platforms/ios/www/static/css/app.a84b2165ee004820129caadb2e5a9614.css


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
platforms/ios/www/static/css/app.a84b2165ee004820129caadb2e5a9614.css.map


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
platforms/ios/www/static/css/app.d33ae8e56dbfe5ce2e78a9c101c93f6f.css


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
platforms/ios/www/static/css/app.d33ae8e56dbfe5ce2e78a9c101c93f6f.css.map


BIN
platforms/ios/www/static/img/icon_alert.16e4849.png


BIN
platforms/ios/www/static/img/icon_alert.549bd97.png


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
platforms/ios/www/static/js/app.474b7b2d0b9b669a22a1.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
platforms/ios/www/static/js/app.474b7b2d0b9b669a22a1.js.map


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
platforms/ios/www/static/js/app.8b6fad880b0ac24bba84.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
platforms/ios/www/static/js/app.8b6fad880b0ac24bba84.js.map


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
platforms/ios/www/static/js/manifest.3ad1d5771e9b13dbdad2.js.map


BIN
platforms/ios/电竞.xcworkspace/xcuserdata/drew.xcuserdatad/UserInterfaceState.xcuserstate


+ 1 - 1
platforms/ios/电竞/Classes/MainViewController.m

@@ -96,7 +96,7 @@
         for(UIView* v in webview.subviews){
             if([v isKindOfClass:NSClassFromString(@"WKScrollView")]){
                 UIScrollView *scrollView = (UIScrollView*)v;
-                [scrollView setContentOffset:CGPointMake(0, 0)];
+                [scrollView setContentOffset:CGPointMake(0, 0) animated:YES];
             }
         }
     }

+ 0 - 1
platforms/ios/电竞/config.xml

@@ -132,5 +132,4 @@
     <preference name="ShowSplashScreenSpinner" value="false" />
     <preference name="SplashMaintainAspectRatio" value="true" />
     <preference name="SplashScreenDelay" value="4000" />
-    <preference name="KeyboardShrinksView" value="true" />
 </widget>

+ 1 - 1
platforms/ios/电竞/电竞-Info.plist

@@ -29,7 +29,7 @@
 	<key>CFBundleSignature</key>
 	<string>????</string>
 	<key>CFBundleVersion</key>
-	<string>5</string>
+	<string>7</string>
 	<key>ITSAppUsesNonExemptEncryption</key>
 	<false/>
 	<key>LSRequiresIPhoneOS</key>

BIN
vue/src/assets/icon_add.png


BIN
vue/src/assets/icon_alert.png


BIN
vue/src/assets/icon_contact.png


+ 156 - 0
vue/src/components/Contact/Main.vue

@@ -0,0 +1,156 @@
+<template>
+    <div>
+        <transition name="fade" @after-leave="afterLeave">
+            <div class="dim" v-show="visible">
+            </div>
+        </transition>
+        <transition name="fade-scale">
+            <div class="contact-wrapper" v-show="visible" @click="visible=false">
+                <div class="contact" @click.stop="">
+                    <img class="avatar" :src="info.icon || require('../../assets/avatar.png')">
+                    <div class="name">{{info.nickname}}</div>
+                    <div class="row">
+                        <span class="label">游戏ID</span>
+                        <span class="value">{{info.gameId}}</span>
+                    </div>
+                    <div class="row">
+                        <span class="label">联系方式</span>
+                        <span class="value">{{info.remark}}</span>
+                    </div>
+                    <div class="row" v-if="info.qq">
+                        <span class="label">QQ</span>
+                        <span class="value">{{info.qq}}</span>
+                    </div>
+                    <div class="row" v-if="info.wx">
+                        <span class="label">微信</span>
+                        <span class="value">{{info.wx}}</span>
+                    </div>
+                </div>
+            </div>
+        </transition>
+    </div>
+</template>
+
+<script>
+export default {
+    data() {
+        return {
+            visible: false,
+            info: {},
+            pics: []
+        }
+    },
+    mounted() {
+        this.visible = true
+    },
+    methods: {
+        afterLeave() {
+            this.$destroy(true);
+            this.$el.parentNode.removeChild(this.$el)
+        }
+    }
+}
+</script>
+
+<style lang="less" scoped>
+button {
+    padding: 0;
+}
+.dim {
+    background: rgba(0, 0, 0, 0.5);
+    width: 100%;
+    height: 100%;
+    position: absolute;
+    left: 0;
+    top: 0;
+    right: 0;
+    bottom: 0;
+}
+.contact-wrapper {
+    width: 100%;
+    height: 100%;
+    position: absolute;
+    left: 0;
+    top: 0;
+    right: 0;
+    bottom: 0;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+}
+.contact {
+    width: 260px;
+    margin: 0 58px;
+    background: #ffffff;
+    border-radius: 10px;
+    position: relative;
+    padding-top: 47px;
+    .avatar {
+        width: 86px;
+        height: 86px;
+        box-sizing: border-box;
+        border-radius: 50%;
+        border: 8px solid #ffffff;
+        position: absolute;
+        left: 0;
+        right: 0;
+        top: -43px;
+        margin: auto;
+    }
+    .name {
+        font-size: 18px;
+        font-weight: 700;
+        color: #000000;
+        margin-bottom: 28px;
+        text-align: center;
+    }
+    .row {
+        height: 60px;
+        line-height: 60px;
+        display: flex;
+        align-items: center;
+        position: relative;
+        padding: 0 15px;
+        &::after {
+            content: "";
+            position: absolute;
+            left: 15px;
+            right: 15px;
+            top: 0;
+            height: 1px;
+            background: #f2f4f5;
+        }
+        .label {
+            width: 76px;
+            color: #000000;
+            font-size: 14px;
+            font-weight: 700;
+        }
+        .value {
+            font-size: 15px;
+            font-weight: 400;
+            color: #000000;
+        }
+    }
+}
+.fade-enter,
+.fade-leave-active {
+    opacity: 0;
+}
+
+.fade-enter-active,
+.fade-leave-active {
+    transition: all 0.2s;
+}
+
+.fade-scale-enter,
+.fade-scale-leave-active {
+    opacity: 0;
+    transform: scale3d(0.9, 0.9, 1);
+}
+
+.fade-scale-enter-active,
+.fade-scale-leave-active {
+    transition: all 0.2s;
+}
+</style>

+ 18 - 0
vue/src/components/Contact/index.js

@@ -0,0 +1,18 @@
+import Vue from 'vue'
+import Main from './main.vue'
+
+let Constructor = Vue.extend(Main)
+
+let uploadScore = function (info) {
+    let instance = new Constructor({
+        data: {
+            info: info
+        }
+    })
+    instance.vm = instance.$mount()
+    document.body.appendChild(instance.vm.$el)
+    console.log(instance.vm)
+    return instance.vm
+}
+
+export default uploadScore

+ 6 - 2
vue/src/components/InputX.vue

@@ -1,7 +1,7 @@
 <template>
     <div class="input-wrapper">
         <img class="icon" :src="icon" v-if="icon" />
-        <input v-model="inputValue" :placeholder="placeholder" :type="type" @focus="focused=true" @blur="focused=false" :style="{marginLeft: icon ? '15px' : ''}" :maxlength="maxlength" />
+        <input @click="$event.target.focus()" v-model="inputValue" :placeholder="placeholder" :type="type" @focus="focused=true" @blur="focused=false" :style="{marginLeft: icon ? '15px' : ''}" :maxlength="maxlength" />
         <img class="clear" src="../assets/icon_clear.png" v-if="inputValue&&clearable&&focused" @click="inputValue = ''">
         <slot></slot>
     </div>
@@ -43,11 +43,13 @@ export default {
             this.$emit('input', val)
 
         }
+    },
+    methods: {
     }
 }
 </script>
 <style lang="less" scoped>
-@import '../base.less';
+@import "../base.less";
 .input-wrapper {
     margin-left: 15px;
     margin-right: 15px;
@@ -83,6 +85,8 @@ export default {
         align-items: center;
         justify-content: center;
         transition: all 0.2s;
+        padding: 0;
+        box-sizing: border-box;
         &::-webkit-input-placeholder {
             height: 100%;
             font-size: 14px;

+ 242 - 0
vue/src/components/MatchData.vue

@@ -0,0 +1,242 @@
+<template>
+    <div class="match-data">
+        <div class="title">
+            <span style="font-weight:700;">{{title1}}</span>
+            <span style="margin-left:20px;">{{title2}}</span>
+            <span class="edit" v-if="item.state === 1" @click="editScore">比分有误?</span>
+        </div>
+        <div class="user">
+            <div class="avatar-wrapper"> <img :src="avatar1" class="avatar 1" @click="showContact(1)"></div>
+            <span class="score 1">{{score1}}</span>
+            <span class="vs">VS</span>
+            <span class="score 2">{{score2}}</span>
+            <div class="avatar-wrapper"> <img :src="avatar2" class="avatar 2" @click="showContact(2)"></div>
+        </div>
+        <div class="names">
+            <div class="name-wrapper left">
+                <span class="name 1" @click="showContact(1)">{{name1}}<img src="../assets/icon_contact.png" class="icon-contact"></span>
+            </div>
+            <button class="btn-apply" @click="submit">{{item.state === 0 ? '提交成绩' : '确认成绩'}}</button>
+            <div class="name-wrapper right">
+                <span class="name 2" @click="showContact(2)">{{name2}}<img src="../assets/icon_contact.png" class="icon-contact"></span>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+import uploadScore from './UploadScore'
+import contact from "./Contact"
+import ebs from '../eventBus'
+export default {
+    props: ['item'],
+    data() {
+        return {
+
+        }
+    },
+    computed: {
+        title1() {
+            return this.item.groupName
+        },
+        title2() {
+            switch (this.item.type) {
+                case 1:
+                case 2:
+                    return `场次号${('0000' + this.item.round).substr(-2)}`
+                case 3:
+                    return `第${this.item.loopNum + 1}轮`
+            }
+        },
+        avatar1() {
+            if (this.item.applyInfo1) {
+                return this.item.applyInfo1.icon || require('../assets/avatar.png')
+            }
+            return require('../assets/avatar.png')
+        },
+        avatar2() {
+            if (this.item.applyInfo2) {
+                return this.item.applyInfo2.icon || require('../assets/avatar.png')
+            }
+            return require('../assets/avatar.png')
+        },
+        score1() {
+            if (this.item.score1 != undefined) {
+                return this.item.score1
+            }
+            return '-'
+        },
+        score2() {
+            if (this.item.score2 != undefined) {
+                return this.item.score2
+            }
+            return '-'
+        },
+        name1() {
+            if (this.item.applyInfo1) {
+                return this.item.applyInfo1.nickname || ''
+            }
+            return ''
+        },
+        name2() {
+            if (this.item.applyInfo2) {
+                return this.item.applyInfo2.nickname || ''
+            }
+            return ''
+        }
+    },
+    methods: {
+        submit() {
+            if (this.item.state === 1) {
+                this.$alert({
+                    content: '以当前的比分作为最终成绩,是否继续?',
+                    showCancel: true
+                }, () => {
+                    this.$modal.loading('正在提交')
+                    this.$http.post({
+                        url: 'matchData/update',
+                        data: {
+                            id: this.item.id,
+                            state: 2
+                        }
+                    }).then(res => {
+                        this.$modal.close()
+                        if (res.success) {
+                            this.$modal.success('提交成功')
+                            ebs.$emit('uploadFinish')
+                        }
+                    }).catch(() => { this.$modal.close() })
+                })
+            } else {
+                uploadScore(this.item)
+            }
+        },
+        showContact(i) {
+            if (i === 1) {
+                contact(this.item.applyInfo1)
+            } else if (i === 2) {
+                contact(this.item.applyInfo2)
+            }
+        },
+        editScore() {
+            uploadScore({
+                ...this.item,
+                edit: true
+            })
+        }
+    }
+}
+</script>
+
+<style lang="less" scoped>
+button {
+    padding: 0;
+}
+.match-data {
+    height: 128px;
+    border-radius: 6px;
+    background: #ffffff;
+    margin-bottom: 10px;
+    .title {
+        height: 34px;
+        line-height: 34px;
+        position: relative;
+        font-size: 13px;
+        color: #121c26;
+        padding: 0 15px;
+        &:after {
+            height: 1px;
+            content: "";
+            position: absolute;
+            left: 15px;
+            right: 15px;
+            bottom: 0;
+            background: #f2f4f5;
+        }
+        .edit {
+            color: #8c959c;
+            font-size: 12px;
+            position: absolute;
+            right: 15px;
+            top: 0;
+            bottom: 0;
+        }
+    }
+    .user {
+        display: flex;
+        align-items: center;
+        justify-content: space-around;
+        margin-top: 13px;
+        .score {
+            width: 30px;
+            height: 30px;
+            line-height: 30px;
+            font-size: 14px;
+            font-weight: 700;
+            background: #f2f4f5;
+            border-radius: 4px;
+            color: #000000;
+            text-align: center;
+        }
+        .vs {
+            font-size: 22px;
+            font-weight: 700;
+            width: 66px;
+            text-align: center;
+            color: rgba(241, 84, 54, 1);
+        }
+        .avatar-wrapper {
+            flex-grow: 1;
+            text-align: center;
+        }
+        .avatar {
+            width: 40px;
+            height: 40px;
+            border-radius: 50%;
+        }
+    }
+    .names {
+        margin-top: 3px;
+        display: flex;
+        align-items: center;
+        justify-content: space-around;
+        .name-wrapper {
+            flex-grow: 1;
+            flex-basis: 0;
+            text-align: center;
+            &.left {
+                padding-right: 30px;
+            }
+            &.right {
+                padding-left: 30px;
+            }
+        }
+        .name {
+            font-size: 13px;
+            color: #000000;
+            position: relative;
+            .icon-contact {
+                right: -22px;
+                position: absolute;
+                width: 22px;
+                height: 22px;
+                top: 0;
+                bottom: 0;
+                margin: auto;
+            }
+        }
+        .btn-apply {
+            width: 66px;
+            height: 27px;
+            line-height: 27px;
+            background: #f15436;
+            border-radius: 4px;
+            font-size: 12px;
+            color: #ffffff;
+            &:active {
+                background: darken(#f15436, 20%);
+            }
+        }
+    }
+}
+</style>

+ 0 - 1
vue/src/components/Modal/main.vue

@@ -39,7 +39,6 @@ export default {
     },
     methods: {
         startTimer() {
-            console.log(this.duration)
             if (this.duration > 0) {
                 this.timer = setTimeout(() => {
                     this.close()

+ 428 - 0
vue/src/components/UploadScore/Main.vue

@@ -0,0 +1,428 @@
+<template>
+    <div>
+        <transition name="fade" @after-leave="afterLeave">
+            <div class="dim" @touchstart.stop.prevent="" v-show="visible">
+            </div>
+        </transition>
+        <transition name="fade-scale">
+            <div class="upload-score-wrapper" v-show="visible">
+                <div class="upload-score">
+                    <div class="title">
+                        <span style="font-weight:700;">{{title1}}</span>
+                        <span style="margin-left:20px;">{{title2}}</span>
+                    </div>
+                    <div class="infos">
+                        <div class="info">
+                            <input @click="$event.target.focus()" class="score" v-model="matchData.score1" type="tel" maxlength="3">
+                            <img :src="avatar1" class="avatar" @click="showContact(1)">
+                            <div class="name" @click="showContact(1)">{{name1}}<img src="../../assets/icon_contact.png" class="icon-contact"></div>
+                        </div>
+                        <div class="vs">VS</div>
+                        <div class="info">
+                            <input @click="$event.target.focus()" class="score" v-model="matchData.score2" type="tel" maxlength="3">
+                            <img :src="avatar2" class="avatar" @click="showContact(2)">
+                            <div class="name" @click="showContact(2)">{{name2}}<img src="../../assets/icon_contact.png" class="icon-contact"></div>
+                        </div>
+                    </div>
+                    <div class="pics-wrapper">
+                        <div class="pics">
+                            <div class="pic" v-for="(item,i) in pics" :key="item" :style="{backgroundImage:`url(${item})`}" @click="removePic(i)"></div>
+                            <div class="add-wrapper" @click="uploadPic">
+                                <div class="add">
+                                    <img src="../../assets/icon_add.png">
+                                    <div>上传图片</div>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="btns">
+                        <button class="btn cancel" @click="visible=false">取消</button>
+                        <button class="btn confirm" @click="submit">{{matchData.state === 0 ? '提交成绩' : '修改成绩'}}</button>
+                    </div>
+                </div>
+            </div>
+        </transition>
+    </div>
+</template>
+
+<script>
+import contact from "../Contact"
+import { mapState } from 'vuex'
+import ebs from '../../eventBus'
+export default {
+    data() {
+        return {
+            visible: false,
+            matchData: {},
+            pics: []
+        }
+    },
+    computed: {
+        ...mapState(['userInfo']),
+        title1() {
+            return this.matchData.groupName
+        },
+        title2() {
+            switch (this.matchData.type) {
+                case 1:
+                case 2:
+                    return `场次号${('0000' + this.matchData.round).substr(-2)}`
+                case 3:
+                    return `第${this.matchData.loopNum + 1}轮`
+            }
+        },
+        avatar1() {
+            if (this.matchData.applyInfo1) {
+                return this.matchData.applyInfo1.icon || require('../../assets/avatar.png')
+            }
+            return require('../../assets/avatar.png')
+        },
+        avatar2() {
+            if (this.matchData.applyInfo2) {
+                return this.matchData.applyInfo2.icon || require('../../assets/avatar.png')
+            }
+            return require('../../assets/avatar.png')
+        },
+        score1() {
+            if (this.matchData.score1 != undefined) {
+                return this.matchData.score1
+            }
+            return '-'
+        },
+        score2() {
+            if (this.matchData.score2 != undefined) {
+                return this.matchData.score2
+            }
+            return '-'
+        },
+        name1() {
+            if (this.matchData.applyInfo1) {
+                return this.matchData.applyInfo1.nickname || ''
+            }
+            return ''
+        },
+        name2() {
+            if (this.matchData.applyInfo2) {
+                return this.matchData.applyInfo2.nickname || ''
+            }
+            return ''
+        }
+    },
+    mounted() {
+        this.visible = true
+    },
+    methods: {
+        uploadPic() {
+            let upload = (base64) => {
+                let url
+                this.$http.post({
+                    url: '/assets/uploadImg',
+                    data: {
+                        base64: base64
+                    }
+                }).then(res => {
+                    this.$modal.close()
+                    if (res.success) {
+                        this.pics.push(res.data)
+                    } else {
+                        throw ''
+                    }
+                }).catch(e => {
+                    this.$toast('上传失败')
+                    this.$modal.close()
+                })
+            }
+            if (window.cordova) {
+                var options = {
+                    destinationType: Camera.DestinationType.DATA_URL,
+                    sourceType: Camera.PictureSourceType.SAVEDPHOTOALBUM,
+                    targetWidth: 200,
+                    targetHeight: 200,
+                    correctOrientation: true,
+                    allowEdit: true
+                }
+                navigator.camera.getPicture(res => {
+                    this.$modal.loading({ msg: '上传中', duration: 0 })
+                    upload("data:image/jpeg;base64," + res)
+                }, err => {
+                    console.log(err)
+                }, options)
+            } else {
+                var input = document.createElement('input')
+                input.type = 'file'
+                input.accept = 'image/*'
+                input.onchange = (e) => {
+                    this.$modal.loading({ msg: '正在保存', duration: 0 })
+                    var reader = new FileReader();
+                    reader.onload = (e) => {
+                        this.$modal.loading({ msg: '上传中', duration: 0 })
+                        upload(e.target.result)
+                    }
+                    reader.readAsDataURL(input.files[0]);
+                }
+                input.click()
+            }
+        },
+        removePic(i) {
+            this.$alert({
+                content: '删除该图片?',
+                showCancel: true
+            }, () => {
+                this.pics.splice(i, 1)
+            })
+        },
+        submit() {
+            if (!(Number(this.matchData.score1) >= 0)) {
+                this.$modal.info('请输入正确的比分');
+            } else if (!(Number(this.matchData.score2) >= 0)) {
+                this.$modal.info('请输入正确的比分');
+            } else if (this.matchData.type !== 3 && Number(this.matchData.score1) === Number(this.matchData.score2)) {
+                this.$modal.info('比分不能相同');
+            } else if (!(Number(this.matchData.score1) % 1 === 0 && Number(this.matchData.score2) % 1 === 0)) {
+                this.$modal.info('比分不能含小数');
+            } else {
+                this.$modal.loading('正在上传')
+                this.$http.post({
+                    url: '/matchData/update',
+                    data: {
+                        id: this.matchData.id,
+                        score1: this.matchData.score1,
+                        score2: this.matchData.score2,
+                        state: 1,
+                        pictures: this.pics,
+                        uploadUser: this.userInfo.id
+                    }
+                }).then(res => {
+                    this.$modal.close()
+                    if (res.success) {
+                        this.$modal.success('上传成功')
+                        ebs.$emit('uploadFinish')
+                    }
+                }).catch(() => {
+                    this.$modal.close()
+                })
+                this.visible = false
+            }
+        },
+        afterLeave() {
+            this.$destroy(true);
+            this.$el.parentNode.removeChild(this.$el)
+        },
+        showContact(i) {
+            if (i === 1) {
+                contact(this.matchData.applyInfo1)
+            } else if (i === 2) {
+                contact(this.matchData.applyInfo2)
+            }
+        }
+    }
+}
+</script>
+
+<style lang="less" scoped>
+button {
+    padding: 0;
+}
+input {
+    -moz-box-sizing: border-box;
+    -webkit-box-sizing: border-box;
+    box-sizing: border-box;
+    padding: 0;
+}
+.dim {
+    background: rgba(0, 0, 0, 0.5);
+    width: 100%;
+    height: 100%;
+    position: absolute;
+    left: 0;
+    top: 0;
+    right: 0;
+    bottom: 0;
+}
+.upload-score-wrapper {
+    width: 100%;
+    height: 100%;
+    position: absolute;
+    left: 0;
+    top: 0;
+    right: 0;
+    bottom: 0;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+}
+.upload-score {
+    width: 100%;
+    margin: 0 14px;
+    background: #ffffff;
+    border-radius: 10px;
+    padding-bottom: 20px;
+    .title {
+        text-align: center;
+        height: 48px;
+        line-height: 48px;
+        position: relative;
+        font-size: 16px;
+        color: #121c26;
+        padding: 0 15px;
+        &:after {
+            height: 1px;
+            content: "";
+            position: absolute;
+            left: 15px;
+            right: 15px;
+            bottom: 0;
+            background: #f2f4f5;
+        }
+    }
+    .infos {
+        margin-top: 20px;
+        display: flex;
+        .info {
+            flex-basis: 0;
+            flex-grow: 1;
+            display: flex;
+            flex-direction: column;
+            align-items: center;
+            .score {
+                width: 60px;
+                min-width: 0;
+                height: 60px;
+                text-align: center;
+                background: rgba(225, 228, 230, 1);
+                border-radius: 6px;
+                font-size: 28px;
+                font-weight: 700;
+                color: #000000;
+            }
+            .avatar {
+                width: 40px;
+                height: 40px;
+                border-radius: 50%;
+                margin-top: 10px;
+            }
+            .name {
+                font-size: 13px;
+                color: #000000;
+                margin-top: 7px;
+                position: relative;
+                .icon-contact {
+                    position: absolute;
+                    width: 22px;
+                    height: 22px;
+                    top: 0;
+                    bottom: 0;
+                    right: -22px;
+                    margin: auto;
+                }
+            }
+        }
+        .vs {
+            font-size: 22px;
+            font-weight: 700;
+            color: rgba(241, 84, 54, 1);
+            line-height: 60px;
+        }
+    }
+    .pics-wrapper {
+        margin-top: 15px;
+        padding: 0 30px;
+    }
+    .pics {
+        overflow-x: scroll;
+        -webkit-overflow-scrolling: touch;
+        text-align: center;
+        white-space: nowrap;
+        .pic {
+            width: 50px;
+            min-width: 50px;
+            height: 50px;
+            margin-right: 15px;
+            border-radius: 6px;
+            background-position: center;
+            background-size: cover;
+            background-repeat: no-repeat;
+            display: inline-block;
+            vertical-align: middle;
+        }
+        .add-wrapper {
+            min-width: 50px;
+            display: inline-block;
+            vertical-align: middle;
+            .add {
+                width: 50px;
+                height: 50px;
+                border-radius: 6px;
+                background: #f2f4f5;
+                display: flex;
+                flex-direction: column;
+                align-items: center;
+                justify-content: center;
+                font-size: 10px;
+                font-weight: 400;
+                color: rgba(143, 146, 148, 1);
+                img {
+                    width: 16px;
+                    height: 17px;
+                }
+                div {
+                    margin-top: 2px;
+                }
+            }
+        }
+    }
+    .btns {
+        padding: 0 30px;
+        display: flex;
+        margin-top: 30px;
+        .btn {
+            flex-basis: 0;
+            height: 44px;
+            flex-grow: 1;
+            background: rgba(235, 238, 240, 1);
+            border-radius: 6px;
+        }
+        .cancel {
+            margin-right: 18px;
+            background: #ebeef0;
+            font-size: 16px;
+            font-weight: 700;
+            color: #000000;
+            &:active {
+                background: darken(#ebeef0, 20%);
+            }
+        }
+        .confirm {
+            margin-left: 18px;
+            background: #f15436;
+            font-size: 16px;
+            font-weight: 700;
+            color: #ffffff;
+            &:active {
+                background: darken(#f15436, 20%);
+            }
+        }
+    }
+}
+
+.fade-enter,
+.fade-leave-active {
+    opacity: 0;
+}
+
+.fade-enter-active,
+.fade-leave-active {
+    transition: all 0.2s;
+}
+
+.fade-scale-enter,
+.fade-scale-leave-active {
+    opacity: 0;
+    transform: scale3d(0.9, 0.9, 1);
+}
+
+.fade-scale-enter-active,
+.fade-scale-leave-active {
+    transition: all 0.2s;
+}
+</style>

+ 20 - 0
vue/src/components/UploadScore/index.js

@@ -0,0 +1,20 @@
+import Vue from 'vue'
+import Main from './main.vue'
+import store from '../../store'
+
+let Constructor = Vue.extend(Main)
+
+let uploadScore = function (matchData) {
+    let instance = new Constructor({
+        store,
+        data: {
+            matchData: matchData
+        }
+    })
+    instance.vm = instance.$mount()
+    document.body.appendChild(instance.vm.$el)
+    console.log(instance.vm)
+    return instance.vm
+}
+
+export default uploadScore

+ 1 - 1
vue/src/eventBus/index.js

@@ -1,3 +1,3 @@
 import Vue from 'vue'
 const eventBus = new Vue()
-export default eventBus
+export default eventBus

+ 0 - 1
vue/src/main.js

@@ -35,7 +35,6 @@ Vue.prototype.$toast = msg => {
     }
 };
 
-
 const baseUrl = process.env.NODE_ENV === 'production' ? `http://49.4.67.181:8085` : `http://192.168.50.132:8080`;
 Vue.prototype.$baseUrl = baseUrl;
 axios.defaults.baseURL = baseUrl;

+ 2 - 1
vue/src/main.less

@@ -1,6 +1,7 @@
 @import "./base.less";
 
 * {
+    touch-action: manipulation;
     -webkit-touch-callout: none;
     outline: none;
     -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
@@ -10,7 +11,7 @@
 }
 
 html,
-body {
+body { 
     width: 100%;
     height: 100%;
     font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB",

+ 8 - 8
vue/src/pages/Apply.vue

@@ -10,39 +10,39 @@
             </div>
             <div class="row">
                 <span class="label">比赛昵称</span>
-                <input class="input" v-model="nickname" placeholder="请填写比赛昵称">
+                <input @click="$event.target.focus()" class="input" v-model="nickname" placeholder="请填写比赛昵称">
                 <img v-if="nickname" @click="nickname=''" src="../assets/icon_clear_pre.png" class="icon-clear">
             </div>
             <div class="row" v-if="matchInfo.requireRealName">
                 <span class="label">真实姓名</span>
-                <input class="input" v-model="realName" placeholder="请填写真实姓名">
+                <input @click="$event.target.focus()" class="input" v-model="realName" placeholder="请填写真实姓名">
             </div>
             <div class="row" v-if="matchInfo.requireId">
                 <span class="label">身份证</span>
-                <input class="input" v-model="idNo" placeholder="请填写身份证号">
+                <input @click="$event.target.focus()" class="input" v-model="idNo" placeholder="请填写身份证号">
             </div>
         </div>
         <div class="title">联系方式</div>
         <div class="cell">
             <div class="row">
                 <span class="label">游戏ID</span>
-                <input class="input" v-model="gameId" placeholder="请填写游戏ID">
+                <input @click="$event.target.focus()" class="input" v-model="gameId" placeholder="请填写游戏ID">
             </div>
             <div class="row">
                 <span class="label">联系方式</span>
-                <input class="input" v-model="remark" placeholder="手机/QQ/微信/其他">
+                <input @click="$event.target.focus()" class="input" v-model="remark" placeholder="手机/QQ/微信/其他">
             </div>
             <div class="row" v-if="matchInfo.requirePhone">
                 <span class="label">手机号</span>
-                <input class="input" v-model="phone" placeholder="请填写手机号">
+                <input @click="$event.target.focus()" class="input" v-model="phone" placeholder="请填写手机号">
             </div>
             <div class="row" v-if="matchInfo.requireQq">
                 <span class="label">QQ</span>
-                <input class="input" v-model="qq" placeholder="请填写QQ号">
+                <input @click="$event.target.focus()" class="input" v-model="qq" placeholder="请填写QQ号">
             </div>
             <div class="row" v-if="matchInfo.requireWx">
                 <span class="label">微信</span>
-                <input class="input" v-model="wx" placeholder="请填写微信号">
+                <input @click="$event.target.focus()" class="input" v-model="wx" placeholder="请填写微信号">
             </div>
         </div>
         <div class="btn-wrapper">

+ 0 - 551
vue/src/pages/Map.vue

@@ -1,551 +0,0 @@
-<template>
-    <div>
-        <el-amap ref="map" vid="amapDemo" :center="center" :zoom="zoom" :events="mapEvents" cursor="default" class="map-view" :style="{height:mapHeight}">
-            <el-amap-marker v-if="myPosition" :position="myPosition" content="<div class='my-position'><div>" cursor="default">
-            </el-amap-marker>
-            <el-amap-polygon v-for="(item,index) in parks" :key="`${item.parkInfo.id}-${index}`" :path="item.path" :extData="item.parkInfo" :events="polygonEvents" :strokeColor="item.color" strokeOpacity="0.8" :fillColor="item.fill ? item.color : ''" fillOpacity="0.3">
-            </el-amap-polygon>
-            <el-amap-info-window v-if="showInfo" :autoMove="false" :position="selectedPark.position" :isCustom="true" :contentRender="contentRender" :offset="[0,-10]">
-            </el-amap-info-window>
-        </el-amap>
-        <img src="../assets/icon_locate.png" class="btn-locate" @click="locate">
-        <!-- <img src="../assets/icon_map_center.png" class="map-center-icon"> -->
-
-        <div class="result-search-box" @click="inSearch=true" v-if="selectedResult">
-            <img src="../assets/icon_search.png" class="search-icon">
-            <span>{{selectedResult}}</span>
-            <img src="../assets/icon_clear.png" class="clear-icon" @click.prevent.stop="selectedResult=''">
-        </div>
-        <div class="fake-search-box" @click="inSearch=true" v-else>
-            <img src="../assets/icon_search.png" class="search-icon">
-            <span>搜索环评区块</span>
-        </div>
-        <div class="search-page" ref="search" v-show="inSearch">
-            <div class="search-wrapper">
-                <div class="search-box">
-                    <img src="../assets/icon_search.png" class="search-icon" />
-                    <input v-model="keyword" placeholder="搜索环评区块" type="search" @focus="focus=true" @blur="focus=false" @keyup="keyup">
-                    <img src="../assets/icon_clear.png" class="clear-icon" v-if="focus&&keyword" @click="keyword='',noResult=false,showHistory=true">
-                </div>
-                <div class="cancel" @click="cancel">取消</div>
-            </div>
-            <div class="mask">
-                <div class="search-history" v-if="showHistory">
-                    <img src="../assets/icon_history.png" class="icon-history">
-                    <span>历史记录</span>
-                    <img src="../assets/icon_trash.png" class="icon-trash" @click.prevent="clearHistory">
-                </div>
-                <div class="history-item" v-for="(item, index) in searchParkHistory" :key="index" v-if="showHistory" @click="research(item)">{{item}}</div>
-                <div class="item" v-for="item in searchResults" :key="item.id" @click="showResult(item)">{{item.name}}</div>
-                <div class="no-result" v-if="noResult">无结果</div>
-            </div>
-        </div>
-    </div>
-</template>
-<script>
-export default {
-    mounted() {
-        this.mapHeight = `${this.$el.offsetHeight}px`
-        document.body.appendChild(this.$refs.search)
-        this.$refs.search.style.top = this.$navbar.$el.offsetHeight + 'px'
-        window.onresize = () => {
-            this.mapHeight = `${this.$el.offsetHeight}px`
-            this.$refs.search.style.top = this.$navbar.$el.offsetHeight + 'px'
-        }
-    },
-    activated() {
-        this.history = JSON.parse(localStorage.getItem('viewHistory')) || []
-        if (localStorage.getItem('searchParkHistory')) {
-            this.searchParkHistory = localStorage.getItem('searchParkHistory').split(',')
-        }
-        this.searchParkHistory = this.searchParkHistory || []
-    },
-    data() {
-        let self = this
-        return {
-            center: [118.80423000000002, 31.93501],
-            zoom: 15,
-            mapHeight: '10px',
-            mapEvents: {
-                init(map) {
-                    map.setLayers([
-                        new AMap.TileLayer.Satellite(),
-                        new AMap.TileLayer.RoadNet()
-                    ])
-                },
-                complete() {
-                    self.getData()
-                    self.locate()
-                },
-                moveend() {
-                    self.getData()
-                },
-                click() {
-                    self.showInfo = false
-                },
-                zoomend() {
-                    self.zoom = self.$refs.map.$$getInstance().getZoom()
-
-                    let lng1 = self.$refs.map.$$getInstance().getBounds().southwest.O
-                    let lat1 = self.$refs.map.$$getInstance().getBounds().southwest.P
-                    let lng2 = self.$refs.map.$$getInstance().getBounds().northeast.O
-                    let lat2 = self.$refs.map.$$getInstance().getBounds().northeast.P
-
-                    console.log('distance', AMap.GeometryUtil.distance([lng1, lat1], [lng2, lat2]));
-                    console.log('zoom', self.zoom)
-                }
-            },
-            parks: [],
-            polygonEvents: {
-                click(e) {
-                    if (!e.target.getPath().length)
-                        return
-                    let mapData = JSON.parse(e.target.getExtData().mapJson)
-                    let latMin = mapData[0].path[0][1], lngMin = mapData[0].path[0][0],
-                        latMax = mapData[0].path[0][1], lngMax = mapData[0].path[0][0];
-                    mapData.forEach(i => {
-                        i.path.forEach(p => {
-                            if (p[0] > lngMax) lngMax = p[0];
-                            if (p[0] < lngMin) lngMin = p[0];
-                            if (p[1] > latMax) latMax = p[1];
-                            if (p[1] < latMin) latMin = p[1];
-                        })
-                    });
-
-                    let zoom = 0;
-                    let distance = AMap.GeometryUtil.distance([lngMin, latMin], [lngMax, latMax]);
-                    if (distance < 700) {
-                        zoom = 19
-                    } else if (distance < 320) {
-                        zoom = 18
-                    } else if (distance < 680) {
-                        zoom = 17
-                    } else if (distance < 1360) {
-                        zoom = 16
-                    } else if (distance < 2750) {
-                        zoom = 15
-                    } else {
-                        zoom = 14
-                    }
-                    self.zoom = zoom;
-                    self.center = [(lngMin + lngMax) / 2, (latMin + latMax) / 2]
-                    self.selectedPark = e.target.getExtData()
-                    self.selectedPark.position = [(lngMin + lngMax) / 2, latMax]
-                    self.showInfo = true
-                }
-            },
-            showInfo: false,
-            selectedPark: {
-            },
-            history: [],
-            focus: false,
-            keyword: '',
-            inSearch: false,
-            searchResults: [],
-            myPosition: null,
-            locating: false,
-            noResult: false,
-            searchParkHistory: [],
-            showHistory: true,
-            selectedResult: ''
-        }
-    },
-    methods: {
-        getData() {
-            this.$http.get({
-                url: '/parkInfo/getParkInfoOnMap',
-                data: {
-                    lng1: this.$refs.map.$$getInstance().getBounds().southwest.O - 0.01,
-                    lat1: this.$refs.map.$$getInstance().getBounds().southwest.P - 0.01,
-                    lng2: this.$refs.map.$$getInstance().getBounds().northeast.O + 0.01,
-                    lat2: this.$refs.map.$$getInstance().getBounds().northeast.P + 0.01
-                }
-            }).then(res => {
-                if (res.success) {
-                    this.parks = []
-                    res.data.forEach(park => {
-                        if (park.mapJson) {
-                            let polygons = JSON.parse(park.mapJson)
-                            polygons.forEach(ploygon => {
-                                ploygon.parkInfo = park
-                                this.parks.push(ploygon)
-                            })
-                        }
-                    })
-                }
-            })
-        },
-        setupNavbar() {
-            this.$navbar.style = 'dark'
-            this.$navbar.title = '环保“嘉”助手'
-            this.$navbar.background = '#15A8AA'
-            this.$navbar.showBack = false
-            this.$navbar.showRightItem = false
-            this.$navbar.hidden = false
-        },
-        view(item) {
-            let index = -1
-            for (let i = 0; i < this.history.length; i++) {
-                if (this.history[i].id === item.id) {
-                    index = i
-                }
-            }
-            if (index > -1) {
-                this.history.splice(index, 1)
-            }
-            this.history.unshift(item)
-            localStorage.setItem('viewHistory', JSON.stringify(this.history))
-            if (window.cordova) {
-                cordova.plugins.pdfViewer.open({
-                    url: item.url,
-                    title: item.fileName
-                })
-            }
-        },
-        contentRender(h, instance) {
-            return (
-                <div class="custom-info-widnow">
-                    <div class="name">{this.selectedPark.name}</div>
-                    <div class="detail" on-click={() => { this.view(this.selectedPark.fileInfo) }}>查看详情</div>
-                </div>
-            )
-        },
-        keyup(e) {
-            if (e.keyCode === 13 && this.keyword) {
-                this.search(this.keyword)
-            }
-        },
-        cancel() {
-            this.inSearch = false
-            this.keyword = ''
-            this.searchResults = []
-            this.noResult = false
-            this.showHistory = true
-        },
-        showResult(item) {
-
-            let mapData = JSON.parse(item.mapJson)
-            let latMin = mapData[0].path[0][1], lngMin = mapData[0].path[0][0],
-                latMax = mapData[0].path[0][1], lngMax = mapData[0].path[0][0];
-            mapData.forEach(i => {
-                i.path.forEach(p => {
-                    if (p[0] > lngMax) lngMax = p[0];
-                    if (p[0] < lngMin) lngMin = p[0];
-                    if (p[1] > latMax) latMax = p[1];
-                    if (p[1] < latMin) latMin = p[1];
-                })
-            });
-
-            let zoom = 0;
-            let distance = AMap.GeometryUtil.distance([lngMin, latMin], [lngMax, latMax]);
-            if (distance < 700) {
-                zoom = 19
-            } else if (distance < 320) {
-                zoom = 18
-            } else if (distance < 680) {
-                zoom = 17
-            } else if (distance < 1360) {
-                zoom = 16
-            } else if (distance < 2750) {
-                zoom = 15
-            } else {
-                zoom = 14
-            }
-            this.zoom = zoom;
-
-            this.center = [item.centerLng, item.centerLat]
-            // this.selectedPark = item
-            // this.selectedPark.position = [item.centerLng, item.centerLat]
-            this.showInfo = false
-            this.selectedResult = item.name
-            this.cancel()
-        },
-        locate() {
-            if (this.myPosition) {
-                this.center = this.myPosition;
-            }
-            this.locating = true;
-            let geolocation = new AMap.Geolocation({
-                enableHighAccuracy: true,
-                timeout: 10000,
-            });
-            geolocation.getCurrentPosition();
-            AMap.event.addListener(geolocation, 'complete', data => {
-                this.locating = false;
-                this.center = [data.position.O, data.position.P];
-                this.myPosition = [data.position.O, data.position.P];
-            });
-            AMap.event.addListener(geolocation, 'error', err => {
-                this.locating = false;
-                console.log(err)
-            });
-        },
-        search(key) {
-            if (this.searchParkHistory.indexOf(key) === -1) {
-                this.searchParkHistory.unshift(key)
-                if (this.searchParkHistory.length > 10) {
-                    this.searchParkHistory = this.searchParkHistory.slice(0, 10)
-                }
-                localStorage.setItem('searchParkHistory', this.searchParkHistory)
-            }
-            this.showHistory = false
-            this.searchResults = []
-            this.$http.get({
-                url: '/parkInfo/search',
-                data: {
-                    name: this.keyword
-                }
-            }).then(res => {
-                if (res.success) {
-                    if (res.data.length === 0) {
-                        this.noResult = true
-                    } else {
-                        this.noResult = false
-                        this.searchResults = res.data
-                    }
-                }
-            })
-        },
-        research(key) {
-            this.keyword = key
-            this.search(key)
-        },
-        clearHistory() {
-            this.searchParkHistory = []
-            localStorage.removeItem('searchParkHistory')
-        }
-    }
-}
-</script>
-<style lang="less" scoped>
-@import '../base.less';
-.map-view {
-    width: 100%;
-    height: 100%;
-}
-.btn-locate {
-    position: absolute;
-    left: 15px;
-    bottom: 15px;
-    width: 32px;
-    height: 32px;
-}
-.map-center-icon {
-    position: absolute;
-    left: 0;
-    right: 0;
-    top: 0;
-    bottom: 0;
-    margin: auto;
-    width: 17px;
-    height: 27px;
-}
-.fake-search-box {
-    position: absolute;
-    top: 10px;
-    left: 15px;
-    right: 15px;
-    display: flex;
-    align-items: center;
-    height: 38px;
-    background: #fff;
-    border-radius: 19px;
-    box-shadow: 0px 2px 4px 0px rgba(147, 147, 147, 0.2);
-    justify-content: center;
-    color: @placeholder;
-    font-size: 13px;
-    .search-icon {
-        width: 18px;
-        height: 18px;
-        margin-right: 6px;
-    }
-}
-.result-search-box {
-    position: absolute;
-    top: 10px;
-    left: 15px;
-    right: 15px;
-    display: flex;
-    align-items: center;
-    height: 38px;
-    background: #fff;
-    border-radius: 19px;
-    box-shadow: 0px 2px 4px 0px rgba(147, 147, 147, 0.2);
-    color: black;
-    font-size: 15px;
-    .search-icon {
-        width: 18px;
-        height: 18px;
-        margin-right: 6px;
-        margin-left: 10px;
-    }
-    span {
-        flex-grow: 1;
-        font-weight: 700;
-    }
-    .clear-icon {
-        width: 30px;
-        height: 30px;
-        position: absolute;
-        right: 4px;
-        top: 0;
-        bottom: 0;
-        margin: auto;
-    }
-}
-.search-page {
-    position: absolute;
-    left: 0;
-    top: 0;
-    right: 0;
-    bottom: 0;
-    display: flex;
-    flex-direction: column;
-
-    .mask {
-        flex-grow: 1;
-        background: @pageBg;
-        overflow: auto;
-        padding-top: 10px;
-        .search-history {
-            display: flex;
-            align-items: center;
-            margin: 0 20px 0 15px;
-            color: @main;
-            .icon-history {
-                width: 14px;
-                height: 14px;
-            }
-            span {
-                flex-grow: 1;
-                font-size: 12px;
-                margin-left: 2px;
-                font-weight: 700;
-            }
-            .icon-trash {
-                width: 20px;
-                height: 20px;
-            }
-        }
-        .history-item {
-            color: black;
-            font-size: 14px;
-            margin: 15px 15px 0 15px;
-            .ellipsis();
-        }
-        .item {
-            position: relative;
-            color: @text2;
-            font-size: 14px;
-            height: 35px;
-            display: flex;
-            align-items: center;
-            color: black;
-            padding: 0 15px;
-        }
-        .no-result {
-            position: relative;
-            color: @text2;
-            font-size: 14px;
-            padding: 15px 15px;
-            text-align: center;
-            &:before {
-                .setTopLine();
-            }
-        }
-    }
-    .search-wrapper {
-        height: 58px;
-        background: white;
-        display: flex;
-        align-items: center;
-        .search-box {
-            height: 38px;
-            border-radius: 19px;
-            margin-left: 15px;
-            background: @pageBg;
-            position: relative;
-            flex-grow: 1;
-            display: flex;
-            align-items: center;
-            z-index: 200;
-            .search-icon {
-                width: 18px;
-                height: 18px;
-                margin-left: 10px;
-                margin-right: 6px;
-            }
-            form {
-                flex-grow: 1;
-            }
-            input {
-                flex-grow: 1;
-                font-size: 13px;
-                line-height: 21px;
-                font-size: 15px;
-                &::-webkit-input-placeholder {
-                    color: @placeholder;
-                    font-size: 13px;
-                }
-            }
-            .clear-icon {
-                width: 30px;
-                height: 30px;
-                position: absolute;
-                right: 4px;
-                top: 0;
-                bottom: 0;
-                margin: auto;
-            }
-        }
-        .cancel {
-            margin-left: 12px;
-            width: 44px;
-            height: 58px;
-            line-height: 58px;
-            color: @text2;
-            font-size: 14px;
-        }
-    }
-}
-</style>
-<style lang="less">
-.anchorBL,
-.amap-logo,
-.amap-copyright {
-    display: none !important;
-}
-.custom-info-widnow {
-    width: 170px;
-    max-width: 170px;
-    border-radius: 9px;
-    box-shadow: 0px 6px 12px 0px rgba(0, 0, 0, 0.18);
-    background: #fff;
-    display: flex;
-    flex-direction: column;
-    align-items: center;
-    text-align: center;
-    .name {
-        color: #000;
-        font-size: 14px;
-        font-weight: 700;
-        margin: 10px 15px 0 15px;
-    }
-    .detail {
-        height: 30px;
-        line-height: 30px;
-        color: #15a8aa;
-        font-size: 11px;
-    }
-}
-.my-position {
-    width: 14px;
-    height: 14px;
-    background: #ff9500;
-    border-radius: 7px;
-    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.15);
-    position: relative;
-    border: 2px solid #fff;
-    box-sizing: border-box;
-}
-</style>

+ 8 - 22
vue/src/pages/MatchDetail.vue

@@ -61,46 +61,31 @@
         <div class="card">
             <div class="title">赛程进度</div>
             <div class="steps">
-                <div
-                    class="step"
-                    :style="{backgroundImage:matchInfo.state > 0 ? `url(${require('../assets/icon_step_active.png')})` : `url(${require('../assets/icon_step.png')})`}"
-                >
+                <div class="step" :style="{backgroundImage:matchInfo.state > 0 ? `url(${require('../assets/icon_step_active.png')})` : `url(${require('../assets/icon_step.png')})`}">
                     <div class="content">
                         {{createTime}}
                         <br>创建比赛
                     </div>
                 </div>
-                <div
-                    class="step"
-                    :style="{backgroundImage:matchInfo.state > 1 ? `url(${require('../assets/icon_step_active.png')})` : `url(${require('../assets/icon_step.png')})`}"
-                >
+                <div class="step" :style="{backgroundImage:matchInfo.state > 1 ? `url(${require('../assets/icon_step_active.png')})` : `url(${require('../assets/icon_step.png')})`}">
                     <div class="content">
                         {{applyStartTime}}
                         <br>开始报名
                     </div>
                 </div>
-                <div
-                    class="step"
-                    :style="{backgroundImage:matchInfo.state > 2 ? `url(${require('../assets/icon_step_active.png')})` : `url(${require('../assets/icon_step.png')})`}"
-                >
+                <div class="step" :style="{backgroundImage:matchInfo.state > 2 ? `url(${require('../assets/icon_step_active.png')})` : `url(${require('../assets/icon_step.png')})`}">
                     <div class="content">
                         {{applyEndTime}}
                         <br>结束报名
                     </div>
                 </div>
-                <div
-                    class="step"
-                    :style="{backgroundImage:matchInfo.state > 3 ? `url(${require('../assets/icon_step_active.png')})` : `url(${require('../assets/icon_step.png')})`}"
-                >
+                <div class="step" :style="{backgroundImage:matchInfo.state > 3 ? `url(${require('../assets/icon_step_active.png')})` : `url(${require('../assets/icon_step.png')})`}">
                     <div class="content">
                         {{matchStartTime}}
                         <br>开始比赛
                     </div>
                 </div>
-                <div
-                    class="step"
-                    :style="{backgroundImage:matchInfo.state > 4 ? `url(${require('../assets/icon_step_active.png')})` : `url(${require('../assets/icon_step.png')})`}"
-                >
+                <div class="step" :style="{backgroundImage:matchInfo.state > 4 ? `url(${require('../assets/icon_step_active.png')})` : `url(${require('../assets/icon_step.png')})`}">
                     <div class="content">
                         {{matchEndTime}}
                         <br>结束比赛
@@ -328,7 +313,7 @@ export default {
         font-weight: 700;
         color: rgba(241, 84, 54, 1);
         text-align: center;
-        margin-block-end: 20px;
+        margin-bottom: 20px;
     }
     .steps {
         text-align: center;
@@ -352,9 +337,10 @@ export default {
                 font-size: 10px;
                 color: rgba(255, 255, 255, 0.8);
                 line-height: 20px;
-                letter-spacing: 1px;
+                letter-spacing: 0;
                 display: inline-block;
                 vertical-align: middle;
+                line-height: 13px;
             }
         }
     }

+ 65 - 7
vue/src/pages/Mine.vue

@@ -19,29 +19,47 @@
                 </div>
             </div>
         </div>
-        <div class="title">当前赛事</div>
-        <div class="match-list">
+        <div class="tabs">
+            <div class="tab" :class="{active:tab===1}" @click="tab=1">我的赛事</div>
+            <div class="tab" :class="{active:tab===2}" @click="tab=2">我的比赛</div>
+        </div>
+        <div class="match-list" v-if="tab===1">
             <div class="empty" v-if="matchList.length===0">
                 <img src="../assets/icon_empty.png">
                 <span>当前没有进行中的赛事</span>
             </div>
             <match-item v-for="item in matchList" :item="item" :key="item.id"></match-item>
         </div>
+        <div class="match-list" v-if="tab===2">
+            <div class="empty" v-if="userMatchData.length===0">
+                <img src="../assets/icon_empty.png">
+                <span>当前没有进行中的比赛</span>
+            </div>
+            <match-data v-for="item in userMatchData" :item="item" :key="item.id"></match-data>
+        </div>
     </div>
 </template>
 
 <script>
 import { mapState } from 'vuex'
 import MatchItem from '../components/MatchItem'
+import MatchData from '../components/MatchData'
+import ebs from '../eventBus'
 export default {
     created() {
+        ebs.$on('uploadFinish', this.getData)
         if (this.userInfo) {
-            this.getMatchList()
+            this.getData()
         }
     },
+    destroyed() {
+        ebs.$off('uploadFinish')
+    },
     data() {
         return {
-            matchList: []
+            matchList: [],
+            userMatchData: [],
+            tab: 1
         }
     },
     computed: {
@@ -68,7 +86,7 @@ export default {
             this.$navbar.background = '#0E1822'
             this.$navbar.hidden = true
         },
-        getMatchList() {
+        getData() {
             this.$http.get({
                 url: '/matchInfo/manageMatch',
                 data: {
@@ -80,6 +98,16 @@ export default {
                     this.matchList = res.data.join;
                 }
             })
+            this.$http.get({
+                url: 'matchData/userMatchData',
+                data: {
+                    userId: this.userInfo.id
+                }
+            }).then(res => {
+                if (res.success) {
+                    this.userMatchData = res.data;
+                }
+            });
         },
         profile() {
             if (this.userInfo) {
@@ -103,14 +131,15 @@ export default {
     watch: {
         userInfo(val) {
             if (val) {
-                this.getMatchList()
+                this.getData()
             } else {
                 this.matchList = []
             }
         }
     },
     components: {
-        MatchItem
+        MatchItem,
+        MatchData
     }
 }
 </script>
@@ -190,6 +219,35 @@ export default {
     font-weight: 700;
     color: rgba(241, 84, 54, 1);
 }
+.tabs {
+    display: flex;
+    align-items: center;
+    .tab {
+        height: 64px;
+        line-height: 64px;
+        min-height: 64px;
+        flex-grow: 1;
+        font-size: 15px;
+        font-weight: 700;
+        color: #8c959c;
+        text-align: center;
+        position: relative;
+        &.active {
+            color: #f15436;
+            &::after {
+                content: "";
+                position: absolute;
+                left: 0;
+                right: 0;
+                bottom: 15px;
+                width: 20px;
+                height: 2px;
+                background-color: #f15436;
+                margin: auto;
+            }
+        }
+    }
+}
 .match-list {
     padding: 0 14px;
     .empty {

+ 1 - 1
vue/src/pages/Search.vue

@@ -3,7 +3,7 @@
         <div class="search-wrapper">
             <div class="search-box">
                 <img src="../assets/icon_search.png" class="icon-search">
-                <input class="input-search" placeholder="搜索赛事" type="search" v-model="keyword" @focus="focused=true" @blur="focused=false" @keyup="keyup">
+                <input @click="$event.target.focus()" class="input-search" placeholder="搜索赛事" type="search" v-model="keyword" @focus="focused=true" @blur="focused=false" @keyup="keyup">
                 <img src="../assets/icon_clear_pre.png" class="icon-clear" v-if="keyword" @click="keyword='',showResult=false">
             </div>
             <!-- <span class="cancel" @click="$router.go(-1)">取消</span> -->

+ 1 - 1
www/dianjing.html

@@ -1 +1 @@
-<!DOCTYPE html><html><head><meta charset=utf-8><meta name=format-detection content="telephone=no"><meta name=apple-mobile-web-app-capable content=yes><meta name=viewport content="initial-scale=1,width=device-width,viewport-fit=cover,user-scalable=no"><script src=./cordova.js></script><title>dianjing</title><link href=./static/css/app.d33ae8e56dbfe5ce2e78a9c101c93f6f.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.2ca68079c50dfd870142.js></script><script type=text/javascript src=./static/js/app.474b7b2d0b9b669a22a1.js></script></body></html>
+<!DOCTYPE html><html><head><meta charset=utf-8><meta name=format-detection content="telephone=no"><meta name=apple-mobile-web-app-capable content=yes><meta name=viewport content="initial-scale=1,width=device-width,viewport-fit=cover,user-scalable=no"><script src=./cordova.js></script><title>dianjing</title><link href=./static/css/app.a84b2165ee004820129caadb2e5a9614.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.2ca68079c50dfd870142.js></script><script type=text/javascript src=./static/js/app.8b6fad880b0ac24bba84.js></script></body></html>

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
www/static/css/app.a84b2165ee004820129caadb2e5a9614.css


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
www/static/css/app.a84b2165ee004820129caadb2e5a9614.css.map


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
www/static/css/app.d33ae8e56dbfe5ce2e78a9c101c93f6f.css


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
www/static/css/app.d33ae8e56dbfe5ce2e78a9c101c93f6f.css.map


BIN
www/static/img/icon_alert.16e4849.png


BIN
www/static/img/icon_alert.549bd97.png


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
www/static/js/app.474b7b2d0b9b669a22a1.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
www/static/js/app.474b7b2d0b9b669a22a1.js.map


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
www/static/js/app.8b6fad880b0ac24bba84.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
www/static/js/app.8b6fad880b0ac24bba84.js.map


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
www/static/js/manifest.3ad1d5771e9b13dbdad2.js.map


Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio