Browse Source

fix:更新多订单,退课,页面优化等修改

seamwang 2 years ago
parent
commit
d331013b48

+ 166 - 0
src/components/u-charts/component.vue

@@ -0,0 +1,166 @@
1
+<template>
2
+  <canvas v-if="canvasId" :id="canvasId" :canvasId="canvasId"
3
+    :style="{'width':cWidth*pixelRatio+'px','height':cHeight*pixelRatio+'px', 'transform': 'scale('+(1/pixelRatio)+')','margin-left':-cWidth*(pixelRatio-1)/2+'px','margin-top':-cHeight*(pixelRatio-1)/2+'px'}"
4
+    @touchstart="touchStart" @touchmove="touchMove" @touchend="touchEnd" @error="error">
5
+  </canvas>
6
+</template>
7
+
8
+<script>
9
+import uCharts from './u-charts.js';
10
+var canvases = {};
11
+
12
+export default {
13
+  props: {
14
+    chartType: {
15
+      required: true,
16
+      type: String,
17
+      default: 'column'
18
+    },
19
+    opts: {
20
+      required: true,
21
+      type: Object,
22
+      default () {
23
+        return null;
24
+      },
25
+    },
26
+    canvasId: {
27
+      type: String,
28
+      default: 'u-canvas',
29
+    },
30
+    cWidth: {
31
+      default: 375,
32
+    },
33
+    cHeight: {
34
+      default: 250,
35
+    },
36
+    pixelRatio: {
37
+      type: Number,
38
+      default: 1,
39
+    },
40
+  },
41
+  mounted () {
42
+    this.init();
43
+  },
44
+  methods: {
45
+    init () {
46
+      switch (this.chartType) {
47
+        case 'column':
48
+          this.initColumnChart();
49
+          break;
50
+        case 'line':
51
+          this.initLineChart();
52
+          break;
53
+        default:
54
+          break;
55
+      }
56
+    },
57
+    initColumnChart () {
58
+      canvases[this.canvasId] = new uCharts({
59
+        $this: this,
60
+        canvasId: this.canvasId,
61
+        type: 'column',
62
+        legend: true,
63
+        fontSize: 11,
64
+        background: '#FFFFFF',
65
+        pixelRatio: this.pixelRatio,
66
+        animation: true,
67
+        categories: this.opts.categories,
68
+        series: this.opts.series,
69
+        enableScroll: true,
70
+        xAxis: {
71
+          disableGrid: true,
72
+          itemCount: 4,
73
+          scrollShow: true
74
+        },
75
+        yAxis: {
76
+          //disabled:true
77
+        },
78
+        dataLabel: true,
79
+        width: this.cWidth * this.pixelRatio,
80
+        height: this.cHeight * this.pixelRatio,
81
+        extra: {
82
+          column: {
83
+            type: 'group',
84
+          }
85
+        }
86
+      });
87
+    },
88
+    initLineChart () {
89
+      canvases[this.canvasId] = new uCharts({
90
+        $this: this,
91
+        canvasId: this.canvasId,
92
+        type: 'line',
93
+        fontSize: 11,
94
+        legend: true,
95
+        dataLabel: false,
96
+        dataPointShape: true,
97
+        background: '#FFFFFF',
98
+        pixelRatio: this.pixelRatio,
99
+        categories: this.opts.categories,
100
+        series: this.opts.series,
101
+        animation: true,
102
+        enableScroll: true,
103
+        xAxis: {
104
+          type: 'grid',
105
+          gridColor: '#CCCCCC',
106
+          gridType: 'dash',
107
+          dashLength: 8,
108
+          itemCount: 4,
109
+          scrollShow: true
110
+        },
111
+        yAxis: {
112
+          gridType: 'dash',
113
+          gridColor: '#CCCCCC',
114
+          dashLength: 8,
115
+          splitNumber: 5,
116
+          min: 10,
117
+          max: 180,
118
+          format: (val) => {
119
+            return val.toFixed(0) + '元'
120
+          }
121
+        },
122
+        width: this.cWidth * this.pixelRatio,
123
+        height: this.cHeight * this.pixelRatio,
124
+        extra: {
125
+          line: {
126
+            type: 'straight'
127
+          }
128
+        }
129
+      });
130
+    },
131
+    // 这里仅作为示例传入两个参数,cid为canvas-id,newdata为更新的数据,需要更多参数请自行修改
132
+    changeData (cid, newdata) {
133
+      canvases[cid].updateData({
134
+        series: newdata.series,
135
+        categories: newdata.categories
136
+      });
137
+    },
138
+    touchStart (e) {
139
+      canvases[this.canvasId].showToolTip(e, {
140
+        format: function (item, category) {
141
+          return category + ' ' + item.name + ':' + item.data
142
+        }
143
+      });
144
+      // canvases[this.canvasId].scrollStart(e);
145
+    },
146
+    touchMove (e) {
147
+      // canvases[this.canvasId].scroll(e);
148
+    },
149
+    touchEnd (e) {
150
+      // canvases[this.canvasId].scrollEnd(e);
151
+    },
152
+    error (e) {
153
+      console.log(e)
154
+    }
155
+  },
156
+};
157
+</script>
158
+
159
+<style scoped>
160
+.charts {
161
+  width: 100%;
162
+  height: 100%;
163
+  flex: 1;
164
+  background-color: #ffffff;
165
+}
166
+</style>

