This commit is contained in:
@fawn-nine
2024-09-27 17:04:35 +08:00
parent eedeb5c37f
commit 806c08174f
10 changed files with 107 additions and 54 deletions

View File

@@ -31,6 +31,7 @@
<view class="orderstatus" v-show="item.orderStatus == 3">交易成功</view>
<view class="orderstatus" v-show="item.orderStatus == 4">交易失败</view>
<view class="orderstatus" v-show="item.orderStatus == 5">过期</view>
<template v-if="item.orderType == 'order'">
<view v-for="(item1,index1) in item.productList" :key="index1" class="bookinfolist">
<image class="feng" v-if="item1.product.productImages" :src="item1.product.productImages" mode="aspectFill"></image>
<!-- <view class="description" v-html="item.content">
@@ -42,12 +43,37 @@
</span>
</view>
<view class="btns flexbox" style="margin-top:10rpx;padding-bottom: 72rpx;">
<span class="left" style="color: #C0C4CC;"></span>
<view class="left" style="color: #C0C4CC;">
<view class="orderstatusbtn addcomment" v-if="item.orderStatus == 3 && item1.recordId == 0 &&
item.come == 0" @click.stop="pingji(item1.productId,item)">评价</view>
</view>
<span class="right flexbox opbtns" style="color: #C0C4CC;">
×{{item1.quantity}}
</span>
</view>
</view>
</template>
<template v-if="item.orderType == 'point'">
<view class="flexbox" style="align-items: center;">
<view class="" style="height: 150rpx;">
<image src="../../static/icon/oder_chong.png" style="height: 150rpx; width: 150rpx;"></image>
</view>
<view class="">
<text style="font-size: 28rpx;">充值订单</text>
</view>
</view>
</template>
<template v-if="item.orderType == 'vip'">
<view class="flexbox" style="align-items: center;">
<view class="" style="height: 150rpx;">
<image :src="'../../static/icon/oder_vip.png'" style="height: 150rpx; width: 150rpx;"></image>
</view>
<view class="">
<text style="font-size: 28rpx;">VIP开通</text>
</view>
</view>
</template>
<view class="btns flexbox" style="margin-top:10rpx;">
<span class="left" style="color: #C0C4CC;"></span>
<span class="right flexbox opbtns">
@@ -60,11 +86,12 @@
<span class="right flexbox opbtns">
<view class="orderstatusbtn" v-if="item.orderStatus == 0" @click.stop="canceOrder(item)">取消订单</view>
<view class="orderstatusbtn" v-if="item.orderStatus == 0" @click.stop="goPay(item)">付款</view>
<view class="orderstatusbtn" v-if="item.orderStatus == 1">催发货</view>
<!-- <view class="orderstatusbtn alertDeliver" v-if="item.orderStatus == 1">催发货</view> -->
<view class="orderstatusbtn" v-if="item.orderStatus == 2" @click.stop="seeExpressDetail(item)">查看物流</view>
<view class="orderstatusbtn" v-if="item.orderStatus == 2" @click.stop="OverOrder(item)">确认收货</view>
<view class="orderstatusbtn" v-if="item.orderStatus == 3">申请售后</view>
<view class="orderstatusbtn" v-if="item.orderStatus == 3 && userRecordid == null" @click.stop="pingji(item.productId)">评价</view>
<!-- <view class="orderstatusbtn" v-if="item.orderStatus == 3">申请售后</view> -->
<!-- -->
<!-- <view class="orderstatusbtn" v-if=" userRecordid == null && item.come == 0" @click.stop="pingji(item.id)">评价</view> -->
<!-- <view class="orderstatusbtn" v-if="item.orderStatus == 3 && userRecordid != null" @click.stop="showZhuiping(item.productId)">追评</view> -->
</span>
</view>
@@ -516,18 +543,18 @@ import { data } from 'jquery';
},
closePingjia(){
this.pingjiaShow = false
this.Pform.comment = ''
this.Pform.html = ''
this.emoji = []
// this.Pform.comment = ''
// this.Pform.html = ''
// this.emoji = []
},
// 提交评价
submitPJ(){
if(this.Pform.comment != ''){
let data={
let data={
'userid':this.userInfo.id,
'orderSn': this.orderSn,
'bookid': this.productID,
'productId': this.productID,
// 'content': this.Pform.html,
'content': this.Pform.comment,
'starLevel':this.Pform.star,
@@ -536,7 +563,7 @@ import { data } from 'jquery';
}
// console.log(data,'data')
$http.request({
url: "buy/record/UserRecordcomment",
url: "buy/record/UserRecordComment",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data,
header: { //默认 无 说明:请求头
@@ -568,10 +595,11 @@ import { data } from 'jquery';
}
},
// 添加评价
pingji(id){
console.log(id)
pingji(id,item){
console.log('评价实例',id, item)
this.pjType = ''
this.productID = id
this.orderSn = item.orderSn
this.pingjiaShow = true
},
getStar(i){
@@ -700,7 +728,8 @@ import { data } from 'jquery';
width:140rpx;
text-align: center;
}
.addcomment{color: #ffaa00; border-color: #ffaa00; margin: 0 ;}
.alertDeliver{ color: #55aa00; border-color: #55aa00;}
.flexbox{display: flex;}
.container{padding: 0 10px;}