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

This commit is contained in:
lnn19986213 2023-08-03 16:00:46 +08:00
commit f7ae651016
2 changed files with 480 additions and 573 deletions

View File

@ -93,7 +93,11 @@
</view>
</view>
<view class="content_bott_itm" @click="toCountryside()">
<view
class="content_bott_itm"
@click="toCountryside()"
v-if="isAdmin || isVillageAdmin"
>
<!-- @click="" -->
<view class="content_bott_wods"> 下乡管理 </view>
<view class="content_bott_arrow">
@ -145,6 +149,8 @@ export default {
isUnread: false,
statusHeight: 0,
titleHeight: 90,
isAdmin: null,
isVillageAdmin: null,
};
},
onReady() {
@ -160,6 +166,8 @@ export default {
},
onShow() {
this.getUserInfo();
this.isAdmin = uni.getStorageSync("isAdmin");
this.isVillageAdmin = uni.getStorageSync("isVillageAdmin");
},
methods: {
//

View File

@ -1,6 +1,7 @@
<template>
<view>
<view
v-if="isAdmin || isVillageAdmin"
class="tabss"
style="
display: flex;
@ -25,13 +26,8 @@
</view>
</view>
<view class="main">
<view
class="art_act_itm"
v-for="(item, i) in orderList"
:key="i"
v-if="tabNum == 1"
>
<!-- <image src="../../static/icon12.jpg" mode=""></image> -->
<view v-if="tabNum == 1">
<view class="art_act_itm" v-for="(item, i) in issueList" :key="i">
<image
:src="item.enclosure"
mode=""
@ -50,7 +46,9 @@
{{ item.title }}
</view>
<view class="tag_sta_end" v-if="item.state == '3'"> 已完成 </view>
<view class="tag_sta_fail" v-if="item.state == '4'"> 未接单 </view>
<view class="tag_sta_fail" v-if="item.state == '4'">
未接单
</view>
<view
class="tag_sta_going"
v-if="item.state == '1' || item.state == '0'"
@ -59,7 +57,7 @@
</view>
<view class="tag_sta_end" v-if="item.state == '2'"> 待评价 </view>
</view>
<view class="act_time"> 活动时间 {{ item.createdAt }} </view>
<view class="act_time"> 活动时间 {{ item.startTime }} </view>
<view
class="but_box"
style="margin-top: 20rpx"
@ -93,7 +91,11 @@
@click="undone(item.id)"
v-if="item.state != '2' && item.state != '3'"
>
<u-button color="#99241B" shape="circle" text="未完成"></u-button>
<u-button
color="#99241B"
shape="circle"
text="未完成"
></u-button>
</view>
<view
style="width: 236rpx; margin: 0 10rpx"
@ -147,13 +149,17 @@
</view>
</view>
</view>
<view
class="art_act_itm"
v-for="(item, i) in orderList"
:key="i"
v-if="tabNum == 2"
<view v-if="!(issueList.length > 0)">
<u-empty
mode="list"
icon="http://cdn.uviewui.com/uview/empty/list.png"
>
</u-empty>
</view>
</view>
<view v-if="tabNum == 2">
<view class="art_act_itm" v-for="(item, i) in receivingList" :key="i">
<image
@click="goActDeat(item.id)"
:src="item.enclosure"
@ -173,9 +179,11 @@
</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_going" v-if="item.state == '1'"> 进行中 </view>
<view class="tag_sta_going" v-if="item.state == '1'">
进行中
</view>
<view class="act_time"> 活动时间 {{ item.createdAt }} </view>
</view>
<view class="act_time"> 活动时间 {{ item.startTime }} </view>
<view class="but_box" style="margin-top: 20rpx">
<view
style="width: 236rpx; margin: 0 10rpx"
@ -200,6 +208,14 @@
</view>
</view>
</view>
<view v-if="!(receivingList.length > 0)">
<u-empty
mode="list"
icon="http://cdn.uviewui.com/uview/empty/list.png"
>
</u-empty>
</view>
</view>
</view>
<u-popup :show="showS" @close="closeS" mode="center" :round="10">
<view style="width: 640rpx">
@ -295,10 +311,6 @@
</view>
</view>
</u-modal>
<view v-if="!(orderList.length > 0)">
<u-empty mode="list" icon="http://cdn.uviewui.com/uview/empty/list.png">
</u-empty>
</view>
</view>
</template>
@ -327,9 +339,16 @@ export default {
starsvalue: 0,
page: 1,
size: 20,
isAdmin: null, //
isVillageAdmin: null, //
issueList: [],
receivingList: [],
};
},
onShow() {
this.isAdmin = uni.getStorageSync("isAdmin");
this.isVillageAdmin = uni.getStorageSync("isVillageAdmin");
this.tabNum = this.isAdmin ? 1 : this.isVillageAdmin ? 2 : null;
this.clickTab(this.tabNum);
},
//
@ -352,7 +371,115 @@ export default {
if (num == 1) {
let that = this;
this.myPosts();
} else if (num == 2) {
let that = this;
this.myArtCountryside();
}
},
myArtCountryside() {
this.http
.request("/artCountryside/myArtCountryside", {}, "GET")
.then((res) => {
if (res.code == 200) {
this.receivingList = res.data.records;
}
})
.catch((err) => {
uni.showToast({
title: e.data.message,
icon: "none",
});
});
},
myPosts() {
this.http
.request("/artCountryside/myPosts", {}, "GET")
.then((res) => {
if (res.code == 200) {
this.issueList = res.data.records;
}
})
.catch((err) => {
uni.showToast({
title: e.data.message,
icon: "none",
});
});
},
// receiveevlaue(id) {
// this.showShoudao = true;
// this.http
// .request("/hallUser/sdpj?id=" + id, {}, "POST")
// .then((res) => {
// if (res.code == 200) {
// this.starsvalue = res.data.evaluate;
// this.showShoudao = true;
// }
// })
// .catch((e) => {
// uni.showToast({
// title: e.data.message,
// icon: "none",
// });
// });
// },
// done(id) {
// this.http
// .request("/hallUser/complete?id=" + id, {}, "POST")
// .then((res) => {
// if (res.code == 200) {
// this.clickTab(1);
// }
// })
// .catch((e) => {
// uni.showToast({
// title: e.data.message,
// icon: "none",
// });
// });
// },
// 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
// .request("/hallUser/qxSingUp?hallId=" + id, {}, "POST")
// .then((res) => {
// if (res.code == 200) {
// this.clickTab(2);
// uni.showToast({
// title: "",
// icon: "none",
// });
// }
// })
// .catch((e) => {
// uni.showToast({
// title: e.data.message,
// icon: "none",
// });
// });
// },
// moreOrder() {
// if (this.tabNum == 1) {
// let that = this;
// this.http
// .request(
// "/hallUser/ddgl",
@ -393,10 +520,8 @@ export default {
// icon: "none",
// });
// });
} else if (num == 2) {
let that = this;
this.myArtCountryside();
// } else if (this.tabNum == 2) {
// let that = this;
// this.http
// .request(
// "/hallUser/myHall",
@ -404,6 +529,7 @@ export default {
// "GET"
// )
// .then((res) => {
// if (res.code == 200) {
// if (res.data.records.length > 0) {
// res.data.records.forEach(function (item) {
// if (item.enclosure) {
@ -428,6 +554,7 @@ export default {
// } else if (res.data.records.length == 0) {
// this.page--;
// }
// }
// })
// .catch((e) => {
// uni.showToast({
@ -435,9 +562,8 @@ export default {
// icon: "none",
// });
// });
//
} else if (num == 3) {
let that = this;
// } else if (this.tabNum == 3) {
// let that = this;
// this.http
// .request(
// "/hallUser/myHall?state=2",
@ -445,6 +571,7 @@ export default {
// "GET"
// )
// .then((res) => {
// if (res.code == 200) {
// if (res.data.records.length > 0) {
// res.data.records.forEach(function (item) {
// if (item.enclosure) {
@ -469,6 +596,74 @@ export default {
// } 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({
// url: `/pagesB/orderHall/orderHallDetails?id=${id}&isCheck=${typEnum}`,
// });
// } else {
// uni.navigateTo({
// url: `/pagesB/orderHall/orderHallDetails?id=${id}`,
// });
// }
// },
// toUpimgPage(id) {
// this.http
// .request("/hallUser/pjList?hallId=" + id, {}, "GET")
// .then((res) => {
// if (res.code == 200) {
// console.log("reg", res.data);
// if (res.data.length > 0) {
// uni.navigateTo({
// url: `/pagesA/my/imgUpload?id=` + id,
// });
// } else {
// uni.showToast({
// title: "",
// icon: "none",
// });
// }
// }
// })
// .catch((e) => {
// uni.showToast({
// title: e.data.message,
// icon: "none",
// });
// });
// },
// touploadedimg(imgstr) {
// uni.navigateTo({
// url: "/pagesA/my/uploadedImgShow?imgstring=" + imgstr,
// });
// },
// 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({
@ -476,312 +671,16 @@ export default {
// icon: "none",
// });
// });
}
},
myArtCountryside() {
this.http
.request("/artCountryside/myArtCountryside", {}, "GET")
.then((res) => {
if (res.code == 200) {
}
})
.catch((err) => {
uni.showToast({
title: e.data.message,
icon: "none",
});
});
},
myPosts() {
this.http
.request("/artCountryside/myPosts", {}, "GET")
.then((res) => {
if (res.code == 200) {
}
})
.catch((err) => {
uni.showToast({
title: e.data.message,
icon: "none",
});
});
},
receiveevlaue(id) {
this.showShoudao = true;
this.http
.request("/hallUser/sdpj?id=" + id, {}, "POST")
.then((res) => {
if (res.code == 200) {
this.starsvalue = res.data.evaluate;
this.showShoudao = true;
}
})
.catch((e) => {
uni.showToast({
title: e.data.message,
icon: "none",
});
});
},
done(id) {
this.http
.request("/hallUser/complete?id=" + id, {}, "POST")
.then((res) => {
if (res.code == 200) {
this.clickTab(1);
}
})
.catch((e) => {
uni.showToast({
title: e.data.message,
icon: "none",
});
});
},
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
.request("/hallUser/qxSingUp?hallId=" + id, {}, "POST")
.then((res) => {
if (res.code == 200) {
this.clickTab(2);
uni.showToast({
title: "成功",
icon: "none",
});
}
})
.catch((e) => {
uni.showToast({
title: e.data.message,
icon: "none",
});
});
},
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({
url: `/pagesB/orderHall/orderHallDetails?id=${id}&isCheck=${typEnum}`,
});
} else {
uni.navigateTo({
url: `/pagesB/orderHall/orderHallDetails?id=${id}`,
});
}
},
toUpimgPage(id) {
this.http
.request("/hallUser/pjList?hallId=" + id, {}, "GET")
.then((res) => {
if (res.code == 200) {
console.log("reg", res.data);
if (res.data.length > 0) {
uni.navigateTo({
url: `/pagesA/my/imgUpload?id=` + id,
});
} else {
uni.showToast({
title: "无人接单",
icon: "none",
});
}
}
})
.catch((e) => {
uni.showToast({
title: e.data.message,
icon: "none",
});
});
},
touploadedimg(imgstr) {
uni.navigateTo({
url: "/pagesA/my/uploadedImgShow?imgstring=" + imgstr,
});
},
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,
});
},
// this.show = false;
// console.log(this.score);
// //
// },
// toEvlauedpg(id) {
// uni.navigateTo({
// url: `/pagesA/my/evaluated?id=` + id,
// });
// },
close() {
this.show = false;
},
@ -795,22 +694,22 @@ export default {
closeS() {
this.showS = false;
},
sureS() {
this.http
.request("/hallUser/undone?id=" + this.undoneId, {}, "POST")
.then((res) => {
if (res.code == 200) {
this.clickTab(this.tabNum);
this.showS = false;
}
})
.catch((e) => {
uni.showToast({
title: e.data.message,
icon: "none",
});
});
},
// sureS() {
// this.http
// .request("/hallUser/undone?id=" + this.undoneId, {}, "POST")
// .then((res) => {
// if (res.code == 200) {
// this.clickTab(this.tabNum);
// this.showS = false;
// }
// })
// .catch((e) => {
// uni.showToast({
// title: e.data.message,
// icon: "none",
// });
// });
// },
},
};
</script>