This commit is contained in:
2025-10-27 15:55:29 +08:00
commit 6632080b83
513 changed files with 117442 additions and 0 deletions

View File

@@ -0,0 +1,110 @@
.activist-container {
width: 100vw;
height: 100vh;
}
.order-item {
margin: $margin-updown $margin-both;
padding: 26rpx 24rpx;
border-radius: 10rpx;
background: #fff;
display: flex;
flex-direction: column;
.order-header {
display: flex;
align-items: center;
padding-bottom: 26rpx;
border-bottom: 2rpx solid #f1f1f1;
.status-num {
font-size: $font-size-goods-tag;
color: $color-title;
}
.status-name {
flex: 1;
text-align: right;
font-size: $font-size-tag;
}
}
.goods-wrap {
display: flex;
padding: 27rpx 0;
box-sizing: border-box;
border-bottom: 2rpx solid #f7f7f7;
image {
width: 170rpx;
height: 170rpx;
display: flex;
align-items: center;
justify-content: center;
}
.goods-info {
flex: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
margin-left: 15rpx;
.goods-name {
line-height: 38rpx;
font-size: $font-size-base;
color: $color-title;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.goods-num {
display: flex;
justify-content: space-between;
align-items: flex-start;
margin-top: 21rpx;
.num-text {
font-size: $font-size-tag;
line-height: 1;
}
.num-price {
display: flex;
flex-direction: column;
align-items: flex-end;
line-height: 1;
font-size: $font-size-tag;
.num {
color: $color-tip;
margin-top: 16rpx;
display: flex;
align-items: center;
}
}
}
}
}
.goods-btn {
display: flex;
flex-direction: column;
align-items: flex-end;
margin-top: 27rpx;
.btn-text {
font-size: $font-size-tag;
text {
&:nth-child(2) {
margin-left: 17rpx;
text {
font-size: $font-size-base;
}
}
}
}
.order-action {
display: flex;
margin-top: 24rpx;
.order-box-btn {
font-size: $font-size-goods-tag;
}
}
}
}

View File

@@ -0,0 +1,230 @@
.page {
padding-bottom: 100rpx;
}
.eval-good {
width: 100%;
padding: 0 30rpx;
box-sizing: border-box;
background: #ffffff;
.good-box {
width: 100%;
height: 100%;
padding: 30rpx 0;
border-bottom: 2rpx solid #f5f5f5;
box-sizing: border-box;
display: flex;
justify-content: space-between;
.good_pic {
width: 180rpx;
height: 180rpx;
margin-right: 20rpx;
box-sizing: border-box;
}
.good_info {
width: calc(100% - 200rpx);
height: 100%;
line-height: 1.3;
box-sizing: border-box;
}
}
}
.eval-text {
width: 100%;
padding: 0 $margin-both;
box-sizing: border-box;
padding-bottom: $padding;
margin-top: $margin-updown;
.text-box {
width: 100%;
height: 100%;
border-radius: $border-radius;
background: #ffffff;
padding-bottom: $padding;
box-sizing: border-box;
position: relative;
textarea {
width: 100%;
height: 190rpx;
padding: $padding;
box-sizing: border-box;
font-size: $font-size-tag;
}
}
.maxSize {
position: absolute;
right: 20rpx;
top: 160rpx;
color: #999;
font-size: $font-size-tag;
}
.other-info {
width: 100%;
padding: 0 $padding;
box-sizing: border-box;
display: flex;
flex-wrap: wrap;
margin-top: $margin-updown;
}
.other-info-box {
width: 145rpx;
height: 145rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin-right: 30rpx;
margin-bottom: 30rpx;
position: relative;
image {
width: 100%;
border-radius: $border-radius;
}
.iconfont {
font-size: 60rpx;
color: #898989;
line-height: 1;
}
text {
line-height: 1;
}
.imgDel {
width: 40rpx;
height: 40rpx;
position: absolute;
right: -20rpx;
top: -20rpx;
display: flex;
justify-content: center;
align-items: center;
.iconfont {
font-size: $font-size-toolbar;
}
}
}
.other-info-box.active {
border: 1rpx dashed #898989;
}
.other-info-box.active:active {
background: rgba($color: #cccccc, $alpha: 0.6);
}
// .other-info-box:nth-child(4n) {
// margin-right: 0;
// }
}
.eval-star {
width: 100%;
background: #ffffff;
padding: 10rpx 30rpx;
box-sizing: border-box;
.star-box {
width: 100%;
height: 100%;
display: flex;
align-items: center;
.star-title {
height: 60rpx;
position: relative;
padding-right: $padding;
box-sizing: border-box;
line-height: 60rpx;
font-size: $font-size-base;
font-weight: bold;
}
.grade-li {
width: 30%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}
.icon-haoping1 {
font-size: $font-size-base;
margin-right: 10rpx;
}
.icon-haoping {
font-size: $font-size-base;
color: #999;
margin-right: 10rpx;
}
.icon-zhongchaping {
font-size: $font-size-base;
margin-right: 10rpx;
color: #ccc;
}
}
}
.eval-bottom {
position: fixed;
z-index: 5;
width: 100vw;
height: 100rpx;
background: #fff;
bottom: var(--window-bottom);
overflow: hidden;
display: flex;
justify-content: space-between;
&.safe-area {
padding-bottom: 68rpx !important;
}
.all-election {
height: 100rpx;
position: relative;
padding-left: 20rpx;
display: inline-block;
width: 30%;
& > .iconfont {
font-size: 45rpx;
position: absolute;
top: 50%;
left: 24rpx;
transform: translateY(-50%);
}
& > text {
margin-left: 56rpx;
line-height: 100rpx;
}
}
.action-btn {
flex: 1;
height: 100rpx;
line-height: 100rpx;
border-radius: 0;
margin: 0;
display: flex;
justify-content: center;
align-items: center;
button {
width: 100%;
height: 80rpx;
line-height: 80rpx;
}
}
.action-btn.disabled:after {
content: '';
border: none;
}
}

View File

@@ -0,0 +1,242 @@
@mixin flex-row-center {
display: flex;
justify-content: center;
align-items: center;
}
@mixin wrap {
padding: 30rpx;
border-radius: $border-radius;
background: #fff;
position: relative;
width: calc(100% - 60rpx);
box-sizing: border-box;
}
.swiper-item {
padding-top: 94rpx;
height: 100%;
.container {
height: calc(100vh - 124rpx);
overflow-y: scroll;
box-sizing: border-box;
display: flex;
flex-direction: column;
align-items: center;
padding-bottom: 30rpx;
&.safearea {
padding: 68rpx;
}
}
padding-bottom: 30rpx;
padding-bottom: constant(safe-area-inset-bottom); /*兼容 IOS<11.2*/
padding-bottom: env(safe-area-inset-bottom); /*兼容 IOS>11.2*/
}
.order-nav {
width: 100vw;
// height: 60rpx;
flex-direction: row;
/* #ifndef APP-PLUS */
white-space: nowrap;
/* #endif */
background: #fff;
display: flex;
position: fixed;
left: 0;
z-index: 998;
.uni-tab-item {
display: inline-block;
padding: 30rpx 24rpx 0;
// height: 60rpx;
// line-height: 60rpx;
}
.uni-tab-item-title {
color: #555;
font-size: $font-size-toolbar;
display: block;
line-height: 1;
padding: 0 10rpx 30rpx;
flex-wrap: nowrap;
/* #ifndef APP-PLUS */
white-space: nowrap;
/* #endif */
text-align: center;
}
.uni-tab-item-title-active {
display: block;
border-bottom: 2rpx solid #ffffff;
padding: 0 10rpx 30rpx;
}
::-webkit-scrollbar {
width: 0;
height: 0;
color: transparent;
}
}
.goods-wrap {
@include wrap;
margin-top: 20rpx;
padding: 30rpx;
.goods {
display: flex;
position: relative;
margin-bottom: 20rpx;
&:last-of-type {
margin-bottom: 0;
}
.goods-img {
width: 180rpx;
height: 180rpx;
margin-right: 20rpx;
image {
width: 100%;
height: 100%;
}
}
.goods-info {
flex: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
position: relative;
max-width: calc(100% - 140rpx);
.goods-name {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
line-height: 1.5;
font-size: $font-size-base;
font-weight: 500;
}
.goods-sub-section {
width: 100%;
line-height: 1.3;
display: flex;
.goods-price {
font-weight: 700;
font-size: $font-size-activity-tag;
}
.unit {
font-weight: normal;
font-size: $font-size-tag;
margin-right: 2rpx;
}
view {
flex: 1;
line-height: 1.3;
&:last-of-type {
text-align: left;
.iconfont {
line-height: 1;
font-size: $font-size-tag;
}
}
}
}
}
}
}
.express-company-wrap {
@include wrap;
margin-top: 20rpx;
.company-logo {
width: 120rpx;
height: 120rpx;
margin-right: 20rpx;
float: left;
image {
width: 100%;
height: 100%;
}
}
.info {
flex: 1;
.company {
line-height: 1.5;
margin-top: 16rpx;
}
.no {
margin-top: 10rpx;
line-height: 1.5;
}
.icon-fuzhi {
font-size: $font-size-base;
line-height: 1;
margin-left: 6rpx;
}
}
}
.track-wrap {
@include wrap;
margin-top: 20rpx;
.track-item {
position: relative;
flex-wrap: wrap;
overflow: visible;
display: flex;
&:after {
content: '';
position: absolute;
z-index: 1;
pointer-events: none;
background-color: #e5e5e5;
width: 2rpx;
height: 150%;
top: 56rpx;
left: 20rpx;
bottom: -40rpx;
}
.dot {
margin: 34rpx 20rpx 0 10rpx;
width: 20rpx;
height: 20rpx;
border-radius: 10rpx;
background-color: #ccc;
z-index: 9;
}
.msg {
padding: 20rpx 0;
flex: 1;
.text {
line-height: 1.5;
font-size: $font-size-base;
}
.time {
color: $color-tip;
font-size: $font-size-activity-tag;
line-height: 1.3;
margin-top: 10rpx;
}
}
&:last-of-type:after {
content: unset;
}
}
}

View File

@@ -0,0 +1,246 @@
.refund-container {
width: 100vw;
height: 100vh;
}
.align-right {
text-align: right;
}
.goods-wrap {
margin: $margin-updown $margin-both;
padding: 30rpx;
border-radius: $border-radius;
background: #fff;
display: flex;
position: relative;
.goods-img {
width: 180rpx;
height: 180rpx;
margin-right: 20rpx;
border-radius: $border-radius;
overflow: hidden;
image {
width: 100%;
height: 100%;
}
}
.goods-info {
flex: 1;
position: relative;
max-width: calc(100% - 200rpx);
.goods-name {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
line-height: 1.5;
font-size: $font-size-base;
}
}
}
.refund-option {
margin: $margin-updown $margin-both;
border-radius: $border-radius;
background: #fff;
.option-item {
padding: $padding;
display: flex;
position: relative;
view {
flex: 1;
text {
display: block;
}
}
.icon-right {
position: absolute;
top: 50%;
transform: translateY(-50%);
color: #ddd;
right: 20rpx;
}
&:last-of-type {
border-top: 2rpx solid #f2f2f2;
}
}
}
.refund-form {
margin: $margin-updown $margin-both;
padding: $padding;
border-radius: $border-radius;
background: #fff;
.item-wrap {
display: flex;
position: relative;
line-height: 80rpx;
.label {
width: 142rpx;
padding-right: 5rpx;
line-height: 80rpx;
}
.cont {
flex: 1;
line-height: 80rpx;
text-align: right;
.refund-desc {
font-size: $font-size-base;
width: 100%;
line-height: 1;
min-height: 80rpx;
}
&.reason {
padding-right: 40rpx;
}
}
.label.active{
width: 100%;
}
.icon-right {
position: absolute;
top: 50%;
transform: translateY(-50%);
color: #ddd;
right: 0;
}
}
}
.textarea-box{
position: relative;
.mark{
width: 100%;
height: 100%;
position: absolute;
left: 0;
bottom: 0;
background: red;
}
}
.newText{
width: 100%;
min-height: 200rpx;
border-radius: $border-radius;
box-sizing: border-box;
margin-top: 10rpx;
}
.sub-btn {
position: fixed;
width: 100%;
height: 100rpx;
line-height: 100rpx;
text-align: center;
color: #fff;
bottom: 0;
&.safe-area {
margin-bottom: 48rpx !important;
}
}
.popup {
width: 100vw;
background: #fff;
border-top-left-radius: 24rpx;
border-top-right-radius: 24rpx;
.popup-header {
height: 90rpx;
display: flex;
align-items: center;
padding: 0 30rpx;
& > view {
flex: 1;
line-height: 1;
}
.tit {
font-size: $font-size-toolbar;
font-weight: 600;
}
.vice-tit {
margin-right: 20rpx;
}
}
.popup-footer {
height: 140rpx;
.confirm-btn {
height: 80rpx;
line-height: 80rpx;
color: #fff;
text-align: center;
margin: 20rpx;
border-radius: $border-radius;
&.color-base-bg{
color: var(--btn-text-color);
}
}
&.bottom-safe-area {
padding-bottom: 48rpx;
}
}
}
.refund-reason-popup {
height: 50vh;
display: flex;
flex-direction: column;
.icon-close {
font-size: 40rpx;
}
.popup-body {
flex: 1;
.scroll-view {
height: 100%;
}
.item {
display: flex;
padding: 0 30rpx;
position: relative;
height: 70rpx;
line-height: 70rpx;
.reason {
flex: 1;
height: 70rpx;
line-height: 70rpx;
}
& > .iconfont {
font-size: 40rpx;
position: absolute;
top: 50%;
right: 30rpx;
transform: translateY(-50%);
}
& > .icon-yuan_checkbox {
color: $color-tip;
}
}
}
}

View File

@@ -0,0 +1,327 @@
.detail-container {
width: 100vw;
height: 100vh;
}
.container {
transition: all 0.3s;
.hide {
transform: translateX(-100%);
}
}
.status-wrap {
padding: 20rpx;
background: #fff;
border-top: 1px solid #f5f5f5;
margin: 20rpx;
border-radius: $border-radius;
.status-name {
display: block;
font-size: $font-size-toolbar;
line-height: 70rpx;
height: 70rpx;
}
.refund-explain {
border-top: 1px dashed #eee;
padding-top: 20rpx;
}
}
.refund-address-wrap {
margin: 20rpx;
background: #fff;
padding: 20rpx;
border-radius: $border-radius;
.copy {
font-size: $font-size-activity-tag;
display: inline-block;
color: #666;
background: #fff;
line-height: 1;
padding: 6rpx 10rpx;
margin-left: 10rpx;
border-radius: 4rpx;
border: 1px solid #ddd;
}
}
.history-wrap {
margin: 20rpx;
background: #fff;
padding: 20rpx;
display: flex;
position: relative;
border-radius: $border-radius;
view {
flex: 1;
}
.icon-right {
position: absolute;
top: 50%;
transform: translateY(-50%);
color: #ddd;
right: 20rpx;
}
}
.refund-info {
margin: 20rpx;
background: #fff;
border-radius: $border-radius;
.header {
height: 90rpx;
line-height: 90rpx;
padding: 0 20rpx;
}
.body {
padding-bottom: 20rpx;
.goods-wrap {
display: flex;
position: relative;
padding: 20rpx;
background: #f5f5f5;
&:last-of-type {
margin-bottom: 0;
}
.goods-img {
width: 180rpx;
height: 180rpx;
margin-right: 20rpx;
image {
width: 100%;
height: 100%;
}
}
.goods-info {
flex: 1;
position: relative;
max-width: calc(100% - 200rpx);
.goods-name {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
line-height: 1.5;
font-size: $font-size-base;
}
.goods-sub-section {
padding-top: 20rpx;
width: 100%;
line-height: 1.3;
display: flex;
.refund-price {
font-size: $font-size-base;
}
.unit {
font-weight: normal;
font-size: $font-size-tag;
margin-right: 2rpx;
}
}
}
}
.info {
margin-top: 20rpx;
.cell {
height: 50rpx;
line-height: 50rpx;
padding: 0 30rpx;
font-size: $font-size-tag;
color: $color-tip;
}
}
}
}
.action {
position: fixed;
z-index: 5;
left: 0;
bottom: 0;
width: 100vw;
height: 100rpx;
background: #fff;
box-shadow: 0 0px 10px rgba(0, 0, 0, 0.1);
text-align: right;
line-height: 100rpx;
&.bottom-safe-area {
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
}
.order-box-btn{
margin-right: $margin-both;
margin-left: 0;
}
.action-btn {
height: 70rpx;
line-height: 70rpx;
color: #fff;
padding: 0 40rpx;
display: inline-block;
text-align: center;
margin: 16rpx 20rpx 16rpx 0;
border-radius: $border-radius;
&.white {
height: 68rpx;
line-height: 68rpx;
color: #333;
border: 0.5px solid #999;
background: #fff;
}
}
}
.form-wrap {
background: #fff;
.item {
margin: 0 20rpx;
display: flex;
border-bottom: 1px solid #eee;
&:last-child {
border-bottom: none;
}
.label {
width: 140rpx;
line-height: 90rpx;
}
.cont {
flex: 1;
line-height: 90rpx;
.input,
.input-placeholder {
height: 90rpx;
line-height: 90rpx;
font-size: $font-size-base;
}
.textarea {
width: 100%;
padding: 26rpx 0;
line-height: 1.3;
font-size: $font-size-base;
}
}
}
}
.sub-btn {
margin-top: 20rpx;
}
.record-wrap {
.cont {
width: 100%;
background-color: #fff;
padding: 30rpx;
box-sizing: border-box;
margin-top: 20rpx;
.head {
display: flex;
flex-direction: column;
color: $color-title;
.time {
color: $color-tip;
font-size: $font-size-tag;
float: right;
}
}
.body {
padding-top: 20rpx;
.refund-action{
line-height: 1;
color: $color-title;
}
.desc {
margin-top: 10rpx;
color: $color-tip;
font-size: $font-size-tag;
}
}
}
.empty-box{
height: 168rpx;
}
}
.history-bottom {
position: fixed;
z-index: 5;
left: 0;
bottom: 0;
width: 100vw;
height: 100rpx;
background: #fff;
box-shadow: 0 0px 10px rgba(0, 0, 0, 0.1);
text-align: right;
display: flex;
&.bottom-safe-area {
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
}
view {
flex: 1;
text-align: center;
line-height: 100rpx;
&:first-child {
border-right: 1px solid #eee;
}
.iconfont {
font-weight: bold;
margin-right: 10rpx;
font-size: $font-size-base;
line-height: 1;
}
}
button {
width: 50%;
height: 100%;
// position: absolute;
border: none;
z-index: 1;
padding: 0;
margin: 0;
background: none;
display: flex;
justify-content: center;
align-items: center;
&::after {
border: none !important;
}
.iconfont{
margin-right: 10rpx;
}
}
}

View File

@@ -0,0 +1,233 @@
export default {
data() {
return {
orderId: null,
orderNo: "",
isAnonymous: 1, //是否匿名发布 1.匿名0.公开
goodsList: [], //订单列表
goodsEvalList: [], //评价列表
imgList: [],
isEvaluate: 0, //判断是否为追评
flag: false, //防止重复点击 ,
evaluateConfig: {
evaluate_audit: 1,
evaluate_show: 0,
evaluate_status: 1
},
isIphoneX: false //判断手机是否是iphoneX以上
};
},
onLoad(options) {
//接收订单号,订单是否是追评等信息
options.order_id ? (this.orderId = options.order_id) : this.$util.redirectTo('/pages/order/list');
this.isIphoneX = this.$util.uniappIsIPhoneX();
if (!this.storeToken) {
this.$util.redirectTo('/pages_tool/login/login', {
back: '/pages_tool/order/evaluate?order_id=' + this.orderId
}, 'redirectTo');
}
this.getEvaluateConfig();
this.getOrderInfo();
},
onShow() {
//初始化重复点击
this.flag = false;
},
methods: {
//获取订单信息
getOrderInfo() {
//获取订单信息
let data = {
order_id: this.orderId
};
this.$api.sendRequest({
url: '/api/order/evluateinfo',
data: data,
success: res => {
if (res.code == 0) {
this.isEvaluate = res.data.evaluate_status
this.goodsList = res.data.list;
if (this.goodsList.length) {
this.orderNo = res.data.list[0].order_no;
}
if (this.isEvaluate) {
for (let i = 0; i < res.data.list.length; i++) {
let array = [];
this.imgList.push(array)
this.goodsEvalList.push({
order_goods_id: res.data.list[i].order_goods_id,
goods_id: res.data.list[i].goods_id,
sku_id: res.data.list[i].sku_id,
again_content: "",
again_images: ""
});
}
} else {
for (let i = 0; i < res.data.list.length; i++) {
let array = [];
this.imgList.push(array)
this.goodsEvalList.push({
content: '', // 评价内容
images: "", //图片数组
scores: 5, // 评分
explain_type: 1, // 评价类型
order_goods_id: res.data.list[i].order_goods_id,
goods_id: res.data.list[i].goods_id,
sku_id: res.data.list[i].sku_id,
sku_name: res.data.list[i].sku_name,
sku_price: res.data.list[i].price,
sku_image: res.data.list[i].sku_image
});
}
}
} else {
this.$util.showToast({
title: "未获取到订单数据"
})
setTimeout(() => {
this.$util.redirectTo('/pages/order/list', {}, "redirectTo");
}, 1000)
}
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
},
fail() {
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
}
});
},
//监听评分变化
setStar(e) {
this.goodsEvalList[e.index].scores = e.value;
if (e.value >= 4) {
this.goodsEvalList[e.index].explain_type = 1;
} else if (1 < e.value && e.value < 4) {
this.goodsEvalList[e.index].explain_type = 2
} else {
this.goodsEvalList[e.index].explain_type = 3
}
},
//切换,是否匿名
isAll() {
this.isAnonymous ? this.isAnonymous = 0 : this.isAnonymous = 1
},
//添加图片
addImg(e) {
let size = this.imgList[e].length ? this.imgList[e].length : 0
this.$util.upload(6 - size, {
path: 'evaluateimg'
}, res => {
let arr = this.imgList[e]
arr = arr.concat(res);
this.imgList[e] = [];
this.$set(this.imgList, e, arr)
if (this.isEvaluate) {
this.goodsEvalList[e].again_images = this.imgList[e].toString()
} else {
this.goodsEvalList[e].images = this.imgList[e].toString()
}
});
},
//删除图片
deleteImg(i, index, j) {
this.imgList[index].splice(j, 1);
if (this.isEvaluate) {
this.goodsEvalList[index].again_images = this.imgList[index].toString()
} else {
this.goodsEvalList[index].images = this.imgList[index].toString()
}
},
// 图片预览
preview(i, j) {
let urls = this.imgList[j];
for (let k = 0; k < urls.length; k++) {
urls[k] = this.$util.img(urls[k])
}
uni.previewImage({
urls: urls,
current: i
});
},
//提交评价
save() {
if (this.evaluateConfig.evaluate_status == 0) {
this.$util.showToast({
title: "商家未开启商品评价功能"
});
return;
}
for (let i = 0; i < this.goodsEvalList.length; i++) {
if (this.isEvaluate) {
if (!this.goodsEvalList[i].again_content.trim().length) {
this.$util.showToast({
title: "商品的评价不能为空哦"
});
return;
}
} else {
if (!this.goodsEvalList[i].content.trim().length) {
this.$util.showToast({
title: "商品的评价不能为空哦"
});
return;
}
}
}
let goodsEvaluate = JSON.stringify(this.goodsEvalList)
let data = {
order_id: this.orderId,
goods_evaluate: goodsEvaluate,
};
if (!this.isEvaluate) {
data.order_no = this.orderNo;
data.member_name = this.memberInfo.nickname;
data.member_headimg = this.memberInfo.headimg;
data.is_anonymous = this.isAnonymous;
}
if (this.flag) return;
this.flag = true;
this.$api.sendRequest({
url: this.isEvaluate ? '/api/goodsevaluate/again' : '/api/goodsevaluate/add',
data: data,
success: res => {
if (res.code == 0) {
this.$util.showToast({
title: "评价成功"
});
setTimeout(() => {
this.$util.redirectTo('/pages/order/list', {}, "redirectTo");
}, 1000);
} else {
this.$util.showToast({
title: res.message
});
this.flag = false;
}
},
fail: res => {
this.flag = false;
}
});
},
imageError(index) {
this.goodsList[index].sku_image = this.$util.getDefaultImage().goods;
this.$forceUpdate();
},
getEvaluateConfig() {
this.$api.sendRequest({
url: '/api/goodsevaluate/config',
success: res => {
if (res.code == 0) {
var data = res.data;
this.evaluateConfig = data;
}
}
});
}
}
};

View File

@@ -0,0 +1,30 @@
export default {
methods: {
/**
* 撤销退款申请
* @param {Object} order_goods_id
* @param {Object} callback
*/
cancleRefund(order_goods_id, callback) {
uni.showModal({
content: '撤销之后本次申请将会关闭,如后续仍有问题可再次发起申请。',
cancelText: '暂不撤销',
cancelColor: '#898989',
success: res => {
if (res.confirm) {
this.$api.sendRequest({
url: '/api/orderrefund/cancel',
data: {
order_goods_id
},
success: res => {
typeof callback == 'function' && callback(res);
}
})
}
}
})
},
}
}