MrShi
2024-04-02 22271e641e4505ba906c3770905b7e84e3ad8d85
wx/unpackage/dist/dev/mp-weixin/pages/policyDetails/policyDetails.js
@@ -149,9 +149,12 @@
      _vm.show = true
    }
    _vm.e2 = function ($event) {
      _vm.show2 = true
      _vm.show = true
    }
    _vm.e3 = function ($event) {
      _vm.show2 = true
    }
    _vm.e4 = function ($event) {
      _vm.show2 = true
    }
  }
@@ -207,173 +210,10 @@
});
exports.default = void 0;
var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
var _vuex = __webpack_require__(/*! vuex */ 160);
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
var _default = {
  data: function data() {
    return {
@@ -384,9 +224,15 @@
      list: [],
      show: false,
      show1: false,
      show2: false
      show2: false,
      type: null,
      code: '',
      num: 0,
      error: false,
      timer: null
    };
  },
  computed: _objectSpread({}, (0, _vuex.mapState)(['userInfo'])),
  onLoad: function onLoad(options) {
    this.orderId = options.orderId;
    this.getDetails();
@@ -396,15 +242,48 @@
    this.applyDetailPage();
  },
  methods: {
    send: function send() {
      var _this = this;
      this.$u.api.sendSms({
        phone: this.userInfo.mobile
      }).then(function (res) {
        if (res.code === 200) {
          _this.num = 60;
          _this.setTime();
        }
      });
    },
    setTime: function setTime() {
      var _this2 = this;
      this.timer = setInterval(function () {
        if (_this2.num === 0) {
          clearInterval(_this2.timer);
          _this2.timer = null;
          return;
        }
        _this2.num = _this2.num - 1;
      }, 1000);
    },
    // 打开发送验证码弹窗
    openmessage: function openmessage(type) {
      this.code = '';
      clearInterval(this.timer);
      this.error = '';
      this.timer = null;
      this.num = 0;
      this.type = type;
      this.show1 = true;
    },
    signApplication: function signApplication() {
      uni.navigateTo({
        url: "/pages/webView/webView?url=https://web.sandbox.junziqian.com/signInfo/viewDetail?ts=1711966477502&signNo=SSN1774742154020143104&sign=GHW6wWRJfEZiXO-gXZwTezR5CYUvhwbmoWHlPsqUCLA"
      });
    },
    // 查看pdf
    seePdf: function seePdf() {
    seePdf: function seePdf(url) {
      if (!url) return;
      uni.downloadFile({
        url: this.info.toubaodanSignedFile.fileurlFull,
        url: url,
        success: function success(res) {
          var filePath = res.tempFilePath;
          uni.openDocument({
@@ -416,16 +295,16 @@
    },
    // 获取详情
    getDetails: function getDetails() {
      var _this = this;
      var _this3 = this;
      this.$u.api.insuranceApplyById(this.orderId).then(function (res) {
        if (res.code === 200) {
          _this.info = res.data;
          _this3.info = res.data;
        }
      });
    },
    // 获取在保人员
    applyDetailPage: function applyDetailPage() {
      var _this2 = this;
      var _this4 = this;
      if (this.next) return;
      this.$u.api.applyDetailPage({
        capacity: 10,
@@ -436,31 +315,12 @@
      }).then(function (res) {
        if (res.code === 200) {
          if (res.data.records && res.data.records.length > 0) {
            var _this2$list;
            _this2.page++;
            (_this2$list = _this2.list).push.apply(_this2$list, (0, _toConsumableArray2.default)(res.data.records));
            var _this4$list;
            _this4.page++;
            (_this4$list = _this4.list).push.apply(_this4$list, (0, _toConsumableArray2.default)(res.data.records));
          } else {
            _this2.next = true;
            _this4.next = true;
          }
        }
      });
    },
    open1: function open1() {
      uni.navigateToMiniProgram({
        appId: 'wxf7fd282cd119885f',
        // 要打开的小程序的appid
        path: 'pages/index/index',
        // 打开的页面路径,可选
        extraData: {
          // 需要传递给目标小程序的数据,可选
        },
        success: function success(res) {
          // 打开成功的回调,可选
          console.log('打开成功');
        },
        fail: function fail(err) {
          // 打开失败的回调,可选
          console.log('打开失败', err);
        }
      });
    },
@@ -477,15 +337,15 @@
      return age;
    },
    confirm: function confirm() {
      var _this3 = this;
      var _this5 = this;
      this.$u.api.applyOpt({
        applyId: this.info.id,
        optIllustration: '',
        optType: 1
      }).then(function (res) {
        if (res.code === 200) {
          _this3.getDetails();
          _this3.show = false;
          _this5.getDetails();
          _this5.show = false;
        }
      });
    },
@@ -493,20 +353,76 @@
      this.show = false;
    },
    confirm1: function confirm1() {
      this.show1 = false;
      var _this6 = this;
      if (!this.code) {
        this.error = 1;
        return;
      }
      // 签署投保单
      if (this.type === 1) {
        this.$u.api.validateCode({
          code: this.code
        }).then(function (res) {
          if (res.code === 200) {
            _this6.error = '';
            _this6.show1 = false;
            _this6.$u.api.getSignLink(_this6.info.id).then(function (url) {
              if (url.code === 200) {
                uni.navigateTo({
                  url: "/pages/webView/webView?url=".concat(url.data)
                });
              }
            });
          } else {
            _this6.error = 2;
          }
        });
        // 确认书
      } else if (this.type === 2) {
        this.$u.api.signTBQRSLink({
          businessId: this.info.id,
          code: this.code
        }).then(function (res) {
          if (res.code === 200) {
            _this6.error = '';
            _this6.show1 = false;
            uni.navigateTo({
              url: "/pages/webView/webView?url=".concat(res.data)
            });
          } else {
            _this6.error = 2;
          }
        });
        // 签署申请单
      } else if (this.type === 3) {
        this.$u.api.getMemberListOnlineSignLink({
          businessId: this.info.id,
          code: this.code
        }).then(function (res) {
          if (res.code === 200) {
            _this6.error = '';
            _this6.show1 = false;
            uni.navigateTo({
              url: "/pages/webView/webView?url=".concat(res.data)
            });
          } else {
            _this6.error = 2;
          }
        });
      }
    },
    cancel1: function cancel1() {
      this.show1 = false;
    },
    confirm2: function confirm2() {
      var _this4 = this;
      var _this7 = this;
      this.$u.api.applyOpt({
        applyId: this.info.id,
        optType: 2
      }).then(function (res) {
        if (res.code === 200) {
          _this4.show2 = false;
          _this4.getDetails();
          _this7.show2 = false;
          _this7.getDetails();
        }
      });
    },