3 Commits 94c53a0113 ... 883f84cccc

Autor SHA1 Nachricht Datum
  listKer 883f84cccc feat: 客户管理 vor 2 Jahren
  listKer b788afd855 Merge branch 'lihai' of code.jschengta.com:lihai/pad_spa into hlg/20220512 vor 2 Jahren
  黎海 6b84adc40f feat: .. vor 2 Jahren

+ 103 - 35
src/pages/confirmOrder/details/index.vue

@@ -82,9 +82,9 @@
82 82
       </div>
83 83
       <div class="project">
84 84
         <div class="project-title">
85
-          <div>共<span>{{order_data.project_num}}个</span>项目</div>
85
+          <div>共<span>{{order_data.project_list.length}}个</span>项目</div>
86 86
           <div class="add-project"
87
-               @click="isProject=true">添加</div>
87
+               @click="addProject">添加</div>
88 88
         </div>
89 89
         <div class="project-list">
90 90
           <div class="project-info"
@@ -101,7 +101,9 @@
101 101
                 <div> <span v-if="item.device_name">{{item.device_name}}({{item.room}}){{item.use_time}}分钟</span></div>
102 102
                 <div><img @click="eidt(item)"
103 103
                        src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/coupon/eidt.png">
104
-                  <img class="delete"
104
+                  <img v-if="order_data.project_list.length>1"
105
+                       @click="deleteProject(item)"
106
+                       class="delete"
105 107
                        src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/coupon/delete.png"
106 108
                        alt="">
107 109
                 </div>
@@ -110,7 +112,8 @@
110 112
           </div>
111 113
         </div>
112 114
       </div>
113
-      <div class="cost">
115
+      <div class="cost"
116
+           v-if="!isChange">
114 117
         <div class="cost-title">
115 118
           <div>预约费用</div>
116 119
           <div>¥399</div>
@@ -134,7 +137,8 @@
134 137
           合计: <span class="price-num"><span class="min-size">¥</span>399<span class="min-size">.00</span></span>
135 138
         </div>
136 139
       </div>
137
-      <div class="payment">{{order_data.status==0?'立即支付':'确定订单'}}</div>
140
+      <div class="payment"
141
+           @click="determine">{{isChange?'确定订单':'立即支付'}}</div>
138 142
     </div>
139 143
     <!-- 选择优惠券 -->
140 144
     <mine-pupop :show="isCoupun">
@@ -396,6 +400,8 @@ export default {
396 400
       isTs: false,//是否展示选择时间弹窗
397 401
       isPore: false,//皮肤状态弹窗
398 402
       id: 0,//订单id
403
+      isChange: false,//项目是否有改变
404
+      isEditProject: false,//是否编辑项目
399 405
     };
400 406
   },
401 407
   computed: {
@@ -424,43 +430,104 @@ export default {
424 430
         this.productsList = res.data.list
425 431
       })
426 432
     },
