// pages/sorting/choice.js Page({ /** * 页面的初始数据 */ data: { inputval:"" }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { }, getScancode: function () { var _this = this; // 允许从相机和相册扫码 wx.scanCode({ onlyFromCamera: true, scanType:['barCode', 'qrCode','datamatrix','pdf417'], success: (res) => { console.log(res); var result = res.result; _this.sign(result); _this.setData({ inputval: result, }) }, fail:(err)=>{ console.log(err); } }) }, bindinput(e){ this.setData({ inputval:e.detail.value }) }, toOrder(){ wx.navigateTo({ url: '../order/order?wash_code='+this.data.inputval, }) } })