// pages/xsjb/xsjb.js import { $wuxForm } from '../../templeteDist/wuxDist/index'; Page({ /** * 页面的初始数据 */ data: { meetingWayList: [{ value: 'HY000001', title: '线下调解' }, { value: 'HY000002', title: '视频调解' }], displaymeetingWay: '请选择', }, /** * 生命周期函数--监听页面加载 */ onLoad: function(options) { }, formSubmit(e) { console.log('Default Form Submit \n', e.detail.value) }, onSubmit() { const { getFieldsValue, getFieldValue, setFieldsValue } = $wuxForm() const value = getFieldsValue() console.log('Wux Form Submit \n', value) }, // 选择地理位置 chooseLocation: function(e) { const that = this; wx.chooseLocation({ success: function(res) { console.log('res', res); } }) }, onPopupSelectChange(e) { let _this = this; var key = e.currentTarget.dataset['key']; console.log('key', key, e); this.setData({ [key]: e.detail.value, [`display${key}`]: e.detail.label }); } })