123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285 |
- <template>
- <view class="content">
- <!-- 列表 -->
- <view class="itemContent">
- <view v-for="(item,index) in itemData" :key="index">
- <view class="item">
- <view class="leftView">
- <image :src='item.HeadUrl' v-if="item.HeadUrl" class="storeImg"></image>
- <image src="../../static/img/pic_def_ava.png" mode="" class="storeImg" v-else></image>
- </view>
- <view class="rightView">
- <!-- 第一行 -->
- <view class="firstView">
- <view class="shopName">{{item.Evaluator}}</view>
- <view class="time">{{item.CreateTime.slice(0,item.CreateTime.length-8)}}</view>
-
- </view>
- <!-- 第2行 -->
- <view class="secondView" v-if="item.scoreState==1">
- <!-- 星星 -->
- <uni-rate :value="item.Overallevaluation" :max="5" color="#EEEEEE" active-color="#FF4F00"
- :size="16" :margin="4" :readonly="true" />
-
- </view>
-
- <view class="thirdView" v-if="item.scoreState==1">
- <view class="count">服务态度:{{item.Serviceevaluation}}</view>
- <view class="count">施工质量:{{item.Constructionevaluation}}</view>
- <view class="count">店面环境:{{item.Storeevaluation}}</view>
- </view>
- <view class="contentMes">{{item.EContent}}</view>
- <!-- 照片 -->
- <view class="imgBg">
- <view v-for="(itemImg,indexImg) in item.imgs" :key="indexImg">
- <image :src="itemImg.imageUrl" class="img"
- @click="previewImage(itemImg.imageUrl,item.imgs)"></image>
- </view>
- </view>
- <!-- 商家回复 -->
- <view class="writeBack" v-if="item.ReplyContent">商家回复:{{item.ReplyContent}}</view>
- </view>
- </view>
- </view>
- </view>
- <!-- 上拉 加载更多 -->
- <view class="noMore" v-if="noMoreShow">没有更多数据</view>
- <!-- 无数据空白页 -->
- <nodata v-if="itemData.length==0"></nodata>
- </view>
- </template>
- <script>
- import nodata from '../../components/nodata/nodata.vue'
- export default {
- components: {
- nodata,
- },
- data() {
- return {
- itemData: [],
- page: 1,
- noMoreShow: false,
- imgArr: [],
- shopId:'',
- }
- },
- onLoad(opt) {
- this.page = 1
- this.shopId = opt.shopId
- this.getItemData()
- },
- methods: {
- previewImage(img, arrDic) {
- var arr = [];
- arrDic.forEach(item => {
- arr.push(item.imageUrl)
- })
- // 预览图片
- uni.previewImage({
- urls: arr,
- current: img,
- longPressActions: {
- itemList: ['发送给朋友', '保存图片', '收藏'],
- success: function(data) {
- console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
- },
- fail: function(err) {
- console.log(err.errMsg);
- }
- }
- });
- },
-
- getItemData() {
- uni.showLoading({
- title: '加载中'
- })
- let url = 'worldKeepCar/worldHome/listShopTMEvaluatePage',
- params = {
- page: this.page,
- limit: 20,
- shopId:this.shopId,
- }
- this.$http(url, params, 'GET').then(res => {
- uni.hideLoading();
- var list = res.data.Items
- // 处理 undefined和null转为空白字符串
- list.forEach((item, index) => {
- for (const key in item) {
- item[key] = this.$praseStrEmpty(item[key])
- }
- })
- if (this.page == 1) {
- this.itemData = list
- } else {
- this.itemData = this.itemData.concat(list)
- }
- if (list.length < 10) {
- this.noMoreShow = true
- } else {
- this.noMoreShow = false
- }
- })
- },
- },
- // 下拉刷新 上拉加载更多
- onPullDownRefresh() {
- this.page = 1
- this.getItemData()
- setTimeout(function() {
- uni.stopPullDownRefresh();
- }, 1000);
- },
- onReachBottom() {
- this.page++;
- this.getItemData()
- },
- }
- </script>
- <style scoped>
- .content {
- background: #FFFFFF;
- min-height: 100vh;
- }
- .item {
- display: flex;
- justify-content: flex-start;
- padding: 0 24rpx;
- background-color: #FFFFFF;
- }
- .leftView {
- width: 117rpx;
- padding-right: 20rpx;
- }
- .storeImg {
- width: 72rpx;
- height: 72rpx;
- border-radius: 8rpx;
- margin-top: 30rpx;
- }
- .rightView {
- border-bottom: 1rpx #EEEEEE solid;
- width: 100vw;
- }
- .firstView,
- .secondView {
- display: flex;
- justify-content: space-between;
- align-items: center;
- }
- .firstView {
- padding-top: 30rpx;
- }
- .secondView {
- padding-top: 12rpx;
- padding-bottom: 20rpx;
- }
- .shopName {
- /* padding-top: 30rpx;
- padding-bottom: 10rpx; */
- font-size: 26rpx;
- font-weight: bold;
- color: #333333;
- }
- .time {
- font-size: 26rpx;
- color: #999999;
- }
-
- .deleteBtn {
- width: 36rpx;
- height: 36rpx;
- }
-
- .thirdView{
- display: flex;
- justify-content: flex-start;
- padding-top: 10rpx;
- padding-bottom: 20rpx;
- }
- .count{
- font-size: 24rpx;
- color: #999999;
- margin-right: 20rpx;
- }
- .contentMes {
- font-size: 26rpx;
- color: #666666;
- line-height: 37rpx;
- /* padding-top: 20rpx; */
- }
- .imgBg {
- display: flex;
- justify-content: flex-start;
- padding: 30rpx 0rpx;
- flex-wrap: wrap;
- }
- .img {
- width: 140rpx;
- height: 140rpx;
- margin-right: 5rpx;
- border-radius: 8rpx;
- }
- .writeBack {
- font-size: 26rpx;
- color: #666666;
- line-height: 37rpx;
- padding: 20rpx;
- background-color: #F4F5F7;
-
- padding-bottom: 20rpx;
- }
- .noMore {
- text-align: center;
- line-height: 50rpx;
- color: #999999;
- font-size: 28rpx;
- }
- </style>
|