| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191 |
- <template>
- <view class="page">
- <!-- 头部 -->
- <view class="head">
- <view class="location">
- 评价信箱
- <image class="loc" src="../../static/letter.svg" mode=""></image>
- </view>
- </view>
- <!-- 订单 -->
- <view class="main u-flex-y">
- <view class="content-list" v-for="(item, index) in feedbackList" :key="index">
- <text class="num">订单号:{{ item.orderId }}</text>
- <view class="list">
- <view class="">故障类型:{{ item.repairsFault.faultName }}</view>
- <view class="p">来自 {{ item.repairsStudent.dormNumber }} 的评价:</view>
- <view class="text">
- {{ item.orderAdvice }}
- </view>
- </view>
- </view>
- <view class="isOver">----我是有底线的----</view>
- <!-- <view class="isOver" v-if="flag">
- ----我是有底线的----
- </view> -->
- <!-- <view class="isOver" v-if="feedbackList.length==0">
- ----暂无评价----
- </view> -->
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- feedbackList: [],
- pageNum: 1,
- pageSize: 4,
- total: '',
- flag: false,
- }
- },
- onLoad() {
- this.getfeedback()
- },
- methods: {
- // 获取评价列表数据
- async getfeedback() {
- let res = await this.$myRequest({
- method: 'post',
- url: `/order/queryAllOrderByUserAdvice?pageNum=${this.pageNum}&pageSize=${this.pageSize}`,
- })
- // console.log(res)
- if (res.status == 200) {
- this.total = res.data.total
- this.feedbackList = [...this.feedbackList, ...res.data.list]
- uni.hideLoading()
- } else {
- uni.hideLoading()
- }
- },
- // 下拉页面刷新函数
- onPullDownRefresh() {
- this.flag = false
- this.feedbackList = []
- this.pageNum = 1
- this.getfeedback()
- setTimeout(() => {
- uni.stopPullDownRefresh()
- }, 1000)
- },
- // 上拉触底加载更多数据
- onReachBottom() {
- if (this.feedbackList.length < this.total) {
- uni.showLoading({
- title: '数据加载中',
- })
- this.pageNum++
- this.getfeedback()
- } else {
- this.flag = true
- }
- },
- },
- }
- </script>
- <style scoped>
- template {
- position: relative;
- }
- .page {
- height: 100vh;
- }
- .main {
- position: fixed;
- top: 130rpx;
- left: 50%;
- align-items: center;
- width: 720rpx;
- height: 100vh;
- padding: 20rpx;
- background: #fff;
- transform: translateX(-360rpx);
- overflow: scroll;
- }
- .head {
- height: 300rpx;
- border-radius: 0rpx 0rpx 20rpx 20rpx;
- background-color: rgba(42, 130, 228, 1);
- }
- .head .location {
- padding-top: 36rpx;
- font-size: 30rpx;
- font-weight: bold;
- text-align: center;
- color: rgba(255, 255, 255, 1);
- }
- .loc {
- width: 40rpx;
- height: 40rpx;
- font-size: 42rpx;
- vertical-align: middle;
- }
- .num {
- float: left;
- margin-left: 20rpx;
- margin-top: 18rpx;
- font-size: 22rpx;
- font-weight: 700;
- color: rgba(42, 130, 228, 1);
- }
- .got {
- float: right;
- margin-top: 18rpx;
- margin-right: 18rpx;
- color: rgba(212, 48, 48, 1);
- }
- .list {
- float: left;
- margin-left: 42rpx;
- margin-top: 18rpx;
- font-size: 22rpx;
- color: rgba(80, 80, 80, 1);
- }
- .p {
- margin-top: 16rpx;
- }
- .list .text {
- width: 484rpx;
- height: 108rpx;
- margin-top: 30rpx;
- /* margin-left: 50rpx; */
- text-align: center;
- line-height: 108rpx;
- background-color: rgba(255, 255, 255, 1);
- }
- .content-list {
- width: 700rpx;
- height: 500rpx;
- /* float: left; */
- /* margin-left: 16rpx; */
- margin-top: 22rpx;
- border-radius: 28rpx 28rpx 0rpx 0rpx;
- background-color: rgba(229, 229, 229, 1);
- }
- .isOver {
- display: block;
- width: 100%;
- height: 120rpx;
- line-height: 120rpx;
- text-align: center;
- font-size: 28rpx;
- color: rgba(80, 80, 80, 0.27);
- }
- </style>
|