main.js 29.6 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030
global.webpackJsonp([1],{

/***/ 229:
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});

var _vue = __webpack_require__(1);

var _vue2 = _interopRequireDefault(_vue);

var _index = __webpack_require__(230);

var _index2 = _interopRequireDefault(_index);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var app = new _vue2.default(_index2.default);
app.$mount();

exports.default = {
  config: {
    navigationBarTitleText: '我的'
  }
};

/***/ }),

/***/ 230:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_mpvue_loader_lib_selector_type_script_index_0_index_vue__ = __webpack_require__(232);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_mpvue_loader_lib_selector_type_script_index_0_index_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_mpvue_loader_lib_selector_type_script_index_0_index_vue__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_mpvue_loader_lib_template_compiler_index_id_data_v_19b6815e_hasScoped_true_transformToRequire_video_src_source_src_img_src_image_xlink_href_node_modules_mpvue_loader_lib_selector_type_template_index_0_index_vue__ = __webpack_require__(242);
var disposed = false
function injectStyle (ssrContext) {
  if (disposed) return
  __webpack_require__(231)
}
var normalizeComponent = __webpack_require__(0)
/* script */

/* template */

/* styles */
var __vue_styles__ = injectStyle
/* scopeId */
var __vue_scopeId__ = "data-v-19b6815e"
/* moduleIdentifier (server only) */
var __vue_module_identifier__ = null
var Component = normalizeComponent(
  __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_mpvue_loader_lib_selector_type_script_index_0_index_vue___default.a,
  __WEBPACK_IMPORTED_MODULE_1__node_modules_mpvue_loader_lib_template_compiler_index_id_data_v_19b6815e_hasScoped_true_transformToRequire_video_src_source_src_img_src_image_xlink_href_node_modules_mpvue_loader_lib_selector_type_template_index_0_index_vue__["a" /* default */],
  __vue_styles__,
  __vue_scopeId__,
  __vue_module_identifier__
)
Component.options.__file = "src\\pages\\me\\index.vue"
if (Component.esModule && Object.keys(Component.esModule).some(function (key) {return key !== "default" && key.substr(0, 2) !== "__"})) {console.error("named exports are not supported in *.vue files.")}
if (Component.options.functional) {console.error("[vue-loader] index.vue: functional components are not supported with templates, they should use render functions.")}

/* hot reload */
if (false) {(function () {
  var hotAPI = require("vue-hot-reload-api")
  hotAPI.install(require("vue"), false)
  if (!hotAPI.compatible) return
  module.hot.accept()
  if (!module.hot.data) {
    hotAPI.createRecord("data-v-19b6815e", Component.options)
  } else {
    hotAPI.reload("data-v-19b6815e", Component.options)
  }
  module.hot.dispose(function (data) {
    disposed = true
  })
})()}

/* harmony default export */ __webpack_exports__["default"] = (Component.exports);


/***/ }),

/***/ 231:
/***/ (function(module, exports) {

// removed by extract-text-webpack-plugin

/***/ }),

/***/ 232:
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});

var _AvatarUpload = __webpack_require__(233);

var _AvatarUpload2 = _interopRequireDefault(_AvatarUpload);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

