Commit 752e0b8b75ab8e669058f30ecd23ab2f9ef6be8e
1 parent
9ea66a4e
登陆
Showing
4 changed files
with
62 additions
and
33 deletions
common/common.js
| ... | ... | @@ -32,13 +32,16 @@ const useraboutUs = serverUrl + "/business/h5/index/aboutUs"; |
| 32 | 32 | const requestSign = function(inputData) { |
| 33 | 33 | |
| 34 | 34 | var jsonList = inputData || {}; |
| 35 | + | |
| 36 | + jsonList.orgId = public_orgId; | |
| 35 | 37 | jsonList.sign_type = "md5"; |
| 36 | 38 | jsonList.app_id = "0eca8f5373ca4866aec2f8e9d9367104"; |
| 37 | 39 | jsonList.deviceInfo = "BC0703A4-AFB0-4B51-9089-9B7487C0CC6E"; |
| 38 | 40 | jsonList.salt = getSalt(); |
| 39 | 41 | jsonList.terminalSource = "11"; |
| 40 | - jsonList.token = getGlobalUser("globalUser").token; | |
| 41 | - // jsonList.token = '84b5a8edb5974f7989e7888b9f48a765'; | |
| 42 | + // jsonList.token = getGlobalUser("globalUser").token; | |
| 43 | + // jsonList.token = getGlobalUser("globalUser").token; | |
| 44 | + jsonList.token = 'eb1538c4c2ee45d7b2610cf071c4a27f'; | |
| 42 | 45 | |
| 43 | 46 | var arrData = []; |
| 44 | 47 | for (var key in jsonList) { |
| ... | ... | @@ -122,4 +125,6 @@ export default { |
| 122 | 125 | indexInfo, |
| 123 | 126 | userLoginout, |
| 124 | 127 | useraboutUs, |
| 128 | + // 通过商户ID查询停车记录信息 | |
| 129 | + getBusinessParkOrderByBusIdForPage:serverUrl + "/business/h5/order/getBusinessParkOrderByBusIdForPage", | |
| 125 | 130 | } | ... | ... |
pages.json
| ... | ... | @@ -13,13 +13,30 @@ |
| 13 | 13 | }, |
| 14 | 14 | "pages": [ |
| 15 | 15 | // pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages |
| 16 | - | |
| 16 | + { | |
| 17 | + "path": "pages/parkRecordList/parkRecordList", | |
| 18 | + "style": { | |
| 19 | + "navigationBarTitleText": "停车记录" | |
| 20 | + } | |
| 21 | + }, | |
| 17 | 22 | { |
| 18 | 23 | "path": "pages/index/index", |
| 19 | 24 | "style": { |
| 20 | 25 | "navigationBarTitleText": "商户管理" |
| 21 | 26 | } |
| 22 | 27 | }, |
| 28 | + | |
| 29 | + { | |
| 30 | + "path": "pages/login/login", | |
| 31 | + "style": { | |
| 32 | + "navigationBarTitleText": "商户中心", | |
| 33 | + "enablePullDownRefresh": false | |
| 34 | + } | |
| 35 | + | |
| 36 | + }, | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 23 | 40 | { |
| 24 | 41 | "path": "pages/businessCard/cardPrint", |
| 25 | 42 | "style": { |
| ... | ... | @@ -58,12 +75,7 @@ |
| 58 | 75 | "navigationBarTitleText": "订单详情" |
| 59 | 76 | } |
| 60 | 77 | }, |
| 61 | - { | |
| 62 | - "path": "pages/parkRecordList/parkRecordList", | |
| 63 | - "style": { | |
| 64 | - "navigationBarTitleText": "停车记录" | |
| 65 | - } | |
| 66 | - }, | |
| 78 | + | |
| 67 | 79 | { |
| 68 | 80 | "path": "pages/parkPay/parkPay", |
| 69 | 81 | "style": { |
| ... | ... | @@ -127,14 +139,7 @@ |
| 127 | 139 | "navigationBarTitleText": "账单详情" |
| 128 | 140 | } |
| 129 | 141 | }, |
| 130 | - { | |
| 131 | - "path": "pages/login/login", | |
| 132 | - "style": { | |
| 133 | - "navigationBarTitleText": "商户中心", | |
| 134 | - "enablePullDownRefresh": false | |
| 135 | - } | |
| 136 | - | |
| 137 | - }, { | |
| 142 | + { | |
| 138 | 143 | "path": "pages/setting/setting", |
| 139 | 144 | "style": { |
| 140 | 145 | "navigationBarTitleText": "设置", | ... | ... |
pages/index/index.vue
| ... | ... | @@ -48,7 +48,7 @@ |
| 48 | 48 | </view> |
| 49 | 49 | <view class="index-title">停车缴费</view> |
| 50 | 50 | </view> |
| 51 | - <view class="flex-item"> | |
| 51 | + <view class="flex-item" @click="toRecordPage"> | |
| 52 | 52 | <view class=""> |
| 53 | 53 | <image src="../../static/me/me-recoder.png" class="index-icon"></image> |
| 54 | 54 | </view> |
| ... | ... | @@ -187,6 +187,14 @@ |
| 187 | 187 | |
| 188 | 188 | }); |
| 189 | 189 | }, |
| 190 | + toRecordPage() { | |
| 191 | + uni.navigateTo({ | |
| 192 | + url: '../parkRecordList/parkRecordList' | |
| 193 | + | |
| 194 | + }); | |
| 195 | + }, | |
| 196 | + | |
| 197 | + | |
| 190 | 198 | } |
| 191 | 199 | } |
| 192 | 200 | </script> | ... | ... |
pages/parkRecordList/parkRecordList.vue
| 1 | 1 | <template> |
| 2 | 2 | <view> |
| 3 | 3 | <!--<view class="uni-title uni-common-pl">日期选择器</view>--> |
| 4 | - | |
| 5 | - | |
| 4 | + | |
| 5 | + | |
| 6 | 6 | <view class="uni-list"> |
| 7 | 7 | <view class="uni-list-cell"> |
| 8 | 8 | <view class="uni-list-cell-left"> |
| ... | ... | @@ -71,12 +71,8 @@ |
| 71 | 71 | </template> |
| 72 | 72 | |
| 73 | 73 | <script> |
| 74 | -import common from "../../common/common.js"; | |
| 75 | -import requestServer from "../../common/requestServer.js"; | |
| 76 | - | |
| 77 | 74 | |
| 78 | 75 | export default { |
| 79 | - | |
| 80 | 76 | data() { |
| 81 | 77 | const currentDate = this.getDate({ |
| 82 | 78 | format: true |
| ... | ... | @@ -100,8 +96,7 @@ export default { |
| 100 | 96 | this.mycarNumber = params.carNumber; |
| 101 | 97 | // this.mycarNumber = '苏B3M913'; |
| 102 | 98 | } |
| 103 | - // this.getRecordOrder(this.mycarNumber, 10); | |
| 104 | - //console.log("xxxmake = "+this.makedateFormat()); | |
| 99 | + this.getBusinessParkOrderByBusIdForPage() | |
| 105 | 100 | }, |
| 106 | 101 | onShow() { |
| 107 | 102 | var me = this; |
| ... | ... | @@ -113,9 +108,7 @@ export default { |
| 113 | 108 | } |
| 114 | 109 | }, |
| 115 | 110 | // 过滤器 |
| 116 | - filters: { | |
| 117 | - | |
| 118 | - }, | |
| 111 | + filters: {}, | |
| 119 | 112 | //计算属性 |
| 120 | 113 | computed: { |
| 121 | 114 | startDate() { |
| ... | ... | @@ -126,6 +119,23 @@ export default { |
| 126 | 119 | } |
| 127 | 120 | }, |
| 128 | 121 | methods: { |
| 122 | + // 通过商户ID查询停车记录信息 | |
| 123 | + getBusinessParkOrderByBusIdForPage() { | |
| 124 | + let that = this | |
| 125 | + let paramsData = { | |
| 126 | + businessId: uni.getStorageSync("indexInfo").businessId, | |
| 127 | + startTime: that.date, | |
| 128 | + endTime: that.date | |
| 129 | + } | |
| 130 | + // 首页信息获取 接口 | |
| 131 | + that.$myRequest({ | |
| 132 | + url: that.$common.getBusinessParkOrderByBusIdForPage, | |
| 133 | + method: 'POST', | |
| 134 | + data: that.$common.requestSign(paramsData) | |
| 135 | + }).then(res => { | |
| 136 | + console.log(res) | |
| 137 | + }) | |
| 138 | + }, | |
| 129 | 139 | bindDateChange: function (e) { |
| 130 | 140 | this.date = e.detail.value |
| 131 | 141 | }, |
| ... | ... | @@ -151,16 +161,17 @@ export default { |
| 151 | 161 | .parkRecordWrap { |
| 152 | 162 | padding: 5px 40px 5px 15px; |
| 153 | 163 | border-bottom: 1px solid #ccc; |
| 154 | - position:relative; | |
| 155 | - :after{ | |
| 164 | + position: relative; | |
| 165 | + :after { | |
| 156 | 166 | content: '>'; |
| 157 | 167 | position: absolute; |
| 158 | - top:20px; | |
| 168 | + top: 20px; | |
| 159 | 169 | right: 5px; |
| 160 | 170 | font-size: 18px; |
| 161 | 171 | } |
| 162 | 172 | } |
| 163 | - .recordCon{ | |
| 173 | + | |
| 174 | + .recordCon { | |
| 164 | 175 | color: #999; |
| 165 | 176 | display: flex; |
| 166 | 177 | justify-content: space-between; | ... | ... |