diff --git a/app.js b/app.js
index 1887cbe..6aa13df 100644
--- a/app.js
+++ b/app.js
@@ -10,8 +10,8 @@ App({
onLaunch() {
this.globalData.sysinfo = wx.getSystemInfoSync()
// wx885b65d99da00084
- // wx20de9fe5943934a1 公寓
- plugin.init('wx20de9fe5943934a1', '458f9df0-3405-66a9-1cdb-49d5f4197e6a')
+ // wx20de9fe5943934a1 公寓 '458f9df0-3405-66a9-1cdb-49d5f4197e6a'
+ plugin.init('wx885b65d99da00084', '4f24f9d7-3cae-4f3b-b48C-5429544f617b')
.then(function(res){
console.log('res', res)
if(res.code != 200){
@@ -20,21 +20,21 @@ App({
})
}
})
- // wx.login({
- // success (res) {
- // if (res.code) {
- // let data={
- // code:res.code
- // }
- // WXAPI.getOpenId(data).then(res=>{
- // console.log(res)
- // wx.setStorageSync('openid', res.openid)
- // })
- // } else {
- // console.log('登录失败!' + res.errMsg)
- // }
- // }
- // })
+ wx.login({
+ success (res) {
+ if (res.code) {
+ let data={
+ code:res.code
+ }
+ WXAPI.getOpenId(data).then(res=>{
+ console.log(res)
+ wx.setStorageSync('openid', res.openid)
+ })
+ } else {
+ console.log('登录失败!' + res.errMsg)
+ }
+ }
+ })
// 展示本地存储能力
var logs = wx.getStorageSync('token') || ''
var userRole = wx.getStorageSync('userRole') || ''
diff --git a/app.json b/app.json
index f223a0c..2a112fe 100644
--- a/app.json
+++ b/app.json
@@ -36,14 +36,15 @@
"faceinfo/faceinfo",
"selectFace/selectFace",
"newconstructionitem/newconstructionitem",
- "activatePayment/activatePayment"
+ "activatePayment/activatePayment",
+ "orderList/orderList"
]
}
],
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#02BFFF",
- "navigationBarTitleText": "智慧公寓管理系统",
+ "navigationBarTitleText": "小之锁",
"navigationBarTextStyle": "white"
},
"plugins": {
diff --git a/pages/login/login.wxml b/pages/login/login.wxml
index 915e900..6acfe76 100644
--- a/pages/login/login.wxml
+++ b/pages/login/login.wxml
@@ -1,7 +1,7 @@
-
+
diff --git a/pages/my/my.wxml b/pages/my/my.wxml
index e9ef35f..ad57bb8 100644
--- a/pages/my/my.wxml
+++ b/pages/my/my.wxml
@@ -77,6 +77,17 @@
+
+
+
+
+ 订单列表
+
+
+
+
+
+
-
diff --git a/pages/rentManagement/rentManagement.js b/pages/rentManagement/rentManagement.js
index 686b74f..348a575 100644
--- a/pages/rentManagement/rentManagement.js
+++ b/pages/rentManagement/rentManagement.js
@@ -43,7 +43,8 @@ Page({
leases:{},
selectKey:'',
selectRoomName:'',
- pid:''
+ pid:'',
+ siteOrder:{}
},
/**
@@ -225,13 +226,24 @@ validObject(obj) {
},
rentMethods(e){
let leases = e.currentTarget.dataset.item
- // wx.setStorageSync('leases', leases)
- // wx.navigateTo({
- // url: '/pages/paymentInterface/paymentInterface?type=1',
- // data:{
-
- // }
- // })
+ let data={
+ q:JSON.stringify({
+ sid:leases.siteId
+ })
+ }
+ WXAPI.getItemsPay(data).then(res2=>{
+ if(res2.success){
+ this.setData({
+ siteOrder:res2.data.list[0]
+ })
+ }else{
+ wx.showToast({
+ title: res2.message,
+ duration:200,
+ icon:'none'
+ })
+ }
+ })
this.setData({
show:true,
leases
diff --git a/pagesA/orderList/orderList.js b/pagesA/orderList/orderList.js
new file mode 100644
index 0000000..23a6ae8
--- /dev/null
+++ b/pagesA/orderList/orderList.js
@@ -0,0 +1,176 @@
+// pagesA/orderList/orderList.js
+const app = getApp()
+const WXAPI = require('../../utils/request')
+import moment from '../../utils/moment'
+var util = require('../../utils/util');
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ active:0,
+ orderLogList:[],
+ pageSize:10,
+ pageNum:1,
+ radio:'2',
+ leases:{},
+ show:false
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.getOrderList()
+ },
+
+ onChange(event){
+ this.setData({
+ active:event.detail.name
+ })
+ if(event.detail.name=='0'){
+ this.getOrderList()
+ }else if(event.detail.name==1){
+ this.getOrderList()
+ }else if(event.detail.name==2){
+ this.getOrderList()
+ }
+ },
+ onClose() {
+ this.setData({ show: false });
+ },
+ confirmMethods(event) {
+ this.confimPay()
+ },
+ confimPay(){
+ let leases =this.data.leases
+ let userInfo = wx.getStorageSync('userInfo')
+ var data = {
+ description: "交租",
+ productName: "交租",
+ total: parseInt(leases.monthRent)*100,//parseInt(this.data.leases.expand.rent)*100,
+ userId: leases.cardId,
+ cardId:leases.cardId,
+ openid:wx.getStorageSync('openid'),
+ appid:'wx20de9fe5943934a1',
+ uid:userInfo.id,
+ eid:userInfo.enterpriseId,
+ orderType:1,
+ payType:this.data.radio,
+ expand:JSON.stringify({
+ phone:leases.phone,
+ nickname:leases.name
+ })
+ }
+ // WXAPI.miniPrepayOrder(data).then(res=>{
+ // let dataOne={
+ // code: "wx/updatePrepayStatus",
+ // data: {
+ // orderNo: res.data.data.orderNo,
+ // status:0
+ // }
+ // }
+ // WXAPI.sendCommand(dataOne).then(res2=>{
+ // if(res2.success){
+ // wx.showToast({
+ // title: "支付成功",
+ // duration: 2000,
+ // icon: 'success'
+ // })
+ // }else{
+ // wx.showToast({
+ // title: res2.message,
+ // duration: 2000,
+ // icon: 'error'
+ // })
+ // }
+ // })
+ // })
+ },
+ onChangeRadio(event){
+ this.setData({
+ radio: event.detail,
+ });
+ },
+ rentMethods(e){
+ let leases = e.currentTarget.dataset.item
+ this.setData({
+ show:true,
+ leases
+ })
+ },
+ getOrderList(){
+ let data={
+ pageSize:this.data.pageSize,
+ pageNum:this.data.pageNum,
+ q:JSON.stringify({
+ orderStatus:this.data.active
+ })
+ }
+ WXAPI.getSiteOrder(data).then(res=>{
+ if(res.success){
+ res.data.list.map(li=>{
+ li.createTime = moment(li.createTime).format('YYYY-MM-DD HH:mm:ss')
+ })
+ this.setData({
+ orderLogList:res.data.list
+ })
+ }else{
+ wx.showToast({
+ title: res.message,
+ duration:200,
+ icon:'none'
+ })
+ }
+ })
+ },
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pagesA/orderList/orderList.json b/pagesA/orderList/orderList.json
new file mode 100644
index 0000000..861b550
--- /dev/null
+++ b/pagesA/orderList/orderList.json
@@ -0,0 +1,10 @@
+{
+ "usingComponents": {
+ "van-tab": "../../components/dist/tab/index",
+ "van-tabs": "../../components/dist/tabs/index",
+ "van-empty": "../../components/dist/empty/index",
+ "van-radio": "../../components/dist/radio/index",
+ "van-radio-group": "../../components/dist/radio-group/index",
+ "van-dialog": "../../components/dist/dialog/index"
+ }
+}
\ No newline at end of file
diff --git a/pagesA/orderList/orderList.wxml b/pagesA/orderList/orderList.wxml
new file mode 100644
index 0000000..2352d87
--- /dev/null
+++ b/pagesA/orderList/orderList.wxml
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 去支付
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 现金
+ 刷卡
+ 微信支付
+
+
\ No newline at end of file
diff --git a/pagesA/orderList/orderList.wxss b/pagesA/orderList/orderList.wxss
new file mode 100644
index 0000000..1614ec3
--- /dev/null
+++ b/pagesA/orderList/orderList.wxss
@@ -0,0 +1,36 @@
+/* pagesA/orderList/orderList.wxss */
+.box{
+ padding: 10rpx;
+ box-shadow: 10px ;
+}
+.voucher-list{
+ box-sizing: border-box;
+ padding: 10rpx;
+ width: 100%;
+}
+.voucher-item{
+ width: 90%;
+ margin: 20rpx auto;
+ border-radius: 20rpx;
+ border: 2rpx solid #eee;
+ box-shadow: 2rpx 2rpx 10rpx #eee;
+ padding: 20rpx;
+}
+.voucheritem{
+ display: flex;
+ justify-content: space-between;
+ padding: 10rpx;
+}
+.btn{
+ margin-top: 10rpx;
+ width: 20%;
+ height: 50rpx;
+ border: 2rpx solid #e54857;
+ border-radius: 10rpx;
+ text-align: center;
+ line-height: 50rpx;
+ background-color: #e54857;
+ color: #ffffff;
+ font-size: 32rpx;
+ margin: 0 0 0 80%;
+}
diff --git a/project.config.json b/project.config.json
index 0a5e63b..aea2608 100644
--- a/project.config.json
+++ b/project.config.json
@@ -1,82 +1,82 @@
{
- "description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
- "packOptions": {
- "ignore": [
- {
- "value": ".eslintrc.js",
- "type": "file"
- }
- ],
- "include": []
+ "description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
+ "packOptions": {
+ "ignore": [
+ {
+ "value": ".eslintrc.js",
+ "type": "file"
+ }
+ ],
+ "include": []
+ },
+ "setting": {
+ "urlCheck": false,
+ "es6": false,
+ "enhance": true,
+ "postcss": true,
+ "preloadBackgroundData": false,
+ "minified": true,
+ "newFeature": false,
+ "coverView": true,
+ "nodeModules": false,
+ "autoAudits": false,
+ "showShadowRootInWxmlPanel": true,
+ "scopeDataCheck": false,
+ "uglifyFileName": false,
+ "checkInvalidKey": true,
+ "checkSiteMap": true,
+ "uploadWithSourceMap": true,
+ "compileHotReLoad": false,
+ "lazyloadPlaceholderEnable": false,
+ "useMultiFrameRuntime": true,
+ "useApiHook": true,
+ "useApiHostProcess": true,
+ "babelSetting": {
+ "ignore": [],
+ "disablePlugins": [],
+ "outputPath": ""
},
- "setting": {
- "urlCheck": false,
- "es6": false,
- "enhance": true,
- "postcss": true,
- "preloadBackgroundData": false,
- "minified": true,
- "newFeature": false,
- "coverView": true,
- "nodeModules": false,
- "autoAudits": false,
- "showShadowRootInWxmlPanel": true,
- "scopeDataCheck": false,
- "uglifyFileName": false,
- "checkInvalidKey": true,
- "checkSiteMap": true,
- "uploadWithSourceMap": true,
- "compileHotReLoad": false,
- "lazyloadPlaceholderEnable": false,
- "useMultiFrameRuntime": true,
- "useApiHook": true,
- "useApiHostProcess": true,
- "babelSetting": {
- "ignore": [],
- "disablePlugins": [],
- "outputPath": ""
- },
- "enableEngineNative": false,
- "useIsolateContext": false,
- "userConfirmedBundleSwitch": false,
- "packNpmManually": false,
- "packNpmRelationList": [],
- "minifyWXSS": true,
- "disableUseStrict": false,
- "minifyWXML": true,
- "showES6CompileOption": false,
- "useCompilerPlugins": false
+ "enableEngineNative": false,
+ "useIsolateContext": true,
+ "userConfirmedBundleSwitch": false,
+ "packNpmManually": false,
+ "packNpmRelationList": [],
+ "minifyWXSS": true,
+ "disableUseStrict": false,
+ "minifyWXML": true,
+ "showES6CompileOption": false,
+ "useCompilerPlugins": false
+ },
+ "compileType": "miniprogram",
+ "libVersion": "2.23.4",
+ "appid": "wx885b65d99da00084",
+ "projectname": "appltegy",
+ "editorSetting": {
+ "tabIndent": "insertSpaces",
+ "tabSize": 4
+ },
+ "simulatorType": "wechat",
+ "simulatorPluginLibVersion": {
+ "qywx_simulator_plugin": "2.4.0"
+ },
+ "condition": {
+ "search": {
+ "list": []
},
- "compileType": "miniprogram",
- "libVersion": "2.23.4",
- "appid": "wx20de9fe5943934a1",
- "projectname": "appltegy",
- "editorSetting": {
- "tabIndent": "insertSpaces",
- "tabSize": 4
+ "conversation": {
+ "list": []
},
- "simulatorType": "wechat",
- "simulatorPluginLibVersion": {
- "qywx_simulator_plugin": "2.4.0"
+ "game": {
+ "list": []
},
- "condition": {
- "search": {
- "list": []
- },
- "conversation": {
- "list": []
- },
- "game": {
- "list": []
- },
- "plugin": {
- "list": []
- },
- "gamePlugin": {
- "list": []
- },
- "miniprogram": {
- "list": []
- }
+ "plugin": {
+ "list": []
+ },
+ "gamePlugin": {
+ "list": []
+ },
+ "miniprogram": {
+ "list": []
}
+ }
}
\ No newline at end of file
diff --git a/static/images/logo2.jpg b/static/images/logo2.jpg
new file mode 100644
index 0000000..eaf585e
Binary files /dev/null and b/static/images/logo2.jpg differ
diff --git a/utils/ICINPakage/ICINLocker.js b/utils/ICINPakage/ICINLocker.js
index c046bf4..307be74 100644
--- a/utils/ICINPakage/ICINLocker.js
+++ b/utils/ICINPakage/ICINLocker.js
@@ -2653,7 +2653,6 @@ export default class ICINLocker {
)
)
);
- console.log("2656", authCode);
authCodeLen = (authCode.length / 2).toString(16).PadLeft(2, "0");
}
let reqData =
@@ -2668,18 +2667,6 @@ export default class ICINLocker {
endTime +
authCodeLen +
authCode;
- console.log("2672", authUserId+"---",
- keyId+"---",
- userId+"---",
- _pwdNo+"---",
- pwd+"---",
- useCountLimit+"---",
- token+"---",
- startTime+"---",
- endTime+"---",
- authCodeLen+"---",
- authCode);
- console.log("2673", reqData, reqData.length, reqData.length / 2, (reqData.length / 2).toString(16), typeof ((reqData.length / 2).toString(16)));
let reqDataLength = (reqData.length / 2).toString(16).PadLeft(2, "0");
let dataModular = cmdId + subCmdId + reqDataLength + reqData;
let dataModularLength = (dataModular.length / 2)
@@ -3800,7 +3787,6 @@ export default class ICINLocker {
String.prototype.PadLeft = function (len, charStr) {
var s = this + "";
- console.log("3794", s);
return new Array(len - s.length + 1).join(charStr, "") + s;
};
@@ -3855,7 +3841,7 @@ function getIIData() {
function datasubpck(datahex) {
var arrayObj = new Array();
let dataPackageLength = packageSize
- console.log('分包大小', dataPackageLength, datahex)
+ console.log('分包大小', dataPackageLength)
for (var i = 0; i < datahex.length; i += dataPackageLength) {
// 预加 最大包长度,如果依然小于总数据长度,可以取最大包数据大小
if (i + dataPackageLength < datahex.length) {
diff --git a/utils/request.js b/utils/request.js
index 0a20089..f611aaa 100644
--- a/utils/request.js
+++ b/utils/request.js
@@ -1,7 +1,7 @@
const app = getApp()
let subDomain = '' // 子域名,没有就等于
-const API_BASE_URL = 'https://apartmentcloud.xiaozhisz.cn/' // 主域名
-// const API_BASE_URL = 'http://test.zhiweisz.cn/' // 主域名
+// const API_BASE_URL = 'https://apartmentcloud.xiaozhisz.cn/' // 主域名
+const API_BASE_URL = 'http://test.zhiweisz.cn/' // 主域名
// const API_BASE_URL = 'https://yktms-cs.utsz.edu.cn/' // 主域名
import JSEncrypt from '../js_sdk/jsencrypt-Rsa/jsencrypt/jsencrypt.min.js';
function setCode(str, text) {
@@ -11,8 +11,8 @@ function setCode(str, text) {
let data = encryptStr.encrypt(text.toString()); // 进行加密
return data;
}
-// let tenantIdEnter='100'
-let tenantIdEnter='1200'
+let tenantIdEnter='100'
+// let tenantIdEnter='1200'
function setTenantId(tenantId){
tenantIdEnter=tenantId
wx.setStorageSync('tenantId',tenantId)
@@ -507,4 +507,6 @@ module.exports = {
getDeviceOperateUserInfo:(data)=>requestOne('v1/device/isp/operateUserInfo','POST',data),
// bleUnlockRecord: (data) => request('v1/zg/bleUnlockRecord','POST', data),//上传蓝牙开锁记录
// bleRspRecord: (data) => request3('http://192.168.1.34:8900/iot/v1/ble/deviceReport','POST', data),//传输蓝牙返回数据包
+ getItemsPay:(data)=>request('v1/price/get/items','POST',data),//计算待支付金额,生成对应订单
+ getSiteOrder:(data)=>request('v1/price/get/siteOrder','POST',data),//获取计算待支付金额订单
}
\ No newline at end of file