From 84ff5007245a1f82e98b551a9a9e04115c01cce9 Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: Thu, 6 Feb 2020 20:45:10 +0800
Subject: [PATCH 1/9] =?UTF-8?q?=E4=B8=8A=E7=BA=BF=E7=89=88=E6=9C=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app.json | 2 -
app.json.bak | 2 +-
pages/collectHeaderImg/collectHeaderImg.js | 146 -------------------
pages/collectHeaderImg/collectHeaderImg.json | 3 -
pages/collectHeaderImg/collectHeaderImg.wxml | 19 ---
pages/collectHeaderImg/collectHeaderImg.wxss | 31 ----
pages/openDoor/openDoor.wxml | 13 +-
pages/viewHeadImg/viewHeadImg.js | 90 ------------
pages/viewHeadImg/viewHeadImg.json | 3 -
pages/viewHeadImg/viewHeadImg.wxml | 27 ----
pages/viewHeadImg/viewHeadImg.wxss | 51 -------
11 files changed, 5 insertions(+), 382 deletions(-)
delete mode 100644 pages/collectHeaderImg/collectHeaderImg.js
delete mode 100644 pages/collectHeaderImg/collectHeaderImg.json
delete mode 100644 pages/collectHeaderImg/collectHeaderImg.wxml
delete mode 100644 pages/collectHeaderImg/collectHeaderImg.wxss
delete mode 100644 pages/viewHeadImg/viewHeadImg.js
delete mode 100644 pages/viewHeadImg/viewHeadImg.json
delete mode 100644 pages/viewHeadImg/viewHeadImg.wxml
delete mode 100644 pages/viewHeadImg/viewHeadImg.wxss
diff --git a/app.json b/app.json
index d338c83..f7616b5 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",
diff --git a/app.json.bak b/app.json.bak
index 2fde493..d338c83 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/pages/collectHeaderImg/collectHeaderImg.js b/pages/collectHeaderImg/collectHeaderImg.js
deleted file mode 100644
index 6410b5c..0000000
--- 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 ca35364..0000000
--- 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 31336f3..0000000
--- 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 2403535..0000000
--- 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/openDoor/openDoor.wxml b/pages/openDoor/openDoor.wxml
index 9f27b8a..c4bbe7a 100644
--- a/pages/openDoor/openDoor.wxml
+++ b/pages/openDoor/openDoor.wxml
@@ -30,19 +30,14 @@
url="/pages/visitorApplicationKey/visitorApplicationKey"
text="访客钥匙"
/>
-
+
-
+ />
+-->
diff --git a/pages/viewHeadImg/viewHeadImg.js b/pages/viewHeadImg/viewHeadImg.js
deleted file mode 100644
index d89bbbf..0000000
--- 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 7b497b1..0000000
--- 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 f4625a1..0000000
--- 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 adce5ca..0000000
--- 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
--
Gitee
From f59d339d86e696c1ebdc16d26f1b3dbede10057d Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: Tue, 11 Feb 2020 00:03:02 +0800
Subject: [PATCH 2/9] =?UTF-8?q?=E5=8A=A0=E5=85=A5=20=E9=AA=8C=E8=AF=81?=
=?UTF-8?q?=E7=A0=81=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
constant/MappingConstant.js | 1 +
constant/UrlConstant.js | 9 +-
pages/bindOwner/bindOwner.js | 199 ++++++++++++++++++++++-----------
pages/bindOwner/bindOwner.wxml | 2 +-
pages/index/index.js | 42 ++++++-
5 files changed, 185 insertions(+), 68 deletions(-)
diff --git a/constant/MappingConstant.js b/constant/MappingConstant.js
index f49754a..f42791e 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 6b0f86d..01c2528 100644
--- a/constant/UrlConstant.js
+++ b/constant/UrlConstant.js
@@ -11,6 +11,8 @@ const baseUrl = 'https://app.demo.winqi.cn/';
//const baseUrl = 'http://hc.demo.winqi.cn:8012/';
const hcBaseUrl = 'https://hc.demo.winqi.cn';
+//获取环境
+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/pages/bindOwner/bindOwner.js b/pages/bindOwner/bindOwner.js
index 95b69f1..e903835 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 = "请填写验证码";
@@ -163,16 +211,16 @@ Page({
url: constant.url.appUserBindingOwner,
header: context.getHeaders(),
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 +229,7 @@ Page({
duration: 2000
});
},
- fail:function(e){
+ fail: function(e) {
wx.hideLoading();
wx.showToast({
title: "服务器异常了",
@@ -193,8 +241,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 +251,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 1dd8f5b..58d6602 100644
--- a/pages/bindOwner/bindOwner.wxml
+++ b/pages/bindOwner/bindOwner.wxml
@@ -12,7 +12,7 @@
- 发送验证码
+ {{btnValue}}
diff --git a/pages/index/index.js b/pages/index/index.js
index 0466feb..4213576 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',
--
Gitee
From ffae8fbd89d4264ecf59332897a0aaf91768c0fd Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: Sun, 17 May 2020 11:52:24 +0800
Subject: [PATCH 3/9] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=94=AF=E4=BB=98?=
=?UTF-8?q?=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/roomFee/roomFee.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pages/roomFee/roomFee.js b/pages/roomFee/roomFee.js
index 2e095f2..052e016 100644
--- a/pages/roomFee/roomFee.js
+++ b/pages/roomFee/roomFee.js
@@ -167,7 +167,8 @@ Page({
communityId: this.data.communityId,
feeId: this.data.feeId,
feeName:'物业费',
- receivedAmount: _receivedAmount
+ receivedAmount: _receivedAmount,
+ tradeType:'JSAPI'
}
context.request({
--
Gitee
From 0a7533f0ad67a2fc817fd3ddaed758b3281e94f7 Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: Fri, 5 Jun 2020 15:30:08 +0800
Subject: [PATCH 4/9] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86?=
=?UTF-8?q?=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/my/myHouseDetail.wxml | 4 ++--
pages/viewBindOwner/viewBindOwner.js | 5 +++--
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/pages/my/myHouseDetail.wxml b/pages/my/myHouseDetail.wxml
index f1bc6ee..dcba18a 100644
--- a/pages/my/myHouseDetail.wxml
+++ b/pages/my/myHouseDetail.wxml
@@ -5,8 +5,8 @@
-
-
+
+
房屋信息
diff --git a/pages/viewBindOwner/viewBindOwner.js b/pages/viewBindOwner/viewBindOwner.js
index 8631307..1a8994f 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,
--
Gitee
From 8c0869021379ebcb17ab52894cd6b5e41ad1a633 Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: Fri, 5 Jun 2020 17:06:16 +0800
Subject: [PATCH 5/9] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E8=AD=A6=E5=91=8A?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
constant/AppConstant.js | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/constant/AppConstant.js b/constant/AppConstant.js
index 6003224..341df68 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 = "";
--
Gitee
From 2a95e66fbc96f3ce311608a571f954dca0607505 Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: Fri, 5 Jun 2020 18:29:19 +0800
Subject: [PATCH 6/9] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/payParkingFee/payParkingFee.js | 56 ++++++++++++--------
pages/payParkingFeeList/payParkingFeeList.js | 1 +
pages/roomFee/roomFee.js | 50 +++++++++++------
pages/roomFeeList/roomFeeList.js | 1 +
4 files changed, 70 insertions(+), 38 deletions(-)
diff --git a/pages/payParkingFee/payParkingFee.js b/pages/payParkingFee/payParkingFee.js
index 4cb1727..40ac4c2 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 cb0e327..2985c95 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 052e016..e11c31f 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;
diff --git a/pages/roomFeeList/roomFeeList.js b/pages/roomFeeList/roomFeeList.js
index 5acfcf0..fb2b049 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({
--
Gitee
From bd9e1a13fa5c986e08b6004e5ebf7c3836c58da7 Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: Sun, 7 Jun 2020 22:16:03 +0800
Subject: [PATCH 7/9] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=BB=91=E5=AE=9A?=
=?UTF-8?q?=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
context/Java110Context.js | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/context/Java110Context.js b/context/Java110Context.js
index 947907b..c2a8f88 100644
--- a/context/Java110Context.js
+++ b/context/Java110Context.js
@@ -14,12 +14,17 @@ 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',
+ user_id: userId,
cookie: '_java110_token_=' + wx.getStorageSync('token')
}
}
--
Gitee
From 02cacb9729e23d874b45c590f7a9c91404c2b285 Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: Sun, 7 Jun 2020 22:43:02 +0800
Subject: [PATCH 8/9] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=B0=8F=E7=A8=8B?=
=?UTF-8?q?=E5=BA=8F=20=E7=BB=91=E5=AE=9A=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app.json | 2 +-
constant/UrlConstant.js | 4 ++--
context/Java110Context.js | 20 ++++++++++----------
factory/LoginFactory.js | 2 +-
pages/bindOwner/bindOwner.js | 10 +++++++++-
pages/index/index.json | 2 +-
pages/index/index.wxml | 2 +-
project.config.json | 2 +-
8 files changed, 26 insertions(+), 18 deletions(-)
diff --git a/app.json b/app.json
index f7616b5..cef32b6 100644
--- a/app.json
+++ b/app.json
@@ -41,7 +41,7 @@
"window": {
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#00AA00",
- "navigationBarTitleText": "HC智慧小区"
+ "navigationBarTitleText": "融生活智慧社区"
},
"tabBar": {
"color": "#272636",
diff --git a/constant/UrlConstant.js b/constant/UrlConstant.js
index 01c2528..4d39d9d 100644
--- a/constant/UrlConstant.js
+++ b/constant/UrlConstant.js
@@ -7,9 +7,9 @@
// 服务器域名
-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';
diff --git a/context/Java110Context.js b/context/Java110Context.js
index c2a8f88..4d4dfc9 100644
--- a/context/Java110Context.js
+++ b/context/Java110Context.js
@@ -14,18 +14,18 @@ const factory = require('../factory/index.js');
* 获取请后台服务时的头信息
*/
const getHeaders = function() {
- let _userInfo = getUserInfo();
+ //let _userInfo = getUserInfo();
let userId = '-1';
- if (_userInfo != null || _userInfo != undefined){
- userId = _userInfo.userId;
- }
+ //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: userId,
- 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 6559b3e..3116386 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 e903835..88c43fe 100644
--- a/pages/bindOwner/bindOwner.js
+++ b/pages/bindOwner/bindOwner.js
@@ -207,9 +207,17 @@ 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) {
diff --git a/pages/index/index.json b/pages/index/index.json
index a707c91..747e735 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 4a3a16d..4a98482 100644
--- a/pages/index/index.wxml
+++ b/pages/index/index.wxml
@@ -3,7 +3,7 @@
diff --git a/project.config.json b/project.config.json
index 376bbf5..b0462ac 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": {},
--
Gitee
From d9d9f450d1482a905e1a0829f42939cbbad10ad4 Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: Sun, 7 Jun 2020 22:45:32 +0800
Subject: [PATCH 9/9] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=B0=8F=E7=A8=8B?=
=?UTF-8?q?=E5=BA=8F=20=E7=BB=91=E5=AE=9A=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/complaint/complaint.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/pages/complaint/complaint.js b/pages/complaint/complaint.js
index a0a391e..7ca03ef 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);
--
Gitee