Browse Source

接口联调

jw-featrue-zhanlibiao
mk 2 years ago
parent
commit
b9f3c70eda
  1. 3
      app.js
  2. 1
      subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.js
  3. 31
      subpages/searchResult/pages/punchCard/punchCard.js
  4. 9
      subpages/searchResult/pages/punchCard/punchCard.wxss
  5. 9
      utils/api.js

3
app.js

@ -30,6 +30,7 @@ App({
navigationHeight: 40
},
user:{},
share:false
share:false,
questionnaireUrl:''
}
})

1
subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.js

@ -950,7 +950,6 @@ Page({
url: tempFilePath,
duration
})
//
});
recorderManager.onFrameRecorded(res => {
console.log('onFrameRecorded', res)

31
subpages/searchResult/pages/punchCard/punchCard.js

@ -19,7 +19,10 @@ Page({
},
resiId:"",
punchFlag:null,
currentTime:''
currentTime:'',
address:'',
longitude:'',
latitude:'',
},
/**
@ -75,11 +78,27 @@ Page({
})
setTimeout(() => {
this.setData({ animationClass: '' });
this.clockRecords()
}, 1500);
},
clockRecords(){
let currentDate = new Date().toISOString().split('T')[0]; // 会得到形如 "2023-09-27" 的日期
let obj = {
resiId:this.data.resiId,
clockTime: currentDate + " " + this.data.currentTime,
clockAddress: this.data.address,
longitude:this.data.longitude ,
latitude:this.data.latitude
}
api.clockRecords(obj).then(res=>{
wx.showToast({
title: '打卡成功',
title: this.data.punchFlag?'打卡成功':'更新成功',
icon:'none'
})
}, 1500);
}).catch(err=>{
console.log(err);
})
},
toAddResi(){
wx.navigateTo({
@ -110,9 +129,9 @@ Page({
console.log(res);
_this.setData({
addressContent:res.result.address,
// 'fmData.address': res.result.address,
// 'fmData.longitude':res.result.location.lng,
// 'fmData.latitude':res.result.location.lat,
address: res.result.address,
longitude:res.result.location.lng,
latitude:res.result.location.lat,
})
},
fail(err) {

9
subpages/searchResult/pages/punchCard/punchCard.wxss

@ -16,7 +16,7 @@ page {
flex-direction: column;
min-height: 350rpx;
margin-top: 20rpx;
padding: 30rpx;
padding: 30rpx 30rpx 40rpx;
}
.card .title{
@ -33,10 +33,11 @@ page {
background-color: #3A80E7;
}
.info{
margin-top: 38rpx;
margin-top: 6rpx;
}
.info .item{
display: flex;
margin-top: 28rpx;
}
.info .item .label{
width: fit-content;
@ -52,14 +53,14 @@ page {
justify-content: center;
align-items: center;
border-radius: 50%;
margin: 38rpx auto;
margin: 50rpx auto 0;
}
.address{
color: #666666;
font-size: 28rpx ;
margin: 0 auto;
margin-top: 40rpx;
margin: 40rpx auto 30rpx;
}
@keyframes rotateAnimation {

9
utils/api.js

@ -40,7 +40,8 @@ module.exports = {
getResidentBaseInfoPage,
getDemandoption,
addMeasure,
getFollowUpDetail
getFollowUpDetail,
clockRecords
}
// 消息列表
function getIntelligentMessage(param){
@ -187,7 +188,7 @@ function followUpDelete (parm) {
function getAgencygridtree () {
return fly.post(`gov/org/customeragency/agencygridtree`,)
}
// 上报诉求
// 上报事件
function addEvent (parm) {
return fly.post(`governance/icEvent/add-event-resi`,parm)
}
@ -207,3 +208,7 @@ function addMeasure(parm) {
function getFollowUpDetail(id) {
return fly.get(`governance/satisfaction/communitySelfInsp/followUp/detail/${id}`)
}
// 打卡
function clockRecords(parm) {
return fly.post(`actual/base/clockRecords/save`,parm)
}

Loading…
Cancel
Save