exports.default = {
  components: {
    AvatarUpload: _AvatarUpload2.default
  },
  data: function data() {
    return {
      userInfo: {},
      link_list: [{ title: '我的消息', url: 'mynews', tips: '1' }, { title: '我的回复', url: 'myreply', tips: '0' }, { title: '我的评价', url: 'myassess', tips: '0' }, { title: '我的讲座', url: 'mylecture', tips: '0' }, { title: '考勤记录', url: 'attence', tips: '0' }, { title: '值班证明', url: 'prove', tips: '0' }, { title: '值班调班', url: 'schedule', tips: '0' }, { title: '意见反馈', url: 'feedback', tips: '0'
        // { title: '社区定位', url: 'test' },
        // { title: '获赞数', url: 'like' }
      }],
      vertified: false,
      AvatarChanging: false,
      uploading: false,
      hasMessage: false,
      number: ''
    };
  },

  methods: {
    tapAvatar: function tapAvatar() {
      var _this = this;

      if (this.uploading) return;
      wx.showActionSheet({
        itemList: ['查看头像', '更换头像'],
        success: function success(res) {
          if (res.tapIndex === 0) wx.previewImage({ urls: [_this.userInfo.avatarUrl] });else _this.changeAvatar();
        }
      });
      wx.setStorageSync('UploadAvatar_Tip_Showed', 3);
    },
    unVerify: function unVerify() {
      var _this2 = this;

      wx.showModal({
        title: '重置确认',
        content: '确定要重置吗?',
        success: function success(res) {
          if (res.confirm) {
            wx.request({
              url: _this2.rootUrl + '/law/wxbinding',
              header: { 'content-type': 'application/x-www-form-urlencoded' },
              method: 'POST',
              data: { sessionID: wx.getStorageSync('sessionID') },
              success: function success(res) {
                if (res.statusCode == '500') {
                  _this2.service.getUnionId(_this2.rootAvatar, _this2.rootUrl).then(function (res) {
                    _this2.unVerify();
                  });
                } else {
                  if (res.data.status === '200') {
                    wx.setStorageSync('isVerify', false);
                    wx.removeStorageSync('userInfo');
                    _this2.refreshInfo();
                    wx.showModal({
                      title: '',
                      content: '当前账号没有绑定律师,请认证为律师',
                      showCancel: false,
                      success: function success() {
                        return wx.redirectTo({ url: '../verify/main' });
                      }
                    });
                  } else {
                    wx.showToast({ title: '解绑失败', icon: 'none' });
                  }
                }
              },
              fail: function fail(res) {
                return wx.showToast({ title: '网络错误', icon: 'none' });
              }
            });
          }
        }
      });
    },
    refreshInfo: function refreshInfo() {
      this.vertified = wx.getStorageSync('isVerify');
      this.userInfo = wx.getStorageSync(this.vertified ? 'userInfo' : 'wxInfo');
    },
    canIGetPos: function canIGetPos() {
      var _this3 = this;

      wx.request({
        url: this.rootUrl + '/law/position',
        success: function success(res) {
          console.log(res);
          console.log(_this3.link_list);
          var link_list = _this3.link_list;
          if (res.data === 0) {
            if (link_list.length > 8) _this3.link_list = _this3.link_list.slice(0, 5);
          } else {
            if (link_list.length < 9) _this3.link_list.push({ title: '社区定位', url: 'test' });
          }
        }
      });
    },
    changeAvatar: function changeAvatar() {
      var _this4 = this;

      wx.chooseImage({
        count: 1,
        sizeType: ['compressed'],
        sourceType: ['album', 'camera'],
        success: function success(res) {
          _this4.AvatarChanging = true;
          wx.hideTabBar();
          _this4.$refs.AvatarUpload.setInitialImg(res.tempFilePaths[0]);
        }
      });
    },
    exit: function exit() {
      this.AvatarChanging = false;
      wx.showTabBar();
    },
    uploadImg: function uploadImg(src) {
      var _this5 = this;

      wx.showModal({
        title: '',
        content: '确认上传新的头像吗?',
        success: function success(res) {
          if (res.confirm) {
            _this5.$refs.AvatarUpload.startWaiting();
            _this5.uploadImg_exec(src);
          }
        }
      });
    },
    uploadImg_exec: function uploadImg_exec(src) {
      var _this6 = this;

      this.uploading = true;
      console.log(src);
      wx.showLoading({ title: '正在上传' });
      wx.uploadFile({
        url: this.rootUrl + 'law/lawyerpic',
        filePath: src,
        formData: { sessionID: wx.getStorageSync('sessionID') },
        name: 'file',
        header: { 'content-type': 'multipart/form-data' },
        success: function success(res) {
          if (new RegExp(/^Maximum upload size exceeded.*?/).test(JSON.parse(res.data).message)) {
            console.log('图片文件过大');
            wx.hideLoading();
            wx.showModal({ title: '上传失败', content: '图片文件过大,请选择较小的图片上传' });
            _this6.$refs.AvatarUpload.stopWaiting();
            _this6.$refs.AvatarUpload.back();
            _this6.uploading = false;
          } else if (res.statusCode == '500') _this6.service.getUnionId(_this6.rootAvatar, _this6.rootUrl).then(function () {
            return _this6.uploadImg_exec(src);
          });else if (res.data == 1) {
            console.log('图片上传成功');
            wx.hideLoading();
            wx.showToast({ title: '上传成功' });
            _this6.service.getUnionId(_this6.rootAvatar, _this6.rootUrl).then(function () {
              _this6.refreshInfo();
              _this6.uploading = false;
              _this6.exit();
              _this6.$refs.AvatarUpload.clear();
            });
          } else {
            console.log('图片上传失败');
            wx.hideLoading();
            wx.showToast({ title: '上传失败' });
            _this6.$refs.AvatarUpload.stopWaiting();
            _this6.$refs.AvatarUpload.back();
            _this6.uploading = false;
          }
        }
      });
    },
    checkTip: function checkTip() {
      var num = wx.getStorageSync('UploadAvatar_Tip_Showed') || 1;
      if (num < 3) wx.showModal({
        title: '提示',
        content: '点击头像可进行修改或查看',
        showCancel: false,
        confirmText: '知道了',
        success: function success(res) {
          if (res.confirm) wx.setStorageSync('UploadAvatar_Tip_Showed', num + 1);
        }
      });
    },
    getLawMessage: function getLawMessage() {
      var _this7 = this;

      wx.request({
        url: this.rootUrl + 'message/getUnReadMessage',
        method: 'get',
        data: { sessionID: wx.getStorageSync('sessionID') },
        success: function success(res) {
          if (res.data > 0) {
            _this7.number = res.data;
            console.log(_this7.number);
          } else {
            _this7.number = '';
          }
        }
      });
    }
  },
  onLoad: function onLoad() {
    this.getLawMessage();
  },
  onShow: function onShow() {
    this.refreshInfo();
    this.canIGetPos();
    this.checkTip();
    this.getLawMessage();
  },
  onUnload: function onUnload() {
    this.number = '';
  }
}; //
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//