File diff suppressed because it is too large
+ 5630 - 0
src/components/u-charts/u-charts.js


+ 126 - 0
src/pages/class/gift2.vue

@@ -0,0 +1,126 @@
1
+<template>
2
+	<view class="page">
3
+		<cu-custom :isBack="true" title="智能报课"></cu-custom>
4
+		<view class="steps">
5
+			<view class="cu-steps">
6
+				<view class="cu-item" :class="index>cur?'':'text-student'" v-for="(item,index) in numList" :key="index" @tap="changeStep(index)">
7
+					<text class="num"  :data-index="index + 1"></text> {{item.name}}
8
+				</view>
9
+			</view>
10
+		</view>
11
+		<view class="main bg-white" 	:style="[{height:'calc(100vh - 82px - '+ topHeader+'px)'}]">
12
+			<swiper @change="swipeChange" :current="cur" class="swipe">
13
+				<swiper-item>
14
+					<view class="btn-check-group padding">
15
+						<checkbox-group @change="checkboxChange" class="flex" style="flex-wrap: wrap;" id="day">
16
+							<label class="btn-check-label padding-lr margin" :class="{'bg-cyan':params.day.includes(item.id+'')}"
17
+								v-for="item in days" :key="item.id">
18
+								<checkbox :value="item.id"/>
19
+								{{item.name}}
20
+							</label>
21
+						</checkbox-group>
22
+					</view>
23
+				</swiper-item>
24
+				<swiper-item>2</swiper-item>
25
+				<swiper-item>3</swiper-item>
26
+			</swiper>
27
+		</view>
28
+	</view>
29
+</template>
30
+
31
+<script>
32
+import { mapGetters } from 'vuex'
33
+import shopCart from '@/components/shop-cart.vue'
34
+export default {
35
+  components: {
36
+    shopCart
37
+  },
38
+  data() {
39
+    return {
40
+      topHeader: this.globalCustomBarHeight,
41
+      numList: [{
42
+        name: '选周期'
43
+      }, {
44
+        name: '选兴趣'
45
+      }, {
46
+        name: '确认选课'
47
+      }],
48
+      cur: 0,
49
+      days: [
50
+        { id: 1, name: '周一' },
51
+        { id: 2, name: '周二' },
52
+        { id: 3, name: '周三' },
53
+        { id: 4, name: '周四' },
54
+        { id: 5, name: '周五' },
55
+        { id: 6, name: '周六' },
56
+        { id: 7, name: '周日' },
57
+        { id: 8, name: '托管' }
58
+      ],
59
+      params: {
60
+        day: []
61
+      }
62
+    }
63
+  },
64
+  computed: {
65
+    ...mapGetters(['kid'])
66
+  },
67
+  onLoad(options) {
68
+    const id = decodeURIComponent(options.package_id)
69
+    this.package_id = id
70
+    this.init()
71
+  },
72
+  onShow() {
73
+    this.disableBtn = false
74
+  },
75
+  methods: {
76
+    init() {
77
+
78
+    },
79
+    checkboxChange(e) {
80
+      const type = e.target.id
81
+      const values = e.detail.value
82
+      this.params.day = values
83
+    },
84
+    changeStep(index) {
85
+      const step = Math.abs(index - this.cur)
86
+      if (step > 1) return false
87
+      this.cur = index
88
+    },
89
+    swipeChange(e) {
90
+      this.cur = e.detail.current
91
+    }
92
+  }
93
+}
94
+</script>
95
+
96
+<style lang="scss" scoped>
97
+.page{
98
+	height:100vh;
99
+}
100
+.steps{
101
+	margin:10px 0;
102
+}
103
+.main{
104
+ .swipe{
105
+		height:100%;
106
+  }
107
+}
108
+.btn-check-group {
109
+  checkbox {
110
+    display: none;
111
+  }
112
+	radio{
113
+		display:none;
114
+	}
115
+  label {
116
+    display: inline-block;
117
+		margin-right:10rpx;
118
+    position: relative;
119
+		padding:0 30rpx;
120
+    line-height: 30px;
121
+    border-radius: 100rpx;
122
+    flex-wrap: nowrap;
123
+    border: 1px solid #eee;
124
+  }
125
+}
126
+</style>

