From 648fe1c07ef250b6174f7de13d0bac45a9b215bb Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: Sun, 5 Jan 2020 16:47:36 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=92=A5=E5=8C=99=E5=AE=A1?=
=?UTF-8?q?=E6=A0=B8=E8=BF=9B=E5=BA=A6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app.json | 1 +
constant/UrlConstant.js | 2 +-
.../applicationKeyProgress.js | 127 ++++++++++++++++++
.../applicationKeyProgress.json | 3 +
.../applicationKeyProgress.wxml | 8 ++
.../applicationKeyProgress.wxss | 12 ++
.../applicationKeyUser/applicationKeyUser.js | 2 +-
pages/openDoor/openDoor.wxml | 14 +-
.../viewApplicationKeyUser.js | 59 +++++---
9 files changed, 200 insertions(+), 28 deletions(-)
create mode 100644 pages/applicationKeyProgress/applicationKeyProgress.js
create mode 100644 pages/applicationKeyProgress/applicationKeyProgress.json
create mode 100644 pages/applicationKeyProgress/applicationKeyProgress.wxml
create mode 100644 pages/applicationKeyProgress/applicationKeyProgress.wxss
diff --git a/app.json b/app.json
index 90455a4..5c379f6 100644
--- a/app.json
+++ b/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",
diff --git a/constant/UrlConstant.js b/constant/UrlConstant.js
index 47b2446..4c5b143 100644
--- a/constant/UrlConstant.js
+++ b/constant/UrlConstant.js
@@ -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 = {
diff --git a/pages/applicationKeyProgress/applicationKeyProgress.js b/pages/applicationKeyProgress/applicationKeyProgress.js
new file mode 100644
index 0000000..272f622
--- /dev/null
+++ b/pages/applicationKeyProgress/applicationKeyProgress.js
@@ -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,
+ })
+ }
+})
\ No newline at end of file
diff --git a/pages/applicationKeyProgress/applicationKeyProgress.json b/pages/applicationKeyProgress/applicationKeyProgress.json
new file mode 100644
index 0000000..1b27246
--- /dev/null
+++ b/pages/applicationKeyProgress/applicationKeyProgress.json
@@ -0,0 +1,3 @@
+{
+ "navigationBarTitleText": "钥匙进度"
+}
\ No newline at end of file
diff --git a/pages/applicationKeyProgress/applicationKeyProgress.wxml b/pages/applicationKeyProgress/applicationKeyProgress.wxml
new file mode 100644
index 0000000..096376e
--- /dev/null
+++ b/pages/applicationKeyProgress/applicationKeyProgress.wxml
@@ -0,0 +1,8 @@
+
+
+ 钥匙审核信息
+
+
+
+
+
diff --git a/pages/applicationKeyProgress/applicationKeyProgress.wxss b/pages/applicationKeyProgress/applicationKeyProgress.wxss
new file mode 100644
index 0000000..6e6c4ed
--- /dev/null
+++ b/pages/applicationKeyProgress/applicationKeyProgress.wxss
@@ -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;
+}
\ No newline at end of file
diff --git a/pages/applicationKeyUser/applicationKeyUser.js b/pages/applicationKeyUser/applicationKeyUser.js
index 4efc5ab..cc43d37 100644
--- a/pages/applicationKeyUser/applicationKeyUser.js
+++ b/pages/applicationKeyUser/applicationKeyUser.js
@@ -328,7 +328,7 @@ Page({
if(res.statusCode == 200){
//成功情况下跳转
wx.redirectTo({
- url: "/pages/viewApplicationKeyUser/viewApplicationKeyUser?idCard=" + _objData.idCard
+ url: "/pages/applicationKeyProgress/applicationKeyProgress"
});
return ;
}
diff --git a/pages/openDoor/openDoor.wxml b/pages/openDoor/openDoor.wxml
index 00c95a7..e707d28 100644
--- a/pages/openDoor/openDoor.wxml
+++ b/pages/openDoor/openDoor.wxml
@@ -13,8 +13,8 @@
@@ -22,16 +22,22 @@
icon="home-o"
link-type="navigateTo"
url="/pages/applicationKey/applicationKey"
- text="访客钥匙"
+ text="我的钥匙"
/>
+