/***/ }),

/***/ 233:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_mpvue_loader_lib_selector_type_script_index_0_AvatarUpload_vue__ = __webpack_require__(235);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_mpvue_loader_lib_selector_type_script_index_0_AvatarUpload_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_mpvue_loader_lib_selector_type_script_index_0_AvatarUpload_vue__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_mpvue_loader_lib_template_compiler_index_id_data_v_2130ebea_hasScoped_true_transformToRequire_video_src_source_src_img_src_image_xlink_href_node_modules_mpvue_loader_lib_selector_type_template_index_0_AvatarUpload_vue__ = __webpack_require__(241);
var disposed = false
function injectStyle (ssrContext) {
  if (disposed) return
  __webpack_require__(234)
}
var normalizeComponent = __webpack_require__(0)
/* script */

/* template */

/* styles */
var __vue_styles__ = injectStyle
/* scopeId */
var __vue_scopeId__ = "data-v-2130ebea"
/* moduleIdentifier (server only) */
var __vue_module_identifier__ = null
var Component = normalizeComponent(
  __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_mpvue_loader_lib_selector_type_script_index_0_AvatarUpload_vue___default.a,
  __WEBPACK_IMPORTED_MODULE_1__node_modules_mpvue_loader_lib_template_compiler_index_id_data_v_2130ebea_hasScoped_true_transformToRequire_video_src_source_src_img_src_image_xlink_href_node_modules_mpvue_loader_lib_selector_type_template_index_0_AvatarUpload_vue__["a" /* default */],
  __vue_styles__,
  __vue_scopeId__,
  __vue_module_identifier__
)
Component.options.__file = "src\\components\\AvatarUpload.vue"
if (Component.esModule && Object.keys(Component.esModule).some(function (key) {return key !== "default" && key.substr(0, 2) !== "__"})) {console.error("named exports are not supported in *.vue files.")}
if (Component.options.functional) {console.error("[vue-loader] AvatarUpload.vue: functional components are not supported with templates, they should use render functions.")}

