feature/comment-0620-ch
ch 2 years ago
parent 8f0bc44425
commit dd0b6345d5

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-05-05 14:40:00
* @LastEditors: ch
* @LastEditTime: 2022-06-22 17:26:10
* @LastEditTime: 2022-06-28 10:59:13
* @Description: 根据git分支生成对应环境的环境变量
* 开发时如果环境变量换了可以不用重启服务直接运行node env.config.js即可
*/
@ -12,8 +12,8 @@ const path = require('path');
const envConfig = {
dev : {
// baseUrl: 'https://you-gateway.mashibing.com',
// baseUrl: 'https://k8s-horse-gateway.mashibing.cn',
baseUrl: '',
baseUrl: 'https://k8s-horse-gateway.mashibing.cn',
// baseUrl: '',
staticUrl : 'https://k8s-shop-app.mashibing.cn',
// imUrl : 'ws://192.168.10.94:8090'
imUrl : 'wss://k8s-horse-gateway.mashibing.cn'

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-06-20 11:10:23
* @LastEditors: ch
* @LastEditTime: 2022-06-22 18:05:27
* @LastEditTime: 2022-06-28 16:33:25
* @Description: file content
*/
export default {
@ -28,5 +28,6 @@ export default {
IS_DEFAULT_COMMENT: {
YES: 1,
NOT : 0
}
},
RATE_LABEL : ['非常不满意','不满意','一般','满意','非常满意']
}

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-17 17:42:32
* @LastEditors: ch
* @LastEditTime: 2022-06-14 17:33:14
* @LastEditTime: 2022-06-28 11:38:02
* @Description: 项目接口请求统一处理器返回一个需要token和不需要token的请求封装方法
*/
@ -82,7 +82,6 @@ const clearRepeat = (option) =>{
// 不需要token的接口封装
const MsbRequest = new MsbUniRequest();
console.log(process.env,'process.envprocess.envprocess.env');
MsbRequest.baseUrl = ENV.baseUrl;
MsbRequest.use('request', (option) => {

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-06-20 14:30:45
* @LastEditors: ch
* @LastEditTime: 2022-06-23 16:26:33
* @LastEditTime: 2022-06-28 14:45:00
* @Description: file content
-->
<template>
@ -47,11 +47,13 @@ export default {
overflow:hidden;
text-overflow:ellipsis;
white-space: nowrap;
padding-right: 30rpx;
}
&--footer{
display: flex;
justify-content: space-between;
padding-right: 30rpx;
}
&--sku{
font-size: 24rpx;

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-06-21 15:50:01
* @LastEditors: ch
* @LastEditTime: 2022-06-22 17:49:10
* @LastEditTime: 2022-06-28 11:30:06
* @Description: file content
-->
<template>
@ -23,6 +23,10 @@ export default {
commentDetail : {
type : Object,
default : () => ({})
},
imgPreview : {
type: Boolean,
default : true
}
},
data:{
@ -36,6 +40,9 @@ export default {
},
methods:{
preview(idx){
if(!this.imgPreview){
return false
}
this.$store.commit('SET_COMMENT_PREVIEW', this.commentDetail);
this.$Router.push({
path : '/goodsCommentPreview',

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-06-20 16:36:14
* @LastEditors: ch
* @LastEditTime: 2022-06-23 16:56:09
* @LastEditTime: 2022-06-28 16:33:46
* @Description: file content
-->
<template>
@ -10,7 +10,7 @@
<view class="rate" v-if="type === COMMENT.TYPE.COMMENT">
<text class="rate--title">满意度评分</text>
<u-rate :count="5" v-model="rate" size="47rpx" activeColor="#FFA35B" inactiveColor="#DDD"></u-rate>
<text class="rate--desc">满意</text>
<text class="rate--desc">{{rateDesc}}</text>
</view>
<textarea class="textarea" placeholder="从多个维度评价,可以帮助更多想买的人哦~"
:maxlength="500" v-model="commentContent"></textarea>
@ -27,7 +27,7 @@
import UiButton from '@/components/UiButton.vue';
import {ApiPostComment} from '@/common/api/comment';
import COMMENT from '@/common/dicts/comment';
import {uploadFileOss} from '@/common/utils';
import {uploadFileOss, HandleApiError} from '@/common/utils';
export default {
components: { UiButton },
props:{
@ -43,7 +43,7 @@ export default {
data(){
return {
COMMENT,
rate : 0,
rate : 5,
commentContent : '',
fileList : []
}
@ -51,13 +51,16 @@ export default {
computed:{
isVerify(){
if(this.type === COMMENT.TYPE.COMMENT){
return !this.rate;
return !this.rate || !this.commentContent;
}else{
return !this.commentContent;
}
},
isEdit (){
return (this.rate || this.commentContent || this.fileList.length > 0) ? true : false
},
rateDesc(){
return COMMENT.RATE_LABEL[this.rate-1];
}
},
watch:{
@ -80,11 +83,9 @@ export default {
data.originId = data.parentId = this.commentDetail.id;
}
const {error, result} = await ApiPostComment(data);
if(error){
uni.$u.toast(error.message);
return false;
if(!HandleApiError(error)){
this.$emit('submit',result);
}
this.$emit('submit',result);
},
async handleUpdateImg(val){
const {error, result} = await uploadFileOss(val.file, {

@ -62,16 +62,14 @@
"path": "pages/goods/comment/list",
"aliasPath" : "/goodsCommentList",
"style": {
"navigationStyle" : "custom",
"navigationBarTitleText": "马士兵严选"
"navigationBarTitleText": "全部评价"
}
},
{
"path": "pages/goods/comment/otherList",
"aliasPath" : "/goodsCommentOtherList",
"style": {
"navigationStyle" : "custom",
"navigationBarTitleText": "马士兵严选"
"navigationBarTitleText": "全部评价"
}
},
{
@ -86,8 +84,7 @@
"path": "pages/goods/comment/detail",
"aliasPath" : "/goodsCommentDetail",
"style": {
"navigationStyle" : "custom",
"navigationBarTitleText": "马士兵严选"
"navigationBarTitleText": "全部评价"
}
},
{

@ -3,7 +3,7 @@
components: { UiCell },: ch
* @Date: 2019-08-22 19:41:20
* @LastEditors: ch
* @LastEditTime: 2022-06-24 09:58:19
* @LastEditTime: 2022-06-28 16:38:33
* @Description: file content
-->
<template>
@ -39,7 +39,7 @@
<view>待收货</view>
</view>
<view class="order-tabs--item" @click="$Router.push('/orderList?tab=5')">
<u-badge class="item-badge" max="99" :value="statistic.deliveredCount"></u-badge>
<u-badge class="item-badge" max="99" :value="statistic.waitComment"></u-badge>
<image class="item-icon" src="@/static/account/pj.png"/>
<view>待评价</view>
</view>

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-06-21 18:19:13
* @LastEditors: ch
* @LastEditTime: 2022-06-23 16:10:21
* @LastEditTime: 2022-06-28 16:21:32
* @Description: file content
-->
<template>
@ -11,7 +11,9 @@
<BsCommentUserInfo :userData="detail"/>
<BsCommentInfo :commentDetail="detail"/>
<BsCommentFollowInfo v-if="detail.followComment" :followComment="detail.followComment" :commentTime="detail.createTime"/>
<BsCommentGoodsInfo class="goods-info" :goods="detail"/>
<BsCommentGoodsInfo class="goods-info" :goods="detail" />
<!-- <u-icon slot="btns" name="shopping-cart" size="30" color="#FF875B"></u-icon> -->
<!-- </BsCommentGoodsInfo> -->
</view>
<view class="reply-title">全部评论( {{answerCount}})</view>
<view class="reply">
@ -29,17 +31,26 @@
<BsEmpty v-else tips="还没有人评论哦,快来抢沙发~"/>
</view>
<view class="footer">
<view v-if="!detail.followComment && detail.userId === $store.state.userInfo.id"
@click="$Router.push(`/commentSubmitFollow?id=${commentId}`)">追评</view>
<view @click="isShowAnswer = true">评论</view>
<view>有用</view>
<view class="footer--item" v-if="!detail.followComment && detail.userId === $store.state.userInfo.id"
@click="$Router.push(`/comment?commentId=${commentId}`)">
<u-icon name="chat" size="28rpx"></u-icon>
追评
</view>
<view class="footer--item" @click="isShowAnswer = true">
<u-icon name="chat" size="28rpx"></u-icon>
评论
</view>
<view class="footer--item" :class="{'footer--item__active' : isLike}" @click="handleUseful">
<u-icon name="thumb-up" size="28rpx" :color="isLike ? '#FF875B' : ''"></u-icon>
有用<template v-if="detail.usefulCount">({{detail.usefulCount}})</template>
</view>
</view>
<template v-if="isShowAnswer" >
<view class="reply-comment--bg" @click="handleHideAnswer"></view>
<view class="reply-comment">
<view class="reply-comment--box">
<input class="reply-comment--input" maxlength="500" v-model="commentContent" :placeholder="placeholder" />
<UiButton type="gradual" @click="handleSubmit"></UiButton>
<UiButton type="gradual" :disable="!commentContent" @click="handleSubmit"></UiButton>
</view>
</view>
</template>
@ -50,8 +61,8 @@ import BsCommentGoodsInfo from '../../../components/BsCommentGoodsInfo.vue'
import BsCommentInfo from '../../../components/BsCommentInfo.vue'
import BsCommentUserInfo from '../../../components/BsCommentUserInfo.vue'
import UiButton from '../../../components/UiButton.vue'
import {ApiGetCommentDetail, ApiPostComment} from '@/common/api/comment'
import {HandleApiError} from '@/common/utils'
import {ApiGetCommentDetail, ApiPostComment, ApiPutCommentUseful} from '@/common/api/comment'
import {HandleApiError, Debounce} from '@/common/utils'
import COMMENT from '@/common/dicts/comment'
import BsEmpty from '../../../components/BsEmpty.vue'
import BsCommentFollowInfo from '../../../components/BsCommentFollowInfo.vue'
@ -63,7 +74,8 @@ export default {
answer : null,
commentId : this.$Route.query.id,
detail : {},
commentContent : ''
commentContent : '',
isLike : false
}
},
computed:{
@ -85,25 +97,26 @@ export default {
});
if(!HandleApiError(error,'getDetail')){
this.detail = result;
this.isLike = result.isLike || false;
this.detail.usefulCount = this.detail.usefulCount || 0
}
},
async handleSubmit(){
let data = {
commentContent : this.commentContent,
commentType : COMMENT.TYPE.ANSWER,
// orderProductId : this.detail.orderProductId,
originId : this.detail.id,
parentId : this.answer ? this.answer.id : this.detail.id
}
const {error, result} = await ApiPostComment(data);
if(!HandleApiError(error,'getDetail')){
if(!HandleApiError(error)){
this.detail.answerCommentList.push({
...result,
userName : this.$store.state.userInfo.nickname,
parentName: this.answer ? this.answer.userName : ''
});
this.commentContent = '';
uni.$u.toast('评论成功!')
uni.$u.toast('评论成功!');
}
},
handleAnswer(item){
@ -113,6 +126,29 @@ export default {
handleHideAnswer(...e){
this.isShowAnswer = false;
this.answer = null;
},
handleUseful(){
this.isLike = !this.isLike
if(this.isLike){
this.detail.usefulCount++;
}else{
this.detail.usefulCount--;
}
if(!this.debounce){
this.debounce = Debounce(this.updateUseFul, 500);
}
this.debounce();
},
async updateUseFul(){
if(this.isLike === this.detail.isLike){
return false
}
const {error, result} = await ApiPutCommentUseful({
commentId : this.detail.id,
isLike : this.isLike
});
}
}
}
@ -171,7 +207,13 @@ page{
align-items: center;
background: #fff;
border-top: 1px solid #f8f8f8;
&--item{
display: flex;
align-items: center;
&__active{
color: $color-yellow3;
}
}
}
.reply-comment--bg{
position: fixed;

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-06-21 16:51:03
* @LastEditors: ch
* @LastEditTime: 2022-06-24 11:12:05
* @LastEditTime: 2022-06-28 15:49:47
* @Description: file content
-->
<template>
@ -30,6 +30,7 @@
<u-loadmore :status="loadingStatus" v-if="loadingStatus === 'loading'"/>
<view class="other" v-if="otherCount" @click="$Router.push(`/goodsCommentOtherList?id=${productId}`)">
已折叠{{otherCount}}条帮助不大的评价
<u-icon name="arrow-right" color="#999" size="15"></u-icon>
</view>
</view>
@ -75,7 +76,7 @@ export default {
async getList(){
this.loadingStatus = 'loading';
const {error, result} = await ApiGetCommentList({
pageIndex : 1,
pageIndex : this.pageIndex,
length : this.pageSize,
productId : this.productId,
commentLabel : this.tabActive == -1 ? null : this.tabActive,
@ -95,7 +96,7 @@ export default {
productId : this.productId
});
if(!HandleApiError(error, 'getTabCount')){
this.tabs = this.tabs.concat(result);
this.tabs = this.tabs.concat(result.filter(i => i.commentCount > 0));
}
},
async getCount(){
@ -184,11 +185,11 @@ page{
}
}
.other{
text-align: center;
display: flex;
align-items: center;
color: #999;
margin: 40rpx 0 20rpx;
width: 360rpx;
margin: 20rpx auto;
height: 100rpx;
background:url('@/static/common/arrow.png') no-repeat right center;
background-size: 10rpx;
}
</style>

@ -2,12 +2,12 @@
* @Author: ch
* @Date: 2022-06-21 16:51:03
* @LastEditors: ch
* @LastEditTime: 2022-06-23 10:52:02
* @LastEditTime: 2022-06-28 15:27:33
* @Description: file content
-->
<template>
<view>
<view class="comment" v-for="item in list" :key="item.id" @click="$Router.push(`/goodsCommentDetail?id${item.id}`)">
<view class="comment" v-for="item in list" :key="item.id" @click="$Router.push(`/goodsCommentDetail?id=${item.id}`)">
<BsCommentUserInfo :userData="item"/>
<BsCommentInfo :commentDetail="item"/>
<BsCommentThumbup :commentDetail="item"/>
@ -21,15 +21,16 @@ import BsCommentInfo from '../../../components/BsCommentInfo.vue'
import BsCommentUserInfo from '../../../components/BsCommentUserInfo.vue'
import {ApiGetCommentList, ApiGetCommentCount, ApiGetCommentTabCount} from '@/common/api/comment';
import {HandleApiError} from '@/common/utils'
import BsCommentThumbup from '../../../components/BsCommentThumbup.vue';
export default {
components: { BsCommentInfo, BsCommentUserInfo },
components: { BsCommentInfo, BsCommentUserInfo, BsCommentThumbup },
data (){
return {
list : [],
pageIndex : 1,
pageSize : 10,
productId : this.$Route.query.id,
loadingStatus : 'loading'
loadingStatus : ''
}
},
@ -41,6 +42,9 @@ export default {
},
methods:{
async getList(){
if(this.loadingStatus === 'loading'){
return false
}
this.loadingStatus = 'loading';
const {error, result} = await ApiGetCommentList({
pageIndex : 1,

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-06-21 16:23:27
* @LastEditors: ch
* @LastEditTime: 2022-06-23 14:30:28
* @LastEditTime: 2022-06-28 11:31:02
* @Description: file content
-->
<template>
@ -13,18 +13,21 @@
<text class="comment-title--right">查看全部</text>
</view>
<view class="comment-ctx" v-if="commentList && commentList.length">
<BsCommentInfo class="comment-ctx--item" v-for="item in commentList"
:commentDetail="item" :key="item.id"/>
<view v-for="item in commentList" :key="item.id">
<BsCommentUserInfo :userData="item"/>
<BsCommentInfo class="comment-ctx--item" :commentDetail="item" :imgPreview="false"/>
</view>
</view>
</UiWhiteBox>
</template>
<script>
import BsCommentInfo from '../../../../components/BsCommentInfo.vue'
import BsCommentUserInfo from '../../../../components/BsCommentUserInfo.vue'
import UiCell from '../../../../components/UiCell.vue'
import UiWhiteBox from '../../../../components/UiWhiteBox.vue'
export default {
components: { BsCommentInfo, UiCell, UiWhiteBox },
components: { BsCommentInfo, UiCell, UiWhiteBox, BsCommentUserInfo },
props : {
count : {
type : Number,

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-06-20 14:55:54
* @LastEditors: ch
* @LastEditTime: 2022-06-23 17:13:29
* @LastEditTime: 2022-06-28 16:50:14
* @Description: file content
-->
<template>
@ -16,9 +16,9 @@
<!-- 已评价过显示详情 -->
<template v-else>
<BsCommentInfo :commentDetail="item"/>
<SubmitFollowComment :commentDetail="item"
<SubmitFollowComment :commentDetail="item"
@submit="submitFollowComment($event, idx)"
@editChange="editChange($event, idx)" />
@editChange="editChange($event, idx)" :type="getFollowType(item)"/>
<BsCommentMerchant v-if="item.merchantComment" :merchantComment="item.merchantComment"/>
<BsCommentThumbup :commentDetail="item"/>
</template>
@ -26,7 +26,7 @@
</view>
</template>
<script>
import { ApiGetOrderCommentDetail } from "@/common/api/comment";
import { ApiGetOrderCommentDetail,ApiGetCommentDetail } from "@/common/api/comment";
import UiWhiteBox from "@/components/UiWhiteBox.vue";
import UiButton from "@/components/UiButton.vue";
import BsCommentSubmit from "@/components/BsCommentSubmit.vue";
@ -52,32 +52,20 @@ export default {
COMMENT,
list: [],
orderId: this.$Route.query.orderId,
showFollowComment: false,
commentId : this.$Route.query.commentId
};
},
onShow() {
this.getCommentDetail();
},
onBackPress(){
alert(2222)
const flag = this.list.find(i => i.isEdit == true);
alert(1111)
if(flag){
uni.showModal({
content : '您正在进行商品评价,退出后评价的内容将不保存',
cancelTxt : '我再想想',
cancelColor : '#999',
confirmColor : '#3A83FB',
success: async ({confirm}) => {
if(confirm){
}
}
})
console.log(this.orderId, this.commentId);
if(this.orderId){
this.getOrderCommentDetail();
}else if(this.commentId){
this.getCommentDetail()
}
},
methods: {
async getCommentDetail() {
async getOrderCommentDetail() {
const { error, result } = await ApiGetOrderCommentDetail({
orderId: this.orderId,
});
@ -87,8 +75,34 @@ export default {
}
this.list = result;
},
/**
* 按评论查询追评时用
*/
async getCommentDetail(){
const {error, result} = await ApiGetCommentDetail({
commentId : this.commentId
});
if (error) {
uni.$u.toast(error.message);
return false;
}
this.list = [result];
},
getFollowType(item){
let type= 'info'
if(this.commentId && !item.followComment){
type = 'form'
}
return type;
},
submitComment(result, idx){
this.$set(this.list, idx, {...this.list[idx],...result});
if(this.list.findIndex(i => !i.id) > 0){
uni.$u.toast('评论成功~');
}else{
this.$Router.replace('/commentSuccess');
}
},
editChange(isEdit, idx){
this.$set(this.list[idx], 'isEdit', isEdit);
@ -99,9 +113,6 @@ export default {
...result
});
},
beforeRouteLeave(to, from, next){
console.log(to,from,'beforeRouteLeavebeforeRouteLeave')
}
},
};

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-06-20 16:36:41
* @LastEditors: ch
* @LastEditTime: 2022-06-23 16:46:04
* @LastEditTime: 2022-06-28 15:25:46
* @Description: file content
-->
<template>
@ -29,11 +29,15 @@ export default {
commentDetail : {
type : Object,
default : () => ({})
},
type : {
type : String,
default : 'info' //info form
}
},
data(){
return {
showInput : false,
showInput : this.type === 'info' ? false : true,
COMMENT,
}
},

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-06-21 15:32:28
* @LastEditors: ch
* @LastEditTime: 2022-06-23 16:56:34
* @LastEditTime: 2022-06-28 16:12:43
* @Description: file content
-->
@ -13,10 +13,13 @@
<view class="btns">
<UiButton class="btn" @click="$Router.back()"></UiButton>
</view>
<view class="await">
<view class="await" v-if="goodsList.length">
<view class="await--title">这些宝贝还在等你的评价哦~</view>
<BsCommentGoodsInfo class="await--goods" :goods="item" v-for="item in goodsList" :key="item.productId">
<UiButton slot="btns" size="small" type="primaryLine">评价</UiButton>
<UiButton slot="btns" size="small" type="primaryLine"
@click="$Router.push(`/comment?commentId=${item.orderId}`)">
{{item.commentStatus == 1 ? '评价' : '追评'}}
</UiButton>
</BsCommentGoodsInfo>
</view>
<view class="recommend-title">为您推荐</view>
@ -46,11 +49,13 @@ export default {
pageIndex : 1
});
if(!HandleApiError(error, 'getAwaitGoodsList')){
this.goodsList = result.map(item => {
this.goodsList = result.records.map(item => {
return {
productPicture : item.productImageUrl,
productName : item.productName,
skuName : item.skuDescribe || '第三课时'
skuName : item.skuDescribe,
commentStatus : item.commentStatus,
orderId : item.orderId
}
});
}

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-04-15 17:46:10
* @LastEditors: ch
* @LastEditTime: 2022-05-27 11:13:24
* @LastEditTime: 2022-06-28 16:43:57
* @Description: file content
-->
<template>
@ -13,6 +13,13 @@
<UiButton class="footer--btn" v-if="orderInfo.orderStatus === 2" @click="service"></UiButton>
<!-- 已发货可以确认收货 -->
<UiButton class="footer--btn" v-if="orderInfo.orderStatus === 4" type="gradual" @click="receive"></UiButton>
<UiButton class="footer--btn" type="primaryLine" v-if="orderInfo.orderStatus === ORDER.STATUS.FINISH_TAKE_GOODS"
@click="$Router.push(`/comment?orderId=${orderInfo.orderId}`)">去评价</UiButton>
<UiButton size="min" type="primaryLine" v-if="orderInfo.orderStatus === ORDER.STATUS.FINISH"
@click="$Router.push(`/comment?commentId=${orderInfo.orderId}`)">去追评</UiButton>
<!-- 待支付可以取消支付订单 -->
<template v-if="orderInfo.orderStatus === 1">
<UiButton class="footer--btn" @click="cancelShow = true">取消订单</UiButton>
@ -49,7 +56,8 @@
import UiButton from '@/components/UiButton.vue'
import UiCell from '@/components/UiCell.vue'
import {ApiPutCancelOrder,ApiPutOrderReceive} from '@/common/api/order'
import BsPay from '../../../../components/BsPay.vue'
import BsPay from '../../../../components/BsPay.vue';
import ORDER from '@/common/dicts/order';
export default {
components: { UiButton, UiCell, BsPay },
props : {
@ -60,6 +68,7 @@ export default {
},
data(){
return {
ORDER,
//
cancelShow : false,
cancelValue : 0,
@ -77,16 +86,16 @@ export default {
this.cancelValue = val;
},
async cancelOrder(){
const ooderId = this.$Route.query.id;
const orderId = this.orderInfo.orderId;
const {error, result} = await ApiPutCancelOrder({
cancelReasonType : this.cancelValue,
orderId : ooderId
orderId : orderId
});
if(error){
uni.$u.toast(error.message);
return false;
}
this.$Router.replace(`/orderDetail?id=${ooderId}`);
this.$Router.replace(`/orderDetail?id=${orderId}`);
//
},
/**
@ -100,13 +109,13 @@ export default {
success: async ({confirm}) => {
if(confirm){
const {error} = await ApiPutOrderReceive({
orderId : this.$Route.query.id
orderId : this.orderInfo.orderId
});
if(error){
uni.$toast(error.message);
return false;
}
this.$Router.push('/orderSuccess');
this.$Router.push(`/orderSuccess?orderId=${this.orderInfo.orderId}`);
}
}
})

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-31 17:53:43
* @LastEditors: ch
* @LastEditTime: 2022-05-05 20:43:19
* @LastEditTime: 2022-06-28 16:24:52
* @Description: file content
-->
<template>
@ -35,6 +35,8 @@ export default {
'5' : {name:'已收货', icon: require('@/static/order/fh.png')},
//
'6' : {name:'交易成功', icon: require('@/static/order/cg.png')},
//
'7' : {name:'交易成功', icon: require('@/static/order/cg.png')},
},
ctxCon : {},
startSecondNum : 0,

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-22 10:58:24
* @LastEditors: ch
* @LastEditTime: 2022-06-24 09:40:07
* @LastEditTime: 2022-06-28 16:43:37
* @Description: file content
-->
<template>
@ -37,17 +37,17 @@
@click="$Router.push(`/orderDetail?id=${item.orderId}`)">查看详情</UiButton>
<UiButton size="min" v-if="item.orderStatus >= ORDER.STATUS.FINISH_SEND_GOODS"
@click="$Router.push(`/logisitcsInfo?orderId=${item.orderId}`)">查看物流</UiButton>
<UiButton size="min" type="gradual"
<UiButton size="min" type="primaryLine"
v-if="item.orderStatus === ORDER.STATUS.FINISH_TAKE_GOODS"
@click="$Router.push(`/comment?orderId=${item.orderId}`)">去评价</UiButton>
<UiButton size="min" type="gradual"
<UiButton size="min" type="primaryLine"
v-if="item.orderStatus === ORDER.STATUS.FINISH"
@click="$Router.push(`/comment?orderId=${item.orderId}`)">去追评</UiButton>
@click="$Router.push(`/comment?commentId=${item.orderId}`)">去追评</UiButton>
<UiButton size="min" type="gradual" v-if="item.orderStatus === ORDER.STATUS.FINISH_SEND_GOODS" @click="receive(item)"></UiButton>
</view>
</view>
<u-loadmore :status="loadingStatus" v-if="loadingStatus === 'loading'"/>
<u-loadmore :status="loadingStatus" v-if="loadingStatus !== 'nomore'"/>
<BsPay :show.sync="payShow" :order="payOrder"></BsPay>
</view>
@ -114,6 +114,7 @@ export default {
uni.$u.toast(error.message);
return false;
}
this.loadingStatus = 'finish';
//
if(result.records.length < this.pageSize){
this.loadingStatus = 'nomore';
@ -155,7 +156,7 @@ export default {
uni.$toast(error.message);
return false;
}
this.$Router.push('/orderSuccess')
this.$Router.push(`/orderSuccess?orderId=${item.orderId}`)
}
}
})

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-28 17:16:44
* @LastEditors: ch
* @LastEditTime: 2022-04-29 23:03:47
* @LastEditTime: 2022-06-28 16:46:43
* @Description: file content
-->
<template>
@ -10,7 +10,8 @@
<image class="icon" src="@/static/order/paySuccess.png"/>
<view class="title">交易成功</view>
<view class="btns">
<UiButton class="btn" type="primaryLine" @click="$Router.replaceAll('/')"></UiButton>
<UiButton class="btn" @click="$Router.replaceAll('/')"></UiButton>
<UiButton class="btn" type="primaryLine" @click="$Router.replace(`/comment?orderId=${orderId}`)"></UiButton>
</view>
</view>
</template>
@ -18,6 +19,11 @@
import UiButton from '@/components/UiButton.vue'
export default {
components: { UiButton },
data(){
return {
orderId : this.$Route.query.orderId
}
}
}
</script>

Loading…
Cancel
Save