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

This commit is contained in:
lnn19986213 2023-08-07 10:53:37 +08:00
commit b81d2f99f8
1 changed files with 243 additions and 236 deletions

View File

@ -111,22 +111,23 @@
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
"> "
<view class="title"> >
{{ item.title }} <view class="title">
</view> {{ item.title }}
<view class="tag_sta" v-if="item.state == '0'"> 待上传图片 </view> </view>
<view class="tag_sta_end" v-if="item.state == '2'"> 已完成 </view> <view class="tag_sta" v-if="item.state == '0'"> 待上传图片 </view>
<view class="tag_sta_going" v-if="item.state == '1'"> <view class="tag_sta_end" v-if="item.state == '2'"> 已完成 </view>
进行中 <view class="tag_sta_going" v-if="item.state == '1'">
</view> 进行中
</view> </view>
<view class="act_time"> </view>
活动时间 {{ onDate(item.startTime) }} - <view class="act_time">
{{ onDate(item.endTime) }} 活动时间 {{ onDate(item.startTime) }} -
</view> {{ onDate(item.endTime) }}
<view class="but_box" style="margin-top: 20rpx"> </view>
<!-- <view <view class="but_box" style="margin-top: 20rpx">
<!-- <view
style="width: 236rpx; margin: 0 10rpx" style="width: 236rpx; margin: 0 10rpx"
v-if="item.state == '0'" v-if="item.state == '0'"
> >
@ -206,226 +207,232 @@
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
showShoudao: false, showShoudao: false,
show: false, show: false,
showS: false, showS: false,
count: 4, count: 4,
value: 2, value: 2,
rate2: 2, rate2: 2,
total: 0, total: 0,
score: [{ score: [
name: "jack", {
star: 0, name: "jack",
}, ], star: 0,
starvalue: 0, },
orderList: [], ],
tabNum: 1, starvalue: 0,
pingjiaobj: {}, orderList: [],
baomingpingjia: [], tabNum: 1,
starsvalue: 0, pingjiaobj: {},
page: 1, baomingpingjia: [],
size: 20, starsvalue: 0,
current: null, page: 1,
isAdmin: null, // size: 20,
isVillageAdmin: null, // current: null,
issueList: [], isAdmin: null, //
receivingList: [], isVillageAdmin: null, //
evaluate: "", issueList: [],
id: "", receivingList: [],
}; evaluate: "",
}, id: "",
onShow() { };
this.isAdmin = uni.getStorageSync("isAdmin"); },
this.isVillageAdmin = uni.getStorageSync("isVillageAdmin"); onShow() {
this.tabNum = this.isAdmin ? 1 : this.isVillageAdmin ? 2 : null; this.isAdmin = uni.getStorageSync("isAdmin");
this.clickTab(this.tabNum); this.isVillageAdmin = uni.getStorageSync("isVillageAdmin");
}, this.tabNum = this.isAdmin ? 1 : this.isVillageAdmin ? 2 : null;
// this.clickTab(this.tabNum);
onPullDownRefresh() { },
this.clickTab(this.tabNum); //
setTimeout(function() { onPullDownRefresh() {
uni.stopPullDownRefresh(); this.clickTab(this.tabNum);
}, 1000); setTimeout(function () {
}, uni.stopPullDownRefresh();
// }, 1000);
onReachBottom() { },
if (this.current > this.page) { //
this.page++; onReachBottom() {
this.moreOrder(); if (this.current > this.page) {
} this.page++;
}, this.moreOrder();
methods: { }
clickTab(num) { },
this.receivingList = []; methods: {
this.issueList = []; clickTab(num) {
this.tabNum = num; this.orderList = [];
this.page = 1; this.receivingList = [];
if (num == 1) { this.issueList = [];
this.myPosts(); this.tabNum = num;
} else if (num == 2) { this.page = 1;
this.myArtCountryside(); if (num == 1) {
} this.myPosts();
}, } else if (num == 2) {
myArtCountryside() { this.myArtCountryside();
let obj = { }
page: this.page, },
size: this.size, myArtCountryside() {
}; let obj = {
this.http page: this.page,
.request("/artCountryside/myArtCountryside", obj, "GET") size: this.size,
.then((res) => { };
if (res.code == 200) { this.http
this.receivingList = [...this.receivingList, ...res.data.records]; .request("/artCountryside/myArtCountryside", obj, "GET")
this.page = res.data.current; .then((res) => {
this.current = res.data.current; if (res.code == 200) {
} this.receivingList = [...this.receivingList, ...res.data.records];
}) this.page = res.data.current;
.catch((err) => { this.current = res.data.current;
uni.showToast({ }
title: e.data.message, })
icon: "none", .catch((err) => {
}); uni.showToast({
}); title: e.data.message,
}, icon: "none",
myPosts() { });
let obj = { });
page: this.page, },
size: this.size, myPosts() {
}; let obj = {
this.http page: this.page,
.request("/artCountryside/myPosts", obj, "GET") size: this.size,
.then((res) => { };
if (res.code == 200) { this.http
this.issueList = [...this.issueList, ...res.data.records]; .request("/artCountryside/myPosts", obj, "GET")
this.page = res.data.current; .then((res) => {
this.current = res.data.current; if (res.code == 200) {
} this.issueList = [...this.issueList, ...res.data.records];
}) this.page = res.data.current;
.catch((err) => { this.current = res.data.current;
uni.showToast({ }
title: e.data.message, })
icon: "none", .catch((err) => {
}); uni.showToast({
}); title: e.data.message,
}, icon: "none",
onDate(time) { });
let date = new Date(time); });
return date.toLocaleString(); },
}, onDate(time) {
onPhoto(photo) { let date = new Date(time);
let src = ""; return date.toLocaleString();
if (photo) { },
let list = photo.split(","); onPhoto(photo) {
src = list[0]; let src = "";
} if (photo) {
return src; let list = photo.split(",");
}, src = list[0];
toUpimgPage(id) { }
uni.navigateTo({ return src;
url: `/pagesD/xxgl/upload?id=${id}`, },
}); toUpimgPage(id) {
}, uni.navigateTo({
touploadedimg(id) { url: `/pagesD/xxgl/upload?id=${id}`,
uni.navigateTo({ });
url: `/pagesD/xxgl/uploadShow?id=${id}`, },
}); touploadedimg(id) {
}, uni.navigateTo({
close() { url: `/pagesD/xxgl/uploadShow?id=${id}`,
this.show = false; });
}, },
closeRecive() { close() {
this.showShoudao = false; this.id = "";
}, this.show = false;
undone(val) { },
this.undoneId = val; closeRecive() {
this.showS = true; this.id = "";
}, this.showShoudao = false;
closeS() { },
this.showS = false; undone(val) {
}, this.undoneId = val;
pingjia(id) { this.showS = true;
this.id = id; },
this.show = true; closeS() {
}, this.showS = false;
onSubmit() { },
if (this.id == "") { pingjia(id) {
this.show = false; this.id = id;
return; this.show = true;
} },
this.http onSubmit() {
.request( if (this.id == "") {
`/artCountryside/evaluate?id=${this.id}&evaluate=${this.evaluate}`, {}, this.show = false;
"POST" return;
) }
.then((res) => { this.http
if (res.code == 200) { .request(
uni.showToast({ `/artCountryside/evaluate?id=${this.id}&evaluate=${this.evaluate}`,
title: "评价成功", {},
}); "POST"
this.show = false; )
this.moreOrder(true); .then((res) => {
this.id = ""; if (res.code == 200) {
this.evaluate = ""; uni.showToast({
} else { title: "评价成功",
uni.showToast({ });
title: err.data.message, this.show = false;
icon: "none", this.moreOrder(true);
}); this.id = "";
} this.evaluate = "";
}) } else {
.catch((err) => { uni.showToast({
uni.showToast({ title: err.data.message,
title: err.data.message, icon: "none",
icon: "none", });
}); }
}); })
}, .catch((err) => {
moreOrder(page = null) { uni.showToast({
if (page) { title: err.data.message,
this.page = 1; icon: "none",
} });
if (this.tabNum == 1) { });
this.myPosts(); },
} else if (this.tabNum == 2) { moreOrder(page = null) {
this.myArtCountryside(); if (page) {
} this.page = 1;
}, }
// receiveevlaue(id) { if (this.tabNum == 1) {
// this.showShoudao = true; this.myPosts();
// this.http } else if (this.tabNum == 2) {
// .request("/hallUser/sdpj?id=" + id, {}, "POST") this.myArtCountryside();
// .then((res) => { }
// if (res.code == 200) { },
// this.starsvalue = res.data.evaluate; // receiveevlaue(id) {
// this.showShoudao = true; // this.showShoudao = true;
// } // this.http
// }) // .request("/hallUser/sdpj?id=" + id, {}, "POST")
// .catch((e) => { // .then((res) => {
// uni.showToast({ // if (res.code == 200) {
// title: e.data.message, // this.starsvalue = res.data.evaluate;
// icon: "none", // this.showShoudao = true;
// }); // }
// }); // })
// }, // .catch((e) => {
// done(id) { // uni.showToast({
// this.http // title: e.data.message,
// .request("/hallUser/complete?id=" + id, {}, "POST") // icon: "none",
// .then((res) => { // });
// if (res.code == 200) { // });
// this.clickTab(1); // },
// } // done(id) {
// }) // this.http
// .catch((e) => { // .request("/hallUser/complete?id=" + id, {}, "POST")
// uni.showToast({ // .then((res) => {
// title: e.data.message, // if (res.code == 200) {
// icon: "none", // this.clickTab(1);
// }); // }
// }); // })
// }, // .catch((e) => {
// // uni.showToast({
// title: e.data.message,
// icon: "none",
// });
// });
// },
//
// cancleBM(id) { // cancleBM(id) {
// let that = this; // let that = this;