panhui 3 лет назад
Родитель
Сommit
dc48b7bf72
6 измененных файлов с 36 добавлено и 11 удалено
  1. 1 1
      .env.development
  2. 1 1
      .env.production
  3. BIN
      src/assets/ong-weikaiqi.png
  4. 3 3
      src/mixins/room.js
  5. 5 1
      src/views/Room.vue
  6. 26 5
      src/views/RoomCreate.vue

+ 1 - 1
.env.development

@@ -2,5 +2,5 @@ VUE_APP_BASE_URL=https://yags.raex.vip
 NODE_ENV=development
 VUE_APP_PUBLIC_PATH=/
 ASSETS_PATH=raex
-TITLE=电竞
+TITLE=绿洲电竞
 VUE_APP_PAGE_TYPE=raex

+ 1 - 1
.env.production

@@ -2,5 +2,5 @@ VUE_APP_BASE_URL=/
 NODE_ENV=production
 VUE_APP_PUBLIC_PATH=/h5/
 ASSETS_PATH=raex
-TITLE=电竞
+TITLE=绿洲电竞
 VUE_APP_PAGE_TYPE=raex

BIN
src/assets/ong-weikaiqi.png


+ 3 - 3
src/mixins/room.js

@@ -5,9 +5,9 @@ export default {
                 { label: '匹配中', value: 'WAITING' },
                 { label: '进行中', value: 'GAMING' },
                 { label: '审核中', value: 'AUDIT' },
-                { label: '完成', value: 'FINISH' },
-                { label: '取消', value: 'CANCEL' },
-                { label: '流局', value: 'PASSED' }
+                { label: '完成', value: 'FINISH' },
+                { label: '取消', value: 'CANCELLED' },
+                { label: '流局', value: 'PASSED' }
             ],
             requireTicketOptions: [
                 {

+ 5 - 1
src/views/Room.vue

@@ -135,7 +135,11 @@
                         <img src="@assets/png-quxiaobaoming.png" alt="" />
                         <span>取消报名</span>
                     </div>
-                    <div class="btn" @click="changeUrl" v-if="isHost">
+                    <div
+                        class="btn"
+                        @click="changeUrl"
+                        v-if="isHost && (info.status == 'WAITING' || info.status == 'GAMING')"
+                    >
                         <img src="@assets/png-xiugaidizhi.png" alt="" />
                         <span>修改地址</span>
                     </div>

+ 26 - 5
src/views/RoomCreate.vue

@@ -98,12 +98,14 @@
                 <div class="selects" :class="{ selectOnly: pickerOptions.length === 1 }">
                     <div
                         class="select"
-                        :class="{ prim: pickerValue === item.value }"
+                        :class="{ prim: pickerValue === item.value, not: item.needAudit }"
                         v-for="(item, index) in pickerOptions"
                         :key="index"
-                        @click="choosePicker(item.value)"
+                        @click="choosePicker(item.value, item.needAudit)"
                     >
                         {{ item.label }}
+
+                        <img src="@assets/ong-weikaiqi.png" v-if="item.needAudit" class="not-img" alt="" />
                     </div>
                 </div>
             </div>
@@ -175,6 +177,7 @@ export default {
         }
     },
     mounted() {
+        this.$http.get('/sysConfig/get/can_audit');
         this.$http
             .post('/gameMode/all', { size: 1000, query: { del: false } }, { body: 'json' })
             .then(res => {
@@ -184,7 +187,8 @@ export default {
                         value: item.id,
                         minPlayerNum: item.minPlayerNum,
                         maxPlayerNum: item.maxPlayerNum,
-                        gameId: item.gameId
+                        gameId: item.gameId,
+                        needAudit: item.needAudit
                     };
                 });
             })
@@ -323,7 +327,11 @@ export default {
                     this.$toast(e.error);
                 });
         },
-        choosePicker(id) {
+        choosePicker(id, needAudit = false) {
+            if (needAudit) {
+                this.wait();
+                return;
+            }
             if (this.pickerType == 'modeId') {
                 let info = [...this.modeIdOptions].find(item => {
                     return item.value === id;
@@ -354,7 +362,7 @@ export default {
         });
     },
     beforeRouteLeave(to, from, next) {
-        if (to.path === '/shop') {
+        if (to.path === '/shop' || to.path === '/roomDes') {
             this.scrollTop = this.scrollWrapper.scrollTop;
             this.setKeeps(['roomCreate']);
         } else {
@@ -429,10 +437,23 @@ export default {
             text-align: center;
             line-height: 32px;
             border-radius: 4px;
+            color: #6a6d83;
             &.prim {
                 background: linear-gradient(225deg, #f6abf0 0%, #10f7ee 100%);
                 color: #1a1c2b;
             }
+
+            &.not {
+                position: relative;
+                color: #6a6d8366;
+                .not-img {
+                    width: 42px;
+                    height: 28px;
+                    position: absolute;
+                    right: 4px;
+                    top: 0;
+                }
+            }
         }
         &.selectOnly {
             justify-content: center;