const util = require('../../../utils/util.js');
const qrcode = require('../../../utils/qrcode.js');
const app = getApp();
Page({
  data: {
    qrcode:"",
    info:{}
  },
  onLoad(options) {
    let that = this;
    util.ajax({
      func: "order/by_password",
      data: {"password": options.password }
    }, function (res) {
      if (res.code == 0) {
        var data = qrcode.createQrCodeImg(res.data.password, { 'size': 350,'errorCorrectLevel':'H' });
        that.setData({ qrcode: data, info:res.data});
      } else {
        util.showTips(res.reason);
      }
    });
  }
})