diff --git a/app.json b/app.json
index d338c834c81c86f2886442ef94357cf7628eb437..cef32b6b6841879836821aba1b1a44f9f89b46ad 100644
--- a/app.json
+++ b/app.json
@@ -22,8 +22,6 @@
"pages/familyList/familyList",
"pages/complaintList/complaintList",
"pages/viewApplicationKeyUser/viewApplicationKeyUser",
- "pages/viewHeadImg/viewHeadImg",
- "pages/collectHeaderImg/collectHeaderImg",
"pages/complaint/complaint",
"pages/viewComplaint/viewComplaint",
"pages/payParkingFeeList/payParkingFeeList",
@@ -43,7 +41,7 @@
"window": {
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#00AA00",
- "navigationBarTitleText": "HC智慧小区"
+ "navigationBarTitleText": "融生活智慧社区"
},
"tabBar": {
"color": "#272636",
diff --git a/app.json.bak b/app.json.bak
index 2fde4932ef61ee887d21e9da9fd060bd6948270b..d338c834c81c86f2886442ef94357cf7628eb437 100644
--- a/app.json.bak
+++ b/app.json.bak
@@ -23,7 +23,7 @@
"pages/complaintList/complaintList",
"pages/viewApplicationKeyUser/viewApplicationKeyUser",
"pages/viewHeadImg/viewHeadImg",
- "pages/collectFace/collectFace",
+ "pages/collectHeaderImg/collectHeaderImg",
"pages/complaint/complaint",
"pages/viewComplaint/viewComplaint",
"pages/payParkingFeeList/payParkingFeeList",
diff --git a/constant/AppConstant.js b/constant/AppConstant.js
index 6003224bbe180f78d69d273b69cd9385acc3b1c3..341df68a9a1dea8eed6af67affac1fa388af0fbb 100644
--- a/constant/AppConstant.js
+++ b/constant/AppConstant.js
@@ -8,6 +8,10 @@ class AppConstant{
/**
* 应用信息,主要是用来和后端服务交互时的时候用
+ *
+ * 这里请不要修改,这个不是微信的AppId 和appSecurity 这个是HC小区管理系统分配的
+ * 这里请不要修改,这个不是微信的AppId 和appSecurity 这个是HC小区管理系统分配的
+ * 这里请不要修改,这个不是微信的AppId 和appSecurity 这个是HC小区管理系统分配的
*/
static appId = "992019111758490006";
static appSecurity = "";
diff --git a/constant/MappingConstant.js b/constant/MappingConstant.js
index f49754a8df5b23a3d3dfa5be828c000489f14066..f42791eebc43ab6e6d46b6cfb4ededbf35430168 100644
--- a/constant/MappingConstant.js
+++ b/constant/MappingConstant.js
@@ -13,6 +13,7 @@ class MappingConstant{
static CURRENT_COMMUNITY_INFO = "currentCommunityInfo"; // 小区信息
static OWNER_INFO = "ownerInfo"; // 当前业主信息
static CURRENT_COMMUNITY_INFO = "currentCommunityInfo"; //业主当前小区信息
+ static HC_ENV = "_HC_ENV"
}
diff --git a/constant/UrlConstant.js b/constant/UrlConstant.js
index 6b0f86d99a7a49cb2087e0ef03ab307e42f1ebdb..4d39d9df2376f7d60ae3d969443af2458d59aa0a 100644
--- a/constant/UrlConstant.js
+++ b/constant/UrlConstant.js
@@ -7,10 +7,12 @@
// 服务器域名
-const baseUrl = 'https://app.demo.winqi.cn/';
+const baseUrl = 'https://xq.rshenstar.com/';
//const baseUrl = 'http://hc.demo.winqi.cn:8012/';
-const hcBaseUrl = 'https://hc.demo.winqi.cn';
+const hcBaseUrl = 'https://xq.rshenstar.com';
+//获取环境
+const getEnv = baseUrl + 'app/env/getEnv';
// 登录接口
const loginUrl = baseUrl + 'app/loginWx';
const areaUrl = baseUrl + "app/area.listAreas";
@@ -100,8 +102,12 @@ const queryConfigFee = baseUrl + "/app/fee.queryFeeConfig";
//缴费历史查询
const queryFeeDetail = baseUrl +"/app/fee.queryFeeDetail";
+//发送验证码
+const userSendSms = baseUrl +"/app/user.userSendSms";
+
module.exports = {
+ getEnv:getEnv,
baseUrl: baseUrl,
hcBaseUrl: hcBaseUrl,
loginUrl: loginUrl,
@@ -137,5 +143,6 @@ module.exports = {
queryConfigFee: queryConfigFee,
queryFeeByCarInout: queryFeeByCarInout,
preOrderTempCarInout: preOrderTempCarInout,
- queryFeeDetail: queryFeeDetail
+ queryFeeDetail: queryFeeDetail,
+ userSendSms: userSendSms
};
\ No newline at end of file
diff --git a/context/Java110Context.js b/context/Java110Context.js
index 947907be49be910eef6739faecaa737b1b8be85c..4d4dfc951a9a55daaaf4cfb72d9c5963c577b1eb 100644
--- a/context/Java110Context.js
+++ b/context/Java110Context.js
@@ -14,13 +14,18 @@ const factory = require('../factory/index.js');
* 获取请后台服务时的头信息
*/
const getHeaders = function() {
+ //let _userInfo = getUserInfo();
+ let userId = '-1';
+ //if (_userInfo != null || _userInfo != undefined){
+ // userId = _userInfo.userId;
+ //}
return {
- app_id: constant.app.appId,
- transaction_id: util.core.wxuuid(),
- req_time: util.date.getDateYYYYMMDDHHMISS(),
- sign: '1234567',
- user_id: '-1',
- cookie: '_java110_token_=' + wx.getStorageSync('token')
+ 'app-id': constant.app.appId,
+ 'transaction-id': util.core.wxuuid(),
+ 'req-time': util.date.getDateYYYYMMDDHHMISS(),
+ 'sign': '1234567',
+ 'user-id': userId,
+ 'cookie': '_java110_token_=' + wx.getStorageSync('token')
}
}
/**
diff --git a/factory/LoginFactory.js b/factory/LoginFactory.js
index 6559b3e3d9333db1f6ad307fa72bcb5830680a1f..311638681446c34735a7a1e9fe2aa46db1f8b938 100644
--- a/factory/LoginFactory.js
+++ b/factory/LoginFactory.js
@@ -77,7 +77,7 @@ class LoginFactory {
url: constant.url.loginUrl,
method: 'post',
header: {
- APP_ID: constant.app.appId
+ 'APP-ID': constant.app.appId
},
data: {
code: loginRes.code, // 临时登录凭证
diff --git a/pages/bindOwner/bindOwner.js b/pages/bindOwner/bindOwner.js
index 95b69f1cb486eea5e6c34d06debf7245031cbc33..88c43fe2facf19386d94d679c50e0450a663c9a0 100644
--- a/pages/bindOwner/bindOwner.js
+++ b/pages/bindOwner/bindOwner.js
@@ -9,23 +9,25 @@ Page({
* 页面的初始数据
*/
data: {
- areaCode:'',
- areaName:'',
- communityName:'',
- appUserName:'',
- idCard:'',
- link:'',
- msgCode:'',
- areaShow:false,
- areaList:{
+ areaCode: '',
+ areaName: '',
+ communityName: '',
+ appUserName: '',
+ idCard: '',
+ link: '',
+ second: 60,
+ msgCode: '',
+ areaShow: false,
+ btnValue: '获取验证码',
+ areaList: {
province_list: {
-
+
},
city_list: {
-
+
},
county_list: {
-
+
}
}
},
@@ -33,14 +35,14 @@ Page({
/**
* 生命周期函数--监听页面加载
*/
- onLoad: function (options) {
+ onLoad: function(options) {
let _that = this;
let _location = context.getLocation();
let _currentLocation = context.getCurrentLocation();
let _areaName = _currentLocation.city + _currentLocation.district;
let _areaCode = _currentLocation.adcode;
//加载省份
- context._loadArea('','',function(_areaList){
+ context._loadArea('', '', function(_areaList) {
_that.setData({
areaList: _areaList,
communityName: _location,
@@ -54,15 +56,15 @@ Page({
/**
* 生命周期函数--监听页面初次渲染完成
*/
- onReady: function () {
+ onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
- onShow: function () {
- if(this.data.areaCode == ''|| this.data.areaCode == undefined){
+ onShow: function() {
+ if (this.data.areaCode == '' || this.data.areaCode == undefined) {
let _currentLocation = context.getCurrentLocation();
let _areaName = _currentLocation.city + _currentLocation.district;
let _areaCode = _currentLocation.adcode;
@@ -71,60 +73,106 @@ Page({
areaName: _areaName
});
}
-
+
},
/**
* 生命周期函数--监听页面隐藏
*/
- onHide: function () {
+ onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
- onUnload: function () {
-
+ onUnload: function() {
+
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
- onPullDownRefresh: function () {
+ onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
- onReachBottom: function () {
+ onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
- onShareAppMessage: function () {
+ onShareAppMessage: function() {
},
- bindInput:function(e){
- console.log('数据监听',e);
- let _that = this;
- let dataset = e.currentTarget.dataset;
- let value = e.detail;
- let name = dataset.name;
- _that.data[name] = value;
+ bindInput: function(e) {
+ console.log('数据监听', e);
+ let _that = this;
+ let dataset = e.currentTarget.dataset;
+ let value = e.detail;
+ let name = dataset.name;
+ _that.data[name] = value;
// _that.setData({
// name: value
// });
- console.log(this.data);
+ console.log(this.data);
},
- sendMsgCode:function(){
+ sendMsgCode: function() {
+ console.log('获取验证码');
+ var _that = this;
+
+ let obj = {
+ tel: this.data.link
+ };
+
+ if (obj.tel == '') {
+ wx.showToast({
+ title: '请输入手机号',
+ icon: 'none',
+ duration: 2000
+ });
+ return;
+ }
+
+ context.request({
+ url: constant.url.userSendSms,
+ header: context.getHeaders(),
+ method: "POST",
+ data: obj, //动态数据
+ success: function(res) {
+ console.log(res);
+ //成功情况下跳转
+ if (res.statusCode == 200) {
+ wx.hideLoading();
+ _that.timer();
+ return;
+ }
+ wx.hideLoading();
+ wx.showToast({
+ title: res.data,
+ icon: 'none',
+ duration: 2000
+ });
+ },
+ fail: function(e) {
+ wx.hideLoading();
+ wx.showToast({
+ title: "服务器异常了",
+ icon: 'none',
+ duration: 2000
+ })
+ }
+ });
+
},
- bindOwner: function (e) {
+ bindOwner: function(e) {
let obj = {
"areaCode": this.data.areaCode,
@@ -141,9 +189,9 @@ Page({
msg = "请填写小区名称";
} else if (obj.appUserName == "") {
msg = "请填写业主名称";
- } else if (obj.idCard == "") {
- msg = "请填写身份证";
- } else if (obj.link == ""){
+ // } else if (obj.idCard == "") {
+ // msg = "请填写身份证";
+ } else if (obj.link == "") {
msg = "请填写手机号";
} else if (obj.msgCode == "") {
msg = "请填写验证码";
@@ -159,20 +207,28 @@ Page({
wx.showLoading({
title: '绑定中',
});
+
+ let _userInfo = context.getUserInfo();
+ let userId = '-1';
+ if (_userInfo != null && _userInfo != undefined) {
+ userId = _userInfo.userId;
+ }
+ let _header = context.getHeaders();
+ _header['user-id'] = userId;
context.request({
url: constant.url.appUserBindingOwner,
- header: context.getHeaders(),
+ header: _header,
method: "POST",
- data:obj, //动态数据
- success: function (res) {
+ data: obj, //动态数据
+ success: function(res) {
console.log(res);
//成功情况下跳转
if (res.statusCode == 200) {
- wx.hideLoading();
- wx.redirectTo({
- url: "/pages/viewBindOwner/viewBindOwner"
- });
- return;
+ wx.hideLoading();
+ wx.redirectTo({
+ url: "/pages/viewBindOwner/viewBindOwner"
+ });
+ return;
}
wx.hideLoading();
wx.showToast({
@@ -181,7 +237,7 @@ Page({
duration: 2000
});
},
- fail:function(e){
+ fail: function(e) {
wx.hideLoading();
wx.showToast({
title: "服务器异常了",
@@ -193,8 +249,8 @@ Page({
}
},
- onConfirm:function(e){
- console.log("onConfirm",e);
+ onConfirm: function(e) {
+ console.log("onConfirm", e);
let _areaCode = e.detail.values[2].code;
let _areaName = e.detail.values[1].name + e.detail.values[2].name;
this.setData({
@@ -203,37 +259,58 @@ Page({
areaShow: false
});
},
- onChange:function(e){
- console.log(e);
+ onChange: function(e) {
+ console.log(e);
},
- chooseArea:function(e){
+ chooseArea: function(e) {
this.setData({
- areaShow:true
+ areaShow: true
});
},
- onCancel:function(e){
+ onCancel: function(e) {
this.setData({
areaShow: false
});
},
-/**
- * 选择小区
- */
- chooseCommunity:function(e){
-
- if (this.data.areaCode == '' || this.data.areaCode == undefined){
+ /**
+ * 选择小区
+ */
+ chooseCommunity: function(e) {
+
+ if (this.data.areaCode == '' || this.data.areaCode == undefined) {
wx.showToast({
title: '请先选择地区',
- icon:'none'
+ icon: 'none'
});
return;
}
- wx.navigateTo({
- url: '/pages/viewCommunitys/viewCommunitys?areaCode='+this.data.areaCode,
- })
+ wx.navigateTo({
+ url: '/pages/viewCommunitys/viewCommunitys?areaCode=' + this.data.areaCode,
+ })
+ },
+ timer: function() {
+ let promise = new Promise((resolve, reject) => {
+ let setTimer = setInterval(
+ () => {
+ var second = this.data.second - 1;
+ this.setData({
+ second: second,
+ btnValue: second + '秒',
+ btnDisabled: true
+ })
+ if (this.data.second <= 0) {
+ this.setData({
+ second: 60,
+ btnValue: '获取验证码',
+ btnDisabled: false
+ })
+ resolve(setTimer)
+ }
+ }, 1000)
+ })
+ promise.then((setTimer) => {
+ clearInterval(setTimer)
+ })
}
-
-
-
})
\ No newline at end of file
diff --git a/pages/bindOwner/bindOwner.wxml b/pages/bindOwner/bindOwner.wxml
index 1dd8f5b2feee3d692c05b6fc1e353c16461f2264..58d6602815ca131d47d2893a9cd301b90c544f39 100644
--- a/pages/bindOwner/bindOwner.wxml
+++ b/pages/bindOwner/bindOwner.wxml
@@ -12,7 +12,7 @@
- 发送验证码
+ {{btnValue}}
diff --git a/pages/collectHeaderImg/collectHeaderImg.js b/pages/collectHeaderImg/collectHeaderImg.js
deleted file mode 100644
index 6410b5cc6d6cd7be3f9d9d7a5d5130aa13778c62..0000000000000000000000000000000000000000
--- a/pages/collectHeaderImg/collectHeaderImg.js
+++ /dev/null
@@ -1,146 +0,0 @@
-// pages/collectFace/collectFace.js
-const context = require("../../context/Java110Context.js");
-const constant = context.constant;
-const factory = context.factory;
-Page({
-
- /**
- * 页面的初始数据
- */
- data: {
- src:'',
- uploadFlag:false
- },
-
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad: function (options) {
-
- },
-
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady: function () {
-
- },
-
- /**
- * 生命周期函数--监听页面显示
- */
- onShow: function () {
-
- },
-
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide: function () {
-
- },
-
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload: function () {
-
- },
-
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh: function () {
-
- },
-
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom: function () {
-
- },
-
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage: function () {
-
- },
- takePhoto:function() {
- let _that = this;
- _that.setData({
- uploadFlag: true
- })
- const ctx = wx.createCameraContext();
- ctx.takePhoto({
- quality: 'high',
- success: (res) => {
- wx.getFileSystemManager().readFile({
- filePath: res.tempImagePath,
- encoding: 'base64',
- success: (photoRes) => {
- let _baseInfo = photoRes.data;
- _that.setData({
- src: _baseInfo
- });
- _that._uploadOwnerPhoto();
- wx.hideLoading()
- }
- });
- },
- fail:(e)=>{
- _that.setData({
- uploadFlag:false
- })
- }
- })
- },
- _uploadOwnerPhoto:function(){
- let _that = this;
- context.getOwner(function (_owner) {
- let _memberId = _owner.memberId;
- let _communityId = _owner.communityId;
- let obj = {
- memberId: _memberId,
- communityId: _communityId,
- photo: _that.data.src
- };
- context.request({
- url: constant.url.uploadOwnerPhoto,
- header: context.getHeaders(),
- method: "POST",
- data: obj, //动态数据
- success: function (res) {
- console.log(res);
- if (res.statusCode != 200) {
- wx.showToast({
- title: '头像上传失败',
- icon: 'none',
- duration: 2000
- });
- _that.setData({
- uploadFlag: false
- });
- return;
- }
- //成功情况下跳转
- wx.navigateBack({
- delta:1
- });
- },
- fail: function (e) {
- wx.showToast({
- title: "服务器异常了",
- icon: 'none',
- duration: 2000
- });
- _that.setData({
- uploadFlag: false
- });
- }
- });
- });
-
- }
-})
\ No newline at end of file
diff --git a/pages/collectHeaderImg/collectHeaderImg.json b/pages/collectHeaderImg/collectHeaderImg.json
deleted file mode 100644
index ca35364564fc6fe5060c6949f8ff8f1c97446ca4..0000000000000000000000000000000000000000
--- a/pages/collectHeaderImg/collectHeaderImg.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "navigationBarTitleText": "设置头像"
-}
\ No newline at end of file
diff --git a/pages/collectHeaderImg/collectHeaderImg.wxml b/pages/collectHeaderImg/collectHeaderImg.wxml
deleted file mode 100644
index 31336f313494991a526b09e7fa1c48231471e7a7..0000000000000000000000000000000000000000
--- a/pages/collectHeaderImg/collectHeaderImg.wxml
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
- 拿起手机,面向手机
-
-
-
-
- 采集人脸
-
-
-
-
-
-
-
-
diff --git a/pages/collectHeaderImg/collectHeaderImg.wxss b/pages/collectHeaderImg/collectHeaderImg.wxss
deleted file mode 100644
index 240353599fa89bcbe153ca2aff7559a567f5404c..0000000000000000000000000000000000000000
--- a/pages/collectHeaderImg/collectHeaderImg.wxss
+++ /dev/null
@@ -1,31 +0,0 @@
-.controls {
- position: relative;
- display: flex;
-}
-.cf_text_na{
-
- font-size: 48rpx;
- margin:80rpx 0rpx;
- font-display: 700;
- position: absolute;
- top: 0rpx;
- text-align: center;
- width: 100%;
-}
-
-.cf_btn{
- text-align: center;
- width: 100%;
- padding:40rpx 0;
- background-color: #f8f8f8;
-}
-
-.cf_btn .cf_btn_v{
- width: 80%;
- margin: 0 auto;
-}
-.noticeTXT{
- font-size: 10PX;
- color: rgb(12, 242, 240);
- text-align: center
-}
\ No newline at end of file
diff --git a/pages/complaint/complaint.js b/pages/complaint/complaint.js
index a0a391e4e12a4d59d1290604ba3c2996d4a01299..7ca03ef5e8cdbab9911ebe424296a2c601f433bc 100644
--- a/pages/complaint/complaint.js
+++ b/pages/complaint/complaint.js
@@ -174,9 +174,9 @@ Page({
success: function(res) {
console.log(res);
//成功情况下跳转
- // wx.redirectTo({
- // url: "/pages/viewComplaint/viewComplaint"
- // });
+ wx.redirectTo({
+ url: "/pages/viewComplaint/viewComplaint"
+ });
},
fail: function(e) {
console.log(e);
diff --git a/pages/index/index.js b/pages/index/index.js
index 0466feb00dbacff79f74e066ea6de543d9635634..421357688472e7f7742d99788ffa7bfdfdf11e90 100644
--- a/pages/index/index.js
+++ b/pages/index/index.js
@@ -129,6 +129,7 @@ Page({
onLoad: function(options) {
let _that = this;
console.log(context);
+ this._loadHCEnv();
context.getOwner(function (_owner) {
let _communityId = '';
if (_owner == null) {
@@ -169,11 +170,16 @@ Page({
},
_judgeBindOwner:function(){
+ let env = wx.getStorageSync(constant.mapping.HC_ENV);
+ let _msg = '您还没有绑定业主,请先绑定业主';
+ if (env == 'DEV' || env == 'TEST'){
+ _msg = '您还没有绑定业主,请先绑定业主或取消查看演示环境';
+ }
context.getOwner(function(_owner){
if(_owner == null){
Dialog.confirm({
title: '温馨提示',
- message: '您还没有绑定业主,请先绑定业主或取消查看演示环境'
+ message: _msg
}).then(() => {
// on confirm
wx.navigateTo({
@@ -181,6 +187,9 @@ Page({
})
}).catch(() => {
// on cancel
+ if (env != 'DEV' && env != 'TEST'){ //生产环境 不做处理
+ return ;
+ }
//这里写死 演示数据
let _ownerInfo = { "appUserId": "982020011296320035", "appUserName": "吴学文", "communityId": "7020181217000001", "communityName": "万博家博园(城西区)", "idCard": "632126199109162011", "link": "18999999999", "memberId": "772019092507000013", "state": "12000", "stateName": "审核成功" };
@@ -324,6 +333,37 @@ Page({
}
});
},
+
+ _loadHCEnv: function () {
+ let _that = this;
+ let _objData = {
+ };
+ context.request({
+ url: constant.url.getEnv,
+ header: context.getHeaders(),
+ method: "GET",
+ data: _objData, //动态数据
+ success: function (res) {
+ console.log("请求返回信息:", res);
+ if (res.statusCode == 200) {
+ wx.setStorageSync(constant.mapping.HC_ENV, res.data);
+ return;
+ }
+ wx.showToast({
+ title: "服务器异常了",
+ icon: 'none',
+ duration: 2000
+ })
+ },
+ fail: function (e) {
+ wx.showToast({
+ title: "服务器异常了",
+ icon: 'none',
+ duration: 2000
+ })
+ }
+ });
+ },
_moreActivities:function(){
wx.navigateTo({
url: '/pages/activites/activites',
diff --git a/pages/index/index.json b/pages/index/index.json
index a707c91af5193af12028d1699175282b6bad750e..747e735f820a6f9c05a8d417b0c6ca86a4895814 100644
--- a/pages/index/index.json
+++ b/pages/index/index.json
@@ -1,5 +1,5 @@
{
- "navigationBarTitleText": "HC智慧家园",
+ "navigationBarTitleText": "融生活智慧社区",
"backgroundColor": "#ffffff",
"usingComponents": {}
}
\ No newline at end of file
diff --git a/pages/index/index.wxml b/pages/index/index.wxml
index 4a3a16d33b834659cf31b18be1eee7f477c13747..4a98482e837ab8acefb96e1c265f607657cabaa4 100644
--- a/pages/index/index.wxml
+++ b/pages/index/index.wxml
@@ -3,7 +3,7 @@
diff --git a/pages/my/myHouseDetail.wxml b/pages/my/myHouseDetail.wxml
index f1bc6eebc8d1bb07977f15fc2c448b93476fa8aa..dcba18aba043842f7041530ba9378ee3223b44a0 100644
--- a/pages/my/myHouseDetail.wxml
+++ b/pages/my/myHouseDetail.wxml
@@ -5,8 +5,8 @@
-
-
+
+
房屋信息
diff --git a/pages/openDoor/openDoor.wxml b/pages/openDoor/openDoor.wxml
index 9f27b8aa3af72fe705305a240f1d16cc026f0d24..c4bbe7ad47ea1298206030dee6cf5204ca7e3082 100644
--- a/pages/openDoor/openDoor.wxml
+++ b/pages/openDoor/openDoor.wxml
@@ -30,19 +30,14 @@
url="/pages/visitorApplicationKey/visitorApplicationKey"
text="访客钥匙"
/>
-
+
-
+ />
+-->
diff --git a/pages/payParkingFee/payParkingFee.js b/pages/payParkingFee/payParkingFee.js
index 4cb172737dbb1da7dfb626cbb9abd6cb93d7031a..40ac4c201aca353dd6de936752e769a90519dd74 100644
--- a/pages/payParkingFee/payParkingFee.js
+++ b/pages/payParkingFee/payParkingFee.js
@@ -11,9 +11,9 @@ Page({
*/
data: {
showFeeMonth:false,
- feeMonthList:['一个月','半年','一年','两年'],
- feeMonthName:'一个月',
- feeMonth:1,
+ feeMonthList:[],
+ feeMonthName:'',
+ feeMonth:0,
endTime:'',
ordEndTime:'',
amount:0,
@@ -22,7 +22,8 @@ Page({
communityId:'',
communityName:'',
- feeId:''
+ feeId:'',
+ paymentCycles: []
},
@@ -32,11 +33,19 @@ Page({
onLoad: function (options) {
let _fee = JSON.parse(options.fee);
console.log('_fee',_fee);
- let _receivableAmount = this.data.feeMonth * _fee.feePrice * 100;
+
let _communityInfo = context.getCurrentCommunity();
let _lastDate = new Date(_fee.endTime);
- let _endTime = util.date.addMonth(_lastDate, this.data.feeMonth);
-
+ let _paymentCycle = _fee.paymentCycle;
+ let _paymentCycles = [];
+ let _feeMonthList = [];
+ let _receivableAmount = _paymentCycle * _fee.feePrice * 100;
+ let _endTime = util.date.addMonth(_lastDate, _paymentCycle);
+
+ for (let _index = 1; _index < 6; _index++) {
+ _paymentCycles.push(_index * parseInt(_paymentCycle));
+ _feeMonthList.push((_index * parseInt(_paymentCycle)) + "个月");
+ }
this.setData({
receivableAmount: _receivableAmount,
communityId: _communityInfo.communityId,
@@ -47,7 +56,11 @@ Page({
feeId:_fee.feeId,
feePrice: _fee.feePrice,
endTime: util.date.formatDate(_endTime),
- ordEndTime: _fee.endTime
+ ordEndTime: _fee.endTime,
+ feeMonth: _paymentCycle,
+ feeMonthName: _paymentCycle + '个月',
+ paymentCycles: _paymentCycles,
+ feeMonthList: _feeMonthList,
});
var pages = getCurrentPages();
@@ -115,18 +128,18 @@ Page({
console.log("onConfirm", e);
let _feeMonthName = null;
_feeMonthName = e.detail.value;
- let _feeMonth = 1;
- if (_feeMonthName == '一个月'){
- _feeMonth = 1;
- } else if (_feeMonthName == '半年'){
- _feeMonth = 6;
- } else if (_feeMonthName == '一年') {
- _feeMonth = 12;
- } else if (_feeMonthName == '两年') {
- _feeMonth = 24;
- }else{
- return ;
- }
+ let _feeMonth = this.data.paymentCycles[e.detail.index];
+ // if (_feeMonthName == '一个月'){
+ // _feeMonth = 1;
+ // } else if (_feeMonthName == '半年'){
+ // _feeMonth = 6;
+ // } else if (_feeMonthName == '一年') {
+ // _feeMonth = 12;
+ // } else if (_feeMonthName == '两年') {
+ // _feeMonth = 24;
+ // }else{
+ // return ;
+ // }
let _receivableAmount = _feeMonth * this.data.feePrice * 100;
@@ -159,7 +172,8 @@ Page({
communityId: this.data.communityId,
feeId: this.data.feeId,
feeName: '停车费',
- receivedAmount: _receivedAmount
+ receivedAmount: _receivedAmount,
+ tradeType: 'JSAPI'
}
context.request({
diff --git a/pages/payParkingFeeList/payParkingFeeList.js b/pages/payParkingFeeList/payParkingFeeList.js
index cb0e32714a77c820b7a5d7e919286e760f834fbf..2985c95a9e922727414d5754fd3f3f1d792abbe2 100644
--- a/pages/payParkingFeeList/payParkingFeeList.js
+++ b/pages/payParkingFeeList/payParkingFeeList.js
@@ -138,6 +138,7 @@ Page({
_tmpParkingSpace.feeTypeCdName = _fee.feeTypeCdName;
_tmpParkingSpace.feeName = _fee.feeName;
_tmpParkingSpace.feeId = _fee.feeId;
+ _tmpParkingSpace.paymentCycle = _fee.paymentCycle;
_that.data.moreParkingSpaces.push(_tmpParkingSpace);
});
_that.setData({
diff --git a/pages/roomFee/roomFee.js b/pages/roomFee/roomFee.js
index 2e095f258ec287eff201f98a44a64c052d7fb90f..e11c31f3b3c2532239396c6bcd3968d81c06d46a 100644
--- a/pages/roomFee/roomFee.js
+++ b/pages/roomFee/roomFee.js
@@ -11,7 +11,7 @@ Page({
*/
data: {
showFeeMonth: false,
- feeMonthList: ['一个月', '半年', '一年', '两年'],
+ feeMonthList: [],
feeMonthName: '一个月',
feeMonth: 1,
endTime: '',
@@ -26,7 +26,8 @@ Page({
unitNum: '',
roomNum: '',
layer: '',
- builtUpArea: ''
+ builtUpArea: '',
+ paymentCycles: []
},
@@ -37,10 +38,21 @@ Page({
let _fee = JSON.parse(options.fee);
console.log('_fee', _fee);
let _amount = _fee.amount;
- let _receivableAmount = _amount* 100;
+
let _communityInfo = context.getCurrentCommunity();
+
+ let _paymentCycle = _fee.paymentCycle;
+ let _paymentCycles = [];
+ let _feeMonthList = [];
+ let _receivableAmount = _paymentCycle * _amount * 100;
let _lastDate = new Date(_fee.endTime);
- let _endTime = util.date.addMonth(_lastDate, this.data.feeMonth);
+ let _endTime = util.date.addMonth(_lastDate, _paymentCycle);
+ console.log(_paymentCycle)
+
+ for(let _index = 1;_index < 6 ;_index++){
+ _paymentCycles.push(_index * parseInt(_paymentCycle));
+ _feeMonthList.push((_index * parseInt(_paymentCycle))+"个月");
+ }
this.setData({
receivableAmount: _receivableAmount,
@@ -56,7 +68,11 @@ Page({
amount: _amount,
additionalAmount: _fee.additionalAmount,
endTime: util.date.formatDate(_endTime),
- ordEndTime: _fee.endTime
+ ordEndTime: _fee.endTime,
+ paymentCycles: _paymentCycles,
+ feeMonthList: _feeMonthList,
+ feeMonth: _paymentCycle,
+ feeMonthName: _paymentCycle +'个月'
});
var pages = getCurrentPages();
var prevPage = pages[pages.length - 2]; //上一个页面
@@ -123,18 +139,18 @@ Page({
console.log("onConfirm", e);
let _feeMonthName = null;
_feeMonthName = e.detail.value;
- let _feeMonth = 1;
- if (_feeMonthName == '一个月') {
- _feeMonth = 1;
- } else if (_feeMonthName == '半年') {
- _feeMonth = 6;
- } else if (_feeMonthName == '一年') {
- _feeMonth = 12;
- } else if (_feeMonthName == '两年') {
- _feeMonth = 24;
- } else {
- return;
- }
+ let _feeMonth = this.data.paymentCycles[e.detail.index];
+ // if (_feeMonthName == '一个月') {
+ // _feeMonth = 1;
+ // } else if (_feeMonthName == '半年') {
+ // _feeMonth = 6;
+ // } else if (_feeMonthName == '一年') {
+ // _feeMonth = 12;
+ // } else if (_feeMonthName == '两年') {
+ // _feeMonth = 24;
+ // } else {
+ // return;
+ // }
let _receivableAmount = _feeMonth * this.data.amount * 100;
@@ -167,7 +183,8 @@ Page({
communityId: this.data.communityId,
feeId: this.data.feeId,
feeName:'物业费',
- receivedAmount: _receivedAmount
+ receivedAmount: _receivedAmount,
+ tradeType:'JSAPI'
}
context.request({
diff --git a/pages/roomFeeList/roomFeeList.js b/pages/roomFeeList/roomFeeList.js
index 5acfcf0713d112ca9371113928a97b45e5cef46a..fb2b049f17097c09b84da9bd3fc632a3a12fce00 100644
--- a/pages/roomFeeList/roomFeeList.js
+++ b/pages/roomFeeList/roomFeeList.js
@@ -133,6 +133,7 @@ Page({
_tmpRoom.amount = _roomFee.feePrice;
_tmpRoom.feeId = _roomFee.feeId;
_tmpRoom.feeName = _roomFee.feeName;
+ _tmpRoom.paymentCycle = _roomFee.paymentCycle;
_that.data.moreRooms.push(_tmpRoom);
});
_that.setData({
diff --git a/pages/viewBindOwner/viewBindOwner.js b/pages/viewBindOwner/viewBindOwner.js
index 86313078a54dff507ee8dc9bd277aa879949d355..1a8994f6e8783595525deed28c80c3291147c2e9 100644
--- a/pages/viewBindOwner/viewBindOwner.js
+++ b/pages/viewBindOwner/viewBindOwner.js
@@ -96,9 +96,10 @@ Page({
let _that = this;
context.getOwner(function(_ownerInfo){
if(_ownerInfo){
- let _active = _ownerInfo.state == '10000'?1:2
+ let _active = _ownerInfo.state == '10000'?1:2;
+ let _areaName = _ownerInfo.parentAreaName + _ownerInfo.areaName;
_that.setData({
- areaName: '西宁市城东区',
+ areaName: _areaName,
communityId: _ownerInfo.communityId,
communityName: _ownerInfo.communityName,
appUserName: _ownerInfo.appUserName,
diff --git a/pages/viewHeadImg/viewHeadImg.js b/pages/viewHeadImg/viewHeadImg.js
deleted file mode 100644
index d89bbbfd06aa879ae25d8011a737300992f6f106..0000000000000000000000000000000000000000
--- a/pages/viewHeadImg/viewHeadImg.js
+++ /dev/null
@@ -1,90 +0,0 @@
-// pages/viewPersonHeaderImg/viewPersonHeaderImg.js
-const context = require("../../context/Java110Context.js");
-const constant = context.constant;
-Page({
-
- /**
- * 页面的初始数据
- */
- data: {
- headerImg:null,
- btnValue:"上传人脸"
- },
-
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad: function (options) {
- this.setData({
- headerImg:''
- });
- },
-
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady: function () {
-
- },
-
- /**
- * 生命周期函数--监听页面显示
- */
- onShow: function () {
- this.loadOwnerHeaderImg();
- },
-
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide: function () {
-
- },
-
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload: function () {
-
- },
-
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh: function () {
-
- },
-
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom: function () {
-
- },
-
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage: function () {
-
- },
- collectHeadImg:function(){
- //上传头像
- console.log('上传头像');
- wx.navigateTo({
- url: '/pages/collectHeaderImg/collectHeaderImg',
- })
- },
- /**
- * 查询业主人脸
- */
- loadOwnerHeaderImg:function(){
- let _that = this;
- context.getOwner(function(_owner){
- let _headerImg = constant.url.getOwnerPhotoPath + "?objId=" + _owner.memberId+"&communityId="+_owner.communityId+"&fileTypeCd=10000&time=" + new Date();
- _that.setData({
- headerImg: _headerImg
- });
- });
- }
-})
\ No newline at end of file
diff --git a/pages/viewHeadImg/viewHeadImg.json b/pages/viewHeadImg/viewHeadImg.json
deleted file mode 100644
index 7b497b19363515433960fe65a1f16a90dafda282..0000000000000000000000000000000000000000
--- a/pages/viewHeadImg/viewHeadImg.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "navigationBarTitleText": "我的头像"
-}
\ No newline at end of file
diff --git a/pages/viewHeadImg/viewHeadImg.wxml b/pages/viewHeadImg/viewHeadImg.wxml
deleted file mode 100644
index f4625a158ca19f2ef8869ebd6ef6749f0dd563c0..0000000000000000000000000000000000000000
--- a/pages/viewHeadImg/viewHeadImg.wxml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
-
- 人脸信息
-
-
-
-
-
-
-
-
-
- {{btnValue}}
-
-
-
-
-
-
diff --git a/pages/viewHeadImg/viewHeadImg.wxss b/pages/viewHeadImg/viewHeadImg.wxss
deleted file mode 100644
index adce5ca3a0f0ff172f5eb6406ab3b69520b2fc83..0000000000000000000000000000000000000000
--- a/pages/viewHeadImg/viewHeadImg.wxss
+++ /dev/null
@@ -1,51 +0,0 @@
-.vpf_context{
- padding: 30rpx 20rpx;
-}
-.vpf_context .vpf_row{
- background-color: #fff;
- overflow:hidden;
-}
-
-.vpf_row_black{
- height: 40rpx;
-}
-
-.vpf_row_title{
- padding-left: 40rpx;
- font-size: 31rpx;
- font-weight: 700;
-
-}
-.vpf_row_col{
- text-align: center;
-}
-.vpf_row_top{
- margin-top: 60rpx;
-}
-.vpf_row_black_01{
- height: 80rpx;
-}
-.vpf_row_black_02{
- height: 100rpx;
-}
-.vpf_row_black_03{
- height: 140rpx;
-}
-.vpf_row_black_04{
- height: 40rpx;
-}
-.vpf_icon_text{
- font-size: 100rpx;
- color: #00AA00;
-}
-.vpf_row_col_t text{
- font-size: 30rpx;
- color: #8a8a8a;
-}
-.vpf_btn{
- width: 80%;
- margin:0 auto;
-}
-.vpf_image{
- text-align: center
-}
\ No newline at end of file
diff --git a/project.config.json b/project.config.json
index 376bbf5a473e47d4fe95bfd347dceabf3acf3e61..b0462ac6179b933c500df2f034c9b935a07b5790 100644
--- a/project.config.json
+++ b/project.config.json
@@ -29,7 +29,7 @@
"compileType": "miniprogram",
"libVersion": "2.9.4",
"isGameTourist": false,
- "appid": "wxf83d66b0e9f5964d",
+ "appid": "wxfecd955f5ce1bb20",
"projectname": "WechatOwnerService",
"simulatorType": "wechat",
"simulatorPluginLibVersion": {},