Browse Source

增加行程上报、社会资讯详情加积分

release
lihenian 4 years ago
parent
commit
b85da02a84
  1. 2
      epdc-resident-mp-yushan/pages/toRegister/toRegister.js
  2. 45
      epdc-resident-mp-yushan/subpages/extend/pages/tripReport/tripReport.js
  3. 6
      epdc-resident-mp-yushan/subpages/extend/pages/tripReport/tripReport.wxml
  4. 4
      epdc-resident-mp-yushan/subpages/extend/pages/tripReport/tripReport.wxss

2
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'

45
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) {

6
epdc-resident-mp-yushan/subpages/extend/pages/tripReport/tripReport.wxml

@ -10,7 +10,7 @@
<text class="must">*</text>
<view class="item-label">姓名</view>
<view class="item-value">
<input type="text" placeholder-class="placeholder" placeholder="请输入姓名" value="{{name}}" bindinput="onInputValue" data-code="name" maxlength='6' />
<input type="text" placeholder-class="placeholder" placeholder="请输入姓名" value="{{name}}" bindinput="onInputValue" data-code="name" maxlength='20' />
</view>
</view>
<view class="data-form-item">
@ -95,7 +95,9 @@
</view>
<view class="data-form">
<view class="footer-item">
<view class="submit" bindtap="onSubmitApply">提交</view>
<view class="submit" bindtap="onSubmitApply" hover-class="hover-submit-btn" hover-stay-time="150">
提交
</view>
</view>
</view>
</view>

4
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%;

Loading…
Cancel
Save