This commit is contained in:
闫世杰 2023-08-04 11:32:26 +08:00
parent 42ecbb5beb
commit 2b63a06256
1 changed files with 99 additions and 236 deletions

View File

@ -29,7 +29,7 @@
<view v-if="tabNum == 1">
<view class="art_act_itm" v-for="(item, i) in issueList" :key="i">
<image
:src="item.photos.split(',')[0]"
:src="onPhoto(item.photos)"
alt="图片加载错误"
mode=""
@click="goActDeat(item.id, 1)"
@ -58,7 +58,7 @@
</view> -->
<view class="tag_sta_end" v-if="item.state == '1'"> 待评价 </view>
<view class="tag_sta_end" v-if="item.state == '0'">
图片待上传
待上传图片
</view>
</view>
<view class="act_time">
@ -82,7 +82,7 @@
>
</u-button>
</view>
<view
<!-- <view
style="width: 236rpx; margin: 0 10rpx"
v-if="item.state == '1'"
@click="done(item.id)"
@ -92,8 +92,8 @@
shape="circle"
text="确认完成"
></u-button>
</view>
<view
</view> -->
<!-- <view
style="width: 236rpx; margin: 0 10rpx"
@click="undone(item.id)"
v-if="item.state != '2' && item.state != '3'"
@ -103,7 +103,7 @@
shape="circle"
text="未完成"
></u-button>
</view>
</view> -->
<view
style="width: 236rpx; margin: 0 10rpx"
v-if="item.state == '0'"
@ -119,14 +119,14 @@
</view>
<view
style="width: 190rpx; margin: 0 10rpx"
v-if="item.state == '2'"
v-if="item.state == '1'"
>
<u-button
plain
color="#99241B"
shape="circle"
text="评价"
@click="pingjia(i, item.id)"
@click="pingjia(item.id)"
>
</u-button>
</view>
@ -265,22 +265,20 @@
</view>
</view>
</u-popup>
<u-modal :show="show" @close="close()" :closeOnClickOverlay="true">
<!-- 评价 -->
<u-modal
:show="show"
title="评价"
@close="close()"
:closeOnClickOverlay="true"
>
<view class="pinContent">
<view class="pinContent_itm" v-for="(v, i) in baomingpingjia" :key="i">
<view class="pinContent_avator">
<!-- <image class="pinContent_avator_img" src="../../static/MyBg.png" mode=""></image> -->
<image class="pinContent_avator_img" :src="v.image" mode=""></image>
<view class="pinContent_Time">
<text style="font-size: 24rpx; font-weight: 600">{{
v.userName
}}</text>
</view>
</view>
<view class="pinContent_rate">
<u-rate count="5" v-model="v.evaluate"></u-rate>
</view>
</view>
<textarea
cols="30"
rows="10"
v-model="evaluate"
placeholder="请输入评价..."
></textarea>
</view>
<view
slot="confirmButton"
@ -291,7 +289,7 @@
color="#99241B"
shape="circle"
text="提交"
@click="subEvalue(baomingpingjia)"
@click="onSubmit()"
></u-button>
</view>
</view>
@ -345,10 +343,13 @@ export default {
starsvalue: 0,
page: 1,
size: 20,
current: null,
isAdmin: null, //
isVillageAdmin: null, //
issueList: [],
receivingList: [],
evaluate: "",
id: "",
};
},
onShow() {
@ -366,8 +367,10 @@ export default {
},
//
onReachBottom() {
this.page++;
this.moreOrder();
if (this.current > this.page) {
this.page++;
this.moreOrder();
}
},
methods: {
clickTab(num) {
@ -375,19 +378,23 @@ export default {
this.tabNum = num;
this.page = 1;
if (num == 1) {
let that = this;
this.myPosts();
} else if (num == 2) {
let that = this;
this.myArtCountryside();
}
},
myArtCountryside() {
let obj = {
page: this.page,
size: this.size,
};
this.http
.request("/artCountryside/myArtCountryside", {}, "GET")
.request("/artCountryside/myArtCountryside", obj, "GET")
.then((res) => {
if (res.code == 200) {
this.receivingList = res.data.records;
this.receivingList = [...this.receivingList, ...res.data.records];
this.page = res.data.current;
this.current = res.data.current;
}
})
.catch((err) => {
@ -398,11 +405,17 @@ export default {
});
},
myPosts() {
let obj = {
page: this.page,
size: this.size,
};
this.http
.request("/artCountryside/myPosts", {}, "GET")
.request("/artCountryside/myPosts", obj, "GET")
.then((res) => {
if (res.code == 200) {
this.issueList = res.data.records;
this.issueList = [...this.issueList, ...res.data.records];
this.page = res.data.current;
this.current = res.data.current;
}
})
.catch((err) => {
@ -416,6 +429,14 @@ export default {
let date = new Date(time);
return date.toLocaleString();
},
onPhoto(photo) {
let src = "";
if (photo) {
let list = photo.split(",");
src = list[0];
}
return src;
},
toUpimgPage(id) {
uni.navigateTo({
url: `/pagesD/xxgl/upload?id=${id}`,
@ -439,6 +460,46 @@ export default {
closeS() {
this.showS = false;
},
pingjia(id) {
this.id = id;
this.show = true;
},
onSubmit() {
let obj
this.http
.request(
"/artCountryside/evaluate",
{ id: this.id, evaluate: this.evaluate },
"POST"
)
.then((res) => {
if (res.code == 200) {
uni.showToast({
title: err.data.message,
icon: "none",
});
} else {
uni.showToast({
title: err.data.message,
icon: "none",
});
}
})
.catch((err) => {
uni.showToast({
title: err.data.message,
icon: "none",
});
});
// this.show = false;
},
moreOrder() {
if (this.tabNum == 1) {
this.myPosts();
} else if (this.tabNum == 2) {
this.myArtCountryside();
}
},
// receiveevlaue(id) {
// this.showShoudao = true;
// this.http
@ -471,25 +532,8 @@ export default {
// });
// });
// },
// pingjia(num, id) {
// this.show = true;
// this.pingjiaobj = this.orderList[num];
// let that = this;
// this.http
// .request("/hallUser/pjList?hallId=" + id, {}, "GET")
// .then((res) => {
// if (res.code == 200) {
// console.log("reg", res.data);
// this.baomingpingjia = res.data;
// }
// })
// .catch((e) => {
// uni.showToast({
// title: e.data.message,
// icon: "none",
// });
// });
// },
//
// cancleBM(id) {
// let that = this;
// this.http
@ -510,135 +554,7 @@ export default {
// });
// });
// },
// moreOrder() {
// if (this.tabNum == 1) {
// let that = this;
// this.http
// .request(
// "/hallUser/ddgl",
// { page: this.page, size: this.size },
// "GET"
// )
// .then((res) => {
// if (res.code == 200) {
// if (res.data.records.length > 0) {
// res.data.records.forEach(function (item) {
// if (item.enclosure) {
// let fileArr = item.enclosure.split(",");
// let gs = fileArr[0].substr(fileArr[0].lastIndexOf(".") + 1);
// if (
// gs == "jpg" ||
// gs == "jpeg" ||
// gs == "png" ||
// gs == "bmp" ||
// gs == "gif" ||
// gs == "tif" ||
// gs == "tiff"
// ) {
// item.enclosure = fileArr[0];
// } else if (gs == "pdf") {
// item.enclosure = "../../static/fileImg/pdfB.png";
// }
// }
// that.orderList.push(item);
// });
// } else if (res.data.records.length == 0) {
// this.page--;
// }
// }
// })
// .catch((e) => {
// uni.showToast({
// title: e.data.message,
// icon: "none",
// });
// });
// } else if (this.tabNum == 2) {
// let that = this;
// this.http
// .request(
// "/hallUser/myHall",
// { page: this.page, size: this.size },
// "GET"
// )
// .then((res) => {
// if (res.code == 200) {
// if (res.data.records.length > 0) {
// res.data.records.forEach(function (item) {
// if (item.enclosure) {
// let fileArr = item.enclosure.split(",");
// let gs = fileArr[0].substr(fileArr[0].lastIndexOf(".") + 1);
// if (
// gs == "jpg" ||
// gs == "jpeg" ||
// gs == "png" ||
// gs == "bmp" ||
// gs == "gif" ||
// gs == "tif" ||
// gs == "tiff"
// ) {
// item.enclosure = fileArr[0];
// } else if (gs == "pdf") {
// item.enclosure = "../../static/fileImg/pdfB.png";
// }
// }
// that.orderList.push(item);
// });
// } else if (res.data.records.length == 0) {
// this.page--;
// }
// }
// })
// .catch((e) => {
// uni.showToast({
// title: e.data.message,
// icon: "none",
// });
// });
// } else if (this.tabNum == 3) {
// let that = this;
// this.http
// .request(
// "/hallUser/myHall?state=2",
// { page: this.page, size: this.size },
// "GET"
// )
// .then((res) => {
// if (res.code == 200) {
// if (res.data.records.length > 0) {
// res.data.records.forEach(function (item) {
// if (item.enclosure) {
// let fileArr = item.enclosure.split(",");
// let gs = fileArr[0].substr(fileArr[0].lastIndexOf(".") + 1);
// if (
// gs == "jpg" ||
// gs == "jpeg" ||
// gs == "png" ||
// gs == "bmp" ||
// gs == "gif" ||
// gs == "tif" ||
// gs == "tiff"
// ) {
// item.enclosure = fileArr[0];
// } else if (gs == "pdf") {
// item.enclosure = "../../static/fileImg/pdfB.png";
// }
// }
// that.orderList.push(item);
// });
// } else if (res.data.records.length == 0) {
// this.page--;
// }
// }
// })
// .catch((e) => {
// uni.showToast({
// title: e.data.message,
// icon: "none",
// });
// });
// }
// },
// goActDeat(id, typEnum) {
// if (typEnum) {
// uni.navigateTo({
@ -651,35 +567,6 @@ export default {
// }
// },
// subEvalue(item) {
// let that = this;
// let arr = [];
// this.baomingpingjia.forEach(function (em, i) {
// arr.push({
// evaluate: em.evaluate,
// hallId: em.hallId,
// userId: em.userId,
// });
// });
// that.http
// .request("/hallUser/evaluate", arr, "POST")
// .then((res) => {
// if (res.code == 200) {
// that.clickTab(1);
// console.log("testdata", res);
// }
// })
// .catch((e) => {
// uni.showToast({
// title: e.data.message,
// icon: "none",
// });
// });
// this.show = false;
// console.log(this.score);
// //
// },
// toEvlauedpg(id) {
// uni.navigateTo({
// url: `/pagesA/my/evaluated?id=` + id,
@ -756,7 +643,7 @@ image {
}
.tag_sta_end {
width: 100rpx;
width: 160rpx;
height: 48rpx;
background: #fff4ed;
border-radius: 8rpx;
@ -808,32 +695,8 @@ image {
.pinContent {
margin-top: 16rpx;
.pinContent_itm {
width: 500rpx;
display: flex;
align-items: center;
justify-content: space-between;
.pinContent_avator {
display: flex;
align-items: center;
.pinContent_avator_img {
width: 68rpx;
height: 68rpx;
margin-right: 16rpx;
margin: 24rpx 16rpx 24rpx 0rpx;
border-radius: 50%;
overflow: hidden;
}
.pinContent_Time {
display: flex;
flex-direction: column;
justify-content: space-between;
}
}
textarea {
margin: 12rpx;
}
}
</style>