// pages/process/order-check/index.js import Dialog from '../../../components/dialog/dialog' const app = getApp() Page({ /** * 页面的初始数据 */ data: { safeBottom: app.globalData.safeBottom, form: { plateNumber: null } }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { this.setData({ safeBottom: app.globalData.safeBottom }) }, showPlate: function (e) { this.keyboard = this.keyboard || this.selectComponent('#wux-keyboard') this.keyboard.show(this.data.form.plateNumber, 0) }, onPlatenumber: function({detail}){ if(detail && detail.plateNumber){ this.setData({ ['form.plateNumber']: detail.plateNumber }) } }, showCategory: function(){ }, bindInput: function (e) { this.data.form[e.target.id] = e.detail.value }, onChange: function({ detail }) { // 需要手动对 checked 状态进行更新 this.setData({ ['form.isDefault']: detail ? 1 : 0 }) }, paddingOrder: function(){ this.setData({ ['form.checking']: !this.data.form.checking }) }, cancelOrder: function(e){ Dialog.confirm({ title: '温馨提示', message: '确定取消该订单?' }).then(() => { }) }, viewImage: function (e) { var imgList = [] for (let index = 0; index < this.data.imgList.length; index++) { if (this.data.imgList[index].indexOf('.mp4') >= 0) { continue } imgList.push(this.data.imgList[index]) } wx.previewImage({ urls: imgList, current: e.currentTarget.dataset.url }) } })