Intervene.vue
4.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<template>
<view class="container">
<global-loading />
<!-- 平台介入 -->
<view class="addEvaluate-box flex-items-plus flex-column-plus">
<view class="addEvaluate flex-column-plus">
<view class="fs26 mar-top-40 mar-left-20 addEvaluateText"><label>*</label>问题描述</view>
<view class="textarea-box mar-top-20 mar-left-20">
<textarea class="textarea-text" v-model="commentText" placeholder-style="color:#BBBBBB" placeholder="填写相关问题"/>
</view>
<view class="fs26 mar-top-40 mar-left-20 addEvaluateText"><label>*</label>举证照片</view>
<view class="mar-left-10 mar-top-10 evaluateImg">
<u-upload upload-text="上传凭证" :action="action" ref="uUpload" :limitType="['png', 'jpg', 'jpeg', 'webp', 'gif', 'image']" :header="headerToken" :form-data="formData"></u-upload>
</view>
</view>
</view>
<view class="butBox flex-items-plus mar-left-30">
<view class="submitbut" @click="submitTap">提交</view>
</view>
</view>
</template>
<script>
const NET = require('../../utils/request')
const API = require('../../config/api')
export default {
data() {
return {
addCommentVOList:{},
orderProductVO:{},
commentText:'',
fileList:[],
commentImgsFlag:false,
commentImgs:'',
action:API.UploadUrl,
formData:{'folderId': -1},
headerToken:{Authorization:''},
productImage:'',
afterId: 0,
orderId: 0
}
},
onLoad(options) {
this.afterId = options.afterId;
this.orderId = options.orderId;
},
onReady() {
this.fileList = this.$refs.uUpload.lists
},
methods: {
submitTap(){
if (!this.commentText) {
uni.showToast({
title: '请先说点什么吧',
icon: 'none'
})
return false
}
if(this.fileList.length>0){
this.commentImgsFlag = true
for(let i=0;i<this.fileList.length;i++){
this.commentImgs += this.fileList[i].response.data.url+','
}
} else {
uni.showToast({
title:'请上传举证图片',
})
return false
}
// uni.showLoading({
// title:'正在申请介入...'
// })
NET.request(API.platform, {
afterId: this.afterId,
orderId: this.orderId,
image: this.commentImgs,
reason: this.commentText
}, 'POST').then(res => {
uni.hideLoading()
this.intervention = false
uni.showToast({
title:'申请成功',
})
setTimeout(() => {
uni.navigateTo({
url:`../../pages_category_page2/orderModule/afterSale`
})
}, 2000)
}).catch(res => {
uni.hideLoading()
})
}
}
}
</script>
<style lang="scss">
page{
background-color: #F7F7F7;
}
.container{
.addEvaluate-box{
margin-top: 20upx;
.addEvaluate{
width: 690upx;
background-color: #FFFFFF;
border-radius: 10upx;
padding-bottom: 30upx;
.addEvaluateText {
font-weight: 400;
label {
color: #C5AA7B;
margin-right: 10rpx;
}
}
}
.textarea-box{
.textarea-text{
width: 610upx;
height: 200upx;
background-color: #FFFFFF;
font-size: 26upx;
padding: 20upx 20upx;
border: 2rpx solid #E4E5E6;
}
}
.addPicture-box{
background-color: #F5F5F5;
width: 40upx;
height: 40upx;
margin-top: 100upx;
margin-left: 100upx;
border-radius: 10upx;
display: flex;
justify-content: center;
align-items: center;
color: #BBBBBB;
}
}
.butBox{
position: absolute;
bottom: 40upx;
.submitbut{
height: 100upx;
width: 690upx;
background: #333333;
color: #FFEBC4;
font-size: 28upx;
text-align: center;
line-height: 100upx;
}
}
}
</style>
<style scoped>
.evaluateImg /deep/ .u-upload .u-list-item {
background: none;
border: 2rpx solid #E4E5E6;
border-radius: 0;
}
.evaluateImg /deep/ .u-upload .u-list-item .uicon-plus:before {
content: '';
height: 71rpx;
width: 71rpx;
background: url("https://zhgw-uat.028wlkj.com/cdwlMall/zsfwzxt/file/static/images/addImg.png") no-repeat center center;
display: block;
background-size: contain;
}
.evaluateImg /deep/ .u-add-tips {
color: #999999 !important;
}
</style>