|
|
|
@ -1,59 +1,70 @@ |
|
|
|
|
<template> |
|
|
|
|
<view class="container"> |
|
|
|
|
<view class="form"> |
|
|
|
|
<view class="form-item"> |
|
|
|
|
<view class="form-item-label"> |
|
|
|
|
<text class="label-flag">*</text>问题类型 |
|
|
|
|
</view> |
|
|
|
|
<view class="form-item-content"> |
|
|
|
|
<view v-for="(item, index) in typeList" :key="index" class="type" @click="form.type = index + 1"> |
|
|
|
|
<image v-if="form.type !== index + 1" src="/static/feedback/circle.png" mode="aspectFill"></image> |
|
|
|
|
<image v-else src="/static/feedback/circle-choose.png" mode="aspectFill"></image> |
|
|
|
|
{{ item }} |
|
|
|
|
<template v-if="!isSubmit"> |
|
|
|
|
<view class="form"> |
|
|
|
|
<view class="form-item"> |
|
|
|
|
<view class="form-item-label"> |
|
|
|
|
<text class="label-flag">*</text>问题类型 |
|
|
|
|
</view> |
|
|
|
|
<view class="form-item-content"> |
|
|
|
|
<view v-for="(item, index) in typeList" :key="index" class="type" @click="form.type = index + 1"> |
|
|
|
|
<image v-if="form.type !== index + 1" src="/static/feedback/circle.png" mode="aspectFill"></image> |
|
|
|
|
<image v-else src="/static/feedback/circle-choose.png" mode="aspectFill"></image> |
|
|
|
|
{{ item }} |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="form-item"> |
|
|
|
|
<view class="form-item-label"> |
|
|
|
|
<text class="label-flag">*</text>反馈与建议 |
|
|
|
|
</view> |
|
|
|
|
<view class="form-item-content"> |
|
|
|
|
<view class="textarea-box"> |
|
|
|
|
<textarea v-model="form.suggest" placeholder="您填写的信息越全,越有利于问题得到快速解决~" placeholder-class="textarea-placeholer" maxlength="299" /> |
|
|
|
|
<view class="text-num">已写<text>{{ form.suggest.length }}</text>/299个字</view> |
|
|
|
|
<view class="form-item"> |
|
|
|
|
<view class="form-item-label"> |
|
|
|
|
<text class="label-flag">*</text>反馈与建议 |
|
|
|
|
</view> |
|
|
|
|
<view class="image-list"> |
|
|
|
|
<view v-for="(item, index) in form.images" :key="index" class="image"> |
|
|
|
|
<image :src="item" mode="aspectFill" @click="previewImage(item)"></image> |
|
|
|
|
<image src="/static/delete.png" mode="aspectFill" class="delete" @click.stop="deleteImage(index)"></image> |
|
|
|
|
<view class="form-item-content"> |
|
|
|
|
<view class="textarea-box"> |
|
|
|
|
<textarea v-model="form.suggest" placeholder="您填写的信息越全,越有利于问题得到快速解决~" placeholder-class="textarea-placeholer" maxlength="299" /> |
|
|
|
|
<view class="text-num">已写<text>{{ form.suggest.length }}</text>/299个字</view> |
|
|
|
|
</view> |
|
|
|
|
<view v-if="form.images.length < 5" class="upload-btn" @click="addImage"> |
|
|
|
|
<image src="/static/feedback/photo.png" mode="aspectFill"></image> |
|
|
|
|
<view class="tip">添加照片</view> |
|
|
|
|
<view class="sub-tip">最多5张</view> |
|
|
|
|
<view class="image-list"> |
|
|
|
|
<view v-for="(item, index) in form.images" :key="index" class="image"> |
|
|
|
|
<image :src="item" mode="aspectFill" @click="previewImage(item)"></image> |
|
|
|
|
<image src="/static/delete.png" mode="aspectFill" class="delete" @click.stop="deleteImage(index)"></image> |
|
|
|
|
</view> |
|
|
|
|
<view v-if="form.images.length < 5" class="upload-btn" @click="addImage"> |
|
|
|
|
<image src="/static/feedback/photo.png" mode="aspectFill"></image> |
|
|
|
|
<view class="tip">添加照片</view> |
|
|
|
|
<view class="sub-tip">最多5张</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="image-num"><text>{{ form.images.length }}</text>/5</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="image-num"><text>{{ form.images.length }}</text>/5</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="form-item"> |
|
|
|
|
<view class="form-item-content" style="padding: 0 30rpx;"> |
|
|
|
|
<view class="content-info"> |
|
|
|
|
<view class="info-name">您的姓名</view> |
|
|
|
|
<input type="text" v-model="form.name" placeholder="请填写您的名字" placeholder-class="input-placeholder" /> |
|
|
|
|
</view> |
|
|
|
|
<view class="content-info"> |
|
|
|
|
<view class="info-name">您的电话</view> |
|
|
|
|
<input type="number" v-model="form.phone" placeholder="请填写可以联系到您的手机号码" placeholder-class="input-placeholder" /> |
|
|
|
|
</view> |
|
|
|
|
<view class="content-info"> |
|
|
|
|
<view class="info-name">您的单位</view> |
|
|
|
|
<input type="text" v-model="form.unit" placeholder="请填写您商城认证的营业执照名称" placeholder-class="input-placeholder" /> |
|
|
|
|
<view class="form-item"> |
|
|
|
|
<view class="form-item-content" style="padding: 0 30rpx;"> |
|
|
|
|
<view class="content-info"> |
|
|
|
|
<view class="info-name">您的姓名</view> |
|
|
|
|
<input type="text" v-model="form.name" placeholder="请填写您的名字" placeholder-class="input-placeholder" /> |
|
|
|
|
</view> |
|
|
|
|
<view class="content-info"> |
|
|
|
|
<view class="info-name">您的电话</view> |
|
|
|
|
<input type="number" v-model="form.phone" placeholder="请填写可以联系到您的手机号码" placeholder-class="input-placeholder" /> |
|
|
|
|
</view> |
|
|
|
|
<view class="content-info"> |
|
|
|
|
<view class="info-name">您的单位</view> |
|
|
|
|
<input type="text" v-model="form.unit" placeholder="请填写您商城认证的营业执照名称" placeholder-class="input-placeholder" /> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="submit" @click="submit">提交</view> |
|
|
|
|
<view class="submit" @click="submit">提交</view> |
|
|
|
|
</template> |
|
|
|
|
<template v-else> |
|
|
|
|
<view class="success"> |
|
|
|
|
<image :src="$picUrl+ '/static/feedbackSuccess.png'" mode="aspectFill"></image> |
|
|
|
|
<view class="success-tip">提交成功</view> |
|
|
|
|
<text>您的反馈意见已经提交成功,</text> |
|
|
|
|
<text>预计1-2个工作日内与您联系。</text> |
|
|
|
|
</view> |
|
|
|
|
<view class="submit back" @click="back">完成</view> |
|
|
|
|
</template> |
|
|
|
|
</view> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
@ -79,6 +90,7 @@ import * as Api from '@/api/feedback/index.js' |
|
|
|
|
unit: '', |
|
|
|
|
}, |
|
|
|
|
loading: false, |
|
|
|
|
isSubmit: false, |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
@ -192,18 +204,17 @@ import * as Api from '@/api/feedback/index.js' |
|
|
|
|
.then(res => { |
|
|
|
|
console.log(res); |
|
|
|
|
this.loading = false; |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: '添加成功!' |
|
|
|
|
}); |
|
|
|
|
setTimeout(() => { |
|
|
|
|
uni.navigateBack(); |
|
|
|
|
}, 1500); |
|
|
|
|
this.isPublish = true; |
|
|
|
|
}) |
|
|
|
|
.catch(() => { |
|
|
|
|
this.loading = false; |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
back() { |
|
|
|
|
uni.navigateBack(); |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
|
</script> |
|
|
|
@ -360,5 +371,33 @@ import * as Api from '@/api/feedback/index.js' |
|
|
|
|
text-align: center; |
|
|
|
|
margin-top: 30rpx; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.success { |
|
|
|
|
display: flex; |
|
|
|
|
flex-direction: column; |
|
|
|
|
align-items: center; |
|
|
|
|
padding-top: 140rpx; |
|
|
|
|
>image { |
|
|
|
|
width: 189rpx; |
|
|
|
|
height: 166rpx; |
|
|
|
|
} |
|
|
|
|
.success-tip { |
|
|
|
|
margin: 34rpx 0 28rpx; |
|
|
|
|
color: #222222; |
|
|
|
|
font-size: 36rpx; |
|
|
|
|
line-height: 36rpx; |
|
|
|
|
} |
|
|
|
|
uni-text { |
|
|
|
|
color: #666666; |
|
|
|
|
font-size: 28rpx; |
|
|
|
|
line-height: 40rpx; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.back { |
|
|
|
|
position: fixed; |
|
|
|
|
left: 24rpx; |
|
|
|
|
width: 702rpx; |
|
|
|
|
bottom: 43rpx; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</style> |