+ 7 - 10
src/pages/class/shoppingCart.vue

@@ -15,14 +15,10 @@
15
 				<view class="list">
15
 				<view class="list">
16
 					<checkbox-group @change="checkChange">
16
 					<checkbox-group @change="checkChange">
17
 						<view class="cu-card margin-bottom shadow" v-for="(item,index) in list" :key="index">
17
 						<view class="cu-card margin-bottom shadow" v-for="(item,index) in list" :key="index">
18
-							<!-- <label class="cu-item"> -->
19
 								<label class="cu-item">
18
 								<label class="cu-item">
20
 									<view class="card-header flex justify-between solid-bottom">
19
 									<view class="card-header flex justify-between solid-bottom">
21
 										<view>
20
 										<view>
22
-											<checkbox style="transform:scale(0.7)"  :value="item.shopping_id" :checked="checkedIds.includes(item.shopping_id)"></checkbox>
23
-											<!-- <checkbox
24
-											style="transform:scale(0.7)"
25
-											:value="item.shopping_id" :checked="checked.includes(item.shopping_id)"></checkbox> -->
21
+											<checkbox style="transform:scale(0.8)" class="round" :value="item.shopping_id" :checked="checkedIds.includes(item.shopping_id)"></checkbox>
26
 											{{item.student_name}}
22
 											{{item.student_name}}
27
 										</view>
23
 										</view>
28
 										<view @tap.stop=''>
24
 										<view @tap.stop=''>
@@ -33,7 +29,7 @@
33
 										<view class="card-left">
29
 										<view class="card-left">
34
 											<img mode="scaleToFill" :src="item.image" alt="" class="card-image">
30
 											<img mode="scaleToFill" :src="item.image" alt="" class="card-image">
35
 										</view>
31
 										</view>
36
-										<view class="card-right flex-sub margin-left-sm">
32
+										<view class="card-right flex-sub margin-left-sm text-sm">
37
 											<view class="card-title">{{item.class_attend_name}}</view>
33
 											<view class="card-title">{{item.class_attend_name}}</view>
38
 											<view class="text-price text-student text-xl margin-top-xs">{{item.price}}</view>
34
 											<view class="text-price text-student text-xl margin-top-xs">{{item.price}}</view>
39
 											<view class="card-item">
35
 											<view class="card-item">
@@ -61,7 +57,6 @@
61
 										<!-- <button @tap="pay(item)" class="cu-btn round bg-student text-white">立即下单</button> -->
57
 										<!-- <button @tap="pay(item)" class="cu-btn round bg-student text-white">立即下单</button> -->
62
 									</view>
58
 									</view>
63
 								</label>
59
 								</label>
64
-							<!-- </label> -->
65
 						</view>
60
 						</view>
66
 					</checkbox-group>
61
 					</checkbox-group>
67
 				</view>
62
 				</view>
@@ -70,11 +65,11 @@
70
 				<view class="static-price">
65
 				<view class="static-price">
71
 				  <checkbox-group @change="chooseAll">
66
 				  <checkbox-group @change="chooseAll">
72
 						<label>
67
 						<label>
73
-							<checkbox  :checked="checkAll" style="transform:scale(0.7);"/>全选
68
+							<checkbox class="round" :checked="checkAll" style="transform:scale(0.8);"/>全选
74
 						</label>
69
 						</label>
75
 				  </checkbox-group>
70
 				  </checkbox-group>
76
 				</view>
71
 				</view>
77
-				<view class="static-choose  text-ellipsis" v-if="checkedIds.length>0">
72
+				<view class="static-choose text-center" v-if="checkedIds.length>0">
78
 					  <text>已选:</text><text class="margin-right-xs">{{checkedIds.length}}</text>
