// pages/message/detail/index.js import Scene from '../../index/scene' import { postFeedback } from '../../../api/saas' const util = require('../../../utils/util') Scene({ /** * 页面的初始数据 */ data: { }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { }, callCustomerPhone() { wx.makePhoneCall({ phoneNumber: '020-82516486', }) }, bindInput: function (e) { this.setData({ ['form.content']: e.detail.value, }) }, feedbcak: function (e) { if (util.isEmpty(this.data.form.content)) { util.showToast('请输入反馈内容') return } postFeedback(this.data.form).then(res => { if (res.code == 0) { util.showToast('提交反馈成功!') this.setData({ content: '' }) } else { util.showToast('提交失败!') } }) } })