Baozhangchao 3 anos atrás
pai
commit
9ad657693e

+ 34
- 32
src/layout/index.vue Ver arquivo

@@ -51,43 +51,45 @@ export default {
51 51
 </script>
52 52
 
53 53
 <style lang="scss" scoped>
54
-  @import "~@/styles/mixin.scss";
55
-  @import "~@/styles/variables.scss";
54
+@import '~@/styles/mixin.scss';
55
+@import '~@/styles/variables.scss';
56 56
 
57
-  .app-wrapper {
58
-    @include clearfix;
59
-    position: relative;
60
-    height: 100%;
61
-    width: 100%;
62
-    &.mobile.openSidebar{
63
-      position: fixed;
64
-      top: 0;
65
-    }
66
-  }
67
-  .drawer-bg {
68
-    background: #000;
69
-    opacity: 0.3;
70
-    width: 100%;
71
-    top: 0;
72
-    height: 100%;
73
-    position: absolute;
74
-    z-index: 999;
75
-  }
57
+.app-wrapper {
58
+  @include clearfix;
59
+  position: relative;
60
+  height: 100%;
61
+  width: 100%;
62
+  background-color: #f0f2f5;
76 63
 
77
-  .fixed-header {
64
+  &.mobile.openSidebar {
78 65
     position: fixed;
79 66
     top: 0;
80
-    right: 0;
81
-    z-index: 9;
82
-    width: calc(100% - #{$sideBarWidth});
83
-    transition: width 0.28s;
84 67
   }
68
+}
69
+.drawer-bg {
70
+  background: #000;
71
+  opacity: 0.3;
72
+  width: 100%;
73
+  top: 0;
74
+  height: 100%;
75
+  position: absolute;
76
+  z-index: 999;
77
+}
85 78
 
86
-  .hideSidebar .fixed-header {
87
-    width: calc(100% - 54px)
88
-  }
79
+.fixed-header {
80
+  position: fixed;
81
+  top: 0;
82
+  right: 0;
83
+  z-index: 9;
84
+  width: calc(100% - #{$sideBarWidth});
85
+  transition: width 0.28s;
86
+}
89 87
 
90
-  .mobile .fixed-header {
91
-    width: 100%;
92
-  }
88
+.hideSidebar .fixed-header {
89
+  width: calc(100% - 54px);
90
+}
91
+
92
+.mobile .fixed-header {
93
+  width: 100%;
94
+}
93 95
 </style>

+ 13
- 8
src/views/AppController/index.vue Ver arquivo

@@ -1,8 +1,13 @@
1 1
 <template>
2 2
   <div class="body">
3
-    <el-card class="box-card">
3
+    <el-card class="box-card" style="box-shadow: none;">
4 4
       <div slot="header" class="clearfix">
5
-        <el-button type="primary" style="float: right" @click="dialogFormVisible = true">新建应用</el-button>
5
+        <el-button
6
+          type="primary"
7
+          style="float: right"
8
+          icon="el-icon-plus"
9
+          @click="dialogFormVisible = true"
10
+        >新建应用</el-button>
6 11
       </div>
7 12
       <div class="text item">
8 13
         <el-table stripe :data="tableData" border style="width: 100%">
@@ -10,18 +15,19 @@
10 15
 
11 16
           <el-table-column align="center" label="操作" min-width="100" width="500">
12 17
             <template slot-scope="scope">
13
-              <el-button
14
-                style="margin-right:5em"
18
+              <el-link
19
+                :underline="false"
20
+                style="margin-right:1em"
15 21
                 type="primary"
16 22
                 @click="handeldialog(scope.row.appId)"
17
-              >编辑</el-button>
23
+              >编辑</el-link>
18 24
               <el-popconfirm
19 25
                 icon="el-icon-info"
20 26
                 icon-color="red"
21 27
                 title="确定要删除该配置吗?"
22 28
                 @onConfirm="handleDelete(scope.row.appId)"
23 29
               >
24
-                <el-button slot="reference" type="danger">删除</el-button>
30
+                <el-link slot="reference" type="danger" :underline="false">删除</el-link>
25 31
               </el-popconfirm>
26 32
             </template>
27 33
           </el-table-column>
@@ -204,5 +210,4 @@ export default {
204 210
   }
205 211
 }
206 212
 </script>
207
-<style>
208
-</style>
213
+

+ 74
- 63
src/views/WeChatConfig/Edit.vue Ver arquivo

@@ -1,69 +1,74 @@
1 1
 <template>
2 2
   <div>
3
-    <el-row :gutter="24">
4
-      <el-col :span="18">
5
-        <el-form
6
-          ref="ruleForm"
7
-          :model="ruleForm"
8
-          :rules="rules"
9
-          label-width="10vw"
10
-          class="demo-ruleForm"
11
-        >
12
-          <el-form-item label="配置名称" prop="appName" style="width:30vw">
13
-            <el-input v-model="ruleForm.appName" />
14
-          </el-form-item>
15
-          <el-form-item label="二维码" prop="qrCode">
16
-            <img
17
-              width="150"
18
-              alt="二维码"
19
-              src="https://cdn4.buysellads.net/uu/1/41334/1550855401-cc_light.png"
20
-            >
21
-          </el-form-item>
22
-          <el-form-item label="类型" prop="appType">
23
-            <el-select v-model="ruleForm.appType" placeholder="请选择类型">
24
-              <el-option label="小程序" value="ma" />
25
-              <el-option label="公众号" value="md" />
26
-            </el-select>
27
-          </el-form-item>
28
-          <el-form-item style="width:30vw" label="AppID" prop="appid">
29
-            <el-input v-model="ruleForm.appid" />
30
-          </el-form-item>
31
-          <el-form-item style="width:30vw" label="Secret" prop="secret">
32
-            <el-input v-model="ruleForm.secret" />
33
-          </el-form-item>
34
-          <el-form-item style="width:30vw" label="Token" prop="token">
35
-            <el-input v-model="ruleForm.token" />
36
-          </el-form-item>
37
-          <el-form-item style="width:30vw" label="AesKey" prop="aesKey">
38
-            <el-input v-model="ruleForm.aesKey" />
39
-          </el-form-item>
40
-          <el-form-item style="width:30vw" label="消息格式类型" prop="msgDataFormat">
41
-            <el-input v-model="ruleForm.msgDataFormat" />
42
-          </el-form-item>
43
-          <el-form-item style="width:30vw" label="接口代理地址" prop="httpPoxyHost">
44
-            <el-input v-model="ruleForm.httpPoxyHost" />
45
-          </el-form-item>
46
-          <el-form-item style="width:30vw" label="接口代理端口" prop="httpProxyPort">
47
-            <el-input v-model="ruleForm.httpProxyPort" type="Number" />
48
-          </el-form-item>
49
-          <el-form-item style="width:30vw" label="第三方接口地址" prop="apiUrl">
50
-            <el-input v-model="ruleForm.apiUrl" />
51
-          </el-form-item>
52
-          <el-form-item label="发布状态" prop="status">
53
-            <el-select v-model="ruleForm.status" placeholder="请选择状态">
54
-              <el-option label="发布" :value="1" />
55
-              <el-option label="未发布" :value="0" />
56
-            </el-select>
57
-          </el-form-item>
3
+    <el-card class="box-card">
4
+      <el-row :gutter="24">
5
+        <el-col :span="18">
6
+          <el-form
7
+            ref="ruleForm"
8
+            :model="ruleForm"
9
+            :rules="rules"
10
+            label-width="10vw"
11
+            class="demo-ruleForm"
12
+          >
13
+            <el-form-item label="配置名称" prop="appName" style="width:30vw">
14
+              <el-input v-model="ruleForm.appName" />
15
+            </el-form-item>
16
+            <el-form-item label="二维码" prop="qrCode">
17
+              <img
18
+                width="150"
19
+                alt="二维码"
20
+                src="https://cdn4.buysellads.net/uu/1/41334/1550855401-cc_light.png"
21
+              />
22
+            </el-form-item>
23
+            <el-form-item label="类型" prop="appType">
24
+              <el-select v-model="ruleForm.appType" placeholder="请选择类型">
25
+                <el-option label="小程序" value="ma" />
26
+                <el-option label="公众号" value="md" />
27
+              </el-select>
28
+            </el-form-item>
29
+            <el-form-item style="width:30vw" label="AppID" prop="appid">
30
+              <el-input v-model="ruleForm.appid" />
31
+            </el-form-item>
32
+            <el-form-item style="width:30vw" label="Secret" prop="secret">
33
+              <el-input v-model="ruleForm.secret" />
34
+            </el-form-item>
35
+            <el-form-item style="width:30vw" label="Token" prop="token">
36
+              <el-input v-model="ruleForm.token" />
37
+            </el-form-item>
38
+            <el-form-item style="width:30vw" label="AesKey" prop="aesKey">
39
+              <el-input v-model="ruleForm.aesKey" />
40
+            </el-form-item>
41
+            <el-form-item style="width:30vw" label="消息格式类型" prop="msgDataFormat">
42
+              <el-input v-model="ruleForm.msgDataFormat" />
43
+            </el-form-item>
44
+            <el-form-item style="width:30vw" label="接口代理地址" prop="httpPoxyHost">
45
+              <el-input v-model="ruleForm.httpPoxyHost" />
46
+            </el-form-item>
47
+            <el-form-item style="width:30vw" label="接口代理端口" prop="httpProxyPort">
48
+              <el-input v-model="ruleForm.httpProxyPort" type="Number" />
49
+            </el-form-item>
50
+            <el-form-item style="width:30vw" label="第三方接口地址" prop="apiUrl">
51
+              <el-input v-model="ruleForm.apiUrl" />
52
+            </el-form-item>
53
+            <el-form-item label="发布状态" prop="status">
54
+              <el-select v-model="ruleForm.status" placeholder="请选择状态">
55
+                <el-option label="发布" :value="1" />
56
+                <el-option label="未发布" :value="0" />
57
+              </el-select>
58
+            </el-form-item>
58 59
 
59
-          <el-form-item>
60
-            <el-button type="primary" @click="submitForm('ruleForm')">{{ !configId?'新建配置':'修改配置' }}</el-button>
61
-            <!-- <el-button type="primary" @click="submitForm('ruleForm')">应用配置</el-button> -->
62
-            <el-button @click="resetForm('ruleForm')">重置</el-button>
63
-          </el-form-item>
64
-        </el-form>
65
-      </el-col>
66
-    </el-row>
60
+            <el-form-item>
61
+              <el-button
62
+                type="primary"
63
+                @click="submitForm('ruleForm')"
64
+              >{{ !configId?'新建配置':'修改配置' }}</el-button>
65
+              <!-- <el-button type="primary" @click="submitForm('ruleForm')">应用配置</el-button> -->
66
+              <el-button @click="resetForm('ruleForm')">重置</el-button>
67
+            </el-form-item>
68
+          </el-form>
69
+        </el-col>
70
+      </el-row>
71
+    </el-card>
67 72
   </div>
68 73
 </template>
69 74
 
@@ -182,3 +187,9 @@ export default {
182 187
   margin-top: 1em;
183 188
 }
184 189
 </style>
190
+
191
+<style lang="scss" scoped>
192
+.box-card {
193
+  box-shadow: none;
194
+}
195
+</style>

+ 22
- 10
src/views/WeChatConfig/index.vue Ver arquivo

@@ -1,22 +1,31 @@
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" @click="handleAdd">新建配置</el-button>
6
-      </div>
7 4
       <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">
15
+                <el-image
16
+                  slot="reference"
17
+                  src="https://cdn4.buysellads.net/uu/1/41334/1550855401-cc_light.png"
18
+                  alt="scope.row.image_url"
19
+                  style="max-height: 110px;max-width: 110px"
20
+                />
21
+                <el-image src="https://cdn4.buysellads.net/uu/1/41334/1550855401-cc_light.png" />
22
+              </el-popover>
14 23
 
15
-              <img
24
+              <!-- <img
16 25
                 src="https://cdn4.buysellads.net/uu/1/41334/1550855401-cc_light.png"
17 26
                 min-width="70"
18
-                height="100"
19
-              />
27
+                height="80"
28
+              />-->
20 29
             </template>
21 30
           </el-table-column>
22 31
 
@@ -31,18 +40,18 @@
31 40
           </el-table-column>
32 41
           <el-table-column align="center" label="操作" min-width="100" width="280">
33 42
             <template slot-scope="scope">
34
-              <el-button style="margin-right:1em" type="primary">
43
+              <el-link :underline="false" style="margin-right:1em" type="primary">
35 44
                 <router-link
36 45
                   :to="{path:'WeChatConfig/Edit',query: { configId: scope.row.configId }}"
37 46
                 >编辑</router-link>
38
-              </el-button>
47
+              </el-link>
39 48
               <el-popconfirm
40 49
                 icon="el-icon-info"
41 50
                 icon-color="red"
42 51
                 title="确定要删除该配置吗?"
43 52
                 @onConfirm="handleDelete(scope.row)"
44 53
               >
45
-                <el-button slot="reference" type="danger">删除</el-button>
54
+                <el-link slot="reference" :underline="false" type="danger">删除</el-link>
46 55
               </el-popconfirm>
47 56
             </template>
48 57
           </el-table-column>
@@ -132,5 +141,8 @@ export default {
132 141
   }
133 142
 }
134 143
 </script>
135
-<style>
144
+<style lang="scss" scoped>
145
+.box-card {
146
+  box-shadow: none;
147
+}
136 148
 </style>