Merge branch 'master' of git.zdool.com:xs/yyx/h5

This commit is contained in:
lnn19986213 2023-08-04 13:59:43 +08:00
commit 10549eb1f1
1 changed files with 128 additions and 249 deletions

View File

@ -29,7 +29,7 @@
<view v-if="tabNum == 1"> <view v-if="tabNum == 1">
<view class="art_act_itm" v-for="(item, i) in issueList" :key="i"> <view class="art_act_itm" v-for="(item, i) in issueList" :key="i">
<image <image
:src="item.photos.split(',')[0]" :src="onPhoto(item.photos)"
alt="图片加载错误" alt="图片加载错误"
mode="" mode=""
@click="goActDeat(item.id, 1)" @click="goActDeat(item.id, 1)"
@ -58,7 +58,7 @@
</view> --> </view> -->
<view class="tag_sta_end" v-if="item.state == '1'"> 待评价 </view> <view class="tag_sta_end" v-if="item.state == '1'"> 待评价 </view>
<view class="tag_sta_end" v-if="item.state == '0'"> <view class="tag_sta_end" v-if="item.state == '0'">
图片待上传 待上传图片
</view> </view>
</view> </view>
<view class="act_time"> <view class="act_time">
@ -82,7 +82,7 @@
> >
</u-button> </u-button>
</view> </view>
<view <!-- <view
style="width: 236rpx; margin: 0 10rpx" style="width: 236rpx; margin: 0 10rpx"
v-if="item.state == '1'" v-if="item.state == '1'"
@click="done(item.id)" @click="done(item.id)"
@ -92,8 +92,8 @@
shape="circle" shape="circle"
text="确认完成" text="确认完成"
></u-button> ></u-button>
</view> </view> -->
<view <!-- <view
style="width: 236rpx; margin: 0 10rpx" style="width: 236rpx; margin: 0 10rpx"
@click="undone(item.id)" @click="undone(item.id)"
v-if="item.state != '2' && item.state != '3'" v-if="item.state != '2' && item.state != '3'"
@ -103,7 +103,7 @@
shape="circle" shape="circle"
text="未完成" text="未完成"
></u-button> ></u-button>
</view> </view> -->
<view <view
style="width: 236rpx; margin: 0 10rpx" style="width: 236rpx; margin: 0 10rpx"
v-if="item.state == '0'" v-if="item.state == '0'"
@ -119,26 +119,26 @@
</view> </view>
<view <view
style="width: 190rpx; margin: 0 10rpx" style="width: 190rpx; margin: 0 10rpx"
v-if="item.state == '2'" v-if="item.state == '1'"
> >
<u-button <u-button
plain plain
color="#99241B" color="#99241B"
shape="circle" shape="circle"
text="评价" text="评价"
@click="pingjia(i, item.id)" @click="pingjia(item.id)"
> >
</u-button> </u-button>
</view> </view>
<view <view
style="width: 190rpx; margin: 0 10rpx" style="width: 190rpx; margin: 0 10rpx"
v-if="item.state == '3'" v-if="item.state == '2'"
> >
<!-- <view style="width: 190rpx;margin: 0 10rpx; " > --> <!-- <view style="width: 190rpx;margin: 0 10rpx; " > -->
<u-button <u-button
shape="circle" shape="circle"
text="已评价" text="已评价"
@click="toEvlauedpg(item.id)" @click="toEvlauedpg(item.evaluate)"
></u-button> ></u-button>
</view> </view>
</view> </view>
@ -180,7 +180,7 @@
<view class="title"> <view class="title">
{{ item.title }} {{ item.title }}
</view> </view>
<view class="tag_sta" v-if="item.state == '0'"> 已报名 </view> <view class="tag_sta" v-if="item.state == '0'"> 待上传图片 </view>
<view class="tag_sta_end" v-if="item.state == '2'"> 已完成 </view> <view class="tag_sta_end" v-if="item.state == '2'"> 已完成 </view>
<view class="tag_sta_going" v-if="item.state == '1'"> <view class="tag_sta_going" v-if="item.state == '1'">
进行中 进行中
@ -191,7 +191,7 @@
{{ onDate(item.endTime) }} {{ onDate(item.endTime) }}
</view> </view>
<view class="but_box" style="margin-top: 20rpx"> <view class="but_box" style="margin-top: 20rpx">
<view <!-- <view
style="width: 236rpx; margin: 0 10rpx" style="width: 236rpx; margin: 0 10rpx"
v-if="item.state == '0'" v-if="item.state == '0'"
> >
@ -200,15 +200,15 @@
text="取消报名" text="取消报名"
@click="cancleBM(item.id)" @click="cancleBM(item.id)"
></u-button> ></u-button>
</view> </view> -->
<view <view
style="width: 236rpx; margin: 0 10rpx" style="width: 236rpx; margin: 0 10rpx"
v-if="item.state == '3'" v-if="item.state == '2'"
> >
<u-button <u-button
shape="circle" shape="circle"
text="收到的评价" text="收到的评价"
@click="receiveevlaue(item.id)" @click="toEvlauedpg(item.evaluate)"
></u-button> ></u-button>
</view> </view>
</view> </view>
@ -265,22 +265,21 @@
</view> </view>
</view> </view>
</u-popup> </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">
<view class="pinContent_itm" v-for="(v, i) in baomingpingjia" :key="i"> <textarea
<view class="pinContent_avator"> :disabled="id == ''"
<!-- <image class="pinContent_avator_img" src="../../static/MyBg.png" mode=""></image> --> cols="30"
<image class="pinContent_avator_img" :src="v.image" mode=""></image> rows="10"
<view class="pinContent_Time"> v-model="evaluate"
<text style="font-size: 24rpx; font-weight: 600">{{ placeholder="请输入评价..."
v.userName ></textarea>
}}</text>
</view>
</view>
<view class="pinContent_rate">
<u-rate count="5" v-model="v.evaluate"></u-rate>
</view>
</view>
</view> </view>
<view <view
slot="confirmButton" slot="confirmButton"
@ -288,10 +287,18 @@
> >
<view style="width: 400rpx"> <view style="width: 400rpx">
<u-button <u-button
v-if="id != ''"
color="#99241B" color="#99241B"
shape="circle" shape="circle"
text="提交" text="提交"
@click="subEvalue(baomingpingjia)" @click="onSubmit()"
></u-button>
<u-button
v-else
color="#99241B"
shape="circle"
text="确认"
@click="show = false"
></u-button> ></u-button>
</view> </view>
</view> </view>
@ -345,10 +352,13 @@ export default {
starsvalue: 0, starsvalue: 0,
page: 1, page: 1,
size: 20, size: 20,
current: null,
isAdmin: null, // isAdmin: null, //
isVillageAdmin: null, // isVillageAdmin: null, //
issueList: [], issueList: [],
receivingList: [], receivingList: [],
evaluate: "",
id: "",
}; };
}, },
onShow() { onShow() {
@ -366,8 +376,10 @@ export default {
}, },
// //
onReachBottom() { onReachBottom() {
this.page++; if (this.current > this.page) {
this.moreOrder(); this.page++;
this.moreOrder();
}
}, },
methods: { methods: {
clickTab(num) { clickTab(num) {
@ -375,19 +387,23 @@ export default {
this.tabNum = num; this.tabNum = num;
this.page = 1; this.page = 1;
if (num == 1) { if (num == 1) {
let that = this;
this.myPosts(); this.myPosts();
} else if (num == 2) { } else if (num == 2) {
let that = this;
this.myArtCountryside(); this.myArtCountryside();
} }
}, },
myArtCountryside() { myArtCountryside() {
let obj = {
page: this.page,
size: this.size,
};
this.http this.http
.request("/artCountryside/myArtCountryside", {}, "GET") .request("/artCountryside/myArtCountryside", obj, "GET")
.then((res) => { .then((res) => {
if (res.code == 200) { 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) => { .catch((err) => {
@ -398,11 +414,17 @@ export default {
}); });
}, },
myPosts() { myPosts() {
let obj = {
page: this.page,
size: this.size,
};
this.http this.http
.request("/artCountryside/myPosts", {}, "GET") .request("/artCountryside/myPosts", obj, "GET")
.then((res) => { .then((res) => {
if (res.code == 200) { 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) => { .catch((err) => {
@ -416,6 +438,14 @@ export default {
let date = new Date(time); let date = new Date(time);
return date.toLocaleString(); return date.toLocaleString();
}, },
onPhoto(photo) {
let src = "";
if (photo) {
let list = photo.split(",");
src = list[0];
}
return src;
},
toUpimgPage(id) { toUpimgPage(id) {
uni.navigateTo({ uni.navigateTo({
url: `/pagesD/xxgl/upload?id=${id}`, url: `/pagesD/xxgl/upload?id=${id}`,
@ -439,6 +469,54 @@ export default {
closeS() { closeS() {
this.showS = false; this.showS = false;
}, },
pingjia(id) {
this.id = id;
this.show = true;
},
onSubmit() {
if (this.id == "") {
this.show = false;
return;
}
this.http
.request(
`/artCountryside/evaluate?id=${this.id}&evaluate=${this.evaluate}`,
{},
"POST"
)
.then((res) => {
if (res.code == 200) {
uni.showToast({
title: "评价成功",
});
this.show = false;
this.moreOrder(true);
this.id = "";
this.evaluate = "";
} else {
uni.showToast({
title: err.data.message,
icon: "none",
});
}
})
.catch((err) => {
uni.showToast({
title: err.data.message,
icon: "none",
});
});
},
moreOrder(page = null) {
if (page) {
this.page = 1;
}
if (this.tabNum == 1) {
this.myPosts();
} else if (this.tabNum == 2) {
this.myArtCountryside();
}
},
// receiveevlaue(id) { // receiveevlaue(id) {
// this.showShoudao = true; // this.showShoudao = true;
// this.http // this.http
@ -471,25 +549,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) { // cancleBM(id) {
// let that = this; // let that = this;
// this.http // this.http
@ -510,135 +571,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) { // goActDeat(id, typEnum) {
// if (typEnum) { // if (typEnum) {
// uni.navigateTo({ // uni.navigateTo({
@ -651,40 +584,10 @@ export default {
// } // }
// }, // },
// subEvalue(item) { toEvlauedpg(value) {
// let that = this; this.show = true;
// let arr = []; this.evaluate = value;
// 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,
// });
// },
// sureS() { // sureS() {
// this.http // this.http
@ -734,7 +637,7 @@ image {
} }
.tag_sta { .tag_sta {
width: 100rpx; width: 160rpx;
height: 48rpx; height: 48rpx;
background: #f9f2f2; background: #f9f2f2;
border-radius: 8rpx; border-radius: 8rpx;
@ -756,7 +659,7 @@ image {
} }
.tag_sta_end { .tag_sta_end {
width: 100rpx; width: 160rpx;
height: 48rpx; height: 48rpx;
background: #fff4ed; background: #fff4ed;
border-radius: 8rpx; border-radius: 8rpx;
@ -808,32 +711,8 @@ image {
.pinContent { .pinContent {
margin-top: 16rpx; margin-top: 16rpx;
textarea {
.pinContent_itm { margin: 12rpx;
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;
}
}
} }
} }
</style> </style>