diff --git a/package1/group/shopEvaluate.vue b/package1/group/shopEvaluate.vue index 21f9ec3..d06cc6d 100644 --- a/package1/group/shopEvaluate.vue +++ b/package1/group/shopEvaluate.vue @@ -59,7 +59,7 @@ {{item.remark}} - + @@ -68,6 +68,7 @@ {{item1.createByName}} : {{ item1.remark }} + 展开 @@ -75,6 +76,39 @@ + + + 回复 + + + + + + + + + + + + + + + + + + + + + 确认 + + + 取消 + + + + @@ -91,8 +125,10 @@ export default { data() { return { + replyText:'', + isMerchant:0, + replyPicture:"", isExpanded: false, - replyText: '感谢您的评价,希望可以带给您更好的体验。我们会继续努力,优化服务,欢迎再次光临!如果您有任何建议,也欢迎随时告诉我们。感谢您的支持与喜爱!', menuButtonInfo: {}, isPintuan: true, bigImg: '', @@ -153,7 +189,14 @@ } }, onLoad(option) { + this.isMerchant = option.isMerchant this.shopItem = JSON.parse(option.item) + if(option.isCha == 1){ //待回复差评进来的 + this.searchForm.score = 1 + this.searchForm.hasAnswer= 0 + this.menuList[0].checked = false + this.menuList[2].checked = true + } this.getshopComments(this.shopItem.id) }, onShow() { @@ -171,6 +214,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].shopId, + 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 +286,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' @@ -426,7 +554,7 @@ font-size: 26rpx; color: #555; padding: 12rpx; - transition: all 0.2s; + transition: all 1s; height: 70rpx; flex: 1; } @@ -443,7 +571,7 @@ /* 展开状态:固定高度100px,可滚动 */ .reply-content.expanded { display: block; - height: 200rpx; + height: auto; /* 固定高度100px */ overflow-y: auto; /* 内容超长时滚动 */ @@ -451,6 +579,7 @@ -webkit-line-clamp: unset; -webkit-box-orient: unset; text-overflow: clip; + padding-bottom: 10px; } /* 滚动条美化(可选) */ @@ -462,4 +591,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: '加载中...', diff --git a/package2/shop/merchantCenter.vue b/package2/shop/merchantCenter.vue index fde174a..ef0758d 100644 --- a/package2/shop/merchantCenter.vue +++ b/package2/shop/merchantCenter.vue @@ -73,7 +73,7 @@ 待退款/售后 - + {{shopData.pendingBadReviewCount == undefined?0:shopData.pendingBadReviewCount}} @@ -150,7 +150,7 @@ 账单结算 - + @@ -283,7 +283,7 @@ shopScore:uni.getStorageSync('shopScore'), id:uni.getStorageSync('shopId') } - url = '/package1/group/shopEvaluate?item=' + JSON.stringify(item) + url = '/package1/group/shopEvaluate?item=' + JSON.stringify(item) + '&isMerchant=1&isCha=' + (index =='cha'?1:0) break; case 'hx': this.scanCodeAdd() diff --git a/package2/shop/merchantRegister.vue b/package2/shop/merchantRegister.vue index e03a014..c4bd196 100644 --- a/package2/shop/merchantRegister.vue +++ b/package2/shop/merchantRegister.vue @@ -249,7 +249,7 @@ uni.chooseMedia({ count: type == 'qita'?9:1, mediaType: ['image'], - sourceType: ['album'], + sourceType: ['camera', 'album'], success(res) { uni.showLoading({ title: '加载中...',