73
 					  <text>已选:</text><text class="margin-right-xs">{{checkedIds.length}}</text>
79
 						<text>总价:</text><text class="text-price text-red">{{sum}}</text>
74
 						<text>总价:</text><text class="text-price text-red">{{sum}}</text>
80
 				</view>
75
 				</view>
@@ -111,6 +106,8 @@ export default {
111
   },
106
   },
112
   onShow() {
107
   onShow() {
113
     this.get_list()
108
     this.get_list()
109
+  },
110
+  onLoad(options) {
114
     socket.initSocket()
111
     socket.initSocket()
115
   },
112
   },
116
   methods: {
113
   methods: {
@@ -236,7 +233,7 @@ export default {
236
 		}
233
 		}
237
 		&-choose{
234
 		&-choose{
238
       color: #666;
235
       color: #666;
239
-    	width: calc(100vw - 240px);
236
+    	width: calc(100vw - 200px);
240
 		}
237
 		}
241
 }
238
 }
242
 
239
 

+ 2 - 1
src/pages/login/index.vue

@@ -7,8 +7,9 @@
7
 			<view class="title">课后百科</view>
7
 			<view class="title">课后百科</view>
8
 			<view class="action margin-top-xl">
8
 			<view class="action margin-top-xl">
9
 						<view class="des margin-top">您尚未登录需要获取您的授权后进入</view>
9
 						<view class="des margin-top">您尚未登录需要获取您的授权后进入</view>
10
-			      <button class="cu-btn block round bg-grey lg margin-top" @tap="back">暂不登录</button>
10
+			      <!-- <button class="cu-btn block round bg-grey lg margin-top" @tap="back">暂不登录</button> -->
11
 			      <button class="cu-btn block round bg-cyan lg margin-top" @tap="login">立即登录</button>
11
 			      <button class="cu-btn block round bg-cyan lg margin-top" @tap="login">立即登录</button>
12
+						<view class="margin-top text-cyan lh-30" @tap="back">暂不登录</view>
12
 			</view>
13
 			</view>
13
 			<view class="agreement margin-top-lg">
14
 			<view class="agreement margin-top-lg">
14
 				<checkbox-group @change="agreement=!agreement" style="display:inline-block;">
15
 				<checkbox-group @change="agreement=!agreement" style="display:inline-block;">

+ 69 - 50
src/pages/mine/message.vue