/* hot reload */
if (false) {(function () {
  var hotAPI = require("vue-hot-reload-api")
  hotAPI.install(require("vue"), false)
  if (!hotAPI.compatible) return
  module.hot.accept()
  if (!module.hot.data) {
    hotAPI.createRecord("data-v-2130ebea", Component.options)
  } else {
    hotAPI.reload("data-v-2130ebea", Component.options)
  }
  module.hot.dispose(function (data) {
    disposed = true
  })
})()}

/* harmony default export */ __webpack_exports__["default"] = (Component.exports);


/***/ }),

/***/ 234:
/***/ (function(module, exports) {

// removed by extract-text-webpack-plugin

/***/ }),

/***/ 235:
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});

var _mpvueCropper = __webpack_require__(236);

var _mpvueCropper2 = _interopRequireDefault(_mpvueCropper);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var wecropper = void 0; //
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//

var device = wx.getSystemInfoSync();
var width = device.windowWidth;
var height = 0;
var mbbc = void 0;
try {
  mbbc = wx.getMenuButtonBoundingClientRect() ? wx.getMenuButtonBoundingClientRect() : null;
  if (!mbbc) {
    throw new Error('getMenuButtonBoundingClientRect error');
  } else {
    height = device.windowHeight - 10 - (mbbc.bottom + mbbc.top - device.statusBarHeight);
  }
} catch (e) {
  height = device.windowHeight - 10 - 44;
}
var originSrc = '';
var currentSrc = '';

exports.default = {
  props: { show: { default: false } },
  data: function data() {
    return {
      cropperOpt: {
        id: 'cropper',
        targetId: 'targetCropper',
        pixelRatio: device.pixelRatio,
        width: width,
        height: height,
        scale: 2.5,
        zoom: 8,
        cut: {
          x: (width - 300) / 2,
          y: (height - 300) / 2,
          width: 300,
          height: 300
        },
        boundStyle: {
          color: '#04b00f',
          mask: 'rgba(0,0,0,.8)',
          lineWidth: 1
        }
      },
      readyToConfirm: false,
      waiting: false
    };
  },


  components: {
    MpvueCropper: _mpvueCropper2.default
  },

  methods: {
    cropperBeforeImageLoad: function cropperBeforeImageLoad() {
      console.log('before image load');
      wx.hideLoading();
    },
    cropperLoad: function cropperLoad() {
      console.log('image loaded');
    },
    setInitialImg: function setInitialImg(src) {
      originSrc = src;
      wecropper.pushOrigin(src);
    },
    uploadTap: function uploadTap() {
      var _this = this;

      this.waiting = true;
      wx.showLoading({ title: '正在加载' });
      wx.chooseImage({
        count: 1,
        sizeType: ['compressed'],
        sourceType: ['album', 'camera'],
        success: function success(res) {
          originSrc = res.tempFilePaths[0];
          wecropper.pushOrigin(originSrc);
          _this.waiting = false;
          wx.hideLoading();
        },
        fail: function fail(err) {
          _this.waiting = false;
          wx.hideLoading();
        }
      });
    },
    back: function back() {
      wecropper.pushOrigin(originSrc);
      this.readyToConfirm = false;
      this.waiting = false;
      wecropper.allowTouchmove();
    },
    preview: function preview() {
      var _this2 = this;

      this.waiting = true;
      wx.showLoading({ title: '正在生成' });
      wecropper.getCropperImage(function (tempFilePath) {
        console.log(tempFilePath);
        // tempFilePath 为裁剪后的图片临时路径
        if (tempFilePath) {
          // wx.previewImage({
          //   current: '',
          //   urls: [tempFilePath]
          // })
          wecropper.pushOrigin(tempFilePath);
          _this2.readyToConfirm = true;
          currentSrc = tempFilePath;
          _this2.waiting = false;
        } else {
          console.log('获取图片地址失败,请稍后重试');
        }
      });
    },
    confirm: function confirm() {
      this.$emit('confirm', currentSrc);
    },
    exit: function exit() {
      this.$emit('exit');
      this.clear();
    },
    startWaiting: function startWaiting() {
      this.waiting = true;
    },
    stopWaiting: function stopWaiting() {
      this.waiting = false;
    },
    clear: function clear() {
      originSrc = '';
      currentSrc = '';
      this.readyToConfirm = false;
      this.waiting = false;
      wecropper.allowTouchmove();
    }
  },
  mounted: function mounted() {
    wecropper = this.$refs.cropper;
  }
};

