浏览代码

联调修改

wangfei 6 年前
父节点
当前提交
c3fb689527

+ 4
- 0
src/common/css/reset.css 查看文件

@@ -69,4 +69,8 @@ select option {
69 69
 
70 70
 .van-picker{
71 71
 	z-index: 101;
72
+}
73
+
74
+.van-toast i{
75
+	color: white;
72 76
 }

+ 3
- 1
src/components/courseItem/index.vue 查看文件

@@ -10,7 +10,9 @@
10 10
         <div class="content">
11 11
           <div class="title flex-h">
12 12
             <div class="flex-item">
13
-              <span>{{data.title}}</span>
13
+              <div>
14
+                <span>{{data.title}}</span>
15
+              </div>
14 16
             </div>
15 17
             <div v-if="data.getWay=='ticket'">
16 18
               <span>{{data.defaultPrice}}</span><br>

+ 12
- 6
src/components/courseItem/page.scss 查看文件

@@ -21,13 +21,19 @@
21 21
       .title{
22 22
         align-items: center;
23 23
         &>.flex-item{
24
-          span{
24
+          >div{
25 25
             width: 100%;
26
-            font-size: .15rem;
27
-            display: block;
28
-            white-space: nowrap;
29
-            text-overflow: ellipsis;
30
-            color: #323b45;
26
+            position: relative;
27
+            overflow: hidden;
28
+            span{
29
+              width: 100%;
30
+              font-size: .15rem;
31
+              display: block;
32
+              white-space: nowrap;
33
+              text-overflow: ellipsis;
34
+              color: #323b45;
35
+              overflow: hidden;
36
+            }
31 37
           }
32 38
           &+div{
33 39
             text-align: right;

+ 21
- 12
src/components/orderListItem/index.vue 查看文件

@@ -1,17 +1,21 @@
1 1
 <template>
2 2
   <div class="orderListItem">
3 3
     <div class="title flex-h">
4
-      <div class="orange" v-if="data.Status === 0">
4
+      <div class="orange" v-if="returnStatus(data.MakeStatus) === '已下单'">
5 5
         <i class="iconfont icon-dengdai"></i><br>
6
-        <span>制作中</span>
6
+        <span>{{returnStatus(data.MakeStatus)}}</span>
7 7
       </div>
8
-      <div class="grey" v-if="data.Status === -1">
8
+      <div class="orange" v-if="returnStatus(data.MakeStatus) === '制作中'">
9
+        <i class="iconfont icon-dengdai"></i><br>
10
+        <span>{{returnStatus(data.MakeStatus)}}</span>
11
+      </div>
12
+      <div class="grey" v-if="returnStatus(data.MakeStatus) === '已取消'">
9 13
         <i class="iconfont icon-quxiao"></i><br>
10
-        <span>已取消</span>
14
+        <span>{{returnStatus(data.MakeStatus)}}</span>
11 15
       </div>
12
-      <div class="green" v-if="data.Status === 1">
16
+      <div class="green" v-if="returnStatus(data.MakeStatus) === '已完成'">
13 17
         <i class="iconfont icon-gouxuan"></i><br>
14
-        <span>已完成</span>
18
+        <span>{{returnStatus(data.MakeStatus)}}</span>
15 19
       </div>
16 20
       <div class="flex-item">
17 21
         <div>
@@ -41,6 +45,7 @@
41 45
 </template>
42 46
 
43 47
 <script>
48
+import dict from '../../util/contants'
44 49
 
45 50
 export default {
46 51
   name: '',
@@ -49,23 +54,27 @@ export default {
49 54
     return {
50 55
 
51 56
     }
52
-  },
53
-  computed: {
54
-
55 57
   },
56 58
   components: {
57 59
 
58 60
   },
59 61
   created () {
60
-
62
+    // console.log(dict)
63
+    // console.log(JSON.stringify(this.data.MakeStatus))
61 64
   },
62 65
   methods: {
63
-    
66
+    returnStatus (val) {
67
+      for (var n = 0; n < dict.orderStatus.length; n++) {
68
+        if(val === dict.orderStatus[n].key){
69
+          return dict.orderStatus[n].value
70
+        }
71
+      }
72
+    },
64 73
   }
65 74
 }
66 75
 </script>
67 76
 
68 77
 <!-- Add "scoped" attribute to limit CSS to this component only -->
69 78
 <style lang="scss" scoped>
70
-@import "page.scss";
79
+@import 'page.scss';
71 80
 </style>

+ 4
- 0
src/pages/user/bindMobile/bindMobile.vue 查看文件

@@ -155,6 +155,7 @@ export default {
155 155
       }, 1000)
156 156
     },
157 157
     submit () {
158
+      var _that = this
158 159
       if (!this.postData.captcha) {
159 160
         this.$toast('请先获取验证码')
160 161
         return
@@ -169,6 +170,9 @@ export default {
169 170
       }
170 171
       this.submitData(this.postData).then((res) => {
171 172
         this.$toast(res)
173
+        setTimeout(function(){
174
+          _that.$router.push({name: 'userCenter'})
175
+        },300)
172 176
       })
173 177
     }
174 178
   }

+ 57
- 66
src/pages/user/fiveA/index.vue 查看文件

@@ -17,13 +17,14 @@
17 17
           </div>
18 18
           <h5>结识更多朋友</h5>
19 19
           <div class="courseList flex-h">
20
-            <ul class="flex-item">
21
-              <router-link tag="li" :to="{name:'',query:{}}" v-for="(item,index) in courseList" :key="index">
20
+            <ul class="flex-item" v-if="!fiveANoData">
21
+              <router-link tag="li" v-for="(item,index) in courseList" :key="index" :to="{name:'majorProjectsDetail',query:{id: item.id}}">
22 22
                 <courseItem :data="item"></courseItem>
23 23
               </router-link>
24 24
             </ul>
25
+            <span v-if="fiveANoData" style="width:100%;line-height:.3rem;display:block;text-align:center;color:#ccc;margin-bottom:.1rem;">暂无数据</span>
25 26
           </div>
26
-          <router-link :to="{name:'',query:{}}" class="more">查看更多</router-link>
27
+          <router-link :to="{name:'',query:{}}" class="more" v-if="!fiveANoData">查看更多</router-link>
27 28
           <div style="width:100%;height:.1rem;background:#f8f8f8;margin:0 auto;"></div>
28 29
           <h5>资讯</h5>
29 30
           <div class="newsList flex-h">
@@ -50,8 +51,9 @@ export default {
50 51
   name: '',
51 52
   data () {
52 53
     return {
54
+      fiveANoData: false,
53 55
       active: {
54
-        index: 1,
56
+        index: 0,
55 57
         locationid: ''
56 58
       },
57 59
       swiperOption: {
@@ -65,63 +67,8 @@ export default {
65 67
         LocationId: "selected",
66 68
         LocationName: "精选"
67 69
       }],
68
-      courseList: [{ // 课程列表
69
-        id: '',
70
-        title: '课程名称',
71
-        img: '',
72
-        time: '2018.04.04 18:30-20:00',
73
-        address: '南京南',
74
-        tag: ['儿童教育', '小小外交官'],
75
-        courseType: '团体课',
76
-        defaultPrice: '168/节',
77
-        getWay: 'ticket'
78
-      }, {
79
-        id: '',
80
-        title: '课程名称',
81
-        img: '',
82
-        time: '2018.04.04 18:30-20:00',
83
-        address: '南京南',
84
-        tag: ['儿童教育', '小小外交官'],
85
-        courseType: '团体课',
86
-        defaultPrice: '168/节',
87
-        getWay: 'free'
88
-      }, {
89
-        id: '',
90
-        title: '课程名称',
91
-        img: '',
92
-        time: '2018.04.04 18:30-20:00',
93
-        address: '南京南',
94
-        tag: ['儿童教育', '小小外交官'],
95
-        courseType: '团体课',
96
-        defaultPrice: '168/节',
97
-        getWay: 'free'
98
-      }],
99
-      newsList: [{ // 资讯列表
100
-        title: '我是标题我是标题我是标题我是标题我是标题我是标题',
101
-        time: '2018年5月25日',
102
-        img: '',
103
-        id: ''
104
-      }, {
105
-        title: '我是标题我是标题我是标题我是标题我是标题我是标题',
106
-        time: '2018年5月25日',
107
-        img: '',
108
-        id: ''
109
-      }, {
110
-        title: '我是标题我是标题我是标题我是标题我是标题我是标题',
111
-        time: '2018年5月25日',
112
-        img: '',
113
-        id: ''
114
-      }, {
115
-        title: '我是标题我是标题我是标题我是标题我是标题我是标题',
116
-        time: '2018年5月25日',
117
-        img: '',
118
-        id: ''
119
-      }, {
120
-        title: '我是标题我是标题我是标题我是标题我是标题我是标题',
121
-        time: '2018年5月25日',
122
-        img: '',
123
-        id: ''
124
-      }]
70
+      courseList: [], // 课程列表
71
+      newsList: [], // 资讯列表
125 72
     }
126 73
   },
127 74
   computed: {
@@ -129,7 +76,8 @@ export default {
129 76
       orgid: x => x.app.orgId,
130 77
       navList: x => x.fiveA.nav,
131 78
       banner: x => x.fiveA.banner,
132
-      cms: x => x.fiveA.cms
79
+      cms: x => x.fiveA.cms,
80
+      fiveAList: x => x.fiveA.fiveAList,
133 81
     }),
134 82
     MySwiper () {
135 83
       return this.$refs.mySwiper.swiper
@@ -147,22 +95,65 @@ export default {
147 95
   created () {
148 96
     this.getNav({ orgid: this.orgid, issys: '0' }).then(() => {
149 97
       this.nav = this.nav.concat(this.navList)
150
-      this.active.locationid = this.nav[this.active.index].LocationId
98
+      for (var n = 0; n < this.nav.length; n++) {
99
+        if(this.nav[n].LocationId === this.$route.query.id){
100
+          this.active.index = n
101
+          this.active.locationid = this.nav[n].LocationId
102
+        }
103
+      }
104
+      this.getFiveAList({ locationid: this.active.locationid, orgid: this.orgid }).then((res) => {
105
+        // console.log(JSON.stringify(res))
106
+        this.courseList = []
107
+        if (res !== null) {
108
+          this.fiveANoData = false
109
+          this.returnCourseList(res)
110
+        } else {
111
+          this.fiveANoData = true
112
+        }
113
+      })
151 114
       this.getFiveAInfo({ orgid: this.orgid, locationid: this.active.locationid }).then(() => {
152 115
         this.newsList = this.cms
153 116
       })
154 117
     })
155 118
   },
156 119
   methods: {
157
-    ...mapFiveAActions(['getNav']),
158
-    ...mapFiveAActions(['getFiveAInfo']),
120
+    ...mapFiveAActions([
121
+      'getNav',
122
+      'getFiveAInfo',
123
+      'getFiveAList',
124
+    ]),
159 125
     changeLocation (item, index) {
160 126
       this.active.index = index
161 127
       this.active.locationid = item.LocationId
128
+      this.getFiveAList({ locationid: this.active.locationid, orgid: this.orgid }).then((res) => {
129
+        // console.log(JSON.stringify(res))
130
+        this.courseList = []
131
+        if (res !== null) {
132
+          this.fiveANoData = false
133
+          this.returnCourseList(res)
134
+        } else {
135
+          this.fiveANoData = true
136
+        }
137
+      })
162 138
       this.getFiveAInfo({ orgid: this.orgid, locationid: this.active.locationid }).then(() => {
163 139
         this.newsList = this.cms
164 140
       })
165 141
     },
142
+    returnCourseList (arr) { // 转换课程列表格式
143
+      for (var n = 0; n < arr.length; n++) {
144
+        this.courseList.push({
145
+          id: arr[n].CourseId,
146
+          title: arr[n].CourseName,
147
+          img: arr[n].CourseImg,
148
+          time: this.toolClass.dateFormat(arr[n].BeginDate),
149
+          address: arr[n].CaseInfo.CaseAddress,
150
+          tag: arr[n].CourseTags || [],
151
+          courseType: '',
152
+          defaultPrice: arr[n].Price + '/节',
153
+          getWay: 'ticket'
154
+        })
155
+      }
156
+    },
166 157
     jump (item) {
167 158
       console.log(item)
168 159
       item.ForwardType = item.ForwardType || ''
@@ -180,5 +171,5 @@ export default {
180 171
 
181 172
 <!-- Add "scoped" attribute to limit CSS to this component only -->
182 173
 <style lang="scss" scoped>
183
-@import "page.scss";
174
+@import 'page.scss';
184 175
 </style>

+ 12
- 12
src/pages/user/lessonDetail/index.vue 查看文件

@@ -2,29 +2,29 @@
2 2
   <div class="mainPage">
3 3
     <div class="title">课程详情</div>
4 4
     <div class="content" :class="{'opacity' : courseOrderDetail.IsDone === 1, 'gray': courseOrderDetail.IsDone === 1}">
5
-      <div class="list-item">
5
+      <div class="list-item flex-h">
6 6
         <span>订单编号</span>
7
-        <span>{{courseOrderDetail.OrdersNo !== undefined ? courseOrderDetail.OrdersNo : ''}}</span>
7
+        <span class="flex-item" style="font-size:.11rem;">{{courseOrderDetail.OrdersNo !== undefined ? courseOrderDetail.OrdersNo : ''}}</span>
8 8
       </div>
9
-      <div class="list-item">
9
+      <div class="list-item flex-h">
10 10
         <span>课程名称</span>
11
-        <span>{{courseOrderDetail.CourseName}}</span>
11
+        <span class="flex-item">{{courseOrderDetail.CourseName}}</span>
12 12
       </div>
13
-      <div class="list-item">
13
+      <div class="list-item flex-h">
14 14
         <span>课时数</span>
15
-        <span>{{courseOrderDetail.JoinNum}}/{{courseOrderDetail.CourseNum}}</span>
15
+        <span class="flex-item">{{courseOrderDetail.JoinNum}}/{{courseOrderDetail.CourseNum}}</span>
16 16
       </div>
17
-      <div class="list-item">
17
+      <div class="list-item flex-h">
18 18
         <span>类型</span>
19
-        <span>{{returnLocationName(courseOrderDetail.LocationId)}}</span>
19
+        <span class="flex-item">{{returnLocationName(courseOrderDetail.LocationId)}}</span>
20 20
       </div>
21
-      <div class="list-item">
21
+      <div class="list-item flex-h">
22 22
         <span>商品价格</span>
23
-        <span>¥{{courseOrderDetail.Price}}</span>
23
+        <span class="flex-item">¥{{courseOrderDetail.Price}}</span>
24 24
       </div>
25
-      <div class="list-item">
25
+      <div class="list-item flex-h">
26 26
         <span>下单时间</span>
27
-        <span>{{toolClass.dateFormat(courseOrderDetail.CreateDate)}}</span>
27
+        <span class="flex-item">{{toolClass.dateFormat(courseOrderDetail.CreateDate)}}</span>
28 28
       </div>
29 29
       <!-- <div class="list-item">
30 30
         <span>地点</span>

+ 2
- 1
src/pages/user/lessonDetail/page.scss 查看文件

@@ -21,12 +21,13 @@
21 21
     .list-item{
22 22
       display: flex;
23 23
       justify-content: space-between;
24
-      align-items: flex-start;
24
+      align-items: center;
25 25
       padding: 0 .22rem;
26 26
       margin-bottom: .1rem;
27 27
       span{
28 28
         display: block;
29 29
         color: #666;
30
+        white-space: nowrap;
30 31
       }
31 32
       span:nth-of-type(2){
32 33
         width: 60%;

+ 1
- 1
src/pages/user/lessonOrder/index.vue 查看文件

@@ -5,7 +5,7 @@
5 5
         <div class="order-card flex-h" v-for="(item,index) in courseOrderList.list" :key='index' :class="{'opacity' : item.status === 1}" @click="toDetail(item)">
6 6
           <div class="card-pic">
7 7
             <div :class="{'gray-location' : item.status === 1}"><span>{{returnLocationName(item.LocationId)}}</span></div>
8
-            <img src="" class="cover" width="100%" height="100%" alt="">
8
+            <img :src="item.CourseImg" class="cover" width="100%" height="100%" alt="">
9 9
           </div>
10 10
           <div class="card-msg">
11 11
             <div class="title">{{item.CourseName}}</div>

+ 8
- 7
src/pages/user/mainPage/indexPage/index.vue 查看文件

@@ -83,7 +83,6 @@ export default {
83 83
       locationId: '',
84 84
       swiperOption: {
85 85
         observer: true,
86
-        loop: true,
87 86
         autoplay: {
88 87
           disableOnInteraction: false,
89 88
         }
@@ -126,11 +125,13 @@ export default {
126 125
       this.locationId = 'index'
127 126
       this.getIndexInfo({ orgid: this.orgid, locationid: this.locationId }).then(() => {
128 127
         this.newsList = this.cms
129
-        for (let i = 0; i < this.project.length; i++) {
130
-          if (this.project[i].CmsCaseImgs != null) {
131
-            for (let j = 0; j < this.project[i].CmsCaseImgs.length; j++) {
132
-              if (this.project[i].CmsCaseImgs[j].ImageType === 'cover') {
133
-                this.project[i].CaseImageUrl = this.project[i].CmsCaseImgs[j].CaseImageUrl
128
+        if (this.project !== undefined && this.project !== null) {
129
+          for (let i = 0; i < this.project.length; i++) {
130
+            if (this.project[i].CmsCaseImgs != null) {
131
+              for (let j = 0; j < this.project[i].CmsCaseImgs.length; j++) {
132
+                if (this.project[i].CmsCaseImgs[j].ImageType === 'cover') {
133
+                  this.project[i].CaseImageUrl = this.project[i].CmsCaseImgs[j].CaseImageUrl
134
+                }
134 135
               }
135 136
             }
136 137
           }
@@ -157,5 +158,5 @@ export default {
157 158
 
158 159
 <!-- Add "scoped" attribute to limit CSS to this component only -->
159 160
 <style lang="scss" scoped>
160
-@import "page.scss";
161
+@import 'page.scss';
161 162
 </style>

+ 1
- 1
src/pages/user/mainPage/userCenter/index.vue 查看文件

@@ -80,7 +80,7 @@ export default {
80 80
 
81 81
   },
82 82
   mounted () {
83
-    this.$nextTick(() => {
83
+    this.getUserInfo({ org: this.org }).then(() => {
84 84
       if (this.userInfo != 406) {
85 85
         this.user = this.userInfo.customer
86 86
         this.AccountInfo = JSON.parse(this.user.AccountInfo)

+ 5
- 2
src/pages/user/majorProjects/index.vue 查看文件

@@ -160,12 +160,15 @@ export default {
160 160
     },
161 161
     returnDate (val) {
162 162
       val = new Date(val)
163
-      return val.getFullYear() + '.' + this.returnNum(val.getMonth()+1) + '.' + this.returnNum(val.getDate())
163
+      return val.getFullYear() + '.' + this.returnNum(val.getMonth() + 1) + '.' + this.returnNum(val.getDate())
164 164
     },
165 165
     initData () { // 初始化数据
166 166
       this.getProjectInfo({ id: this.$route.query.id }).then((res) => {
167 167
         // console.log(JSON.stringify(res))
168 168
         // this.initList
169
+        if (res.Courses === null) {
170
+          res.Courses = []
171
+        }
169 172
         var aArr = []
170 173
         for (var n = 0; n < res.Courses.length; n++) {
171 174
           aArr.push({
@@ -217,5 +220,5 @@ export default {
217 220
 
218 221
 <!-- Add "scoped" attribute to limit CSS to this component only -->
219 222
 <style lang="scss" scoped>
220
-@import "page.scss";
223
+@import 'page.scss';
221 224
 </style>

+ 5
- 2
src/pages/user/majorProjectsDetail/index.vue 查看文件

@@ -41,12 +41,12 @@
41 41
             <div class="flex-item">
42 42
               <div class="img">
43 43
                 <router-link :to="{name: '', query: {}}">
44
-                  <img :src="courseDetail.CaseInfo.CaseIcon" class="centerLabel cover" alt="">
44
+                  <img v-if="courseDetail.CaseInfo !== undefined" :src="courseDetail.CaseInfo.CaseIcon" class="centerLabel cover" alt="">
45 45
                   <div class="flex-h">
46 46
                     <i class="iconfont icon-dingwei"></i>
47 47
                     <div class="flex-item">
48 48
                       <div>
49
-                        <span>{{courseDetail.CaseInfo.CaseName}}({{courseDetail.CaseInfo.CaseAddress}})</span>
49
+                        <span v-if="courseDetail.CaseInfo !== undefined">{{courseDetail.CaseInfo.CaseName}}({{courseDetail.CaseInfo.CaseAddress}})</span>
50 50
                       </div>
51 51
                     </div>
52 52
                   </div>
@@ -112,6 +112,9 @@ export default {
112 112
   created () {
113 113
     this.getCourseDetailInfo({ id: this.$route.query.id }).then((res) => {
114 114
       var arr = res.CourseDetail
115
+      if(arr === null){
116
+        arr = []
117
+      }
115 118
       this.courseTimeList = arr.sort(function (a, b) { return new Date(a.BeginDate).getTime() > new Date(b.BeginDate).getTime() ? 1 : -1 })
116 119
       // console.log(JSON.stringify(res))
117 120
     })

+ 20
- 4
src/pages/user/placeOrder/index.vue 查看文件

@@ -19,7 +19,8 @@
19 19
             <!-- <span>本月已用:150杯</span> -->
20 20
           </div>
21 21
         </div>
22
-        <router-link :to="{name: 'coffeeIndex', query: {}}">返回选择桌号</router-link>
22
+        <a @click="reback">返回选择桌号</a>
23
+        <!-- <router-link :to="{name: 'coffeeIndex', query: {}}">返回选择桌号</router-link> -->
23 24
       </div>
24 25
       <div class="content flex-item flex-h">
25 26
         <div class="slideMenus">
@@ -66,8 +67,8 @@
66 67
           <i class="iconfont" :class="{'icon-jiantou-up': !showCalcMenu,'icon-jiantou-down': showCalcMenu}" @click="showCalcMenu = true"></i>
67 68
         </div>
68 69
       </div>
69
-      <router-link :to="{name: 'placeOrderDetail', query: {info: JSON.stringify(settlementList), caseid: encodeURI(caseId), areaid: encodeURI(areaId), areaname: encodeURI(areaName), areaid: encodeURI(areaId), tableid: encodeURI(tableId), tableno: encodeURI(tableNo)}}">下单</router-link>
70
-      <!-- <a @click="showCalcMenu = true">下单</a> -->
70
+      <!-- <router-link :to="{name: 'placeOrderDetail', query: {info: JSON.stringify(settlementList), caseid: encodeURI(caseId), areaid: encodeURI(areaId), areaname: encodeURI(areaName), areaid: encodeURI(areaId), tableid: encodeURI(tableId), tableno: encodeURI(tableNo)}}">下单</router-link> -->
71
+      <a @click="toPlaceOrder">下单</a>
71 72
     </div>
72 73
     <orderPopup :show="showPopup" :data="currentSpec" @closePopup="closePopup" @returnData="calcMenus"></orderPopup>
73 74
     <calcMenu :show="showCalcMenu" :totalNum="totalCupNum" :data="settlementList" @returnData="calcMenus" @emptyMenus="emptyMenus" @closeCalcMenu="closeCalcMenu" @placeOrder="placeOrder"></calcMenu>
@@ -161,6 +162,13 @@ export default {
161 162
       'getGoodsTypeList',
162 163
       'getGoodsList',
163 164
     ]),
165
+    toPlaceOrder () { // 下单 
166
+      if(this.settlementList.length){
167
+        this.$router.push({name: 'placeOrderDetail', query: {info: JSON.stringify(this.settlementList), caseid: encodeURI(this.caseId), areaid: encodeURI(this.areaId), areaname: encodeURI(this.areaName), areaid: encodeURI(this.areaId), tableid: encodeURI(this.tableId), tableno: encodeURI(this.tableNo)}})
168
+      }else{
169
+        this.$toast('您还没有选择商品哦~')
170
+      }
171
+    },
164 172
     mapArr () { // 匹配商品规格
165 173
       var aArr = this.goodsTypeList, bArr = this.goodsList
166 174
       for (var n = 0; n < aArr.length; n++) {
@@ -189,7 +197,7 @@ export default {
189 197
             status: aArr[x].list[y].Status,
190 198
             price: aArr[x].list[y].Price,
191 199
           })
192
-          if(aArr[x].list[y].Specs !== null){
200
+          if (aArr[x].list[y].Specs !== null) {
193 201
             for (var z = 0; z < aArr[x].list[y].Specs.length; z++) {
194 202
               this.menuList[x].list[y].spec.push({
195 203
                 value: aArr[x].list[y].Specs[z].SpecName,
@@ -204,6 +212,14 @@ export default {
204 212
       }
205 213
       // console.log(JSON.stringify(this.menuList))
206 214
     },
215
+    reback () { // 返回桌位选择
216
+      this.$dialog.confirm({
217
+        title: '提示',
218
+        message: '返回页面将清空当前选择的商品,确定要返回吗?'
219
+      }).then(() => {
220
+        this.$router.push({ name: 'coffeeIndex' })
221
+      })
222
+    },
207 223
     placeOrder () { // 下单
208 224
       this.$router.push({ name: 'orderList', query: {} })
209 225
     },

+ 1
- 1
src/pages/user/placeOrderForCourse/index.vue 查看文件

@@ -36,7 +36,7 @@
36 36
                     <span>地点</span>
37 37
                   </div>
38 38
                 </div>
39
-                <!-- <span>{{courseDetail.CaseInfo.CaseAddress}}</span> -->
39
+                <span v-if="courseDetail.CaseInfo !== undefined">{{courseDetail.CaseInfo.CaseAddress}}</span>
40 40
               </li>
41 41
               <li class="flex-h">
42 42
                 <div class="flex-item">

+ 4
- 1
src/pages/user/router.js 查看文件

@@ -124,7 +124,10 @@ const router = new Router({
124 124
 })
125 125
 
126 126
 router.beforeEach((to, from, next) => {
127
-  
127
+  // console.log(to)
128
+  // if(){
129
+    
130
+  // }
128 131
   next()
129 132
 })
130 133
 

+ 23
- 7
src/store/fiveA/fiveA.js 查看文件

@@ -20,7 +20,7 @@ http.getNav = (data) => {
20 20
 }
21 21
 
22 22
 http.getBanner = (data) => {
23
-  console.log(data)
23
+  // console.log(data)
24 24
   return new Promise((resolve, reject) => {
25 25
     Ajax(api.index.banner.url, {
26 26
       method: api.index.banner.method,
@@ -37,7 +37,7 @@ http.getBanner = (data) => {
37 37
 }
38 38
 
39 39
 http.getList = (data) => {
40
-  console.log(data)
40
+  // console.log(data)
41 41
   return new Promise((resolve, reject) => {
42 42
     Ajax(api.index.list.url, {
43 43
       method: api.index.list.method
@@ -50,7 +50,7 @@ http.getList = (data) => {
50 50
 }
51 51
 
52 52
 http.getCms = (data) => {
53
-  console.log(data)
53
+  // console.log(data)
54 54
   return new Promise((resolve, reject) => {
55 55
     Ajax(api.index.cms.url, {
56 56
       method: api.index.cms.method,
@@ -72,7 +72,8 @@ export default {
72 72
     nav: [],
73 73
     banner: [],
74 74
     list: [],
75
-    cms: []
75
+    cms: [],
76
+    fiveAList: [],
76 77
   },
77 78
   mutations: {
78 79
     setNav (state, data) {
@@ -86,9 +87,25 @@ export default {
86 87
     },
87 88
     setCms (state, data) {
88 89
       state.cms = data
89
-    }
90
+    },
91
+    setFiveAList (state, data) {
92
+      state.fiveAList = data
93
+    },
90 94
   },
91 95
   actions: {
96
+    getFiveAList (context, { ...payload }) { // 获取5A列表
97
+      return new Promise((resolve) => {
98
+        Ajax(api.index.getFiveAList.url, {
99
+          method: api.index.getFiveAList.method,
100
+          queryData: {
101
+            ...payload
102
+          },
103
+        }).then(res => {
104
+          context.commit('setFiveAList', res)
105
+          resolve(res)
106
+        })
107
+      })
108
+    },
92 109
     getNav (context, data) {
93 110
       return new Promise((resolve) => {
94 111
         http.getNav(data).then((res) => {
@@ -96,10 +113,9 @@ export default {
96 113
           resolve(res)
97 114
         })
98 115
       })
99
-      
100 116
     },
101 117
     getFiveAInfo (context, data) {
102
-      console.log(data)
118
+      // console.log(data)
103 119
       http.getBanner(data).then((res) => {
104 120
         context.commit('setBanner', res)
105 121
       })

+ 2
- 2
src/store/userCenter/userCenter.js 查看文件

@@ -93,10 +93,10 @@ export default {
93 93
       state.courseLocationList = data
94 94
     },
95 95
     setCourseOrder (state, { res, page }) { // 设置我的课程订单信息
96
-      if (page === 1) {
96
+      if (page <= 1) {
97 97
         state.courseOrderList = res
98 98
       } else {
99
-        state.courseOrderList = { ...res, list: [...state.courseOrderList.list, res.list] }
99
+        state.courseOrderList = {...res, list: [...state.courseOrderList.list, ...res.list]}
100 100
       }
101 101
     }
102 102
   },

+ 6
- 4
src/util/ajax.js 查看文件

@@ -17,7 +17,7 @@ const Axios = axios.create({
17 17
 
18 18
 Axios.interceptors.request.use((config) => {
19 19
   // 处理请求data,若为get请求,拼到url后面,若为post请求,直接添加到body中
20
-  config.urlData = {...config.urlData, org: 'MQ'}
20
+  config.urlData = { ...config.urlData, org: 'MQ' }
21 21
   let urlData = qs.stringify(config.urlData)
22 22
   let queryData = qs.stringify(config.queryData)
23 23
   // 判断是通过斜杠传参还是通过query传参
@@ -64,9 +64,11 @@ const ajax = (...args) => {
64 64
         // }
65 65
         resolve(code)
66 66
       } else {
67
-        Toast({
68
-          message: message,
69
-          type: 'error'
67
+        console.log(message)
68
+        Toast.fail({
69
+          duration: 2000, // 持续展示 toast
70
+          forbidClick: true, // 禁用背景点击
71
+          message: message
70 72
         })
71 73
       }
72 74
     }).catch(reject)

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

@@ -25,6 +25,10 @@ const $api = {
25 25
     cms: { // 获取cms消息
26 26
       method: 'get',
27 27
       url: `${baseUrl}${guest}/cms/news`
28
+    },
29
+    getFiveAList: { // 获取5A列表
30
+      method: 'get',
31
+      url: `${baseUrl}${guest}/cms/course`
28 32
     }
29 33
   },
30 34
   caseForCoffee: {

+ 54
- 0
src/util/contants.js 查看文件

@@ -0,0 +1,54 @@
1
+
2
+const dict = {
3
+  orderStatus: [{ // 商品订单状态字典
4
+    value: '已下单',
5
+    key: 'not started'
6
+  }, {
7
+    value: '制作中',
8
+    key: 'doing'
9
+  }, {
10
+    value: '已完成',
11
+    key: 'finished'
12
+  }, {
13
+    value: '已取消',
14
+    key: 'cancel'
15
+  }],
16
+  gymCard: [{ // 健身卡字典
17
+    value: '次卡',
18
+    key: 'once'
19
+  }, {
20
+    value: '月卡',
21
+    key: 'month'
22
+  }, {
23
+    value: '季卡',
24
+    key: 'quarter'
25
+  }, {
26
+    value: '年卡',
27
+    key: 'year'
28
+  }],
29
+  consumptionType: [{ // 消费类型字典
30
+    value: '系统用户',
31
+    key: 'sys user'
32
+  }, {
33
+    value: '优惠券',
34
+    key: 'coupon'
35
+  }, {
36
+    value: '积分',
37
+    key: 'points'
38
+  }, {
39
+    value: '城币',
40
+    key: 'cheng-coin'
41
+  }],
42
+  userType: [{ // 用户类型
43
+    value: '销售',
44
+    key: 'sales'
45
+  }, {
46
+    value: '主管',
47
+    key: 'manager'
48
+  }, {
49
+    value: '用户',
50
+    key: 'customer'
51
+  }],
52
+}
53
+
54
+export default dict

+ 2
- 2
vue.config.js 查看文件

@@ -25,8 +25,8 @@ module.exports = {
25 25
       // '/api-v2': {
26 26
       '/api': {
27 27
         // target: 'https://dp.huiju360.com.cn/hj_operations',
28
-        // target: 'http://192.168.0.62:8080', //wf
29
-        target: 'http://192.168.0.11', //ys
28
+        target: 'http://192.168.0.62:8080', //wf
29
+        // target: 'http://192.168.0.11', //ys
30 30
         // target: 'http://dev.ycjcjy.com', //frp
31 31
         changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
32 32
         // pathRewrite: {