sq_list_tel.vue
4.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
<template>
<view class="wrap_box">
<!-- <uParse v-if="datas" :content="datas"></uParse> -->
<view class="sq_list">
<view class="sq_li" v-for="(item,index) in datas" @click="$service.jump" :data-url="'/pagesStu/sq_xq_tel/sq_xq_tel?id='+item.id">
<view class="sq_type">{{item.status_type==1?'整天申请':'时段申请'}}</view>
<view class="sq_time">{{item.start_time}}</view>
<view class="sq_time1">
<view class="">
申请时间:{{item.create_time}}
</view>
<view v-if="item.examine==1">
待审核
</view>
<view v-else-if="item.examine==2">
审核通过
</view>
<view v-else>
未通过
</view>
</view>
</view>
<u-empty v-if="datas.length==0"
mode="data"
text="暂无数据"
icon="/static/images/tch/img_blank.png"
>
</u-empty>
</view>
<!-- 阻止滑动 -->
<!-- <view @touchmove.stop.prevent='test'></view> -->
</view>
</template>
<script>
import Vue from 'vue'
import {
mapState,
mapMutations
} from 'vuex'
var that
export default {
data() {
return {
options:'',
datas:[],
page:1
}
},
computed: {
...mapState(['hasLogin', 'forcedLogin', 'userName', 'userinfo','nowtime']),
},
onLoad(e) {
that=this
that.options=e||{}
console.log(e)
that.onRetry()
// that.getdata()
},
onShow() {
},
methods: {
// ...mapMutations(['wxshouquan','login']),
test(){},
onRetry(){
that.page=1
that.getdata()
},
getdata(){
var datas={
page: that.page,
limit:20
}
var jkurl='/my/nophone'
if (that.btnkg == 1) {
return
} else {
that.btnkg = 1
}
var page_now=that.page
that.$service.P_post(jkurl, datas).then(res => {
that.btnkg = 0
console.log(res)
if (res.code == 1) {
that.htmlReset = 0
var datas = res.data
console.log(typeof datas)
if (typeof datas == 'string') {
datas = JSON.parse(datas)
}
console.log(res)
if (page_now == 1) {
that.datas = datas.data
} else {
if (datas.data.length == 0) {
that.data_last = true
return
}
that.data_last = false
that.datas = that.datas.concat(datas.data)
}
that.allnum=datas.allnum
that.page++
} else {
if (res.msg) {
uni.showToast({
icon: 'none',
title: res.msg
})
} else {
uni.showToast({
icon: 'none',
title: '获取数据失败'
})
}
}
}).catch(e => {
that.htmlReset = 1
that.btnkg = 0
// that.$refs.htmlLoading.htmlReset_fuc(1)
console.log(e)
uni.showToast({
icon: 'none',
title: '获取数据失败,请检查您的网络连接'
})
})
},
getimg(img){
return service.getimg(img)
},
jump(e) {
var that = this
if (that.btnkg == 1) {
return
} else {
that.btnkg = 1
setTimeout(function() {
that.btnkg = 0
}, 2000)
}
console.log(e.currentTarget.dataset.type)
service.jump(e)
},
goback(){
uni.navigateBack()
},
func(){
// that.$store.commit('setSystem',datas.system)
}
}
}
</script>
<style lang="scss" scoped>
.wrap_box{
width: 100%;
// padding: 30rpx;
min-height: 100vh;
// #ifdef H5
min-height: calc(100vh - 44px);
// #endif
background: #F8F8F8;
}
.sq_list{
width: 100%;
padding: 30rpx;
.sq_li{
width: 100%;
padding: 20rpx 30rpx;
background: #fff;
border-radius: 12rpx;
box-shadow: 0px 8rpx 18rpx 3rpx rgba(68,128,255,0.0600);
&+.sq_li{
margin-top: 20rpx;
}
.sq_type{
font-size: 32rpx;
color: #333;
font-weight: bold;
display: flex;
align-items: center;
&:before{
content: '';
display: block;
width: 8rpx;
height: 30rpx;
background: #2D81FF;
margin-right: 10rpx;
}
}
.sq_time{
font-size: 28rpx;
color: #333;
margin-top: 20rpx;
}
.sq_time1{
margin-top: 20rpx;
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 26rpx;
color: #999;
}
}
}
</style>