/***/ }),

/***/ 236:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_mpvue_loader_lib_selector_type_script_index_0_mpvue_cropper_vue__ = __webpack_require__(238);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_mpvue_loader_lib_selector_type_script_index_0_mpvue_cropper_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_mpvue_loader_lib_selector_type_script_index_0_mpvue_cropper_vue__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__mpvue_loader_lib_template_compiler_index_id_data_v_61c7c43f_hasScoped_false_transformToRequire_video_src_source_src_img_src_image_xlink_href_mpvue_loader_lib_selector_type_template_index_0_mpvue_cropper_vue__ = __webpack_require__(240);
var disposed = false
function injectStyle (ssrContext) {
  if (disposed) return
  __webpack_require__(237)
}
var normalizeComponent = __webpack_require__(0)
/* script */

/* template */

/* styles */
var __vue_styles__ = injectStyle
/* scopeId */
var __vue_scopeId__ = null
/* moduleIdentifier (server only) */
var __vue_module_identifier__ = null
var Component = normalizeComponent(
  __WEBPACK_IMPORTED_MODULE_0__babel_loader_mpvue_loader_lib_selector_type_script_index_0_mpvue_cropper_vue___default.a,
  __WEBPACK_IMPORTED_MODULE_1__mpvue_loader_lib_template_compiler_index_id_data_v_61c7c43f_hasScoped_false_transformToRequire_video_src_source_src_img_src_image_xlink_href_mpvue_loader_lib_selector_type_template_index_0_mpvue_cropper_vue__["a" /* default */],
  __vue_styles__,
  __vue_scopeId__,
  __vue_module_identifier__
)
Component.options.__file = "node_modules\\mpvue-cropper\\mpvue-cropper.vue"
if (Component.esModule && Object.keys(Component.esModule).some(function (key) {return key !== "default" && key.substr(0, 2) !== "__"})) {console.error("named exports are not supported in *.vue files.")}
if (Component.options.functional) {console.error("[vue-loader] mpvue-cropper.vue: functional components are not supported with templates, they should use render functions.")}

/* hot reload */
if (false) {(function () {
  var hotAPI = require("vue-hot-reload-api")
  hotAPI.install(require("vue"), false)
  if (!hotAPI.compatible) return
  module.hot.accept()
  if (!module.hot.data) {
    hotAPI.createRecord("data-v-61c7c43f", Component.options)
  } else {
    hotAPI.reload("data-v-61c7c43f", Component.options)
  }
  module.hot.dispose(function (data) {
    disposed = true
  })
})()}

/* harmony default export */ __webpack_exports__["default"] = (Component.exports);


/***/ }),

/***/ 237:
/***/ (function(module, exports) {

// removed by extract-text-webpack-plugin

/***/ }),

/***/ 238:
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});

var _assign = __webpack_require__(37);

var _assign2 = _interopRequireDefault(_assign);

var _weCropper = __webpack_require__(239);

var _weCropper2 = _interopRequireDefault(_weCropper);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

