yuantianjiao 6 年之前
父節點
當前提交
bb3dd6ddfa

+ 1
- 0
config/index.js 查看文件

@@ -15,6 +15,7 @@ module.exports = {
15 15
         // target: 'http://192.168.0.62:8080', //wf
16 16
         // target: 'http://localhost:8080', 
17 17
         target: 'http://192.168.0.11', //ys
18
+        // target: 'http://192.168.0.11', //ys
18 19
         // target: 'http://dev.ycjcjy.com/', //frp
19 20
         changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
20 21
         // pathRewrite: {

+ 84
- 175
src/pages/system/cardAndCouponManager/bodyBuildingCardManager/edit.vue 查看文件

@@ -6,7 +6,7 @@
6 6
           <span>选择案场:</span>
7 7
           <div class="flex-item">
8 8
             <div style="width:50%">
9
-              <el-select v-model="cardInfo.CaseId" placeholder="请选择" @change="caseChange">
9
+              <el-select v-model="cardInfo.CaseId" placeholder="请选择" @change="caseChange" :disabled="disabled">
10 10
                 <el-option
11 11
                   v-for="item in cases"
12 12
                   :key="item.CaseId"
@@ -21,13 +21,15 @@
21 21
           <span>卡图片:</span>
22 22
           <div class="flex-item">
23 23
             <div>
24
+              <a v-if="cardInfo.CardImageUrl && cardInfo.CardImageUrl.indexOf('.mp4') > -1" :href="cardInfo.CardImageUrl" target="blank" style="line-height:40px;">{{cardInfo.CardImageUrl}}</a>
24 25
               <el-upload
25 26
                 class="avatar-uploader"
26 27
                 :action='$api.file.image.url'
27 28
                 :show-file-list="false"
28 29
                 :on-success="handleAvatarSuccess">
29
-                <img v-if="cardInfo.Images" :src="cardInfo.Images[0].CardImageUrl" class="avatar">
30
-                <i v-else class="el-icon-plus avatar-uploader-icon"></i>
30
+                <img v-if="cardInfo.CardImageUrl && cardInfo.CardImageUrl.indexOf('.mp4') === -1" :src="cardInfo.CardImageUrl" class="avatar">
31
+                <el-button type="primary" size="mini" v-if="!cardInfo.CardImageUrl || cardInfo.CardImageUrl.indexOf('.mp4') > -1">{{cardInfo.CardImageUrl.indexOf('.mp4') > -1 ? '更换' : '上传'}}文件</el-button>
32
+                <!-- <i v-else class="el-icon-plus avatar-uploader-icon"></i> -->
31 33
               </el-upload>
32 34
             </div>
33 35
           </div>
@@ -38,12 +40,28 @@
38 40
             <div style="width:200px;">
39 41
               <el-input
40 42
                 placeholder="请输入"
41
-                v-model="cardInfo.CardName"
42
-                clearable>
43
+                v-model="cardInfo.GymCardName"
44
+                clearable
45
+                :disabled="disabled">
43 46
               </el-input>
44 47
             </div>
45 48
           </div>
46 49
         </li>
50
+        <li class="flex-h">
51
+          <span>卡类型:</span>
52
+          <div class="flex-item">
53
+            <div>
54
+              <el-select v-model="cardInfo.GymTypeId" placeholder="请选择" :disabled="disabled">
55
+                <el-option
56
+                  v-for="item in GymTypeList"
57
+                  :key="item.id"
58
+                  :label="item.name"
59
+                  :value="item.id">
60
+                </el-option>
61
+              </el-select>
62
+            </div>
63
+          </div>
64
+        </li>
47 65
         <li class="flex-h">
48 66
           <span>卡价格:</span>
49 67
           <div class="flex-item">
@@ -51,7 +69,8 @@
51 69
               <el-input
52 70
                 placeholder="请输入"
53 71
                 v-model="cardInfo.Price"
54
-                clearable>
72
+                clearable
73
+                :disabled="disabled">
55 74
               </el-input>
56 75
             </div>
57 76
           </div>
@@ -63,7 +82,8 @@
63 82
               <el-input
64 83
                 placeholder="请输入"
65 84
                 v-model="cardInfo.TotalCount"
66
-                clearable>
85
+                clearable
86
+                :disabled="disabled">
67 87
               </el-input>
68 88
             </div>
69 89
           </div>
@@ -72,9 +92,9 @@
72 92
           <span>发送类型:</span>
73 93
           <div class="flex-item">
74 94
             <div>
75
-              <el-radio v-model="cardInfo.SendType" label="channel">渠道</el-radio>
76
-              <el-radio v-model="cardInfo.SendType" label="case">案场</el-radio>
77
-              <el-radio v-model="cardInfo.SendType" label="system">系统</el-radio>
95
+              <el-radio v-model="cardInfo.SendType" label="channel" :disabled="disabled">渠道</el-radio>
96
+              <el-radio v-model="cardInfo.SendType" label="case" :disabled="disabled">案场</el-radio>
97
+              <el-radio v-model="cardInfo.SendType" label="system" :disabled="disabled">系统</el-radio>
78 98
             </div>
79 99
           </div>
80 100
         </li>
@@ -82,7 +102,7 @@
82 102
           <span>选择渠道:</span>
83 103
           <div class="flex-item">
84 104
             <div style="width:50%">
85
-              <el-select v-model="cardInfo.ChannelId" placeholder="请选择">
105
+              <el-select v-model="cardInfo.ChannelId" placeholder="请选择" :disabled="disabled">
86 106
                 <el-option
87 107
                   v-for="item in channelList"
88 108
                   :key="item.ChannelId"
@@ -93,66 +113,28 @@
93 113
             </div>
94 114
           </div>
95 115
         </li>
96
-        <li class="flex-h">
97
-          <span>目标课程:</span>
98
-          <div class="flex-item">
99
-            <div>
100
-              <el-select v-model="cardInfo.Targets[0].TargetId" placeholder="请选择">
101
-                <el-option
102
-                  v-for="item in courseList"
103
-                  :key="item.CourseId"
104
-                  :label="item.CourseName"
105
-                  :value="item.CourseId"
106
-                  :disabled="item.Status !== 1">
107
-                </el-option>
108
-              </el-select>
109
-            </div>
110
-          </div>
111
-        </li>
112 116
         <li class="flex-h">
113 117
           <span>卡有效时间:</span>
114 118
           <div class="flex-item">
115 119
             <div>
116 120
               <div class="addLine flex-h" style="align-item:center;margin-bottom:20px;">
117
-                <!-- <el-date-picker
121
+                <el-date-picker
118 122
                   v-model="cardInfo.StartDate"
119 123
                   type="date"
120
-                  placeholder="选择起始日期">
124
+                  placeholder="选择起始日期"
125
+                  :disabled="disabled">
121 126
                 </el-date-picker>
122 127
                 <span style="line-height:40px;">至</span>
123 128
                 <el-date-picker
124 129
                   v-model="cardInfo.EndDate"
125 130
                   type="date"
126
-                  placeholder="选择截止日期">
127
-                </el-date-picker> -->
128
-                <el-date-picker
129
-                  v-model="date"
130
-                  type="daterange"
131
-                  range-separator="至"
132
-                  start-placeholder="开始日期"
133
-                  end-placeholder="结束日期"
134
-                  :picker-options="pickerOptions">
131
+                  placeholder="选择截止日期"
132
+                  :disabled="disabled">
135 133
                 </el-date-picker>
136 134
               </div>
137 135
             </div>
138 136
           </div>
139 137
         </li>
140
-        <li class="flex-h">
141
-          <span>视频:</span>
142
-          <div class="flex-item">
143
-            <div style="vertical-align: middle;">
144
-              <a style="line-height: 40px;" v-if="videoOff" :href="cardInfo.VideoUrl" target="blank">{{cardInfo.VideoUrl}}</a>
145
-              <el-upload
146
-                class="avatar-uploader"
147
-                :action='$api.file.image.url'
148
-                :show-file-list="false"
149
-                :on-success="videoSuccess">
150
-                <a style="line-height: 40px;padding: 0 10px;">{{videoOff ? '更换' : '添加'}}视频</a>
151
-              </el-upload>
152
-              <el-button v-if="videoOff" type="danger" @click="deleteVideo">删除视频</el-button>
153
-            </div>
154
-          </div>
155
-        </li>
156 138
         <li class="flex-h">
157 139
           <span>分享描述:</span>
158 140
           <div class="flex-item">
@@ -161,7 +143,7 @@
161 143
                 type="textarea"
162 144
                 :rows="2"
163 145
                 placeholder="请输入"
164
-                v-model="cardInfo.Share.CardShareInfo">
146
+                v-model="cardInfo.CardShareInfo">
165 147
               </el-input>
166 148
             </div>
167 149
           </div>
@@ -174,7 +156,7 @@
174 156
                 type="textarea"
175 157
                 :rows="2"
176 158
                 placeholder="请输入"
177
-                v-model="cardInfo.Share.CardUseRule">
159
+                v-model="cardInfo.CardUseRule">
178 160
               </el-input>
179 161
             </div>
180 162
           </div>
@@ -187,7 +169,7 @@
187 169
                 type="textarea"
188 170
                 :rows="2"
189 171
                 placeholder="请输入"
190
-                v-model="cardInfo.Share.CardUseInstruction">
172
+                v-model="cardInfo.CardUseInstruction">
191 173
               </el-input>
192 174
             </div>
193 175
           </div>
@@ -203,51 +185,52 @@
203 185
 
204 186
 <script>
205 187
 import { mapState, createNamespacedHelpers } from 'vuex'
206
-const { mapActions: mapCardActions } = createNamespacedHelpers('card')
188
+const { mapActions: mapGymCardActions } = createNamespacedHelpers('gymcard')
207 189
 const { mapState: mapChannelState, mapActions: mapChannelActions } = createNamespacedHelpers('channel')
208
-const { mapActions: mapCourseActions } = createNamespacedHelpers('course')
209 190
 
210 191
 export default {
211 192
   name: '',
212 193
   data () {
213 194
     return {
195
+      disabled: false,
214 196
       date: '',
215 197
       courseList: [],
216 198
       videoOff: false,
217 199
       total: 0,
218 200
       type: this.$route.query.type,
219 201
       isEdit: this.$route.query.id === undefined ? 0 : 1,
202
+      GymTypeList: [{ // 卡类型
203
+        id: 'once',
204
+        name: '次卡'
205
+      }, {
206
+        id: 'month',
207
+        name: '月卡'
208
+      }, {
209
+        id: 'quarter',
210
+        name: '季卡'
211
+      }, {
212
+        id: 'year',
213
+        name: '年卡'
214
+      }],
220 215
       ChannelList: [], // 渠道列表
221 216
       TypeList: [], // 类型列表
222 217
       GoodsList: [], // 商品列表
223
-      currentList: [{
224
-        Name: 'ccc',
225
-        Type: 'xxx'
226
-      }], // 指定商品数据
227 218
       cardInfo: {
228
-        CardName: '',
219
+        GymCardId: '',
220
+        CardImageUrl: '',
221
+        GymCardName: '',
222
+        GymTypeId: '',
223
+        Price: '',
224
+        TotalCount: '',
229 225
         SendType: '',
230
-        VideoUrl: '',
231
-        Price: ' ',
226
+        ChannelId: '',
232 227
         StartDate: '',
233 228
         EndDate: '',
234
-        TotalCount: '',
229
+        CardShareInfo: '',
230
+        CardUseRule: '',
231
+        CardUseInstruction: '',
235 232
         CaseId: '',
236
-        OrgId: '',
237
-        Share: {
238
-          CardShareInfo: '',
239
-          CardUseRule: '',
240
-          CardUseInstruction: ''
241
-        },
242
-        Images: [{
243
-          CardImageUrl: ''
244
-        }],
245
-        Targets: [{
246
-          TargetType: '',
247
-          TargetId: '',
248
-          TargetName: ''
249
-        }],
250
-        ChannelId: ''
233
+        OrgId: ''
251 234
       },
252 235
       postData: {
253 236
         page: 1,
@@ -262,32 +245,15 @@ export default {
262 245
         page: 1,
263 246
         pagesize: 10000
264 247
       }).then(() => {
265
-        this.GetCourseList({
266
-          caseid: this.defaultCaseId,
267
-          page: 1,
268
-          pagesize: 10000
269
-        }).then((res) => {
270
-          this.courseList = res.list
271
-          if (this.$route.query.id) {
272
-            this.getCardById({
273
-              id: this.$route.query.id
274
-            }).then((res) => {
275
-              // console.log(JSON.stringify(res.Card))
276
-              this.cardInfo = res.Card
277
-              if (res.Card.VideoUrl) {
278
-                this.videoOff = true
279
-              }
280
-              if (res.Card.Images === null) {
281
-                this.cardInfo.Images = [{
282
-                  CardImageUrl: ''
283
-                }]
284
-              }
285
-              if (res.Card.StartDate) {
286
-                this.date = [res.Card.StartDate, res.Card.EndDate]
287
-              }
288
-            })
289
-          }
290
-        })
248
+        if (this.$route.query.id) {
249
+          this.disabled = true
250
+          this.getGymCardById({
251
+            id: this.$route.query.id
252
+          }).then((res) => {
253
+            // console.log(JSON.stringify(res.Card))
254
+            this.cardInfo = res
255
+          })
256
+        }
291 257
       })
292 258
     })
293 259
   },
@@ -300,17 +266,6 @@ export default {
300 266
       defaultCaseId: x => x.app.cases.default,
301 267
       OrgId: x => x.app.user.OrgId,
302 268
     }),
