2020-06-12 18:05:39 +08:00
|
|
|
<template>
|
|
|
|
<view class="complaint">
|
2020-07-30 19:49:12 +08:00
|
|
|
<view class="complaint-item" v-for="(item, index) in list" :key="index" @click="toDetailsPage(item.complain_id)">
|
|
|
|
<ComplaintItem :info="item"></ComplaintItem>
|
2020-06-12 18:05:39 +08:00
|
|
|
</view>
|
2020-07-30 10:12:27 +08:00
|
|
|
<u-toast ref="uToast" />
|
2020-06-12 18:05:39 +08:00
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
import ComplaintItem from '@/components/complaint-item/index'
|
|
|
|
export default {
|
|
|
|
data() {
|
2020-07-30 19:49:12 +08:00
|
|
|
return {
|
|
|
|
list:[]
|
|
|
|
}
|
2020-06-12 18:05:39 +08:00
|
|
|
},
|
|
|
|
components: {
|
|
|
|
ComplaintItem
|
2020-06-13 17:36:24 +08:00
|
|
|
},
|
2020-07-30 19:49:12 +08:00
|
|
|
onLoad() {
|
|
|
|
this.getlist()
|
|
|
|
},
|
2020-06-13 17:36:24 +08:00
|
|
|
methods: {
|
2020-07-30 19:49:12 +08:00
|
|
|
// 获取投诉列表
|
|
|
|
getlist(){
|
|
|
|
this.$u.api.reportlist({}).then(res => {
|
|
|
|
console.log(res)
|
|
|
|
if (res.errCode != 0) {
|
|
|
|
this.$refs.uToast.show({
|
|
|
|
title: res.message,
|
|
|
|
type: 'error'
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
let arr = res.data.dataList
|
|
|
|
for(let index in arr){
|
|
|
|
this.list.push(arr[index])
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
toDetailsPage(id) {
|
2020-06-13 17:36:24 +08:00
|
|
|
uni.navigateTo({
|
2020-07-30 19:49:12 +08:00
|
|
|
url: '/pages/user/complaintDetails?id='+id
|
2020-06-13 17:36:24 +08:00
|
|
|
});
|
|
|
|
}
|
|
|
|
},
|
2020-06-12 18:05:39 +08:00
|
|
|
};
|
|
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.complaint {
|
|
|
|
min-height: calc(100vh - var(--window-top));
|
|
|
|
background-color: #ECECEC;
|
|
|
|
padding: 20rpx 30rpx;
|
|
|
|
}
|
|
|
|
</style>
|