yuantianjiao 6 年之前
父節點
當前提交
10505b59d1

+ 7
- 2
src/components/menuForm.vue 查看文件

@@ -16,7 +16,7 @@
16 16
       <RadioGroup v-model="active" type="button" size="large" style="padding-bottom:20px">
17 17
         <Radio label="文字" style="line-height:32px;"></Radio>
18 18
         <Radio label="图片" style="line-height:32px;"></Radio>
19
-        <Radio label="图文" style="line-height:32px;"></Radio>
19
+        <!-- <Radio label="图文" style="line-height:32px;"></Radio> -->
20 20
       </RadioGroup>
21 21
       <div v-show="active === '文字'">
22 22
         <Input type="textarea" v-model="text" :rows="4" placeholder="输入消息文字" />
@@ -74,6 +74,7 @@
74 74
       </div>
75 75
       <div v-show="active === '图文'">
76 76
         <div>
77
+          <Button type="info" @click="chooseView">从素材库中选取</Button>
77 78
           <Button type="info" @click="chooseView">从素材库中选取</Button>
78 79
           <Modal width='800' v-model="showMaterialView" @on-ok="checkView" @on-cancel="closeView">
79 80
             <material v-if="showMaterialView" :type='materialType' :model='model' @emit='setView'></material>
@@ -95,6 +96,7 @@
95 96
     <div class="btn-group">
96 97
       <Button type="primary" @click="emit">确认</Button>
97 98
       <Button v-if="hasDelete" @click="delMenu">删除当前菜单</Button>
99
+      <Button v-if="hasCancel" type="warning" @click="cancel">取消</Button>
98 100
     </div>
99 101
   </div>
100 102
 </template>
@@ -106,7 +108,7 @@ import material from '@/components/material'
106 108
 import { createNamespacedHelpers } from 'vuex'
107 109
 const { mapActions: mapMaterialActions } = createNamespacedHelpers('material')