exports.default = {
  name: 'mpvue-cropper',
  props: {
    option: {
      type: Object
    }
  },
  data: function data() {
    return {
      _wecropper: null
    };
  },

  computed: {
    _canvasId: function _canvasId() {
      return this.option.id;
    },
    _targetId: function _targetId() {
      return this.option.targetId;
    },
    _width: function _width() {
      return this.option.width;
    },
    _height: function _height() {
      return this.option.height;
    },
    _pixelRatio: function _pixelRatio() {
      return this.option.pixelRatio;
    }
  },
  methods: {
    touchstart: function touchstart($event) {
      this._wecropper.touchStart($event.mp);
    },
    touchmove: function touchmove($event) {
      this._wecropper.touchMove($event.mp);
    },
    touchend: function touchend($event) {
      this._wecropper.touchEnd($event.mp);
    },
    pushOrigin: function pushOrigin(src) {
      this._wecropper.pushOrign(src);
    },
    updateCanvas: function updateCanvas() {
      this._wecropper.updateCanvas();
    },
    getCropperBase64: function getCropperBase64(fn) {
      return this._wecropper.getCropperBase64(fn);
    },
    getCropperImage: function getCropperImage(opt, fn) {
      return this._wecropper.getCropperImage(opt, fn);
    },
    init: function init() {
      var _this = this;

      this._wecropper = new _weCropper2.default((0, _assign2.default)(this.option, {
        id: this._canvasId,
        targetId: this._targetId,
        pixelRatio: this._pixelRatio
      })).on('ready', function () {
        for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
          args[_key] = arguments[_key];
        }

        _this.$emit.apply(_this, ['ready'].concat(args));
      }).on('beforeImageLoad', function () {
        for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
          args[_key2] = arguments[_key2];
        }

        _this.$emit.apply(_this, ['beforeImageLoad'].concat(args));
      }).on('imageLoad', function () {
        for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
          args[_key3] = arguments[_key3];
        }

        _this.$emit.apply(_this, ['imageLoad'].concat(args));
      }).on('beforeDraw', function () {
        for (var _len4 = arguments.length, args = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
          args[_key4] = arguments[_key4];
        }

        _this.$emit.apply(_this, ['beforeDraw'].concat(args));
      });
    }
  },
  onLoad: function onLoad() {
    if (!this.option) {
      return console.warn('[mpvue-cropper] 请传入option参数\n参数配置见文档:https://we-plugin.github.io/we-cropper/#/api');
    }
    this.init();
  }
}; //
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//

/***/ }),

/***/ 240:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;
  return _c('div', [(_vm._canvasId) ? _c('canvas', {
    style: ({
      width: _vm._width + 'px',
      height: _vm._height + 'px',
      background: 'rgba(0, 0, 0, .8)'
    }),
    attrs: {
      "canvasId": _vm._canvasId,
      "disable-scroll": "",
      "eventid": '0'
    },
    on: {
      "touchstart": _vm.touchstart,
      "touchmove": _vm.touchmove,
      "touchend": _vm.touchend
    }
  }) : _vm._e(), _vm._v(" "), (_vm._targetId) ? _c('canvas', {
    style: ({
      position: 'fixed',
      top: -_vm._width * _vm._pixelRatio + 'px',
      left: -_vm._height * _vm._pixelRatio + 'px',
      width: _vm._width * _vm._pixelRatio + 'px',
      height: _vm._height * _vm._pixelRatio + 'px'
    }),
    attrs: {
      "canvas-id": _vm._targetId,
      "disable-scroll": ""
    }
  }) : _vm._e()])
}
var staticRenderFns = []
render._withStripped = true
var esExports = { render: render, staticRenderFns: staticRenderFns }
/* harmony default export */ __webpack_exports__["a"] = (esExports);
if (false) {
  module.hot.accept()
  if (module.hot.data) {
     require("vue-hot-reload-api").rerender("data-v-61c7c43f", esExports)
  }
}

/***/ }),

/***/ 241:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;
  return _c('div', {
    staticClass: "container",
    class: {
      hide: !_vm.show
    }
  }, [_c('mpvue-cropper', {
    ref: "cropper",
    attrs: {
      "option": _vm.cropperOpt,
      "eventid": '0',
      "mpcomid": '0'
    },
    on: {
      "ready": _vm.cropperReady,
      "beforeDraw": _vm.cropperBeforeDraw,
      "beforeImageLoad": _vm.cropperBeforeImageLoad,
      "beforeLoad": _vm.cropperLoad
    }
  }), _vm._v(" "), _c('div', {
    staticClass: "cropper-buttons"
  }, [(!_vm.readyToConfirm) ? _c('button', {
    attrs: {
      "disabled": _vm.waiting,
      "type": "warn",
      "eventid": '1'
    },
    on: {
      "tap": _vm.exit
    }
  }, [_vm._v("退出")]) : _vm._e(), _vm._v(" "), (_vm.readyToConfirm) ? _c('button', {
    attrs: {
      "disabled": _vm.waiting,
      "type": "primary",
      "eventid": '3'
    },
    on: {
      "tap": _vm.back
    }
  }, [_vm._v("返回")]) : _c('button', {
    attrs: {
      "disabled": _vm.waiting,
      "type": "primary",
      "eventid": '2'
    },
    on: {
      "tap": _vm.uploadTap
    }
  }, [_vm._v("重新上传")]), _vm._v(" "), (_vm.readyToConfirm) ? _c('button', {
    attrs: {
      "disabled": _vm.waiting,
      "type": "warn",
      "eventid": '5'
    },
    on: {
      "tap": _vm.confirm
    }
  }, [_vm._v("上传头像")]) : _c('button', {
    attrs: {
      "disabled": _vm.waiting,
      "type": "primary",
      "eventid": '4'
    },
    on: {
      "tap": _vm.preview
    }
  }, [_vm._v("确认")])], 1)], 1)
}
var staticRenderFns = []
render._withStripped = true
var esExports = { render: render, staticRenderFns: staticRenderFns }
/* harmony default export */ __webpack_exports__["a"] = (esExports);
if (false) {
  module.hot.accept()
  if (module.hot.data) {
     require("vue-hot-reload-api").rerender("data-v-2130ebea", esExports)
  }
}

