diff --git a/src/pagesD/xxgl/index.vue b/src/pagesD/xxgl/index.vue index 591128c..f35a208 100644 --- a/src/pagesD/xxgl/index.vue +++ b/src/pagesD/xxgl/index.vue @@ -29,7 +29,7 @@ 图片加载错误 --> 待评价 - 图片待上传 + 待上传图片 @@ -82,7 +82,7 @@ > - - - --> + @@ -265,22 +265,20 @@ - + + - - - - - - {{ - v.userName - }} - - - - - - + @@ -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; } }