Commit f84bb3ff authored by xieyishang's avatar xieyishang

新增订单评价回复

parent 623fb1ad
......@@ -2,8 +2,8 @@
"name" : "鹿马商家助手",
"appid" : "__UNI__1EA80F1", //这个是 web
"description" : "商家",
"versionName" : "1.172",
"versionCode" : 1172,
"versionName" : "1.173",
"versionCode" : 1173,
"transformPx" : false,
"compatible" : {
"ignoreVersion" : true //true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持
......
......@@ -449,6 +449,16 @@
"app-plus": {
"scrollIndicator": "none"
}
}
},
{
"path": "pages/evaluate/evaluate",
"style": {
"navigationBarTitleText": "评价管理",
"app-plus": {
"scrollIndicator": "none"
}
}
}
......
.EvaluationList{
margin: 0 24upx;
.MyEvaluationItem{
background:rgba(255,255,255,1);
border-radius:14upx;
padding: 20upx;
margin-bottom: 20upx;
.userinfo{
.usertx{
width:40px;
height:40px;
border-radius:50%;
margin-right: 23upx;
}
.namebox{
.name{
font-size:32upx;
color:rgba(51,51,51,1);
}
.time{
font-size:28upx;
color:rgba(182,182,182,1);
}
}
}
//评论的内容
.plcontent{
margin-top: 46upx;
.neir{
font-size:30upx;
color:rgba(0,0,0,1);
margin-bottom: 26upx;
}
.imglist{
margin-bottom: 27upx;
.imgs{
width:180upx;
height:180upx;
border-radius:4upx;
margin-right: 30upx;
}
.imgs:nth-last-child(1){
margin-right: 0;
}
}
}
//产品信息
.projuctinfo{
background: #FFF1EA;
.imgsdf{
width: 128upx;
height: 128upx;
margin-right: 27upx;
}
.prorig{
.title{
font-size:28upx;
color:rgba(0,0,0,1);
}
.specs{
font-size:26upx;
color:rgba(104,103,103,1);
.text{
margin-right: 10upx;
}
}
.pricefo{
font-size:26upx;
color:rgba(255,105,0,1);
}
}
}
}
}
.reply_contentbox{
padding: 11px;
background: whitesmoke;
font-size: 12px;
font-family: PingFang SC;
font-weight: bold;
color: #2E2D2D;
margin-bottom: 20upx;
}
.pltexts{
color: #000;
font-size: 26upx;
}
.pingfengboxs{
text-align: center;
}
.btnpltag{
margin: 20upx 0;
}
.btnpl{
width:196rpx;
height:70rpx;
background:rgba(255,105,0,1);
border-radius:5rpx;
font-size:30rpx;
font-weight:500;
color:rgba(254,254,254,1);
text-align: center;
line-height: 70rpx;
}
.replybox{
background-color: #ffffff;
position: relative;
width: 100%;
height: 700upx;
padding: 20upx;
border-radius: 14upx 14rpx 0 0;
.cloneicon{
position: absolute;
top:20upx;
right:20upx;
width: 50upx;
height: 50upx;
}
.imclearicon{
width: 50upx;
height: 50upx;
}
.huifunei{
font-size: 36rpx;
font-weight: bold;
color: rgba(51,51,51,1);
padding: 20rpx 0;
box-sizing: border-box;
display: flex;
justify-content: space-between;
align-items: center;
}
.conts{
width: 710upx;
height: auto;
margin-top: 30rpx;
}
.areas{
width: 100%;
height:340rpx;
font-size: 30rpx;
border: 1px solid gainsboro;
padding: 30rpx;
margin: 0 auto;
overflow: hidden;
position: relative;
}
.submitss1{
margin-top: 60upx;
width: 100%;
height: 88rpx;
line-height: 88rpx;
text-align: center;
background: #f64f15!important;
font-size: 32rpx;
font-weight: 500;
color: rgba(255,255,255,1);
}
}
\ No newline at end of file
<template>
<!-- 商家查看评价 -->
<view class="evaluate">
<view class="EvaluationList" v-if="datalist.length!=0 ">
<view class="MyEvaluationItem" v-for="(item,index) in datalist" :key="index">
<view class="flex ali-c jus-b">
<view class="userinfo flex ali-c ">
<image class="usertx" :src="item.face" mode=""></image>
<view class="namebox">
<view class="name">{{item.nickname}}</view>
<view class="time">{{item.create_time}}</view>
</view>
</view>
<view class="pingfengboxs">
<!-- <Starscom :fenshu="item.score"></Starscom> -->
<!-- <view class="pltexts" v-if="item.score==5">非常满意</view>
<view class="pltexts" v-if="item.score==4">满意</view>
<view class="pltexts" v-if="item.score==3">一般</view>
<view class="pltexts" v-if="item.score==2">不满意</view>
<view class="pltexts" v-if="item.score==1">很不满意</view>
<view class="pltexts" v-if="item.score==0">用户未评分</view> -->
</view>
</view>
<!-- 评论的内容 -->
<view class="plcontent">
<view class="neir">
<view class="plcon">{{item.content}}</view>
</view>
<view class="imglist" v-if="item.img_url.length!=0">
<image v-for="(item1,index1) in item.img_url" :key="index1" class="imgs" :src="staticUrl+item1" mode=""></image>
</view>
</view>
<!-- 商家回复 -->
<view class="reply_contentbox" v-if="item.reply_content">
店家回复:{{item.reply_content}}
</view>
<view class="btnpltag jus-e" @tap="replyfun(item,index)">
<view class="btnpl" v-if="!item.reply_content">
回复此用户
</view>
</view>
<!-- 产品信息 -->
<view class="projuctinfo flex ali-c 111" hover-class="uni-list-cell-hover" @tap="todetaile(item)" v-if="item.goodsInfo">
<!-- 商城 -->
<image class="imgsdf" :src="staticUrl+item.goodsInfo[0].photo" v-if='item.goodsInfo[0].photo!=null'></image>
<image class="imgsdf" src="/static/news/kjzf.png" v-else-if="item.goodsInfo[0].goods_name=='快捷支付' "></image>
<image class="imgsdf" src="/static/chat/imgloaderr.png" v-else></image>
<view class="prorig flex1">
<view class="title twoline">{{item.goodsInfo[0].goods_name}}</view>
</view>
</view>
</view>
</view>
<uni-popup :show="showtip" type="bottom" :mask-click="false" @change="change">
<view class="replybox" >
<view class="huifunei">回复 [{{replydata.nickname}}]</view>
<view class="cloneicon" @tap="clearfun">
<image class="imclearicon" src="/static/chat/imclearicon.png" mode=""></image>
</view>
<view class="conts">
<textarea v-model="reply_content" class="areas" placeholder='请填写回复他的内容' maxlength="150" ></textarea>
</view>
<view class="submitss1" @tap="submitplda" >完成</view>
</view>
</uni-popup>
</view>
</template>
<script>
import { storeComment,replyComment } from "@/utils/api/api.js";
export default {
data(){
return {
page:0,
datalist:[],
isshowall:false,
shop_type:'',//店铺类型
showtip:false,
replydata:{},//回复的对象
replyindex:-1,
reply_content:"",//评论的内容
}
},
computed: {
staticUrl () {//静态资源地址
return this.$store.state.staticUrl;
},
staticUrl1 () {//静态资源地址
return this.$store.state.staticUrl1;
},
uploadurl(){
return this.$store.state.uploadurl;
}
},
onLoad(opdata){
console.info(opdata,"opdata")
this.shop_type = opdata.shop_type;
this.storeCommentfun();
},
onReachBottom(){
if(!this.isshowall){
this.storeCommentfun();
}
},
methods:{
//提交评论的内容
submitplda(){
if(this.reply_content==""){
this.$api.msg("内容不能为空!");
return false;
}
this.showtip = false;
replyComment({
reply_content:this.reply_content,
id:this.replydata.id,
}).then((res)=>{
console.info(res);
if(res.code==0){
this.replydata = {};
this.datalist[this.replyindex].reply_content = this.reply_content;
this.reply_content="";
this.$api.msg(res.msg);
this.replyindex = -1;
}else{
this.$api.msg(res.msg);
}
})
},
//回复
replyfun(data,index){
console.info('666');
this.replydata = data;
this.replyindex = index;
this.showtip = true;
},
//直接关闭
clearfun(){
this.showtip = false;
},
//提示弹窗
change(e) {
if (!e.show) {
this.showtip = false
}
},
storeCommentfun(){
this.page++;
storeComment({
page:this.page,
}).then((res)=>{
console.info(res);
if(res.code==0){
let list = res.data.list;
list = list.map((item,index)=>{
if(item.img_url!=""){
// item.img_ur =
let img_url = item.img_url;
img_url = img_url.split(";");
item.img_url = img_url;
}else{
item.img_ur = [];
}
return item
})
this.datalist = [...this.datalist,...list];
if(res.data.list.length==0){
this.isshowall = true;
if(this.page!=1){
this.$api.msg("没有更多了~");
}
}
}
})
},
//点击后查看订单详情
todetaile(data){
console.info(data,"data",this.shop_type);
let order_id = data.order_id;
if(this.shop_type=='ele'){
//外卖订单
uni.navigateTo({
url:`/pages/order/detail/detail?id=${order_id}`,
})
}else if(this.shop_type=='goods'){
//商城订单
uni.navigateTo({
url:`/pages/order/shoporderdetail/shoporderdetail?order_id=${order_id}`,
})
}
}
},
}
</script>
<style lang="scss">
@import "./evaluate.scss";
</style>
......@@ -247,6 +247,12 @@
</view>
</navigator>
</view>
<view class="jiu_max " v-if="shop_type == 'ele'">
......@@ -317,6 +323,18 @@
</navigator>
</view>
<view class="jiu_max " v-if="shop_type == 'ele' || shop_type=='goods'">
<navigator :url="'/pages/evaluate/evaluate?shop_type='+shop_type">
<view class="jiu_min">
<view>
<image class="img" src="/static/news/pingjia.png" mode=""></image>
</view>
<view>评价管理</view>
</view>
</navigator>
</view>
</view>
<view class="BH"></view>
......
......@@ -585,4 +585,15 @@ export function getVoiceToken(data) {
//导IM 聊天系统账号
export function importShopAccount(data) {
return request.post('User/importShopAccount', data, { noAuth: false });
}
\ No newline at end of file
}
//商家查看评价
export function storeComment(data) {
return request.post('Store/storeComment', data, { noAuth: false });
}
//回复评论
export function replyComment(data) {
return request.post('Store/replyComment', data, { noAuth: false });
}
......@@ -5,8 +5,8 @@ module.exports = {
// isdebug:false,//正式
isdebug:true,//测试
isdebug:false,//正式
// isdebug:true,//测试
// xqdebug:false,//正式权限
xqdebug:true,//发布审核权限 也是测试环境的 主要用于ios
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment