(global["webpackJsonp"] = global["webpackJsonp"] || []).push([["pagesB/common/vendor"],{

/***/ 356:
/*!*******************************************************************************!*\
  !*** C:/Users/Administrator/Desktop/yswc/hire-wx-houxuanren/static/js/api.js ***!
  \*******************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(uni) {var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ 13);
// 加密 sha1 md5
var encrypt = __webpack_require__(/*! ./encrypt.js */ 357);
// 缓存
var cache = __webpack_require__(/*! ./cache.js */ 358);
// 数学精确计算
var math = __webpack_require__(/*! ./math.js */ 359);
// 腾讯位置服务
var qqMap = __webpack_require__(/*! ./qqmap-wx-jssdk */ 360);
// 二维码
var qrCode = __webpack_require__(/*! ./weapp.qrcode.min */ 361);
module.exports = {
  /**
   * 小程序基本配置
   */
  config: {
    name: '内核招聘-猎头端',
    debug: false,
    //开发模式true，生产环境改为false;
    version: 'xcx',
    baseUrl: 'https://hire.hdlkeji.com',
    // baseUrl: 'http://hire.hdlkeji.com',
    qqMap: false,
    loading: false
  },
  /**
   * sha1加密
   * @param str
   * @param raw 加密方式 1str_sha1 0hex_sha1
   */
  sha1: function sha1(str, raw) {
    return encrypt.sha1(str, raw);
  },
  /**
   * md5加密
   * @param str
   */
  md5: function md5(str) {
    return encrypt.md5(str);
  },
  /**
   * 缓存
   */
  cache: cache,
  /**
   * 数字精确计算
   */
  math: math,
  /**
   * 腾讯地图
   */
  qqMap: qqMap,
  /**
   * 消息提示
   * @param title
   * @param icon:success,error,loading,none 
   * @param success
   * @param time
   * @param mask
   */
  info: function info(title, icon, success, time, mask) {
    if (typeof icon == 'function') {
      success = icon;
      icon = "none";
    }
    title = title == undefined ? "系统繁忙" : title;
    icon = icon == undefined ? "none" : icon;
    time = time == undefined ? 1000 : time;
    mask = mask == undefined ? true : mask;
    uni.showToast({
      title: title,
      icon: icon,
      mask: mask,
      duration: time,
      success: setTimeout(function () {
        success && success();
      }, time)
    });
  },
  /**
   * 确认提示框
   * @param {Object} content
   * @param {Object} success
   * @param {Object} cancel
   * @param {Object} confirmText
   * @param {Object} cancelText
   */
  modal: function modal(content, success, cancel, confirmText, cancelText) {
    var opt = {};
    opt.title = this.config.name;
    opt.content = content;
    // 默认不显示取消
    opt.showCancel = false;
    if (typeof cancel == 'function' || typeof cancel == 'boolean' && cancel) {
      opt.showCancel = true;
    } else if (typeof cancel == 'string') {
      cancelText = confirmText;
      confirmText = cancel;
    }
    if (!this.isEmpty(confirmText)) {
      opt.confirmText = confirmText;
    }
    if (!this.isEmpty(cancelText)) {
      opt.cancelText = cancelText;
      opt.showCancel = true;
    }
    opt.success = function (res) {
      if (res.confirm) {
        success && success();
      } else if (res.cancel) {
        typeof cancel == 'function' && cancel();
      }
    };
    uni.showModal(opt);
  },
  /**
   * loading 提示框
   * @param title
   */
  loading: function loading(title) {
    var that = this;
    title = typeof title == 'string' ? title : "加载中...";
    !that.config.loading && uni.showLoading({
      title: title,
      mask: true,
      success: function success() {
        that.config.loading = true;
      }
    });
  },
  /**
   * 关闭loading 提示框
   */
  closeLoading: function closeLoading() {
    var that = this;
    that.config.loading && uni.hideLoading({
      noConflict: true,
      success: function success() {
        that.config.loading = false;
      }
    });
  },
  /**
   * 判断登录
   * @param {Object} type 0不跳转登录 1跳转登录
   * @param {Object} success
   */
  login: function login(type, success) {
    if (typeof type == 'function') {
      success = type;
      type = 1;
    } else if (typeof type == 'undefined') {
      type = 1;
    }
    var that = this;
    /* var userInfo = this.getUserInfo();
    if (this.isEmpty(userInfo)) {
    	if (type == 1) {
    		that.info('请先登录', function() {
    			var pages = getCurrentPages();
    			var route = pages[pages.length - 1].route;
    			// if (route != 'pages/login/choose') {
    			// 	that.jump('/pages/login/choose');
    			// }
    		});
    	}
    	return false;
    } */
    // return success && success(userInfo) || userInfo;
    return success;
  },
  /**
   * 页面跳转
   * @param url
   * @param type
   */
  jump: function jump(url, type, params) {
    var that = this;
    if (that.isEmpty(url) && type !== -1) return false;
    if (url === -1) {
      var delta = type || 1;
      type = url;
    } else if (type === -1) {
      var delta = 1;
      if (params && params.delta) {
        delta = params.delta;
      }
    }
    type = type || 0,
    //默认0
    params = params || {};
    if (that.isEmpty(params)) {
      cache.remove('jump_data');
    } else {
      cache.set('jump_data', params);
    }
    switch (type) {
      case -1:
        //关闭当前页面，返回上一页面或多级页面 delta:1 返回层数
        setTimeout(function () {
          uni.navigateBack({
            delta: delta
          });
        }, 800);
        return;
      case 0:
        //保留当前页面，跳转到应用内的某个页面，使用uni.navigateBack可以返回到原页面
        uni.navigateTo({
          url: url
        });
        return;
      case 1:
        //关闭当前页面，跳转到应用内的某个页面
        uni.redirectTo({
          url: url
        });
        return;
      case 2:
        //关闭所有页面，打开到应用内的某个页面
        uni.reLaunch({
          url: url
        });
        return;
      case 3:
        //跳转到 tabBar 页面，并关闭其他所有非 tabBar 页面
        uni.switchTab({
          url: url
        });
        return;
      default:
        return false;
    }
  },
  /**
   * 数据请求
   */
  req: function req(option, onsuccess, onerror, oncomplete) {
    if (option == 'undefined') return false;
    this.loading();
    // console.log('请求',option);
    var that = this,
      config = {
        sign: false,
        //是否签名数据
        load: false,
        //是否显示loading提示
        login: false,
        //是否需要登录
        url: false,
        data: option.data,
        header: {
          'content-type': 'application/json',
          'token': uni.getStorageSync('token') ? uni.getStorageSync('token') : ''
        },
        method: option.method ? option.method : 'POST',
        dataType: 'json',
        success: function success(res) {
          //通讯成功

          that.jslog('请求:' + option.url);
          that.jslog(res.data);
          that.closeLoading();
          //获取返回数据
          res = res.data;

          //如果存在回调，优先执行回调函数
          if (onsuccess) {
            if (onsuccess(res) === false) {
              return;
            }
          }
          if (_typeof(res) == 'object') {
            // (res.info && res.info != 'success') && that.info(res.info);
            /* if (res.status == 98) { //未登录或账号不存在
            	cache.remove('user_info');
            	that.login();
            } else if (res.status == 99) { //token验证失败
            	cache.remove('token');
            } */
            if (res.code == 401) {
              that.info(res.msg);
              setTimeout(function () {
                that.jump('/pages/login/login');
              }, 2000);
            }
            if (res.code == 0) {
              that.info(res.msg);
              if (!uni.getStorageSync('token')) {
                that.jump('/pages/login/login');
              }
              // setTimeout(function() {
              // 	that.jump('/pages/login/password_login')
              // }, 2000)
            }
          } else {
            // that.modal('接口异常');
          }
        },
        fail: function fail(res) {
          //通讯失败
          that.closeLoading();
          that.jslog('请求:' + option.url);
          that.jslog(res);
          onerror && onerror();
        },
        complete: function complete(res) {
          //通讯完成
          that.closeLoading();
          option.load && that.closeLoading();
          oncomplete && oncomplete();
        }
      };
    option.data && (option.data = option.data);
    if (option.url) {
      option.url = that.config.baseUrl + option.url;
    } else {
      return false;
    }
    option = that.extend({}, config, option);
    if (option.login && !that.login()) {
      return false;
    }
    // if (!option.data.submit) {
    // 	option.data.submit = 'yes';
    // }
    if (option.sign) {
      that.getsign(option.data, function (res) {
        option.data = res;
        option.load && that.loading(option.load);
        uni.request(option);
      });
    } else {
      option.load && that.loading(option.load);
      uni.request(option);
    }
  },
  /* 
   * 规格重置 
   */
  resetspec: function resetspec(spec) {
    var name = "已选：";
    if (spec) {
      var temp = spec.split(';;');
      console.log(temp);
      for (var i = 0; i < temp.length; i++) {
        var temp2 = temp[i].split('::');
        name += temp2[0] + ':' + temp2[1] + ';';
      }
    }
    return name;
  },
  /**
   * 获取一个Token，登录成功请清空
   * @param {function}  callback :回调函数
   */
  gettoken: function gettoken(callback) {
    var that = this,
      token = cache.get('token'),
      timestamp = Date.parse(new Date()) / 1000;
    // 10分钟缓冲
    if (token && token.date_expire > timestamp + 600) return callback({
      status: 1,
      data: token
    });
    var uuid = that.uuid(),
      //clientid=that.getClientId(),
      uid = that.getUserInfo('id', 0);
    uni.request({
      url: that.config.baseUrl + 'token',
      data: {
        uuid: uuid,
        uid: uid,
        timestamp: timestamp
      },
      //clientid:clientid
      timeout: 10000,
      //超时时间设置为10秒
      success: function success(res) {
        var res = res.data;
        if (res.status == 1) {
          cache.set('token', res.data);
        }
        return callback(res);
      },
      complete: function complete(res) {
        that.jslog('获取token:' + res);
      }
    });
  },
  /**
   * 数据签名
   * @param {string}     data:要签名的数据
   * @param {function}   onsuccess:成功回调函数
   * @param {function}   onerror:失败回调函数
   */
  getsign: function getsign(param, onsuccess, onerror) {
    var that = this,
      arr = [];
    param._sign_uuid = that.uuid();
    param._sign_uid = that.getUserInfo('id', 0);
    param._timestamp = Date.parse(new Date()) / 1000;
    param._version = that.config.version;
    that.gettoken(function (res) {
      if (res.status == 1) {
        param._sign_token = res.data.token;
        for (var i in param) {
          if (!that.isEmpty(param[i], true)) {
            arr.push(i + '=' + param[i]);
          }
        }
        arr.sort();
        param._sign = encrypt.sha1(arr.join('&') + res.data.token).toUpperCase();
        return onsuccess(param);
      } else {
        return onerror && onerror(res.info) || that.info(res.info);
      }
    });
  },
  /**
   * 格式化参数(password加密)
   * @param {string}     query:参数
   */
  formatparam: function formatparam(query) {
    var json = {};
    if (_typeof(query) == 'object') {
      for (var i in query) {
        if (i.indexOf('password') > -1) {
          query[i] = encrypt.md5(encrypt.sha1(query[i]));
        }
      }
      return query;
    } else {
      var vars = query.split('&');
      for (var i = 0; i < vars.length; i++) {
        var pair = vars[i].split('=');
        if (pair[0].indexOf('password') != -1) {
          pair[1] = encrypt.md5(encrypt.sha1(pair[1]));
        } else {
          pair[1] = pair[1];
        }
        if (typeof json[pair[0]] === 'undefined') {
          json[pair[0]] = pair[1];
        } else if (typeof json[pair[0]] === 'string') {
          var arr = [json[pair[0]], pair[1]];
          json[pair[0]] = arr;
        } else {
          json[pair[0]].push(pair[1]);
        }
      }
      return json;
    }
  },
  /**
   * 判断是否数组
   * 
   * 1. 通过object类型的副属性class判断,
   * 	其中函数的class是Function,结果是[object Function]
   * 	普通的对象是Object,结果是[object Object]
   * 	Object.prototype.toString.call(arr) === '[object Array]'	
   * 2. 通过原型去判断
   * 	arr.constructor === Array	
   * 	Array.prototype.isPrototypeOf(arr)
   * 	arr.__proto__ === Array.prototype	
   * 	Object.getPrototypeOf(arr) === Array.prototype
   * 	arr instanceof Array
   * 3. es6新增方法
   * 	Array.isArray(arr)	
   */
  isArray: function isArray(arr) {
    return arr && _typeof(arr) == 'object' && Object.prototype.toString.call(arr) === '[object Array]';
  },
  /**
   * 否判断指定参数是否是一个纯粹的对象
   * 所谓"纯粹的对象",就是通过"{}"或"new Object"创建的,不包括数组等对象
   * 
   * 1. 通过object类型的副属性class判断
   * 	Object.prototype.toString.call(obj) === '[object Object]'
   * 2. 通过原型去判断
   * 	obj.constructor === Object
   * 	obj instanceof Object(数组也是对象，所以 arr instanceof Object 也为true)
   * 3. typeof
   * 	typeof obj(除了{},null和[]也是'object')
   */
  isPlainObject: function isPlainObject(obj) {
    if (Object.getPrototypeOf) {
      return obj && _typeof(obj) == 'object' && Object.getPrototypeOf(obj) == Object.prototype;
    } else {
      return obj && _typeof(obj) == 'object' && Object.prototype.toString.call(obj) == "[object Object]" && !obj.length;
    }
  },
  /**
   * 获取对象大小
   * @param object
   */
  getLength: function getLength(object) {
    return Object.keys(object).length;
  },
  /**
   * 判断两个Json（纯粹）对象是否一样
   * @param objA
   * @param objB
   */
  compareJsonObj: function compareJsonObj(objA, objB) {
    if (!this.isPlainObject(objA) || !this.isPlainObject(objB)) return false; //判断类型是否正确
    return this.compareObj(objA, objB); //默认为true
  },

  /**
   * 判断两个对象是否一样
   * @param objA
   * @param objB
   * @param flag
   */
  compareObj: function compareObj(objA, objB, flag) {
    if (this.getLength(objA) != this.getLength(objB)) return false;
    flag = flag || true;
    for (var key in objA) {
      if (!flag)
        //flag为false，则跳出整个循环
        break;
      if (!objB.hasOwnProperty(key)) {
        //是否有自身属性，而不是继承的属性
        flag = false;
        break;
      }
      if (!this.isArray(objA[key])) {
        //子级不是数组时,比较属性值        	
        if (this.isPlainObject(objA[key])) {
          if (this.isPlainObject(objB[key])) {
            if (!flag)
              //这里跳出循环是为了不让递归继续
              break;
            flag = this.compareObj(objA[key], objB[key], flag);
          } else {
            flag = false;
            break;
          }
        } else {
          if (String(objB[key]) != String(objA[key])) {
            //排除数字比较的类型差异
            flag = false;
            break;
          }
        }
      } else {
        if (!this.isArray(objB[key])) {
          flag = false;
          break;
        }
        var oA = objA[key],
          oB = objB[key];
        if (oA.length != oB.length) {
          flag = false;
          break;
        }
        for (var k in oA) {
          if (!flag)
            //这里跳出循环是为了不让递归继续
            break;
          flag = this.compareObj(oA[k], oB[k], flag);
        }
      }
    }
    return flag;
  },
  /**
   * 将一个或多个对象的内容合并到目标对象
   * @param  Object target 目标对象，其他对象的成员属性将被附加到该对象上
   * @param  Object target 目标对象，第一个被合并的对象
   * @param  Object target 目标对象，第二个被合并的对象
   */
  extend: Object.assign || function (target, source, deep) {
    for (key in source) {
      if (deep && (this.isPlainObject(source[key]) || this.isArray(source[key]))) {
        if (this.isPlainObject(source[key]) && !this.isPlainObject(target[key])) {
          target[key] = {};
        }
        if (this.isArray(source[key]) && !this.isArray(target[key])) {
          target[key] = [];
        }
        this.extend(target[key], source[key], deep);
      } else if (source[key] !== undefined) {
        target[key] = source[key];
      }
    }
    return target;
  },
  /**
   * 判断一个对象是否为空
   * @param {string}     string:要判断的参数
   * @param {string}     is_zero:是否要判断'0'
   */
  isEmpty: function isEmpty(string) {
    var is_zero = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
    if (is_zero && string === '0') {
      return true;
    }
    // 0 == '',false == '',[] == ''
    if (string == '' || string == null || typeof string == 'undefined' || string == 'undefined') {
      return true;
    }
    // 对象 和 数组
    if (_typeof(string) == 'object') {
      return this.getLength(string) ? false : true;
    }
    return false;
  },
  /**
   * 为客户端生成一个唯一的uuid
   */
  uuid: function uuid() {
    var uuid,
      random = function random() {
        return ((1 + Math.random()) * 0x10000 | 0).toString(16).substring(1);
      };
    uuid = cache.get('uuid');
    if (!uuid) {
      uuid = encrypt.sha1(random() + random() + '-' + random() + '-' + random() + '-' + random() + '-' + random() + random() + random());
      cache.set('uuid', uuid);
    }
    return uuid;
  },
  /**
   * 获取设备唯一标识
   */
  getClientId: function getClientId() {
    //获取客户端ID
    var clientid = cache.get('client_id');
    if (clientid) return clientid;
    //TODO::
  },

  /**
   * 获取用户登录信息
   * @param k 键值
   * @param d 入没有返回的默认值
   */
  getUserInfo: function getUserInfo(k, d) {
    if (d == 'undefined') {
      d = 0;
    }
    var userInfo = cache.get('user_info');
    if (this.isEmpty(userInfo)) {
      return d;
    } else {
      if (typeof k == 'undefined') {
        return userInfo;
      } else {
        if (typeof userInfo[k] == 'undefined') {
          return d;
        } else {
          return userInfo[k];
        }
      }
    }
  },
  /**
   * 查找指定值的元素在数组中第一次出现的位置
   * 查找指定键的值的元素在二维数组中第一次出现的位置
   * @param arr  数组
   * @param val  要查找的值
   * @param key  二维数组元素的值对应的键
   */
  indexOf: function indexOf(arr, val, key) {
    if (this.isEmpty(arr) || this.isEmpty(val)) return -1;
    if (typeof key == 'undefined') {
      for (var i = 0; i < arr.length; i++) {
        if (arr[i] == val) {
          return i;
        }
      }
    } else {
      for (var _i = 0; _i < arr.length; _i++) {
        if (arr[_i][key] == val) {
          return _i;
        }
      }
    }
    return -1;
  },
  /**
   * (批量)删除数组中指定值的元素
   * (批量)删除二维数组中指定键的值的元素
   * @param {Object} arr  (二维)数组
   * @param {Object} vals 值(数组)
   * @param {Object} key	值(数组)组对应的键
   */
  removeItemByVals: function removeItemByVals(arr, vals, key) {
    var that = this;
    if (this.isEmpty(arr) || this.isEmpty(vals)) return arr;
    if (this.isArray(vals)) {
      //!倒序删除
      if (typeof key == 'undefined') {
        for (var i = arr.length - 1; i >= 0; i--) {
          var index = that.indexOf(vals, arr[i]);
          if (index > -1) {
            arr.splice(i, 1);
          }
        }
      } else {
        for (var _i2 = arr.length - 1; _i2 >= 0; _i2--) {
          var _index = that.indexOf(vals, arr[_i2][key]);
          if (_index > -1) {
            arr.splice(_i2, 1);
          }
        }
      }
    } else {
      var _index2 = this.indexOf(arr, vals, key);
      if (_index2 > -1) {
        arr.splice(_index2, 1);
      }
    }
    return arr;
  },
  /**
   * 批量删除数组中指定键的元素
   * @param {Object} arr   数组
   * @param {Object} indexs 序号(数组)
   */
  removeItemByIndex: function removeItemByIndex(arr, indexs) {
    var that = this;
    if (this.isEmpty(arr) || this.isEmpty(indexs)) return arr;
    if (this.isArray(indexs)) {
      //!倒序删除
      for (var i = arr.length - 1; i >= 0; i--) {
        var index = that.indexOf(indexs, i);
        if (index > -1) {
          arr.splice(i, 1);
        }
      }
    } else {
      arr.splice(indexs, 1);
    }
    return arr;
  },
  /**
   * 返回数组中某个单一列的值
   */
  array_column: function array_column(arr, key) {
    if (this.isEmpty(arr)) return arr;
    if (this.isEmpty(key)) return [];
    var vals = [];
    arr.forEach(function (item) {
      vals.push(item[key]);
    });
    return vals;
  },
  /**
   * 对象按照key排序
   * @param {Object} arr
   */
  array_ksort: function array_ksort(arr) {
    var sorted = {},
      keys = Object.keys(arr);
    keys.sort();
    keys.forEach(function (key) {
      sorted[key] = arr[key];
    });
    return sorted;
  },
  /**
   * 数组按元素（指定键值）排序
   * @param {Object} arr
   * @param {Object} key
   * @param {Object} sort asc desc
   */
  array_vsort: function array_vsort(arr, key, sort) {
    if (this.isEmpty(arr)) return arr;
    key = key || '';
    sort = sort || 'asc';
    if (key == '') {
      return arr.sort();
    } else {
      if (sort == 'asc') {
        return arr.sort(function (a, b) {
          return a[key] - b[key];
        });
      } else {
        return arr.sort(function (a, b) {
          return b[key] - a[key];
        });
      }
    }
  },
  /**
   * 日期时间格式化
   * @param {Object} date 日期对象
   */
  formatDate: function formatDate(_ref) {
    var _ref$value = _ref.value,
      value = _ref$value === void 0 ? '' : _ref$value,
      _ref$mode = _ref.mode,
      mode = _ref$mode === void 0 ? '' : _ref$mode;
    var date = value;
    var that = this;
    if (that.isEmpty(date, true)) {
      date = new Date();
    } else {
      if (typeof date == 'number') {
        date = new Date(parseInt(date));
      } else if (typeof date == 'string') {
        date = new Date(date);
      }
    }
    var value1 = '';
    var Y = date.getFullYear();
    var M = +(date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1);
    var D = date.getDate();
    var h = date.getHours();
    var m = date.getMinutes();
    var s = date.getSeconds();
    if (mode == 'year-month') {
      value1 = Y + '-' + M;
    } else {
      value1 = Y + '-' + M + '-' + D;
    }
    return value1;
  },
  /**
   * 日期时间格式化
   * @param {Object} date 日期对象
   * @param {Object} type 增加加的时间间隔:y年 q季度(3个月) m月 d天
   * @param {Object} number 增加的时间间隔的个数
   * @param {Object} format 格式化样式
   */
  formatDate1: function formatDate1(_ref2) {
    var _ref2$date = _ref2.date,
      date = _ref2$date === void 0 ? '' : _ref2$date,
      _ref2$type = _ref2.type,
      type = _ref2$type === void 0 ? 'y' : _ref2$type,
      _ref2$number = _ref2.number,
      number = _ref2$number === void 0 ? 0 : _ref2$number,
      _ref2$format = _ref2.format,
      format = _ref2$format === void 0 ? 'Y-m-d' : _ref2$format;
    var that = this;
    if (that.isEmpty(date, true)) {
      date = new Date();
    } else {
      if (typeof date == 'number') {
        date = new Date(parseInt(date) * 1000);
      } else if (typeof date == 'string') {
        date = new Date(date);
      }
    }
    date = that.addDate(type, number, date);
    var zero = function zero(value) {
        if (value < 10) {
          return '0' + value;
        }
        return value;
      },
      year = date.getFullYear(),
      month = zero(date.getMonth() + 1),
      day = zero(date.getDate());
    // hour = zero(date.getHours()),
    // minite = zero(date.getMinutes()),
    // second = zero(date.getSeconds());
    return format.replace(/Y|m|d/ig, function (matches) {
      return {
        Y: year,
        m: month,
        d: day
        // H: hour,
        // i: minite,
        // s: second,
      }[matches];
    });
  },
  /**
   * 日期时间计算
   * addDate(type,number,date)
   * @param {Object} type 增加的时间间隔:y年 q季度(3个月) m月 d天
   * @param {Object} number 增加的时间间隔的个数
   * @param {Object} date 开始日期对象
   * @return {type} 新的日期对象
   * var now = new Date();
   * var newDate = addDate( "d", 5, now);
   */
  addDate: function addDate(type, number, date) {
    switch (type) {
      case "y":
        {
          date.setFullYear(date.getFullYear() + number);
          return date;
          break;
        }
      case "q":
        {
          date.setMonth(date.getMonth() + number * 3);
          return date;
          break;
        }
      case "m":
        {
          date.setMonth(date.getMonth() + number);
          return date;
          break;
        }
      case "w":
        {
          date.setDate(date.getDate() + number * 7);
          return date;
          break;
        }
      case "d":
        {
          date.setDate(date.getDate() + number);
          return date;
          break;
        }
      case "h":
        {
          date.setHours(date.getHours() + number);
          return date;
          break;
        }
      case "m":
        {
          date.setMinutes(date.getMinutes() + number);
          return date;
          break;
        }
      case "s":
        {
          date.setSeconds(date.getSeconds() + number);
          return date;
          break;
        }
      default:
        {
          date.setDate(date.getDate() + number);
          return date;
          break;
        }
    }
  },
  /**
   * 二维码操作
   * @param {Object} canvas		图片路径
   * @param {Object} action 	操作类型 
   * 	qrcode:绘制二维码(根据内容data)
   * 	scan:扫描二维码
   * @param {Object} canvas 	绘制二维码canvasID
   * @param {Object} data 	绘制二维码内容
   * @param {Object} camera 扫描二维码是否只使用相机
   * @param {Object} success 	成功回调
   * @param {Object} error 	失败回调
   */
  qrCodeOperat: function qrCodeOperat(_ref3) {
    var _ref3$action = _ref3.action,
      action = _ref3$action === void 0 ? 'qrcode' : _ref3$action,
      canvas = _ref3.canvas,
      data = _ref3.data,
      _ref3$camera = _ref3.camera,
      camera = _ref3$camera === void 0 ? false : _ref3$camera,
      success = _ref3.success,
      error = _ref3.error;
    var that = this;
    switch (action) {
      case 'qrcode':
        qrCode({
          width: 180,
          height: 180,
          x: 20,
          y: 20,
          canvasId: canvas,
          text: data
        });
        break;
      case 'scan':
        uni.scanCode({
          onlyFromCamera: camera,
          success: function (_success) {
            function success(_x) {
              return _success.apply(this, arguments);
            }
            success.toString = function () {
              return _success.toString();
            };
            return success;
          }(function (res) {
            if (res.errMsg == 'scanCode:ok') {
              // 二维码内容 res.result
              success && success(res.result);
            } else {
              error && error(res);
            }
          }),
          fail: function fail(res) {
            if (res.errMsg != 'scanCode:fail cancel') {
              error && error(res);
            }
          }
        });
        break;
      default:
        that.modal('请明确二维码操作类型');
    }
  },
  /**
   * 图片操作
   * @param {Object} path		图片路径
   * @param {Object} action 	操作类型 
   *  choose:选择图片
   *  upload:图片上传
   * 	info:图片信息 
   * 	read:读取图片（base64）
   *  write:保存图片（base64）
   * 	down:下载图片
   *  save:保存图片（临时路径）
   *  preview:图片预览
   * @param {Object} data 	保存图片:图片base64内容（不带 data:image/png;base64,）,
   * 							图片预览:图片数组
   * @param {Object} fileName 保存图片的名称
   * @param {Object} menu 	图片预览:是否显示长按菜单
   * @param {Object} count 	图片选择:默认图片选择数量
   * @param {Object} success 	成功回调
   * @param {Object} error 	失败回调
   */
  imageOperat: function imageOperat(_ref4) {
    var _ref4$action = _ref4.action,
      action = _ref4$action === void 0 ? 'choose' : _ref4$action,
      path = _ref4.path,
      _ref4$fileName = _ref4.fileName,
      fileName = _ref4$fileName === void 0 ? 'write' : _ref4$fileName,
      data = _ref4.data,
      _ref4$count = _ref4.count,
      count = _ref4$count === void 0 ? 1 : _ref4$count,
      _ref4$menu = _ref4.menu,
      menu = _ref4$menu === void 0 ? true : _ref4$menu,
      success = _ref4.success,
      error = _ref4.error;
    var that = this;
    if (action == 'choose') {
      uni.chooseImage({
        count: count,
        sizeType: ['original', 'compressed'],
        //可以指定是原图还是压缩图，默认二者都有
        sourceType: ['camera', 'album'],
        //相册选择、使用相机
        success: function (_success2) {
          function success(_x2) {
            return _success2.apply(this, arguments);
          }
          success.toString = function () {
            return _success2.toString();
          };
          return success;
        }(function (e) {
          e.tempFilePaths.forEach(function (item) {
            success && success(item);
          });
        }),
        fail: function fail(e) {
          error && error(e);
        }
      });
    } else if (action == 'upload') {
      uni.uploadFile({
        url: that.config.baseUrl + '/api/Publics/uploadLocality',
        filePath: path,
        name: 'upfile',
        /* header: {
        	'content-type': 'multipart/form-data'
        }, */
        formData: {
          // uid: that.getUserInfo('id', 0)
          file: path
        },
        success: function (_success3) {
          function success(_x3) {
            return _success3.apply(this, arguments);
          }
          success.toString = function () {
            return _success3.toString();
          };
          return success;
        }(function (e) {
          console.log(e);
          var res = JSON.parse(e.data);
          if (res.status == 1) {
            success && success(res);
          } else {
            error && error({
              errMsg: res.info
            });
          }
        }),
        fail: function fail(e) {
          error && error(e);
        }
      });
    } else if (action == 'info') {
      uni.getImageInfo({
        src: path,
        success: function (_success4) {
          function success(_x4) {
            return _success4.apply(this, arguments);
          }
          success.toString = function () {
            return _success4.toString();
          };
          return success;
        }(function (e) {
          if (e.errMsg == 'getImageInfo:ok') {
            //e.height e.width e.type
            success && success(e);
          } else {
            error && error(e);
          }
        }),
        fail: function fail(e) {
          error && error(e);
        }
      });
    } else if (action == 'read') {
      uni.getFileSystemManager().readFile({
        filePath: path,
        encoding: 'base64',
        position: 0,
        success: function (_success5) {
          function success(_x5) {
            return _success5.apply(this, arguments);
          }
          success.toString = function () {
            return _success5.toString();
          };
          return success;
        }(function (e) {
          if (e.errMsg == 'readFile:ok') {
            //let img = 'data:image/png;base64,' + e.data.replace(/[\r\n]/g, "");
            success && success(e);
          } else {
            error && error(e);
          }
        }),
        fail: function fail(e_t) {
          error && error(e);
        }
      });
    } else if (action == 'write') {
      var filePath = "".concat(uni.env.USER_DATA_PATH, "/").concat(fileName, ".png");
      uni.getFileSystemManager().writeFile({
        filePath: filePath,
        data: data,
        encoding: 'base64',
        success: function (_success6) {
          function success(_x6) {
            return _success6.apply(this, arguments);
          }
          success.toString = function () {
            return _success6.toString();
          };
          return success;
        }(function (e) {
          if (e.errMsg == 'writeFile:ok') {
            success && success(filePath);
          } else {
            error && error(e);
          }
        }),
        fail: function fail(e) {
          console.log(e);
          error && error(e);
        }
      });
    } else if (action == 'down') {
      uni.downloadFile({
        url: path,
        success: function (_success7) {
          function success(_x7) {
            return _success7.apply(this, arguments);
          }
          success.toString = function () {
            return _success7.toString();
          };
          return success;
        }(function (e) {
          if (e.errMsg === 'downloadFile:ok') {
            //e.tempFilePath
            success && success(e);
          } else {
            error && error(e);
          }
        }),
        fail: function fail(e) {
          error && error(e);
        }
      });
    } else if (action == 'save') {
      var _filePath = "".concat(uni.env.USER_DATA_PATH, "/").concat(fileName, ".png");
      uni.getFileSystemManager().saveFile({
        tempFilePath: path,
        filePath: _filePath,
        success: function (_success8) {
          function success(_x8) {
            return _success8.apply(this, arguments);
          }
          success.toString = function () {
            return _success8.toString();
          };
          return success;
        }(function (e) {
          if (e.errMsg == 'saveFile:ok') {
            success && success(_filePath);
          } else {
            error && error(e);
          }
        }),
        fail: function fail(e) {
          console.log(e);
          error && error(e);
        }
      });
    } else if (action == 'preview') {
      uni.previewImage({
        currnet: path,
        urls: data,
        showmenu: menu
      });
    }
  },
  /**
   * 视频操作
   */
  viedoOperat: function viedoOperat(_ref5) {
    var _ref5$action = _ref5.action,
      action = _ref5$action === void 0 ? 'choose' : _ref5$action,
      _ref5$count = _ref5.count,
      count = _ref5$count === void 0 ? 1 : _ref5$count,
      _ref5$mediaType = _ref5.mediaType,
      mediaType = _ref5$mediaType === void 0 ? ['video'] : _ref5$mediaType,
      _ref5$sourceType = _ref5.sourceType,
      sourceType = _ref5$sourceType === void 0 ? ['album', 'camera'] : _ref5$sourceType,
      _ref5$maxDuration = _ref5.maxDuration,
      maxDuration = _ref5$maxDuration === void 0 ? 58 : _ref5$maxDuration,
      _ref5$camera = _ref5.camera,
      camera = _ref5$camera === void 0 ? 'back' : _ref5$camera,
      filePath = _ref5.filePath,
      path = _ref5.path,
      _ref5$size = _ref5.size,
      size = _ref5$size === void 0 ? 20 : _ref5$size,
      success = _ref5.success,
      error = _ref5.error;
    var that = this;
    if (action == 'choose') {
      uni.chooseMedia({
        count: count,
        mediaType: mediaType,
        sourceType: sourceType,
        maxDuration: maxDuration,
        camera: camera,
        success: function (_success9) {
          function success(_x9) {
            return _success9.apply(this, arguments);
          }
          success.toString = function () {
            return _success9.toString();
          };
          return success;
        }(function (e) {
          console.log(e);
          if (e.errMsg == 'chooseMedia:ok') {
            e.tempFiles.forEach(function (item) {
              var sel_size = parseFloat(item.size / 1024 / 1024).toFixed(1);
              if (sel_size > size) {
                var beyongSize = sel_size - size; //获取视频超出限制大小的数量
                that.info("上传的视频大小超限,超出" + beyongSize + "MB,请重新上传！");
                error && error();
              } else {
                success && success(item);
              }
            });
          } else {
            error && error(e);
          }
        }),
        fail: function fail(e) {
          console.log(e);
          error && error(e);
        }
      });
    }
    //压缩视频
    if (action == 'compress') {
      uni.compressVideo({
        quality: 'high',
        src: filePath,
        success: function (_success10) {
          function success(_x10) {
            return _success10.apply(this, arguments);
          }
          success.toString = function () {
            return _success10.toString();
          };
          return success;
        }(function (e) {
          console.log(e);
          if (e.errMsg == 'compressVideo:ok') {
            // e.tempFiles.forEach((item) => {
            success && success(e);
            // });
          } else {
            error && error(e);
          }
        }),
        fail: function fail(e) {
          console.log(e);
          error && error(e);
        }
      });
    }
  },
  /**
   * 位置服务
   * @param {Object} action 	操作类型 
   * 	getLocation: 获取当前的地理位置、速度
   *  openLocation: 使用微信内置地图查看位置
   *  chooseLocation: 打开地图选择位置
   *  choosePoi: 打开 POI 列表选择位置
   * 	getLatLng: 获取指定地址经纬度
   *  getAreaCode: 根据经纬度获取区划信息
   *  getDistance: 计算2个经纬度之间的距离
   * @param {Object} type 	返回坐标类型: wgs84返回gps坐标，gcj02 返回可用于 uni.openLocation 的坐标
   * @param {Object} address 	查询地址: '北京市海淀区彩和坊路海淀西大街74号'
   * @param {Object} from 	计算距离起点坐标，默认当前位置
   * {latitude: 0, longitude: 0}
   * @param {Object} to 		计算距离终点坐标
   * [{latitude: 0, longitude: 0}]
   * @param {Object} success 	成功回调
   * @param {Object} error 	失败回调
   */
  locationOperat: function locationOperat(_ref6) {
    var _ref6$action = _ref6.action,
      action = _ref6$action === void 0 ? 'getLocation' : _ref6$action,
      _ref6$type = _ref6.type,
      type = _ref6$type === void 0 ? 'gcj02' : _ref6$type,
      address = _ref6.address,
      _ref6$from = _ref6.from,
      from = _ref6$from === void 0 ? '' : _ref6$from,
      to = _ref6.to,
      success = _ref6.success,
      error = _ref6.error;
    var that = this;
    if (action == 'getLocation') {
      uni.getLocation({
        type: type,
        success: function (_success11) {
          function success(_x11) {
            return _success11.apply(this, arguments);
          }
          success.toString = function () {
            return _success11.toString();
          };
          return success;
        }(function (e) {
          if (e.errMsg == 'getLocation:ok') {
            success && success(e);
          } else {
            error && error(e);
          }
        }),
        fail: function fail(e) {
          error && error(e);
        }
      });
    } else if (action == 'openLocation') {
      var latitude = from.latitude,
        longitude = from.longitude;
      uni.openLocation({
        latitude: latitude,
        longitude: longitude,
        success: function (_success12) {
          function success(_x12) {
            return _success12.apply(this, arguments);
          }
          success.toString = function () {
            return _success12.toString();
          };
          return success;
        }(function (e) {
          if (e.errMsg == 'openLocation:ok') {
            success && success(e);
          } else {
            error && error(e);
          }
        }),
        fail: function fail(e) {
          error && error(e);
        }
      });
    } else if (action == 'chooseLocation') {
      var _from$latitude = from.latitude,
        latitude = _from$latitude === void 0 ? '' : _from$latitude,
        _from$longitude = from.longitude,
        longitude = _from$longitude === void 0 ? '' : _from$longitude;
      uni.chooseLocation({
        latitude: latitude,
        longitude: longitude,
        success: function (_success13) {
          function success(_x13) {
            return _success13.apply(this, arguments);
          }
          success.toString = function () {
            return _success13.toString();
          };
          return success;
        }(function (e) {
          if (e.errMsg == 'chooseLocation:ok') {
            success && success(e);
          } else {
            error && error(e);
          }
        }),
        fail: function fail(e) {
          error && error(e);
        }
      });
    } else if (action == 'choosePoi') {
      var _from$latitude2 = from.latitude,
        latitude = _from$latitude2 === void 0 ? '' : _from$latitude2,
        _from$longitude2 = from.longitude,
        longitude = _from$longitude2 === void 0 ? '' : _from$longitude2;
      uni.choosePoi({
        success: function (_success14) {
          function success(_x14) {
            return _success14.apply(this, arguments);
          }
          success.toString = function () {
            return _success14.toString();
          };
          return success;
        }(function (e) {
          if (e.errMsg == 'choosePoi:ok') {
            success && success(e);
          } else {
            error && error(e);
          }
        }),
        fail: function fail(e) {
          error && error(e);
        }
      });
    } else if (action == 'getLatLng') {
      new qqMap({
        key: that.config.qqMapKey
      }).geocoder({
        address: address,
        success: function (_success15) {
          function success(_x15) {
            return _success15.apply(this, arguments);
          }
          success.toString = function () {
            return _success15.toString();
          };
          return success;
        }(function (e) {
          if (e.status == 0 && e.message == 'query ok') {
            success && success(e.result);
          } else {
            error && error(e);
          }
        }),
        fail: function fail(e) {
          error && error(e);
        }
      });
    } else if (action == 'getAreaCode') {
      new qqMap({
        key: that.config.qqMapKey
      }).reverseGeocoder({
        success: function (_success16) {
          function success(_x16) {
            return _success16.apply(this, arguments);
          }
          success.toString = function () {
            return _success16.toString();
          };
          return success;
        }(function (e) {
          if (e.status == 0 && e.message == 'query ok') {
            success && success(e.result);
          } else {
            error && error(e);
          }
        }),
        fail: function fail(e) {
          error && error(e);
        }
      });
    } else if (action == 'getDistanceApi') {
      new qqMap({
        key: that.config.qqMapKey
      }).calculateDistance({
        from: from,
        //若起点有数据则采用起点坐标，若为空默认当前地址
        to: to,
        success: function (_success17) {
          function success(_x17) {
            return _success17.apply(this, arguments);
          }
          success.toString = function () {
            return _success17.toString();
          };
          return success;
        }(function (e) {
          if (e.status == 0 && e.message == 'query ok') {
            success && success(e.result.elements);
          } else {
            error && error(e);
          }
        }),
        fail: function fail(e) {
          error && error(e);
        }
      });
    } else if (action == 'getDistanceMath') {
      // 返回KM
      var _from$latitude3 = from.latitude,
        lat1 = _from$latitude3 === void 0 ? '' : _from$latitude3,
        _from$longitude3 = from.longitude,
        lng1 = _from$longitude3 === void 0 ? '' : _from$longitude3;
      if (lat1 == '' && lng1 == '') {
        return 0;
      }
      var _to$latitude = to.latitude,
        lat2 = _to$latitude === void 0 ? '' : _to$latitude,
        _to$longitude = to.longitude,
        lng2 = _to$longitude === void 0 ? '' : _to$longitude;
      var toRad = function toRad(d) {
        return d * Math.PI / 180;
      };
      var dis = 0;
      var deltaLng = toRad(lng1) - toRad(lng2);
      var radLat1 = toRad(lat1);
      var radLat2 = toRad(lat2);
      var deltaLat = radLat1 - radLat2;
      var dis = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(deltaLat / 2), 2) + Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(deltaLng / 2), 2)));
      return that.math.toFixed(dis * 6378.137, 2); // km
    }
  },

  /**
   * 过滤emoji
   * @param {Object} str
   */
  filterEmoji: function filterEmoji(str) {
    return str.replace(/\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]/g, '');
  },
  /**
   * 打印对象
   * @param obj
   */
  jslog: function jslog(obj) {
    this.config.debug && console.log(JSON.stringify(obj));
  },
  /**
   * form表单数据校验
   * @param value
   * @param rule
   */
  formCheck: function formCheck(value, rule, error) {
    // return false
    var that = this;
    var regs = {
      required: [/[\s\S]+/, '必填项不能为空'],
      english: [/^[a-zA-Z]+$/, '必填项只能由大小写字母组成'],
      mobile: [/^1[3|4|5|7|8|9][0-9]\d{4,8}$/, '请输入正确的手机号'],
      phone: [/^(\d{3,4}-?)?\d{7,9}$/g, '请输入正确的电话号码'],
      email: [/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/, '请输入正确的电子邮箱'],
      url: [/(^#)|(^http(s*):\/\/[^\s]+\.[^\s]+)/, '请输入正确的链接'],
      number: [/^\d+$/, '必填项只能填数字'],
      code4: [/^\d{4}$/, '请输入正确的手机验证码'],
      code6: [/^\d{6}$/, '请输入正确的手机验证码'],
      captcha4: [/^[0-9a-zA-Z]{4}$/, '请输入正确的图片验证码'],
      date: [/^(\d{4})[-\/](\d{1}|0\d{1}|1[0-2])([-\/](\d{1}|0\d{1}|[1-2][0-9]|3[0-1]))*$/, '请输入正确的日期格式'],
      identity: [/(^\d{15}$)|(^\d{17}(x|X|\d)$)/, '请输入正确的身份证号'],
      username: [/^[a-zA-Z0-9\u4e00-\u9fa5-_\.]{2,12}$/, '请输入正确的帐号（只能包含中文、英文、数字、下划线等字符）'],
      password: [/^\w{6,16}$/, '请输入正确的密码（6-16位数字，字母或符号）'],
      passwords: [/^[a-zA-Z]+\w{5,12}$/, '请输入正确的密码（以字母开头，长度在6-12之间）'],
      pwd: [/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9a-zA-Z]{6,12}$/, '请输入正确的密码（6-12位数字+字母组合）'],
      invite: [/^[0-9a-zA-Z]{10}$/, '邀请码为8位数字或字母组合'],
      truename: [/^[\u4e00-\u9fa5]{2,4}$/, '请输入正确的真实姓名（2-4个汉字）'],
      money: [/((^[1-9]\d*)|^0)(\.\d{0,2}){0,1}$/, '请输入正确的金额']
    };
    var reg = regs[rule];
    if (that.isEmpty(reg)) {
      return true;
    } else {
      if (value == '' || !RegExp(reg[0]).test(value)) {
        that.info(error || reg[1]);
        return false;
      }
      return true;
    }
  },
  /****************************************************/
  /**
   *获取系统信息
   * @param label 获取系统的某一项信息
   * screenWidth		屏幕宽度，
   * screenHeight 	屏幕高度，单位px
   * windowWidth		单位px可使用窗口宽度，单位px
   * windowHeight		可使用窗口高度，单位px
   * statusBarHeight	状态栏的高度，单位px
   * menuButton：右上角胶囊按钮的布局位置信息，坐标信息以屏幕左上角为原点
   * width			宽度，单位：px
   * height			高度，单位：px
   * top				上边界坐标，单位：px
   * right			右边界坐标，单位：px
   * bottom			下边界坐标，单位：px
   * left				左边界坐标，单位：px
   */
  getSystemInfo: function getSystemInfo(success) {
    // 获取系统状态栏信息
    uni.getSystemInfo({
      success: function (_success18) {
        function success(_x18) {
          return _success18.apply(this, arguments);
        }
        success.toString = function () {
          return _success18.toString();
        };
        return success;
      }(function (res) {
        if (res.errMsg == 'getSystemInfo:ok') {
          res.menuButton = uni.getMenuButtonBoundingClientRect();
          success && success(res);
        } else {
          that.modal('获取系统信息失败：' + res.errMsg);
        }
      }),
      fail: function fail(res) {
        that.modal('获取系统信息失败：' + res.errMsg);
      }
    });
  },
  /**
   * 检查登录
   */
  getSessionKey: function getSessionKey(success) {
    var that = this;
    var data = {};
    data.openid = cache.get('open_id');
    data.session_key = cache.get('session_key');
    // 都存在
    if (!that.isEmpty(data.session_key) && !that.isEmpty(data.openid)) {
      uni.checkSession({
        success: function (_success19) {
          function success() {
            return _success19.apply(this, arguments);
          }
          success.toString = function () {
            return _success19.toString();
          };
          return success;
        }(function () {
          success && success(data);
        }),
        fail: function fail() {
          cache.remove('open_id');
          cache.remove('session_key');
          that.getOpenId(success);
        }
      });
    } else {
      cache.remove('open_id');
      cache.remove('session_key');
      that.getOpenId(success);
    }
  },
  /**
   * 获取openid
   * @param success
   */
  getOpenId: function getOpenId(success, error) {
    var that = this;
    that.loading();
    uni.login({
      success: function (_success20) {
        function success(_x19) {
          return _success20.apply(this, arguments);
        }
        success.toString = function () {
          return _success20.toString();
        };
        return success;
      }(function (e) {
        that.req({
          url: 'public/getOpenid',
          data: {
            code: e.code
          },
          login: false,
          load: false
        }, function (res) {
          if (res.status == 1) {
            cache.set('open_id', res.data.openid);
            cache.set('session_key', res.data.session_key);
            success && success(res.data);
          } else {
            that.modal('微信登录失败：' + res.info, function () {
              error && error();
            });
            return false;
          }
        }, function () {}, function () {
          that.closeLoading();
        });
      }),
      fail: function fail(e) {
        that.closeLoading();
        that.modal('微信登录失败：' + e.errMsg, function () {
          error && error();
        });
      }
    });
  },
  /**
   * 登录
   * @param {Object} data
   * @param {Object} success
   * @param {Object} error
   */
  doLogin: function doLogin(data, success, error) {
    var that = this;
    data.loginsubmit = 'yes';
    this.req({
      url: 'account/login',
      data: data,
      login: false
    }, function (res) {
      if (res.status == 1) {
        cache.set('user_info', res.data);
        success && success(res.data);
      } else {
        error && error(res);
      }
    });
  },
  /**
   * 注册
   * @param {Object} data
   * @param {Object} success
   * @param {Object} error
   */
  doRegist: function doRegist(data, success, error) {
    var that = this;
    data.registsubmit = 'yes';
    this.req({
      url: 'account/register',
      data: data,
      login: false
    }, function (res) {
      if (res.status == 1) {
        cache.set('user_info', res.data);
        success && success(res.data);
      } else {
        error && error(res);
      }
    });
  },
  /**
   * 查询是否注册
   * @param {Object} success
   * @param {Object} error
   */
  checkRegist: function checkRegist(success, error) {
    var that = this;
    that.getSessionKey(function (data) {
      that.req({
        url: 'account/checkRegist',
        data: {
          open_id: data.openid,
          registsubmit: 'yes'
        },
        login: false,
        load: false
      }, function (res) {
        if (res.status == 1) {
          success && success();
        } else {
          error && error();
        }
      });
    });
  },
  /**
   * 获取会员信息
   * @param {Object} success
   * @param {Object} error
   */
  getMemberInfo: function getMemberInfo(success, error) {
    var that = this;
    this.req({
      url: 'center/getMemberInfo',
      load: false
    }, function (res) {
      if (res.status == 1) {
        cache.set('user_info', res.data);
        success && success(res.data);
      } else {
        error && error(res);
      }
    });
  },
  /**
   * 获取用户微信资料
   * @param success
   */
  getUserProfile: function getUserProfile(success, error) {
    var that = this;
    that.loading('获取微信信息中...');
    uni.getUserProfile({
      lang: 'zh_CN',
      desc: '用于完善会员资料',
      success: function (_success21) {
        function success(_x20) {
          return _success21.apply(this, arguments);
        }
        success.toString = function () {
          return _success21.toString();
        };
        return success;
      }(function (res) {
        if (res.errMsg == 'getUserProfile:ok') {
          // 过滤掉emoji
          res.userInfo.nickName = that.filterEmoji(res.userInfo.nickName);
          success(res.userInfo);
        } else {
          that.modal('获取微信信息失败：' + res.errMsg, function () {
            error && error(res);
          });
        }
      }),
      fail: function fail(res) {
        that.modal('获取微信信息失败：' + res.errMsg, function () {
          console.log(res);
          error && error(res);
        });
      },
      complete: function complete() {
        that.closeLoading();
      }
    });
  },
  /**
   * 获取配置信息
   * @param success
   */
  getConfigInfo: function getConfigInfo(_ref7) {
    var _ref7$source = _ref7.source,
      source = _ref7$source === void 0 ? 'system' : _ref7$source,
      _ref7$label = _ref7.label,
      label = _ref7$label === void 0 ? '' : _ref7$label,
      success = _ref7.success;
    this.req({
      url: 'public/configInfo',
      data: {
        source: source,
        label: label
      },
      login: false,
      load: false
    }, function (res) {
      success(res.data);
    });
  },
  /**
   * 获取微信手机号
   * @param e
   * @param success
   */
  getMobile: function getMobile(e, success) {
    var that = this;
    that.getSessionKey(function (data) {
      if (e.detail.errMsg == 'getPhoneNumber:ok') {
        that.req({
          url: 'public/getMobile',
          data: {
            encryptedData: e.detail.encryptedData,
            iv: e.detail.iv,
            sessionKey: data.session_key
          },
          login: false
        }, function (res) {
          if (res.status == 1) {
            success(res.data);
          } else {
            that.modal('获取手机号失败' + res.info);
            return false;
          }
        });
      } else {
        that.modal('获取手机号失败' + e.detail.errMsg);
      }
    });
  },
  /**
   * 拨打电话
   * @param mobile
   */
  makeCall: function makeCall(mobile) {
    uni.makePhoneCall({
      phoneNumber: mobile
    });
  },
  /**
   * 修改页面标题
   * @param title
   */
  changeNavBarTitle: function changeNavBarTitle(title) {
    uni.setNavigationBarTitle({
      title: title
    });
  },
  /**
   * 检查版本更新
   */
  checkUpdate: function checkUpdate() {
    if (uni.canIUse('getUpdateManager')) {
      var updateManager = uni.getUpdateManager();
      updateManager.onCheckForUpdate(function (res) {
        if (res.hasUpdate) {
          updateManager.onUpdateReady(function () {
            uni.showModal({
              title: '更新提示',
              content: '新版本已经准备好，是否重启应用？',
              success: function success(res) {
                if (res.confirm) {
                  updateManager.applyUpdate();
                }
              }
            });
          });
          updateManager.onUpdateFailed(function () {
            uni.showModal({
              title: '已经有新版本了~',
              content: '新版本已经上线啦~，请您删除当前小程序，重新搜索打开~'
            });
          });
        }
      });
    } else {
      uni.showModal({
        title: '提示',
        content: '当前微信版本过低，无法使用该功能，请升级到最新微信版本后重试。'
      });
    }
  },
  /**
   * html转义
   * @param {object} str    //需要转义内容
   * @param {object} success  
   */
  escape2Html: function escape2Html(str, success) {
    var arrEntities = {
      'lt': '<',
      'gt': '>',
      'nbsp': ' ',
      'amp': '&',
      'quot': '"'
    };
    return str.replace(/&(lt|gt|nbsp|amp|quot);/ig, function (all, t) {
      return arrEntities[t];
    }).replace(/<section/g, '<div').replace(/<u>/g, '').replace(/<u style="">/g, '').replace(/<\/u>/g, '');
  },
  /**
   * 分享信息
   */
  shareInfo: function shareInfo() {
    var that = this;
    var userInfo = cache.get('user_info');
    if (!that.isEmpty(userInfo) && !that.isEmpty(userInfo.serial)) {
      var path = "/pages/index/index?invite_code=".concat(userInfo.serial);
    } else {
      var path = '/pages/index/index';
    }
    return {
      title: that.config.name,
      path: path
      // imageUrl: '/image/iconimg/login.png'
    };
  },
  /**
   * 检测是否收藏
   * @param {object} id    //检测是否收藏的商品id
   * @param {object} success  
   */
  checkStore: function checkStore(id, key, success) {
    var that = this;
    var shopStore = cache.get(key);
    if (that.isEmpty(shopStore)) {
      success && success(false);
    } else {
      var have = 0;
      for (var i in shopStore) {
        var d = shopStore[i];
        if (d.id == id) {
          // 有收藏
          have = 1;
          success && success(true);
          break;
        }
        if (have == 0) {
          // 无收藏
          success && success(false);
        }
      }
    }
  },
  /**
   * 收藏缓存
   * @param {object} id    //需要收藏或取消的商品id
   * @param {object} success  
   */
  changeStore: function changeStore(data, key, success) {
    var shopStore = cache.get(key);
    var that = this;
    var p = {};
    p = data;
    if (that.isEmpty(shopStore)) {
      var shopStore = [];
      shopStore.push(p);
      cache.set(key, shopStore);
      success && success('收藏成功');
    } else {
      var have = 0;
      for (var i in shopStore) {
        var d = shopStore[i];
        console.log(d, data);
        if (d.id == data.id && d.table == data.table) {
          // 有的话取消收藏
          have = 1;
          shopStore.splice(i, 1);
          cache.set(key, shopStore);
          success && success('取消成功');
          break;
        }
      }
      if (have == 0) {
        // 没有的话收藏
        shopStore.push(p);
        cache.set(key, shopStore);
        success && success('收藏成功');
      }
    }
  },
  /****************************************************/

  /**
   * 获取购物车信息,设置导航红点信息
   * @param index 设置信息 tabBar 序号
   */
  getshopcar: function getshopcar(success) {
    var shopCar_list = cache.get('shop_car');
    if (this.isEmpty(shopCar_list)) {
      uni.hideTabBarRedDot({
        //隐藏 tabBar 某一项的右上角文本
        index: 2,
        //第几个 tabBar，从左边 0 算起
        success: function (_success22) {
          function success() {
            return _success22.apply(this, arguments);
          }
          success.toString = function () {
            return _success22.toString();
          };
          return success;
        }(function () {
          success && success(0);
        })
      });
    } else {
      var len = this.getLength(shopCar_list);
      uni.setTabBarBadge({
        //为 tabBar 某一项的右上角添加文本
        index: 2,
        //第几个 tabBar，从左边 0 算起
        text: String(len),
        //右上角添加的文本
        success: function (_success23) {
          function success() {
            return _success23.apply(this, arguments);
          }
          success.toString = function () {
            return _success23.toString();
          };
          return success;
        }(function () {
          success && success(len);
        })
      });
    }
  },
  /**
   * 上拉刷新加载数据
   * @param {object} type
   * @param {object} page
   * @param {object} succes
   */
  onReachFoot: function onReachFoot(url, data, succes) {
    //type=1时请求找工作
    if (url) {
      this.req({
        url: url,
        data: data
      }, function (res) {
        if (res.status == 1) {
          succes && succes(res.data);
        }
      });
    } else {
      succes && success(false);
    }
  },
  /**
   * 电话聊天控制
   * @param price 价格
   * @param mobile 手机号
   * @param work_id 工作或求职id
   * @param {String} type 类型,work招工，worker求职
   * @param {String} buy_type 购买类型 pirce电话，chat_price聊天
   * @param send_id 被购买的用户id
   * @param send_name 被购买的名字
   */
  /* makeCall(price, mobile, work_id, type, buy_type, send_id, send_name = '') {
  	var that = this
  	that.modal('将自动使用会员次数或东豆进行抵扣', function(params) {
  		that.req({
  			url: 'center/MobileOrMessage',
  			data: {
  				price: price,
  				mobile: mobile,
  				work_id: work_id,
  				type: type,
  				buy_type: buy_type,
  				send_id: send_id,
  				send_name: send_name
  			}
  		}, function(params) {
  			if (params.status == 1) {
  				if (buy_type == 'price') {
  					uni.makePhoneCall({
  						phoneNumber: mobile,
  					})
  				} else {
  					that.jump('/pages/chat/chat?id=' + send_id + '&nickname=' + send_name)
  				}
  			}
  			if (params.status == 2) {
  
  			}
  		})
  	}, true)
  }, */
  /**
   * 微信小程序防抖
   * @param func 防抖事件
   * @param wait 阻止时间
   */
  debounce: function debounce(func, wait) {
    var timeout;
    return function () {
      console.log('防抖事件：' + func, '防抖时间:' + wait);
      var context = this;
      var args = arguments;
      var later = function later() {
        timeout = null;
        func.apply(context, args);
      };
      clearTimeout(timeout);
      timeout = setTimeout(later, wait);
    };
  }
};
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))

