Commit 00a21ab7f0ad1d88c0ed3a3581c4f88b15c34344
1 parent
afb4daec
add 余额明细 接口联调
Showing
4 changed files
with
359 additions
and
316 deletions
common/common.js
@@ -4,7 +4,7 @@ import md5 from './md5.min.js'; | @@ -4,7 +4,7 @@ import md5 from './md5.min.js'; | ||
4 | var serverUrl = "https://bus.jycrtc.com"; | 4 | var serverUrl = "https://bus.jycrtc.com"; |
5 | 5 | ||
6 | //江阴微信小程序appid | 6 | //江阴微信小程序appid |
7 | -const hs_wxPay_appId = 'wxfdc1af620d3ab750'; | 7 | +const hs_wxPay_appId = 'wxfdc1af620d3ab750'; |
8 | 8 | ||
9 | // 江阴慧停车orgId | 9 | // 江阴慧停车orgId |
10 | const public_orgId = '10107'; | 10 | const public_orgId = '10107'; |
@@ -34,6 +34,18 @@ const walletAccount = serverUrl + "/business/h5/wallet/account"; | @@ -34,6 +34,18 @@ const walletAccount = serverUrl + "/business/h5/wallet/account"; | ||
34 | // 商户充值金额列表 | 34 | // 商户充值金额列表 |
35 | const rechargeList = serverUrl + "/business/h5/wallet/rechargeList"; | 35 | const rechargeList = serverUrl + "/business/h5/wallet/rechargeList"; |
36 | 36 | ||
37 | +// 余额明细下拉框选择列表 | ||
38 | +const walletKindType = serverUrl + "/business/h5/wallet/kindType"; | ||
39 | + | ||
40 | +// 余额明细总览 | ||
41 | +const detailSummary = serverUrl + "/business/h5/wallet/detailSummary"; | ||
42 | + | ||
43 | +// 余额明细-分页 | ||
44 | +const walletDetailsPage = serverUrl + "/business/h5/wallet/detailsPage"; | ||
45 | + | ||
46 | +// 钱包充值-微信 | ||
47 | +const publicUnifiedOrder = serverUrl + "/business/h5/pay/weixinpay/publicUnifiedOrder"; | ||
48 | + | ||
37 | // 通过商户ID查询停车记录信息 | 49 | // 通过商户ID查询停车记录信息 |
38 | const getBusinessParkOrderByBusIdForPage = serverUrl + "/business/h5/order/getBusinessParkOrderByBusIdForPage"; | 50 | const getBusinessParkOrderByBusIdForPage = serverUrl + "/business/h5/order/getBusinessParkOrderByBusIdForPage"; |
39 | 51 | ||
@@ -123,56 +135,52 @@ var getGlobalUser = function(key) { | @@ -123,56 +135,52 @@ var getGlobalUser = function(key) { | ||
123 | } | 135 | } |
124 | 136 | ||
125 | // 除了金额 | 137 | // 除了金额 |
126 | -var moneyFormat = function (val) { | ||
127 | - return (val/100).toFixed(2) | 138 | +var moneyFormat = function(val) { |
139 | + return (val / 100).toFixed(2) | ||
128 | } | 140 | } |
129 | 141 | ||
130 | -var dateFormat = function (msd) { // 时间转换 | ||
131 | - var time = msd | ||
132 | - | ||
133 | - if (null != time && "" != time) { | ||
134 | - | ||
135 | - if (time > 60 && time < 60 * 60) { | 142 | +var dateFormat = function(msd) { // 时间转换 |
143 | + var time = msd | ||
136 | 144 | ||
137 | - time = parseInt(time / 60.0) + "分钟" + parseInt((parseFloat(time / 60.0) - | 145 | + if (null != time && "" != time) { |
138 | 146 | ||
139 | - parseInt(time / 60.0)) * 60) + "秒"; | 147 | + if (time > 60 && time < 60 * 60) { |
140 | 148 | ||
141 | - } | 149 | + time = parseInt(time / 60.0) + "分钟" + parseInt((parseFloat(time / 60.0) - |
142 | 150 | ||
143 | - else if (time >= 60 * 60 && time < 60 * 60 * 24) { | 151 | + parseInt(time / 60.0)) * 60) + "秒"; |
144 | 152 | ||
145 | - time = parseInt(time / 3600.0) + "小时" + parseInt((parseFloat(time / 3600.0) - | 153 | + } else if (time >= 60 * 60 && time < 60 * 60 * 24) { |
146 | 154 | ||
147 | - parseInt(time / 3600.0)) * 60) + "分钟" + | 155 | + time = parseInt(time / 3600.0) + "小时" + parseInt((parseFloat(time / 3600.0) - |
148 | 156 | ||
149 | - parseInt((parseFloat((parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60) - | 157 | + parseInt(time / 3600.0)) * 60) + "分钟" + |
150 | 158 | ||
151 | - parseInt((parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60)) * 60) + "秒"; | 159 | + parseInt((parseFloat((parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60) - |
152 | 160 | ||
153 | - } else if (time >= 60 * 60 * 24) { | 161 | + parseInt((parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60)) * 60) + "秒"; |
154 | 162 | ||
155 | - time = parseInt(time / 3600.0 / 24) + "天" + parseInt((parseFloat(time / 3600.0 / 24) - | 163 | + } else if (time >= 60 * 60 * 24) { |
156 | 164 | ||
157 | - parseInt(time / 3600.0 / 24)) * 24) + "小时" + parseInt((parseFloat(time / 3600.0) - | 165 | + time = parseInt(time / 3600.0 / 24) + "天" + parseInt((parseFloat(time / 3600.0 / 24) - |
158 | 166 | ||
159 | - parseInt(time / 3600.0)) * 60) + "分钟" + | 167 | + parseInt(time / 3600.0 / 24)) * 24) + "小时" + parseInt((parseFloat(time / 3600.0) - |
160 | 168 | ||
161 | - parseInt((parseFloat((parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60) - | 169 | + parseInt(time / 3600.0)) * 60) + "分钟" + |
162 | 170 | ||
163 | - parseInt((parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60)) * 60) + "秒"; | 171 | + parseInt((parseFloat((parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60) - |
164 | 172 | ||
165 | - } | 173 | + parseInt((parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60)) * 60) + "秒"; |
166 | 174 | ||
167 | - else { | 175 | + } else { |
168 | 176 | ||
169 | - time = parseInt(time) + "秒"; | 177 | + time = parseInt(time) + "秒"; |
170 | 178 | ||
171 | - } | 179 | + } |
172 | 180 | ||
173 | - } | 181 | + } |
174 | 182 | ||
175 | - return time; | 183 | + return time; |
176 | } | 184 | } |
177 | 185 | ||
178 | export default { | 186 | export default { |
@@ -208,7 +216,9 @@ export default { | @@ -208,7 +216,9 @@ export default { | ||
208 | 216 | ||
209 | //陈彪接口 | 217 | //陈彪接口 |
210 | rechargeList, | 218 | rechargeList, |
211 | - | ||
212 | - | ||
213 | - | 219 | + walletKindType, |
220 | + detailSummary, | ||
221 | + walletDetailsPage, | ||
222 | + publicUnifiedOrder, | ||
223 | + | ||
214 | } | 224 | } |
common/filters.js
@@ -31,42 +31,52 @@ const RMB = (value) => { | @@ -31,42 +31,52 @@ const RMB = (value) => { | ||
31 | return `¥${value}` | 31 | return `¥${value}` |
32 | } | 32 | } |
33 | 33 | ||
34 | -// 钱保留两位小数 | ||
35 | -const toFixed2 = num => { | ||
36 | - return isNaN(num) ? 0.00 : parseFloat((num/100).toFixed(2)); | 34 | +// 处理金额两位小数 |
35 | +const toFixed2 = value => { | ||
36 | + if (!value) { | ||
37 | + return '0.00'; | ||
38 | + } else { | ||
39 | + return (value / 100).toFixed(2); | ||
40 | + } | ||
41 | + | ||
37 | } | 42 | } |
38 | 43 | ||
39 | // 钱保留两位小数+其他 | 44 | // 钱保留两位小数+其他 |
40 | const ortherToFixed = num => { | 45 | const ortherToFixed = num => { |
41 | - if(num === -1) return '其他'; | ||
42 | - return isNaN(num) ? 0.00 : parseFloat((num/100).toFixed(2)); | 46 | + if (num === '0' || num === undefined || num === null || num === '' || num === NaN) { |
47 | + return '0.00'; | ||
48 | + } else if (num === -1) { | ||
49 | + return '其他'; | ||
50 | + } else { | ||
51 | + return (num / 100).toFixed(2); | ||
52 | + } | ||
43 | } | 53 | } |
44 | 54 | ||
45 | 55 | ||
46 | // 数字每三位加个逗号 | 56 | // 数字每三位加个逗号 |
47 | -const toThousands =(num)=> { | ||
48 | - var result = [], | ||
49 | - counter = 0; | ||
50 | - num = (num || 0).toString().split(''); | ||
51 | - for (var i = num.length - 1; i >= 0; i--) { | ||
52 | - counter++; | ||
53 | - result.unshift(num[i]); | ||
54 | - if (!(counter % 3) && i != 0) { | ||
55 | - result.unshift(','); | ||
56 | - } | ||
57 | - } | ||
58 | - return result.join(''); | ||
59 | - } | ||
60 | - | ||
61 | - // 根据身份证号码判断男女 | ||
62 | - const sexFilter = value => { | ||
63 | - if (!value) { | ||
64 | - return '' | ||
65 | - } else { | ||
66 | - let data = value.substr(16, 1) % 2 === 1 ? '男' : '女' | ||
67 | - return data | ||
68 | - } | ||
69 | - } | 57 | +const toThousands = (num) => { |
58 | + var result = [], | ||
59 | + counter = 0; | ||
60 | + num = (num || 0).toString().split(''); | ||
61 | + for (var i = num.length - 1; i >= 0; i--) { | ||
62 | + counter++; | ||
63 | + result.unshift(num[i]); | ||
64 | + if (!(counter % 3) && i != 0) { | ||
65 | + result.unshift(','); | ||
66 | + } | ||
67 | + } | ||
68 | + return result.join(''); | ||
69 | +} | ||
70 | + | ||
71 | +// 根据身份证号码判断男女 | ||
72 | +const sexFilter = value => { | ||
73 | + if (!value) { | ||
74 | + return '' | ||
75 | + } else { | ||
76 | + let data = value.substr(16, 1) % 2 === 1 ? '男' : '女' | ||
77 | + return data | ||
78 | + } | ||
79 | +} | ||
70 | 80 | ||
71 | export default { | 81 | export default { |
72 | tranNull, | 82 | tranNull, |
pages/moneyRecharge/moneyRecharge.vue
@@ -6,7 +6,7 @@ | @@ -6,7 +6,7 @@ | ||
6 | <view class="rechargeNum uni-center">¥{{acctBalance | toFixed2 }}</view> | 6 | <view class="rechargeNum uni-center">¥{{acctBalance | toFixed2 }}</view> |
7 | </view> | 7 | </view> |
8 | 8 | ||
9 | - <uni-section title="充值金额" type="line" padding> | 9 | + <uni-section title="充值金额(元)" type="line" padding> |
10 | <uni-grid :column="3" :highlight="true" :showBorder="false" :square="false" @change="change"> | 10 | <uni-grid :column="3" :highlight="true" :showBorder="false" :square="false" @change="change"> |
11 | <uni-grid-item v-for="(item, index) in ListData" :index="index" :key="index"> | 11 | <uni-grid-item v-for="(item, index) in ListData" :index="index" :key="index"> |
12 | <view class="grid-item-box" style="background-color: #fff;"> | 12 | <view class="grid-item-box" style="background-color: #fff;"> |
@@ -16,9 +16,9 @@ | @@ -16,9 +16,9 @@ | ||
16 | </view> | 16 | </view> |
17 | </uni-grid-item> | 17 | </uni-grid-item> |
18 | </uni-grid> | 18 | </uni-grid> |
19 | - <view :class="isShowInput ? 'jy-fix-height34' : 'display-none'"> | ||
20 | - <input class="jy-fix-height34 uni-list-cell-hover" type="digit" v-model="rechargeNum" | ||
21 | - placeholder=" 请输入金额" /> | 19 | + <view class="uni-list-cell-pd" v-show="isShowInput"> |
20 | + <input class="payInut" type="number" v-model="rechargeNum" @input="checkNum" :maxlength="maxlength" | ||
21 | + placeholder=" 请输入金额"> | ||
22 | </view> | 22 | </view> |
23 | </uni-section> | 23 | </uni-section> |
24 | 24 | ||
@@ -54,6 +54,7 @@ | @@ -54,6 +54,7 @@ | ||
54 | currentIndex: 0, | 54 | currentIndex: 0, |
55 | isShowInput: false, | 55 | isShowInput: false, |
56 | rechargeNum: '', | 56 | rechargeNum: '', |
57 | + maxlength: 6 //默认一个长度 | ||
57 | } | 58 | } |
58 | }, | 59 | }, |
59 | onLoad() { | 60 | onLoad() { |
@@ -104,11 +105,30 @@ | @@ -104,11 +105,30 @@ | ||
104 | console.log('1') | 105 | console.log('1') |
105 | that.isShowInput = true; | 106 | that.isShowInput = true; |
106 | that.rechargeNum = '' | 107 | that.rechargeNum = '' |
108 | + } else { | ||
109 | + that.isShowInput = false; | ||
107 | } | 110 | } |
108 | - that.isShowInput = false; | 111 | + |
109 | }, | 112 | }, |
110 | - detailCell() { | 113 | + checkNum(e) { |
114 | + let value = e.detail.value; | ||
115 | + let dot = value.indexOf('.'); //包含小数点 | ||
116 | + let reg = /^[0-9]+$/; //正整数 | ||
117 | + if (dot > -1) { | ||
118 | + this.maxlength = dot + 3; //长度是小数点后两位 | ||
119 | + if (value.length > dot + 3) {} | ||
120 | + } | ||
121 | + if (reg.test(value)) { //如果是正整数不包含小数点 | ||
122 | + this.maxlength = 6; | ||
123 | + } | ||
111 | 124 | ||
125 | + }, | ||
126 | + | ||
127 | + detailCell() { | ||
128 | + uni.navigateTo({ | ||
129 | + url: '../rechargeDetail/rechargeDetail' | ||
130 | + | ||
131 | + }); | ||
112 | } | 132 | } |
113 | } | 133 | } |
114 | } | 134 | } |
@@ -227,4 +247,14 @@ | @@ -227,4 +247,14 @@ | ||
227 | margin-top: 40px; | 247 | margin-top: 40px; |
228 | 248 | ||
229 | } | 249 | } |
250 | + .payInut{ | ||
251 | + display: flex; | ||
252 | + box-sizing: border-box; | ||
253 | + flex-direction: row; | ||
254 | + align-items: center; | ||
255 | + border: 1px solid #DCDFE6; | ||
256 | + border-radius: 4px; | ||
257 | + min-height: 36px; | ||
258 | + padding-left: 10px; | ||
259 | + } | ||
230 | </style> | 260 | </style> |
pages/rechargeDetail/rechargeDetail.vue
1 | <template> | 1 | <template> |
2 | - <view> | ||
3 | - <view class="statistics yellow-bg uni-list-cell-pd" style="color: #fff">共18笔充值,充值总金额100.00元</view> | ||
4 | - <view class="uni-list"> | ||
5 | - <view class="uni-list-cell"> | ||
6 | - <view class="uni-list-cell-left"> | ||
7 | - 消费类型 | ||
8 | - </view> | ||
9 | - <view class="uni-list-cell-db"> | ||
10 | - <picker @change="bindPickerChange" :value="index" :range="array"> | ||
11 | - <view class="uni-input">{{array[index]}}</view> | ||
12 | - </picker> | ||
13 | - </view> | ||
14 | - </view> | ||
15 | - </view> | ||
16 | - | ||
17 | - <view class="uni-list"> | ||
18 | - <view class="uni-list-cell"> | ||
19 | - <view class="uni-list-cell-left"> | ||
20 | - 充值方式 | ||
21 | - </view> | ||
22 | - <view class="uni-list-cell-db"> | ||
23 | - <picker @change="bindPickerChangeWay" :value="indexWay" :range="arrayWay"> | ||
24 | - <view class="uni-input">{{arrayWay[indexWay]}}</view> | ||
25 | - </picker> | ||
26 | - </view> | ||
27 | - </view> | ||
28 | - </view> | ||
29 | - | ||
30 | - | ||
31 | - <view class="uni-list"> | ||
32 | - <view class="uni-list-cell"> | ||
33 | - <view class="uni-list-cell-left"> | ||
34 | - 开始时间 | ||
35 | - </view> | ||
36 | - <view class="uni-list-cell-db"> | ||
37 | - <picker mode="date" :value="date" :start="startDate" :end="endDate" @change="bindStartDateChange"> | ||
38 | - <view class="uni-input">{{benginDate}}</view> | ||
39 | - </picker> | ||
40 | - </view> | ||
41 | - </view> | ||
42 | - </view> | ||
43 | - | ||
44 | - <view class="uni-list"> | ||
45 | - <view class="uni-list-cell"> | ||
46 | - <view class="uni-list-cell-left"> | ||
47 | - 结束时间 | ||
48 | - </view> | ||
49 | - <view class="uni-list-cell-db"> | ||
50 | - <picker mode="date" :value="date" :start="startDate" :end="endDate" @change="bindEndDateChange"> | ||
51 | - <view class="uni-input">{{overDate}}</view> | ||
52 | - </picker> | ||
53 | - </view> | ||
54 | - </view> | ||
55 | - </view> | ||
56 | - | ||
57 | - <view class="border-bg"></view> | ||
58 | - | ||
59 | - | ||
60 | - <uni-load-more class="load" | ||
61 | - :content-text="contentText" | ||
62 | - :status="status" | ||
63 | - :icon-size="24" | ||
64 | - :iconType="iconType" | ||
65 | - v-if="rows.length == 0"> | ||
66 | - | ||
67 | - <uni-list class="rechargeWrap"> | ||
68 | - <view class="recordCon uni-list-cell-pd"> | ||
69 | - <text>+66</text> | ||
70 | - <text>充值成功</text> | ||
71 | - </view> | ||
72 | - <view class="recordCon uni-list-cell-pd"> | ||
73 | - <text class="color-green">微信充值</text> | ||
74 | - <text>2020-10-01 01:01:01</text> | ||
75 | - </view> | ||
76 | - </uni-list> | ||
77 | - | ||
78 | - <uni-list class="rechargeWrap"> | ||
79 | - <view class="recordCon uni-list-cell-pd"> | ||
80 | - <text>+66</text> | ||
81 | - <text>充值成功</text> | ||
82 | - </view> | ||
83 | - <view class="recordCon uni-list-cell-pd"> | ||
84 | - <text class="color-blue">支付宝充值</text> | ||
85 | - <text>2020-10-01 01:01:01</text> | ||
86 | - </view> | ||
87 | - </uni-list> | ||
88 | - | ||
89 | - <uni-list class="rechargeWrap"> | ||
90 | - <view class="recordCon uni-list-cell-pd"> | ||
91 | - <text>+66</text> | ||
92 | - <text>充值成功</text> | ||
93 | - </view> | ||
94 | - <view class="recordCon uni-list-cell-pd"> | ||
95 | - <text class="color-red">线下公对公充值</text> | ||
96 | - <text>2020-10-01 01:01:01</text> | ||
97 | - </view> | ||
98 | - </uni-list> | ||
99 | - | ||
100 | - <uni-list class="rechargeWrap"> | ||
101 | - <view class="recordCon uni-list-cell-pd"> | ||
102 | - <text>-66</text> | ||
103 | - <text>支付成功</text> | ||
104 | - </view> | ||
105 | - <view class="recordCon uni-list-cell-pd"> | ||
106 | - <text class="color-green">购买卡券</text> | ||
107 | - <text>2020-10-01 01:01:01</text> | ||
108 | - </view> | ||
109 | - <view class="rechargeArrow"> | ||
110 | - > | ||
111 | - </view> | ||
112 | - </uni-list> | ||
113 | - | ||
114 | - | ||
115 | - | ||
116 | - <uni-list class="rechargeWrap"> | ||
117 | - <view class="recordCon uni-list-cell-pd"> | ||
118 | - <text>-66</text> | ||
119 | - <text>支付成功</text> | ||
120 | - </view> | ||
121 | - <view class="recordCon uni-list-cell-pd"> | ||
122 | - <text class="">停车支付</text> | ||
123 | - <text>2020-10-01 01:01:01</text> | ||
124 | - </view> | ||
125 | - <view class="rechargeArrow"> | ||
126 | - > | ||
127 | - </view> | ||
128 | - </uni-list> | ||
129 | - | ||
130 | - </uni-load-more> | ||
131 | - | ||
132 | - | ||
133 | - </view> | 2 | + <view> |
3 | + <view class="statistics yellow-bg uni-list-cell-pd" style="color: #fff">共18笔充值,充值总金额100.00元</view> | ||
4 | + <view class="uni-list"> | ||
5 | + <view class="uni-list-cell"> | ||
6 | + <view class="uni-list-cell-left"> | ||
7 | + 消费类型 | ||
8 | + </view> | ||
9 | + <view class="uni-list-cell-db"> | ||
10 | + <picker @change="bindPickerChange" :value="index" :range="kindArray"> | ||
11 | + <view class="uni-input">{{kindArray[index].kindName}}</view> | ||
12 | + </picker> | ||
13 | + </view> | ||
14 | + </view> | ||
15 | + </view> | ||
16 | + | ||
17 | + <view class="uni-list"> | ||
18 | + <view class="uni-list-cell"> | ||
19 | + <view class="uni-list-cell-left"> | ||
20 | + 充值方式 | ||
21 | + </view> | ||
22 | + <view class="uni-list-cell-db"> | ||
23 | + <picker @change="bindPickerChangeWay" :value="indexWay" :range="arrayWay"> | ||
24 | + <view class="uni-input">{{arrayWay[indexWay]}}</view> | ||
25 | + </picker> | ||
26 | + </view> | ||
27 | + </view> | ||
28 | + </view> | ||
29 | + | ||
30 | + | ||
31 | + <view class="uni-list"> | ||
32 | + <view class="uni-list-cell"> | ||
33 | + <view class="uni-list-cell-left"> | ||
34 | + 开始时间 | ||
35 | + </view> | ||
36 | + <view class="uni-list-cell-db"> | ||
37 | + <picker mode="date" :value="date" :start="startDate" :end="endDate" @change="bindStartDateChange"> | ||
38 | + <view class="uni-input">{{benginDate}}</view> | ||
39 | + </picker> | ||
40 | + </view> | ||
41 | + </view> | ||
42 | + </view> | ||
43 | + | ||
44 | + <view class="uni-list"> | ||
45 | + <view class="uni-list-cell"> | ||
46 | + <view class="uni-list-cell-left"> | ||
47 | + 结束时间 | ||
48 | + </view> | ||
49 | + <view class="uni-list-cell-db"> | ||
50 | + <picker mode="date" :value="date" :start="startDate" :end="endDate" @change="bindEndDateChange"> | ||
51 | + <view class="uni-input">{{overDate}}</view> | ||
52 | + </picker> | ||
53 | + </view> | ||
54 | + </view> | ||
55 | + </view> | ||
56 | + | ||
57 | + <view class="border-bg"></view> | ||
58 | + | ||
59 | + | ||
60 | + <uni-load-more class="load" :content-text="contentText" :status="status" :icon-size="24" :iconType="iconType" | ||
61 | + v-if="rows.length == 0"> | ||
62 | + | ||
63 | + <uni-list class="rechargeWrap"> | ||
64 | + <view class="recordCon uni-list-cell-pd"> | ||
65 | + <text>+66</text> | ||
66 | + <text>充值成功</text> | ||
67 | + </view> | ||
68 | + <view class="recordCon uni-list-cell-pd"> | ||
69 | + <text class="color-green">微信充值</text> | ||
70 | + <text>2020-10-01 01:01:01</text> | ||
71 | + </view> | ||
72 | + </uni-list> | ||
73 | + | ||
74 | + <uni-list class="rechargeWrap"> | ||
75 | + <view class="recordCon uni-list-cell-pd"> | ||
76 | + <text>+66</text> | ||
77 | + <text>充值成功</text> | ||
78 | + </view> | ||
79 | + <view class="recordCon uni-list-cell-pd"> | ||
80 | + <text class="color-blue">支付宝充值</text> | ||
81 | + <text>2020-10-01 01:01:01</text> | ||
82 | + </view> | ||
83 | + </uni-list> | ||
84 | + | ||
85 | + <uni-list class="rechargeWrap"> | ||
86 | + <view class="recordCon uni-list-cell-pd"> | ||
87 | + <text>+66</text> | ||
88 | + <text>充值成功</text> | ||
89 | + </view> | ||
90 | + <view class="recordCon uni-list-cell-pd"> | ||
91 | + <text class="color-red">线下公对公充值</text> | ||
92 | + <text>2020-10-01 01:01:01</text> | ||
93 | + </view> | ||
94 | + </uni-list> | ||
95 | + | ||
96 | + <uni-list class="rechargeWrap"> | ||
97 | + <view class="recordCon uni-list-cell-pd"> | ||
98 | + <text>-66</text> | ||
99 | + <text>支付成功</text> | ||
100 | + </view> | ||
101 | + <view class="recordCon uni-list-cell-pd"> | ||
102 | + <text class="color-green">购买卡券</text> | ||
103 | + <text>2020-10-01 01:01:01</text> | ||
104 | + </view> | ||
105 | + <view class="rechargeArrow"> | ||
106 | + > | ||
107 | + </view> | ||
108 | + </uni-list> | ||
109 | + | ||
110 | + | ||
111 | + | ||
112 | + <uni-list class="rechargeWrap"> | ||
113 | + <view class="recordCon uni-list-cell-pd"> | ||
114 | + <text>-66</text> | ||
115 | + <text>支付成功</text> | ||
116 | + </view> | ||
117 | + <view class="recordCon uni-list-cell-pd"> | ||
118 | + <text class="">停车支付</text> | ||
119 | + <text>2020-10-01 01:01:01</text> | ||
120 | + </view> | ||
121 | + <view class="rechargeArrow"> | ||
122 | + > | ||
123 | + </view> | ||
124 | + </uni-list> | ||
125 | + | ||
126 | + </uni-load-more> | ||
127 | + | ||
128 | + | ||
129 | + </view> | ||
134 | </template> | 130 | </template> |
135 | 131 | ||
136 | <script> | 132 | <script> |
137 | -import common from "../../common/common.js"; | ||
138 | -export default { | ||
139 | - data() { | ||
140 | - const currentDate = this.getDate({ | ||
141 | - format: true | ||
142 | - }) | ||
143 | - return { | ||
144 | - title: 'picker', | ||
145 | - array: ['全部', '充值', '支付'], | ||
146 | - arrayWay: ['所有方式', '微信', '线下公对公'], | ||
147 | - index: 0, | ||
148 | - indexWay: 0, | ||
149 | - benginDate: currentDate, | ||
150 | - overDate: currentDate, | ||
151 | - rows:[], | ||
152 | - pageNum:1,//当前页 | ||
153 | - pageSize:1,//每页条数 | ||
154 | - reload:false, | ||
155 | - status:'more', | ||
156 | - contentText:{ | ||
157 | - contentdown:'上拉加载更多~', | ||
158 | - contentrefresh:'正在加载更多~', | ||
159 | - contentmore:'我是有底线的~' | ||
160 | - }, | ||
161 | - iconType:'auto', // 图标样式 | ||
162 | - } | ||
163 | - }, | ||
164 | - onLoad(params) { | ||
165 | - wx.showShareMenu({ | ||
166 | - withShareTicket: true | ||
167 | - }) | ||
168 | - // this.mycarNumber = params.carNumber; | ||
169 | - // this.myorderId = params.orderId; | ||
170 | - // this.myparkCode = params.parkCode; | ||
171 | - // this.myorderState = params.orderState; | ||
172 | - // this.totalFee = params.totalFee | ||
173 | - // this.unPayFee = params.unPayFee | ||
174 | - // if (params.orderState == 5) { | ||
175 | - // //停车补缴单 103 | ||
176 | - // this.mypaySrcType = '103' | ||
177 | - // } else { | ||
178 | - // this.mypaySrcType = '101' | ||
179 | - // } | ||
180 | - // // this.GetbillQueryInfo(this.mycarNumber, this.myorderId, this.myparkCode); | ||
181 | - // this.getWxCode(); | ||
182 | - // this.PDlogin(); | ||
183 | - //console.log("xxxmake = "+this.makedateFormat()); | ||
184 | - }, | ||
185 | - onShow() { | ||
186 | - var me = this; | ||
187 | - var userInfo = me.getGlobalUser("globalUser"); | ||
188 | - if (userInfo != null) { | ||
189 | - me.phoneNumb = userInfo.userPhone; | ||
190 | - } | ||
191 | - var pages = getCurrentPages(); | ||
192 | - var currPage = pages[pages.length - 1]; //当前页面 | ||
193 | - console.log('currPage.data.selCoupon = ' + currPage.data.selCoupon); | ||
194 | - me.selCoupon = currPage.data.selCoupon; | ||
195 | - console.log(JSON.stringify(me.selCoupon)); | ||
196 | - // me.GetbillQueryInfo(me.mycarNumber, me.myorderId, me.myparkCode, me.selCoupon.cardNo, me.selCoupon.couponType, me.selCoupon | ||
197 | - // .discValue); | ||
198 | - // GetbillQueryInfo(carnum, orderId, parkCode, cardNo, couponType, disValue) { | ||
199 | - }, | ||
200 | - computed: { | ||
201 | - startDate() { | ||
202 | - return this.getDate('start'); | ||
203 | - }, | ||
204 | - endDate() { | ||
205 | - return this.getDate('end'); | ||
206 | - } | ||
207 | - }, | ||
208 | - methods: { | ||
209 | - bindPickerChange: function (e) { | ||
210 | - console.log('picker发送选择改变,携带值为', e.detail.value) | ||
211 | - this.index = e.detail.value | ||
212 | - }, | ||
213 | - bindPickerChangeWay: function (e) { | ||
214 | - console.log('picker发送选择改变,携带值为', e.detail.value) | ||
215 | - this.indexWay = e.detail.value | ||
216 | - }, | ||
217 | - bindStartDateChange: function (e) { | ||
218 | - this.benginDate = e.detail.value | ||
219 | - }, | ||
220 | - bindEndDateChange: function (e) { | ||
221 | - this.overDate = e.detail.value | ||
222 | - }, | ||
223 | - getDate(type) { | ||
224 | - const date = new Date(); | ||
225 | - let year = date.getFullYear(); | ||
226 | - let month = date.getMonth() + 1; | ||
227 | - let day = date.getDate(); | ||
228 | - if (type === 'start') { | ||
229 | - year = year - 60; | ||
230 | - } else if (type === 'end') { | ||
231 | - year = year + 2; | ||
232 | - } | ||
233 | - month = month > 9 ? month : '0' + month; | ||
234 | - day = day > 9 ? day : '0' + day; | ||
235 | - return `${year}-${month}-${day}`; | ||
236 | - }, | ||
237 | - } | ||
238 | -} | 133 | + export default { |
134 | + data() { | ||
135 | + const currentDate = this.getDate({ | ||
136 | + format: true | ||
137 | + }) | ||
138 | + return { | ||
139 | + title: 'picker', | ||
140 | + kindArray: [], | ||
141 | + arrayWay: [], | ||
142 | + index: 0, | ||
143 | + indexWay: 0, | ||
144 | + benginDate: currentDate, | ||
145 | + overDate: currentDate, | ||
146 | + rows: [], | ||
147 | + pageNum: 1, //当前页 | ||
148 | + pageSize: 1, //每页条数 | ||
149 | + reload: false, | ||
150 | + status: 'more', | ||
151 | + contentText: { | ||
152 | + contentdown: '上拉加载更多~', | ||
153 | + contentrefresh: '正在加载更多~', | ||
154 | + contentmore: '我是有底线的~' | ||
155 | + }, | ||
156 | + iconType: 'auto', // 图标样式 | ||
157 | + } | ||
158 | + }, | ||
159 | + onLoad(params) { | ||
160 | + wx.showShareMenu({ | ||
161 | + withShareTicket: true | ||
162 | + }); | ||
163 | + this.getKindType() | ||
164 | + | ||
165 | + }, | ||
166 | + onShow() { | ||
167 | + | ||
168 | + | ||
169 | + }, | ||
170 | + computed: { | ||
171 | + startDate() { | ||
172 | + return this.getDate('start'); | ||
173 | + }, | ||
174 | + endDate() { | ||
175 | + return this.getDate('end'); | ||
176 | + } | ||
177 | + }, | ||
178 | + methods: { | ||
179 | + getKindType() { | ||
180 | + let that = this; | ||
181 | + that.$myRequest({ | ||
182 | + url: that.$common.walletKindType, | ||
183 | + method: 'POST', | ||
184 | + data: that.$common.requestSign() | ||
185 | + }).then(res => { | ||
186 | + | ||
187 | + let data = res.data; | ||
188 | + // let list = []; | ||
189 | + // data.forEach((item, index) => { | ||
190 | + // list.push(item.kindName) | ||
191 | + // }); | ||
192 | + console.log(data) | ||
193 | + that.kindArray = data; | ||
194 | + | ||
195 | + }) | ||
196 | + }, | ||
197 | + bindPickerChange: function(e) { | ||
198 | + let that = this; | ||
199 | + that.index = e.detail.value | ||
200 | + | ||
201 | + | ||
202 | + | ||
203 | + }, | ||
204 | + bindPickerChangeWay: function(e) { | ||
205 | + console.log('picker发送选择改变,携带值为', e.detail.value) | ||
206 | + this.indexWay = e.detail.value | ||
207 | + }, | ||
208 | + bindStartDateChange: function(e) { | ||
209 | + this.benginDate = e.detail.value | ||
210 | + }, | ||
211 | + bindEndDateChange: function(e) { | ||
212 | + this.overDate = e.detail.value | ||
213 | + }, | ||
214 | + getDate(type) { | ||
215 | + const date = new Date(); | ||
216 | + let year = date.getFullYear(); | ||
217 | + let month = date.getMonth() + 1; | ||
218 | + let day = date.getDate(); | ||
219 | + if (type === 'start') { | ||
220 | + year = year - 60; | ||
221 | + } else if (type === 'end') { | ||
222 | + year = year + 2; | ||
223 | + } | ||
224 | + month = month > 9 ? month : '0' + month; | ||
225 | + day = day > 9 ? day : '0' + day; | ||
226 | + return `${year}-${month}-${day}`; | ||
227 | + }, | ||
228 | + } | ||
229 | + } | ||
239 | </script> | 230 | </script> |
240 | 231 | ||
241 | <style lang="scss" scoped> | 232 | <style lang="scss" scoped> |
242 | - .rechargeWrap{ | ||
243 | - position: relative; | ||
244 | - .rechargeArrow{ | ||
245 | - position: absolute; | ||
246 | - right: 10px; | ||
247 | - top: 30px; | ||
248 | - font-size: 20px; | ||
249 | - color: #999; | ||
250 | - } | ||
251 | - } | ||
252 | - .recordCon { | ||
253 | - padding-right: 35px; | ||
254 | - color: #999; | ||
255 | - display: flex; | ||
256 | - justify-content: space-between; | ||
257 | - } | 233 | + .rechargeWrap { |
234 | + position: relative; | ||
235 | + | ||
236 | + .rechargeArrow { | ||
237 | + position: absolute; | ||
238 | + right: 10px; | ||
239 | + top: 30px; | ||
240 | + font-size: 20px; | ||
241 | + color: #999; | ||
242 | + } | ||
243 | + } | ||
244 | + | ||
245 | + .recordCon { | ||
246 | + padding-right: 35px; | ||
247 | + color: #999; | ||
248 | + display: flex; | ||
249 | + justify-content: space-between; | ||
250 | + } | ||
258 | </style> | 251 | </style> |