mirror of
https://gitee.com/java110/WechatOwnerService.git
synced 2026-02-24 05:46:04 +08:00
优化钥匙审核进度
This commit is contained in:
parent
66d24b879e
commit
648fe1c07e
1
app.json
1
app.json
@ -6,6 +6,7 @@
|
||||
"pages/applicationKey/applicationKey",
|
||||
"pages/applicationKeyLocation/applicationKeyLocation",
|
||||
"pages/applicationKeyUser/applicationKeyUser",
|
||||
"pages/applicationKeyProgress/applicationKeyProgress",
|
||||
"pages/location/location",
|
||||
"pages/openDoor/openDoor",
|
||||
"pages/my/my",
|
||||
|
||||
@ -43,7 +43,7 @@ const listOwnerMachines = baseUrl + 'app/owner.listOwnerMachines';
|
||||
const applyApplicationKey = baseUrl +"app/applicationKey.applyApplicationKey";
|
||||
|
||||
//查询钥匙
|
||||
const listApplicationKeys = baseUrl +"applicationKey.listApplicationKeys";
|
||||
const listApplicationKeys = baseUrl +"app/applicationKey.listApplicationKeys";
|
||||
|
||||
|
||||
module.exports = {
|
||||
|
||||
127
pages/applicationKeyProgress/applicationKeyProgress.js
Normal file
127
pages/applicationKeyProgress/applicationKeyProgress.js
Normal file
@ -0,0 +1,127 @@
|
||||
// pages/applicationKeyProgress/applicationKeyProgress.js
|
||||
const context = require('../../context/Java110Context.js');
|
||||
const constant = context.constant;
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
applicationKeys:[],
|
||||
idCard:'',
|
||||
communityId:''
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
let _that = this;
|
||||
context.getOwner(function (_owner) {
|
||||
let _idCard = _owner.idCard;
|
||||
let _communityId = _owner.communityId;
|
||||
_that.setData({
|
||||
idCard: _idCard,
|
||||
communityId: _communityId
|
||||
});
|
||||
_that.loadApplicationKey();
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
},
|
||||
loadApplicationKey: function () {
|
||||
|
||||
let _that = this;
|
||||
let _objData = {
|
||||
page: 1,
|
||||
row: 10,
|
||||
idCard: this.data.idCard,
|
||||
communityId: this.data.communityId
|
||||
}
|
||||
context.request({
|
||||
url: constant.url.listApplicationKeys,
|
||||
header: context.getHeaders(),
|
||||
method: "GET",
|
||||
data: _objData, //动态数据
|
||||
success: function (res) {
|
||||
console.log(res);
|
||||
if (res.statusCode == 200) {
|
||||
//成功情况下跳转
|
||||
let _applicationKeys = res.data.applicationKeys;
|
||||
if (_applicationKeys.length == 0) {
|
||||
wx.showToast({
|
||||
title: "未查询到钥匙",
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
_that.setData({
|
||||
applicationKeys: _applicationKeys
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: function (e) {
|
||||
wx.showToast({
|
||||
title: "服务器异常了",
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
gotoDetail:function(e){
|
||||
let _applicationKey = e.currentTarget.dataset.item;
|
||||
wx.navigateTo({
|
||||
url: '/pages/viewApplicationKeyUser/viewApplicationKeyUser?applicationKeyId=' + _applicationKey.applicationKeyId+"&communityId="+this.data.communityId,
|
||||
})
|
||||
}
|
||||
})
|
||||
3
pages/applicationKeyProgress/applicationKeyProgress.json
Normal file
3
pages/applicationKeyProgress/applicationKeyProgress.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"navigationBarTitleText": "钥匙进度"
|
||||
}
|
||||
8
pages/applicationKeyProgress/applicationKeyProgress.wxml
Normal file
8
pages/applicationKeyProgress/applicationKeyProgress.wxml
Normal file
@ -0,0 +1,8 @@
|
||||
<view>
|
||||
|
||||
<view class="block__title">钥匙审核信息</view>
|
||||
<van-cell-group>
|
||||
<van-cell wx:for="{{applicationKeys}}" wx:for-index="idx" wx:for-item="item" title="{{item.locationObjName}}" label="{{item.applicationKeyId}}" value="{{item.stateName}}" bindtap="gotoDetail" data-item="{{item}}" is-link/>
|
||||
</van-cell-group>
|
||||
|
||||
</view>
|
||||
12
pages/applicationKeyProgress/applicationKeyProgress.wxss
Normal file
12
pages/applicationKeyProgress/applicationKeyProgress.wxss
Normal file
@ -0,0 +1,12 @@
|
||||
.block__title {
|
||||
margin: 0;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
color: rgba(69,90,100,.6);
|
||||
padding: 60rpx 30rpx 20rpx;
|
||||
}
|
||||
|
||||
|
||||
.button_up_blank{
|
||||
height: 40rpx;
|
||||
}
|
||||
@ -328,7 +328,7 @@ Page({
|
||||
if(res.statusCode == 200){
|
||||
//成功情况下跳转
|
||||
wx.redirectTo({
|
||||
url: "/pages/viewApplicationKeyUser/viewApplicationKeyUser?idCard=" + _objData.idCard
|
||||
url: "/pages/applicationKeyProgress/applicationKeyProgress"
|
||||
});
|
||||
return ;
|
||||
}
|
||||
|
||||
@ -13,8 +13,8 @@
|
||||
<van-grid-item
|
||||
icon="search"
|
||||
link-type="navigateTo"
|
||||
url="/pages/viewApplicationKeyUser/viewApplicationKeyUser"
|
||||
text="我的钥匙"
|
||||
url="/pages/applicationKeyProgress/applicationKeyProgress"
|
||||
text="申请进度"
|
||||
/>
|
||||
</van-grid>
|
||||
<van-grid clickable column-num="2">
|
||||
@ -22,16 +22,22 @@
|
||||
icon="home-o"
|
||||
link-type="navigateTo"
|
||||
url="/pages/applicationKey/applicationKey"
|
||||
text="访客钥匙"
|
||||
text="我的钥匙"
|
||||
/>
|
||||
<van-grid-item
|
||||
icon="search"
|
||||
link-type="navigateTo"
|
||||
url="/pages/viewApplicationKeyUser/viewApplicationKeyUser"
|
||||
text="上传人脸"
|
||||
text="访客钥匙"
|
||||
/>
|
||||
</van-grid>
|
||||
<van-grid clickable column-num="2">
|
||||
<van-grid-item
|
||||
icon="home-o"
|
||||
link-type="navigateTo"
|
||||
url="/pages/applicationKey/applicationKey"
|
||||
text="上传人脸"
|
||||
/>
|
||||
<van-grid-item
|
||||
icon="home-o"
|
||||
link-type="navigateTo"
|
||||
|
||||
@ -32,16 +32,19 @@ Page({
|
||||
startTime:null,
|
||||
endTime: null,
|
||||
tel:'',
|
||||
stateName:''
|
||||
stateName:'',
|
||||
communityId:''
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
// this.setData({
|
||||
// idCard: options.idCard
|
||||
// });
|
||||
this.setData({
|
||||
applicationKeyId: options.applicationKeyId,
|
||||
communityId: options.communityId,
|
||||
});
|
||||
this.showApplicationKey();
|
||||
|
||||
},
|
||||
|
||||
@ -93,14 +96,13 @@ Page({
|
||||
onShareAppMessage: function () {
|
||||
|
||||
},
|
||||
|
||||
loadApplicationKey:function(){
|
||||
|
||||
showApplicationKey:function(){
|
||||
let _that = this;
|
||||
let _objData = {
|
||||
page : 1,
|
||||
row : 1,
|
||||
idCard : this.data.idCard
|
||||
page: 1,
|
||||
row: 1,
|
||||
applicationKeyId: this.data.applicationKeyId,
|
||||
communityId: this.data.communityId
|
||||
}
|
||||
context.request({
|
||||
url: constant.url.listApplicationKeys,
|
||||
@ -109,44 +111,57 @@ Page({
|
||||
data: _objData, //动态数据
|
||||
success: function (res) {
|
||||
console.log(res);
|
||||
if (res.resultCode == 200) {
|
||||
if (res.statusCode == 200) {
|
||||
//成功情况下跳转
|
||||
let _applicationKeys = res.data.applicationKeys;
|
||||
if (_applicationKeys.length == 0){
|
||||
if (_applicationKeys.length == 0) {
|
||||
wx.showToast({
|
||||
title: "未查询到钥匙",
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return ;
|
||||
return;
|
||||
}
|
||||
|
||||
console.log('钥匙信息:', _applicationKeys);
|
||||
|
||||
let _applicationKey = _applicationKeys[0];
|
||||
let _active = '0';
|
||||
if (_applicationKey.state == '10001'){
|
||||
let _sex = "女";
|
||||
let _typeCd = "";
|
||||
if (_applicationKey.state == '10001') {
|
||||
_active = '2';
|
||||
} else if (_applicationKey.state == '10002') {
|
||||
_active = '2';
|
||||
}else{
|
||||
} else {
|
||||
_active = '1';
|
||||
}
|
||||
|
||||
if (_applicationKey.sex == '0') {
|
||||
_sex = '男';
|
||||
}
|
||||
|
||||
if (_applicationKey.typeCd == "10004") {
|
||||
_typeCd = "业主";
|
||||
} else if (_applicationKey.typeCd == "10005") {
|
||||
_typeCd = "家庭成员";
|
||||
} else {
|
||||
_typeCd = "租客";
|
||||
}
|
||||
|
||||
_that.setData({
|
||||
applicationKeyId: _applicationKey.applicationKeyId,
|
||||
name: _applicationKey.name,
|
||||
age: _applicationKey.age,
|
||||
sex: _applicationKey.sex,
|
||||
typeCdName: _applicationKey.typeCd,
|
||||
sex: _sex,
|
||||
typeCdName: _typeCd,
|
||||
idCard: _applicationKey.idCard,
|
||||
startTime: _applicationKey.startTime,
|
||||
endTime: _applicationKey.endTime,
|
||||
tel: _applicationKey.tel,
|
||||
active: _active,
|
||||
stateName: stateName
|
||||
stateName: _applicationKey.stateName
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
fail: function (e) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user