/***/ }),

/***/ 357:
/*!***********************************************************************************!*\
  !*** C:/Users/Administrator/Desktop/yswc/hire-wx-houxuanren/static/js/encrypt.js ***!
  \***********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = {
  chrsz: 8,
  hexcase: 0,
  b64pad: '',
  /**
   * 哈希算法加密
   * @param {string}     str:要加密的数据
   * @param {string}     raw:方式
   */
  sha1: function sha1(str, raw) {
    str = this.utf16to8(str);
    if (raw == true) {
      return this.str_sha1(str);
    } else {
      return this.hex_sha1(str);
    }
  },
  md5: function md5(s) {
    return this.binl2hex(this.core_md5(this.str2binl(s), s.length * this.chrsz));
  },
  utf16to8: function utf16to8(str) {
    var out, i, len, c;
    out = '';
    len = str.length;
    for (i = 0; i < len; i++) {
      c = str.charCodeAt(i);
      if (c >= 0x0001 && c <= 0x007F) {
        out += str.charAt(i);
      } else if (c > 0x07FF) {
        out += String.fromCharCode(0xE0 | c >> 12 & 0x0F);
        out += String.fromCharCode(0x80 | c >> 6 & 0x3F);
        out += String.fromCharCode(0x80 | c >> 0 & 0x3F);
      } else {
        out += String.fromCharCode(0xC0 | c >> 6 & 0x1F);
        out += String.fromCharCode(0x80 | c >> 0 & 0x3F);
      }
    }
    return out;
  },
  hex_sha1: function hex_sha1(s) {
    return this.binb2hex(this.core_sha1(this.str2binb(s), s.length * this.chrsz));
  },
  str_sha1: function str_sha1(s) {
    return this.binb2str(this.core_sha1(this.str2binb(s), s.length * this.chrsz));
  },
  binb2hex: function binb2hex(binarray) {
    var hex_tab = this.hexcase ? '0123456789ABCDEF' : '0123456789abcdef';
    var str = "";
    for (var i = 0; i < binarray.length * 4; i++) {
      str += hex_tab.charAt(binarray[i >> 2] >> (3 - i % 4) * 8 + 4 & 0xF) + hex_tab.charAt(binarray[i >> 2] >> (3 - i % 4) * 8 & 0xF);
    }
    return str;
  },
  binl2hex: function binl2hex(binarray) {
    var hex_tab = this.hexcase ? '0123456789ABCDEF' : '0123456789abcdef';
    var str = "";
    for (var i = 0; i < binarray.length * 4; i++) {
      str += hex_tab.charAt(binarray[i >> 2] >> i % 4 * 8 + 4 & 0xF) + hex_tab.charAt(binarray[i >> 2] >> i % 4 * 8 & 0xF);
    }
    return str;
  },
  binb2str: function binb2str(bin) {
    var str = "";
    var mask = (1 << this.chrsz) - 1;
    for (var i = 0; i < bin.length * 32; i += this.chrsz) {
      str += String.fromCharCode(bin[i >> 5] >>> 32 - this.chrsz - i % 32 & mask);
    }
    return str;
  },
  binl2str: function binl2str(bin) {
    var str = "";
    var mask = (1 << this.chrsz) - 1;
    for (var i = 0; i < bin.length * 32; i += this.chrsz) {
      str += String.fromCharCode(bin[i >> 5] >>> i % 32 & mask);
    }
    return str;
  },
  binl2b64: function binl2b64(binarray) {
    var tab = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
    var str = '';
    for (var i = 0; i < binarray.length * 4; i += 3) {
      var triplet = (binarray[i >> 2] >> 8 * (i % 4) & 0xFF) << 16 | (binarray[i + 1 >> 2] >> 8 * ((i + 1) % 4) & 0xFF) << 8 | binarray[i + 2 >> 2] >> 8 * ((i + 2) % 4) & 0xFF;
      for (var j = 0; j < 4; j++) {
        if (i * 8 + j * 6 > binarray.length * 32) str += this.b64pad;else str += tab.charAt(triplet >> 6 * (3 - j) & 0x3F);
      }
    }
    return str;
  },
  str2binb: function str2binb(str) {
    var bin = Array();
    var mask = (1 << this.chrsz) - 1;
    for (var i = 0; i < str.length * this.chrsz; i += this.chrsz) {
      bin[i >> 5] |= (str.charCodeAt(i / this.chrsz) & mask) << 32 - this.chrsz - i % 32;
    }
    return bin;
  },
  str2binl: function str2binl(str) {
    var bin = Array();
    var mask = (1 << this.chrsz) - 1;
    for (var i = 0; i < str.length * this.chrsz; i += this.chrsz) {
      bin[i >> 5] |= (str.charCodeAt(i / this.chrsz) & mask) << i % 32;
    }
    return bin;
  },
  safe_add: function safe_add(x, y) {
    var lsw = (x & 0xFFFF) + (y & 0xFFFF);
    var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
    return msw << 16 | lsw & 0xFFFF;
  },
  rol: function rol(num, cnt) {
    return num << cnt | num >>> 32 - cnt;
  },
  sha1_ft: function sha1_ft(t, b, c, d) {
    if (t < 20) return b & c | ~b & d;
    if (t < 40) return b ^ c ^ d;
    if (t < 60) return b & c | b & d | c & d;
    return b ^ c ^ d;
  },
  sha1_kt: function sha1_kt(t) {
    return t < 20 ? 1518500249 : t < 40 ? 1859775393 : t < 60 ? -1894007588 : -899497514;
  },
  core_sha1: function core_sha1(x, len) {
    x[len >> 5] |= 0x80 << 24 - len % 32;
    x[(len + 64 >> 9 << 4) + 15] = len;
    var w = Array(80);
    var a = 1732584193;
    var b = -271733879;
    var c = -1732584194;
    var d = 271733878;
    var e = -1009589776;
    for (var i = 0; i < x.length; i += 16) {
      var olda = a;
      var oldb = b;
      var oldc = c;
      var oldd = d;
      var olde = e;
      for (var j = 0; j < 80; j++) {
        if (j < 16) w[j] = x[i + j];else w[j] = this.rol(w[j - 3] ^ w[j - 8] ^ w[j - 14] ^ w[j - 16], 1);
        var t = this.safe_add(this.safe_add(this.rol(a, 5), this.sha1_ft(j, b, c, d)), this.safe_add(this.safe_add(e, w[j]), this.sha1_kt(j)));
        e = d;
        d = c;
        c = this.rol(b, 30);
        b = a;
        a = t;
      }
      a = this.safe_add(a, olda);
      b = this.safe_add(b, oldb);
      c = this.safe_add(c, oldc);
      d = this.safe_add(d, oldd);
      e = this.safe_add(e, olde);
    }
    return Array(a, b, c, d, e);
  },
  core_md5: function core_md5(x, len) {
    x[len >> 5] |= 0x80 << len % 32;
    x[(len + 64 >>> 9 << 4) + 14] = len;
    var a = 1732584193;
    var b = -271733879;
    var c = -1732584194;
    var d = 271733878;
    for (var i = 0; i < x.length; i += 16) {
      var olda = a;
      var oldb = b;
      var oldc = c;
      var oldd = d;
      a = this.md5_ff(a, b, c, d, x[i + 0], 7, -680876936);
      d = this.md5_ff(d, a, b, c, x[i + 1], 12, -389564586);
      c = this.md5_ff(c, d, a, b, x[i + 2], 17, 606105819);
      b = this.md5_ff(b, c, d, a, x[i + 3], 22, -1044525330);
      a = this.md5_ff(a, b, c, d, x[i + 4], 7, -176418897);
      d = this.md5_ff(d, a, b, c, x[i + 5], 12, 1200080426);
      c = this.md5_ff(c, d, a, b, x[i + 6], 17, -1473231341);
      b = this.md5_ff(b, c, d, a, x[i + 7], 22, -45705983);
      a = this.md5_ff(a, b, c, d, x[i + 8], 7, 1770035416);
      d = this.md5_ff(d, a, b, c, x[i + 9], 12, -1958414417);
      c = this.md5_ff(c, d, a, b, x[i + 10], 17, -42063);
      b = this.md5_ff(b, c, d, a, x[i + 11], 22, -1990404162);
      a = this.md5_ff(a, b, c, d, x[i + 12], 7, 1804603682);
      d = this.md5_ff(d, a, b, c, x[i + 13], 12, -40341101);
      c = this.md5_ff(c, d, a, b, x[i + 14], 17, -1502002290);
      b = this.md5_ff(b, c, d, a, x[i + 15], 22, 1236535329);
      a = this.md5_gg(a, b, c, d, x[i + 1], 5, -165796510);
      d = this.md5_gg(d, a, b, c, x[i + 6], 9, -1069501632);
      c = this.md5_gg(c, d, a, b, x[i + 11], 14, 643717713);
      b = this.md5_gg(b, c, d, a, x[i + 0], 20, -373897302);
      a = this.md5_gg(a, b, c, d, x[i + 5], 5, -701558691);
      d = this.md5_gg(d, a, b, c, x[i + 10], 9, 38016083);
      c = this.md5_gg(c, d, a, b, x[i + 15], 14, -660478335);
      b = this.md5_gg(b, c, d, a, x[i + 4], 20, -405537848);
      a = this.md5_gg(a, b, c, d, x[i + 9], 5, 568446438);
      d = this.md5_gg(d, a, b, c, x[i + 14], 9, -1019803690);
      c = this.md5_gg(c, d, a, b, x[i + 3], 14, -187363961);
      b = this.md5_gg(b, c, d, a, x[i + 8], 20, 1163531501);
      a = this.md5_gg(a, b, c, d, x[i + 13], 5, -1444681467);
      d = this.md5_gg(d, a, b, c, x[i + 2], 9, -51403784);
      c = this.md5_gg(c, d, a, b, x[i + 7], 14, 1735328473);
      b = this.md5_gg(b, c, d, a, x[i + 12], 20, -1926607734);
      a = this.md5_hh(a, b, c, d, x[i + 5], 4, -378558);
      d = this.md5_hh(d, a, b, c, x[i + 8], 11, -2022574463);
      c = this.md5_hh(c, d, a, b, x[i + 11], 16, 1839030562);
      b = this.md5_hh(b, c, d, a, x[i + 14], 23, -35309556);
      a = this.md5_hh(a, b, c, d, x[i + 1], 4, -1530992060);
      d = this.md5_hh(d, a, b, c, x[i + 4], 11, 1272893353);
      c = this.md5_hh(c, d, a, b, x[i + 7], 16, -155497632);
      b = this.md5_hh(b, c, d, a, x[i + 10], 23, -1094730640);
      a = this.md5_hh(a, b, c, d, x[i + 13], 4, 681279174);
      d = this.md5_hh(d, a, b, c, x[i + 0], 11, -358537222);
      c = this.md5_hh(c, d, a, b, x[i + 3], 16, -722521979);
      b = this.md5_hh(b, c, d, a, x[i + 6], 23, 76029189);
      a = this.md5_hh(a, b, c, d, x[i + 9], 4, -640364487);
      d = this.md5_hh(d, a, b, c, x[i + 12], 11, -421815835);
      c = this.md5_hh(c, d, a, b, x[i + 15], 16, 530742520);
      b = this.md5_hh(b, c, d, a, x[i + 2], 23, -995338651);
      a = this.md5_ii(a, b, c, d, x[i + 0], 6, -198630844);
      d = this.md5_ii(d, a, b, c, x[i + 7], 10, 1126891415);
      c = this.md5_ii(c, d, a, b, x[i + 14], 15, -1416354905);
      b = this.md5_ii(b, c, d, a, x[i + 5], 21, -57434055);
      a = this.md5_ii(a, b, c, d, x[i + 12], 6, 1700485571);
      d = this.md5_ii(d, a, b, c, x[i + 3], 10, -1894986606);
      c = this.md5_ii(c, d, a, b, x[i + 10], 15, -1051523);
      b = this.md5_ii(b, c, d, a, x[i + 1], 21, -2054922799);
      a = this.md5_ii(a, b, c, d, x[i + 8], 6, 1873313359);
      d = this.md5_ii(d, a, b, c, x[i + 15], 10, -30611744);
      c = this.md5_ii(c, d, a, b, x[i + 6], 15, -1560198380);
      b = this.md5_ii(b, c, d, a, x[i + 13], 21, 1309151649);
      a = this.md5_ii(a, b, c, d, x[i + 4], 6, -145523070);
      d = this.md5_ii(d, a, b, c, x[i + 11], 10, -1120210379);
      c = this.md5_ii(c, d, a, b, x[i + 2], 15, 718787259);
      b = this.md5_ii(b, c, d, a, x[i + 9], 21, -343485551);
      a = this.safe_add(a, olda);
      b = this.safe_add(b, oldb);
      c = this.safe_add(c, oldc);
      d = this.safe_add(d, oldd);
    }
    return Array(a, b, c, d);
  },
  md5_cmn: function md5_cmn(q, a, b, x, s, t) {
    return this.safe_add(this.rol(this.safe_add(this.safe_add(a, q), this.safe_add(x, t)), s), b);
  },
  md5_ff: function md5_ff(a, b, c, d, x, s, t) {
    return this.md5_cmn(b & c | ~b & d, a, b, x, s, t);
  },
  md5_gg: function md5_gg(a, b, c, d, x, s, t) {
    return this.md5_cmn(b & d | c & ~d, a, b, x, s, t);
  },
  md5_hh: function md5_hh(a, b, c, d, x, s, t) {
    return this.md5_cmn(b ^ c ^ d, a, b, x, s, t);
  },
  md5_ii: function md5_ii(a, b, c, d, x, s, t) {
    return this.md5_cmn(c ^ (b | ~d), a, b, x, s, t);
  }
};

/***/ }),

/***/ 358:
/*!*********************************************************************************!*\
  !*** C:/Users/Administrator/Desktop/yswc/hire-wx-houxuanren/static/js/cache.js ***!
  \*********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(wx) {/**
 * 缓存数据优化
 * var cache = require('utils/cache.js');
 * import cache from '../cache'
 * 使用方法 【
 *     一、设置缓存
 *         string    cache.put('k', 'string你好啊');
 *         json      cache.put('k', { "b": "3" }, 2);
 *         array     cache.put('k', [1, 2, 3]);
 *         boolean   cache.put('k', true);
 *     二、读取缓存
 *         默认值    cache.get('k')
 *         string    cache.get('k', '你好')
 *         json      cache.get('k', { "a": "1" })
 *     三、移除/清理  
 *         移除: cache.remove('k');
 *         清理：cache.clear(); 
 * 】
 * @type {String}
 */
module.exports = {
  /*
   * 缓存前缀 
   */
  postfix: 'twinkly_',
  /**
   * 设置缓存 
   * @param  {[type]} k [键名]
   * @param  {[type]} v [键值]
   * @param  {[type]} e [过期时间：单位秒]
   * @param  {[type]} s 异步回调
   */
  set: function set(k, v, e, s) {
    var that = this;
    var e = e || 0;
    if (e > 0) e = Date.parse(new Date()) + e * 1000;
    if (v) {
      if (typeof s == 'function') {
        wx.setStorage({
          key: k,
          data: v,
          success: function success() {
            wx.setStorageSync(that.postfix + k, e);
            s();
          }
        });
      } else {
        wx.setStorageSync(that.postfix + k, e);
        wx.setStorageSync(k, v);
      }
    } else {
      that.remove(k);
    }
  },
  /**
   * 获取缓存 
   * @param  {[type]} k   [键名]
   */
  get: function get(k) {
    var that = this,
      deadtime = wx.getStorageSync(that.postfix + k),
      data = wx.getStorageSync(k);
    if (deadtime > 0) {
      var now = Date.parse(new Date());
      if (deadtime < now) {
        return data;
      } else {
        return false;
      }
    } else {
      return data;
    }
  },
  /**
   * 清理指定缓存
   * @return {[type]} [description]
   */
  remove: function remove(k) {
    var that = this;
    wx.removeStorageSync(that.postfix + k);
    wx.removeStorageSync(k);
  },
  /**
   * 获取缓存并销毁
   * @param  {[type]} k   [键名]
   * @param  {[type]} def [获取为空时默认]
   */
  getonce: function getonce(k) {
    var that = this;
    var data = that.get(k);
    that.remove(k);
    return data;
  },
  /**
   * 清理所有缓存
   * @return {[type]} [description]
   */
  clear: function clear() {
    wx.clearStorageSync();
  }
};
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"]))

/***/ }),

/***/ 359:
/*!********************************************************************************!*\
  !*** C:/Users/Administrator/Desktop/yswc/hire-wx-houxuanren/static/js/math.js ***!
  \********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = {
  /**
   * +
   * @param arg1
   * @param arg2
   * @returns {number}
   */
  add: function add(arg1, arg2) {
    var r1, r2, m;
    try {
      r1 = arg1.toString().split(".")[1].length;
    } catch (e) {
      r1 = 0;
    }
    try {
      r2 = arg2.toString().split(".")[1].length;
    } catch (e) {
      r2 = 0;
    }
    m = Math.pow(10, Math.max(r1, r2));
    return (arg1 * m + arg2 * m) / m;
  },
  /**
   * -
   * @param arg1
   * @param arg2
   * @returns {number}
   */
  sub: function sub(arg1, arg2) {
    var r1, r2, m, n;
    try {
      r1 = arg1.toString().split(".")[1].length;
    } catch (e) {
      r1 = 0;
    }
    try {
      r2 = arg2.toString().split(".")[1].length;
    } catch (e) {
      r2 = 0;
    }
    m = Math.pow(10, Math.max(r1, r2));
    n = r1 >= r2 ? r1 : r2;
    return ((arg1 * m - arg2 * m) / m).toFixed(n);
  },
  /**
   *  *
   * @param arg1
   * @param arg2
   * @returns {number}
   */
  mul: function mul(arg1, arg2) {
    var m = 0,
      s1 = arg1.toString(),
      s2 = arg2.toString();
    try {
      m += s1.split(".")[1].length;
    } catch (e) {}
    try {
      m += s2.split(".")[1].length;
    } catch (e) {}
    return Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m);
  },
  /**
   * /
   * @param arg1
   * @param arg2
   * @returns {number}
   */
  div: function div(arg1, arg2) {
    var t1 = 0,
      t2 = 0,
      r1,
      r2;
    try {
      t1 = arg1.toString().split(".")[1].length;
    } catch (e) {}
    try {
      t2 = arg2.toString().split(".")[1].length;
    } catch (e) {}
    r1 = Number(arg1.toString().replace(".", ""));
    r2 = Number(arg2.toString().replace(".", ""));
    return this.mul(r1 / r2, Math.pow(10, t2 - t1));
  },
  /**
   * 保留有效小数位 四舍五入，解决toFixed方法bug
   * @param num 需要操作的数字
   * @param decimal 保留小数的位数
   * @returns {string}
   */
  toFixed: function toFixed(num, decimal) {
    if (typeof decimal == 'undefined') {
      decimal = 2;
    }
    var times = Math.pow(10, decimal);
    var des = num * times + 0.5;
    des = (parseInt(des, 10) / times).toString();
    if (decimal > 0) {
      var arr = des.split('.');
      var len = decimal;
      if (arr.length == 1) {
        des += '.';
      } else {
        len = decimal - arr[1].length;
      }
      for (var i = 1; i <= len; i++) {
        des += '0';
      }
    }
    return des;
  }
};

