2025-04-07 15:40:06 +08:00
|
|
|
<template>
|
|
|
|
<view class="suggest-content">
|
2025-04-15 11:50:40 +08:00
|
|
|
<navigation-bar-vue title="评价" style="width: 100%;" background-color="#ffffff"
|
2025-04-07 15:40:06 +08:00
|
|
|
title-color="#000000"></navigation-bar-vue>
|
|
|
|
<view class="card-detail">
|
|
|
|
<view class="item-field">
|
|
|
|
<view class="item-lable is-required">
|
|
|
|
写下你的建议
|
|
|
|
</view>
|
|
|
|
<view class="item-value">
|
2025-04-14 17:03:54 +08:00
|
|
|
<uni-easyinput type="textarea" v-model="dataObj.content" placeholder="请输入" />
|
2025-04-07 15:40:06 +08:00
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="item-field">
|
|
|
|
<view class="item-lable is-required">
|
|
|
|
上传材料
|
|
|
|
</view>
|
|
|
|
<view class="item-value">
|
|
|
|
<uni-file-picker :value="fileList" :sizeType="sizeType" @select="afterRead" @delete="deleteFile"
|
|
|
|
limit="9"></uni-file-picker>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="item-field" style="align-items: center;">
|
|
|
|
<view class="submit-box" @click="submitForm">提交</view>
|
|
|
|
</view>
|
|
|
|
<view class="item-field" style="align-items: center;">
|
|
|
|
<view class="my-suggest-dom" @click="goMySuggest()">
|
|
|
|
<text>我的反馈</text>
|
|
|
|
<uni-icons type="right" color="#623109" size="12"></uni-icons>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import navigationBarVue from '@/components/navigation/navigationBar.vue';
|
2025-04-14 17:03:54 +08:00
|
|
|
import upload from '@/utils/upload'
|
|
|
|
import {toast} from '@/utils/common.js'
|
|
|
|
import config from '@/config';
|
|
|
|
import {uniAddFeedBack} from '@/api/business/notice.js'
|
2025-04-07 15:40:06 +08:00
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
navigationBarVue
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
2025-04-14 17:03:54 +08:00
|
|
|
uploadUrl: config.baseUrl,
|
2025-04-07 15:40:06 +08:00
|
|
|
dataObj: {
|
|
|
|
content: ""
|
|
|
|
},
|
|
|
|
sizeType: ['compressed'],
|
|
|
|
//图片数组
|
|
|
|
fileList: [],
|
2025-04-14 17:03:54 +08:00
|
|
|
userType:"",
|
2025-04-07 15:40:06 +08:00
|
|
|
}
|
|
|
|
},
|
2025-04-14 17:03:54 +08:00
|
|
|
onLoad(option){
|
|
|
|
this.userType = option.userType
|
|
|
|
},
|
2025-04-07 15:40:06 +08:00
|
|
|
methods: {
|
|
|
|
afterRead(file) {
|
|
|
|
for (let i = 0; i < file.tempFilePaths.length; i++) {
|
|
|
|
upload({
|
|
|
|
url: '',
|
|
|
|
filePath: file.tempFilePaths[i]
|
|
|
|
}).then((res) => {
|
|
|
|
console.log(res, '215')
|
|
|
|
this.fileList.push({
|
2025-04-14 17:03:54 +08:00
|
|
|
url: res.url
|
2025-04-07 15:40:06 +08:00
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
},
|
|
|
|
deleteFile(file, index) {
|
|
|
|
console.log('删除文件');
|
|
|
|
this.fileList.splice(index, 1);
|
|
|
|
},
|
|
|
|
/**提交*/
|
2025-04-14 17:03:54 +08:00
|
|
|
submitForm() {
|
|
|
|
//凭证图片
|
|
|
|
if (this.fileList.length > 0) {
|
|
|
|
this.dataObj.images = this.fileList
|
|
|
|
.map(item => item.url.replace(this.uploadUrl, ''))
|
|
|
|
.join(',');
|
|
|
|
}
|
|
|
|
this.dataObj.userType = this.userType
|
|
|
|
uniAddFeedBack(this.dataObj).then(res => {
|
|
|
|
if (res.code == 200){
|
|
|
|
uni.showToast({
|
|
|
|
icon: 'success',
|
|
|
|
duration: 2000,
|
|
|
|
title: '举报成功'
|
|
|
|
});
|
|
|
|
uni.navigateBack()
|
|
|
|
}
|
|
|
|
}).catch((e)=>{
|
|
|
|
toast(e)
|
|
|
|
})
|
|
|
|
},
|
2025-04-07 15:40:06 +08:00
|
|
|
/**
|
|
|
|
* 去我的建议列表
|
|
|
|
*/
|
|
|
|
goMySuggest() {
|
|
|
|
this.$tab.navigateTo('/pages/mine/set/my-suggest')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
.suggest-content {
|
|
|
|
padding-top: calc(90rpx + var(--status-bar-height));
|
|
|
|
background-color: white;
|
|
|
|
width: 100%;
|
|
|
|
color: #363636;
|
|
|
|
font-size: 32rpx;
|
|
|
|
height: 100%;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
align-items: self-start;
|
|
|
|
justify-content: center;
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
.card-detail {
|
|
|
|
border-top: 1rpx solid #F2F2F2;
|
|
|
|
width: 100%;
|
|
|
|
padding: 20rpx 30rpx;
|
|
|
|
background-color: white;
|
|
|
|
border-radius: 20rpx;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
align-items: self-start;
|
|
|
|
justify-content: center;
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
.item-field {
|
|
|
|
width: 100%;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
align-items: self-start;
|
|
|
|
justify-content: center;
|
|
|
|
|
|
|
|
.item-lable {
|
|
|
|
padding: 15rpx 0;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.item-value {
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
input {
|
|
|
|
padding-left: 20rpx;
|
|
|
|
line-height: 1;
|
|
|
|
height: 70rpx;
|
|
|
|
border: 1rpx solid #dcdfe6;
|
|
|
|
border-radius: 8rpx;
|
|
|
|
}
|
|
|
|
|
|
|
|
.choose-add {
|
|
|
|
color: #686868;
|
|
|
|
padding: 10rpx 0 10rpx 20rpx;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: flex-start;
|
|
|
|
border: 1rpx solid #dcdfe6;
|
|
|
|
border-radius: 8rpx;
|
|
|
|
}
|
|
|
|
|
2025-04-14 17:03:54 +08:00
|
|
|
|
2025-04-07 15:40:06 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.submit-box {
|
|
|
|
padding: 15rpx 0;
|
|
|
|
background-color: #FC1F3E;
|
|
|
|
color: white;
|
|
|
|
width: 70%;
|
|
|
|
border-radius: 10rpx;
|
|
|
|
margin-top: 80rpx;
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
.my-suggest-dom {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
font-size: 22rpx;
|
|
|
|
margin-top: 20rpx;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|