jiangping
2023-12-29 f9691d544e62d6c04dbfe45d05a6c7bc5e004291
bicycle/unpackage/dist/dev/mp-weixin/pages/index/index.js
@@ -223,6 +223,9 @@
var _default = {
  data: function data() {
    return {
      disable: false,
      top: 0,
      title: '',
      latitude: null,
      longitude: null,
      bgImg: __webpack_require__(/*! @/static/images/bg_service@2x.png */ 169),
@@ -269,7 +272,7 @@
    };
  },
  computed: _objectSpread({}, (0, _vuex.mapState)(['navHeight', 'statusbarHeight', 'userInfo'])),
  onLoad: function onLoad() {
  onLoad: function onLoad(options) {
    var _this = this;
    return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
      return _regenerator.default.wrap(function _callee$(_context) {
@@ -283,10 +286,20 @@
              _context.next = 3;
              return _this.$onLaunched;
            case 3:
              _this.getAddress();
              _this.getHomeInfo();
              _this.getSite();
            case 6:
              _context.next = 5;
              return _this.getAddress();
            case 5:
              _context.next = 7;
              return _this.getHomeInfo();
            case 7:
              _context.next = 9;
              return _this.getSite();
            case 9:
              if (decodeURIComponent(options.scene) !== 'undefined') {
                console.log(decodeURIComponent(options.scene));
                _this.carRentalCopy(decodeURIComponent(options.scene));
              }
            case 10:
            case "end":
              return _context.stop();
          }
@@ -294,7 +307,124 @@
      }, _callee);
    }))();
  },
  onPageScroll: function onPageScroll(e) {
    this.top = e.scrollTop;
  },
  methods: {
    // 微信打开小程序开锁方法
    carRentalCopy: function carRentalCopy(code) {
      var _this2 = this;
      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
        var that, res, num, timer;
        return _regenerator.default.wrap(function _callee3$(_context3) {
          while (1) {
            switch (_context3.prev = _context3.next) {
              case 0:
                _context3.next = 2;
                return _this2.refresh();
              case 2:
                if (!(_this2.info.depositStatus === 0)) {
                  _context3.next = 7;
                  break;
                }
                _this2.show1 = true;
                return _context3.abrupt("return");
              case 7:
                if (!(_this2.info.depositStatus === 2)) {
                  _context3.next = 10;
                  break;
                }
                uni.showToast({
                  title: '结算申请提交成功,请耐心等待退款!',
                  icon: 'none',
                  duration: 2000
                });
                return _context3.abrupt("return");
              case 10:
                that = _this2;
                if (that.disable) {
                  _context3.next = 18;
                  break;
                }
                that.disable = true;
                // 打开开锁弹框
                that.show5 = true;
                // 调用开锁接口
                _context3.next = 16;
                return that.$u.api.openLock({
                  code: code
                });
              case 16:
                res = _context3.sent;
                if (res.code === 200) {
                  that.disable = false;
                  that.show6 = false;
                  that.show5 = true;
                  // 循环次数
                  num = 1; // 循环查看解锁结果
                  timer = setInterval( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
                    var res1;
                    return _regenerator.default.wrap(function _callee2$(_context2) {
                      while (1) {
                        switch (_context2.prev = _context2.next) {
                          case 0:
                            num += 1;
                            _context2.next = 3;
                            return that.$u.api.refreshLock({
                              id: res.data.id
                            });
                          case 3:
                            res1 = _context2.sent;
                            // 开锁成功
                            if (res1.data.status === 1) {
                              that.refresh();
                              clearInterval(timer);
                              that.show5 = false;
                              setTimeout(function () {
                                that.show2 = true;
                              }, 500);
                            }
                            // 开锁失败
                            if (res1.data.status === 3) {
                              that.refresh();
                              clearInterval(timer);
                              that.show5 = false;
                              uni.showToast({
                                title: '开锁失败',
                                icon: 'error',
                                duration: 2000
                              });
                            }
                            // 开锁超时
                            if (num === 180) {
                              that.refresh();
                              clearInterval(timer);
                              that.show5 = false;
                              uni.showToast({
                                title: '开锁超时',
                                icon: 'error',
                                duration: 2000
                              });
                            }
                          case 7:
                          case "end":
                            return _context2.stop();
                        }
                      }
                    }, _callee2);
                  })), 1000);
                } else {
                  that.show5 = false;
                  that.disable = false;
                }
              case 18:
              case "end":
                return _context3.stop();
            }
          }
        }, _callee3);
      }))();
    },
    jumpX: function jumpX() {
      uni.navigateTo({
        url: '/pages/leaseNotice/leaseNotice'
@@ -312,14 +442,14 @@
      });
    },
    getSite: function getSite() {
      var _this2 = this;
      var _this3 = this;
      this.$u.api.rentSiteList().then(function (res) {
        if (res.code === 200) {
          _this2.markers = [];
          _this3.markers = [];
          res.data.forEach(function (item, index) {
            _this2.markers.push({
            _this3.markers.push({
              id: index,
              width: 30,
              width: 40,
              height: 40,
              latitude: item.latitude,
              longitude: item.longitude,
@@ -333,31 +463,43 @@
    },
    // 结算
    settlement1: function settlement1() {
      var _this3 = this;
      var _this4 = this;
      if (this.isDisabled) {
        this.isDisabled = false;
        this.$u.api.goodsOrderSettlement({}).then(function (res) {
          if (res.code === 200) {
            _this3.refresh();
            _this4.show3 = false;
            _this4.show6 = false;
            _this4.show7 = false;
            uni.showToast({
              title: '结算成功!',
              icon: 'success',
              title: '结算申请提交成功,请耐心等待退款!',
              icon: 'none',
              duration: 2000
            });
            _this3.show3 = false;
            _this3.show7 = false;
            _this3.isDisabled = true;
            // this.refresh()
          }
        }).finally(function () {
          _this4.refresh();
          _this4.show3 = false;
          _this4.isDisabled = true;
        });
      }
    },
    minute: function minute() {
      this.show3 = false;
      if (this.info.rideStatus !== -1) {
      if (this.info.rideStatus != -1) {
        this.show6 = true;
      }
    },
    settlement: function settlement() {
      if (this.info.depositStatus === 2) {
        uni.showToast({
          title: '结算申请提交成功,请耐心等待退款!',
          icon: 'none',
          duration: 2000
        });
        return;
      }
      this.show6 = false;
      this.show3 = true;
    },
@@ -369,40 +511,119 @@
    },
    // 跳转
    jump: function jump(item) {
      if (item.id === 3) {
        uni.navigateTo({
          url: '/pages/pricingRules/pricingRules'
        });
      } else if (item.id === 4) {
        uni.navigateTo({
          url: '/pages/consumptionDetails/consumptionDetails'
        });
      } else if (item.id === 2) {
        if (this.info.depositStatus === 1) {
          this.show3 = true;
        } else {
          uni.showToast({
            title: '您暂无押金,无需结算!',
            icon: 'none',
            duration: 2000
          });
        }
      } else if (item.id === 1) {
        if (this.info.depositStatus === 1) {
          uni.showToast({
            title: '押金已充值',
            icon: 'none',
            duration: 2000
          });
          return;
        }
        this.show1 = true;
      }
      var _this5 = this;
      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
        return _regenerator.default.wrap(function _callee4$(_context4) {
          while (1) {
            switch (_context4.prev = _context4.next) {
              case 0:
                _context4.next = 2;
                return _this5.refresh();
              case 2:
                if (!(item.id === 3)) {
                  _context4.next = 6;
                  break;
                }
                uni.navigateTo({
                  url: '/pages/pricingRules/pricingRules'
                });
                _context4.next = 31;
                break;
              case 6:
                if (!(item.id === 4)) {
                  _context4.next = 10;
                  break;
                }
                uni.navigateTo({
                  url: '/pages/consumptionDetails/consumptionDetails'
                });
                _context4.next = 31;
                break;
              case 10:
                if (!(item.id === 2)) {
                  _context4.next = 19;
                  break;
                }
                if (_this5.userInfo.mobile) {
                  _context4.next = 13;
                  break;
                }
                return _context4.abrupt("return");
              case 13:
                if (!(_this5.info.rideStatus === 1)) {
                  _context4.next = 16;
                  break;
                }
                uni.showToast({
                  title: '骑行中不能结算押金',
                  icon: 'none',
                  duration: 2000
                });
                return _context4.abrupt("return");
              case 16:
                if (_this5.info.depositStatus === 1) {
                  _this5.show3 = true;
                } else if (_this5.info.depositStatus === 2) {
                  uni.showToast({
                    title: '结算申请提交成功,请耐心等待退款!',
                    icon: 'none',
                    duration: 2000
                  });
                } else {
                  uni.showToast({
                    title: '您暂无押金,无需结算!',
                    icon: 'none',
                    duration: 2000
                  });
                }
                _context4.next = 31;
                break;
              case 19:
                if (!(item.id === 1)) {
                  _context4.next = 31;
                  break;
                }
                if (_this5.userInfo.mobile) {
                  _context4.next = 22;
                  break;
                }
                return _context4.abrupt("return");
              case 22:
                if (!(_this5.info.depositStatus === 1)) {
                  _context4.next = 27;
                  break;
                }
                uni.showToast({
                  title: '押金已充值',
                  icon: 'none',
                  duration: 2000
                });
                return _context4.abrupt("return");
              case 27:
                if (!(_this5.info.depositStatus === 2)) {
                  _context4.next = 30;
                  break;
                }
                uni.showToast({
                  title: '结算申请提交成功,请耐心等待退款!',
                  icon: 'none',
                  duration: 2000
                });
                return _context4.abrupt("return");
              case 30:
                _this5.show1 = true;
              case 31:
              case "end":
                return _context4.stop();
            }
          }
        }, _callee4);
      }))();
    },
    // 骑行明细
    toRidingDetails: function toRidingDetails() {
      uni.navigateTo({
        url: "/pages/ridingDetails/ridingDetails?id=".concat(this.info.goodsOrderId)
        url: "/pages/ridingDetails/ridingDetails?id=".concat(this.info.goodsOrderId, "&price=").concat(this.info.deposit / 100)
      });
    },
    // 跳转故障上报
@@ -413,35 +634,43 @@
    },
    // 押金支付
    depositPayment: function depositPayment() {
      var that = this;
      if (this.active) {
        var that = this;
        this.$u.api.createGoodsOrderPay().then(function (res) {
          if (res.code === 200) {
            wx.requestPayment({
              timeStamp: res.data.timeStamp,
              nonceStr: res.data.nonceStr,
              package: res.data.packageValue,
              signType: 'MD5',
              paySign: res.data.paySign,
              success: function success(res) {
                if (res.errMsg = 'requestPayment:ok') {
                  that.show1 = false;
                  that.info.depositStatus = 1;
                  that.carRental();
                  that.refresh();
                  uni.showToast({
                    title: '充值成功',
                    icon: 'success',
                    duration: 2000
                  });
        if (!this.disable) {
          that.disable = true;
          that.$u.api.createGoodsOrderPay().then(function (res) {
            if (res.code === 200) {
              wx.requestPayment({
                timeStamp: res.data.timeStamp,
                nonceStr: res.data.nonceStr,
                package: res.data.packageVal,
                signType: 'MD5',
                paySign: res.data.paySign,
                success: function success(res) {
                  that.disable = false;
                  if (res.errMsg = 'requestPayment:ok') {
                    that.show1 = false;
                    that.info.depositStatus = 1;
                    that.carRental();
                    that.refresh();
                    uni.showToast({
                      title: '充值成功',
                      icon: 'success',
                      duration: 2000
                    });
                  }
                },
                fail: function fail(err) {
                  that.disable = false;
                  console.log(err);
                }
              },
              fail: function fail(err) {
                console.log(err);
              }
            });
          }
        });
              });
            }
          }).catch(function (err) {
            that.disable = false;
            console.log(err);
          });
        }
      } else {
        uni.showToast({
          title: '请先勾选协议',
@@ -477,102 +706,142 @@
    },
    // 扫码租车
    carRental: function carRental() {
      // 判断有没有交押金
      if (this.info.depositStatus === 0) {
        this.show1 = true;
        return;
      }
      var that = this;
      // 扫码解锁骑行
      uni.scanCode({
        success: function () {
          var _success = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(result) {
            var res, num, timer;
            return _regenerator.default.wrap(function _callee3$(_context3) {
              while (1) {
                switch (_context3.prev = _context3.next) {
                  case 0:
                    // 打开开锁弹框
                    that.show5 = true;
                    // 调用开锁接口
                    _context3.next = 3;
                    return that.$u.api.openLock({
                      code: result.result
                    });
                  case 3:
                    res = _context3.sent;
                    if (res.code === 200) {
                      that.show6 = false;
                      that.show5 = true;
                      // 循环次数
                      num = 1; // 循环查看解锁结果
                      timer = setInterval( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
                        var res1;
                        return _regenerator.default.wrap(function _callee2$(_context2) {
      var _this6 = this;
      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
        var that;
        return _regenerator.default.wrap(function _callee7$(_context7) {
          while (1) {
            switch (_context7.prev = _context7.next) {
              case 0:
                _context7.next = 2;
                return _this6.refresh();
              case 2:
                if (!(_this6.info.depositStatus === 0)) {
                  _context7.next = 7;
                  break;
                }
                _this6.show1 = true;
                return _context7.abrupt("return");
              case 7:
                if (!(_this6.info.depositStatus === 2)) {
                  _context7.next = 10;
                  break;
                }
                uni.showToast({
                  title: '结算申请提交成功,请耐心等待退款!',
                  icon: 'none',
                  duration: 2000
                });
                return _context7.abrupt("return");
              case 10:
                that = _this6;
                if (!that.disable) {
                  that.disable = true;
                  // 扫码解锁骑行
                  uni.scanCode({
                    success: function () {
                      var _success = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(result) {
                        var text, res, num, timer;
                        return _regenerator.default.wrap(function _callee6$(_context6) {
                          while (1) {
                            switch (_context2.prev = _context2.next) {
                            switch (_context6.prev = _context6.next) {
                              case 0:
                                num += 1;
                                _context2.next = 3;
                                return that.$u.api.refreshLock({
                                  id: res.data.id
                                text = decodeURIComponent(result.path);
                                text = text.substring(text.lastIndexOf('?') + 7, text.length);
                                // 打开开锁弹框
                                that.show5 = true;
                                // 调用开锁接口
                                _context6.next = 5;
                                return that.$u.api.openLock({
                                  code: text
                                });
                              case 3:
                                res1 = _context2.sent;
                                // 开锁成功
                                if (res1.data.status === 1) {
                                  that.refresh();
                                  clearInterval(timer);
                              case 5:
                                res = _context6.sent;
                                if (res.code === 200) {
                                  that.disable = false;
                                  that.show6 = false;
                                  that.show5 = true;
                                  // 循环次数
                                  num = 1; // 循环查看解锁结果
                                  timer = setInterval( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
                                    var res1;
                                    return _regenerator.default.wrap(function _callee5$(_context5) {
                                      while (1) {
                                        switch (_context5.prev = _context5.next) {
                                          case 0:
                                            num += 1;
                                            _context5.next = 3;
                                            return that.$u.api.refreshLock({
                                              id: res.data.id
                                            });
                                          case 3:
                                            res1 = _context5.sent;
                                            // 开锁成功
                                            if (res1.data.status === 1) {
                                              that.refresh();
                                              clearInterval(timer);
                                              that.show5 = false;
                                              setTimeout(function () {
                                                that.show2 = true;
                                              }, 500);
                                            }
                                            // 开锁失败
                                            if (res1.data.status === 3) {
                                              that.refresh();
                                              clearInterval(timer);
                                              that.show5 = false;
                                              uni.showToast({
                                                title: '开锁失败',
                                                icon: 'error',
                                                duration: 2000
                                              });
                                            }
                                            // 开锁超时
                                            if (num === 180) {
                                              that.refresh();
                                              clearInterval(timer);
                                              that.show5 = false;
                                              uni.showToast({
                                                title: '开锁超时',
                                                icon: 'error',
                                                duration: 2000
                                              });
                                            }
                                          case 7:
                                          case "end":
                                            return _context5.stop();
                                        }
                                      }
                                    }, _callee5);
                                  })), 1000);
                                } else {
                                  that.show5 = false;
                                  setTimeout(function () {
                                    that.show2 = true;
                                  }, 500);
                                }
                                // 开锁失败
                                if (res1.data.status === 3) {
                                  that.refresh();
                                  clearInterval(timer);
                                  that.show5 = false;
                                  uni.showToast({
                                    title: '开锁失败',
                                    icon: 'error',
                                    duration: 2000
                                  });
                                }
                                // 开锁超时
                                if (num === 180) {
                                  that.refresh();
                                  clearInterval(timer);
                                  that.show5 = false;
                                  uni.showToast({
                                    title: '开锁超时',
                                    icon: 'error',
                                    duration: 2000
                                  });
                                  that.disable = false;
                                }
                              case 7:
                              case "end":
                                return _context2.stop();
                                return _context6.stop();
                            }
                          }
                        }, _callee2);
                      })), 1000);
                    } else {
                      that.show5 = false;
                        }, _callee6);
                      }));
                      function success(_x) {
                        return _success.apply(this, arguments);
                      }
                      return success;
                    }(),
                    fail: function fail() {
                      that.disable = false;
                    }
                  case 5:
                  case "end":
                    return _context3.stop();
                  });
                }
              }
            }, _callee3);
          }));
          function success(_x) {
            return _success.apply(this, arguments);
              case 12:
              case "end":
                return _context7.stop();
            }
          }
          return success;
        }()
      });
        }, _callee7);
      }))();
    },
    // 获取经纬度
    getAddress: function getAddress() {
@@ -708,84 +977,91 @@
    },
    // 刷新骑行状态
    refreshStatus: function refreshStatus() {
      var _this4 = this;
      this.timer = setInterval( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
      var _this7 = this;
      this.timer = setInterval( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
        var res;
        return _regenerator.default.wrap(function _callee4$(_context4) {
        return _regenerator.default.wrap(function _callee8$(_context8) {
          while (1) {
            switch (_context4.prev = _context4.next) {
            switch (_context8.prev = _context8.next) {
              case 0:
                _context4.next = 2;
                return _this4.$u.api.home();
                _context8.next = 2;
                return _this7.$u.api.home();
              case 2:
                res = _context4.sent;
                res = _context8.sent;
                if (!(res.code === 200)) {
                  _context4.next = 10;
                  _context8.next = 13;
                  break;
                }
                _this4.info = res.data;
                _this7.info = res.data;
                // 骑行中
                if (!(res.data.rideStatus === 1)) {
                  _context4.next = 7;
                  _context8.next = 7;
                  break;
                }
                return _context4.abrupt("return");
                return _context8.abrupt("return");
              case 7:
                _this4.show2 = false;
                _this7.show2 = false;
                // 已换车
                if (res.data.rideStatus === 2) {
                  _this4.show6 = true;
                if (!(res.data.rideStatus === 2)) {
                  _context8.next = 11;
                  break;
                }
                clearInterval(_this4.timer);
              case 10:
                _this7.show6 = true;
                return _context8.abrupt("return");
              case 11:
                if (res.data.rideStatus === -1) {
                  _this7.show6 = false;
                }
                clearInterval(_this7.timer);
              case 13:
              case "end":
                return _context4.stop();
                return _context8.stop();
            }
          }
        }, _callee4);
        }, _callee8);
      })), 10000);
    },
    // 获取首页信息
    getHomeInfo: function getHomeInfo() {
      var _this5 = this;
      var _this8 = this;
      this.$u.api.home().then(function (res) {
        if (res.code === 200) {
          _this5.info = res.data;
          _this8.info = res.data;
          // 是否弹出广告图
          if (res.data.adList.length > 0) {
            _this5.show = true;
            _this8.show = true;
          }
          // 解锁中
          if (res.data.rideStatus === 0) {
            _this5.show5 = true;
            _this8.show5 = true;
            // 循环次数
            var num = 1;
            // 循环查看解锁结果
            var timer = setInterval( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
            var timer = setInterval( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
              var res1;
              return _regenerator.default.wrap(function _callee5$(_context5) {
              return _regenerator.default.wrap(function _callee9$(_context9) {
                while (1) {
                  switch (_context5.prev = _context5.next) {
                  switch (_context9.prev = _context9.next) {
                    case 0:
                      num += 1;
                      _context5.next = 3;
                      return _this5.$u.api.refreshLock({
                      _context9.next = 3;
                      return _this8.$u.api.refreshLock({
                        id: res.data.memberRidesResponse.rideId
                      });
                    case 3:
                      res1 = _context5.sent;
                      res1 = _context9.sent;
                      // 开锁成功
                      if (res1.data.status === 1) {
                        clearInterval(timer);
                        _this5.show5 = false;
                        _this8.show5 = false;
                        setTimeout(function () {
                          _this5.show2 = true;
                          _this8.show2 = true;
                        }, 500);
                      }
                      // 开锁失败
                      if (res1.data.status === 3) {
                        clearInterval(timer);
                        _this5.show5 = false;
                        _this8.show5 = false;
                        uni.showToast({
                          title: '开锁失败',
                          icon: 'error',
@@ -795,7 +1071,7 @@
                      // 开锁超时
                      if (num === 180) {
                        clearInterval(timer);
                        _this5.show5 = false;
                        _this8.show5 = false;
                        uni.showToast({
                          title: '开锁超时',
                          icon: 'error',
@@ -804,74 +1080,77 @@
                      }
                    case 7:
                    case "end":
                      return _context5.stop();
                      return _context9.stop();
                  }
                }
              }, _callee5);
              }, _callee9);
            })), 1000);
          }
          // 骑行中
          if (res.data.rideStatus === 1) {
            _this5.show2 = true;
            _this5.refreshStatus();
            _this8.show2 = true;
            _this8.refreshStatus();
          }
          if (res.data.rideStatus === 5) {
            _this5.show5 = true;
            _this8.show5 = true;
          }
          if (res.data.rideStatus === 2) {
            _this5.show6 = true;
            _this8.show6 = true;
            _this8.refreshStatus();
          }
          // 是否营业
          if (res.data.isBusiness === 0) {
            _this5.content = res.data.unBusinessTips;
            _this5.show4 = true;
            _this8.title = '暂停营业提醒';
            _this8.content = res.data.unBusinessTips;
            _this8.show4 = true;
            return;
          }
          // 是否停止服务
          if (res.data.isStopServe === 1) {
            _this5.content = res.data.stopServeTips;
            _this5.show4 = true;
            _this8.title = '暂停服务提醒';
            _this8.content = res.data.stopServeTips;
            _this8.show4 = true;
          }
        }
      });
    },
    // 刷新首页信息
    refresh: function refresh() {
      var _this6 = this;
      var _this9 = this;
      this.$u.api.home().then(function (res) {
        if (res.code === 200) {
          _this6.info = res.data;
          _this9.info = res.data;
          // 解锁中
          if (res.data.rideStatus === 0) {
            _this6.show5 = true;
            _this9.show5 = true;
            // 循环次数
            var num = 1;
            // 循环查看解锁结果
            var timer = setInterval( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
            var timer = setInterval( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10() {
              var res1;
              return _regenerator.default.wrap(function _callee6$(_context6) {
              return _regenerator.default.wrap(function _callee10$(_context10) {
                while (1) {
                  switch (_context6.prev = _context6.next) {
                  switch (_context10.prev = _context10.next) {
                    case 0:
                      num += 1;
                      _context6.next = 3;
                      return _this6.$u.api.refreshLock({
                      _context10.next = 3;
                      return _this9.$u.api.refreshLock({
                        id: res.data.memberRidesResponse.rideId
                      });
                    case 3:
                      res1 = _context6.sent;
                      res1 = _context10.sent;
                      // 开锁成功
                      if (res1.data.status === 1) {
                        clearInterval(timer);
                        _this6.show5 = false;
                        _this9.show5 = false;
                        setTimeout(function () {
                          _this6.show2 = true;
                          _this9.show2 = true;
                        }, 500);
                      }
                      // 开锁失败
                      if (res1.data.status === 3) {
                        clearInterval(timer);
                        _this6.show5 = false;
                        _this9.show5 = false;
                        uni.showToast({
                          title: '开锁失败',
                          icon: 'error',
@@ -881,7 +1160,7 @@
                      // 开锁超时
                      if (num === 180) {
                        clearInterval(timer);
                        _this6.show5 = false;
                        _this9.show5 = false;
                        uni.showToast({
                          title: '开锁超时',
                          icon: 'error',
@@ -890,21 +1169,21 @@
                      }
                    case 7:
                    case "end":
                      return _context6.stop();
                      return _context10.stop();
                  }
                }
              }, _callee6);
              }, _callee10);
            })), 1000);
          }
          if (res.data.rideStatus === 1) {
            _this6.show2 = true;
            _this6.refreshStatus();
            _this9.show2 = true;
            _this9.refreshStatus();
          }
          if (res.data.rideStatus === 5) {
            _this6.show5 = true;
            _this9.show5 = true;
          }
          if (res.data.rideStatus === 2) {
            _this6.show6 = true;
            _this9.show6 = true;
          }
        }
      });