/***/ }),

/***/ 360:
/*!******************************************************************************************!*\
  !*** C:/Users/Administrator/Desktop/yswc/hire-wx-houxuanren/static/js/qqmap-wx-jssdk.js ***!
  \******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(wx) {var _classCallCheck = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23);
var _createClass = __webpack_require__(/*! @babel/runtime/helpers/createClass */ 24);
/**
 * 微信小程序JavaScriptSDK
 * 地图
 * 苍源怡家
 * @version 1.1
 * @date 2019-01-20
 */

var ERROR_CONF = {
  KEY_ERR: 311,
  KEY_ERR_MSG: 'key格式错误',
  PARAM_ERR: 310,
  PARAM_ERR_MSG: '请求参数信息有误',
  SYSTEM_ERR: 600,
  SYSTEM_ERR_MSG: '系统错误',
  WX_ERR_CODE: 1000,
  WX_OK_CODE: 200
};
var BASE_URL = 'https://apis.map.qq.com/ws/';
var URL_SEARCH = BASE_URL + 'place/v1/search';
var URL_SUGGESTION = BASE_URL + 'place/v1/suggestion';
var URL_GET_GEOCODER = BASE_URL + 'geocoder/v1/';
var URL_CITY_LIST = BASE_URL + 'district/v1/list';
var URL_AREA_LIST = BASE_URL + 'district/v1/getchildren';
var URL_DISTANCE = BASE_URL + 'distance/v1/';
var EARTH_RADIUS = 6378136.49;
var Utils = {
  /**
   * 得到终点query字符串
   * @param {Array|String} 检索数据
   */
  location2query: function location2query(data) {
    if (typeof data == 'string') {
      return data;
    }
    var query = '';
    for (var i = 0; i < data.length; i++) {
      var d = data[i];
      if (!!query) {
        query += ';';
      }
      if (d.location) {
        query = query + d.location.lat + ',' + d.location.lng;
      }
      if (d.latitude && d.longitude) {
        query = query + d.latitude + ',' + d.longitude;
      }
    }
    return query;
  },
  /**
   * 计算角度
   */
  rad: function rad(d) {
    return d * Math.PI / 180.0;
  },
  /**
   * 处理终点location数组
   * @return 返回终点数组
   */
  getEndLocation: function getEndLocation(location) {
    var to = location.split(';');
    var endLocation = [];
    for (var i = 0; i < to.length; i++) {
      endLocation.push({
        lat: parseFloat(to[i].split(',')[0]),
        lng: parseFloat(to[i].split(',')[1])
      });
    }
    return endLocation;
  },
  /**
   * 计算两点间直线距离
   * @param a 表示纬度差
   * @param b 表示经度差
   * @return 返回的是距离，单位m
   */
  getDistance: function getDistance(latFrom, lngFrom, latTo, lngTo) {
    var radLatFrom = this.rad(latFrom);
    var radLatTo = this.rad(latTo);
    var a = radLatFrom - radLatTo;
    var b = this.rad(lngFrom) - this.rad(lngTo);
    var distance = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(radLatFrom) * Math.cos(radLatTo) * Math.pow(Math.sin(b / 2), 2)));
    distance = distance * EARTH_RADIUS;
    distance = Math.round(distance * 10000) / 10000;
    return parseFloat(distance.toFixed(0));
  },
  /**
   * 使用微信接口进行定位
   */
  getWXLocation: function getWXLocation(success, fail, complete) {
    wx.getLocation({
      type: 'gcj02',
      success: success,
      fail: fail,
      complete: complete
    });
  },
  /**
   * 获取location参数
   */
  getLocationParam: function getLocationParam(location) {
    if (typeof location == 'string') {
      var locationArr = location.split(',');
      if (locationArr.length === 2) {
        location = {
          latitude: location.split(',')[0],
          longitude: location.split(',')[1]
        };
      } else {
        location = {};
      }
    }
    return location;
  },
  /**
   * 回调函数默认处理
   */
  polyfillParam: function polyfillParam(param) {
    param.success = param.success || function () {};
    param.fail = param.fail || function () {};
    param.complete = param.complete || function () {};
  },
  /**
   * 验证param对应的key值是否为空
   * 
   * @param {Object} param 接口参数
   * @param {String} key 对应参数的key
   */
  checkParamKeyEmpty: function checkParamKeyEmpty(param, key) {
    if (!param[key]) {
      var errconf = this.buildErrorConfig(ERROR_CONF.PARAM_ERR, ERROR_CONF.PARAM_ERR_MSG + key + '参数格式有误');
      param.fail(errconf);
      param.complete(errconf);
      return true;
    }
    return false;
  },
  /**
   * 验证参数中是否存在检索词keyword
   * 
   * @param {Object} param 接口参数
   */
  checkKeyword: function checkKeyword(param) {
    return !this.checkParamKeyEmpty(param, 'keyword');
  },
  /**
   * 验证location值
   * 
   * @param {Object} param 接口参数
   */
  checkLocation: function checkLocation(param) {
    var location = this.getLocationParam(param.location);
    if (!location || !location.latitude || !location.longitude) {
      var errconf = this.buildErrorConfig(ERROR_CONF.PARAM_ERR, ERROR_CONF.PARAM_ERR_MSG + ' location参数格式有误');
      param.fail(errconf);
      param.complete(errconf);
      return false;
    }
    return true;
  },
  /**
   * 构造错误数据结构
   * @param {Number} errCode 错误码
   * @param {Number} errMsg 错误描述
   */
  buildErrorConfig: function buildErrorConfig(errCode, errMsg) {
    return {
      status: errCode,
      message: errMsg
    };
  },
  /**
   * 
   * 数据处理函数
   * 根据传入参数不同处理不同数据
   * @param {String} feature 功能名称
   * search 地点搜索
   * suggest关键词提示
   * reverseGeocoder逆地址解析
   * geocoder地址解析
   * getCityList获取城市列表：父集
   * getDistrictByCityId获取区县列表：子集
   * calculateDistance距离计算
   * @param {Object} param 接口参数
   * @param {Object} data 数据
   */
  handleData: function handleData(param, data, feature) {
    if (feature === 'search') {
      var searchResult = data.data;
      var searchSimplify = [];
      for (var i = 0; i < searchResult.length; i++) {
        searchSimplify.push({
          id: searchResult[i].id || null,
          title: searchResult[i].title || null,
          latitude: searchResult[i].location && searchResult[i].location.lat || null,
          longitude: searchResult[i].location && searchResult[i].location.lng || null,
          address: searchResult[i].address || null,
          category: searchResult[i].category || null,
          tel: searchResult[i].tel || null,
          adcode: searchResult[i].ad_info && searchResult[i].ad_info.adcode || null,
          city: searchResult[i].ad_info && searchResult[i].ad_info.city || null,
          district: searchResult[i].ad_info && searchResult[i].ad_info.district || null,
          province: searchResult[i].ad_info && searchResult[i].ad_info.province || null
        });
      }
      param.success(data, {
        searchResult: searchResult,
        searchSimplify: searchSimplify
      });
    } else if (feature === 'suggest') {
      var suggestResult = data.data;
      var suggestSimplify = [];
      for (var i = 0; i < suggestResult.length; i++) {
        suggestSimplify.push({
          adcode: suggestResult[i].adcode || null,
          address: suggestResult[i].address || null,
          category: suggestResult[i].category || null,
          city: suggestResult[i].city || null,
          district: suggestResult[i].district || null,
          id: suggestResult[i].id || null,
          latitude: suggestResult[i].location && suggestResult[i].location.lat || null,
          longitude: suggestResult[i].location && suggestResult[i].location.lng || null,
          province: suggestResult[i].province || null,
          title: suggestResult[i].title || null,
          type: suggestResult[i].type || null
        });
      }
      param.success(data, {
        suggestResult: suggestResult,
        suggestSimplify: suggestSimplify
      });
    } else if (feature === 'reverseGeocoder') {
      var reverseGeocoderResult = data.result;
      var reverseGeocoderSimplify = {
        address: reverseGeocoderResult.address || null,
        latitude: reverseGeocoderResult.location && reverseGeocoderResult.location.lat || null,
        longitude: reverseGeocoderResult.location && reverseGeocoderResult.location.lng || null,
        adcode: reverseGeocoderResult.ad_info && reverseGeocoderResult.ad_info.adcode || null,
        city: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.city || null,
        district: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.district || null,
        nation: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.nation || null,
        province: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.province || null,
        street: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.street || null,
        street_number: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.street_number || null,
        recommend: reverseGeocoderResult.formatted_addresses && reverseGeocoderResult.formatted_addresses.recommend || null,
        rough: reverseGeocoderResult.formatted_addresses && reverseGeocoderResult.formatted_addresses.rough || null
      };
      if (reverseGeocoderResult.pois) {
        //判断是否返回周边poi
        var pois = reverseGeocoderResult.pois;
        var poisSimplify = [];
        for (var i = 0; i < pois.length; i++) {
          poisSimplify.push({
            id: pois[i].id || null,
            title: pois[i].title || null,
            latitude: pois[i].location && pois[i].location.lat || null,
            longitude: pois[i].location && pois[i].location.lng || null,
            address: pois[i].address || null,
            category: pois[i].category || null,
            adcode: pois[i].ad_info && pois[i].ad_info.adcode || null,
            city: pois[i].ad_info && pois[i].ad_info.city || null,
            district: pois[i].ad_info && pois[i].ad_info.district || null,
            province: pois[i].ad_info && pois[i].ad_info.province || null
          });
        }
        param.success(data, {
          reverseGeocoderResult: reverseGeocoderResult,
          reverseGeocoderSimplify: reverseGeocoderSimplify,
          pois: pois,
          poisSimplify: poisSimplify
        });
      } else {
        param.success(data, {
          reverseGeocoderResult: reverseGeocoderResult,
          reverseGeocoderSimplify: reverseGeocoderSimplify
        });
      }
    } else if (feature === 'geocoder') {
      var geocoderResult = data.result;
      var geocoderSimplify = {
        title: geocoderResult.title || null,
        latitude: geocoderResult.location && geocoderResult.location.lat || null,
        longitude: geocoderResult.location && geocoderResult.location.lng || null,
        adcode: geocoderResult.ad_info && geocoderResult.ad_info.adcode || null,
        province: geocoderResult.address_components && geocoderResult.address_components.province || null,
        city: geocoderResult.address_components && geocoderResult.address_components.city || null,
        district: geocoderResult.address_components && geocoderResult.address_components.district || null,
        street: geocoderResult.address_components && geocoderResult.address_components.street || null,
        street_number: geocoderResult.address_components && geocoderResult.address_components.street_number || null,
        level: geocoderResult.level || null
      };
      param.success(data, {
        geocoderResult: geocoderResult,
        geocoderSimplify: geocoderSimplify
      });
    } else if (feature === 'getCityList') {
      var provinceResult = data.result[0];
      var cityResult = data.result[1];
      var districtResult = data.result[2];
      param.success(data, {
        provinceResult: provinceResult,
        cityResult: cityResult,
        districtResult: districtResult
      });
    } else if (feature === 'getDistrictByCityId') {
      var districtByCity = data.result[0];
      param.success(data, districtByCity);
    } else if (feature === 'calculateDistance') {
      var calculateDistanceResult = data.result.elements;
      var distance = [];
      for (var i = 0; i < calculateDistanceResult.length; i++) {
        distance.push(calculateDistanceResult[i].distance);
      }
      param.success(data, {
        calculateDistanceResult: calculateDistanceResult,
        distance: distance
      });
    } else {
      param.success(data);
    }
  },
  /**
   * 构造微信请求参数，公共属性处理
   * 
   * @param {Object} param 接口参数
   * @param {Object} param 配置项
   * @param {String} feature 方法名
   */
  buildWxRequestConfig: function buildWxRequestConfig(param, options, feature) {
    var that = this;
    options.header = {
      "content-type": "application/json"
    };
    options.method = 'GET';
    options.success = function (res) {
      var data = res.data;
      if (data.status === 0) {
        that.handleData(param, data, feature);
      } else {
        param.fail(data);
      }
    };
    options.fail = function (res) {
      res.statusCode = ERROR_CONF.WX_ERR_CODE;
      param.fail(that.buildErrorConfig(ERROR_CONF.WX_ERR_CODE, res.errMsg));
    };
    options.complete = function (res) {
      var statusCode = +res.statusCode;
      switch (statusCode) {
        case ERROR_CONF.WX_ERR_CODE:
          {
            param.complete(that.buildErrorConfig(ERROR_CONF.WX_ERR_CODE, res.errMsg));
            break;
          }
        case ERROR_CONF.WX_OK_CODE:
          {
            var data = res.data;
            if (data.status === 0) {
              param.complete(data);
            } else {
              param.complete(that.buildErrorConfig(data.status, data.message));
            }
            break;
          }
        default:
          {
            param.complete(that.buildErrorConfig(ERROR_CONF.SYSTEM_ERR, ERROR_CONF.SYSTEM_ERR_MSG));
          }
      }
    };
    return options;
  },
  /**
   * 处理用户参数是否传入坐标进行不同的处理
   */
  locationProcess: function locationProcess(param, locationsuccess, locationfail, locationcomplete) {
    var that = this;
    locationfail = locationfail || function (res) {
      res.statusCode = ERROR_CONF.WX_ERR_CODE;
      param.fail(that.buildErrorConfig(ERROR_CONF.WX_ERR_CODE, res.errMsg));
    };
    locationcomplete = locationcomplete || function (res) {
      if (res.statusCode == ERROR_CONF.WX_ERR_CODE) {
        param.complete(that.buildErrorConfig(ERROR_CONF.WX_ERR_CODE, res.errMsg));
      }
    };
    if (!param.location) {
      that.getWXLocation(locationsuccess, locationfail, locationcomplete);
    } else if (that.checkLocation(param)) {
      var location = Utils.getLocationParam(param.location);
      locationsuccess(location);
    }
  }
};
var QQMapWX = /*#__PURE__*/function () {
  "use strict";

  /**
   * 构造函数
   * 
   * @param {Object} options 接口参数,key 为必选参数
   */
  function QQMapWX(options) {
    _classCallCheck(this, QQMapWX);
    if (!options.key) {
      throw Error('key值不能为空');
    }
    this.key = options.key;
  }
  _createClass(QQMapWX, [{
    key: "search",
    value:
    /**
     * POI周边检索
     *
     * @param {Object} options 接口参数对象
     * 
     * 参数对象结构可以参考
     * @see http://lbs.qq.com/webservice_v1/guide-search.html
     */
    function search(options) {
      var that = this;
      options = options || {};
      Utils.polyfillParam(options);
      if (!Utils.checkKeyword(options)) {
        return;
      }
      var requestParam = {
        keyword: options.keyword,
        orderby: options.orderby || '_distance',
        page_size: options.page_size || 10,
        page_index: options.page_index || 1,
        output: 'json',
        key: that.key
      };
      if (options.address_format) {
        requestParam.address_format = options.address_format;
      }
      if (options.filter) {
        requestParam.filter = options.filter;
      }
      var distance = options.distance || "1000";
      var auto_extend = options.auto_extend || 1;
      var region = null;
      var rectangle = null;

      //判断城市限定参数
      if (options.region) {
        region = options.region;
      }

      //矩形限定坐标(暂时只支持字符串格式)
      if (options.rectangle) {
        rectangle = options.rectangle;
      }
      var locationsuccess = function locationsuccess(result) {
        if (region && !rectangle) {
          //城市限定参数拼接
          requestParam.boundary = "region(" + region + "," + auto_extend + "," + result.latitude + "," + result.longitude + ")";
        } else if (rectangle && !region) {
          //矩形搜索
          requestParam.boundary = "rectangle(" + rectangle + ")";
        } else {
          requestParam.boundary = "nearby(" + result.latitude + "," + result.longitude + "," + distance + "," + auto_extend + ")";
        }
        wx.request(Utils.buildWxRequestConfig(options, {
          url: URL_SEARCH,
          data: requestParam
        }, 'search'));
      };
      Utils.locationProcess(options, locationsuccess);
    }
  }, {
    key: "getSuggestion",
    value:
    /**
     * sug模糊检索
     *
     * @param {Object} options 接口参数对象
     * 
     * 参数对象结构可以参考
     * http://lbs.qq.com/webservice_v1/guide-suggestion.html
     */
    function getSuggestion(options) {
      var that = this;
      options = options || {};
      Utils.polyfillParam(options);
      if (!Utils.checkKeyword(options)) {
        return;
      }
      var requestParam = {
        keyword: options.keyword,
        region: options.region || '全国',
        region_fix: options.region_fix || 0,
        policy: options.policy || 0,
        page_size: options.page_size || 10,
        //控制显示条数
        page_index: options.page_index || 1,
        //控制页数
        get_subpois: options.get_subpois || 0,
        //返回子地点
        output: 'json',
        key: that.key
      };
      //长地址
      if (options.address_format) {
        requestParam.address_format = options.address_format;
      }
      //过滤
      if (options.filter) {
        requestParam.filter = options.filter;
      }
      //排序
      if (options.location) {
        var locationsuccess = function locationsuccess(result) {
          requestParam.location = result.latitude + ',' + result.longitude;
          wx.request(Utils.buildWxRequestConfig(options, {
            url: URL_SUGGESTION,
            data: requestParam
          }, "suggest"));
        };
        Utils.locationProcess(options, locationsuccess);
      } else {
        wx.request(Utils.buildWxRequestConfig(options, {
          url: URL_SUGGESTION,
          data: requestParam
        }, "suggest"));
      }
    }
  }, {
    key: "reverseGeocoder",
    value:
    /**
     * 逆地址解析
     *
     * @param {Object} options 接口参数对象
     * 
     * 请求参数结构可以参考
     * http://lbs.qq.com/webservice_v1/guide-gcoder.html
     */
    function reverseGeocoder(options) {
      console.log(options);
      var that = this;
      options = options || {};
      Utils.polyfillParam(options);
      var requestParam = {
        coord_type: options.coord_type || 5,
        get_poi: options.get_poi || 0,
        output: 'json',
        key: that.key
      };
      if (options.poi_options) {
        requestParam.poi_options = options.poi_options;
      }
      var locationsuccess = function locationsuccess(result) {
        requestParam.location = result.latitude + ',' + result.longitude;
        wx.request(Utils.buildWxRequestConfig(options, {
          url: URL_GET_GEOCODER,
          data: requestParam
        }, 'reverseGeocoder'));
      };
      Utils.locationProcess(options, locationsuccess);
    }
  }, {
    key: "geocoder",
    value:
    /**
     * 地址解析
     *
     * @param {Object} options 接口参数对象
     * 
     * 请求参数结构可以参考
     * http://lbs.qq.com/webservice_v1/guide-geocoder.html
     */
    function geocoder(options) {
      var that = this;
      options = options || {};
      Utils.polyfillParam(options);
      if (Utils.checkParamKeyEmpty(options, 'address')) {
        return;
      }
      var requestParam = {
        address: options.address,
        output: 'json',
        key: that.key
      };

      //城市限定
      if (options.region) {
        requestParam.region = options.region;
      }
      wx.request(Utils.buildWxRequestConfig(options, {
        url: URL_GET_GEOCODER,
        data: requestParam
      }, 'geocoder'));
    }
  }, {
    key: "getCityList",
    value:
    /**
     * 获取城市列表
     *
     * @param {Object} options 接口参数对象
     * 
     * 请求参数结构可以参考
     * http://lbs.qq.com/webservice_v1/guide-region.html
     */
    function getCityList(options) {
      var that = this;
      options = options || {};
      Utils.polyfillParam(options);
      var requestParam = {
        output: 'json',
        key: that.key
      };
      wx.request(Utils.buildWxRequestConfig(options, {
        url: URL_CITY_LIST,
        data: requestParam
      }, 'getCityList'));
    }
  }, {
    key: "getDistrictByCityId",
    value:
    /**
     * 获取对应城市ID的区县列表
     *
     * @param {Object} options 接口参数对象
     * 
     * 请求参数结构可以参考
     * http://lbs.qq.com/webservice_v1/guide-region.html
     */
    function getDistrictByCityId(options) {
      var that = this;
      options = options || {};
      Utils.polyfillParam(options);
      if (Utils.checkParamKeyEmpty(options, 'id')) {
        return;
      }
      var requestParam = {
        id: options.id || '',
        output: 'json',
        key: that.key
      };
      wx.request(Utils.buildWxRequestConfig(options, {
        url: URL_AREA_LIST,
        data: requestParam
      }, 'getDistrictByCityId'));
    }
  }, {
    key: "calculateDistance",
    value:
    /**
     * 用于单起点到多终点的路线距离(非直线距离)计算：
     * 支持两种距离计算方式：步行和驾车。
     * 起点到终点最大限制直线距离10公里。
     *
     * 新增直线距离计算。
     * 
     * @param {Object} options 接口参数对象
     * 
     * 请求参数结构可以参考
     * http://lbs.qq.com/webservice_v1/guide-distance.html
     */
    function calculateDistance(options) {
      var that = this;
      options = options || {};
      Utils.polyfillParam(options);
      if (Utils.checkParamKeyEmpty(options, 'to')) {
        return;
      }
      var requestParam = {
        mode: options.mode || 'walking',
        to: Utils.location2query(options.to),
        output: 'json',
        key: that.key
      };
      if (options.from) {
        options.location = options.from;
      }

      //计算直线距离
      if (requestParam.mode == 'straight') {
        var locationsuccess = function locationsuccess(result) {
          var locationTo = Utils.getEndLocation(requestParam.to); //处理终点坐标
          var data = {
            message: "query ok",
            result: {
              elements: []
            },
            status: 0
          };
          for (var i = 0; i < locationTo.length; i++) {
            data.result.elements.push({
              //将坐标存入
              distance: Utils.getDistance(result.latitude, result.longitude, locationTo[i].lat, locationTo[i].lng),
              duration: 0,
              from: {
                lat: result.latitude,
                lng: result.longitude
              },
              to: {
                lat: locationTo[i].lat,
                lng: locationTo[i].lng
              }
            });
          }
          var calculateResult = data.result.elements;
          var distanceResult = [];
          for (var i = 0; i < calculateResult.length; i++) {
            distanceResult.push(calculateResult[i].distance);
          }
          return options.success(data, {
            calculateResult: calculateResult,
            distanceResult: distanceResult
          });
        };
        Utils.locationProcess(options, locationsuccess);
      } else {
        var locationsuccess = function locationsuccess(result) {
          requestParam.from = result.latitude + ',' + result.longitude;
          wx.request(Utils.buildWxRequestConfig(options, {
            url: URL_DISTANCE,
            data: requestParam
          }, 'calculateDistance'));
        };
        Utils.locationProcess(options, locationsuccess);
      }
    }
  }]);
  return QQMapWX;
}();
;
module.exports = QQMapWX;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"]))

