xiongzhu 7 年之前
父節點
當前提交
64b99bc8f5
共有 55 個文件被更改,包括 350 次插入111 次删除
  1. 8 8
      platforms/android/android.json
  2. 1 1
      platforms/android/app/src/main/assets/www/dianjing.html
  3. 0 0
      platforms/android/app/src/main/assets/www/static/css/app.118566cbae317bbaebc690af71a86117.css
  4. 0 0
      platforms/android/app/src/main/assets/www/static/css/app.118566cbae317bbaebc690af71a86117.css.map
  5. 0 0
      platforms/android/app/src/main/assets/www/static/css/app.468e92c7b6b2ebb9c5fbd92316150fbf.css
  6. 0 0
      platforms/android/app/src/main/assets/www/static/css/app.468e92c7b6b2ebb9c5fbd92316150fbf.css.map
  7. 0 0
      platforms/android/app/src/main/assets/www/static/js/app.9b08d06fa6616f6ed70e.js
  8. 0 0
      platforms/android/app/src/main/assets/www/static/js/app.9b08d06fa6616f6ed70e.js.map
  9. 0 0
      platforms/android/app/src/main/assets/www/static/js/app.c90714ee0957324606eb.js
  10. 0 0
      platforms/android/app/src/main/assets/www/static/js/app.c90714ee0957324606eb.js.map
  11. 0 0
      platforms/android/app/src/main/assets/www/static/js/manifest.3ad1d5771e9b13dbdad2.js.map
  12. 1 1
      platforms/android/app/src/main/assets/www/static/js/vendor.d7f4ac00ee957f6fce9a.js
  13. 0 0
      platforms/android/app/src/main/assets/www/static/js/vendor.d7f4ac00ee957f6fce9a.js.map
  14. 0 0
      platforms/android/app/src/main/assets/www/static/js/vendor.e5aaf337e8770080039f.js.map
  15. 5 5
      platforms/ios/ios.json
  16. 1 1
      platforms/ios/www/dianjing.html
  17. 0 0
      platforms/ios/www/static/css/app.118566cbae317bbaebc690af71a86117.css
  18. 0 0
      platforms/ios/www/static/css/app.118566cbae317bbaebc690af71a86117.css.map
  19. 0 0
      platforms/ios/www/static/css/app.468e92c7b6b2ebb9c5fbd92316150fbf.css
  20. 0 0
      platforms/ios/www/static/css/app.468e92c7b6b2ebb9c5fbd92316150fbf.css.map
  21. 0 0
      platforms/ios/www/static/js/app.9b08d06fa6616f6ed70e.js
  22. 0 0
      platforms/ios/www/static/js/app.9b08d06fa6616f6ed70e.js.map
  23. 0 0
      platforms/ios/www/static/js/app.c90714ee0957324606eb.js
  24. 0 0
      platforms/ios/www/static/js/app.c90714ee0957324606eb.js.map
  25. 0 0
      platforms/ios/www/static/js/manifest.3ad1d5771e9b13dbdad2.js.map
  26. 1 1
      platforms/ios/www/static/js/vendor.d7f4ac00ee957f6fce9a.js
  27. 0 0
      platforms/ios/www/static/js/vendor.d7f4ac00ee957f6fce9a.js.map
  28. 0 0
      platforms/ios/www/static/js/vendor.e5aaf337e8770080039f.js.map
  29. 1 1
      platforms/ios/元气竞技场/元气竞技场-Info.plist
  30. 80 0
      vue/src/components/CopyMenu/CopyMenu.vue
  31. 21 0
      vue/src/components/CopyMenu/index.js
  32. 50 21
      vue/src/components/DoubleElimination.vue
  33. 18 6
      vue/src/components/RoundGroup.vue
  34. 9 0
      vue/src/components/SingleElimination.vue
  35. 17 10
      vue/src/components/VsPair.vue
  36. 11 3
      vue/src/pages/Apply.vue
  37. 18 39
      vue/src/pages/ForgetPassword.vue
  38. 3 2
      vue/src/pages/Login.vue
  39. 59 3
      vue/src/pages/MatchInfo.vue
  40. 2 4
      vue/src/pages/MatchList.vue
  41. 2 1
      vue/src/pages/Mine.vue
  42. 40 2
      vue/src/pages/VerifyCode.vue
  43. 1 1
      www/dianjing.html
  44. 0 0
      www/static/css/app.118566cbae317bbaebc690af71a86117.css
  45. 0 0
      www/static/css/app.118566cbae317bbaebc690af71a86117.css.map
  46. 0 0
      www/static/css/app.468e92c7b6b2ebb9c5fbd92316150fbf.css
  47. 0 0
      www/static/css/app.468e92c7b6b2ebb9c5fbd92316150fbf.css.map
  48. 0 0
      www/static/js/app.9b08d06fa6616f6ed70e.js
  49. 0 0
      www/static/js/app.9b08d06fa6616f6ed70e.js.map
  50. 0 0
      www/static/js/app.c90714ee0957324606eb.js
  51. 0 0
      www/static/js/app.c90714ee0957324606eb.js.map
  52. 0 0
      www/static/js/manifest.3ad1d5771e9b13dbdad2.js.map
  53. 1 1
      www/static/js/vendor.d7f4ac00ee957f6fce9a.js
  54. 0 0
      www/static/js/vendor.d7f4ac00ee957f6fce9a.js.map
  55. 0 0
      www/static/js/vendor.e5aaf337e8770080039f.js.map

+ 8 - 8
platforms/android/android.json

