Commit 2c1f00a6 authored by Mac's avatar Mac

评论提交

parent d756052c
...@@ -439,6 +439,14 @@ ...@@ -439,6 +439,14 @@
} }
},{ },{
"path":"personal/cardList" "path":"personal/cardList"
},{
"path":"personal/receivecard"
},{
"path":"personal/order-commit"
},{
"path":"personal/order-commit-details"
},{
"path":"commentList"
} }
] ]
}, },
......
<template>
<view class="commentList" :style="{ height: contentHeight }">
<u-tabs name="name" :list="list" :is-scroll="false" :current="current" @change="change" :active-color="mainColor"></u-tabs>
<u-empty v-if="g.length == 0" text="暂无评论" mode="list"></u-empty>
<view v-if="g.length > 0" style="
height: calc(100vh - 50px);
width: calc(100vw);
overflow: hidden;">
<scroll-view :scroll-y="true" :enable-back-to-top="true" :enable-flex="true" @scrolltolower="lower" :style="{ height: '100%' }">
<view class="comment u-skeleton-rect">
<view class="content" v-for="(item, index) in g" :key='index'>
<view class="u-box">
<view class="user">
<u-avatar :src="item.UserPhotoPath" :size="50"></u-avatar>
<text style="margin:0 10px;overflow: hidden; white-space: nowrap;max-width: 200rpx;text-overflow: ellipsis;margin-bottom: 2px;">{{ item.UserName }}</text>
<u-rate
:current="item.CommentScore"
active-color="#FFC86D"
inactive-color="#b2b2b2"
active-icon="star"
inactive-icon="star-o"
size="26"
:disabled="true"
></u-rate>
</view>
<view class="timer">{{ item.CreateDate }}</view>
</view>
<view class="ucontent" style="line-height: 22px;">{{ item.Content }}</view>
<view class="plimg">
<image v-for="(x, j) in item.CommentImgList" :key="j" class="plimg-item" mode="aspectFill" :src="x"
@click="previewImage2(j,item.CommentImgList)" :style="{'width':san,'height':san}" />
</view>
<view class="reply" v-if="item.Reply && item.Reply!=''">
<view style="font-size: 12px;color: #121212;">回复:</view>
<view style="font-size: 12px;color: #9A9A9A;margin-top: 3px;">{{item.Reply}}</view>
</view>
</view>
</view>
<u-loadmore :status="status" :load-text="loadText" :font-size="24" :margin-top="20" :margin-bottom="20" bg-color="#f3f4f6" />
</scroll-view>
</view>
<!-- 加载中 -->
<view class="loading" v-if="loading">
<u-loading mode="flower" size="48">></u-loading>
<Text style="color: #fff; margin-top: 10rpx;">加载中...</Text>
</view>
<!-- 取消提示 -->
<u-toast ref="uToast" />
</view>
</template>
<script>
export default {
data() {
return {
pageTitle: "评论",
current: 0,
list: [
],
msg: {
pageIndex: 1,
pageSize: 10,
CommentGrade: 0,
GoodsId: 0,
StoreId:0,
ServicePersonalId:0,
},
mainColor: "",
secondary: '',
contentHeight: 0,
page: 1,
page_count: 1,
g: [],
loading: false,
san: '100px',
status: "loadmore",
loadText: {
loadmore: "轻轻上拉,加载更多",
loading: "努力加载中",
nomore: "没有更多了",
},
};
},
created() {
this.contentHeight = this.$utils.calcContentHeight(-40) + "px";
this.mainColor = this.$uiConfig.mainColor;
this.secondary = this.$uiConfig.secondary;
},
mounted() {
uni.setNavigationBarTitle({
title: this.pageTitle,
});
let that = this
uni.getSystemInfo({
success(res) {
that.san = (res.windowWidth - 30 - 9) / 3 + 'px'
}
})
},
onLoad(options) {
if (options ) {
if(options.GoodsId){
this.msg.GoodsId = options.GoodsId;
}
if(options.StoreId){
this.msg.StoreId = options.StoreId;
}
if(options.ServicePersonalId){
this.msg.ServicePersonalId = options.ServicePersonalId;
}
this.getAppletGoodsCommentStatistics(); //获取商品评论数
}
},
methods: {
//图片预览
previewImage2(index, images) {
uni.previewImage({
urls: images,
current: index,
});
},
change(index) {
this.current = index;
this.msg.CommentGrade = this.list[index].Id
this.msg.pageIndex = 1;
this.g = [];
this.loading = true;
this.init();
},
init() {
this.loading = true;
this.request2({
url: '/api/AppletStores/GetAppletGoodsCommentPageList',
data: this.msg
},
res => {
if (res.resultCode == 1) {
this.loading = false;
this.g = this.g.concat(res.data.pageData);
this.page_count = res.data.pageCount;
if (this.page_count == 1) {
this.status = "nomore";
}
}
}
);
},
getAppletGoodsCommentStatistics() {
this.request2({
url: "/api/AppletGuideCar/GetAppletGoodsCommentStatistics",
data: {
GoodsId: this.msg.GoodsId
},
},
(res) => {
let data = res.data.List
data.forEach(x => {
x.name = x.Name + '(' + x.Count + ')'
})
data.unshift({
name: '全部',
Id: 0
})
this.list = data
this.msg.CommentGrade = data[0].Id
this.init();
}
);
},
lower(e) {
if (this.msg.pageIndex < this.page_count) {
this.msg.pageIndex++;
this.status = "loading";
this.init();
} else {
this.status = "nomore";
}
},
},
};
</script>
<style>
.commentList {
width: 100%;
height: 100%;
background: #f3f4f6;
}
.commentList .loading {
width: 200rpx;
height: 200rpx;
background: #000000;
opacity: 0.7;
border-radius: 10rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
position: fixed;
left: 50%;
top: 30%;
margin-left: -100rpx;
z-index: 999;
}
.commentList .interDList {
width: 100%;
padding: 20px 15px;
display: flex;
flex-direction: column;
background: #fff;
margin-top: 10px;
}
.commentList .comment {
background: #fff;
font-family: aa;
padding: 15px;
}
.commentList .comment .content {
display: flex;
flex-direction: column;
margin-bottom: 15px;
}
.commentList .comment .content .u-box {
display: flex;
margin-bottom: 10px;
align-items: center;
}
.commentList .comment .content .u-box .user {
flex: 1;
font-size: 13px;
color: #111111;
font-weight: bold;
align-items: center;
display: flex;
}
.commentList .comment .content .u-box .timer {
font-size: 12px;
color: #999999;
text-align: right;
}
.commentList .comment .content .u-box .ucontent {
font-size: 11px;
color: #000;
margin-top: 10px;
}
.commentList .comment .content .u-box .plimg{
display: flex;
flex-direction: row;
flex-wrap: wrap;
margin-top: 10px;
}
.commentList .plimg-item{
margin-right: 3px;
/* margin-bottom: 3px; */
}
.commentList .reply{
width: 100%;
padding: 10px;
background: #F5F6F7;
border-radius: 3px;
margin-top: 10px;
}
</style>
\ No newline at end of file
...@@ -237,6 +237,59 @@ ...@@ -237,6 +237,59 @@
font-size: 14px; font-size: 14px;
color: #FFFFFF; color: #FFFFFF;
} }
.designerDetail .comment2 {
background: #fff;
font-family: aa;
padding: 15px;
}
.designerDetail .comment .content {
display: flex;
flex-direction: column;
margin-bottom: 15px;
}
.designerDetail .comment .content .u-box {
display: flex;
margin-bottom: 10px;
align-items: center;
}
.designerDetail .comment .content .u-box .user {
flex: 1;
font-size: 13px;
color: #111111;
font-weight: bold;
align-items: center;
display: flex;
}
.designerDetail .comment .content .u-box .timer {
font-size: 12px;
color: #999999;
text-align: right;
}
.designerDetail .comment .content .u-box .ucontent {
font-size: 11px;
color: #000;
margin-top: 10px;
}
.designerDetail .comment .content .u-box .plimg{
display: flex;
flex-direction: row;
flex-wrap: wrap;
margin-top: 10px;
}
.designerDetail .plimg-item{
margin-right: 3px;
/* margin-bottom: 3px; */
}
.designerDetail .reply{
width: 100%;
padding: 10px;
background: #F5F6F7;
border-radius: 3px;
margin-top: 10px;
}
</style> </style>
<template> <template>
<view class="designerDetail" v-if="loading"> <view class="designerDetail" v-if="loading">
...@@ -332,7 +385,7 @@ ...@@ -332,7 +385,7 @@
</view> </view>
<view class="title">TA可服务的商品<text style="font-size: 11px;color: #1B1D1E;">({{personal.goodsList.length}})</text></view> <view class="title">TA可服务的商品<text style="font-size: 11px;color: #1B1D1E;">({{personal.goodsList.length}})</text></view>
<view class="d-goods"> <view class="d-goods">
<view class="d-goods-item" v-for="(c, j) in personal.goodsList" :key="c"> <view class="d-goods-item" v-for="(c, j) in personal.goodsList" :key="c" @click="gogoods(c)">
<image style="width: 125px;height: 70px;border-radius: 4px;" mode="aspectFill" :src="c.CoverImage"/> <image style="width: 125px;height: 70px;border-radius: 4px;" mode="aspectFill" :src="c.CoverImage"/>
<view class="d-goods-item-r"> <view class="d-goods-item-r">
<view class="item-r-title" style="font-size: 14px;color: #1B1D1E;">{{c.Name}}</view> <view class="item-r-title" style="font-size: 14px;color: #1B1D1E;">{{c.Name}}</view>
...@@ -350,10 +403,43 @@ ...@@ -350,10 +403,43 @@
</view> </view>
<view style="width: 100%;height: 15px;background: #FAF8F9;" ></view> <view style="width: 100%;height: 15px;background: #FAF8F9;" ></view>
<view class="comment" style="padding-bottom: 80px;"> <view class="comment" style="padding-bottom: 80px;">
<view class="title-t"> <view class="title-t" >
<view style="display: flex;flex-direction: row;">评价</view> <view style="display: flex;flex-direction: row;justify-content: space-between;" @click="gocomment()">
评价{{count>0?'('+count+')':''}}
<u-icon name="arrow" :size="30" color="#666666"></u-icon>
</view>
</view>
<view class="comment2 u-skeleton-rect">
<view class="content" v-for="(item, index) in comments" :key='index'>
<view class="u-box">
<view class="user">
<u-avatar :src="item.UserPhotoPath" :size="50"></u-avatar>
<text style="margin:0 10px;overflow: hidden; white-space: nowrap;max-width: 200rpx;text-overflow: ellipsis;margin-bottom: 2px;">{{ item.UserName }}</text>
<u-rate
:current="item.CommentScore"
active-color="#FFC86D"
inactive-color="#b2b2b2"
active-icon="star"
inactive-icon="star-o"
size="26"
:disabled="true"
></u-rate>
</view>
<view class="timer">{{ item.CreateDate }}</view>
</view>
<view class="ucontent" style="line-height: 22px;">{{ item.Content }}</view>
<view class="plimg">
<image v-for="(x, j) in item.CommentImgList" :key="j" class="plimg-item" mode="aspectFill" :src="x"
@click="previewImage2(j,item.CommentImgList)" :style="{'width':san,'height':san}" />
</view>
<view class="reply" v-if="item.Reply!=''">
<view style="font-size: 12px;color: #121212;">回复:</view>
<view style="font-size: 12px;color: #9A9A9A;margin-top: 3px;">{{item.Reply}}</view>
</view>
</view>
</view> </view>
<view v-if="comment.length==0" style="width: 100%;height: 50px;line-height: 50px;text-align: center;" > <view v-if="comments.length==0" style="width: 100%;height: 50px;line-height: 50px;text-align: center;" >
暂无评价~ 暂无评价~
</view> </view>
...@@ -388,9 +474,11 @@ ...@@ -388,9 +474,11 @@
{name: '服务项目'}, {name: '服务项目'},
{name: '评价'}, {name: '评价'},
], ],
san: '100px',
allCoupon:[], allCoupon:[],
comment:[], comments:[],
u:{}, u:{},
count:0,
}; };
}, },
...@@ -410,7 +498,8 @@ ...@@ -410,7 +498,8 @@
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: this.pageTitle, title: this.pageTitle,
}); });
let windowWidth = this.$utils.SystemInfo().windowWidth
this.san=(windowWidth - 30-9) / 3 + 'px'
}, },
...@@ -432,6 +521,11 @@ ...@@ -432,6 +521,11 @@
} }
); );
}, },
gocomment(){//评论列表
uni.navigateTo({
url: "/pages/reserve/commentList?StoreId="+this.storeId+'&ServicePersonalId='+this.ID
})
},
getAllCPList(){//获取门店套餐卡 getAllCPList(){//获取门店套餐卡
this.request2({ this.request2({
url: '/api/AppletStores/GetAllCouponPageList', url: '/api/AppletStores/GetAllCouponPageList',
...@@ -448,12 +542,13 @@ ...@@ -448,12 +542,13 @@
getAppCommentList(){ getAppCommentList(){
this.request2({ this.request2({
url: '/api/AppletStores/GetAppletGoodsCommentPageList', url: '/api/AppletStores/GetAppletGoodsCommentPageList',
data: {pageIndex:1,pageSize:10,StoreId:this.storeId,GoodsId:0,ServicePersonalId:this.ID} data: {pageIndex:1,pageSize:5,StoreId:this.storeId,GoodsId:0,ServicePersonalId:this.ID}
}, },
res => { res => {
if (res.resultCode == 1) { if (res.resultCode == 1) {
this.comment = res.data.pageData this.comments = res.data.pageData;
this.count=res.data.count
} }
} }
); );
...@@ -488,6 +583,11 @@ ...@@ -488,6 +583,11 @@
url: "/pages/reserve/personal/couponDetail?ID="+item.CouponId, url: "/pages/reserve/personal/couponDetail?ID="+item.CouponId,
}) })
}, },
gogoods(item){//商品详情
uni.navigateTo({
url: "/pages/reserve/goodsDetails?GoodsId="+item.Id,
})
},
gosubscribe(){ gosubscribe(){
this.u = uni.getStorageSync("mall_UserInfo"); this.u = uni.getStorageSync("mall_UserInfo");
if (this.u) { if (this.u) {
...@@ -505,6 +605,13 @@ ...@@ -505,6 +605,13 @@
gbAuth() { gbAuth() {
this.showAuth = false; this.showAuth = false;
}, },
//图片预览
previewImage2(index, images) {
uni.previewImage({
urls: images,
current: index,
});
},
}, },
}; };
</script> </script>
......
...@@ -120,11 +120,11 @@ ...@@ -120,11 +120,11 @@
<view class="sku-box u-skeleton-rect" v-if="comments.length == 0 && setting.is_comment == 1"> <view class="sku-box u-skeleton-rect" v-if="comments.length == 0 && setting.is_comment == 1">
<view class="label">暂无评论信息</view> <view class="label">暂无评论信息</view>
</view> </view>
<view class="comment" v-if="comments.length > 0"> <view class="comment2" v-if="comments.length > 0">
<view class="chead"> <view class="chead">
<u-section <u-section
:bold="false" :bold="false"
:sub-color="secondary"
:show-split="false" :show-split="false"
:title="`商品评价(${comments.length})`" :title="`商品评价(${comments.length})`"
sub-title="查看更多" sub-title="查看更多"
...@@ -132,25 +132,38 @@ ...@@ -132,25 +132,38 @@
font-size="24" font-size="24"
></u-section> ></u-section>
</view> </view>
<view class="content">
<view class="u-box"> <view class="comment u-skeleton-rect">
<view class="user"> <view class="content" v-for="(item, index) in comments" :key='index'>
<u-avatar :src="comments[0].UserPhotoPath" :size="50"></u-avatar> <view class="u-box">
<text style="margin-left: 10px;">{{ comments[0].UserName }}</text> <view class="user">
<u-rate <u-avatar :src="item.UserPhotoPath" :size="50"></u-avatar>
:current="comments[0].CommentScore" <text style="margin:0 10px;overflow: hidden; white-space: nowrap;max-width: 200rpx;text-overflow: ellipsis;margin-bottom: 2px;">{{ item.UserName }}</text>
active-color="#FA3534" <u-rate
inactive-color="#b2b2b2" :current="item.CommentScore"
active-icon="star" active-color="#FFC86D"
inactive-icon="star-o" inactive-color="#b2b2b2"
size="20" active-icon="star"
:disabled="true" inactive-icon="star-o"
></u-rate> size="26"
</view> :disabled="true"
<view class="timer">{{ comments[0].CreateDate }}</view> ></u-rate>
</view> </view>
<view class="ucontent">{{ comments[0].Content }}</view> <view class="timer">{{ item.CreateDate }}</view>
</view> </view>
<view class="ucontent" style="line-height: 22px;">{{ item.Content }}</view>
<view class="plimg">
<image v-for="(x, j) in item.CommentImgList" :key="j" class="plimg-item" mode="aspectFill" :src="x"
@click="previewImage2(j,item.CommentImgList)" :style="{'width':san,'height':san}" />
</view>
<view class="reply" v-if="item.Reply!=''">
<view style="font-size: 12px;color: #121212;">回复:</view>
<view style="font-size: 12px;color: #9A9A9A;margin-top: 3px;">{{item.Reply}}</view>
</view>
</view>
</view>
</view> </view>
<u-divider :margin-top="20" :margin-bottom="20" bg-color="transparent">商品详情</u-divider> <u-divider :margin-top="20" :margin-bottom="20" bg-color="transparent">商品详情</u-divider>
<view class="details"> <view class="details">
...@@ -243,6 +256,8 @@ export default { ...@@ -243,6 +256,8 @@ export default {
u: {}, u: {},
vipState: {}, vipState: {},
Up:0, Up:0,
san: '100px',
StoreId:0,
}; };
}, },
components: { components: {
...@@ -302,6 +317,9 @@ export default { ...@@ -302,6 +317,9 @@ export default {
withShareTicket: true, withShareTicket: true,
menus: ["shareAppMessage", "shareTimeline"], menus: ["shareAppMessage", "shareTimeline"],
}); });
let windowWidth = this.$utils.SystemInfo().windowWidth
this.san=(windowWidth - 30-9) / 3 + 'px';
this.StoreId = uni.getStorageSync("storeId")?uni.getStorageSync("storeId").storeId:0;
}, },
onShareTimeline() { onShareTimeline() {
setTimeout(() => { setTimeout(() => {
...@@ -403,8 +421,8 @@ export default { ...@@ -403,8 +421,8 @@ export default {
}, },
clickCommentHandler() { clickCommentHandler() {
uni.navigateTo({ uni.navigateTo({
url: "/pages/goods/comment-list?id=" + this.id, url: "/pages/reserve/commentList?StoreId="+this.StoreId+'&GoodsId='+this.id
}); })
}, },
getVipId() { getVipId() {
//获取会员ID //获取会员ID
...@@ -512,21 +530,16 @@ export default { ...@@ -512,21 +530,16 @@ export default {
}, },
initComments() { initComments() {
this.msg.GoodsId = this.id; this.msg.GoodsId = this.id;
this.request2( this.request2({
{ url: '/api/AppletStores/GetAppletGoodsCommentPageList',
url: "/api/AppletOrder/GetAppletGoodsCommentPageList", data: {pageIndex:1,pageSize:5,StoreId:this.StoreId,GoodsId:this.id,ServicePersonalId:0}
data: this.msg, },
}, res => {
(res) => {
this.comments = res.data.pageData; if (res.resultCode == 1) {
this.comments = res.data.pageData
}
}, }
(err) => {
this.u = uni.getStorageSync("mall_UserInfo");
this.init();
this.initPage();
}
); );
}, },
...@@ -591,7 +604,14 @@ export default { ...@@ -591,7 +604,14 @@ export default {
} else { } else {
this.showAuth = true; this.showAuth = true;
} }
} },
//图片预览
previewImage2(index, images) {
uni.previewImage({
urls: images,
current: index,
});
},
}, },
...@@ -685,44 +705,17 @@ export default { ...@@ -685,44 +705,17 @@ export default {
} }
.goods .comment { .goods .comment2 {
margin: 10px 0; margin: 10px 0;
background: #fff; background: #fff;
padding: 10px; padding: 10px;
} }
.goods .comment .chead { .goods .comment2 .chead {
padding-bottom: 10px; padding-bottom: 10px;
border-bottom: 1px solid #f1f1f1; border-bottom: 1px solid #f1f1f1;
} }
.goods .comment .content {
display: flex;
flex-direction: column;
margin-top: 15px;
}
.goods .comment .content .u-box {
display: flex;
margin-bottom: 10px;
align-items: center;
}
.goods .comment .content .u-box .user {
flex: 1;
font-size: 12px;
color: gray;
align-items: center;
display: flex;
}
.goods .comment .content .u-box .timer {
font-size: 12px;
color: gray;
text-align: right;
flex: 1;
}
.goods .comment .content .u-box .ucontent {
font-size: 12px;
color: #000;
margin-top: 10px;
}
.goods .detals { .goods .detals {
padding: 10px; padding: 10px;
background: #fff; background: #fff;
...@@ -784,4 +777,57 @@ export default { ...@@ -784,4 +777,57 @@ export default {
align-items: flex-end; align-items: flex-end;
font-size: 13px; font-size: 13px;
} }
.goods .comment {
background: #fff;
font-family: aa;
/* padding: 15px; */
}
.goods .comment .content {
display: flex;
flex-direction: column;
margin-bottom: 15px;
}
.goods .comment .content .u-box {
display: flex;
margin-bottom: 10px;
align-items: center;
}
.goods .comment .content .u-box .user {
flex: 1;
font-size: 13px;
color: #111111;
font-weight: bold;
align-items: center;
display: flex;
}
.goods .comment .content .u-box .timer {
font-size: 12px;
color: #999999;
text-align: right;
}
.goods .comment .content .u-box .ucontent {
font-size: 11px;
color: #000;
margin-top: 10px;
}
.goods .comment .content .u-box .plimg{
display: flex;
flex-direction: row;
flex-wrap: wrap;
margin-top: 10px;
}
.goods .plimg-item{
margin-right: 3px;
/* margin-bottom: 3px; */
}
.goods .reply{
width: 100%;
padding: 10px;
background: #F5F6F7;
border-radius: 3px;
margin-top: 10px;
}
</style> </style>
...@@ -26,16 +26,20 @@ ...@@ -26,16 +26,20 @@
:style="{ height: '100%' }" :style="{ height: '100%' }"
> >
<view class="details"> <view class="details">
<view class="cd-t-box" v-for="(x, i) in g" :key="i" @click="gocoupon(x)"> <view class="cd-t-box" v-for="(x, i) in g" :key="i" @click="gocoupon(x)"
:style="{'background-image': msg.UseState ==0?'url(https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/cpoun.png)':'url(https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/cpounNo.png)'}"
>
<view style="display: flex;flex-direction: row;align-items: center;justify-content: space-between;"> <view style="display: flex;flex-direction: row;align-items: center;justify-content: space-between;">
<text style="font-size: 12px;color: rgba(239, 220, 203, 0.6);">{{x.Name}}</text> <text :style="{'font-size': '12px','color':msg.UseState ==0? 'rgba(239, 220, 203, 0.6)':'rgba(153, 153, 153, 0.6)'}">{{x.Name}}</text>
<view class="receivebtn" v-if="msg.UseState ==0" @click.stop="gouseUrl(x)">去使用</view> <view class="receivebtn" v-if="msg.UseState ==0" @click.stop="gouseUrl(x)">去使用</view>
</view> </view>
<text class="cd-tt" >{{x.Describe}}</text> <text class="cd-tt" :style="{'color':msg.UseState ==0? '#EFDCCB':'#999999'}">{{x.Describe}}</text>
<text style="font-size: 13px;">核销次数:{{x.HeXiao}}</text> <text :style="{'font-size': '13px','color':msg.UseState ==0? '#EFDCCB':'#999999'}">核销次数:{{x.HeXiao}}</text>
<view class="setmeal-pl" style="left: -12px;"></view> <view class="setmeal-pl" v-if="msg.UseState ==0" style="left: -12px;"></view>
<view class="setmeal-pl" style="right: -12px;"> </view> <view class="setmeal-pl" v-if="msg.UseState ==0" style="right: -12px;"> </view>
<image v-if="msg.UseState==1" mode="aspectFill" class="imgs" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/studycardsy.png" ></image>
<image v-if="msg.UseState==2" mode="aspectFill" class="imgs" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/studycardgq.png" ></image>
</view> </view>
</view> </view>
...@@ -253,7 +257,7 @@ export default { ...@@ -253,7 +257,7 @@ export default {
.cardList .cd-t-box{ .cardList .cd-t-box{
width: 100%; width: 100%;
height: 115px; height: 115px;
background-image: url('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/cpoun.png');
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: cover ; background-size: cover ;
padding:15px 20px; padding:15px 20px;
...@@ -288,7 +292,11 @@ export default { ...@@ -288,7 +292,11 @@ export default {
} }
.cardList .details .imgs{
width: 55px; height: 52px;
position: absolute;top: 0px;
right: 0px;
}
......
...@@ -122,8 +122,8 @@ ...@@ -122,8 +122,8 @@
this.dataList = param this.dataList = param
this.msg[0].GoodsId = param.GoodsId; this.msg[0].GoodsId = param.GoodsId;
this.msg[1].GoodsId = param.GoodsId; this.msg[1].GoodsId = param.GoodsId;
this.msg[0].StoreId = param.StoreId; this.msg[0].StoreId = param.StoresIds;
this.msg[1].ServicePersonalId = param.ServicePersonalId; this.msg[1].ServicePersonalId = param.ServicepersonalId;
this.msg[0].OrderDetailId = param.OrderDetailId; this.msg[0].OrderDetailId = param.OrderDetailId;
this.msg[1].OrderDetailId = param.OrderDetailId; this.msg[1].OrderDetailId = param.OrderDetailId;
this.goodsName = param.GoodsName; this.goodsName = param.GoodsName;
......
<template> <template>
<view class="commit-box"> <view class="commit-box">
<u-empty text="没有找到未评价的商品信息" font-size="36" mode="list" v-if="g.length == 0 && !loading"></u-empty> <u-empty text="没有找到未评价的商品信息" font-size="36" mode="list" v-if="g.length == 0 "></u-empty>
<view v-if="g.length > 0" style="height: 100vh;width: 100vw;overflow: hidden;padding:0 0 10px 0;"> <view v-if="g.length > 0" style="height: 100vh;width: 100vw;overflow: hidden;padding:0 0 10px 0;">
<scroll-view :scroll-y="true" @scrolltolower="lower" :enable-back-to-top="true" :enable-flex="true" :scroll-top="scrollTop" <scroll-view :scroll-y="true" @scrolltolower="lower" :enable-back-to-top="true" :enable-flex="true" :scroll-top="scrollTop"
@scroll="scroll" style="height: 100%; padding-bottom: 0px;"> @scroll="scroll" style="height: 100%; padding-bottom: 0px;">
...@@ -39,14 +39,14 @@ ...@@ -39,14 +39,14 @@
}, },
data() { data() {
return { return {
pageTitle: "评价中心", pageTitle: "待评价",
loading: false, loading: false,
g: [], g: [],
showLoading: false, showLoading: false,
loadText: { loadText: {
loadmore: "轻轻上拉,加载更多", loadmore: "轻轻上拉,加载更多",
loading: "努力加载中", loading: "努力加载中",
nomore: "没有更多评价商品了", nomore: "没有更多了",
}, },
status: "loadmore", status: "loadmore",
scrollTop: 0, scrollTop: 0,
......
...@@ -217,6 +217,59 @@ ...@@ -217,6 +217,59 @@
.storeDetails .richtext{ .storeDetails .richtext{
padding: 15px; padding: 15px;
} }
.storeDetails .comment {
background: #fff;
font-family: aa;
padding: 15px;
}
.storeDetails .comment .content {
display: flex;
flex-direction: column;
margin-bottom: 15px;
}
.storeDetails .comment .content .u-box {
display: flex;
margin-bottom: 10px;
align-items: center;
}
.storeDetails .comment .content .u-box .user {
flex: 1;
font-size: 13px;
color: #111111;
font-weight: bold;
align-items: center;
display: flex;
}
.storeDetails .comment .content .u-box .timer {
font-size: 12px;
color: #999999;
text-align: right;
}
.storeDetails .comment .content .u-box .ucontent {
font-size: 11px;
color: #000;
margin-top: 10px;
}
.storeDetails .comment .content .u-box .plimg{
display: flex;
flex-direction: row;
flex-wrap: wrap;
margin-top: 10px;
}
.storeDetails .plimg-item{
margin-right: 3px;
/* margin-bottom: 3px; */
}
.storeDetails .reply{
width: 100%;
padding: 10px;
background: #F5F6F7;
border-radius: 3px;
margin-top: 10px;
}
</style> </style>
<template> <template>
<scroll-view class='storeDetails' <scroll-view class='storeDetails'
...@@ -280,7 +333,7 @@ ...@@ -280,7 +333,7 @@
{{g.storeName?g.storeName:'无'}} {{g.storeName?g.storeName:'无'}}
</view> </view>
<view class="sN-r"> <view class="sN-r">
{{g.consumptionObj?g.consumptionObj.consumptionStoreName:''}} {{g.consumptionObj && g.consumptionObj.consumptionStoreName?g.consumptionObj.consumptionStoreName:''}}
</view> </view>
</view> </view>
<view class="store-news u-skeleton-rect"> <view class="store-news u-skeleton-rect">
...@@ -397,7 +450,46 @@ ...@@ -397,7 +450,46 @@
暂无设计师数据~ 暂无设计师数据~
</view> </view>
</view> </view>
<view class="title-c" @click="gocomment()">
<text>
评价{{count>0?'('+count+')':''}}
</text>
<u-icon name="arrow" :size="30" color="#666666"></u-icon>
</view>
<view class="comment u-skeleton-rect">
<view class="content" v-for="(item, index) in comments" :key='index'>
<view class="u-box">
<view class="user">
<u-avatar :src="item.UserPhotoPath" :size="50"></u-avatar>
<text style="margin:0 10px;overflow: hidden; white-space: nowrap;max-width: 200rpx;text-overflow: ellipsis;margin-bottom: 2px;">{{ item.UserName }}</text>
<u-rate
:current="item.CommentScore"
active-color="#FFC86D"
inactive-color="#b2b2b2"
active-icon="star"
inactive-icon="star-o"
size="26"
:disabled="true"
></u-rate>
</view>
<view class="timer">{{ item.CreateDate }}</view>
</view>
<view class="ucontent" style="line-height: 22px;">{{ item.Content }}</view>
<view class="plimg">
<image v-for="(x, j) in item.CommentImgList" :key="j" class="plimg-item" mode="aspectFill" :src="x"
@click="previewImage2(j,item.CommentImgList)" :style="{'width':san,'height':san}" />
</view>
<view class="reply" v-if="item.Reply!=''">
<view style="font-size: 12px;color: #121212;">回复:</view>
<view style="font-size: 12px;color: #9A9A9A;margin-top: 3px;">{{item.Reply}}</view>
</view>
</view>
</view>
<view class="sku-box u-skeleton-rect" style="justify-content: center;" v-if="comments.length == 0 && setting.is_comment == 1">
<view class="label">暂无评价信息</view>
</view>
<view class="title-c" > <view class="title-c" >
价目表 价目表
</view> </view>
...@@ -405,15 +497,8 @@ ...@@ -405,15 +497,8 @@
<h-parse :content="detailContent" @navigate="clickDescription"></h-parse> <h-parse :content="detailContent" @navigate="clickDescription"></h-parse>
</view> </view>
<view class="title-c" >
评价
</view>
<view class="comment u-skeleton-rect" style="height: 1000px;">
</view>
<view class="sku-box u-skeleton-rect" style="justify-content: center;" v-if="comments.length == 0 && setting.is_comment == 1">
<view class="label">暂无评价信息</view>
</view>
</view> </view>
<u-skeleton :loading="loading" :animation="true" bgColor="#FFF"></u-skeleton> <u-skeleton :loading="loading" :animation="true" bgColor="#FFF"></u-skeleton>
...@@ -455,9 +540,11 @@ ...@@ -455,9 +540,11 @@
list:[ list:[
{name: '优惠'}, {name: '优惠'},
{name: '设计师'}, {name: '设计师'},
{name: '价目表'},
{name: '评价'}, {name: '评价'},
{name: '价目表'},
], ],
san: '100px',
current: 0, current: 0,
headH:68, headH:68,
stickyH:0, stickyH:0,
...@@ -473,6 +560,7 @@ ...@@ -473,6 +560,7 @@
detailContent: "", detailContent: "",
personalList:[], personalList:[],
allCoupon:[], allCoupon:[],
count:0
} }
}, },
onLoad(option){ onLoad(option){
...@@ -514,11 +602,13 @@ ...@@ -514,11 +602,13 @@
this.init(); this.init();
this.getSPList()//获取服务人员列表 this.getSPList()//获取服务人员列表
this.getAllCPList()//获取门店套餐卡 this.getAllCPList()//获取门店套餐卡
wx.showShareMenu({ wx.showShareMenu({
withShareTicket: true, withShareTicket: true,
menus: ["shareAppMessage", "shareTimeline"], menus: ["shareAppMessage", "shareTimeline"],
}); });
let windowWidth = this.$utils.SystemInfo().windowWidth
this.san=(windowWidth - 30-9) / 3 + 'px'
}, },
onShareTimeline() { onShareTimeline() {
setTimeout(() => { setTimeout(() => {
...@@ -621,6 +711,7 @@ ...@@ -621,6 +711,7 @@
//登录在调用评论接口 //登录在调用评论接口
if (this.u) { if (this.u) {
// this.initComments(); // this.initComments();
this.getGoodsComment()
} }
} else { } else {
...@@ -657,6 +748,20 @@ ...@@ -657,6 +748,20 @@
} }
); );
}, },
getGoodsComment(){//获取评论
this.request2({
url: '/api/AppletStores/GetAppletGoodsCommentPageList',
data: {pageIndex:1,pageSize:5,StoreId:this.id,GoodsId:0,ServicePersonalId:0}
},
res => {
if (res.resultCode == 1) {
this.comments = res.data.pageData
this.count = res.data.count
}
}
);
},
scrollHandler(e) { scrollHandler(e) {
console.log(e.detail.scrollTop) console.log(e.detail.scrollTop)
this.scrollTop = e.detail.scrollTop; this.scrollTop = e.detail.scrollTop;
...@@ -709,6 +814,13 @@ ...@@ -709,6 +814,13 @@
phoneNumber: this.g.storeTel //仅为示例 phoneNumber: this.g.storeTel //仅为示例
}); });
}, },
//图片预览
previewImage2(index, images) {
uni.previewImage({
urls: images,
current: index,
});
},
getReceive() { getReceive() {
//分享进入调取领券接口 //分享进入调取领券接口
// 1-分享,2-购买并付款 // 1-分享,2-购买并付款
...@@ -742,6 +854,11 @@ ...@@ -742,6 +854,11 @@
url: "/pages/reserve/personalList?id="+this.id, url: "/pages/reserve/personalList?id="+this.id,
}) })
}, },
gocomment(){//评论列表
uni.navigateTo({
url: "/pages/reserve/commentList?StoreId="+this.id,
})
},
gosubscribe(){ gosubscribe(){
if (this.u) { if (this.u) {
uni.navigateTo({ uni.navigateTo({
...@@ -758,7 +875,7 @@ ...@@ -758,7 +875,7 @@
}, },
reloadUserinfo() { reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo"); this.u = uni.getStorageSync("mall_UserInfo");
this.getGoodsComment()
}, },
//关闭登录窗口 //关闭登录窗口
......
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