jiangping
2024-05-07 529d0b8982cf30f57ba7e366c0f822c1d82c0b69
wx/unpackage/dist/dev/mp-weixin/pages/details_dispatch_unit/details_dispatch_unit.js
@@ -222,7 +222,8 @@
      code: '',
      num: 0,
      error: false,
      timer: null
      timer: null,
      loading: false
    };
  },
  onLoad: function onLoad(option) {
@@ -259,59 +260,65 @@
    // 签署
    confirm1: function confirm1() {
      var _this3 = this;
      if (!this.code) {
        this.error = 1;
        return;
      }
      // if (!this.code) {
      //    this.error = 1
      //    return
      // }
      this.loading = true;
      // 签署投保单
      if (this.type === 1) {
        this.$u.api.validateCode({
          code: this.code
        }).then(function (res) {
          if (res.code === 200) {
            _this3.error = '';
            _this3.show1 = false;
            // this.error = ''
            // this.show1 = false
            _this3.$u.api.getJiajianBaoSignLink({
              id: _this3.info.id
            }).then(function (url) {
              _this3.loading = false;
              if (url.code === 200) {
                uni.navigateTo({
                  url: "/pages/webView/webView?url=".concat(encodeURIComponent(url.data))
                });
              }
            });
          } else {
            _this3.error = 2;
          }
          //  else {
          //    this.error = 2
          // }
        });
        this.show1 = false;
        // this.show1 = false
        // 申请单
      } else if (this.type === 2) {
        this.$u.api.getChangeMemberListOnlineSignLink({
          businessId: this.info.id,
          code: this.code
        }).then(function (res) {
          _this3.loading = false;
          if (res.code === 200) {
            _this3.error = '';
            _this3.show1 = false;
            // this.error = ''
            // this.show1 = false
            uni.navigateTo({
              url: "/pages/webView/webView?url=".concat(encodeURIComponent(res.data))
            });
          } else {
            _this3.error = 2;
          }
          //  else {
          //    this.error = 2
          // }
        });
      }
    },
    // 打开发送验证码弹窗
    openmessage: function openmessage(type) {
      this.code = '';
      clearInterval(this.timer);
      this.error = '';
      this.timer = null;
      this.num = 0;
      // this.code = ''
      // clearInterval(this.timer)
      // this.error = ''
      // this.timer = null
      // this.num = 0
      this.type = type;
      this.show1 = true;
      this.confirm1();
      // this.show1 = true
    },
    // 查看pdf
    seePdf: function seePdf(url) {