diff --git a/epdc-resident-mp-yushan/pages/toRegister/toRegister.js b/epdc-resident-mp-yushan/pages/toRegister/toRegister.js index e51d197..6fe1b81 100644 --- a/epdc-resident-mp-yushan/pages/toRegister/toRegister.js +++ b/epdc-resident-mp-yushan/pages/toRegister/toRegister.js @@ -21,7 +21,7 @@ Page({ } }) let that = this - const versionNum = '1.2.19' + const versionNum = '1.2.20' api.getScanSwitch(versionNum).then(function (res) { console.log(res.data) let state = res.data ? res.data.scanFlag : '1' diff --git a/epdc-resident-mp-yushan/subpages/extend/pages/tripReport/tripReport.js b/epdc-resident-mp-yushan/subpages/extend/pages/tripReport/tripReport.js index 689fe6e..49f0acb 100644 --- a/epdc-resident-mp-yushan/subpages/extend/pages/tripReport/tripReport.js +++ b/epdc-resident-mp-yushan/subpages/extend/pages/tripReport/tripReport.js @@ -148,7 +148,7 @@ Page({ onLoadOptions(e) { console.log('onLoadOptions', e.detail) const { value } = e.detail - wx.showLoading({ mask: true }) + wx.showLoading({ mask: true, title: "加载中..." }) this.setData({ pid: value[value.length - 1], }) @@ -156,7 +156,7 @@ Page({ }, onLoadComeAddress(e) { const { value } = e.detail - wx.showLoading({ mask: true }) + wx.showLoading({ mask: true, title: "加载中..." }) this.setData({ pid: value[value.length - 1], }) @@ -251,58 +251,57 @@ Page({ this.showToast('来到本地时间不能为空') return } - this.setData({ - lock: true, - }) - this.setData({ - nowAddress: this.data.nowAddress.split('-'), - comeFromAddress: this.data.comeFromAddress.split('-'), - }) + // this.setData({ + // nowAddress: this.data.nowAddress.split('-'), + // comeFromAddress: this.data.comeFromAddress.split('-'), + // }) let params = { name: this.data.name.trim(''), mobile: this.data.phone.trim(''), idCard: this.data.card.trim(''), nowAddressCode: this.data.nowAddressValue.join(','), - nowAddressName: this.data.nowAddress.join('-'), + nowAddressName: this.data.nowAddress, nowAddressDetail: this.data.detailAddress, comeAddressCode: this.data.comeFromAddressValue.join(','), - comeAddressName: this.data.comeFromAddress.join('-'), + comeAddressName: this.data.comeFromAddress, comeDate: this.data.localTime, backDate: this.data.backTime, note: this.data.actContent.trim(''), } + const _this = this wx.showModal({ title: '提示', content: '是否要上报行程', success(res) { if (res.confirm) { + _this.data.lock = true + wx.showLoading({ + title: '提交中...' + }) saveTripInfo(params) .then((res) => { if (res.code == 0 && res.msg == 'success') { - this.showToast('提交成功') + _this.showToast('提交成功') setTimeout(() => { - this.setData({ - lock: false, - }) + _this.data.lock = false wx.switchTab({ url: '/pages/index/index', }) }, 1000) } else { - this.setData({ - lock: false, - }) + _this.data.lock = false } - }) - .catch((err) => { - this.setData({ - lock: false, - }) + }).catch(() => { + _this.data.lock = false }) } else if (res.cancel) { console.log('用户点击取消') + _this.data.lock = false } }, + fail() { + _this.data.lock = false + } }) }, onInputValue(e) { diff --git a/epdc-resident-mp-yushan/subpages/extend/pages/tripReport/tripReport.wxml b/epdc-resident-mp-yushan/subpages/extend/pages/tripReport/tripReport.wxml index 8389a3e..285e795 100644 --- a/epdc-resident-mp-yushan/subpages/extend/pages/tripReport/tripReport.wxml +++ b/epdc-resident-mp-yushan/subpages/extend/pages/tripReport/tripReport.wxml @@ -10,7 +10,7 @@ * 姓名 - + @@ -95,7 +95,9 @@ - 提交 + + 提交 + diff --git a/epdc-resident-mp-yushan/subpages/extend/pages/tripReport/tripReport.wxss b/epdc-resident-mp-yushan/subpages/extend/pages/tripReport/tripReport.wxss index 7bf46ce..81dd26b 100644 --- a/epdc-resident-mp-yushan/subpages/extend/pages/tripReport/tripReport.wxss +++ b/epdc-resident-mp-yushan/subpages/extend/pages/tripReport/tripReport.wxss @@ -140,6 +140,10 @@ color: #fff; } +.hover-submit-btn { + background: #ca0101; +} + /* 上传图片 start */ .image-list { width: 100%;