/***/ }),

/***/ 361:
/*!********************************************************************************************!*\
  !*** C:/Users/Administrator/Desktop/yswc/hire-wx-houxuanren/static/js/weapp.qrcode.min.js ***!
  \********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(wx) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ 13);
/**
 * weapp.qrcode.js v1.0.0 (https://github.com/yingye/weapp-qrcode#readme)
 * js画二维码
 * 花伴侬
 */

!function (t, e) {
  "object" == ( false ? undefined : _typeof(exports)) && "undefined" != typeof module ? module.exports = e() :  true ? !(__WEBPACK_AMD_DEFINE_FACTORY__ = (e),
				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
				(__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
				__WEBPACK_AMD_DEFINE_FACTORY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : undefined;
}(this, function () {
  "use strict";

  var t = Object.prototype.hasOwnProperty,
    e = Object.prototype.toString,
    r = Object.defineProperty,
    o = Object.getOwnPropertyDescriptor,
    n = function n(t) {
      return "function" == typeof Array.isArray ? Array.isArray(t) : "[object Array]" === e.call(t);
    },
    i = function i(r) {
      if (!r || "[object Object]" !== e.call(r)) return !1;
      var o,
        n = t.call(r, "constructor"),
        i = r.constructor && r.constructor.prototype && t.call(r.constructor.prototype, "isPrototypeOf");
      if (r.constructor && !n && !i) return !1;
      for (o in r) {
        ;
      }
      return void 0 === o || t.call(r, o);
    },
    a = function a(t, e) {
      r && "__proto__" === e.name ? r(t, e.name, {
        enumerable: !0,
        configurable: !0,
        value: e.newValue,
        writable: !0
      }) : t[e.name] = e.newValue;
    },
    u = function u(e, r) {
      if ("__proto__" === r) {
        if (!t.call(e, r)) return;
        if (o) return o(e, r).value;
      }
      return e[r];
    },
    s = function t() {
      var e,
        r,
        o,
        s,
        h,
        l,
        f = arguments[0],
        g = 1,
        c = arguments.length,
        d = !1;
      for ("boolean" == typeof f && (d = f, f = arguments[1] || {}, g = 2), (null == f || "object" != _typeof(f) && "function" != typeof f) && (f = {}); g < c; ++g) {
        if (null != (e = arguments[g])) for (r in e) {
          o = u(f, r), f !== (s = u(e, r)) && (d && s && (i(s) || (h = n(s))) ? (h ? (h = !1, l = o && n(o) ? o : []) : l = o && i(o) ? o : {}, a(f, {
            name: r,
            newValue: t(d, l, s)
          })) : void 0 !== s && a(f, {
            name: r,
            newValue: s
          }));
        }
      }
      return f;
    };
  function h(t) {
    this.mode = f.MODE_8BIT_BYTE, this.data = t;
  }
  function l(t, e) {
    this.typeNumber = t, this.errorCorrectLevel = e, this.modules = null, this.moduleCount = 0, this.dataCache = null, this.dataList = new Array();
  }
  h.prototype = {
    getLength: function getLength(t) {
      return this.data.length;
    },
    write: function write(t) {
      for (var e = 0; e < this.data.length; e++) {
        t.put(this.data.charCodeAt(e), 8);
      }
    }
  }, l.prototype = {
    addData: function addData(t) {
      var e = new h(t);
      this.dataList.push(e), this.dataCache = null;
    },
    isDark: function isDark(t, e) {
      if (t < 0 || this.moduleCount <= t || e < 0 || this.moduleCount <= e) throw new Error(t + "," + e);
      return this.modules[t][e];
    },
    getModuleCount: function getModuleCount() {
      return this.moduleCount;
    },
    make: function make() {
      if (this.typeNumber < 1) {
        var t = 1;
        for (t = 1; t < 40; t++) {
          for (var e = _.getRSBlocks(t, this.errorCorrectLevel), r = new D(), o = 0, n = 0; n < e.length; n++) {
            o += e[n].dataCount;
          }
          for (n = 0; n < this.dataList.length; n++) {
            var i = this.dataList[n];
            r.put(i.mode, 4), r.put(i.getLength(), w.getLengthInBits(i.mode, t)), i.write(r);
          }
          if (r.getLengthInBits() <= 8 * o) break;
        }
        this.typeNumber = t;
      }
      this.makeImpl(!1, this.getBestMaskPattern());
    },
    makeImpl: function makeImpl(t, e) {
      this.moduleCount = 4 * this.typeNumber + 17, this.modules = new Array(this.moduleCount);
      for (var r = 0; r < this.moduleCount; r++) {
        this.modules[r] = new Array(this.moduleCount);
        for (var o = 0; o < this.moduleCount; o++) {
          this.modules[r][o] = null;
        }
      }
      this.setupPositionProbePattern(0, 0), this.setupPositionProbePattern(this.moduleCount - 7, 0), this.setupPositionProbePattern(0, this.moduleCount - 7), this.setupPositionAdjustPattern(), this.setupTimingPattern(), this.setupTypeInfo(t, e), this.typeNumber >= 7 && this.setupTypeNumber(t), null == this.dataCache && (this.dataCache = l.createData(this.typeNumber, this.errorCorrectLevel, this.dataList)), this.mapData(this.dataCache, e);
    },
    setupPositionProbePattern: function setupPositionProbePattern(t, e) {
      for (var r = -1; r <= 7; r++) {
        if (!(t + r <= -1 || this.moduleCount <= t + r)) for (var o = -1; o <= 7; o++) {
          e + o <= -1 || this.moduleCount <= e + o || (this.modules[t + r][e + o] = 0 <= r && r <= 6 && (0 == o || 6 == o) || 0 <= o && o <= 6 && (0 == r || 6 == r) || 2 <= r && r <= 4 && 2 <= o && o <= 4);
        }
      }
    },
    getBestMaskPattern: function getBestMaskPattern() {
      for (var t = 0, e = 0, r = 0; r < 8; r++) {
        this.makeImpl(!0, r);
        var o = w.getLostPoint(this);
        (0 == r || t > o) && (t = o, e = r);
      }
      return e;
    },
    createMovieClip: function createMovieClip(t, e, r) {
      var o = t.createEmptyMovieClip(e, r);
      this.make();
      for (var n = 0; n < this.modules.length; n++) {
        for (var i = 1 * n, a = 0; a < this.modules[n].length; a++) {
          var u = 1 * a;
          this.modules[n][a] && (o.beginFill(0, 100), o.moveTo(u, i), o.lineTo(u + 1, i), o.lineTo(u + 1, i + 1), o.lineTo(u, i + 1), o.endFill());
        }
      }
      return o;
    },
    setupTimingPattern: function setupTimingPattern() {
      for (var t = 8; t < this.moduleCount - 8; t++) {
        null == this.modules[t][6] && (this.modules[t][6] = t % 2 == 0);
      }
      for (var e = 8; e < this.moduleCount - 8; e++) {
        null == this.modules[6][e] && (this.modules[6][e] = e % 2 == 0);
      }
    },
    setupPositionAdjustPattern: function setupPositionAdjustPattern() {
      for (var t = w.getPatternPosition(this.typeNumber), e = 0; e < t.length; e++) {
        for (var r = 0; r < t.length; r++) {
          var o = t[e],
            n = t[r];
          if (null == this.modules[o][n]) for (var i = -2; i <= 2; i++) {
            for (var a = -2; a <= 2; a++) {
              this.modules[o + i][n + a] = -2 == i || 2 == i || -2 == a || 2 == a || 0 == i && 0 == a;
            }
          }
        }
      }
    },
    setupTypeNumber: function setupTypeNumber(t) {
      for (var e = w.getBCHTypeNumber(this.typeNumber), r = 0; r < 18; r++) {
        var o = !t && 1 == (e >> r & 1);
        this.modules[Math.floor(r / 3)][r % 3 + this.moduleCount - 8 - 3] = o;
      }
      for (r = 0; r < 18; r++) {
        o = !t && 1 == (e >> r & 1);
        this.modules[r % 3 + this.moduleCount - 8 - 3][Math.floor(r / 3)] = o;
      }
    },
    setupTypeInfo: function setupTypeInfo(t, e) {
      for (var r = this.errorCorrectLevel << 3 | e, o = w.getBCHTypeInfo(r), n = 0; n < 15; n++) {
        var i = !t && 1 == (o >> n & 1);
        n < 6 ? this.modules[n][8] = i : n < 8 ? this.modules[n + 1][8] = i : this.modules[this.moduleCount - 15 + n][8] = i;
      }
      for (n = 0; n < 15; n++) {
        i = !t && 1 == (o >> n & 1);
        n < 8 ? this.modules[8][this.moduleCount - n - 1] = i : n < 9 ? this.modules[8][15 - n - 1 + 1] = i : this.modules[8][15 - n - 1] = i;
      }
      this.modules[this.moduleCount - 8][8] = !t;
    },
    mapData: function mapData(t, e) {
      for (var r = -1, o = this.moduleCount - 1, n = 7, i = 0, a = this.moduleCount - 1; a > 0; a -= 2) {
        for (6 == a && a--;;) {
          for (var u = 0; u < 2; u++) {
            if (null == this.modules[o][a - u]) {
              var s = !1;
              i < t.length && (s = 1 == (t[i] >>> n & 1)), w.getMask(e, o, a - u) && (s = !s), this.modules[o][a - u] = s, -1 == --n && (i++, n = 7);
            }
          }
          if ((o += r) < 0 || this.moduleCount <= o) {
            o -= r, r = -r;
            break;
          }
        }
      }
    }
  }, l.PAD0 = 236, l.PAD1 = 17, l.createData = function (t, e, r) {
    for (var o = _.getRSBlocks(t, e), n = new D(), i = 0; i < r.length; i++) {
      var a = r[i];
      n.put(a.mode, 4), n.put(a.getLength(), w.getLengthInBits(a.mode, t)), a.write(n);
    }
    var u = 0;
    for (i = 0; i < o.length; i++) {
      u += o[i].dataCount;
    }
    if (n.getLengthInBits() > 8 * u) throw new Error("code length overflow. (" + n.getLengthInBits() + ">" + 8 * u + ")");
    for (n.getLengthInBits() + 4 <= 8 * u && n.put(0, 4); n.getLengthInBits() % 8 != 0;) {
      n.putBit(!1);
    }
    for (; !(n.getLengthInBits() >= 8 * u || (n.put(l.PAD0, 8), n.getLengthInBits() >= 8 * u));) {
      n.put(l.PAD1, 8);
    }
    return l.createBytes(n, o);
  }, l.createBytes = function (t, e) {
    for (var r = 0, o = 0, n = 0, i = new Array(e.length), a = new Array(e.length), u = 0; u < e.length; u++) {
      var s = e[u].dataCount,
        h = e[u].totalCount - s;
      o = Math.max(o, s), n = Math.max(n, h), i[u] = new Array(s);
      for (var l = 0; l < i[u].length; l++) {
        i[u][l] = 255 & t.buffer[l + r];
      }
      r += s;
      var f = w.getErrorCorrectPolynomial(h),
        g = new A(i[u], f.getLength() - 1).mod(f);
      a[u] = new Array(f.getLength() - 1);
      for (l = 0; l < a[u].length; l++) {
        var c = l + g.getLength() - a[u].length;
        a[u][l] = c >= 0 ? g.get(c) : 0;
      }
    }
    var d = 0;
    for (l = 0; l < e.length; l++) {
      d += e[l].totalCount;
    }
    var m = new Array(d),
      v = 0;
    for (l = 0; l < o; l++) {
      for (u = 0; u < e.length; u++) {
        l < i[u].length && (m[v++] = i[u][l]);
      }
    }
    for (l = 0; l < n; l++) {
      for (u = 0; u < e.length; u++) {
        l < a[u].length && (m[v++] = a[u][l]);
      }
    }
    return m;
  };
  for (var f = {
      MODE_NUMBER: 1,
      MODE_ALPHA_NUM: 2,
      MODE_8BIT_BYTE: 4,
      MODE_KANJI: 8
    }, g = {
      L: 1,
      M: 0,
      Q: 3,
      H: 2
    }, c = 0, d = 1, m = 2, v = 3, p = 4, C = 5, B = 6, L = 7, w = {
      PATTERN_POSITION_TABLE: [[], [6, 18], [6, 22], [6, 26], [6, 30], [6, 34], [6, 22, 38], [6, 24, 42], [6, 26, 46], [6, 28, 50], [6, 30, 54], [6, 32, 58], [6, 34, 62], [6, 26, 46, 66], [6, 26, 48, 70], [6, 26, 50, 74], [6, 30, 54, 78], [6, 30, 56, 82], [6, 30, 58, 86], [6, 34, 62, 90], [6, 28, 50, 72, 94], [6, 26, 50, 74, 98], [6, 30, 54, 78, 102], [6, 28, 54, 80, 106], [6, 32, 58, 84, 110], [6, 30, 58, 86, 114], [6, 34, 62, 90, 118], [6, 26, 50, 74, 98, 122], [6, 30, 54, 78, 102, 126], [6, 26, 52, 78, 104, 130], [6, 30, 56, 82, 108, 134], [6, 34, 60, 86, 112, 138], [6, 30, 58, 86, 114, 142], [6, 34, 62, 90, 118, 146], [6, 30, 54, 78, 102, 126, 150], [6, 24, 50, 76, 102, 128, 154], [6, 28, 54, 80, 106, 132, 158], [6, 32, 58, 84, 110, 136, 162], [6, 26, 54, 82, 110, 138, 166], [6, 30, 58, 86, 114, 142, 170]],
      G15: 1335,
      G18: 7973,
      G15_MASK: 21522,
      getBCHTypeInfo: function getBCHTypeInfo(t) {
        for (var e = t << 10; w.getBCHDigit(e) - w.getBCHDigit(w.G15) >= 0;) {
          e ^= w.G15 << w.getBCHDigit(e) - w.getBCHDigit(w.G15);
        }
        return (t << 10 | e) ^ w.G15_MASK;
      },
      getBCHTypeNumber: function getBCHTypeNumber(t) {
        for (var e = t << 12; w.getBCHDigit(e) - w.getBCHDigit(w.G18) >= 0;) {
          e ^= w.G18 << w.getBCHDigit(e) - w.getBCHDigit(w.G18);
        }
        return t << 12 | e;
      },
      getBCHDigit: function getBCHDigit(t) {
        for (var e = 0; 0 != t;) {
          e++, t >>>= 1;
        }
        return e;
      },
      getPatternPosition: function getPatternPosition(t) {
        return w.PATTERN_POSITION_TABLE[t - 1];
      },
      getMask: function getMask(t, e, r) {
        switch (t) {
          case c:
            return (e + r) % 2 == 0;
          case d:
            return e % 2 == 0;
          case m:
            return r % 3 == 0;
          case v:
            return (e + r) % 3 == 0;
          case p:
            return (Math.floor(e / 2) + Math.floor(r / 3)) % 2 == 0;
          case C:
            return e * r % 2 + e * r % 3 == 0;
          case B:
            return (e * r % 2 + e * r % 3) % 2 == 0;
          case L:
            return (e * r % 3 + (e + r) % 2) % 2 == 0;
          default:
            throw new Error("bad maskPattern:" + t);
        }
      },
      getErrorCorrectPolynomial: function getErrorCorrectPolynomial(t) {
        for (var e = new A([1], 0), r = 0; r < t; r++) {
          e = e.multiply(new A([1, y.gexp(r)], 0));
        }
        return e;
      },
      getLengthInBits: function getLengthInBits(t, e) {
        if (1 <= e && e < 10) switch (t) {
          case f.MODE_NUMBER:
            return 10;
          case f.MODE_ALPHA_NUM:
            return 9;
          case f.MODE_8BIT_BYTE:
          case f.MODE_KANJI:
            return 8;
          default:
            throw new Error("mode:" + t);
        } else if (e < 27) switch (t) {
          case f.MODE_NUMBER:
            return 12;
          case f.MODE_ALPHA_NUM:
            return 11;
          case f.MODE_8BIT_BYTE:
            return 16;
          case f.MODE_KANJI:
            return 10;
          default:
            throw new Error("mode:" + t);
        } else {
          if (!(e < 41)) throw new Error("type:" + e);
          switch (t) {
            case f.MODE_NUMBER:
              return 14;
            case f.MODE_ALPHA_NUM:
              return 13;
            case f.MODE_8BIT_BYTE:
              return 16;
            case f.MODE_KANJI:
              return 12;
            default:
              throw new Error("mode:" + t);
          }
        }
      },
      getLostPoint: function getLostPoint(t) {
        for (var e = t.getModuleCount(), r = 0, o = 0; o < e; o++) {
          for (var n = 0; n < e; n++) {
            for (var i = 0, a = t.isDark(o, n), u = -1; u <= 1; u++) {
              if (!(o + u < 0 || e <= o + u)) for (var s = -1; s <= 1; s++) {
                n + s < 0 || e <= n + s || 0 == u && 0 == s || a == t.isDark(o + u, n + s) && i++;
              }
            }
            i > 5 && (r += 3 + i - 5);
          }
        }
        for (o = 0; o < e - 1; o++) {
          for (n = 0; n < e - 1; n++) {
            var h = 0;
            t.isDark(o, n) && h++, t.isDark(o + 1, n) && h++, t.isDark(o, n + 1) && h++, t.isDark(o + 1, n + 1) && h++, 0 != h && 4 != h || (r += 3);
          }
        }
        for (o = 0; o < e; o++) {
          for (n = 0; n < e - 6; n++) {
            t.isDark(o, n) && !t.isDark(o, n + 1) && t.isDark(o, n + 2) && t.isDark(o, n + 3) && t.isDark(o, n + 4) && !t.isDark(o, n + 5) && t.isDark(o, n + 6) && (r += 40);
          }
        }
        for (n = 0; n < e; n++) {
          for (o = 0; o < e - 6; o++) {
            t.isDark(o, n) && !t.isDark(o + 1, n) && t.isDark(o + 2, n) && t.isDark(o + 3, n) && t.isDark(o + 4, n) && !t.isDark(o + 5, n) && t.isDark(o + 6, n) && (r += 40);
          }
        }
        var l = 0;
        for (n = 0; n < e; n++) {
          for (o = 0; o < e; o++) {
            t.isDark(o, n) && l++;
          }
        }
        return r += 10 * (Math.abs(100 * l / e / e - 50) / 5);
      }
    }, y = {
      glog: function glog(t) {
        if (t < 1) throw new Error("glog(" + t + ")");
        return y.LOG_TABLE[t];
      },
      gexp: function gexp(t) {
        for (; t < 0;) {
          t += 255;
        }
        for (; t >= 256;) {
          t -= 255;
        }
        return y.EXP_TABLE[t];
      },
      EXP_TABLE: new Array(256),
      LOG_TABLE: new Array(256)
    }, E = 0; E < 8; E++) {
    y.EXP_TABLE[E] = 1 << E;
  }
  for (E = 8; E < 256; E++) {
    y.EXP_TABLE[E] = y.EXP_TABLE[E - 4] ^ y.EXP_TABLE[E - 5] ^ y.EXP_TABLE[E - 6] ^ y.EXP_TABLE[E - 8];
  }
  for (E = 0; E < 255; E++) {
    y.LOG_TABLE[y.EXP_TABLE[E]] = E;
  }
  function A(t, e) {
    if (void 0 == t.length) throw new Error(t.length + "/" + e);
    for (var r = 0; r < t.length && 0 == t[r];) {
      r++;
    }
    this.num = new Array(t.length - r + e);
    for (var o = 0; o < t.length - r; o++) {
      this.num[o] = t[o + r];
    }
  }
  function _(t, e) {
    this.totalCount = t, this.dataCount = e;
  }
  function D() {
    this.buffer = new Array(), this.length = 0;
  }
  return A.prototype = {
    get: function get(t) {
      return this.num[t];
    },
    getLength: function getLength() {
      return this.num.length;
    },
    multiply: function multiply(t) {
      for (var e = new Array(this.getLength() + t.getLength() - 1), r = 0; r < this.getLength(); r++) {
        for (var o = 0; o < t.getLength(); o++) {
          e[r + o] ^= y.gexp(y.glog(this.get(r)) + y.glog(t.get(o)));
        }
      }
      return new A(e, 0);
    },
    mod: function mod(t) {
      if (this.getLength() - t.getLength() < 0) return this;
      for (var e = y.glog(this.get(0)) - y.glog(t.get(0)), r = new Array(this.getLength()), o = 0; o < this.getLength(); o++) {
        r[o] = this.get(o);
      }
      for (o = 0; o < t.getLength(); o++) {
        r[o] ^= y.gexp(y.glog(t.get(o)) + e);
      }
      return new A(r, 0).mod(t);
    }
  }, _.RS_BLOCK_TABLE = [[1, 26, 19], [1, 26, 16], [1, 26, 13], [1, 26, 9], [1, 44, 34], [1, 44, 28], [1, 44, 22], [1, 44, 16], [1, 70, 55], [1, 70, 44], [2, 35, 17], [2, 35, 13], [1, 100, 80], [2, 50, 32], [2, 50, 24], [4, 25, 9], [1, 134, 108], [2, 67, 43], [2, 33, 15, 2, 34, 16], [2, 33, 11, 2, 34, 12], [2, 86, 68], [4, 43, 27], [4, 43, 19], [4, 43, 15], [2, 98, 78], [4, 49, 31], [2, 32, 14, 4, 33, 15], [4, 39, 13, 1, 40, 14], [2, 121, 97], [2, 60, 38, 2, 61, 39], [4, 40, 18, 2, 41, 19], [4, 40, 14, 2, 41, 15], [2, 146, 116], [3, 58, 36, 2, 59, 37], [4, 36, 16, 4, 37, 17], [4, 36, 12, 4, 37, 13], [2, 86, 68, 2, 87, 69], [4, 69, 43, 1, 70, 44], [6, 43, 19, 2, 44, 20], [6, 43, 15, 2, 44, 16], [4, 101, 81], [1, 80, 50, 4, 81, 51], [4, 50, 22, 4, 51, 23], [3, 36, 12, 8, 37, 13], [2, 116, 92, 2, 117, 93], [6, 58, 36, 2, 59, 37], [4, 46, 20, 6, 47, 21], [7, 42, 14, 4, 43, 15], [4, 133, 107], [8, 59, 37, 1, 60, 38], [8, 44, 20, 4, 45, 21], [12, 33, 11, 4, 34, 12], [3, 145, 115, 1, 146, 116], [4, 64, 40, 5, 65, 41], [11, 36, 16, 5, 37, 17], [11, 36, 12, 5, 37, 13], [5, 109, 87, 1, 110, 88], [5, 65, 41, 5, 66, 42], [5, 54, 24, 7, 55, 25], [11, 36, 12], [5, 122, 98, 1, 123, 99], [7, 73, 45, 3, 74, 46], [15, 43, 19, 2, 44, 20], [3, 45, 15, 13, 46, 16], [1, 135, 107, 5, 136, 108], [10, 74, 46, 1, 75, 47], [1, 50, 22, 15, 51, 23], [2, 42, 14, 17, 43, 15], [5, 150, 120, 1, 151, 121], [9, 69, 43, 4, 70, 44], [17, 50, 22, 1, 51, 23], [2, 42, 14, 19, 43, 15], [3, 141, 113, 4, 142, 114], [3, 70, 44, 11, 71, 45], [17, 47, 21, 4, 48, 22], [9, 39, 13, 16, 40, 14], [3, 135, 107, 5, 136, 108], [3, 67, 41, 13, 68, 42], [15, 54, 24, 5, 55, 25], [15, 43, 15, 10, 44, 16], [4, 144, 116, 4, 145, 117], [17, 68, 42], [17, 50, 22, 6, 51, 23], [19, 46, 16, 6, 47, 17], [2, 139, 111, 7, 140, 112], [17, 74, 46], [7, 54, 24, 16, 55, 25], [34, 37, 13], [4, 151, 121, 5, 152, 122], [4, 75, 47, 14, 76, 48], [11, 54, 24, 14, 55, 25], [16, 45, 15, 14, 46, 16], [6, 147, 117, 4, 148, 118], [6, 73, 45, 14, 74, 46], [11, 54, 24, 16, 55, 25], [30, 46, 16, 2, 47, 17], [8, 132, 106, 4, 133, 107], [8, 75, 47, 13, 76, 48], [7, 54, 24, 22, 55, 25], [22, 45, 15, 13, 46, 16], [10, 142, 114, 2, 143, 115], [19, 74, 46, 4, 75, 47], [28, 50, 22, 6, 51, 23], [33, 46, 16, 4, 47, 17], [8, 152, 122, 4, 153, 123], [22, 73, 45, 3, 74, 46], [8, 53, 23, 26, 54, 24], [12, 45, 15, 28, 46, 16], [3, 147, 117, 10, 148, 118], [3, 73, 45, 23, 74, 46], [4, 54, 24, 31, 55, 25], [11, 45, 15, 31, 46, 16], [7, 146, 116, 7, 147, 117], [21, 73, 45, 7, 74, 46], [1, 53, 23, 37, 54, 24], [19, 45, 15, 26, 46, 16], [5, 145, 115, 10, 146, 116], [19, 75, 47, 10, 76, 48], [15, 54, 24, 25, 55, 25], [23, 45, 15, 25, 46, 16], [13, 145, 115, 3, 146, 116], [2, 74, 46, 29, 75, 47], [42, 54, 24, 1, 55, 25], [23, 45, 15, 28, 46, 16], [17, 145, 115], [10, 74, 46, 23, 75, 47], [10, 54, 24, 35, 55, 25], [19, 45, 15, 35, 46, 16], [17, 145, 115, 1, 146, 116], [14, 74, 46, 21, 75, 47], [29, 54, 24, 19, 55, 25], [11, 45, 15, 46, 46, 16], [13, 145, 115, 6, 146, 116], [14, 74, 46, 23, 75, 47], [44, 54, 24, 7, 55, 25], [59, 46, 16, 1, 47, 17], [12, 151, 121, 7, 152, 122], [12, 75, 47, 26, 76, 48], [39, 54, 24, 14, 55, 25], [22, 45, 15, 41, 46, 16], [6, 151, 121, 14, 152, 122], [6, 75, 47, 34, 76, 48], [46, 54, 24, 10, 55, 25], [2, 45, 15, 64, 46, 16], [17, 152, 122, 4, 153, 123], [29, 74, 46, 14, 75, 47], [49, 54, 24, 10, 55, 25], [24, 45, 15, 46, 46, 16], [4, 152, 122, 18, 153, 123], [13, 74, 46, 32, 75, 47], [48, 54, 24, 14, 55, 25], [42, 45, 15, 32, 46, 16], [20, 147, 117, 4, 148, 118], [40, 75, 47, 7, 76, 48], [43, 54, 24, 22, 55, 25], [10, 45, 15, 67, 46, 16], [19, 148, 118, 6, 149, 119], [18, 75, 47, 31, 76, 48], [34, 54, 24, 34, 55, 25], [20, 45, 15, 61, 46, 16]], _.getRSBlocks = function (t, e) {
    var r = _.getRsBlockTable(t, e);
    if (void 0 == r) throw new Error("bad rs block @ typeNumber:" + t + "/errorCorrectLevel:" + e);
    for (var o = r.length / 3, n = new Array(), i = 0; i < o; i++) {
      for (var a = r[3 * i + 0], u = r[3 * i + 1], s = r[3 * i + 2], h = 0; h < a; h++) {
        n.push(new _(u, s));
      }
    }
    return n;
  }, _.getRsBlockTable = function (t, e) {
    switch (e) {
      case g.L:
        return _.RS_BLOCK_TABLE[4 * (t - 1) + 0];
      case g.M:
        return _.RS_BLOCK_TABLE[4 * (t - 1) + 1];
      case g.Q:
        return _.RS_BLOCK_TABLE[4 * (t - 1) + 2];
      case g.H:
        return _.RS_BLOCK_TABLE[4 * (t - 1) + 3];
      default:
        return;
    }
  }, D.prototype = {
    get: function get(t) {
      var e = Math.floor(t / 8);
      return 1 == (this.buffer[e] >>> 7 - t % 8 & 1);
    },
    put: function put(t, e) {
      for (var r = 0; r < e; r++) {
        this.putBit(1 == (t >>> e - r - 1 & 1));
      }
    },
    getLengthInBits: function getLengthInBits() {
      return this.length;
    },
    putBit: function putBit(t) {
      var e = Math.floor(this.length / 8);
      this.buffer.length <= e && this.buffer.push(0), t && (this.buffer[e] |= 128 >>> this.length % 8), this.length++;
    }
  }, function (t) {
    t = t || {}, (t = s(!0, {
      width: 256,
      height: 256,
      x: 0,
      y: 0,
      typeNumber: -1,
      correctLevel: g.H,
      background: "#ffffff",
      foreground: "#000000",
      image: {
        imageResource: "",
        dx: 0,
        dy: 0,
        dWidth: 100,
        dHeight: 100
      }
    }, t)).canvasId || t.ctx ? function () {
      var e,
        r = new l(t.typeNumber, t.correctLevel);
      r.addData(function (t) {
        var e, r, o, n;
        for (e = "", o = t.length, r = 0; r < o; r++) {
          (n = t.charCodeAt(r)) >= 1 && n <= 127 ? e += t.charAt(r) : n > 2047 ? (e += String.fromCharCode(224 | n >> 12 & 15), e += String.fromCharCode(128 | n >> 6 & 63), e += String.fromCharCode(128 | n >> 0 & 63)) : (e += String.fromCharCode(192 | n >> 6 & 31), e += String.fromCharCode(128 | n >> 0 & 63));
        }
        return e;
      }(t.text)), r.make(), e = t.ctx ? t.ctx : t._this ? wx.createCanvasContext && wx.createCanvasContext(t.canvasId, t._this) : wx.createCanvasContext && wx.createCanvasContext(t.canvasId);
      for (var o = t.width / r.getModuleCount(), n = t.height / r.getModuleCount(), i = 0; i < r.getModuleCount(); i++) {
        for (var a = 0; a < r.getModuleCount(); a++) {
          var u = r.isDark(i, a) ? t.foreground : t.background;
          e.setFillStyle(u);
          var s = Math.ceil((a + 1) * o) - Math.floor(a * o),
            h = Math.ceil((i + 1) * o) - Math.floor(i * o);
          e.fillRect(Math.round(a * o) + t.x, Math.round(i * n) + t.y, s, h);
        }
      }
      t.image.imageResource && e.drawImage(t.image.imageResource, t.image.dx, t.image.dy, t.image.dWidth, t.image.dHeight), e.draw(!1, function (e) {
        t.callback && t.callback(e);
      });
    }() : console.warn("please set canvasId or ctx!");
  };
});
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"]))

/***/ })

}]);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pagesB/common/vendor.js.map