@@ -10,35 +10,35 @@
           "/*": [
             {
               "xml": "<uses-permission android:name=\"android.permission.INTERNET\" />",
-              "count": 74
+              "count": 86
             },
             {
               "xml": "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\" />",
-              "count": 37
+              "count": 43
             },
             {
               "xml": "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\" />",
-              "count": 37
+              "count": 43
             },
             {
               "xml": "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\" />",
-              "count": 38
+              "count": 44
             },
             {
               "xml": "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\" />",
-              "count": 37
+              "count": 43
             },
             {
               "xml": "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\" />",
-              "count": 38
+              "count": 44
             },
             {
               "xml": "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\" />",
-              "count": 37
+              "count": 43
             },
             {
               "xml": "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\" />",
-              "count": 37
+              "count": 43
             },
             {
               "xml": "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\" />",

+ 1 - 1
platforms/android/app/src/main/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.468e92c7b6b2ebb9c5fbd92316150fbf.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.e5aaf337e8770080039f.js></script><script type=text/javascript src=./static/js/app.c90714ee0957324606eb.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.118566cbae317bbaebc690af71a86117.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.d7f4ac00ee957f6fce9a.js></script><script type=text/javascript src=./static/js/app.9b08d06fa6616f6ed70e.js></script></body></html>

文件差異過大導致無法顯示
+ 0 - 0
platforms/android/app/src/main/assets/www/static/css/app.118566cbae317bbaebc690af71a86117.css


文件差異過大導致無法顯示
+ 0 - 0
platforms/android/app/src/main/assets/www/static/css/app.118566cbae317bbaebc690af71a86117.css.map


文件差異過大導致無法顯示
+ 0 - 0
platforms/android/app/src/main/assets/www/static/css/app.468e92c7b6b2ebb9c5fbd92316150fbf.css


文件差異過大導致無法顯示
+ 0 - 0
platforms/android/app/src/main/assets/www/static/css/app.468e92c7b6b2ebb9c5fbd92316150fbf.css.map


文件差異過大導致無法顯示
+ 0 - 0
platforms/android/app/src/main/assets/www/static/js/app.9b08d06fa6616f6ed70e.js


文件差異過大導致無法顯示
+ 0 - 0
platforms/android/app/src/main/assets/www/static/js/app.9b08d06fa6616f6ed70e.js.map


文件差異過大導致無法顯示
+ 0 - 0
platforms/android/app/src/main/assets/www/static/js/app.c90714ee0957324606eb.js


文件差異過大導致無法顯示
+ 0 - 0
platforms/android/app/src/main/assets/www/static/js/app.c90714ee0957324606eb.js.map


文件差異過大導致無法顯示
+ 0 - 0
platforms/android/app/src/main/assets/www/static/js/manifest.3ad1d5771e9b13dbdad2.js.map


文件差異過大導致無法顯示
+ 1 - 1
platforms/android/app/src/main/assets/www/static/js/vendor.d7f4ac00ee957f6fce9a.js


文件差異過大導致無法顯示
+ 0 - 0
platforms/android/app/src/main/assets/www/static/js/vendor.d7f4ac00ee957f6fce9a.js.map


文件差異過大導致無法顯示
+ 0 - 0
platforms/android/app/src/main/assets/www/static/js/vendor.e5aaf337e8770080039f.js.map


+ 5 - 5
platforms/ios/ios.json

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

+ 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.468e92c7b6b2ebb9c5fbd92316150fbf.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.e5aaf337e8770080039f.js></script><script type=text/javascript src=./static/js/app.c90714ee0957324606eb.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.118566cbae317bbaebc690af71a86117.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.d7f4ac00ee957f6fce9a.js></script><script type=text/javascript src=./static/js/app.9b08d06fa6616f6ed70e.js></script></body></html>

文件差異過大導致無法顯示
+ 0 - 0
platforms/ios/www/static/css/app.118566cbae317bbaebc690af71a86117.css


文件差異過大導致無法顯示
+ 0 - 0
platforms/ios/www/static/css/app.118566cbae317bbaebc690af71a86117.css.map


文件差異過大導致無法顯示
+ 0 - 0
platforms/ios/www/static/css/app.468e92c7b6b2ebb9c5fbd92316150fbf.css


文件差異過大導致無法顯示
+ 0 - 0
platforms/ios/www/static/css/app.468e92c7b6b2ebb9c5fbd92316150fbf.css.map


文件差異過大導致無法顯示
+ 0 - 0
platforms/ios/www/static/js/app.9b08d06fa6616f6ed70e.js


文件差異過大導致無法顯示
+ 0 - 0
platforms/ios/www/static/js/app.9b08d06fa6616f6ed70e.js.map


文件差異過大導致無法顯示
+ 0 - 0
platforms/ios/www/static/js/app.c90714ee0957324606eb.js


文件差異過大導致無法顯示
+ 0 - 0
platforms/ios/www/static/js/app.c90714ee0957324606eb.js.map


文件差異過大導致無法顯示
+ 0 - 0
platforms/ios/www/static/js/manifest.3ad1d5771e9b13dbdad2.js.map


文件差異過大導致無法顯示
+ 1 - 1
platforms/ios/www/static/js/vendor.d7f4ac00ee957f6fce9a.js


文件差異過大導致無法顯示
+ 0 - 0
platforms/ios/www/static/js/vendor.d7f4ac00ee957f6fce9a.js.map


文件差異過大導致無法顯示
+ 0 - 0
platforms/ios/www/static/js/vendor.e5aaf337e8770080039f.js.map


+ 1 - 1
platforms/ios/元气竞技场/元气竞技场-Info.plist

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

+ 80 - 0
vue/src/components/CopyMenu/CopyMenu.vue

@@ -0,0 +1,80 @@
+<template>
+    <div class="context-menu" :style="style">
+        <div class="copy-menu" :data-clipboard-text="text" ref="menu">复制</div>
+    </div>
+</template>
+<script>
+import clipboard from 'clipboard'
+
+export default {
+    data() {
+        return {
+            event: {},
+            text: '',
+            clipboard: null
+        }
+    },
+    computed: {
+        style() {
+            if (this.event.touches && this.event.touches.length) {
+                return {
+                    left: this.event.touches[0].clientX - 24 + 'px',
+                    top: this.event.touches[0].clientY - 40 + 'px'
+                }
+            }
+        }
+    },
+    created() {
+        // console.log(this.event)
+        document.addEventListener('click', this.mouseClick);
+    },
+    mounted() {
+        this.clipboard = new clipboard('.copy-menu');
+    },
+    methods: {
+        mouseClick(e) {
+            this.$destroy(true);
+            this.$el.parentNode.removeChild(this.$el);
+        }
+    },
+    beforeDestroy() {
+        document.removeEventListener('click', this.mouseClick);
+        this.clipboard.destroy();
+    }
+}
+</script>
+<style lang="less" scoped>
+.context-menu {
+    position: fixed;
+    .copy-menu {
+        width: 48px;
+        box-sizing: border-box;
+        height: 36px;
+        line-height: 36px;
+        font-size: 14px;
+        cursor: pointer;
+        background: rgb(50, 61, 71);
+        color: #ffffff;
+        padding: 0 10px;
+    }
+    &:after {
+        content: "";
+        width: 0;
+        height: 0;
+        border-left-width: 6px;
+        border-right-width: 6px;
+        border-top-width: 6px;
+        border-bottom-width: 0px;
+        border-left-color: rgba(0, 0, 0, 0);
+        border-right-color: rgba(0, 0, 0, 0);
+        border-top-color: rgb(50, 61, 71);
+        border-bottom-color: rgba(0, 0, 0, 0);
+        border-style: solid;
+        position: absolute;
+        left: 0;
+        right: 0;
+        bottom: -6px;
+        margin: auto;
+    }
+}
+</style>

+ 21 - 0
vue/src/components/CopyMenu/index.js

@@ -0,0 +1,21 @@
+import Vue from 'vue'
+import template from './CopyMenu.vue'
+
+let instance;
+let Constructor = Vue.extend(template);
+let CopyMenu = function (event, text) {
+    if (instance && !instance._isDestroyed) {
+        instance.vm.$destroy(true);
+        instance.vm.$el.parentNode.removeChild(instance.vm.$el);
+    }
+    instance = new Constructor({
+        data: {
+            event: event,
+            text: text
+        }
+    });
+    instance.vm = instance.$mount();
+    document.body.appendChild(instance.vm.$el);
+    return instance.vm
+};
+export default CopyMenu;

+ 50 - 21
vue/src/components/DoubleElimination.vue

@@ -97,8 +97,9 @@
                       :width="width"
                       :height="height"
                       class="team-rect"
-                      :style="{fill:finalData&&finalData.user1===highlightUser?'#F15436':''}"></rect>
-                <text :x="finalX + 40" :y="finalY - height + height/2 + 4" class="team-name">{{finalData.applyInfo1 ? finalData.applyInfo1.gameId : '暂无'}}</text>
+                      :class="{highlight:finalData.highlight[0],isMe:finalData.isMe[0]}"></rect>
+                <text :x="finalX + 40" :y="finalY - height + height/2 + 4"
+                      class="team-name" :class="{highlight:finalData.highlight[0],isMe:finalData.isMe[0]}">{{finalData.applyInfo1 ? finalData.applyInfo1.gameId : '暂无'}}</text>
                 <text :x="finalX + width - 20"
                       :y="finalY - height + height/2 + 4"
                       text-anchor="end"
@@ -108,8 +109,9 @@
                       :width="width"
                       :height="height"
                       class="team-rect"
-                      :style="{fill:finalData&&finalData.user2===highlightUser?'#F15436':''}"></rect>
-                <text :x="finalX + 40" :y="finalY + height/2 + 4" class="team-name">{{finalData.applyInfo2 ? finalData.applyInfo2.gameId : '暂无'}}</text>
+                      :class="{highlight:finalData.highlight[1],isMe:finalData.isMe[1]}"></rect>
+                <text :x="finalX + 40" :y="finalY + height/2 + 4"
+                      class="team-name" :class="{highlight:finalData.highlight[1],isMe:finalData.isMe[1]}">{{finalData.applyInfo2 ? finalData.applyInfo2.gameId : '暂无'}}</text>
                 <text :x="finalX + width - 20"
                       :y="finalY + height/2 + 4"
                       text-anchor="end"
@@ -132,20 +134,29 @@
                       :width="width"
                       :height="height"
                       style="fill: rgba(0,0,0,0)"
-                      @mouseover="mouseover(0,1)"
-                      @mouseout="mouseleave"></rect>
-                <rect :x="finalX" :y="finalY" :width="width" :height="height" style="fill: rgba(0,0,0,0)" @mouseover="mouseover(0,2)" @mouseout="mouseleave"></rect>
+                      @click="mouseover(0,1)"
+                      @mouseout="mouseleave"
+                      :copy-data="finalData.applyInfo1 ? finalData.applyInfo1.gameId : '暂无'"></rect>
+                <rect :x="finalX"
+                      :y="finalY"
+                      :width="width"
+                      :height="height"
+                      style="fill: rgba(0,0,0,0)"
+                      @click="mouseover(0,2)"
+                      @mouseout="mouseleave"
+                      :copy-data="finalData.applyInfo2 ? finalData.applyInfo2.gameId : '暂无'"></rect>
             </g>
             <g>
                 <rect :x="finalX + width + xGap"
                       :y="finalY - height"
                       :width="width"
                       :height="height"
-                      :style="{fill:extraData&&extraData.user1===highlightUser?'#F15436':''}"
-                      class="team-rect"></rect>
+                      class="team-rect"
+                      :class="{highlight:finalData.highlight[0],isMe:finalData.isMe[0]}"></rect>
                 <text :x="finalX + width + xGap + 40"
                       :y="finalY - height + height/2 + 4"
-                      class="team-name">{{extraData.applyInfo1 ? extraData.applyInfo1.gameId : '暂无'}}</text>
+                      class="team-name"
+                      :class="{highlight:finalData.highlight[0],isMe:finalData.isMe[0]}">{{extraData.applyInfo1 ? extraData.applyInfo1.gameId : '暂无'}}</text>
                 <text :x="finalX + width + xGap + width - 20"
                       :y="finalY - height + height/2 + 4"
                       text-anchor="end"
@@ -154,11 +165,12 @@
                       :y="finalY"
                       :width="width"
                       :height="height"
-                      :style="{fill:extraData&&extraData.user2===highlightUser?'#F15436':''}"
-                      class="team-rect"></rect>
+                      class="team-rect"
+                      :class="{highlight:finalData.highlight[1],isMe:finalData.isMe[1]}"></rect>
                 <text :x="finalX + width + xGap + 40"
                       :y="finalY + height/2 + 4"
-                      class="team-name">{{extraData.applyInfo2 ? extraData.applyInfo2.gameId : '暂无'}}</text>
+                      class="team-name"
+                      :class="{highlight:finalData.highlight[1],isMe:finalData.isMe[1]}">{{extraData.applyInfo2 ? extraData.applyInfo2.gameId : '暂无'}}</text>
                 <text :x="finalX + width + xGap + width - 20"
                       :y="finalY + height/2 + 4"
                       text-anchor="end"
@@ -180,15 +192,17 @@
                       :width="width"
                       :height="height"
                       style="fill: rgba(0,0,0,0)"
-                      @mouseover="mouseover(1,1)"
-                      @mouseout="mouseleave"></rect>
+                      @click="mouseover(1,1)"
+                      @mouseout="mouseleave"
+                      :copy-data="extraData.applyInfo1 ? extraData.applyInfo1.gameId : '暂无'"></rect>
                 <rect :x="finalX + width + xGap"
                       :y="finalY"
                       :width="width"
                       :height="height"
                       style="fill: rgba(0,0,0,0)"
-                      @mouseover="mouseover(1,2)"
-                      @mouseout="mouseleave"></rect>
+                      @click="mouseover(1,2)"
+                      @mouseout="mouseleave"
+                      :copy-data="extraData.applyInfo2 ? extraData.applyInfo2.gameId : '暂无'"></rect>
             </g>
             <image v-if="showUploadIcon(null,null,null,finalNum)"
                    class="upload-icon"
@@ -274,14 +288,20 @@ export default {
             }
         },
         finalData() {
-            return this.matchData.find(i => {
+            let data = this.matchData.find(i => {
                 return i.round === this.finalNum;
-            }) || {}
+            }) || {};
+            data.highlight = [data.user1 === this.highlightUser, data.user2 === this.highlightUser];
+            data.isMe = [this.userInfo && this.userInfo.id === data.user1, this.userInfo && this.userInfo.id === data.user2];
+            return data
         },
         extraData() {
-            return this.matchData.find(i => {
+            let data = this.matchData.find(i => {
                 return i.round === this.finalNum + 1;
-            }) || {}
+            }) || {};
+            data.highlight = [data.user1 === this.highlightUser, data.user2 === this.highlightUser];
+            data.isMe = [this.userInfo && this.userInfo.id === data.user1, this.userInfo && this.userInfo.id === data.user2];
+            return data;
         },
         finalX() {
             return this.xGap / 2 + (this.xGap + this.width) * this.loserRound;
@@ -516,10 +536,19 @@ export default {
     }
     .team-rect {
         fill: #192836;
+        &.highlight {
+            fill: #f15436;
+        }
     }
     .team-name {
         font-size: 13px;
         fill: #f2f3f4;
+        &.isMe {
+            fill: #f15436;
+        }
+        &.highlight {
+            fill: #f2f3f4;
+        }
     }
     .team-score {
         font-size: 13px;

+ 18 - 6
vue/src/components/RoundGroup.vue

@@ -8,8 +8,8 @@
             <div class="col head">积分</div>
         </div>
         <div class="row" v-for="n in groupNum" :key="`row-${n}`">
-            <div class="name">
-                <div :style="{width:width+'px'}">{{n}}.{{statisticsData[n-1].name}}</div>
+            <div class="name" :class="{isMe:isMe(statisticsData[n-1].userId)}">
+                <div :style="{width:width+'px'}" :copy-data="statisticsData[n-1].name">{{n}}.{{statisticsData[n-1].name}}</div>
             </div>
             <div class="col">{{statisticsData[n-1].win}}</div>
             <div class="col">{{statisticsData[n-1].lose}}</div>
@@ -22,11 +22,15 @@
             </div>
             <div class="row" v-for="n in groupNum * (groupNum - 1) / 2" :key="`vs-${j}-${n}`">
                 <div class="num">{{n}}.</div>
-                <div class="name1" :style="{width:vsNameWidth+'px'}">{{matchData[j-1][n-1].applyInfo1.gameId}}</div>
+                <div class="name1" :copy-data="matchData[j-1][n-1].applyInfo1.gameId"
+                     :class="{isMe:isMe(matchData[j-1][n-1].applyInfo1.userId)}"
+                     :style="{width:vsNameWidth+'px'}">{{matchData[j-1][n-1].applyInfo1.gameId}}</div>
                 <div class="score1">{{matchData[j-1][n-1].score1 >= 0 ? matchData[j-1][n-1].score1 : '-'}}</div>
                 <div class="vs">VS</div>
                 <div class="score2">{{matchData[j-1][n-1].score2 >= 0 ? matchData[j-1][n-1].score2 : '-'}}</div>
-                <div class="name2" :style="{width:vsNameWidth+'px'}">{{matchData[j-1][n-1].applyInfo2.gameId}}</div>
+                <div class="name2" :copy-data="matchData[j-1][n-1].applyInfo2.gameId"
+                     :class="{isMe:isMe(matchData[j-1][n-1].applyInfo2.userId)}"
+                     :style="{width:vsNameWidth+'px'}">{{matchData[j-1][n-1].applyInfo2.gameId}}</div>
             </div>
         </template>
     </div>
@@ -37,7 +41,6 @@ import { mapState } from 'vuex'
 export default {
     props: {
         i: Number,
-        width: Number,
         titleHeight: Number,
         colWidth: Number,
         rowHeight: Number,
@@ -62,7 +65,6 @@ export default {
         vsNameWidth() {
             return (window.innerWidth - 150) / 2
         },
-        colWidth() { },
         height() {
             return this.titleHeight + this.rowHeight * this.groupNum
                 + (this.mode === 'edit' ? 0 : this.loop * (this.titleHeight + this.groupNum * (this.groupNum - 1) / 2 * this.rowHeight))
@@ -143,12 +145,16 @@ export default {
         },
         uploadMatchData(matchData) {
             this.$emit('uploadMatchData', matchData);
+        },
+        isMe(id) {
+            return this.userInfo && this.userInfo.id === id
         }
     }
 }
 </script>
 <style lang="less" scoped>
 .card {
+    user-select: none;
     position: relative;
     background: rgba(25, 40, 54, 1);
     border-radius: 6px;
@@ -174,6 +180,7 @@ export default {
         align-items: center;
         .name {
             flex-grow: 1;
+            line-height: 36px;
             > div {
                 text-overflow: ellipsis;
                 white-space: nowrap;
@@ -207,6 +214,7 @@ export default {
         }
         .name1,
         .name2 {
+            line-height: 36px;
             text-overflow: ellipsis;
             overflow: hidden;
             white-space: nowrap;
@@ -214,4 +222,8 @@ export default {
         }
     }
 }
+
+.isMe {
+    color: rgba(241, 84, 54, 1);
+}
 </style>

+ 9 - 0
vue/src/components/SingleElimination.vue

@@ -254,10 +254,19 @@ export default {
     }
     .team-rect {
         fill: #192836;
+        &.highlight {
+            fill: #f15436;
+        }
     }
     .team-name {
         font-size: 13px;
         fill: #f2f3f4;
+        &.isMe {
+            fill: #f15436;
+        }
+        &.highlight {
+            fill: #f2f3f4;
+        }
     }
     .team-score {
         font-size: 13px;

+ 17 - 10
vue/src/components/VsPair.vue

@@ -1,16 +1,18 @@
 <template>
     <g>
         <rect :x="x" :y="y0" :width="width" :height="height"
-              :style="{fill:matchData&&matchData.user1===highlightUser?'#F15436':''}" class="team-rect"></rect>
-        <text :x="x + 40" :y="y0 + height/2 + 4" class="team-name">
+              class="team-rect"
+              :class="{highlight:highlight[0],isMe:isMe[0]}"></rect>
+        <text :x="x + 40" :y="y0 + height/2 + 4" class="team-name" :class="{highlight:highlight[0],isMe:isMe[0]}">
             {{name(1)}}
         </text>
         <text :x="x + width - 20" :y="y0 + height/2 + 4" text-anchor="end" class="team-score">
             {{matchData.score1 >= 0 ? matchData.score1 : '-'}}
         </text>
         <rect :x="x" :y="y1" :width="width" :height="height"
-              :style="{fill:matchData&&matchData.user2===highlightUser?'#F15436':''}" class="team-rect"></rect>
-        <text :x="x + 40" :y="y1 + height/2 + 4" class="team-name">
+              class="team-rect"
+              :class="{highlight:highlight[1],isMe:isMe[1]}"></rect>
+        <text :x="x + 40" :y="y1 + height/2 + 4" class="team-name" :class="{highlight:highlight[1],isMe:isMe[1]}">
             {{name(2)}}
         </text>
         <text :x="x + width - 20" :y="y1 + height/2 + 4" text-anchor="end" class="team-score">
@@ -36,16 +38,15 @@
                xlink:href="http://djq-img.oss-cn-hangzhou.aliyuncs.com/country/0.jpg" />
         <image :x="x + 5" :y="y1 + (height - 20) / 2" :width="30" :height="20"
                xlink:href="http://djq-img.oss-cn-hangzhou.aliyuncs.com/country/0.jpg" />
-        <rect :x="x" :y="y0" :width="width" :height="height" style="opacity: 0;" @mouseover="mouseover(1)"
-              @mouseout="mouseleave"></rect>
-        <rect :x="x" :y="y1" :width="width" :height="height" style="opacity: 0;" @mouseover="mouseover(2)"
-              @mouseout="mouseleave"></rect>
+        <rect :x="x" :y="y0" :width="width" :height="height" style="opacity: 0;" @click="mouseover(1)"
+              @mouseout="mouseleave" :copy-data="name(1)"></rect>
+        <rect :x="x" :y="y1" :width="width" :height="height" style="opacity: 0;" @click="mouseover(2)"
+              @mouseout="mouseleave" :copy-data="name(2)"></rect>
     </g>
 </template>
 <script>
 import country from './country'
 import { mapState } from 'vuex'
-
 export default {
     props: {
         type: {
@@ -73,7 +74,7 @@ export default {
         return { selected: null }
     },
     computed: {
-        ...mapState(['highlightUser']),
+        ...mapState(['highlightUser', 'userInfo']),
         x() {
             switch (this.type) {
                 case 'normal':
@@ -186,6 +187,12 @@ export default {
         },
         showSwitchIcon2() {
             return this.mode === 'edit' && this.matchData.user2 && !this.selected1 && (this.switchData.length < 2 || this.selected2)
+        },
+        highlight() {
+            return [this.matchData && this.matchData.user1 === this.highlightUser, this.matchData && this.matchData.user2 === this.highlightUser]
+        },
+        isMe() {
+            return [this.userInfo && this.userInfo.id === this.matchData.user1, this.userInfo && this.userInfo.id === this.matchData.user2]
         }
     },
     methods: {

+ 11 - 3
vue/src/pages/Apply.vue

@@ -13,6 +13,10 @@
                 <input @click="$event.target.focus()" class="input" v-model="gameId" placeholder="请填写游戏ID">
                 <img v-if="gameId" @click="gameId=''" src="../assets/icon_clear_pre.png" class="icon-clear">
             </div>
+            <div class="row" v-if="!matchInfo.isPublic">
+                <span class="label">报名密码</span>
+                <input @click="$event.target.focus()" class="input" v-model="password" placeholder="请填写报名密码">
+            </div>
             <div class="row" v-if="matchInfo.requireRealName">
                 <span class="label">真实姓名</span>
                 <input @click="$event.target.focus()"
@@ -71,7 +75,8 @@ export default {
             phone: '',
             qq: '',
             wx: '',
-            remark: ''
+            remark: '',
+            password: ''
         }
     },
     computed: {
@@ -101,6 +106,8 @@ export default {
                 this.$modal.info('请填写正确的QQ号');
             } else if (this.matchInfo.requireWx && !this.wx) {
                 this.$modal.info('请填写微信号');
+            } else if (!this.matchInfo.isPublic && !this.password) {
+                this.$modal.info('请填写报名密码');
             } else {
                 this.$http.post({
                     url: 'applyInfo/apply',
@@ -114,7 +121,8 @@ export default {
                         phone: this.phone || this.userInfo.phone,
                         qq: this.qq,
                         wx: this.wx,
-                        remark: this.remark
+                        remark: this.remark,
+                        password: this.matchInfo.isPublic ? '' : this.password
                     }
                 }).then(res => {
                     if (res.success) {
@@ -202,10 +210,10 @@ export default {
     width: 100%;
 }
 .btn-wrapper {
-    position: absolute;
     bottom: 0;
     left: 0;
     right: 0;
     padding: 0 14px 14px 14px;
+    margin-top: 20px;
 }
 </style>

+ 18 - 39
vue/src/pages/ForgetPassword.vue

@@ -1,23 +1,17 @@
 <template>
-    <div class="page-bg" v-if="verified">
-        <div class="title">请输入新密码</div>
-        <input-x
-            class="input-password"
-            v-model="password"
-            type="password"
-            :maxlength="16"
-            :icon="require('../assets/icon_password.png')"
-            placeholder="6-18位密码,可使用字母/数字/下划线"
-        ></input-x>
-        <button-x class="btn-confirm" @click="confirm">确定</button-x>
-    </div>
-    <div class="page-bg" v-else>
+    <div class="page-bg">
         <div class="title">找回密码</div>
         <input-x class="input-phone" v-model="phone" placeholder="输入手机号" :icon="require('../assets/icon_phone.png')" type="tel">
             <span class="btn-send-code" :class="{pending: time > 0}" @click="sendCode">{{btnText}}</span>
         </input-x>
         <input-x class="input-code" v-model="code" placeholder="输入短信验证码" :icon="require('../assets/icon_code.png')" type="tel" clearable></input-x>
-        <button-x class="btn-next" @click="next">下一步</button-x>
+        <input-x class="input-password"
+                 v-model="password"
+                 type="password"
+                 :maxlength="16"
+                 :icon="require('../assets/icon_password.png')"
+                 placeholder="6-18位密码,可使用字母/数字/下划线"></input-x>
+        <button-x class="btn-confirm" @click="confirm">确定</button-x>
     </div>
 </template>
 <script>
@@ -55,7 +49,7 @@ export default {
                 return
             }
             this.$http.get({
-                url: '/userInfo/sendResetPasswordCode',
+                url: '/rong/sendCode',
                 data: {
                     phone: this.phone
                 }
@@ -79,32 +73,14 @@ export default {
                 }
             })
         },
-        next() {
+        confirm() {
             if (!/^1[3-9]\d{9}$/.test(this.phone)) {
                 this.$toast('请输入正确的手机号')
                 return
             } else if (!this.code) {
                 this.$toast('请输入验证码')
                 return
-            }
-            this.$http.get({
-                url: '/userInfo/verifyResetPasswordCode',
-                data: {
-                    sessionId: this.sessionId,
-                    code: this.code,
-                    phone: this.phone
-                }
-            }).then(res => {
-                if (res.success) {
-                    this.verified = true
-                    this.key = res.data
-                } else {
-                    this.$toast(res.error)
-                }
-            })
-        },
-        confirm() {
-            if (this.password.length < 6) {
+            } else if (this.password.length < 6) {
                 this.$toast('密码不得小于6位')
                 return
             }
@@ -113,11 +89,12 @@ export default {
                 duration: 0
             })
             this.$http.post({
-                url: '/userInfo/resetPassword',
+                url: '/auth/setPassword',
                 data: {
+                    phone: this.phone,
                     password: this.password,
                     sessionId: this.sessionId,
-                    key: this.key
+                    code: this.code
                 }
             }).then(res => {
                 this.$modal.close()
@@ -143,10 +120,12 @@ export default {
     margin: 30px 0 0 15px;
     line-height: 28px;
 }
-.input-phone,
-.input-password {
+.input-phone {
     margin-top: 30px;
 }
+.input-password {
+    margin-top: 16px;
+}
 .input-code {
     margin-top: 16px;
 }

+ 3 - 2
vue/src/pages/Login.vue

@@ -33,7 +33,7 @@ export default {
                 duration: 0
             })
             this.$http.get({
-                url: '/rong/sendCode',
+                url: '/auth/sendCode',
                 data: {
                     phone: this.phone
                 }
@@ -44,7 +44,8 @@ export default {
                         name: 'VerifyCode',
                         query: {
                             phone: this.phone,
-                            sessionId: res.data
+                            sessionId: res.data.sessionId,
+                            registered: res.data.registered
                         }
                     })
                 } else {

+ 59 - 3
vue/src/pages/MatchInfo.vue

@@ -60,6 +60,8 @@ import SingleElimination from '../components/SingleElimination'
 import DoubleElimination from '../components/DoubleElimination'
 import RoundRobin from '../components/RoundRobin'
 import MescrollVue from 'mescroll.js/mescroll.vue'
+import CopyMenu from '../components/CopyMenu'
+
 export default {
     created() {
         this.$http.get({
@@ -121,6 +123,18 @@ export default {
     },
     mounted() {
         this.height = window.innerHeight - 90;
+        document.addEventListener('touchstart', this.touchStart)
+        document.addEventListener('touchmove', this.touchMove)
+        document.addEventListener('touchend', this.touchEnd)
+        document.addEventListener('touchcancel', this.touchCancel)
+        document.addEventListener('click', this.click)
+    },
+    beforeDestroy() {
+        document.removeEventListener('touchstart', this.touchStart)
+        document.removeEventListener('touchmove', this.touchMove)
+        document.removeEventListener('touchend', this.touchEnd)
+        document.removeEventListener('touchcancel', this.touchCancel)
+        document.removeEventListener('click', this.click)
     },
     // mounted() {
     //     this.$el.parentElement.append(this.$refs.btn)
@@ -138,8 +152,11 @@ export default {
             height: 0,
             mescroll: null, // mescroll实例对象
             mescrollDown: {
-                callback: this.downCallback
-            }
+                callback: this.downCallback,
+                afterLoading: mescroll => 500
+            },
+            timeout: null,
+            timestamp: 0
         }
     },
     computed: {
@@ -278,6 +295,46 @@ export default {
                     }
                 }).catch(() => { this.$modal.close() })
             })
+        },
+        touchStart(e) {
+            let copyData = e.target.getAttribute('copy-data')
+            if (copyData) {
+                e.preventDefault()
+                this.timestamp = new Date().getTime()
+                this.timeout = setTimeout(() => {
+                    CopyMenu(e, copyData)
+                }, 1000);
+            }
+        },
+        touchMove(e) {
+            if (this.timeout) {
+                clearTimeout(this.timeout)
+                this.timeout = null
+            }
+        },
+        touchEnd(e) {
+            let copyData = e.target.getAttribute('copy-data')
+            if (new Date().getTime() - this.timestamp < 1000) {
+                if (this.timeout) {
+                    clearTimeout(this.timeout)
+                    this.timeout = null
+                }
+            } else {
+                if (copyData) {
+                    e.preventDefault()
+                }
+            }
+        },
+        touchCancel() {
+            if (this.timeout) {
+                clearTimeout(this.timeout)
+                this.timeout = null
+            }
+        },
+        click(e) {
+            if (e.target.tagName !== 'rect') {
+                this.$store.commit('updateHighlightUser', '')
+            }
         }
     },
     watch: {
@@ -354,7 +411,6 @@ export default {
     padding-top: 10px;
     overflow-y: auto;
     -webkit-overflow-scrolling: touch;
-    height: 200px;
     box-sizing: border-box;
 }
 .card {

+ 2 - 4
vue/src/pages/MatchList.vue

@@ -95,8 +95,7 @@ export default {
         upCallback(page, mescroll) {
             let data = {
                 pageNumber: page.size,
-                currentPage: page.num,
-                isPublic: true
+                currentPage: page.num
             };
             if (this.matchFilter === 2) {
                 data.state = 2;
@@ -132,8 +131,7 @@ export default {
             this.loading = true
             let data = {
                 pageNumber: this.pageSize,
-                currentPage: this.currentPage,
-                isPublic: true
+                currentPage: this.currentPage
             };
             if (this.matchFilter === 2) {
                 data.state = 2;

+ 2 - 1
vue/src/pages/Mine.vue

@@ -63,7 +63,8 @@ export default {
             tab: 1,
             mescroll: null, // mescroll实例对象
             mescrollDown: {
-                callback: this.downCallback
+                callback: this.downCallback,
+                afterLoading: mescroll => 500
             }, //下拉刷新的配置. (如果下拉刷新和上拉加载处理的逻辑是一样的,则mescrollDown可不用写了)
             mescrollUp: { // 上拉加载的配置.
                 callback: this.upCallback, // 上拉回调,此处可简写; 相当于 callback: function (page, mescroll) { getListData(page); }

+ 40 - 2
vue/src/pages/VerifyCode.vue

@@ -6,7 +6,21 @@
             <span class="btn-resend" :class="{pending: time > 0}" @click="snedCode">{{btnText}}</span>
         </div>
         <input-x class="input-code" :icon="require('../assets/icon_code.png')" type="tel" placeholder="输入短信验证码" v-model="code" clearable></input-x>
-        <button-x class="btn-next" @click="login">注册/登录</button-x>
+        <input-x class="input-code"
+                 :icon="require('../assets/icon_password.png')"
+                 placeholder="请输入密码"
+                 type="password"
+                 v-model="password"
+                 v-if="!registered"
+                 @focus="password=''"></input-x>
+        <input-x class="input-code"
+                 :icon="require('../assets/icon_password.png')"
+                 placeholder="请重复密码"
+                 type="password"
+                 v-model="confirmPassword"
+                 v-if="!registered"
+                 @focus="confirmPassword=''"></input-x>
+        <button-x class="btn-next" @click="login">{{registered?'登录':'注册'}}</button-x>
         <div class="user-agree-wrapper" @click="agree = !agree">
             <div class="check" :class="{checked:agree}"></div>我已阅读并同意
             <span class="user-agree">《用户注册协议》</span>
@@ -41,10 +55,19 @@ export default {
             btnText: '(60秒)',
             interval: null,
             agree: true,
-            sid: ''
+            sid: '',
+            password: '',
+            confirmPassword: ''
         }
     },
     computed: {
+        registered() {
+            if (typeof this.$route.query.registered === 'boolean') {
+                return this.$route.query.registered
+            } else {
+                return this.$route.query.registered === 'true'
+            }
+        }
     },
     methods: {
         setupNavbar() {
@@ -85,6 +108,20 @@ export default {
                 this.$toast('请输入验证码')
                 return
             }
+            if (!this.registered) {
+                if (!this.password) {
+                    this.$toast('请输入密码')
+                    return
+                }
+                if (this.password.length < 6 || this.password.length > 18) {
+                    this.$toast('请输入6-18位密码')
+                    return
+                }
+                if (this.password !== this.confirmPassword) {
+                    this.$toast('两次密码输入不一致')
+                    return
+                }
+            }
             this.$modal.loading({ msg: '正在登录', duration: 0 })
             let registered = false
             this.$http.post({
@@ -93,6 +130,7 @@ export default {
                     phone: this.phone,
                     code: this.code,
                     sessionId: this.sid,
+                    password: this.registered ? '' : this.password,
                     remember: true,
                     requireToken: true
                 }

+ 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.468e92c7b6b2ebb9c5fbd92316150fbf.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.e5aaf337e8770080039f.js></script><script type=text/javascript src=./static/js/app.c90714ee0957324606eb.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.118566cbae317bbaebc690af71a86117.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.d7f4ac00ee957f6fce9a.js></script><script type=text/javascript src=./static/js/app.9b08d06fa6616f6ed70e.js></script></body></html>

文件差異過大導致無法顯示
+ 0 - 0
www/static/css/app.118566cbae317bbaebc690af71a86117.css


文件差異過大導致無法顯示
+ 0 - 0
www/static/css/app.118566cbae317bbaebc690af71a86117.css.map


文件差異過大導致無法顯示
+ 0 - 0
www/static/css/app.468e92c7b6b2ebb9c5fbd92316150fbf.css


文件差異過大導致無法顯示
+ 0 - 0
www/static/css/app.468e92c7b6b2ebb9c5fbd92316150fbf.css.map


文件差異過大導致無法顯示
+ 0 - 0
www/static/js/app.9b08d06fa6616f6ed70e.js


文件差異過大導致無法顯示
+ 0 - 0
www/static/js/app.9b08d06fa6616f6ed70e.js.map


文件差異過大導致無法顯示
+ 0 - 0
www/static/js/app.c90714ee0957324606eb.js


文件差異過大導致無法顯示
+ 0 - 0
www/static/js/app.c90714ee0957324606eb.js.map


文件差異過大導致無法顯示
+ 0 - 0
www/static/js/manifest.3ad1d5771e9b13dbdad2.js.map


文件差異過大導致無法顯示
+ 1 - 1
www/static/js/vendor.d7f4ac00ee957f6fce9a.js


文件差異過大導致無法顯示
+ 0 - 0
www/static/js/vendor.d7f4ac00ee957f6fce9a.js.map


文件差異過大導致無法顯示
+ 0 - 0
www/static/js/vendor.e5aaf337e8770080039f.js.map


部分文件因文件數量過多而無法顯示