@@ -1,50 +1,69 @@
1
-<template>
2
-	<view class="page">
3
-		<cu-custom :isBack="true" title="消息中心"></cu-custom>
4
-		<view class="cu-list box-shadow menu">
5
-		  <view class="cu-item arrow margin-top-xs" v-for="message in list" :key="message.id">
6
-					<text class="cuIcon-notice lg text-gray" style="font-size:18px;"></text>
7
-        	<view class="content margin-left-sm">
8
-						<view>系统通知</view>
9
-          	<text class="text-black">{{message.title}}</text>
10
-        	</view>
11
-			</view>
12
-			<view class="cu-item arrow margin-top-xs" @tap="report">
13
-					<text class="cuIcon-notice lg text-gray" style="font-size:18px;"></text>
14
-        	<view class="content margin-left-sm">
15
-          	<text class="text-black">学生综合素质报告</text>
16
-        	</view>
17
-			</view>
18
-		</view>
19
-	</view>
20
-</template>
21
-
22
-<script>
23
-import { _getNotice } from '@/api/auth'
24
-export default {
25
-  data() {
26
-    return {
27
-      list: []
28
-    }
29
-  },
30
-  onLoad() {
31
-    this.get_list()
32
-  },
33
-  methods: {
34
-    report() {
35
-      uni.showToast({ title: '学期末才能领取对应的学生综合素质报告,敬请期待!', icon: 'none', duration: 2000 })
36
-    },
37
-    get_list() {
38
-      _getNotice().then(res => {
39
-        this.list = res.data.notice_data
40
-      })
41
-    }
42
-  }
43
-}
44
-</script>
45
-
46
-<style lang="scss" scoped>
47
-.page{
48
-	height:100vh;
49
-}
50
-</style>
1
+<template>
2
+	<view class="page">
3
+		<cu-custom :isBack="true" title="消息中心"></cu-custom>
4
+		<view class="cu-list box-shadow menu">
5
+		  <view class="cu-item arrow margin-top-xs" v-for="message in list" :key="message.id">
6
+					<text class="cuIcon-notice lg text-gray" style="font-size:18px;"></text>
7
+        	<view class="content margin-left-sm">
8
+						<view>系统通知</view>
9
+          	<text class="text-black">{{message.title}}</text>
10
+        	</view>
11
+			</view>
12
+			<view class="cu-item arrow margin-top-xs" @tap="report">
13
+					<text class="cuIcon-notice lg text-gray" style="font-size:18px;"></text>
14
+        	<view class="content margin-left-sm">
15
+          	<text class="text-black">学生综合素质报告</text>
16
+        	</view>
17
+			</view>
18
+		</view>
19
+	</view>
20
+</template>
21
+
22
+<script>
23
+import { _getNotice } from '@/api/auth'
24
+export default {
25
+  data() {
26
+    return {
27
+      list: []
28
+    }
29
+  },
30
+  onLoad() {
31
+    this.get_list()
32
+  },
33
+  methods: {
34
+    report() {
35
+      uni.showToast({ title: '学期末才能领取对应的学生综合素质报告,敬请期待!', icon: 'none', duration: 2000 })
36
+    },
37
+    get_list() {
38
+      _getNotice().then(res => {
39
+        this.list = res.data.notice_data
40
+      })
41
+    }
42
+  }
43
+}
44
+</script>
45
+
46
+<style lang="scss" scoped>
47
+.page{
48
+	height:100vh;
49
+}
50
+.g-container {
51
+    position: relative;
52
+    margin: auto;
53
+    height: 200px;
54
+    padding-top: 100px;
55
+    filter: contrast(20);
56
+    background-color: #fff;
57
+    overflow: hidden;
58
+    &::before {
59
+        content: "";
60
+        position: absolute;
61
+        top: 0;
62
+        left: 0;
63
+        bottom: 0;
64
+        right: 0;
65
+        backdrop-filter: blur(10px);
66
+        z-index: 1;
67
+    }
68
+}
69
+</style>

+ 8 - 5
src/pages/myStudents/myStudents.vue

@@ -3,7 +3,7 @@
3
 		<cu-custom :isBack="false" :isHome="true">
3
 		<cu-custom :isBack="false" :isHome="true">
4
 			 <view slot="content">我的学生</view>
4
 			 <view slot="content">我的学生</view>
5
 		</cu-custom>
5
 		</cu-custom>
6
-		<scroll-view>
6
+		<view>
7
 			<view class="cu-card case no-card">
7
 			<view class="cu-card case no-card">
8
 				<view class="cu-item shadow">
8
 				<view class="cu-item shadow">
9
 					<view class="image">
9
 					<view class="image">
@@ -12,7 +12,7 @@
12
 					</view>
12
 					</view>
13
 				</view>
13
 				</view>
14
 			</view>
14
 			</view>
15
-			  <view class="cu-card">
15
+				<view class="cu-card">
16
 					 <view class="cu-item shadow">
16
 					 <view class="cu-item shadow">
17
 						  <view class="students-title flex justify-between align-center">
17
 						  <view class="students-title flex justify-between align-center">
18
 								 <view class="text-lg">学生列表</view>
18
 								 <view class="text-lg">学生列表</view>
@@ -27,7 +27,8 @@
27
 								  <text class="text-red text-xs">右侧点击绑定手机号,直接获取绑定学生列表</text>
27
 								  <text class="text-red text-xs">右侧点击绑定手机号,直接获取绑定学生列表</text>
28
 									<text class="cuIcon-mobile text-cyan add-icon margin-left-xl" @tap="globalNavigateTo('bindPhone')"></text>
28
 									<text class="cuIcon-mobile text-cyan add-icon margin-left-xl" @tap="globalNavigateTo('bindPhone')"></text>
29
 							</view>
29
 							</view>
30
-							<view class="cu-list menu-avatar">
30
+							<scroll-view scroll-y :style="[{height:'calc(100vh - 230px - '+ topHeader+'px)'}]">
31
+								<view class="cu-list menu-avatar">
31
 									<view class="cu-item" :class="moveModel=='move-box-'+ index?'move-cur':''"
32
 									<view class="cu-item" :class="moveModel=='move-box-'+ index?'move-cur':''"
32
 									v-for="(item,index) in result.student_data" :key="index"
33
 									v-for="(item,index) in result.student_data" :key="index"
