const util = require('../../../utils/util.js');
Page({
  data: {
  	datas:{},
  },
  onLoad(options) {
    let data ={};
    data.expCode=options.code||'';
    data.expNo=options.no || '';
    data.phone=options.phoneNum||'';
    this.logistics(data);
  },
  logistics(data){
  	var that = this;
  	util.ajax({
		func:"logistics",
		data,
	},function(res){
		if(res.code == 0){
      that.setData({ datas: res.data})
		}else{
			util.showTips(res.reason);
      setTimeout(function(){
        wx.navigateBack();
      },2000);
		}
	})
	},
	copyExpNo(e){
		let expNo=e.currentTarget.dataset.number;
		wx.setClipboardData({
      data: expNo,
      success: function () {
        wx.showToast({
          title: '复制成功',
        })
      }
    })
	}
})