/***/ }),

/***/ 242:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;
  return _c('div', {
    staticClass: "me"
  }, [_c('div', {
    staticClass: "head"
  }, [_c('div', {
    staticClass: "img"
  }, [_c('img', {
    staticClass: "photo",
    attrs: {
      "src": _vm.userInfo.avatarUrl,
      "mode": "aspectFill",
      "eventid": '0'
    },
    on: {
      "tap": _vm.tapAvatar
    }
  }), _vm._v(" "), (_vm.vertified) ? _c('img', {
    staticClass: "vip",
    attrs: {
      "src": "/static/imgs/V.png"
    }
  }) : _vm._e()]), _vm._v(" "), _c('div', {
    staticClass: "name"
  }, [_vm._v(_vm._s(_vm.userInfo.nickName))]), _vm._v(" "), _c('div', {
    staticClass: "info"
  }, [_vm._v(_vm._s('' || _vm.userInfo.firm_name))]), _vm._v(" "), _c('div', {
    staticClass: "info",
    staticStyle: {
      "padding": "0 30rpx",
      "text-align": "center"
    }
  }, [_vm._v(_vm._s('' || _vm.userInfo.cate_name))])]), _vm._v(" "), _c('div', _vm._l((_vm.link_list), function(item, i) {
    return _c('navigator', {
      key: i,
      staticClass: "nav-item",
      attrs: {
        "url": '../' + item.url + '/main',
        "hover-class": "hover"
      }
    }, [_c('img', {
      class: item.url,
      attrs: {
        "src": '/static/imgs/' + item.url + '.png'
      }
    }), _vm._v("\r\n    " + _vm._s(item.title) + "\r\n    "), _c('div', {
      staticClass: "arrow"
    }), _vm._v(" "), (item.tips == 1) ? _c('span', {
      staticClass: "tips"
    }, [_vm._v(_vm._s(_vm.number))]) : _vm._e()])
  })), _vm._v(" "), (_vm.vertified) ? _c('div', {
    staticClass: "reset verify"
  }, [_c('div', {
    attrs: {
      "eventid": '1'
    },
    on: {
      "tap": _vm.unVerify
    }
  }, [_vm._v("重置认证信息")])]) : _c('div', {
    staticClass: "verify"
  }, [_c('navigator', {
    attrs: {
      "url": "../verify/main"
    }
  }, [_vm._v("认证为律师")])], 1), _vm._v(" "), _c('AvatarUpload', {
    ref: "AvatarUpload",
    attrs: {
      "show": _vm.AvatarChanging,
      "eventid": '2',
      "mpcomid": '0'
    },
    on: {
      "exit": _vm.exit,
      "confirm": _vm.uploadImg
    }
  })], 1)
}
var staticRenderFns = []
render._withStripped = true
var esExports = { render: render, staticRenderFns: staticRenderFns }
/* harmony default export */ __webpack_exports__["a"] = (esExports);
if (false) {
  module.hot.accept()
  if (module.hot.data) {
     require("vue-hot-reload-api").rerender("data-v-19b6815e", esExports)
  }
}

/***/ })

},[229]);
//# sourceMappingURL=main.js.map