Baozhangchao 3 years ago
parent
commit
f45e20c1d1
3 changed files with 23 additions and 28 deletions
  1. 4
    4
      src/views/WeChatConfig/index.vue
  2. 1
    3
      src/views/dashboard/index.vue
  3. 18
    21
      src/views/gameManage/edit.vue

+ 4
- 4
src/views/WeChatConfig/index.vue View File

@@ -1,17 +1,17 @@
1 1
 <template>
2 2
   <div class="body">
3 3
     <el-card class="box-card">
4
+      <div slot="header" class="clearfix">
5
+        <el-button type="primary" style="float: right" icon="el-icon-plus" @click="handleAdd">新建配置</el-button>
6
+      </div>
4 7
       <div class="text item">
5
-        <div slot="header" class="clearfix">
6
-          <el-button type="primary" style="float: right" icon="el-icon-plus" @click="handleAdd">新建配置</el-button>
7
-        </div>
8 8
         <el-table stripe :data="tableData" border style="width: 100%">
9 9
           <el-table-column prop="appName" label="配置名称" />
10 10
 
11 11
           <el-table-column prop="picture" label="二维码" align="center">
12 12
             <template slot-scope="scope">
13 13
               <!-- :src="scope.row.qrCode" -->
14
-              <el-popover placement="right" title="二维码" trigger="hover">
14
+              <el-popover placement="right" trigger="hover" style="cursor: pointer;">
15 15
                 <el-image
16 16
                   slot="reference"
17 17
                   src="https://cdn4.buysellads.net/uu/1/41334/1550855401-cc_light.png"

+ 1
- 3
src/views/dashboard/index.vue View File

@@ -10,9 +10,7 @@ import { mapGetters } from 'vuex'
10 10
 export default {
11 11
   name: 'Dashboard',
12 12
   computed: {
13
-    ...mapGetters([
14
-      'name'
15
-    ])
13
+    ...mapGetters(['name'])
16 14
   }
17 15
 }
18 16
 </script>

+ 18
- 21
src/views/gameManage/edit.vue View File

@@ -8,7 +8,11 @@
8 8
             <el-input v-model="gameForm.title" />
9 9
           </el-form-item>
10 10
           <el-form-item label="游戏图标:">
11
-            <UploadImage :icon="gameForm.gameImage" @handleChange="handleChange" @handleDeleteIcon="handleDeleteIcon" />
11
+            <UploadImage
12
+              :icon="gameForm.gameImage"
13
+              @handleChange="handleChange"
14
+              @handleDeleteIcon="handleDeleteIcon"
15
+            />
12 16
           </el-form-item>
13 17
           <el-form-item label="游戏类型:" prop="resultMode">
14 18
             <el-select
@@ -32,16 +36,12 @@
32 36
           </el-form-item>
33 37
         </el-form>
34 38
       </el-tab-pane>
35
-      <el-tab-pane
36
-        label="关联特征"
37
-        name="game-character"
38
-        :disabled="gameId ? false : true"
39
-      >
39
+      <el-tab-pane label="关联特征" name="game-character" :disabled="gameId ? false : true">
40 40
         <el-row :gutter="20" style="padding-top: 20px">
41 41
           <el-col :span="12">
42 42
             <GameCharacter
43 43
               ref="GameCharacter"
44
-              :gameId='gameId'
44
+              :gameId="gameId"
45 45
               @handleAddGameCharacter="characterId = undefined"
46 46
               @handleCloseGameCharacter="characterId = undefined"
47 47
               @handleEditGameCharacter="handleEditGameCharacter"
@@ -49,24 +49,20 @@
49 49
           </el-col>
50 50
           <el-col :span="12">
51 51
             <GameCharacterEdit
52
-              :characterId='characterId'
53
-              :gameId='gameId'
52
+              :characterId="characterId"
53
+              :gameId="gameId"
54 54
               @handleRefreshGameCharacter="handleRefreshGameCharacter"
55 55
               @handleEditGameCharacter="handleEditGameCharacter"
56 56
             />
57 57
           </el-col>
58 58
         </el-row>
59 59
       </el-tab-pane>
60
-      <el-tab-pane
61
-        label="游戏题库"
62
-        name="question"
63
-        :disabled="gameId ? false : true"
64
-      >
60
+      <el-tab-pane label="游戏题库" name="question" :disabled="gameId ? false : true">
65 61
         <el-row :gutter="20" style="padding-top: 20px">
66 62
           <el-col :span="12">
67 63
             <Question
68 64
               ref="Question"
69
-              :gameId='gameId'
65
+              :gameId="gameId"
70 66
               @handleAddQuestion="questionId = undefined"
71 67
               @handleCloseQuestion="questionId = undefined"
72 68
               @handleEditQuestion="handleEditQuestion"
@@ -105,10 +101,10 @@ export default {
105 101
   data() {
106 102
     return {
107 103
       rules: {
108
-        title: [
109
-          { required: true, message: '请输入游戏名称', trigger: 'blur' }
110
-        ],
111
-        resultMode: [{ required: true, message: '请选择游戏类型', trigger: 'blur' }]
104
+        title: [{ required: true, message: '请输入游戏名称', trigger: 'blur' }],
105
+        resultMode: [
106
+          { required: true, message: '请选择游戏类型', trigger: 'blur' }
107
+        ]
112 108
       },
113 109
       gameForm: {
114 110
         title: undefined,
@@ -134,7 +130,8 @@ export default {
134 130
   watch: {
135 131
     '$route.query.id': {
136 132
       handler(val) {
137
-        if (val) { // 有值代表是编辑状态 查询详情  没有值就是新增
133
+        if (val) {
134
+          // 有值代表是编辑状态 查询详情  没有值就是新增
138 135
           this.gameId = val
139 136
           getGameDetail(val).then((res) => {
140 137
             this.gameForm = res.data
@@ -199,7 +196,7 @@ export default {
199 196
 }
200 197
 </script>
201 198
 <style scoped>
202
-.gameForm{
199
+.gameForm {
203 200
   width: 700px;
204 201
   margin: auto;
205 202
 }