123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- <template>
- <view class="feedback-wrapper">
- <view class="input-box">
- <textarea type="text" placeholder="请输入您要反馈的内容" v-model="con" />
- </view>
- <view class="input-box">
- <text class="info" selectable="false" space="false" decode="false">
- 上传图片
- </text>
- <u-upload action="http://www.example.com/upload" :file-list="[
- ]" max-count="1"></u-upload>
- </view>
- <view class="sub_btn" @click="subMit">
- <button class='modifyBnt' formType="submit">保存</button>
- </view>
- </view>
- </template>
- <script>
- import { serviceFeedBack, feedBackPost } from '@/api/kefu.js'
- export default {
- name: 'feedback',
- data () {
- return {
- name: '',
- phone: '',
- con: '',
- }
- },
- onLoad () {
- },
- methods: {
- subMit () {
- if (!this.name) {
- return this.$util.Tips({
- title: this.$t(`请输入姓名`)
- })
- }
- if (!this.phone || !(/^1(3|4|5|7|8|9|6)\d{9}$/i.test(this.phone))) {
- return this.$util.Tips({
- title: this.$t(`请输入正确的手机号码`)
- })
- }
- if (!this.con) {
- return this.$util.Tips({
- title: this.$t(`请填写内容`)
- })
- }
- feedBackPost({
- rela_name: this.name,
- phone: this.phone,
- content: this.con
- }).then(res => {
- this.$util.Tips({
- title: res.msg,
- icon: 'success'
- }, {
- tab: 3
- })
- }).catch(function (res) {
- that.$util.Tips({ title: res });
- });
- }
- }
- }
- </script>
- <style scoped lang="scss">
- .feedback-wrapper{
- background: #fff;
- margin-top: 20rpx;
- padding: 30rpx;
- }
- .info{
- height: 44rpx;
- font-size: 28rpx;
- font-weight: 400;
- color: #999999;
- line-height: 44rpx;
- }
- .modifyBnt {
- width: 85%;
- margin: auto;
- margin-top: 50rpx;
- height: 84rpx;
- background: #B42A3E;
- border-radius: 8rpx;
- font-size: 32rpx;
- color: #fff;
- text-align: center;
- line-height: 84rpx;
- }
- </style>
|