yuantianjiao 6 years ago
parent
commit
d6fc3762d2

+ 1
- 1
src/components/material.vue View File

@@ -38,7 +38,7 @@
38 38
         name='media'
39 39
         class="upload-btn">
40 40
         <div>
41
-          <Icon type="ios-camera" size="50"></Icon>
41
+          <Icon type="md-images" size="50"/>
42 42
         </div>
43 43
       </Upload>
44 44
       <Modal title="查看大图" v-model="visible">

+ 8
- 7
src/pages/main/main.vue View File

@@ -66,13 +66,14 @@ export default {
66 66
   },
67 67
   created () {
68 68
     this.getMainMenu()
69
-    this.getUserInfo()
70
-    this.checkBind().then(() => {
71
-      if (this.isBind) {
72
-        this.showPage = true
73
-      } else {
74
-        this.$Message.warning('请先通知管理员绑定项目,再进行微信配置')
75
-      }
69
+    this.getUserInfo().then(() => {
70
+      this.checkBind().then(() => {
71
+        if (this.isBind || this.userInfo.UserType === 'admin') {
72
+          this.showPage = true
73
+        } else {
74
+          this.$Message.warning('请先通知管理员绑定项目,再进行微信配置')
75
+        }
76
+      })
76 77
     })
77 78
   },
78 79
   components: {

+ 1
- 0
src/pages/main/reply/editReply.vue View File

@@ -106,6 +106,7 @@ export default {
106 106
     checkForm (data) {
107 107
       let formData = {}
108 108
       formData.RuleName = this.name
109
+      formData.IsUse = this.$route.query.state ? 'on' : 'off'
109 110
       formData.PairType = this.type === '模糊' ? 'blur' : 'acu'
110 111
       formData.Keywords = this.tagList.join()
111 112
       formData.AutoType = 'keyword'

+ 3
- 2
src/pages/main/reply/reply.vue View File

@@ -71,7 +71,7 @@ export default {
71 71
                   'margin-right': '20px'
72 72
                 },
73 73
                 on: {
74
-                  click: () => { this.$router.push({ name: 'editReply', query: { id: params.row.AutoReplyId } }) }
74
+                  click: () => { this.$router.push({ name: 'editReply', query: { id: params.row.AutoReplyId,state: this.keywordSwitch } }) }
75 75
                 },
76 76
               }, '编辑'),
77 77
               h('Button', {
@@ -140,6 +140,7 @@ export default {
140 140
     checkForm (data) {
141 141
       let formData = {}
142 142
       formData.AutoType = 'subscribe'
143
+      formData.IsUse = this.attentionSwitch ? 'on' : 'off'
143 144
       if (data.type === 'text') {
144 145
         formData.MessageType = 'paragraph'
145 146
         formData.MessageParagraph = data.value
@@ -185,7 +186,7 @@ export default {
185 186
       })
186 187
     },
187 188
     edit () {
188
-      this.$router.push({ name: 'editReply' })
189
+      this.$router.push({ name: 'editReply', query: { state: this.keywordSwitch } })
189 190
     }
190 191
   }
191 192
 }

+ 1
- 1
src/pages/main/user/editUser.vue View File

@@ -28,7 +28,7 @@
28 28
         :action="api.common.image.url"
29 29
         style="display: inline-block;width:58px;">
30 30
         <div style="width: 58px;height:58px;line-height: 58px;">
31
-          <Icon type="ios-camera" size="20"></Icon>
31
+          <Icon type="md-images" />
32 32
         </div>
33 33
       </Upload>
34 34
       <Modal title="查看大图" v-model="visible">

+ 4
- 0
src/store/menuConfig.js View File

@@ -122,12 +122,16 @@ export default {
122 122
               if (current.type === 'click') {
123 123
                 current.type = 'text'
124 124
                 current.value = res.keyList.filter(item => item.KeyId === current.key)[0].Value
125
+              } else if (current.type === 'media_id') {
126
+                current.url = res.imgList.filter(item => item.MediaId === current.media_id)[0].Url
125 127
               }
126 128
               if (current.sub_button) {
127 129
                 current.sub_button.forEach((curr) => {
128 130
                   if (curr.type === 'click') {
129 131
                     curr.type = 'text'
130 132
                     curr.value = res.keyList.filter(item => item.KeyId === curr.key)[0].Value
133
+                  } else if (curr.type === 'media_id') {
134
+                    curr.url = res.imgList.filter(item => item.MediaId === curr.media_id)[0].Url
131 135
                   }
132 136
                 })
133 137
               }