108 110
 export default {
109
-  props: ['data', 'menuConfig', 'hasContent', 'hasDelete', 'noRadio'],
111
+  props: ['data', 'menuConfig', 'hasContent', 'hasDelete', 'noRadio', 'hasCancel'],
110 112
   data () {
111 113
     return {
112 114
       active: '文字',
@@ -302,6 +304,9 @@ export default {
302 304
     delMenu () {
303 305
       this.$emit('delMenu')
304 306
     },
307
+    cancel () {
308
+      this.$emit('cancel')
309
+    }
305 310
   },
306 311
   components: {
307 312
     Emotion,

+ 5
- 0
src/pages/login/login.vue 查看文件

@@ -24,6 +24,7 @@
24 24
 import bg from '@/assets/login.jpg'
25 25
 import { createNamespacedHelpers } from 'vuex'
26 26
 const { mapState: mapLoginState, mapActions: mapLoginActions } = createNamespacedHelpers('login')
27
+const { mapActions: mapMainActions } = createNamespacedHelpers('main')
27 28
 export default {
28 29
   data () {
29 30
     return {
@@ -32,6 +33,9 @@ export default {
32 33
   },
33 34
   created () {
34 35
     // this.$Message.info('This is a info tip')
36
+    this.getUserInfo().then(() => {
37
+      this.$router.push({ name: 'menuConfig' })
38
+    })
35 39
     this.Remember = localStorage.getItem('remember')
36 40
     if (!this.Remember) {
37 41
       this.UserName = ''
@@ -74,6 +78,7 @@ export default {
74 78
   },
75 79
   methods: {
76 80
     ...mapLoginActions(['setRemember', 'setUserName', 'setPassWord', 'login']),
81
+    ...mapMainActions(['getUserInfo']),
77 82
     submit () {
78 83
       this.login({ UserName: this.UserName, UserPass: this.PassWord }).then(() => {
79 84
         if (!this.Remember) {

+ 80
- 5
src/pages/main/main.vue 查看文件

@@ -1,8 +1,31 @@
1 1
 <template>
2 2
   <div class="layout">
3 3
     <Layout>
4
-      <Header style="background:#2d8cf0">
5
-        
4
+      <Header class="header">
5
+        <div class="left"></div>
6
+        <div class="right">
7
+          <img :src="userInfo.Headimgurl" alt="">
8
+          <Dropdown @on-click="putPassWord">
9
+            <a href="javascript:void(0)" style="color:#fff;">{{userInfo.UserName}}<Icon type="ios-arrow-down"></Icon></a>
10
+            <DropdownMenu slot="list">
11
+              <DropdownItem>退出</DropdownItem>
12
+              <DropdownItem name='修改密码'>修改密码</DropdownItem>
13
+            </DropdownMenu>
14
+          </Dropdown>
15
+          <Modal v-model="showPass" title="修改密码">
16
+            <div style="padding-bottom:15px;">
17
+              <label for="passWordOld" style="padding-right:20px;">旧密码</label>
18
+              <Input placeholder="请输入项目名称" size="large" v-model="passWordOld" clearable name="passWordOld" type='password' style="width: 300px"/>
19
+            </div>
20
+            <div>
21
+              <label for="passWord" style="padding-right:20px;">新密码</label>
22
+              <Input placeholder="请输入项目名称" size="large" v-model="passWord" clearable name="passWord" type='password' style="width: 300px"/>
23
+            </div>
24
+            <div slot="footer">
25
+              <Button type="primary" @click="submit">确认</Button>
26
+            </div>
27
+          </Modal>
28
+        </div>
6 29
       </Header>
7 30
       <Layout>
8 31
         <Sider hide-trigger :style="{background: '#fff',borderRight:'1px solid #dcdee2'}">
@@ -25,17 +48,53 @@ import { createNamespacedHelpers } from 'vuex'
25 48
 const { mapState: mapMainState, mapActions: mapMainActions } = createNamespacedHelpers('main')
26 49
 import menuLeft from '@/components/menu.vue' // 左侧导航
27 50
 export default {
28
-  created () { this.getMainMenu() },
51
+  data () {
52
+    return {
53
+      passWord: '',
54
+      passWordOld: '',
55
+      showPass: false
56
+    }
57
+  },
58
+  created () {
59
+    this.getMainMenu()
60
+    this.getUserInfo()
61
+  },
29 62
   components: {
30 63
     menuLeft
31 64
   },
32 65
   computed: {
33 66
     ...mapMainState({
34
-      menuData: item => item.menuData
67
+      menuData: item => item.menuData,
68
+      userInfo: item => item.userInfo
35 69
     })
36 70
   },
37 71
   methods: {
38
-    ...mapMainActions(['getMainMenu'])
72
+    ...mapMainActions(['getMainMenu', 'getUserInfo', 'changePassWord', 'logOut']),
73
+    putPassWord (name) {
74
+      console.log(this.showPass)
75
+      if (name === '修改密码') {
76
+        this.showPass = true
77
+      } else {
78
+        this.logOut().then(() => {
79
+          this.$Message.success('退出成功')
80
+          this.$router.push({ name: 'login' })
81
+        })
82
+      }
83
+    },
84
+    submit () {
85
+      if (!this.passWordOld) {
86
+        this.$Message.warning('请输入旧密码')
87
+        return
88
+      } else if (!this.passWord) {
89
+        this.$Message.warning('请输入新密码')
90
+        return
91
+      }
92
+      this.changePassWord({ oriPasswd: this.passWordOld, newPasswd: this.passWord }).then(() => {
93
+        this.showPass = false
94
+        this.$Message.success('修改成功')
95
+        console.log(this.userInfo)
96
+      })
97
+    }
39 98
   }
40 99
 }
41 100
 </script>
@@ -78,4 +137,20 @@ export default {
78 137
 .fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ {
79 138
   opacity: 0;
80 139
 }
140
+.header {
141
+  background: #2d8cf0;
142
+  display: flex;
143
+  justify-content: space-between;
144
+  align-items: center;
145
+  .right {
146
+    display: flex;
147
+    align-items: center;
148
+    img {
149
+      width: 50px;
150
+      height: 50px;
151
+      border-radius: 50%;
152
+      margin-right: 10px;
153
+    }
154
+  }
155
+}
81 156
 </style>

+ 106
- 30
src/pages/main/management/management.vue 查看文件

@@ -3,17 +3,28 @@
3 3
     <Button type="success" style="margin-bottom:20px;" @click="showAdd = true">新增</Button>
4 4
     <Table border :columns="managementColumns" :data="managementList"></Table>
5 5
     <div class="page">
6
-      <Page :total="total" :pageSize='pageSize' :current='current' show-elevator />
6
+      <Page :total="total" :pageSize='pageSize' :current='current' @on-change='changePage' show-elevator />
7 7
     </div>
8
-    <Modal v-model="showAdd" title="新增" @on-ok="submit" @on-cancel="close">
8
+    <Modal v-model="showAdd" title="新增">
9 9
       <label for="name" style="padding-right:20px;">项目名称</label>
10 10
       <Input placeholder="请输入项目名称" size="large" v-model="name" clearable name="name" style="width: 300px"/>
11
+      <div slot="footer">
12
+        <Button type="primary" @click="submit">确认</Button>
13
+      </div>
11 14
     </Modal>
12
-    <div class="pop-up" v-show="pop.show">
13
-      <div>
14
-        弹窗
15
+    <Modal title="公众平台账号授权" v-model="pop.show" :mask-closable="false">
16
+      <div class="qrcode">
17
+        <Button type="success" class="reflsh">刷新</Button>
18
+        <img src="" alt="">
19
+        <span>使用公众平台绑定的管理员个人微信号扫描</span>
15 20
       </div>
16
-    </div>
21
+      <div class="select">
22
+        <div>扫码后点击刷新按钮,选择您想要绑定的公众号进行绑定</div>
23
+        <!-- <Select v-model="model1" style="width:300px">
24
+          <Option v-for="item in cityList" :value="item.value" :key="item.value">{{ item.label }}</Option>
25
+        </Select> -->
26
+      </div>
27
+    </Modal>
17 28
   </div>
18 29
 </template>
19 30
 
@@ -24,41 +35,47 @@ export default {
24 35
   data () {
25 36
     return {
26 37
       pageSize: 10,
27
-      total: 100,
28
-      current: 2,
29 38
       showAdd: false,
30 39
       name: '',
31 40
       pop: {
32
-        show: false
41
+        show: false,
33 42
       },
34 43
       managementColumns: [
35 44
         {
36 45
           title: '项目名称',
37
-          key: 'name'
46
+          align: 'center',
47
+          key: 'OrgName'
38 48
         },
39 49
         {
40 50
           title: '公众号名称',
41
-          key: 'age'
51
+          align: 'center',
52
+          key: 'WechatName'
42 53
         },
43 54
         {
44 55
           title: '微信ID',
45
-          key: 'province'
56
+          align: 'center',
57
+          key: 'WechatId'
46 58
         },
47 59
         {
48 60
           title: '状态',
49
-          key: 'city'
61
+          align: 'center',
62
+          render: (h, params) => {
63
+            return h('div', {}, params.row.AuthStatus === 'no' ? '未授权' : '已授权')
64
+          }
50 65
         },
51 66
         {
52 67
           title: '创建时间',
53
-          key: 'address'
68
+          align: 'center',
69
+          render: (h, params) => {
70
+            return h('div', {}, this.toolClass.dateFormat(params.row.CreateDate))
71
+          }
54 72
         },
55 73
         {
56 74
           title: '操作',
57
-          key: 'action',
58 75
           align: 'center',
59 76
           render: (h, params) => {
60 77
             return h('div', [
61
-              params.row.age === 18 ? h('Button', {
78
+              params.row.AuthStatus === 'no' ? h('Button', {
62 79
                 props: {
63 80
                   type: 'primary',
64 81
                   size: 'default'
@@ -67,7 +84,7 @@ export default {
67 84
                   'margin-right': '20px'
68 85
                 },
69 86
                 on: {
70
-                  click: () => { console.log(params) }
87
+                  click: () => { this.auth(params) }
71 88
                 },
72 89
               }, '授权') : '',
73 90
               h('Button', {
@@ -76,7 +93,7 @@ export default {
76 93
                   size: 'default'
77 94
                 },
78 95
                 on: {
79
-                  click: () => { console.log(params) }
96
+                  click: () => { this.delete(params) }
80 97
                 }
81 98
               }, '删除')
82 99
             ])
@@ -86,36 +103,95 @@ export default {
86 103
     }
87 104
   },
88 105
   created () {
106
+    this.getManagementList({ page: this.current, pagesize: this.pageSize })
89 107
   },
90 108
   computed: {
91 109
     ...mapManagementState({
92
-      managementList: item => item.managementList
110
+      managementList: item => item.managementList,
111
+      current: item => item.current,
112
+      total: item => item.total,
113
+      authData: item => item.authData
93 114
     })
94 115
   },
95 116
   methods: {
96
-    ...mapManagementActions(['getManagementList']),
117
+    ...mapManagementActions(['getManagementList', 'addManagement', 'deleteManagement', 'changeCurrent', 'authcode']),
97 118
     submit () {
98
-      this.close()
119
+      if (!this.name) {
120
+        this.$Message.warning('请输入项目名称')
121
+        this.showAdd = true
122
+        return
123
+      }
124
+      this.addManagement({ OrgName: this.name }).then(() => {
125
+        this.$Message.success('新增成功')
126
+        this.close()
127
+        this.changePage(1)
128
+        this.getManagementList({ page: this.current, pagesize: this.pageSize })
129
+      })
99 130
     },
100 131
     close () {
101 132
       this.name = ''
102 133
       this.showAdd = false
134
+    },
135
+    delete (info) {
136
+      this.$Modal.confirm({
137
+        title: '警告',
138
+        content: `<p style='font-size:18px;'>确认删除此项目?<p>`,
139
+        onOk: () => {
140
+          this.deleteManagement({ OrgId: info.row.OrgId }).then(() => {
141
+            this.$Message.success('删除成功')
142
+            this.changePage(1)
143
+            this.getManagementList({ page: this.current, pagesize: this.pageSize })
144
+          })
145
+        },
146
+        onCancel: () => {
147
+          this.$Message.info('操作取消')
148
+        }
149
+      })
150
+    },
151
+    changePage (page) {
152
+      this.changeCurrent(page)
153
+      this.getManagementList({ page: this.current, pagesize: this.pageSize })
154
+    },
155
+    auth (params) {
156
+      // this.pop.show = true
157
+      this.authcode().then(() => {
158
+        let url = encodeURIComponent(`${window.location.href}?id=${params.row.OrgId}`)
159
+        window.location.href = `https://mp.weixin.qq.com/cgi-bin/componentloginpage?component_appid=${this.authData.appid}&pre_auth_code=${this.authData.code}&redirect_uri=${url}&auth_type=1`
160
+
161
+      })
103 162
     }
104 163
   }
105 164
 }
106 165
 </script>
107 166
 
108 167
 <style lang='scss' scoped>
109
-.container {
110
-  position: relative;
111
-  .pop-up {
112
-    width: 100%;
113
-    height: 100%;
168
+.qrcode {
169
+  width: 300px;
170
+  height: 300px;
171
+  display: flex;
172
+  flex-flow: column nowrap;
173
+  justify-content: center;
174
+  align-items: center;
175
+  border: 1px solid #ddd;
176
+  margin: 0 auto;
177
+  img {
178
+    width: 150px;
179
+    height: 150px;
180
+    margin: 10px;
181
+  }
182
+  p {
183
+    text-align: center;
184
+  }
185
+  .reflsh {
114 186
     position: absolute;
115
-    top: 0;
116
-    left: 0;
117
-    background: #fff;
118
-    border-radius: 8px;
187
+    top: 60px;
188
+    left: 10px;
189
+  }
190
+}
191
+.select {
192
+  text-align: center;
193
+  div {
194
+    margin-top: 10px;
119 195
   }
120 196
 }
121 197
 </style>

+ 81
- 17
src/pages/main/reply/editReply.vue 查看文件

@@ -14,15 +14,15 @@
14 14
     <div class="form-item">
15 15
       <label for="name">关键词</label>
16 16
       <div class="tag">
17
-        <Tag type="dot" style="margin-bottom: 10px;" v-for="(item, index) in tagList" :key="index" :name="index" closable @on-close="handleClose">{{ item.name }}</Tag>
17
+        <Tag type="dot" style="margin-bottom: 10px;" v-for="item in tagList" :key="item" :name="item" closable @on-close="handleClose">{{ item }}</Tag>
18 18
         <div>
19 19
           <Input v-model="value" @click.stop="1" placeholder="输入关键词" search enter-button="添加" style="width: 200px;" @on-search='handleAdd'/>
20 20
         </div>
21 21
       </div>
22 22
     </div>
23
-    <div >
23
+    <div>
24 24
       <label for="name">回复</label>
25
-      <menuForm :menuConfig='false' :data='{}' :hasContent='true' :hasDelete='false' @emit='checkForm' :noRadio='true'></menuForm>      
25
+      <menuForm v-if="showMenu" :menuConfig='false' :data='menuData' :hasContent='true' :hasDelete='false' @emit='checkForm' :noRadio='true' @cancel='cancel' :hasCancel='true'></menuForm>      
26 26
     </div>
27 27
   </div>
28 28
 </template>
@@ -36,25 +36,59 @@ export default {
36 36
     return {
37 37
       name: '',
38 38
       type: '完全',
39
-      value: ''
39
+      value: '',
40
+      showMenu: false,
41
+      menuData: {}
40 42
     }
41 43
   },
42 44
   components: {
43 45
     menuForm
44 46
   },
45
-  mounted () {
47
+  created () {
48
+    if (this.$route.query.id) {
49
+      this.getReplyDetail({ autoreplyId: this.$route.query.id }).then(() => {
50
+        this.name = this.RuleName
51
+        this.type = this.PairType === 'blur' ? '模糊' : '完全'
52
+        if (this.MessageType === 'paragraph') {
53
+          this.menuData.type = 'text'
54
+          this.menuData.value = this.MessageParagraph
55
+        } else if (this.MessageType === 'img') {
56
+          this.menuData.type = 'media_id'
57
+          this.img.media_id = ''
58
+          this.img.url = this.MessageImg
59
+        } else if (this.MessageType === 'content') {
60
+          this.menuData.type = 'view'
61
+          this.menuData.media_id = ''
62
+          this.menuData.url = this.MessageContent
63
+        }
64
+        this.showMenu = true
65
+      })
66
+    } else {
67
+      this.showMenu = true
68
+    }
46 69
   },
47 70
   computed: {
48 71
     ...mapReplyState({
49
-      tagList: item => item.tagList
72
+      tagList: item => item.tagList,
73
+      RuleName: item => item.RuleName,
74
+      AutoType: item => item.AutoType,
75
+      MessageContent: item => item.MessageContent,
76
+      MessageImg: item => item.MessageImg,
77
+      MessageParagraph: item => item.MessageParagraph,
78
+      MessageType: item => item.MessageType,
79
+      PairType: item => item.PairType,
50 80
     })
51 81
   },
52 82
   methods: {
53
-    ...mapReplyActions(['changeTag']),
83
+    ...mapReplyActions(['changeTag', 'getReplyDetail', 'setReply', 'addReply']),
54 84
     handleAdd () {
85
+      if (!this.value) {
86
+        this.$Message.warning('请填写关键字')
87
+        return
88
+      }
55 89
       let data = {
56 90
         type: 'add',
57
-        data: { name: this.value }
91
+        data: this.value
58 92
       }
59 93
       this.changeTag(data)
60 94
       this.value = ''
@@ -62,22 +96,52 @@ export default {
62 96
     handleClose (event, name) {
63 97
       let data = {
64 98
         type: 'delete',
65
-        index: name
99
+        item: name
66 100
       }
67 101
       this.changeTag(data)
68 102
     },
69
-    submit () {
70
-      this.addUser().then((res) => {
71
-        this.$Message.info(res)
72
-        this.cancel()
73
-      })
74
-    },
75 103
     cancel () {
76
-      this.$router.push({ name: 'user' })
104
+      this.$router.push({ name: 'reply' })
77 105
     },
78 106
     checkForm (data) {
79
-      console.log(data)
107
+      let formData = {}
108
+      formData.RuleName = this.name
109
+      formData.PairType = this.type === '模糊' ? 'blur' : 'acu'
110
+      formData.Keywords = this.tagList.join()
111
+      formData.AutoType = 'keyword'
112
+      if (data.type === 'text') {
113
+        formData.MessageType = 'paragraph'
114
+        formData.MessageParagraph = data.value
115
+        formData.MessageImg = ''
116
+        formData.MessageContent = ''
117
+      } else if (data.type === 'media_id') {
118
+        formData.MessageType = 'img'
119
+        formData.MessageImg = ''
120
+        formData.MessageParagraph = ''
121
+        formData.MessageContent = ''
122
+      } else if (data.type === 'view') {
123
+        formData.MessageType = 'content'
124
+        formData.MessageImg = ''
125
+        formData.MessageParagraph = ''
126
+        formData.MessageContent = ''
127
+      }
128
+      if (this.$route.query.id) {
129
+        formData.AutoReplyId = this.$route.query.id
130
+        this.setReply(formData).then(() => {
131
+          this.$Message.success('编辑成功')
132
+          this.$router.push({ name: 'reply' })
133
+        })
134
+      } else {
135
+        this.addReply(formData).then(() => {
136
+          this.$Message.success('新增成功')
137
+          this.$router.push({ name: 'reply' })
138
+        })
139
+      }
80 140
     }
141
+  },
142
+  beforeRouteLeave (to, from, next) {
143
+    this.changeTag({})
144
+    next()
81 145
   }
82 146
 }
83 147
 </script>

+ 104
- 17
src/pages/main/reply/reply.vue 查看文件

@@ -4,7 +4,7 @@
4 4
       <TabPane label="关键词回复" name="keyword">
5 5
         <div class="keyword">
6 6
           <label>用户通过发送关键词来触发回复</label>
7
-          <i-switch v-model="keywordSwitch" @on-change="change"/>
7
+          <i-switch v-model="keywordSwitch" @on-change="changeKey"/>
8 8
           <div class="add">
9 9
             <Button type="primary" @click="edit">新增</Button>
10 10
           </div>
@@ -13,9 +13,9 @@
13 13
       </TabPane>
14 14
       <TabPane label="关注回复" name="attention">
15 15
         <div class="attention">
16
-          <label>用户通过发送关键词来触发回复</label>
17
-          <i-switch v-model="attentionSwitch" @on-change="change"/>
18
-          <menuForm :menuConfig='false' :data='{}' :hasContent='true' :hasDelete='false' @emit='checkForm' :noRadio='true'></menuForm>
16
+          <label>用户通过关注触发回复</label>
17
+          <i-switch v-model="attentionSwitch" @on-change="changeSub"/>
18
+          <menuForm v-if="showMenu" :menuConfig='false' :data='menuData' :hasContent='true' :hasDelete='false' @emit='checkForm' :noRadio='true'></menuForm>
19 19
         </div>
20 20
       </TabPane>
21 21
     </Tabs>
@@ -29,24 +29,32 @@ const { mapState: mapReplyState, mapActions: mapReplyActions } = createNamespace
29 29
 export default {
30 30
   data () {
31 31
     return {
32
-      keywordSwitch: true,
33
-      attentionSwitch: true,
32
+      keywordSwitch: false,
33
+      attentionSwitch: false,
34
+      menuData: {},
35
+      showMenu: false,
34 36
       keywordColumns: [
35 37
         {
36 38
           title: '规则名',
37
-          key: 'name'
39
+          align: 'center',
40
+          key: 'RuleName'
38 41
         },
39 42
         {
40 43
           title: '关键词',
41
-          key: 'age'
44
+          align: 'center',
45
+          key: 'Keywords'
42 46
         },
43 47
         {
44 48
           title: '回复内容',
45
-          key: 'province'
49
+          align: 'center',
50
+          key: 'MessageParagraph'
46 51
         },
47 52
         {
48 53
           title: '匹配',
49
-          key: 'city'
54
+          align: 'center',
55
+          render: (h, params) => {
56
+            return h('div', {}, params.row.PairType === 'blur' ? '模糊' : '精确')
57
+          }
50 58
         },
51 59
         {
52 60
           title: '操作',
@@ -63,7 +71,7 @@ export default {
63 71
                   'margin-right': '20px'
64 72
                 },
65 73
                 on: {
66
-                  click: () => { console.log(params) }
74
+                  click: () => { this.$router.push({ name: 'editReply', query: { id: params.row.AutoReplyId } }) }
67 75
                 },
68 76
               }, '编辑'),
69 77
               h('Button', {
@@ -72,7 +80,7 @@ export default {
72 80
                   size: 'default'
73 81
                 },
74 82
                 on: {
75
-                  click: () => { console.log(params) }
83
+                  click: () => { this.delete(params) }
76 84
                 }
77 85
               }, '删除')
78 86
             ])
@@ -81,21 +89,100 @@ export default {
81 89
       ]
82 90
     }
83 91
   },
92
+  created () {
93
+    this.getKeywordList({ page: 1, pagesize: 10000, autoType: 'keyword' }).then(() => {
94
+      if (this.keywordList.length > 0) {
95
+        this.keywordSwitch = this.keywordList[0].IsUse === 'on' ? true : false
96
+      }
97
+    })
98
+    this.getSubscribe({ page: 1, pagesize: 10000, autoType: 'subscribe' }).then(() => {
99
+      if (this.Subscribe.IsUse) {
100
+        this.attentionSwitch = this.Subscribe.IsUse === 'on' ? true : false
101
+      }
102
+      if (this.Subscribe.MessageType === 'paragraph') {
103
+        this.menuData.type = 'text'
104
+        this.menuData.value = this.Subscribe.MessageParagraph
105
+      } else if (this.Subscribe.MessageType === 'img') {
106
+        this.menuData.type = 'media_id'
107
+        this.img.media_id = ''
108
+        this.img.url = this.Subscribe.MessageImg
109
+      } else if (this.Subscribe.MessageType === 'content') {
110
+        this.menuData.type = 'view'
111
+        this.menuData.media_id = ''
112
+        this.menuData.url = this.Subscribe.MessageContent
113
+      }
114
+      this.showMenu = true
115
+    })
116
+  },
84 117
   components: {
85 118
     menuForm
86 119
   },
87 120
   computed: {
88 121
     ...mapReplyState({
89
-      keywordList: item => item.keywordList
122
+      keywordList: item => item.keywordList,
123
+      Subscribe: item => item.Subscribe
90 124
     })
91 125
   },
92 126
   methods: {
93
-    ...mapReplyActions([]),
94
-    change (status) {
95
-      this.$Message.info('开关状态:' + status);
127
+    ...mapReplyActions(['getKeywordList', 'deleteReply', 'getSubscribe', 'setReply', 'addReply', 'changeIsUse']),
128
+    changeKey (status) {
129
+      let isUse = status ? 'on' : 'off'
130
+      this.changeIsUse({ autoType: 'keyword', isUse: isUse }).then(() => {
131
+        this.$Message.success('修改成功')
132
+      })
133
+    },
134
+    changeSub (status) {
135
+      let isUse = status ? 'on' : 'off'
136
+      this.changeIsUse({ autoType: 'subscribe', isUse: isUse }).then(() => {
137
+        this.$Message.success('修改成功')
138
+      })
96 139
     },
97 140
     checkForm (data) {
98
-      console.log(data)
141
+      let formData = {}
142
+      formData.AutoType = 'subscribe'
143
+      if (data.type === 'text') {
144
+        formData.MessageType = 'paragraph'
145
+        formData.MessageParagraph = data.value
146
+        formData.MessageImg = ''
147
+        formData.MessageContent = ''
148
+      } else if (data.type === 'media_id') {
149
+        formData.MessageType = 'img'
150
+        formData.MessageImg = ''
151
+        formData.MessageParagraph = ''
152
+        formData.MessageContent = ''
153
+      } else if (data.type === 'view') {
154
+        formData.MessageType = 'content'
155
+        formData.MessageImg = ''
156
+        formData.MessageParagraph = ''
157
+        formData.MessageContent = ''
158
+      }
159
+      if (this.Subscribe.AutoReplyId) {
160
+        formData.AutoReplyId = this.Subscribe.AutoReplyId
161
+        this.setReply(formData).then(() => {
162
+          this.$Message.success('编辑成功')
163
+          this.$router.push({ name: 'reply' })
164
+        })
165
+      } else {
166
+        this.addReply(formData).then(() => {
167
+          this.$Message.success('新增成功')
168
+          this.$router.push({ name: 'reply' })
169
+        })
170
+      }
171
+    },
172
+    delete (params) {
173
+      this.$Modal.confirm({
174
+        title: '警告',
175
+        content: `<p style='font-size:18px;'>确认删除此项目?<p>`,
176
+        onOk: () => {
177
+          this.deleteReply({ autoreplyId: params.row.AutoReplyId }).then(() => {
178
+            this.$Message.success('删除成功')
179
+            this.getKeywordList({ page: 1, pagesize: 10000, autoType: 'keyword' })
180
+          })
181
+        },
182
+        onCancel: () => {
183
+          this.$Message.info('操作取消')
184
+        }
185
+      })
99 186
     },
100 187
     edit () {
101 188
       this.$router.push({ name: 'editReply' })

src/pages/main/user/addUser.vue → src/pages/main/user/editUser.vue 查看文件

@@ -211,7 +211,7 @@ export default {
211 211
           UserType: 'operator'
212 212
         }
213 213
         this.editUser(data).then(() => {
214
-          this.$Message.info('编辑成功')
214
+          this.$Message.success('编辑成功')
215 215
           this.cancel()
216 216
         })
217 217
       } else {
@@ -225,7 +225,7 @@ export default {
225 225
           UserType: 'operator'
226 226
         }
227 227
         this.addUser(data).then(() => {
228
-          this.$Message.info('新增成功')
228
+          this.$Message.success('新增成功')
229 229
           this.cancel()
230 230
         })
231 231
       }

+ 31
- 7
src/pages/main/user/user.vue 查看文件

@@ -1,6 +1,6 @@
1 1
 <template>
2 2
   <div>
3
-    <Button type="success" style="margin-bottom:20px;" @click="addUser">新增</Button>
3
+    <Button type="success" style="margin-bottom:20px;" @click="editUser">新增</Button>
4 4
     <Table border :columns="userColumns" :data="userList"></Table>
5 5
     <div class="page">
6 6
       <Page :total="total" :pageSize='pageSize' :current='current' @on-change='changePage' show-elevator />
@@ -100,7 +100,7 @@ export default {
100 100
                   size: 'default'
101 101
                 },
102 102
                 on: {
103
-                  click: () => { this.$router.push({ name: 'addUser', query: { id: params.row.UserId } }) }
103
+                  click: () => { this.$router.push({ name: 'editUser', query: { id: params.row.UserId } }) }
104 104
                 }
105 105
               }, '编辑')
106 106
             ])
@@ -122,24 +122,48 @@ export default {
122 122
     })
123 123
   },
124 124
   methods: {
125
-    ...mapUserActions(['getUserList', 'changeCurrent', 'getProjectList', 'BindProject']),
125
+    ...mapUserActions(['getUserList', 'changeCurrent', 'getProjectList', 'BindProject', 'UnBindProject']),
126 126
     changePage (page) {
127 127
       this.changeCurrent(page)
128 128
     },
129 129
     bindProject (params) {
130
-      this.showAdd = true
131 130
       this.chooseUser = params.row.UserId
131
+      if (!params.row.OrgId) {
132
+        this.showAdd = true
133
+      } else {
134
+        this.unBindProject()
135
+      }
136
+    },
137
+    unBindProject () {
138
+      this.$Modal.confirm({
139
+        title: '警告',
140
+        content: `<p style='font-size:18px;'>确认取消绑定此项目?<p>`,
141
+        onOk: () => {
142
+          this.UnBindProject({ userId: this.chooseUser }).then(() => {
143
+            this.$Message.success('取消绑定成功')
144
+            this.getUserList({ page: this.current, pagesize: this.pageSize })
145
+            this.getProjectList()
146
+          })
147
+        },
148
+        onCancel: () => {
149
+          this.$Message.info('操作取消')
150
+        }
151
+      })
132 152
     },
133 153
     submit () {
134
-      this.BindProject({ userId: this.chooseUser, orgId: this.name })
154
+      this.BindProject({ userId: this.chooseUser, orgId: this.name }).then(() => {
155
+        this.$Message.success('绑定成功')
156
+        this.getUserList({ page: this.current, pagesize: this.pageSize })
157
+        this.getProjectList()
158
+      })
135 159
       this.close()
136 160
     },
137 161
     close () {
138 162
       this.name = ''
139 163
       this.showAdd = false
140 164
     },
141
-    addUser () {
142
-      this.$router.push({ name: 'addUser' })
165
+    editUser () {
166
+      this.$router.push({ name: 'editUser' })
143 167
     }
144 168
   },
145 169
   watch: {

+ 4
- 4
src/pages/staticRouter.js 查看文件

@@ -2,7 +2,7 @@ import main from '@/pages/main/main.vue' // 主体框架
2 2
 import menuConfig from '@/pages/main/menuConfig/menuConfig.vue' // 自定义菜单
3 3
 import management from '@/pages/main/management/management.vue' // 项目管理
4 4
 import user from '@/pages/main/user/user.vue' // 用户管理
5
-import addUser from '@/pages/main/user/addUser.vue' // 新增用户
5
+import editUser from '@/pages/main/user/editUser.vue' // 编辑用户
6 6
 import material from '@/pages/main/material/material.vue' // 素材库
7 7
 import reply from '@/pages/main/reply/reply.vue' // 自动回复
8 8
 import editReply from '@/pages/main/reply/editReply.vue' // 修改自动回复
@@ -30,9 +30,9 @@ export default {
30 30
           component: user,
31 31
           children: [
32 32
             {
33
-              path: '/addUser',
34
-              name: 'addUser',
35
-              component: addUser,
33
+              path: '/editUser',
34
+              name: 'editUser',
35
+              component: editUser,
36 36
             }
37 37
           ]
38 38
         },

+ 42
- 5
src/store/main.js 查看文件

@@ -5,10 +5,14 @@ export default {
5 5
   namespaced: true,
6 6
   state: {
7 7
     menuData: [],
8
+    userInfo: {}
8 9
   },
9 10
   mutations: {
10 11
     updateMenu (state, data) {
11 12
       state.menuData = data || []
13
+    },
14
+    updateUserInfo (state, data) {
15
+      state.userInfo = data || {}
12 16
     }
13 17
   },
14 18
   actions: {
@@ -20,8 +24,18 @@ export default {
20 24
           data: {
21 25
             ...data,
22 26
           }
23
-        }).then(res => {
24
-          resolve(res)
27
+        }).then(() => {
28
+          resolve()
29
+        }).catch(reject)
30
+      })
31
+    },
32
+    logOut (context) {
33
+      context
34
+      return new Promise((resolve, reject) => {
35
+        ajax({
36
+          ...api.common.logOut
37
+        }).then(() => {
38
+          resolve()
25 39
         }).catch(reject)
26 40
       })
27 41
     },
@@ -32,11 +46,34 @@ export default {
32 46
           data: {
33 47
             ...data,
34 48
           }
35
-        }).then(res => {
49
+        }).then((res) => {
36 50
           context.commit('updateMenu', res)
37
-          resolve(res)
51
+          resolve()
38 52
         }).catch(reject)
39 53
       })
40
-    }
54
+    },
55
+    getUserInfo (context) {
56
+      return new Promise((resolve, reject) => {
57
+        ajax({
58
+          ...api.user.getUserInfo
59
+        }).then((res) => {
60
+          context.commit('updateUserInfo', res)
61
+          resolve()
62
+        }).catch(reject)
63
+      })
64
+    },
65
+    changePassWord (context, data) {
66
+      context
67
+      return new Promise((resolve, reject) => {
68
+        ajax({
69
+          ...api.user.changePassWord,
70
+          data: {
71
+            ...data
72
+          }
73
+        }).then(() => {
74
+          resolve()
75
+        }).catch(reject)
76
+      })
77
+    },
41 78
   }
42 79
 }

+ 57
- 35
src/store/management.js 查看文件

@@ -4,54 +4,76 @@ import api from '../util/api'
4 4
 export default {
5 5
   namespaced: true,
6 6
   state: {
7
-    managementList: [
8
-      {
9
-        name: 'John Brown',
10
-        age: 18,
11
-        address: 'New York No. 1 Lake Park',
12
-        province: 'America',
13
-        city: 'New York'
14
-      },
15
-      {
16
-        name: 'Jim Green',
17
-        age: 24,
18
-        address: 'Washington, D.C. No. 1 Lake Park',
19
-        province: 'America',
20
-        city: 'Washington, D.C.'
21
-      },
22
-      {
23
-        name: 'Joe Black',
24
-        age: 30,
25
-        address: 'Sydney No. 1 Lake Park',
26
-        province: 'Australian',
27
-        city: 'Sydney'
28
-      },
29
-      {
30
-        name: 'Jon Snow',
31
-        age: 26,
32
-        address: 'Ottawa No. 2 Lake Park',
33
-        province: 'Canada',
34
-        city: 'Ottawa',
35
-        zip: 100000
36
-      }
37
-    ]
7
+    managementList: [],
8
+    current: 1,
9
+    total: 0,
10
+    authData: {}
38 11
   },
39 12
   mutations: {
40 13
     updateManagementList (state, data) {
41
-      state.img = data || []
42
-    }
14
+      state.managementList = data.list || []
15
+      state.total = data.pagenum
16
+    },
17
+    updateCurrent (state, data) {
18
+      state.current = data
19
+    },
20
+    updateAuthData (state, data) {
21
+      state.authData = data || {}
22
+    },
43 23
   },
44 24
   actions: {
45 25
     getManagementList (context, data) {
46 26
       return new Promise((resolve, reject) => {
47 27
         ajax({
48
-          ...api.common.managementList,
49
-          data: data
28
+          ...api.management.getManagementList,
29
+          queryData: {
30
+            ...data
31
+          }
50 32
         }).then((res) => {
51 33
           context.commit('updateManagementList', res)
52 34
           resolve()
53 35
         }).catch(reject)
54 36
       })
37
+    },
38
+    addManagement (context, data) {
39
+      console.log(context)
40
+      return new Promise((resolve, reject) => {
41
+        ajax({
42
+          ...api.management.addManagement,
43
+          data: {
44
+            ...data
45
+          }
46
+        }).then(() => {
47
+          resolve()
48
+        }).catch(reject)
49
+      })
50
+    },
51
+    deleteManagement (context, data) {
52
+      console.log(context)
53
+      return new Promise((resolve, reject) => {
54
+        ajax({
55
+          ...api.management.deleteManagement,
56
+          urlData: {
57
+            ...data
58
+          }
59
+        }).then(() => {
60
+          resolve()
61
+        }).catch(reject)
62
+      })
63
+    },
64
+    changeCurrent (context, data) {
65
+      context.commit('updateCurrent', data)
66
+    },
67
+    authcode (context) {
68
+      console.log(context)
69
+      return new Promise((resolve, reject) => {
70
+        ajax({
71
+          ...api.management.authcode
72
+        }).then((res) => {
73
+          context.commit('updateAuthData', res)
74
+          resolve()
75
+        }).catch(reject)
76
+      })
55 77
     }
56 78
   }
57 79
 }

+ 0
- 1635
src/store/menu.json
文件差異過大導致無法顯示
查看文件


+ 110
- 54
src/store/reply.js 查看文件

@@ -4,70 +4,46 @@ import api from '../util/api'
4 4
 export default {
5 5
   namespaced: true,
6 6
   state: {
7
-    keywordList: [
8
-      {
9
-        name: 'John Brown',
10
-        age: 18,
11
-        address: 'New York No. 1 Lake Park',
12
-        province: 'America',
13
-        city: 'New York'
14
-      },
15
-      {
16
-        name: 'Jim Green',
17
-        age: 24,
18
-        address: 'Washington, D.C. No. 1 Lake Park',
19
-        province: 'America',
20
-        city: 'Washington, D.C.'
21
-      },
22
-      {
23
-        name: 'Joe Black',
24
-        age: 30,
25
-        address: 'Sydney No. 1 Lake Park',
26
-        province: 'Australian',
27
-        city: 'Sydney'
28
-      },
29
-      {
30
-        name: 'Jon Snow',
31
-        age: 26,
32
-        address: 'Ottawa No. 2 Lake Park',
33
-        province: 'Canada',
34
-        city: 'Ottawa',
35
-        zip: 100000
36
-      }
37
-    ],
38
-    tagList: [
39
-      {
40
-        name: '关键词1'
41
-      },
42
-      {
43
-        name: '关键词2'
44
-      },
45
-      {
46
-        name: '关键词3'
47
-      },
48
-      {
49
-        name: '关键词4'
50
-      },
51
-      {
52
-        name: '关键词5'
53
-      }
54
-    ]
7
+    keywordList: [],
8
+    tagList: [],
9
+    RuleName: '',
10
+    AutoType: '',
11
+    MessageContent: '',
12
+    MessageImg: '',
13
+    MessageParagraph: '',
14
+    MessageType: '',
15
+    PairType: '',
16
+    Subscribe: {}
55 17
   },
56 18
   mutations: {
57 19
     updateKeywordList (state, data) {
58
-      state.keywordList = data || []
20
+      state.keywordList = data.list || []
21
+    },
22
+    updateSubscribe (state, data) {
23
+      state.Subscribe = data.list ? data.list[0] : {}
59 24
     },
60 25
     updateTagList (state, data) {
61 26
       state.tagList = data || []
27
+    },
28
+    updateDetail (state, data) {
29
+      state.RuleName = data.RuleName
30
+      state.AutoType = data.AutoType
31
+      state.MessageContent = data.MessageContent
32
+      state.MessageImg = data.MessageImg
33
+      state.MessageParagraph = data.MessageParagraph
34
+      state.MessageType = data.MessageType
35
+      state.PairType = data.PairType
36
+      let arr = data.Keywords ? data.Keywords.split(',') : []
37
+      state.tagList = arr
62 38
     }
63 39
   },
64 40
   actions: {
65 41
     getKeywordList (context, data) {
66 42
       return new Promise((resolve, reject) => {
67 43
         ajax({
68
-          ...api.common.login,
69
-          data: {
70
-            ...data,
44
+          ...api.reply.getKeywordList,
45
+          queryData: {
46
+            ...data
71 47
           }
72 48
         }).then((res) => {
73 49
           context.commit('updateKeywordList', res)
@@ -75,15 +51,95 @@ export default {
75 51
         }).catch(reject)
76 52
       })
77 53
     },
54
+    getSubscribe (context, data) {
55
+      return new Promise((resolve, reject) => {
56
+        ajax({
57
+          ...api.reply.getKeywordList,
58
+          queryData: {
59
+            ...data
60
+          }
61
+        }).then((res) => {
62
+          context.commit('updateSubscribe', res)
63
+          resolve()
64
+        }).catch(reject)
65
+      })
66
+    },
67
+    getReplyDetail (context, data) {
68
+      return new Promise((resolve, reject) => {
69
+        ajax({
70
+          ...api.reply.getReplyDetail,
71
+          urlData: {
72
+            ...data
73
+          }
74
+        }).then((res) => {
75
+          context.commit('updateDetail', res)
76
+          resolve()
77
+        }).catch(reject)
78
+      })
79
+    },
80
+    setReply (context, data) {
81
+      console.log(context)
82
+      return new Promise((resolve, reject) => {
83
+        ajax({
84
+          ...api.reply.setReply,
85
+          data: {
86
+            ...data
87
+          }
88
+        }).then(() => {
89
+          resolve()
90
+        }).catch(reject)
91
+      })
92
+    },
93
+    addReply (context, data) {
94
+      console.log(context)
95
+      return new Promise((resolve, reject) => {
96
+        ajax({
97
+          ...api.reply.addReply,
98
+          data: {
99
+            ...data
100
+          }
101
+        }).then(() => {
102
+          resolve()
103
+        }).catch(reject)
104
+      })
105
+    },
106
+    deleteReply (context, data) {
107
+      console.log(context)
108
+      return new Promise((resolve, reject) => {
109
+        ajax({
110
+          ...api.reply.deleteReply,
111
+          urlData: {
112
+            ...data
113
+          }
114
+        }).then(() => {
115
+          resolve()
116
+        }).catch(reject)
117
+      })
118
+    },
119
+    changeIsUse (context, data) {
120
+      console.log(context)
121
+      return new Promise((resolve, reject) => {
122
+        ajax({
123
+          ...api.reply.changeIsUse,
124
+          urlData: {
125
+            ...data
126
+          }
127
+        }).then(() => {
128
+          resolve()
129
+        }).catch(reject)
130
+      })
131
+    },
78 132
     changeTag (context, data) {
79 133
       let res
80 134
       if (data.type === 'add') {
81 135
         context.state.tagList.push(data.data)
82 136
         res = context.state.tagList
83 137
       } else if (data.type === 'delete') {
84
-        context.state.tagList.splice(data.index, 1)
138
+        let index = context.state.tagList.indexOf(data.item);
139
+        context.state.tagList.splice(index, 1)
85 140
         res = context.state.tagList
86
-        console.log(res)
141
+      } else {
142
+        res = []
87 143
       }
88 144
       context.commit('updateTagList', res)
89 145
     }

+ 13
- 1
src/store/user.js 查看文件

@@ -96,9 +96,21 @@ export default {
96 96
       })
97 97
     },
98 98
     BindProject (context, data) {
99
+      console.log(context)
99 100
       return new Promise((resolve, reject) => {
100 101
         ajax({
101
-          ...api.user.bindProject,
102
+          ...api.user.BindProject,
103
+          urlData: { ...data }
104
+        }).then(() => {
105
+          resolve()
106
+        }).catch(reject)
107
+      })
108
+    },
109
+    UnBindProject (context, data) {
110
+      console.log(context)
111
+      return new Promise((resolve, reject) => {
112
+        ajax({
113
+          ...api.user.UnBindProject,
102 114
           urlData: { ...data }
103 115
         }).then(() => {
104 116
           resolve()

+ 64
- 10
src/util/api.js 查看文件

@@ -7,6 +7,10 @@ const $api = {
7 7
       url: `${baseUrl}/user/login`,
8 8
       method: 'post'
9 9
     },
10
+    logOut: { // 登出
11
+      url: `${baseUrl}${admin}/user/sign`,
12
+      method: 'post'
13
+    },
10 14
     image: { // 图片上传
11 15
       method: 'post',
12 16
       url: `${baseUrl}${admin}/file`
@@ -15,37 +19,87 @@ const $api = {
15 19
       url: `${baseUrl}${admin}/menu`,
16 20
       method: 'get'
17 21
     },
18
-    getProjectList:{ // 获取项目列表
22
+    getProjectList: { // 获取项目列表
19 23
       url: `${baseUrl}${admin}/sysorg`,
20 24
       method: 'get'
21 25
     }
22 26
   },
23
-  index: {
24
-    getWechatMenu: {
25
-      url: `${baseUrl}${admin}/menu`,
26
-      method: 'post'
27
-    }
28
-  },
29 27
   user: {
28
+    getUserInfo: { // 获取用户信息
29
+      url: `${baseUrl}${admin}/sysuser/current`,
30
+      method: 'get'
31
+    },
30 32
     getUserList: { // 获取用户列表
31 33
       url: `${baseUrl}${admin}/sysuser`,
32 34
       method: 'get'
33 35
     },
36
+    changePassWord: { // 修改密码
37
+      url: `${baseUrl}${admin}/user/pwd`,
38
+      method: 'put'
39
+    },
34 40
     getSysuserInfo: { // 获取用户详情
35 41
       url: `${baseUrl}${admin}/sysuser/:userId`,
36 42
       method: 'get'
37 43
     },
38
-    addUser:{ // 新增用户
44
+    addUser: { // 新增用户
39 45
       url: `${baseUrl}${admin}/sysuser`,
40 46
       method: 'post'
41 47
     },
42
-    editUser:{ // 编辑用户
48
+    editUser: { // 编辑用户
43 49
       url: `${baseUrl}${admin}/sysuser`,
44 50
       method: 'put'
45 51
     },
46
-    bindProject:{ // 绑定项目
52
+    BindProject: { // 绑定项目
47 53
       url: `${baseUrl}${admin}/sysuser/bind/:userId/:orgId`,
48 54
       method: 'put'
55
+    },
56
+    UnBindProject: { // 解绑项目
57
+      url: `${baseUrl}${admin}/sysuser/unbind/:userId`,
58
+      method: 'put'
59
+    }
60
+  },
61
+  management: {
62
+    getManagementList: { // 获取项目列表
63
+      url: `${baseUrl}${admin}/sysorg`,
64
+      method: 'get'
65
+    },
66
+    addManagement: { // 新增项目
67
+      url: `${baseUrl}${admin}/sysorg`,
68
+      method: 'post'
69
+    },
70
+    deleteManagement: { // 删除项目
71
+      url: `${baseUrl}${admin}/sysorg/:orgId`,
72
+      method: 'delete'
73
+    },
74
+    authcode: { // 项目授权
75
+      url: `${baseUrl}${admin}/authcode`,
76
+      method: 'post'
77
+    }
78
+  },
79
+  reply: {
80
+    getKeywordList: { // 获取关键词列表
81
+      url: `${baseUrl}${admin}/autoreply`,
82
+      method: 'get'
83
+    },
84
+    getReplyDetail: { // 获取关键词详情
85
+      url: `${baseUrl}${admin}/autoreply/:autoreplyId`,
86
+      method: 'get'
87
+    },
88
+    setReply: { // 编辑关键词自动回复
89
+      url: `${baseUrl}${admin}/autoreply`,
90
+      method: 'put'
91
+    },
92
+    addReply: { // 新增关键词自动回复
93
+      url: `${baseUrl}${admin}/autoreply`,
94
+      method: 'post'
95
+    },
96
+    deleteReply: { // 删除关键词自动回复
97
+      url: `${baseUrl}${admin}/autoreply/:autoreplyId`,
98
+      method: 'delete'
99
+    },
100
+    changeIsUse: { // 编辑是否启用
101
+      url: `${baseUrl}${admin}/autoreply/isUse/:autoType/:isUse`,
102
+      method: 'put'
49 103
     }
50 104
   }
51 105
 }