427
-    eidt () {
428
-
433
+    eidt (item) {
434
+      this.projectInfo = item.id
435
+      this.getProducts(item.id)
436
+      this.isEditProject = true
437
+      this.isProject = true
438
+    },
439
+    deleteProject (item) {
440
+      this.order_data.project_list.forEach((res, index) => {
441
+        if (item.id == res.id) {
442
+          this.order_data.project_list.splice(index, 1)
443
+          this.$message({
444
+            message: '删除成功',
445
+            type: 'success'
446
+          });
447
+        }
448
+      })
449
+    },
450
+    addProject () {
451
+      this.projectInfo = ''
452
+      this.isEditProject = false
453
+      this.isProject = true
429 454
     },
430 455
     //新增
431 456
     orderUpdate () {
432
-      if (this.projectInfo.length == 0) return
433
-      //项目包重组
434
-      let projectInfo = {}, nowProjectInfo = {}, productsInfo = {}
435
-      this.projectList.forEach(item => {
436
-        if (this.projectInfo == item.id) {
437
-          nowProjectInfo = item
457
+      // 编辑
458
+      if (this.isEditProject) {
459
+        if (this.productsInfo != '') {
460
+          this.order_data.project_list.forEach(e => {
461
+            if (this.projectInfo == e.id) {
462
+              this.productsList.forEach(item => {
463
+                if (e.product_ids != '') {
464
+                  e.price = Number(e.price) - Number(item.price)
465
+                }
466
+                e.product_ids = this.productsInfo
467
+                if (item.id == e.product_ids) {
468
+                  this.isChange = true
469
+                  e.product_names = item.name
470
+                  e.price = Number(e.price) + Number(item.price)
471
+                  this.isProject = false
472
+                  this.isEditProject = false
473
+                }
474
+              })
475
+            }
476
+          })
477
+        } else {
478
+          this.isProject = false
479
+          return
438 480
         }
439
-      })
440
-      if (this.productsInfo.length != 0) {
441
-        this.productsList.forEach(item => {
442
-          if (item.id == this.productsInfo) {
443
-            productsInfo = item
481
+      } else {
482
+        //新增
483
+        let isIndexOf = false
484
+        if (this.projectInfo.length == 0) return
485
+        this.order_data.project_list.forEach(res => {
486
+          if (this.projectInfo == res.id) {
487
+            isIndexOf = true
488
+            this.$message.error('该项目已存在');
444 489
           }
445 490
         })
446
-      }
447
-      console.log(nowProjectInfo, 'nowProjectInfo', productsInfo);
448
-      projectInfo['name'] = nowProjectInfo.name
449
-      projectInfo['cover_url'] = nowProjectInfo.cover_url
450
-      projectInfo['device_name'] = ''
451
-      projectInfo['room'] = ''
452
-      projectInfo['use_time'] = ''
453
-      projectInfo['price'] = nowProjectInfo.price
454
-      projectInfo['product_names'] = ''
491
+        if (isIndexOf) return
492
+        //项目包重组
493
+        let projectInfo = {}, nowProjectInfo = {}, productsInfo = {}
494
+        this.projectList.forEach(item => {
495
+          if (this.projectInfo == item.id) {
496
+            nowProjectInfo = item
497
+          }
498
+        })
499
+        if (this.productsInfo.length != 0) {
500
+          this.productsList.forEach(item => {
501
+            if (item.id == this.productsInfo) {
502
+              productsInfo = item
503
+            }
504
+          })
505
+        }
506
+        console.log(nowProjectInfo, 'nowProjectInfo', productsInfo);
507
+        projectInfo['name'] = nowProjectInfo.name
508
+        projectInfo['id'] = nowProjectInfo.id
509
+        projectInfo['cover_url'] = nowProjectInfo.cover_url
510
+        projectInfo['device_name'] = ''
511
+        projectInfo['room'] = ''
512
+        projectInfo['use_time'] = ''
513
+        projectInfo['price'] = nowProjectInfo.price
514
+        projectInfo['product_names'] = ''
455 515
 
456
-      if (Object.keys(productsInfo).length > 0) {
457
-        projectInfo['product_id'] = productsInfo.id
458
-        projectInfo.product_names = productsInfo.name
459
-        projectInfo.price += Number(productsInfo.price)
516
+        if (Object.keys(productsInfo).length > 0) {
517
+          projectInfo['product_ids'] = productsInfo.id
518
+          projectInfo.product_names = productsInfo.name
519
+          projectInfo.price += Number(productsInfo.price)
520
+        }
521
+        this.order_data.project_list.push(projectInfo)
522
+        this.isChange = true
523
+        this.isProject = false
524
+      }
525
+    },
526
+    //确定订单&支付
527
+    determine () { 
528
+      if (condition) {
529
+        
460 530
       }
461
-      this.order_data.project_list.push(projectInfo)
462
-      this.isProject = false
463
-
464 531
     },
465 532
     onOperation (index) {
466 533
       if (this.programmeList[index].onSelect) {
@@ -888,7 +955,8 @@ export default {
888 955
       }
889 956
     }
890 957
     .payment {
891
-      position: relative;
958
+      position: absolute;
959
+      bottom: 0;
892 960
       margin-top: 18px;
893 961
       left: 50%;
894 962
       transform: translateX(-50%);

+ 50 - 108
src/pages/customerMan/details/index.vue

@@ -3,74 +3,76 @@
3 3
     <div class="left">
4 4
       <div class="user-info">
5 5
         <div class="user-img">
6
-          <img :src="userInfo.image" alt />
6
+          <img :src="userInfo.avatar_url" alt />
7 7
         </div>
8 8
         <div class="user-span">
9 9
           <div class="name">
10 10
             昵称:
11
-            <span>{{userInfo.name}}</span>
11
+            <span>{{userInfo.nickname}}</span>
12 12
           </div>
13 13
           <div class="sex">
14 14
             性别:
15
-            <span>{{userInfo.sex}}</span>
15
+            <span>{{userInfo.sex==1?'男':'女'}}</span>
16 16
           </div>
17 17
           <div class="age">
18 18
             肤龄:
19
-            <span>{{userInfo.age}}</span>
19
+            <span>{{userInfo.age||'--'}}</span>
20 20
           </div>
21 21
           <div class="skin-type">
22 22
             肤质:
23
-            <span>{{userInfo.skinType}}</span>
23
+            <span>{{userInfo.skin}}</span>
24 24
           </div>
25 25
         </div>
26 26
       </div>
27
+
27 28
       <div class="personage-data">
28 29
         <div class="myDataList">
29 30
           肌肤得分:
30
-          <span class="bigSixe">56分</span>
31
+          <span class="bigSixe">{{userInfo.scorec}}分</span>
31 32
         </div>
32 33
         <div class="myDataList">
33 34
           皮肤状态:
34
-          <span>肤质一般</span>
35
+          <span>{{userInfo.skin_status}}</span>
35 36
         </div>
36 37
         <div class="myDataList">
37 38
           上传检测时间:
38
-          <span>2022.0418 16:04</span>
39
+          <span>{{userInfo.check_time}}</span>
39 40
         </div>
40 41
         <div class="myDataList">
41 42
           出生日期:
42
-          <span>2000.02.29</span>
43
+          <span>{{userInfo.birthday}}</span>
43 44
         </div>
44 45
         <div class="myDataList">
45 46
           联系电话:
46
-          <span>13334597987</span>
47
+          <span>{{userInfo.mobile}}</span>
47 48
         </div>
48 49
 
49 50
         <div class="myDataList">
50 51
           所在地:
51
-          <span>广东省,深圳市,南山区</span>
52
+          <span>{{userInfo.city}}</span>
52 53
         </div>
53 54
 
54 55
         <div class="myDataList">
55 56
           开卡店铺:
56
-          <span>JOLIJOLI(西安店)</span>
57
+          <span>{{userInfo.store_name}}</span>
57 58
         </div>
58 59
 
59 60
         <div class="myDataList">
60 61
           卡卷数量:
61
-          <span>5</span>
62
+          <span>{{userInfo.card_num}}</span>
62 63
         </div>
63 64
 
64 65
         <div class="myDataList">
65 66
           储值金额:
66 67
           <span class="JEcolor">
67 68
68
-            <span class="bigSixe">500</span>.00
69
+            <span class="bigSixe">{{userInfo.amount}}</span>
70
+            <!-- .00 -->
69 71
           </span>
70 72
         </div>
71 73
         <div class="myDataList">
72 74
           积分:
73
-          <span>200</span>
75
+          <span>{{userInfo.coin}}</span>
74 76
         </div>
75 77
       </div>
76 78
     </div>
@@ -85,24 +87,24 @@
85 87
           </div>
86 88
           <div class="ps">
87 89
             <div class="ps-title">备注</div>
88
-            <div class="ps-text">{{'富婆富婆富婆富婆富婆富婆富婆富婆富婆富婆富婆富婆富婆富婆富婆富婆富婆' | ellipsis(20)}}</div>
90
+            <div class="ps-text">{{remarks | ellipsis(20)}}</div>
89 91
           </div>
90 92
         </div>
91
-        <div class="right-top-list" @click="toOrder(1)">
92
-          <div class="dataList">
93
+        <div class="right-top-list">
94
+          <div class="dataList" @click="toOrder(1)">
93 95
             <img :src="userInfo.image" />
94 96
             <p>项目订单</p>
95
-            <span>19</span>
97
+            <span>{{order_total.project}}</span>
96 98
           </div>
97
-          <div class="dataList" style="margin:18px 0px">
99
+          <div class="dataList" style="margin:18px 0px" @click="toOrder(2)">
98 100
             <img :src="userInfo.image" />
99
-            <p>项目订单</p>
100
-            <span>19</span>
101
+            <p>卡券订单</p>
102
+            <span>{{order_total.coupon}}</span>
101 103
           </div>
102
-          <div class="dataList">
104
+          <div class="dataList" @click="toOrder(3)">
103 105
             <img :src="userInfo.image" />
104
-            <p>项目订单</p>
105
-            <span>19</span>
106
+            <p>商品订单</p>
107
+            <span>{{order_total.goods}}</span>
106 108
           </div>
107 109
         </div>
108 110
       </div>
@@ -171,81 +173,16 @@ export default {
171 173
         skinType: "中性皮肤"
172 174
       },
173 175
       //面部标签
174
-      lableList: [
175
-        {
176
-          text: "对话框的",
177
-          disabled: false
178
-        },
179
-        {
180
-          text: "对话框的",
181
-          disabled: true
182
-        },
183
-        {
184
-          text: "对话框的",
185
-          disabled: false
186
-        },
187
-        {
188
-          text: "对话框的",
189
-          disabled: false
190
-        },
191
-        {
192
-          text: "对话框的",
193
-          disabled: false
194
-        }
195
-      ],
176
+      lableList: [],
196 177
       //执行方案
197
-      programmeList: [
198
-        {
199
-          image:
200
-            "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png",
201
-          title: "水氧活肤华熙智慧玻尿酸基水氧活肤华熙智慧玻尿酸基底",
202
-          tips: "+润百颜精华",
203
-          zoom: "皮肤综合仪(30号房)",
204
-          ts: "30分钟",
205
-          price: "79.00"
206
-        },
207
-        {
208
-          image:
209
-            "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png",
210
-          title: "水氧活肤华熙智慧玻尿酸基水氧活肤华熙智慧玻尿酸基底",
211
-          tips: "+润百颜精华",
212
-          zoom: "皮肤综合仪(30号房)",
213
-          ts: "30分钟",
214
-          price: "79.00"
215
-        },
216
-        {
217
-          image:
218
-            "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png",
219
-          title: "水氧活肤华熙智慧玻尿酸基水氧活肤华熙智慧玻尿酸基底",
220
-          tips: "+润百颜精华",
221
-          zoom: "皮肤综合仪(30号房)",
222
-          ts: "30分钟",
223
-          price: "79.00"
224
-        }
225
-      ],
178
+      programmeList: [],
179
+
180
+      remarks: {},
226 181
       //项目列表
227
-      projectList: [
228
-        {
229
-          value: "选项1",
230
-          label: "黄金糕"
231
-        },
232
-        {
233
-          value: "选项2",
234
-          label: "双皮奶"
235
-        },
236
-        {
237
-          value: "选项3",
238
-          label: "蚵仔煎"
239
-        },
240
-        {
241
-          value: "选项4",
242
-          label: "龙须面"
243
-        },
244
-        {
245
-          value: "选项5",
246
-          label: "北京烤鸭"
247
-        }
248
-      ],
182
+      projectList: [],
183
+
184
+      order_total: {},
185
+
249 186
       timesInfo: "",
250 187
       projectInfo: "",
251 188
       weekInfo: "",
@@ -258,14 +195,16 @@ export default {
258 195
   watch: {},
259 196
 
260 197
   methods: {
261
-    getUserInfo() {
262
-      api.getUserInfo({ code: this.id }).then(res => {
198
+    getPadUserInfo() {
199
+      api.getPadUserInfo({ id: this.id }).then(res => {
263 200
         this.userInfo = res.data.user;
264
-        this.order_data = res.data.order_data;
265
-        this.lableList = res.data.tags;
266
-        this.programmeList = res.data.order_data.project_list;
267
-        this.coupon_list = res.data.order_data.coupon_list;
268 201
         this.remarks = res.data.remark;
202
+        this.lableList = res.data.tags;
203
+        this.order_total = res.data.order_total;
204
+        this.programmeList = res.data.scheme_list;
205
+
206
+        // this.programmeList = res.data.order_data.project_list;
207
+        // this.coupon_list = res.data.order_data.coupon_list;
269 208
       });
270 209
     },
271 210
 
@@ -282,9 +221,12 @@ export default {
282 221
     },
283 222
     toOrder(index) {
284 223
       if (index === 1) {
285
-        this.$router.push({
286
-          path: "/customerMan/projectOrder"
287
-        });
224
+      this.$router.push({
225
+        path: "/customerMan/projectOrder",
226
+        query: {
227
+          id: this.id
228
+        }
229
+      });
288 230
       }
289 231
     },
290 232
     onSubmit() {},
@@ -294,7 +236,7 @@ export default {
294 236
   created() {
295 237
     let id = this.$route.query.id;
296 238
     this.id = id;
297
-    this.getUserInfo();
239
+    this.getPadUserInfo();
298 240
   },
299 241
 
300 242
   mounted() {}

+ 131 - 24
src/pages/customerMan/myOrder/index.vue

@@ -6,20 +6,30 @@
6 6
           <div class="user-list">
7 7
             <el-table
8 8
               ref="multipleTable"
9
-              :data="tableData"
9
+              :data="projectData"
10 10
               tooltip-effect="dark"
11 11
               height="354"
12 12
               style="width: 100%;border-radius: 8px;"
13 13
               @row-click="handleSelectionChange"
14 14
             >
15
-              <el-table-column prop="name" label="项目名称" width="120"></el-table-column>
16
-              <el-table-column prop="numberList" label="数量" show-overflow-tooltip></el-table-column>
15
+              <el-table-column prop="goods" label="项目名称" width="200">
16
+                <template slot-scope="scope">
17
+                  <div v-for="(val,index) in scope.row.goods" :key="index">
18
+                    <div>{{val.name}}</div>
19
+                  </div>
20
+                </template>
21
+              </el-table-column>
22
+              <el-table-column prop="goods" label="数量" show-overflow-tooltip>
23
+                <template slot-scope="scope">
24
+                  <div>{{scope.row.goods.length}}</div>
25
+                </template>
26
+              </el-table-column>
17 27
               <el-table-column prop="price" label="总价格" show-overflow-tooltip></el-table-column>
18
-              <el-table-column prop="date" label="预约时间" width="180" show-overflow-tooltip></el-table-column>
19
-              <el-table-column prop="shop" label="预约店铺" show-overflow-tooltip></el-table-column>
28
+              <el-table-column prop="order_time" label="预约时间" width="180" show-overflow-tooltip></el-table-column>
29
+              <el-table-column prop="store_name" label="预约店铺" show-overflow-tooltip></el-table-column>
20 30
               <el-table-column prop="status" label="状态" show-overflow-tooltip>
21 31
                 <template slot-scope="scope">
22
-                  <div :class="'classShow'+scope.$index">{{statusStr[scope.row.status]}}</div>
32
+                  <div :class="'color'+scope.row.status">{{statusStr[scope.row.status]}}</div>
23 33
                 </template>
24 34
               </el-table-column>
25 35
             </el-table>
@@ -40,20 +50,28 @@
40 50
           <div class="user-list">
41 51
             <el-table
42 52
               ref="multipleTable"
43
-              :data="tableData"
53
+              :data="couponData"
44 54
               tooltip-effect="dark"
45 55
               height="354"
46 56
               style="width: 100%;border-radius: 8px;"
47 57
               @row-click="handleSelectionChange"
48 58
             >
49
-              <el-table-column prop="name" label="卡卷名称" width="120"></el-table-column>
50
-              <el-table-column prop="numberList" label="卡卷类型" show-overflow-tooltip></el-table-column>
59
+
60
+<!-- create_time: "2022-03-10 10:39:19"
61
+ex_time: "2022.03.17 23:59"
62
+id: 2517
63
+name: "新人体验券"
64
+status: 2
65
+type: "全额券" -->
66
+
67
+              <el-table-column prop="name" label="卡卷名称" width="200"></el-table-column>
68
+              <el-table-column prop="type" label="卡卷类型" show-overflow-tooltip></el-table-column>
51 69
               <el-table-column prop="price" label="总价格" show-overflow-tooltip></el-table-column>
52
-              <el-table-column prop="date" label="到期时间" width="180" show-overflow-tooltip></el-table-column>
53
-              <el-table-column prop="date" label="创建时间" width="180" show-overflow-tooltip></el-table-column>
70
+              <el-table-column prop="create_time" label="到期时间" width="180" show-overflow-tooltip></el-table-column>
71
+              <el-table-column prop="create_time" label="创建时间" width="180" show-overflow-tooltip></el-table-column>
54 72
               <el-table-column prop="status" label="状态" show-overflow-tooltip>
55 73
                 <template slot-scope="scope">
56
-                  <div :class="'classShow'+scope.$index">{{statusStr[scope.row.status]}}</div>
74
+                  <div :class="'color'+scope.row.status">{{statusStr[scope.row.status]}}</div>
57 75
                 </template>
58 76
               </el-table-column>
59 77
             </el-table>
@@ -75,16 +93,33 @@
75 93
           <div class="user-list">
76 94
             <el-table
77 95
               ref="multipleTable"
78
-              :data="tableData"
96
+              :data="goodData"
79 97
               tooltip-effect="dark"
80 98
               height="354"
81 99
               style="width: 100%;border-radius: 8px;"
82 100
               @row-click="handleSelectionChange"
83 101
             >
84
-              <el-table-column prop="name" label="商品名称" width="120"></el-table-column>
85
-              <el-table-column prop="numberList" label="数量" show-overflow-tooltip></el-table-column>
102
+
103
+<!-- create_time: "2022-03-19 22:53:40"
104
+goods: [{order_id: 47, name: "润百颜玻尿酸屏障调理面膜", num: 1}]
105
+id: 47
106
+price: "0.01"
107
+status: 5 -->
108
+
109
+              <el-table-column prop="goods" label="商品名称" width="200">
110
+                <template slot-scope="scope">
111
+                  <div v-for="(val,index) in scope.row.goods" :key="index">
112
+                    <div>{{val.name}}</div>
113
+                  </div>
114
+                </template>
115
+              </el-table-column>
116
+              <el-table-column prop="goods" label="数量" show-overflow-tooltip>
117
+                <template slot-scope="scope">
118
+                  <div>{{scope.row.goods.length}}</div>
119
+                </template>
120
+              </el-table-column>
86 121
               <el-table-column prop="price" label="实付款" show-overflow-tooltip></el-table-column>
87
-              <el-table-column prop="date" label="下单时间" width="180" show-overflow-tooltip></el-table-column>
122
+              <el-table-column prop="create_time" label="下单时间" width="180" show-overflow-tooltip></el-table-column>
88 123
               <el-table-column prop="status" label="状态" show-overflow-tooltip>
89 124
                 <template slot-scope="scope">
90 125
                   <div :class="'classShow'+scope.$index">{{statusStr[scope.row.status]}}</div>
@@ -110,6 +145,8 @@
110 145
 </template>
111 146
 
112 147
 <script>
148
+import api from "../../../server/home";
149
+
113 150
 export default {
114 151
   data() {
115 152
     return {
@@ -147,15 +184,65 @@ export default {
147 184
           status: 1
148 185
         }
149 186
       ],
150
-      statusStr: ["未完成", "代发货", "代使用", "已完成"],
187
+      statusStr: [
188
+        "已预约",
189
+        "未支付",
190
+        "已支付",
191
+        "待使用",
192
+        "正在使用",
193
+        "已结算",
194
+        "已取消"
195
+      ],
151 196
       currentPage1: 1,
152
-      multipleSelection: ""
197
+      couponData: [],
198
+      goodData: [],
199
+      projectData: [],
200
+      total: ""
153 201
     };
154 202
   },
155 203
   computed: {},
156 204
   watch: {},
157 205
 
158 206
   methods: {
207
+    // 获取优惠券订单
208
+    getUserCoupon() {
209
+      let params = {
210
+        page: this.currentPage1,
211
+        limit: this.limit,
212
+        id: this.id
213
+      };
214
+      api.getUserCoupon(params).then(res => {
215
+        this.couponData = res.data.list;
216
+        this.total = res.data.total;
217
+      });
218
+    },
219
+
220
+    // 获取商品订单
221
+    getUserGoods() {
222
+      let params = {
223
+        page: this.currentPage1,
224
+        limit: this.limit,
225
+        id: this.id
226
+      };
227
+      api.getUserGoods(params).then(res => {
228
+        this.goodData = res.data.list;
229
+        this.total = res.data.total;
230
+      });
231
+    },
232
+
233
+    // 获取获取项目订单
234
+    getUserProject() {
235
+      let params = {
236
+        page: this.currentPage1,
237
+        limit: this.limit,
238
+        id: this.id
239
+      };
240
+      api.getUserProject(params).then(res => {
241
+        this.projectData = res.data.list;
242
+        this.total = res.data.total;
243
+      });
244
+    },
245
+
159 246
     handleSizeChange(val) {
160 247
       console.log(`每页 ${val} 条`);
161 248
     },
@@ -167,7 +254,13 @@ export default {
167 254
     submitFrequency() {}
168 255
   },
169 256
 
170
-  created() {},
257
+  created() {
258
+    let id = this.$route.query.id;
259
+    this.id = id;
260
+    this.getUserCoupon();
261
+    this.getUserGoods();
262
+    this.getUserProject();
263
+  },
171 264
 
172 265
   mounted() {}
173 266
 };
@@ -187,12 +280,26 @@ export default {
187 280
     color: green;
188 281
   }
189 282
 }
190
-.classShow1 {
191
-  color: #00EC67;
283
+.color0 {
284
+  color: #fc3019;
192 285
 }
193
-
194
-.classShow0 {
195
-  color: #FF1818;
286
+.color1 {
287
+  color: #3ef3ed;
288
+}
289
+.color2 {
290
+  color: #00eeee;
291
+}
292
+.color3 {
293
+  color: #61d09d;
294
+}
295
+.color4 {
296
+  color: #3115cc;
297
+}
298
+.color5 {
299
+  color: #fc3019;
300
+}
301
+.color6 {
302
+  color: #a999ea;
196 303
 }
197 304
 
198 305
 .priceColor {

+ 23 - 4
src/server/home.js

@@ -58,10 +58,10 @@ export default class Home {
58 58
     return $http.get(url.getUserList, parms);
59 59
   }
60 60
 
61
-  // 获取用户详情
62
-  static getUserInfo (parms) {
63
-    return $http.get(url.getUserInfo, parms);
64
-  }
61
+  // // 获取用户详情
62
+  // static getUserInfo (parms) {
63
+  //   return $http.get(url.getUserInfo, parms);
64
+  // }
65 65
 
66 66
   // 获取优惠券列表
67 67
   static getCouponInfo (parms) {
@@ -73,6 +73,25 @@ export default class Home {
73 73
     return $http.post(url.sendCoupon, parms);
74 74
   }
75 75
 
76
+  // 获取用户详情接口
77
+  static getPadUserInfo (parms) {
78
+    return $http.get(url.getPadUserInfo, parms);
79
+  }
80
+  
81
+  // 获取优惠券订单
82
+  static getUserCoupon (parms) {
83
+    return $http.get(url.getUserCoupon, parms);
84
+  }
85
+
86
+  // 获取商品订单
87
+  static getUserGoods (parms) {
88
+    return $http.get(url.getUserGoods, parms);
89
+  }
90
+
91
+  // 获取项目订单
92
+  static getUserProject (parms) {
93
+    return $http.get(url.getUserProject, parms);
94
+  }
76 95
 
77 96
 }
78 97
 

+ 14 - 1
src/server/urls.js

@@ -20,7 +20,7 @@ export default {
20 20
   //获取项目列表
21 21
   getProjectList: '/v2/pad/project/list',
22 22
   //获取升级包
23
-  getProducts:'/v2/pad/project/product',
23
+  getProducts: '/v2/pad/project/product',
24 24
 
25 25
   /**
26 26
    *  by ListKer
@@ -44,4 +44,17 @@ export default {
44 44
   // 发送优惠券接口
45 45
   sendCoupon: '/v2/pad/coupon/send',
46 46
 
47
+  // 获取用户详情
48
+  getPadUserInfo: '/v2/pad/user/info',
49
+
50
+  // 获取项目订单
51
+  getUserProject: '/v2/pad/user/order/project',
52
+
53
+  // 获取商品订单
54
+  getUserGoods: '/v2/pad/user/order/goods',
55
+
56
+  // 获取优惠券订单
57
+  getUserCoupon: '/v2/pad/user/coupon',
58
+
59
+
47 60
 }