177 lines
3.8 KiB
Vue
177 lines
3.8 KiB
Vue
<template>
|
|
<view class="suggest-content">
|
|
<navigation-bar-vue title="意见反馈" style="width: 100%;" background-color="#ffffff"
|
|
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">
|
|
<textarea v-model="dataObj.content" placeholder="请输入" />
|
|
</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';
|
|
export default {
|
|
components: {
|
|
navigationBarVue
|
|
},
|
|
data() {
|
|
return {
|
|
dataObj: {
|
|
content: ""
|
|
},
|
|
sizeType: ['compressed'],
|
|
//图片数组
|
|
fileList: [],
|
|
}
|
|
},
|
|
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({
|
|
url: config.baseUrl + res.data
|
|
})
|
|
console.log(this.fileList, 'fileList')
|
|
})
|
|
}
|
|
},
|
|
deleteFile(file, index) {
|
|
console.log('删除文件');
|
|
this.fileList.splice(index, 1);
|
|
},
|
|
/**提交*/
|
|
submitForm() {},
|
|
/**
|
|
* 去我的建议列表
|
|
*/
|
|
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;
|
|
}
|
|
|
|
textarea {
|
|
width: 100%;
|
|
height: 150rpx;
|
|
color: #686868;
|
|
padding: 10rpx 0 10rpx 20rpx;
|
|
border: 1rpx solid #dcdfe6;
|
|
border-radius: 8rpx;
|
|
}
|
|
}
|
|
|
|
.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> |