征信小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
zhengxinApplets/pages/user/feedback.vue

339 lines
7.1 KiB

3 months ago
<template>
<view class="feedback">
3 months ago
<view class="hd">如需尽快解决问题可直接联系在线客服<image src="https://zhengxin.njrenzhou.cn/static/jiantou2.png"></image></view>
3 months ago
<view class="bd">
<view class="title"><text>*</text>反馈类型</view>
<view class="tab">
<view class="item" :class="tabIndex == 0?'item-on':''" @click="tabItem(0)">界面</view>
<view class="item" :class="tabIndex == 1?'item-on':''" @click="tabItem(1)">服务问题</view>
</view>
<picker mode="selector">
<view class="picker">
3 months ago
体验不好<image src="https://zhengxin.njrenzhou.cn/static/jiantouxia.png"></image>
3 months ago
</view>
</picker>
<view class="title"><text>*</text>反馈内容</view>
<view class="textarea">
<textarea class="box" placeholder="请输入文字"></textarea>
<view class="num">0/200</view>
</view>
<view class="title"><text>*</text>图片上传<view class="sub">(上传聊天截图或与问题描述相关的图片)</view></view>
<view class="pic">
<view class="li" v-for="i in 5" :key="i">
3 months ago
<image class="img" mode="heightFix" src="https://zhengxin.njrenzhou.cn/static/bg2.png"></image>
<image class="del" mode="heightFix" src="https://zhengxin.njrenzhou.cn/static/icon-del.png"></image>
3 months ago
</view>
<view class="upload">
3 months ago
<image src="https://zhengxin.njrenzhou.cn/static/paizhao.png"></image>
3 months ago
<view class="txt">上传图片</view>
</view>
</view>
<view class="title"><text>*</text>联系方式</view>
<view class="content">
<view class="item">
<input type="text" placeholder="请填写您的姓名" />
</view>
<view class="item">
<input type="text" placeholder="请填写您的电话或邮箱" />
</view>
</view>
</view>
<view class="fd">
<view class="btn">提交反馈</view>
3 months ago
<view class="jilu" @click="openPage()">反馈记录<image src="https://zhengxin.njrenzhou.cn/static/icon-arrow.png"></image></view>
3 months ago
</view>
</view>
</template>
<script>
export default {
data() {
return {
tabIndex: 0,
content: "",
imgs: [],
statusBarHeight: 0,
bgColor: '#EBEDEC'
}
},
mounted() {
},
methods: {
async toSubmit() {
const that = this;
if (!this.content) {
uni.showToast({
title: '请输入反馈内容',
icon: 'none',
})
return
}
if (this.imgs.length == 0) {
uni.showToast({
title: '请上传图片',
icon: 'none',
})
return
}
const { code, data, message } = await this.$api.problemFeedback({
imgs: this.imgs.join(","),
content: this.content,
});
if(code == 200){
uni.showToast({
title: "提交成功"
})
setTimeout(()=>{
that.content = "";
that.imgs = [];
that.fileList4 = []
},1000)
}
},
openPage(){
uni.navigateTo({
url: "/pages/user/feedList"
})
},
afterRead(e) {
const that = this;
console.log(e)
console.log(e.file.url)
uni.uploadFile({
name: 'file',
header: {
userToken: uni.getStorageSync('token')
},
url: this.$baseUrl+'api/user/upload',
filePath: e.file.url,
success: (upRes) => {
let end = JSON.parse(upRes.data)
that.fileList4.push({
url: end.data.url
})
that.imgs.push(end.data.path)
},
fail: (err) => {
console.log("toUpload err",err)
console.log(err)
}
});
},
deletePic(event) {
this.fileList4.splice(event.index, 1)
this.imgs.splice(event.index, 1)
},
},
}
</script>
<style lang="scss" scoped>
.feedback {
padding-bottom: 200rpx;
overflow: hidden;
.fd{
width: 100%;
position: fixed;
left: 0;
bottom: 0;
z-index: 22;
background-color: #FFFFFF;
padding: 25rpx;
box-sizing: border-box;
.btn{
width: 100%;
height: 90rpx;
line-height: 90rpx;
background: #00C6A9;
border-radius: 90rpx;
text-align: center;
font-weight: 400;
font-size: 30rpx;
color: #FFFFFF;
}
.jilu{
display: flex;
align-items: center;
justify-content: center;
font-weight: 400;
font-size: 26rpx;
color: #666666;
margin-top: 10rpx;
image{
width: 30rpx;
height: 30rpx;
}
}
}
.hd{
width: 100%;
line-height: 80rpx;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 25rpx;
box-sizing: border-box;
background: #FBEBEB;
font-weight: 400;
font-size: 26rpx;
color: #E53623;
image{
width: 14rpx;
height: 24rpx;
}
}
.bd{
padding: 0 25rpx 15rpx;
box-sizing: border-box;
width: 100%;
background: #FFFFFF;
box-shadow: 0px 3rpx 10rpx 0px rgba(9,44,39,0.05);
border-radius: 20rpx;
margin-top: 20rpx;
.title{
padding: 30rpx 0;
font-weight: 400;
font-size: 30rpx;
color: #333;
display: flex;
align-items: center;
text{
color: #E53623;
}
.sub{
margin-left: 10rpx;
font-size: 24rpx;
color: #999999;
}
}
.tab{
display: flex;
align-items: center;
.item{
padding: 0 40rpx;
line-height: 61rpx;
height: 61rpx;
border-radius: 61rpx;
border: 1px solid #CCCCCC;
text-align: center;
font-weight: 400;
font-size: 28rpx;
color: #333333;
&-on{
color: #FFFFFF;
border: 1px solid #00C6A9;
background: #00C6A9;
}
margin-right: 20rpx;
}
}
.picker{
width: 100%;
height: 90rpx;
background: #F6F6F6;
border-radius: 10rpx;
padding: 0 30rpx;
display: flex;
align-items: center;
justify-content: space-between;
font-weight: 400;
font-size: 28rpx;
color: #333333;
margin-top: 40rpx;
box-sizing: border-box;
image{
width: 24rpx;
height: 14rpx;
}
}
.textarea{
width: 100%;
height: 360rpx;
background: #F6F6F6;
border-radius: 10rpx;
padding: 25rpx;
box-sizing: border-box;
textarea{
width: 100%;
height: 250rpx;
font-weight: 400;
font-size: 28rpx;
color: #333;
}
.num{
text-align: right;
font-weight: 400;
font-size: 28rpx;
color: #999999;
line-height: 60rpx;
}
}
.pic{
overflow: hidden;
padding-bottom: 30rpx;
.li{
width: 152rpx;
height: 152rpx;
border-radius: 10rpx;
position: relative;
overflow: hidden;
margin-top: 20rpx;
margin-right: 20rpx;
float: left;
.img{
width: 100%;
height: 100%;
}
.del{
width: 45rpx;
height: 45rpx;
position: absolute;
right: 0;
top: 0;
z-index: 2;
}
}
.upload{
width: 152rpx;
height: 152rpx;
border-radius: 10rpx;
position: relative;
overflow: hidden;
border: 1px solid #DDDDDD;
text-align: center;
font-weight: 500;
margin-top: 20rpx;
font-size: 24rpx;
color: #333333;
float: left;
image{
width: 46rpx;
height: 42rpx;
margin-top: 35rpx;
margin-bottom: 20rpx;
}
}
}
.content{
.item{
width: 100%;
margin-bottom: 20rpx;
overflow: hidden;
input{
height: 90rpx;
line-height: 90rpx;
background: #F6F6F6;
border-radius: 10rpx;
text-align: left;
font-weight: 400;
font-size: 28rpx;
color: #333333;
padding: 0 30rpx;
}
}
}
}
}
</style>