|
|
@ -5,28 +5,28 @@ |
|
|
<view class="main_section"> |
|
|
<view class="main_section"> |
|
|
<view class="section"> |
|
|
<view class="section"> |
|
|
<view class="text_input"> |
|
|
<view class="text_input"> |
|
|
<fui-textarea placeholder="请输入反馈内容" v-model="formData.content"></fui-textarea> |
|
|
<fui-textarea placeholder="请输入反馈内容" v-model="formData.feedback_text"></fui-textarea> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<view class="section"> |
|
|
<view class="section"> |
|
|
<view class="upload_box"> |
|
|
<view class="upload_box"> |
|
|
<view>上传图片</view> |
|
|
<view>上传图片</view> |
|
|
<AQUplodeImgMulti :inputName="`images_arr`" :inputValue="formData.images_arr || []" |
|
|
<AQUplodeImgMulti :inputName="`attachment_url_arr`" :inputValue="formData.attachment_url_arr || []" :uploadApiUrl="uploadApiUrl" :maxFileNum="1" |
|
|
@AQUploadSuccess="AQUploadSuccess" /> |
|
|
@AQUploadSuccess="AQUploadSuccess" /> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<view class="section"> |
|
|
<!-- <view class="section">--> |
|
|
<view class="input_box"> |
|
|
<!-- <view class="input_box">--> |
|
|
<fui-input label="邮箱方式" borderTop placeholder="请输入邮箱" v-model="formData.mailbox"></fui-input> |
|
|
<!-- <fui-input label="邮箱方式" borderTop placeholder="请输入邮箱" v-model="formData.mailbox"></fui-input>--> |
|
|
</view> |
|
|
<!-- </view>--> |
|
|
</view> |
|
|
<!-- </view>--> |
|
|
|
|
|
|
|
|
<view class="describe"> |
|
|
<!-- <view class="describe">--> |
|
|
反馈的相关问题会第一时间通过邮箱解答。 |
|
|
<!-- 反馈的相关问题会第一时间通过邮箱解答。--> |
|
|
</view> |
|
|
<!-- </view>--> |
|
|
|
|
|
|
|
|
<view class="btn" @click="submitForm()">提交</view> |
|
|
<view class="btn" @click="submitForm()">提交</view> |
|
|
</view> |
|
|
</view> |
|
|
@ -34,9 +34,13 @@ |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
|
|
|
import apiRoute from '@/api/apiRoute.js'; |
|
|
import memberApi from '@/api/member.js'; |
|
|
import memberApi from '@/api/member.js'; |
|
|
import AQUplodeImgMulti from '@/components/AQ/AQUplodeImgMulti'; |
|
|
import AQUplodeImgMulti from '@/components/AQ/AQUplodeImgMulti'; |
|
|
import AQTabber from "@/components/AQ/AQTabber" |
|
|
import AQTabber from "@/components/AQ/AQTabber" |
|
|
|
|
|
import { |
|
|
|
|
|
Api_url |
|
|
|
|
|
} from "@/common/config.js"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
@ -46,16 +50,40 @@ |
|
|
}, |
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
|
|
|
uploadApiUrl:`${Api_url}/memberUploadImage`,//上传文件接口的url |
|
|
formData: { |
|
|
formData: { |
|
|
images_arr: [], |
|
|
attachment_url_arr: [], |
|
|
images:'', |
|
|
attachment_url:undefined,//图片地址,多个使用,号拼接 |
|
|
content:'', |
|
|
feedback_text:'',//反馈内容 |
|
|
mailbox:'', |
|
|
user_id:'',//用户ID|school_customer_resources表id |
|
|
}, |
|
|
}, |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
onLoad() {}, |
|
|
onLoad() {}, |
|
|
|
|
|
onShow(){ |
|
|
|
|
|
this.init() |
|
|
|
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
async init(){ |
|
|
|
|
|
//获取学生详情 |
|
|
|
|
|
await this.getMemberInfo() |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//获取学员信息 |
|
|
|
|
|
async getMemberInfo() { |
|
|
|
|
|
let res = await apiRoute.xy_memberInfo({}) |
|
|
|
|
|
if(res.code != 1){ |
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
title: res.msg, |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
this.formData.user_id = res.data.id |
|
|
|
|
|
console.log('xxxx',res.data) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//######AQ上传文件组件相关###### |
|
|
//######AQ上传文件组件相关###### |
|
|
// 上传文件回调 |
|
|
// 上传文件回调 |
|
|
AQUploadSuccess(res) { |
|
|
AQUploadSuccess(res) { |
|
|
@ -67,13 +95,16 @@ |
|
|
} |
|
|
} |
|
|
this.formData[res.inputName] = _inputValue |
|
|
this.formData[res.inputName] = _inputValue |
|
|
// console.log('接收AQ上传回调xxx1',res) |
|
|
// console.log('接收AQ上传回调xxx1',res) |
|
|
// console.log('接收AQ上传回调xxx2',this.formData.member_store_certification_arr) |
|
|
// console.log('接收AQ上传回调xxx2',this.formData[res.inputName]) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
async submitForm() { |
|
|
async submitForm() { |
|
|
let data = {...this.formData} |
|
|
let data = {...this.formData} |
|
|
data.images = data.images_arr.join(',') |
|
|
if(data.attachment_url_arr.length){ |
|
|
if(!data.content){ |
|
|
data.attachment_url = data.attachment_url_arr.join(',') |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if(!data.feedback_text){ |
|
|
//反馈内容为必填项 |
|
|
//反馈内容为必填项 |
|
|
uni.showToast({ |
|
|
uni.showToast({ |
|
|
title:'反馈内容为必填项', |
|
|
title:'反馈内容为必填项', |
|
|
@ -81,7 +112,7 @@ |
|
|
}) |
|
|
}) |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
let res = await memberApi.setFeedback(data) |
|
|
let res = await apiRoute.xy_userFeedbackAdd(data) |
|
|
if(res.code != 1){ |
|
|
if(res.code != 1){ |
|
|
uni.showToast({ |
|
|
uni.showToast({ |
|
|
title:res.msg, |
|
|
title:res.msg, |
|
|
|