From 9faa9c572b60a39ac9d3be3ac7837e86354fdad0 Mon Sep 17 00:00:00 2001 From: tianyi <13521030702@163.com> Date: Mon, 27 Apr 2026 10:20:50 +0800 Subject: [PATCH] 1 --- package1/group/shopEvaluate.vue | 133 +++++++++++++++++++++- package1/myCenter/partTimeJobRegister.vue | 2 +- package1/order/orderEvaluate.vue | 2 +- package1/runErrand/runErrand.vue | 2 +- 4 files changed, 134 insertions(+), 5 deletions(-) diff --git a/package1/group/shopEvaluate.vue b/package1/group/shopEvaluate.vue index 21f9ec3..47cb1a2 100644 --- a/package1/group/shopEvaluate.vue +++ b/package1/group/shopEvaluate.vue @@ -59,7 +59,7 @@ {{item.remark}} - + @@ -75,6 +75,39 @@ + + + 回复 + + + + + + + + + + + + + + + + + + + + + 确认 + + + 取消 + + + + @@ -91,8 +124,10 @@ export default { data() { return { + replyText:'', + isMerchant:0, + replyPicture:"", isExpanded: false, - replyText: '感谢您的评价,希望可以带给您更好的体验。我们会继续努力,优化服务,欢迎再次光临!如果您有任何建议,也欢迎随时告诉我们。感谢您的支持与喜爱!', menuButtonInfo: {}, isPintuan: true, bigImg: '', @@ -153,6 +188,7 @@ } }, onLoad(option) { + this.isMerchant = option.isMerchant this.shopItem = JSON.parse(option.item) this.getshopComments(this.shopItem.id) }, @@ -171,6 +207,9 @@ } else { that.shopComments = [...that.shopComments, ...res.result.records] } + for(let i=0;i {}) }, + submit(v){ + let that = this; + let data = [{ //店铺 + parentId:this.shopComments[v].id, + leve:1, + remark:this.replyText, + picture:this.replyPicture, + createBy:this.shopComments[v].createBy, + createByName:'微信用户', + createByIcon:'https://ooo.0o0.ooo/2019/04/28/5cc5a71a6e3b6.png', + orderId:this.shopComments[v].orderId, + shopId:this.shopComments[v].shopId, + + }] + that.tui.request("/app/comment/save", "POST", data, false, false).then((res) => { + if (res.code == 200) { + uni.showToast({ + title: "评论成功", + icon: 'none' + }) + setTimeout(res => { + this.back() + }, 1000) + } else { + that.tui.toast(res.message); + } + uni.hideLoading(); + }).catch((res) => {}); + }, toggleReply() { this.isExpanded = !this.isExpanded; }, + changeStatus(v){ + this.shopComments[v].isReply = !this.shopComments[v].isReply + this.$forceUpdate() + }, checkTab(index) { for (let i = 0; i < this.menuList.length; i++) { if (i == index) { @@ -207,6 +279,55 @@ } this.getshopComments(this.shopItem.id) }, + pictureAdd() { + let that = this + uni.chooseMedia({ + count: 1, + mediaType: ['image'], + sourceType: ['camera', 'album'], + success(res) { + uni.showLoading({ + title: '加载中...', + mask: true + }) + for (let i = 0; i < res.tempFiles.length; i++) { + that.upLoadFile(res.tempFiles[i].tempFilePath) + } + + } + }) + }, + async upLoadFile(path) { + let that = this; + let hiver_token = uni.getStorageSync("hiver_token") + await uni.uploadFile({ + url: that.tui.interfaceUrl() + '/upload/file', + filePath: path, + name: 'file', + header: { + "content-type": "multipart/form-data", + 'accessToken': hiver_token + }, + formData: {}, + success: (uploadFileRes) => { + let pathData = JSON.parse(uploadFileRes.data) + + this.replyPicture = pathData.result + + that.$forceUpdate() + }, + fail: (err) => { + uni.hideLoading(); + uni.showToast({ + title: JSON.stringify(err), + icon: 'none' + }) + } + }); + await setTimeout(res => { + uni.hideLoading(); + }, 1000) + }, //查看大图 largeImg(img) { this.bigImg = 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/00b1f011787c4549bbea650d95a4eb39.png' @@ -462,4 +583,12 @@ background-color: #ccc; border-radius: 20rpx; } + .eval-num{ + padding-bottom: 30rpx; + border-bottom: 1px solid #eee; + } + .upload-img { + width: 160rpx; + height: 160rpx; + } \ No newline at end of file diff --git a/package1/myCenter/partTimeJobRegister.vue b/package1/myCenter/partTimeJobRegister.vue index ea5fec3..b603f90 100644 --- a/package1/myCenter/partTimeJobRegister.vue +++ b/package1/myCenter/partTimeJobRegister.vue @@ -447,7 +447,7 @@ uni.chooseMedia({ count: 1, mediaType: ['image'], - sourceType: ['album'], + sourceType: ['camera', 'album'], success(res) { uni.showLoading({ title: '加载中...', diff --git a/package1/order/orderEvaluate.vue b/package1/order/orderEvaluate.vue index 6409530..29864ec 100644 --- a/package1/order/orderEvaluate.vue +++ b/package1/order/orderEvaluate.vue @@ -249,7 +249,7 @@ uni.chooseMedia({ count: 1, mediaType: ['image'], - sourceType: ['album'], + sourceType: ['camera', 'album'], success(res) { uni.showLoading({ title: '加载中...', diff --git a/package1/runErrand/runErrand.vue b/package1/runErrand/runErrand.vue index 7cc2836..166ba3d 100644 --- a/package1/runErrand/runErrand.vue +++ b/package1/runErrand/runErrand.vue @@ -660,7 +660,7 @@ uni.chooseMedia({ count: 1, mediaType: ['image'], - sourceType: ['album'], + sourceType: ['camera', 'album'], success(res) { uni.showLoading({ title: '加载中...',