| 
							- const util = require("../../../utils/util");
 - const config = require("../../../config/config.js");
 - const Http = require("../../../utils/HttpBasics");
 - 
 - //券详情页面
 - Page({
 -   data: {
 -     code: "",
 -     data: {},
 -     createDate: "",
 -     expiredTime: ""
 -   },
 -   onLoad: function(options) {
 -     console.log(options);
 -     let that = this;
 -     that.setData({
 -       code: options.quancode
 -     });
 - 
 -     //获得优惠券的详情
 -     if (
 -       options.quancode != null &&
 -       (options.quancode != "" && options.quancode) != undefined
 -     ) {
 -       Http.get({
 -         url: config.api.couponOrderDetail,
 -         data: {
 -           couponOrderId: options.quancode
 -         }
 -       }).then(res => {
 -         console.log(res);
 -         that.setData({
 -           data: res.data
 -         });
 -         that.setData({
 -           expiredTime: util.fmtDate(that.data.data.expiredTime),
 -           createDate: util.fmtDate(that.data.data.createDate)
 -         });
 -       });
 -     }
 -     util.barcode("barcode", options.quancode, 680, 100);
 -     util.qrcode("qrcode", options.quancode, 400, 400);
 -   },
 -   phone: function() {
 -     let that = this;
 -     console.log(that.data);
 -     if (that.data.merchantLinkPhone) {
 -       wx.makePhoneCall({
 -         phoneNumber: that.data.merchantLinkPhone //仅为示例,并非真实的电话号码
 -       });
 -     }
 -   }
 - });
 
 
  |