33
 									@touchstart="ListTouchStart" @touchmove="ListTouchMove"
34
 									@touchstart="ListTouchStart" @touchmove="ListTouchMove"
@@ -45,10 +46,11 @@
45
 											<view class="bg-red" @tap.stop="unbind(item.id)">删除</view>
46
 											<view class="bg-red" @tap.stop="unbind(item.id)">删除</view>
46
 										</view>
47
 										</view>
47
 									</view>
48
 									</view>
48
-							</view>
49
+								</view>
50
+							</scroll-view>
49
 					 </view>
51
 					 </view>
50
 				</view>
52
 				</view>
51
-		</scroll-view>
53
+		</view>
52
 		<!-- 选择学生列表 -->
54
 		<!-- 选择学生列表 -->
53
 		<view class="cu-modal" :class="modalName=='showStudents'?'show':''" @tap="hideModal">
55
 		<view class="cu-modal" :class="modalName=='showStudents'?'show':''" @tap="hideModal">
54
 			<view class="cu-dialog bg-student" @tap.stop=''>
56
 			<view class="cu-dialog bg-student" @tap.stop=''>
@@ -100,6 +102,7 @@ export default {
100
   data() {
102
   data() {
101
     return {
103
     return {
102
       showAdd: false,
104
       showAdd: false,
105
+      topHeader: this.globalCustomBarHeight,
103
       modalName: null,
106
       modalName: null,
104
       selectKid: 0,
107
       selectKid: 0,
105
       student: {
108
       student: {

+ 22 - 10
src/pages/order/index.vue

@@ -16,7 +16,7 @@
16
 		 :refresher-triggered="triggered"
16
 		 :refresher-triggered="triggered"
17
 		@refresherrefresh="onRefresh" @scrolltolower="loadMore">
17
 		@refresherrefresh="onRefresh" @scrolltolower="loadMore">
18
 			<view class="list" v-if="params.type<7">
18
 			<view class="list" v-if="params.type<7">
19
-				<view class="cu-card margin-top margin-bottom shadow" v-for="(item,index) in list" :key="index">
19
+				<view class="cu-card margin-top margin-bottom shadow" v-for="(item,index) in orders" :key="index">
20
 					<view class="cu-item">
20
 					<view class="cu-item">
21
 						<view class="card-header flex justify-between solid-bottom">
21
 						<view class="card-header flex justify-between solid-bottom">
22
 							<view>{{index}}</view>
22
 							<view>{{index}}</view>
@@ -29,8 +29,10 @@
29
 									<view class="card-left">
29
 									<view class="card-left">
30
 										<img mode="scaleToFill" :src="course.image" alt="" class="card-image">
30
 										<img mode="scaleToFill" :src="course.image" alt="" class="card-image">
31
 									</view>
31
 									</view>
32
-									<view class="card-right flex-sub margin-left-sm">
33
-										<view class="card-title">{{course.name}}</view>
32
+									<view class="card-right flex-sub margin-left-sm text-sm">
33
+										<view class="card-title">
34
+											<text>{{course.name}}</text>
35
+										</view>
34
 										<view class="card-item margin-top-xs">
36
 										<view class="card-item margin-top-xs">
35
 											<text class="card-label">时间:</text>
37
 											<text class="card-label">时间:</text>
36
 											<text class="card-text">{{course.attend_day}}</text>
38
 											<text class="card-text">{{course.attend_day}}</text>
@@ -47,6 +49,9 @@
47
 											<text class="card-label">老师:</text>
49
 											<text class="card-label">老师:</text>
48
 											<text class="card-text">{{course.teacher||'--'}}</text>
50
 											<text class="card-text">{{course.teacher||'--'}}</text>
49
 										</view>
51
 										</view>
52
+										<view class="card-item margin-top-xs" v-if="dropStatus.includes(item.status)&&course.is_return===1">
53
+											<view class="text-student text-right">{{course.return_status}}</view>
54
+										</view>
50
 									</view>
55
 									</view>
51
 								</view>
56
 								</view>
52
 								<view class="flex card-footer solid-bottom padding-bottom-xs">
57
 								<view class="flex card-footer solid-bottom padding-bottom-xs">
@@ -54,9 +59,9 @@
54
 												<text class="card-label">{{prop.name}}:</text><text class="text-price">{{prop.money}}</text>
59
 												<text class="card-label">{{prop.name}}:</text><text class="text-price">{{prop.money}}</text>
55
 											</view>
60
 											</view>
56
 								</view>
61
 								</view>
57
-								<view class="card-bottom flex justify-end">
62
+								<view class="card-bottom flex justify-end margin-top-xs">
58
 										<button @tap="dropCourse(course.order_info_id)" class="cu-btn round bg-student text-white" v-if="dropStatus.includes(item.status)&&course.is_return===0">退课</button>
63
 										<button @tap="dropCourse(course.order_info_id)" class="cu-btn round bg-student text-white" v-if="dropStatus.includes(item.status)&&course.is_return===0">退课</button>
59
-										<button @tap="droping" class="cu-btn round sm line-cyan" v-if="dropStatus.includes(item.status)&&course.is_return===1">退课中</button>
64
+										<!-- <button @tap="droping" class="cu-btn round sm line-cyan" v-if="dropStatus.includes(item.status)&&course.is_return===1">退课中</button> -->
60
 								</view>
65
 								</view>
61
 						</view>
66
 						</view>
62
 						<view class="card-bottom margin-top-xs flex justify-between">
67
 						<view class="card-bottom margin-top-xs flex justify-between">
@@ -75,7 +80,7 @@
75
 				<view class="cu-card margin-top margin-bottom shadow" v-for="(item,index) in list" :key="index">
80
 				<view class="cu-card margin-top margin-bottom shadow" v-for="(item,index) in list" :key="index">
76
 						<view class="cu-item">
81
 						<view class="cu-item">
77
 								<view class="card-header flex justify-between solid-bottom">
82
 								<view class="card-header flex justify-between solid-bottom">
78
-								 <view>{{item.code}}</view>
83
+								 <view>{{item.refund_code}}</view>
79
 								 <view class="text-student course-status">
84
 								 <view class="text-student course-status">
80
 									  {{item.status|dropStatus}}
85
 									  {{item.status|dropStatus}}
81
 								 </view>
86
 								 </view>
@@ -84,7 +89,7 @@
84
 									<view class="card-left">
89
 									<view class="card-left">
85
 										<img mode="scaleToFill" :src="item.image" alt="" class="card-image">
90
 										<img mode="scaleToFill" :src="item.image" alt="" class="card-image">
86
 									</view>
91
 									</view>
87
-									<view class="card-right flex-sub margin-left-sm">
92
+									<view class="card-right flex-sub margin-left-sm text-sm">
88
 										<view class="card-title">{{item.name}}</view>
93
 										<view class="card-title">{{item.name}}</view>
89
 										<view class="card-item margin-top-xs">
94
 										<view class="card-item margin-top-xs">
90
 											<text class="card-label">时间:</text>
95
 											<text class="card-label">时间:</text>
@@ -102,6 +107,10 @@
102
 											<text class="card-label">老师:</text>
107
 											<text class="card-label">老师:</text>
103
 											<text class="card-text">{{item.teacher||'--'}}</text>
108
 											<text class="card-text">{{item.teacher||'--'}}</text>
104
 										</view>
109
 										</view>
110
+										<view class="card-item margin-top-xs">
111
+											<text class="card-label">订单:</text>
112
+											<text class="card-text">{{item.code}}</text>
113
+										</view>
105
 									</view>
114
 									</view>
106
 							</view>
115
 							</view>
107
 							<view class="flex card-footer padding-bottom-xs">
116
 							<view class="flex card-footer padding-bottom-xs">
@@ -120,6 +129,7 @@
120
 <script>
129
 <script>
121
 import { _orderCenter, _dropList, _payOrder, _dropCourse, _cancelOrder } from '@/api/course'
130
 import { _orderCenter, _dropList, _payOrder, _dropCourse, _cancelOrder } from '@/api/course'
122
 import swiperTab from '@/components/swiper-tab.vue'
131
 import swiperTab from '@/components/swiper-tab.vue'
132
+import { deepClone } from '@/common/utils'
123
 import { mapGetters } from 'vuex'
133
 import { mapGetters } from 'vuex'
124
 export default {
134
 export default {
125
   components: {
135
   components: {
@@ -136,7 +146,8 @@ export default {
136
       payurl: '',
146
       payurl: '',
137
       menuList: ['全部订单', '待付款', '已付款', '退课售后'],
147
       menuList: ['全部订单', '待付款', '已付款', '退课售后'],
138
       currentIndex: 0,
148
       currentIndex: 0,
139
-      list: [],
149
+      list: [], // 退课订单
150
+      orders: {}, // 订单
140
       dropStatus: [1],
151
       dropStatus: [1],
141
       orderTypes: {
152
       orderTypes: {
142
         0: 5,
153
         0: 5,
@@ -227,10 +238,10 @@ export default {
227
       _orderCenter(this.params).then(res => {
238
       _orderCenter(this.params).then(res => {
228
         if (this.params.page > 1) {
239
         if (this.params.page > 1) {
229
           if (Object.keys(res.data).length < this.page_size) this.noMore = true
240
           if (Object.keys(res.data).length < this.page_size) this.noMore = true
230
-          this.list = Object.assign({}, this.list, res.data)
241
+          this.orders = Object.assign({}, this.orders, res.data)
231
         } else {
242
         } else {
232
           this.noMore = false
243
           this.noMore = false
233
-          this.list = res.data
244
+          this.orders = res.data
234
         }
245
         }
235
       })
246
       })
236
     },
247
     },
@@ -337,6 +348,7 @@ export default {
337
       })
348
       })
338
     },
349
     },
339
     changeTab(index) {
350
     changeTab(index) {
351
+      this.orders = {}
340
       this.params.page = 1
352
       this.params.page = 1
341
       this.currentIndex = index
353
       this.currentIndex = index
342
       this.params.type = this.orderTypes[index]
354
       this.params.type = this.orderTypes[index]

+ 4 - 3
src/pages/studentcenter/index.vue

@@ -92,7 +92,7 @@
92
 											<button class="cu-btn round line-cyan button-hover" @tap="classOperation(mark.class_plan_id)">
92
 											<button class="cu-btn round line-cyan button-hover" @tap="classOperation(mark.class_plan_id)">
93
 												{{mark.status==-1?'查看':'去上课'}}
93
 												{{mark.status==-1?'查看':'去上课'}}
94
 											</button>
94
 											</button>
95
-											<button class="cu-btn round line-red button-hover margin-left" @tap="askLeave(mark.class_plan_id)">去请假</button>
95
+											<button class="cu-btn round line-red button-hover margin-left" @tap="askLeave(mark.class_plan_id)" v-if="mark.status!==-1">去请假</button>
96
 										</view>
96
 										</view>
97
 									</view>
97
 									</view>
98
 								</view>
98
 								</view>
@@ -123,7 +123,7 @@
123
 									</view>
123
 									</view>
124
 									<view class="card-right margin-left-sm">
124
 									<view class="card-right margin-left-sm">
125
 										<view class="card-title">{{item.attend_name}}</view>
125
 										<view class="card-title">{{item.attend_name}}</view>
126
-										<view class="card-item margin-top-xs" >
126
+										<view class="card-item margin-top-xs">
127
 											<text class="card-label">机构:</text>
127
 											<text class="card-label">机构:</text>
128
 										 	<text class="card-text">{{item.agency_name||'-'}}</text>
128
 										 	<text class="card-text">{{item.agency_name||'-'}}</text>
129
 									  </view>
129
 									  </view>
@@ -146,7 +146,7 @@
146
 import NP from 'number-precision'
146
 import NP from 'number-precision'
147
 import calendar from '@/components/calendar.vue'
147
 import calendar from '@/components/calendar.vue'
148
 import { _nowCourse, _courseHistory, _attendance, _dateCourse } from '@/api/course'
148
 import { _nowCourse, _courseHistory, _attendance, _dateCourse } from '@/api/course'
149
-import { getDate } from '@/common/utils'
149
+import { getDate, deepClone } from '@/common/utils'
150
 import swiperTab from '@/components/swiper-tab.vue'
150
 import swiperTab from '@/components/swiper-tab.vue'
151
 export default {
151
 export default {
152
   components: {
152
   components: {
@@ -248,6 +248,7 @@ export default {
248
     },
248
     },
249
     chooseDay(day) {
249
     chooseDay(day) {
250
       this.classList = this.courses.filter(item => item.date.replace(/-/g, '') === day)// 匹配当天数据
250
       this.classList = this.courses.filter(item => item.date.replace(/-/g, '') === day)// 匹配当天数据
251
+      this.classList = this.classList.length > 0 ? this.classList : deepClone(this.courses)
251
     },
252
     },
252
     get_course() {
253
     get_course() {
253
       _nowCourse({ page_num: this.page_num }).then(res => {
254
       _nowCourse({ page_num: this.page_num }).then(res => {