303
-    pickerOptions () {
304
-      const courseId = this.cardInfo.Targets[0].TargetId
305
-      const couse = (this.courseList || []).filter(x => x.CourseId === courseId)[0] || {}
306
-      const beginDate = new Date(couse.BeginDate).getTime()
307
-      const endDate = new Date(couse.EndDate).getTime()
308
-      return {
309
-        disabledDate (time) {
310
-          return time.getTime() < beginDate || time.getTime() > endDate
311
-        }
312
-      }
313
-    },
314 269
     CaseId: {
315 270
       get () {
316 271
         return this.postData.caseid || this.defaultCaseId
@@ -321,13 +276,10 @@ export default {
321 276
     }
322 277
   },
323 278
   methods: {
324
-    ...mapCardActions([
325
-      'addCard',
326
-      'getCardById',
327
-      'editCard',
328
-    ]),
329
-    ...mapCourseActions([
330
-      'GetCourseList',
279
+    ...mapGymCardActions([
280
+      'addGymCard',
281
+      'getGymCardById',
282
+      'editGymCard',
331 283
     ]),
332 284
     ...mapChannelActions([
333 285
       'GetChannelListList',
@@ -338,82 +290,39 @@ export default {
338 290
         page: 1,
339 291
         pagesize: 10000
340 292
       })
341
-      this.GetCourseList({
342
-        caseid: this.cardInfo.CaseId,
343
-        page: 1,
344
-        pagesize: 10000
345
-      }).then((res) => {
346
-        this.courseList = res.list
347
-      })
348
-      this.cardInfo.Targets = [{
349
-        TargetType: '',
350
-        TargetId: '',
351
-        TargetName: ''
352
-      }]
353 293
       this.cardInfo.ChannelId = ''
354 294
     },
355
-    deleteVideo () { // 删除视频
356
-      this.cardInfo.VideoUrl = ''
357
-      this.videoOff = false
358
-    },
359
-    videoSuccess (res, file) {
360
-      this.videoOff = true
361
-      this.cardInfo.VideoUrl = res.result.url
362
-    },
363
-    addGoods () { // 添加指定商品
364
-      this.centerDialogVisible = true
365
-    },
366 295
     submit () { // 保存
367 296
       if (this.$route.query.id) {
368
-        if (this.date !== '') {
369
-          this.cardInfo.StartDate = this.date[0]
370
-          this.cardInfo.EndDate = this.date[1]
371
-        }
372
-        for (var x = 0; x < this.courseList.length; x++) {
373
-          if (this.courseList[x].CourseId === this.cardInfo.Targets[0].TargetId) {
374
-            this.cardInfo.Targets[0].TargetType = this.courseList[x].CourseType
375
-            this.cardInfo.Targets[0].TargetName = this.courseList[x].CourseName
376
-          }
377
-        }
378 297
         this.cardInfo.TotalCount = this.cardInfo.TotalCount - 0
379 298
         console.log(JSON.stringify(this.cardInfo))
380
-        this.editCard(this.cardInfo).then((res) => {
299
+        this.editGymCard(this.cardInfo).then((res) => {
381 300
           this.$alert('操作成功', '提示', {
382 301
             confirmButtonText: '确定',
383 302
             callback: action => {
384
-              this.$router.push({ name: 'cardList' })
303
+              this.$router.push({ name: 'bodyBuildingCardManager' })
385 304
             }
386 305
           })
387 306
         })
388 307
       } else {
389 308
         this.cardInfo.OrgId = this.OrgId
390
-        if (this.date !== '') {
391
-          this.cardInfo.StartDate = this.date[0]
392
-          this.cardInfo.EndDate = this.date[1]
393
-        }
394
-        for (var n = 0; n < this.courseList.length; n++) {
395
-          if (this.courseList[n].CourseId === this.cardInfo.Targets[0].TargetId) {
396
-            this.cardInfo.Targets[0].TargetType = this.courseList[n].CourseType
397
-            this.cardInfo.Targets[0].TargetName = this.courseList[n].CourseName
398
-          }
399
-        }
400 309
         this.cardInfo.TotalCount = this.cardInfo.TotalCount - 0
401 310
         console.log(JSON.stringify(this.cardInfo))
402
-        this.addCard(this.cardInfo).then((res) => {
311
+        this.addGymCard(this.cardInfo).then((res) => {
403 312
           this.$alert('操作成功', '提示', {
404 313
             confirmButtonText: '确定',
405 314
             callback: action => {
406
-              this.$router.push({ name: 'cardList' })
315
+              this.$router.push({ name: 'bodyBuildingCardManager' })
407 316
             }
408 317
           })
409 318
         })
410 319
       }
411 320
     },
412 321
     cancel () { // 取消
413
-      this.$router.push({ name: 'couponList' })
322
+      this.$router.push({ name: 'bodyBuildingCardManager' })
414 323
     },
415 324
     handleAvatarSuccess (res, file) {
416
-      this.cardInfo.Images[0].CardImageUrl = res.result.url
325
+      this.cardInfo.CardImageUrl = res.result.url
417 326
     },
418 327
   }
419 328
 }

+ 13
- 19
src/pages/system/cardAndCouponManager/bodyBuildingCardManager/index.vue 查看文件

@@ -25,17 +25,13 @@
25 25
     </div>
26 26
     <div class="system-table-box">
27 27
       <el-table
28
-        :data="cardList.list"
28
+        :data="gymCardList.list"
29 29
         stripe
30 30
         style="width: 100%">
31 31
         <el-table-column
32
-          prop="CardName"
32
+          prop="GymCardName"
33 33
           label="卡名称">
34 34
         </el-table-column>
35
-        <!-- <el-table-column
36
-          prop="xxx"
37
-          label="卡类型">
38
-        </el-table-column> -->
39 35
         <el-table-column
40 36
           prop="Price"
41 37
           label="卡价格">
@@ -53,6 +49,9 @@
53 49
         <el-table-column
54 50
           prop="SendType"
55 51
           label="发放类型">
52
+          <template slot-scope="scope">
53
+            {{scope.row.SendType === 'channel' ? '渠道' : scope.row.SendType === 'system' ? '系统' : '案场'}}
54
+          </template>
56 55
         </el-table-column>
57 56
         <el-table-column
58 57
           prop="TotalCount"
@@ -214,7 +213,7 @@
214 213
 <script>
215 214
 import Clipboard from 'clipboard'
216 215
 import { mapState, createNamespacedHelpers } from 'vuex'
217
-const { mapState: mapCardState, mapActions: mapCardActions } = createNamespacedHelpers('card')
216
+const { mapState: mapGymCardState, mapActions: mapGymCardActions } = createNamespacedHelpers('gymcard')
218 217
 const { mapState: mapCustomerState, mapActions: mapCustomerActions } = createNamespacedHelpers('customer')
219 218
 
220 219
 export default {
@@ -250,8 +249,8 @@ export default {
250 249
     })
251 250
   },
252 251
   computed: {
253
-    ...mapCardState({
254
-      cardList: x => x.cardList,
252
+    ...mapGymCardState({
253
+      gymCardList: x => x.gymCardList,
255 254
     }),
256 255
     ...mapState({
257 256
       cases: x => x.app.cases.list,
@@ -270,9 +269,8 @@ export default {
270 269
     }
271 270
   },
272 271
   methods: {
273
-    ...mapCardActions([
274
-      'GetCardList',
275
-      'giveCard',
272
+    ...mapGymCardActions([
273
+      'getGymCardList',
276 274
     ]),
277 275
     ...mapCustomerActions([
278 276
       'GetCustomerList',
@@ -333,7 +331,7 @@ export default {
333 331
       this.getList()
334 332
     },
335 333
     getList () { // 获取列表
336
-      this.GetCardList({
334
+      this.getGymCardList({
337 335
         ...this.postData,
338 336
         caseid: this.CaseId || this.defaultCaseId
339 337
       }).then((res) => {
@@ -345,12 +343,8 @@ export default {
345 343
       this.getList()
346 344
     },
347 345
     handleEdit (index, row) { // 编辑
348
-      this.$router.push({ name: 'editCard', query: { id: row.CardId } })
346
+      this.$router.push({ name: 'editBodyBuildingCard', query: { id: row.GymCardId } })
349 347
     },
350
-    // handleCopy (url) { // 复制弹窗
351
-    //   this.currentCopyUrl = url
352
-    //   this.copyDialogVisible = true
353
-    // },
354 348
     toCopy (index, row) { // 复制
355 349
       console.log(1)
356 350
       var clipboard = new Clipboard(this.$refs['copy' + index])
@@ -364,7 +358,7 @@ export default {
364 358
       })
365 359
     },
366 360
     addCard () {
367
-      this.$router.push({ name: 'editCard', query: {} })
361
+      this.$router.push({ name: 'editBodyBuildingCard', query: {} })
368 362
     }
369 363
   }
370 364
 }

+ 78
- 0
src/store/card/gymCard.js 查看文件

@@ -0,0 +1,78 @@
1
+import ajax from '../../util/ajax'
2
+import api from '../../util/api'
3
+
4
+export default {
5
+  namespaced: true,
6
+  state: {
7
+    gymCardList: [],
8
+  },
9
+  mutations: {
10
+    updateList (state, payload) {
11
+      state.gymCardList = payload || []
12
+    },
13
+  },
14
+  actions: {
15
+    getGymCardList ({ commit }, payload) { // 获取卡列表
16
+      return new Promise((resolve, reject) => {
17
+        ajax(api.gymCardManager.gymCardList.url, {
18
+          method: api.gymCardManager.gymCardList.method,
19
+          queryData: {
20
+            ...payload,
21
+          }
22
+        }).then(res => {
23
+          commit('updateList', res)
24
+          resolve(res)
25
+        }).catch(reject)
26
+      })
27
+    },
28
+    addGymCard ({ commit }, payload) { // 新增卡
29
+      return new Promise((resolve, reject) => {
30
+        ajax(api.gymCardManager.addGymCard.url, {
31
+          method: api.gymCardManager.addGymCard.method,
32
+          data: {
33
+            info: JSON.stringify(payload)
34
+          }
35
+        }).then(res => {
36
+          resolve(res)
37
+        }).catch(reject)
38
+      })
39
+    },
40
+    getGymCardById ({ commit }, { id }) { // 获取卡详情
41
+      return new Promise((resolve, reject) => {
42
+        ajax(api.gymCardManager.getGymCardById.url, {
43
+          method: api.gymCardManager.getGymCardById.method,
44
+          urlData: {
45
+            id,
46
+          }
47
+        }).then(res => {
48
+          resolve(res)
49
+        }).catch(reject)
50
+      })
51
+    },
52
+    editGymCard ({ commit }, payload) { // 编辑更新卡
53
+      return new Promise((resolve, reject) => {
54
+        ajax(api.gymCardManager.editGymCard.url, {
55
+          method: api.gymCardManager.editGymCard.method,
56
+          data: {
57
+            info: JSON.stringify(payload)
58
+          },
59
+        }).then(res => {
60
+          resolve(res)
61
+        }).catch(reject)
62
+      })
63
+    },
64
+    // giveCard ({ commit }, { id, users }) {
65
+    //   return new Promise((resolve, reject) => {
66
+    //     ajax(api.cardManager.giveCard.url, {
67
+    //       method: api.cardManager.giveCard.method,
68
+    //       urlData: {
69
+    //         id,
70
+    //         users
71
+    //       },
72
+    //     }).then(res => {
73
+    //       resolve(res)
74
+    //     }).catch(reject)
75
+    //   })
76
+    // }
77
+  }
78
+}

+ 1
- 0
src/store/index.js 查看文件

@@ -26,6 +26,7 @@ export const modules = {
26 26
   cmscase: () => require('./cms/case').default,
27 27
   caserecord: () => require('./case/record').default,
28 28
   vip: () => require('./card/vip').default,
29
+  gymcard: () => require('./card/gymCard').default,
29 30
   card: () => require('./card/card').default,
30 31
   coupon: () => require('./coupon/coupon').default,
31 32
   channel: () => require('./channel/channel').default,

+ 18
- 0
src/util/api.js 查看文件

@@ -632,6 +632,24 @@ const $api = {
632 632
       url: `${baseUrl}${common}/coupon/:id/to/:users`
633 633
     },
634 634
   },
635
+  gymCardManager: {
636
+    gymCardList: {
637
+      method: 'get',
638
+      url: `${baseUrl}${common}/gymcard`
639
+    },
640
+    addGymCard: {
641
+      method: 'post',
642
+      url: `${baseUrl}${common}/gymcard`
643
+    },
644
+    editGymCard: {
645
+      method: 'put',
646
+      url: `${baseUrl}${common}/gymcard`
647
+    },
648
+    getGymCardById: {
649
+      method: 'get',
650
+      url: `${baseUrl}${common}/gymcard/:id`
651
+    }
652
+  },
635 653
   customerManager: {
636 654
     getByTel: {
637 655
       method: 'get',