Commit e1beceff7be12cbd0e18dddd3beaaf3ee7b1b41b

Authored by 刘淇
1 parent 2b0b0d6f

二维码保存图片

common/common.js
... ... @@ -21,6 +21,10 @@ const SetToken = uni.getStorageSync("globalUser").token;
21 21 // ----江阴项目 接口----
22 22 // 商户登录
23 23 const userLogin = serverUrl + "/business/h5/index/login";
  24 +// 修改密码
  25 +const changePassword = serverUrl + "/business/h5/index/changePassword";
  26 +
  27 +
24 28 // 获取已登录商户用户信息
25 29 const indexInfo = serverUrl + "/business/h5/index/info";
26 30 // 商户退出登录
... ... @@ -326,7 +330,9 @@ export default {
326 330 queryCustInvoiceHistoryList,
327 331 // 重发邮件
328 332 resendInvoiceMail,
  333 + // 修改密码
329 334  
  335 + changePassword,
330 336 //陈彪接口
331 337 rechargeList,
332 338 walletKindType,
... ...
pages.json
1 1 {
2   - "leftWindow": {
3   - "path": "windows/left-window.vue",
4   - "style": {
5   - "width": "350px"
6   - }
7   - },
8   - "topWindow": {
9   - "path": "windows/top-window.vue",
10   - "style": {
11   - "height": "60px"
12   - }
13   - },
14   - "pages": [
15   - // pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
16   -
17   - {
18   - "path": "pages/index/index",
19   - "style": {
20   - "navigationBarTitleText": "商户管理"
21   - }
22   - },
23   - {
24   - "path": "pages/businessCard/cardDetail",
25   - "style": {
26   - "navigationBarTitleText": "商户卡券明细",
27   - "enablePullDownRefresh": true
28   - }
29   - },
30   - {
31   - "path": "pages/businessCard/businessCard",
32   - "style": {
33   - "navigationBarTitleText": "商户卡券"
34   - }
35   - },
36   -
37   -
38   -
39   - {
40   - "path": "pages/businessCard/buyCard",
41   - "style": {
42   - "navigationBarTitleText": "商户卡券购买"
43   - }
44   - },
45   -
46   -
47   -
48   - {
49   - "path": "pages/businessCard/provideCard",
50   - "style": {
51   - "navigationBarTitleText": "商户卡券发放"
52   - }
53   - },
54   - {
55   - "path": "pages/businessCard/printCard",
56   - "style": {
57   - "navigationBarTitleText": "商户卡券打印"
58   - }
59   - },
60   -
61   -
62   -
63   -
64   -
65   - {
66   - "path": "pages/rechargeDetail/rechargeDetail",
67   - "style": {
68   - "navigationBarTitleText": "余额明细",
69   - "enablePullDownRefresh": true
70   - }
71   -
72   - },
73   -
74   - {
75   - "path": "pages/parkRecordList/parkRecordList",
76   - "style": {
77   - "navigationBarTitleText": "停车记录"
78   - }
79   - },
80   -
81   - {
82   - "path": "pages/login/login",
83   - "style": {
84   - "navigationBarTitleText": "商户中心",
85   - "enablePullDownRefresh": false
86   - }
87   -
88   - },
89   - {
90   - "path": "pages/businessCard/cardPrint",
91   - "style": {
92   - "navigationBarTitleText": "卡券打印"
93   - }
94   - },
95   -
96   -
97   -
98   - {
99   - "path": "pages/parkRecordList/recordDetail",
100   - "style": {
101   - "navigationBarTitleText": "订单详情"
102   - }
103   - },
104   -
105   - {
106   - "path": "pages/parkPay/parkPay",
107   - "style": {
108   - "navigationBarTitleText": "支付"
109   - }
110   - },
111   - {
112   - "path": "pages/inputCarNumber/inputCarNumber",
113   - "style": {
114   - "navigationBarTitleText": "停车缴费"
115   - }
116   - },
117   - {
118   - "path": "pages/moneyRecharge/moneyRecharge",
119   - "style": {
120   - "navigationBarTitleText": "我的钱包"
121   - }
122   - },
123   - {
124   - "path": "pages/tabBar/component/component",
125   - "style": {
126   - "navigationBarTitleText": "内置组件",
127   - "app-plus": {
128   - "bounce": "vertical",
129   - "titleNView": {
130   - "buttons": [{
131   - "text": "\ue534",
132   - "fontSrc": "/static/uni.ttf",
133   - "fontSize": "22px",
134   - "color": "#FFFFFF"
135   - }]
136   - }
137   - }
138   - }
139   - },
140   - {
141   - "path": "pages/tabBar/extUI/extUI",
142   - "style": {
143   - "navigationBarTitleText": "扩展组件",
144   - "app-plus": {
145   - "titleNView": {
146   - "buttons": [{
147   - "text": "\ue534",
148   - "fontSrc": "/static/uni.ttf",
149   - "fontSize": "22px",
150   - "color": "#FFFFFF"
151   - }]
152   - }
153   - }
154   - }
155   - },
156   -
157   - {
158   - "path": "pages/rechargeDetail/outDetail",
159   - "style": {
160   - "navigationBarTitleText": "账单详情"
161   - }
162   - },
163   - {
164   - "path": "pages/setting/setting",
165   - "style": {
166   - "navigationBarTitleText": "设置",
167   - "enablePullDownRefresh": false
168   - }
169   -
170   - }, {
171   - "path": "pages/manuals/manuals",
172   - "style": {
173   - "navigationBarTitleText": "使用指南",
174   - "enablePullDownRefresh": false
175   - }
176   -
177   - }, {
178   - "path": "pages/aboutOur/aboutOur",
179   - "style": {
180   - "navigationBarTitleText": "关于我们",
181   - "enablePullDownRefresh": false
182   - }
183   -
184   - },
185   - {
186   - "path": "pages/invoiceClaim/invoiceClaim",
187   - "style": {
188   - "navigationBarTitleText": "发票申领",
189   - "enablePullDownRefresh": false
190   - }
191   -
192   - }, {
193   - "path": "pages/billing/billing",
194   - "style": {
195   - "navigationBarTitleText": "发票申领",
196   - "enablePullDownRefresh": false
197   - }
198   -
199   - }, {
200   - "path": "pages/invoiceRecord/invoiceRecord",
201   - "style": {
202   - "navigationBarTitleText": "开票历史",
203   - "enablePullDownRefresh": false
204   - }
205   -
206   - }, {
207   - "path": "pages/invoiceForm/invoiceForm",
208   - "style": {
209   - "navigationBarTitleText": "开票历史",
210   - "enablePullDownRefresh": false
211   - }
212   -
213   - }, {
214   - "path": "pages/elecRecord/elecRecord",
215   - "style": {
216   - "navigationBarTitleText": "电子包含记录",
217   - "enablePullDownRefresh": false
218   - }
219   -
220   - }, {
221   - "path": "pages/invoicePreview/invoicePreview",
222   - "style": {
223   - "navigationBarTitleText": "发票预览",
224   - "enablePullDownRefresh": false
225   - }
226   -
227   - }, {
228   - "path": "pages/invoiceInformation/invoiceInformation",
229   - "style": {
230   - "navigationBarTitleText": "开票信息确认",
231   - "enablePullDownRefresh": false
232   - }
233   -
234   - }, {
235   - "path": "pages/invoiceTitle/invoiceTitle",
236   - "style": {
237   - "navigationBarTitleText": "发票抬头",
238   - "enablePullDownRefresh": false
239   - }
240   -
241   - }, {
242   - "path": "pages/companyMsg/companyMsg",
243   - "style": {
244   - "navigationBarTitleText": "详情",
245   - "enablePullDownRefresh": false
246   - }
247   -
248   - }, {
249   - "path": "pages/addTitle/addTitle",
250   - "style": {
251   - "navigationBarTitleText": "添加抬头",
252   - "enablePullDownRefresh": false
253   - }
254   -
255   - }, {
256   - "path": "pages/editTitle/editTitle",
257   - "style": {
258   - "navigationBarTitleText": "编辑抬头",
259   - "enablePullDownRefresh": false
260   - }
261   -
262   - }
263   - ],
264   - "globalStyle": {
265   - "navigationBarTextStyle": "black",
266   - "navigationBarTitleText": "江阴慧停车",
267   - "navigationBarBackgroundColor": "#F8F8F8",
268   - "backgroundColor": "#F8F8F8",
269   - "pageOrientation": "portrait",
270   - "mp-360": {
271   - "navigationStyle": "custom"
272   - },
273   - "h5": {
274   - "maxWidth": 1190,
275   - "navigationBarTextStyle": "black",
276   - "navigationBarBackgroundColor": "#F1F1F1"
277   - }
278   - }
279   -
  2 + "leftWindow": {
  3 + "path": "windows/left-window.vue",
  4 + "style": {
  5 + "width": "350px"
  6 + }
  7 + },
  8 + "topWindow": {
  9 + "path": "windows/top-window.vue",
  10 + "style": {
  11 + "height": "60px"
  12 + }
  13 + },
  14 + "pages": [
  15 + // pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
  16 +
  17 + {
  18 + "path": "pages/index/index",
  19 + "style": {
  20 + "navigationBarTitleText": "商户管理"
  21 + }
  22 + },
  23 + {
  24 + "path": "pages/businessCard/cardDetail",
  25 + "style": {
  26 + "navigationBarTitleText": "商户卡券明细",
  27 + "enablePullDownRefresh": true
  28 + }
  29 + },
  30 + {
  31 + "path": "pages/businessCard/businessCard",
  32 + "style": {
  33 + "navigationBarTitleText": "商户卡券"
  34 + }
  35 + },
  36 + {
  37 + "path": "pages/businessCard/buyCard",
  38 + "style": {
  39 + "navigationBarTitleText": "商户卡券购买"
  40 + }
  41 + },
  42 + {
  43 + "path": "pages/businessCard/provideCard",
  44 + "style": {
  45 + "navigationBarTitleText": "商户卡券发放"
  46 + }
  47 + },
  48 + {
  49 + "path": "pages/businessCard/printCard",
  50 + "style": {
  51 + "navigationBarTitleText": "商户卡券打印"
  52 + }
  53 + },
  54 + {
  55 + "path": "pages/rechargeDetail/rechargeDetail",
  56 + "style": {
  57 + "navigationBarTitleText": "余额明细",
  58 + "enablePullDownRefresh": true
  59 + }
  60 + },
  61 + {
  62 + "path": "pages/parkRecordList/parkRecordList",
  63 + "style": {
  64 + "navigationBarTitleText": "停车记录"
  65 + }
  66 + },
  67 + {
  68 + "path": "pages/login/login",
  69 + "style": {
  70 + "navigationBarTitleText": "商户中心",
  71 + "enablePullDownRefresh": false
  72 + }
  73 + },
  74 + {
  75 + "path": "pages/businessCard/cardPrint",
  76 + "style": {
  77 + "navigationBarTitleText": "卡券打印"
  78 + }
  79 + },
  80 + {
  81 + "path": "pages/parkRecordList/recordDetail",
  82 + "style": {
  83 + "navigationBarTitleText": "订单详情"
  84 + }
  85 + },
  86 + {
  87 + "path": "pages/parkPay/parkPay",
  88 + "style": {
  89 + "navigationBarTitleText": "支付"
  90 + }
  91 + },
  92 + {
  93 + "path": "pages/inputCarNumber/inputCarNumber",
  94 + "style": {
  95 + "navigationBarTitleText": "停车缴费"
  96 + }
  97 + },
  98 + {
  99 + "path": "pages/moneyRecharge/moneyRecharge",
  100 + "style": {
  101 + "navigationBarTitleText": "我的钱包"
  102 + }
  103 + },
  104 + {
  105 + "path": "pages/tabBar/component/component",
  106 + "style": {
  107 + "navigationBarTitleText": "内置组件",
  108 + "app-plus": {
  109 + "bounce": "vertical",
  110 + "titleNView": {
  111 + "buttons": [
  112 + {
  113 + "text": "\ue534",
  114 + "fontSrc": "/static/uni.ttf",
  115 + "fontSize": "22px",
  116 + "color": "#FFFFFF"
  117 + }
  118 + ]
  119 + }
  120 + }
  121 + }
  122 + },
  123 + {
  124 + "path": "pages/tabBar/extUI/extUI",
  125 + "style": {
  126 + "navigationBarTitleText": "扩展组件",
  127 + "app-plus": {
  128 + "titleNView": {
  129 + "buttons": [
  130 + {
  131 + "text": "\ue534",
  132 + "fontSrc": "/static/uni.ttf",
  133 + "fontSize": "22px",
  134 + "color": "#FFFFFF"
  135 + }
  136 + ]
  137 + }
  138 + }
  139 + }
  140 + },
  141 + {
  142 + "path": "pages/rechargeDetail/outDetail",
  143 + "style": {
  144 + "navigationBarTitleText": "账单详情"
  145 + }
  146 + },
  147 + {
  148 + "path": "pages/setting/setting",
  149 + "style": {
  150 + "navigationBarTitleText": "设置",
  151 + "enablePullDownRefresh": false
  152 + }
  153 + },
  154 + {
  155 + "path": "pages/revisePwd/revisePwd",
  156 + "style": {
  157 + "navigationBarTitleText": "修改登录密码",
  158 + "enablePullDownRefresh": false
  159 + }
  160 + },
  161 + {
  162 + "path": "pages/manuals/manuals",
  163 + "style": {
  164 + "navigationBarTitleText": "使用指南",
  165 + "enablePullDownRefresh": false
  166 + }
  167 + },
  168 + {
  169 + "path": "pages/aboutOur/aboutOur",
  170 + "style": {
  171 + "navigationBarTitleText": "关于我们",
  172 + "enablePullDownRefresh": false
  173 + }
  174 + },
  175 + {
  176 + "path": "pages/invoiceClaim/invoiceClaim",
  177 + "style": {
  178 + "navigationBarTitleText": "发票申领",
  179 + "enablePullDownRefresh": false
  180 + }
  181 + },
  182 + {
  183 + "path": "pages/billing/billing",
  184 + "style": {
  185 + "navigationBarTitleText": "发票申领",
  186 + "enablePullDownRefresh": false
  187 + }
  188 + },
  189 + {
  190 + "path": "pages/invoiceRecord/invoiceRecord",
  191 + "style": {
  192 + "navigationBarTitleText": "开票历史",
  193 + "enablePullDownRefresh": false
  194 + }
  195 + },
  196 + {
  197 + "path": "pages/invoiceForm/invoiceForm",
  198 + "style": {
  199 + "navigationBarTitleText": "开票历史",
  200 + "enablePullDownRefresh": false
  201 + }
  202 + },
  203 + {
  204 + "path": "pages/elecRecord/elecRecord",
  205 + "style": {
  206 + "navigationBarTitleText": "电子包含记录",
  207 + "enablePullDownRefresh": false
  208 + }
  209 + },
  210 + {
  211 + "path": "pages/invoicePreview/invoicePreview",
  212 + "style": {
  213 + "navigationBarTitleText": "发票预览",
  214 + "enablePullDownRefresh": false
  215 + }
  216 + },
  217 + {
  218 + "path": "pages/invoiceInformation/invoiceInformation",
  219 + "style": {
  220 + "navigationBarTitleText": "开票信息确认",
  221 + "enablePullDownRefresh": false
  222 + }
  223 + },
  224 + {
  225 + "path": "pages/invoiceTitle/invoiceTitle",
  226 + "style": {
  227 + "navigationBarTitleText": "发票抬头",
  228 + "enablePullDownRefresh": false
  229 + }
  230 + },
  231 + {
  232 + "path": "pages/companyMsg/companyMsg",
  233 + "style": {
  234 + "navigationBarTitleText": "详情",
  235 + "enablePullDownRefresh": false
  236 + }
  237 + },
  238 + {
  239 + "path": "pages/addTitle/addTitle",
  240 + "style": {
  241 + "navigationBarTitleText": "添加抬头",
  242 + "enablePullDownRefresh": false
  243 + }
  244 + },
  245 + {
  246 + "path": "pages/editTitle/editTitle",
  247 + "style": {
  248 + "navigationBarTitleText": "编辑抬头",
  249 + "enablePullDownRefresh": false
  250 + }
  251 + }
  252 + ],
  253 + "globalStyle": {
  254 + "navigationBarTextStyle": "black",
  255 + "navigationBarTitleText": "江阴慧停车",
  256 + "navigationBarBackgroundColor": "#F8F8F8",
  257 + "backgroundColor": "#F8F8F8",
  258 + "pageOrientation": "portrait",
  259 + "mp-360": {
  260 + "navigationStyle": "custom"
  261 + },
  262 + "h5": {
  263 + "maxWidth": 1190,
  264 + "navigationBarTextStyle": "black",
  265 + "navigationBarBackgroundColor": "#F1F1F1"
  266 + }
  267 + }
280 268 }
... ...
pages/businessCard/printCard.vue
... ... @@ -14,7 +14,7 @@
14 14  
15 15 <view class=" uni-card text-center" style="padding: 10px 0">
16 16 <image :src="qrUrl" style="width: 300px;height:300px;margin: 0 auto;"
17   - @longpress="savePosterPath(qrUrl)"></image>
  17 + show-menu-by-longpress='1'></image>
18 18 </view>
19 19  
20 20 <view style="padding: 5px 10px">长按上面二维码可以保存为图片</view>
... ...
pages/parkRecordList/parkRecordList.vue
1 1 <template>
2   - <view>
3   - <!--<view class="uni-title uni-common-pl">日期选择器</view>-->
4   - <uni-notice-bar scrollable backgroundColor="#f0ad4e" color="#fff" single :text="detailText | tranNull">
5   - </uni-notice-bar>
6   -
7   - <view class="uni-list">
8   - <view class="uni-list-cell">
9   - <view class="uni-list-cell-left">
10   - 开始时间
11   - </view>
12   - <view class="uni-list-cell-db">
13   - <picker mode="date" :value="startTime" :start="startDate" :end="endDate"
14   - @change="bindStartDateChange">
15   - <view class="uni-input">{{startTime}}</view>
16   - </picker>
17   - </view>
18   - </view>
19   -
20   - <view class="uni-list-cell">
21   - <view class="uni-list-cell-left">
22   - 结束时间
23   - </view>
24   - <view class="uni-list-cell-db">
25   - <picker mode="date" :value="endTime" :start="startDate" :end="endDate" @change="bindDateChange">
26   - <view class="uni-input">{{endTime}}</view>
27   - </picker>
28   - </view>
29   - </view>
30   - </view>
31   -
32   - <view v-if="recordList.length>0">
33   - <view class="parkRecordWrap" v-for="(i, index) in recordList" @click="toRecordDetail(i)">
34   - <view>
35   - {{i.plName}}
36   - </view>
37   - <view class="recordCon">
38   - <text>{{i.carNumber}}</text>
39   - <!--<text>{{i.parkOutTime}}</text>-->
40   - <uni-dateformat :date="i.parkOutTime" format="yyyy-MM-dd hh:mm:ss"></uni-dateformat>
41   - </view>
42   - <view class="recordCon">
43   - <text>实收:{{ $common.moneyFormat(i.orderActFee) }}</text>
44   - <text>应收:{{ $common.moneyFormat(i.orderTotalFee) }}</text>
45   - </view>
46   - </view>
47   -
48   - </view>
49   -
50   -
51   - <view v-else>
52   - <image class="marginAuto" src="../../static/vipcard/novipcard.png" mode="aspectFit"></image>
53   - <view class="text-center">
54   - 暂无停车记录
55   - </view>
56   -
57   - </view>
58   -
59   -
60   - </view>
  2 + <view>
  3 + <!--<view class="uni-title uni-common-pl">日期选择器</view>-->
  4 + <uni-notice-bar scrollable backgroundColor="#f0ad4e" color="#fff" single :text="detailText | tranNull">
  5 + </uni-notice-bar>
  6 +
  7 + <view class="uni-list">
  8 + <view class="uni-list-cell">
  9 + <view class="uni-list-cell-left">
  10 + 开始时间
  11 + </view>
  12 + <view class="uni-list-cell-db">
  13 + <picker mode="date" :value="startTime" :start="startDate" :end="endDate"
  14 + @change="bindStartDateChange">
  15 + <view class="uni-input">{{startTime}}</view>
  16 + </picker>
  17 + </view>
  18 + </view>
  19 +
  20 + <view class="uni-list-cell">
  21 + <view class="uni-list-cell-left">
  22 + 结束时间
  23 + </view>
  24 + <view class="uni-list-cell-db">
  25 + <picker mode="date" :value="endTime" :start="startDate" :end="endDate" @change="bindDateChange">
  26 + <view class="uni-input">{{endTime}}</view>
  27 + </picker>
  28 + </view>
  29 + </view>
  30 + </view>
  31 +
  32 + <view v-if="recordList.length>0">
  33 + <view class="parkRecordWrap" v-for="(i, index) in recordList" @click="toRecordDetail(i)">
  34 + <view>
  35 + {{i.plName}}
  36 + </view>
  37 + <view class="recordCon">
  38 + <text>{{i.carNumber}}</text>
  39 + <!--<text>{{i.parkOutTime}}</text>-->
  40 + <uni-dateformat :date="i.parkOutTime" format="yyyy-MM-dd hh:mm:ss"></uni-dateformat>
  41 + </view>
  42 + <view class="recordCon">
  43 + <text>实收:{{ $common.moneyFormat(i.orderActFee) }}</text>
  44 + <text>应收:{{ $common.moneyFormat(i.orderTotalFee) }}</text>
  45 + </view>
  46 + </view>
  47 +
  48 + </view>
  49 +
  50 +
  51 + <view v-else>
  52 + <image class="marginAuto" src="../../static/vipcard/novipcard.png" mode="aspectFit"></image>
  53 + <view class="text-center">
  54 + 暂无停车记录
  55 + </view>
  56 +
  57 + </view>
  58 +
  59 +
  60 + </view>
61 61 </template>
62 62  
63 63 <script>
64   - export default {
65   - data() {
66   - const currentDate = this.getDate({
67   - format: true
68   - })
69   - return {
70   - detailText: '',
71   - startTime: currentDate,
72   - endTime: currentDate,
73   - mycarNumber: '',
74   - userIsLogin: false,
75   - // shownoFlag: 0,
76   - recordList: [],
77   - }
78   - },
79   - onLoad(params) {
80   - wx.showShareMenu({
81   - withShareTicket: true
82   - })
83   - console.log("params.record : " + params.record);
84   - this.getCouponSummary();
85   - this.getBusinessParkOrderByBusIdForPage()
86   - },
87   - onShow() {
88   - var me = this;
89   - var userInfo = me.getGlobalUser("globalUser");
90   - if (userInfo != null) {
91   - me.userIsLogin = true;
92   - } else {
93   - me.userIsLogin = false;
94   - }
95   - },
96   - // 过滤器
97   - filters: {},
98   - //计算属性
99   - computed: {
100   - startDate() {
101   - return this.getDate('start');
102   - },
103   - endDate() {
104   - return this.getDate('end');
105   - }
106   - },
107   - methods: {
108   - getCouponSummary() {
109   - let that = this;
110   - let data = {
111   - businessId: uni.getStorageSync("indexInfo").businessId,
112   - startTime: that.startTime,
113   - endTime: that.endTime
114   - };
115   - console.log(data)
116   - that.$myRequest({
117   - url: that.$common.parkingCouponSummary,
118   - method: 'POST',
119   - data: that.$common.requestSign(data)
120   - }).then(res => {
121   -
122   - let data = res.data;
123   - that.detailText = data.totalFeeSummary+' '+data.actFeeSummary+' '+data.dicountFeeSummary;
124   -
125   - })
126   -
127   - },
128   - // 通过商户ID查询停车记录信息
129   - getBusinessParkOrderByBusIdForPage() {
130   - let that = this
131   - let paramsData = {
132   - businessId: uni.getStorageSync("indexInfo").businessId,
133   - startTime: that.startTime,
134   - endTime: that.endTime
135   - }
136   - // 首页信息获取 接口
137   - that.$myRequest({
138   - url: that.$common.getBusinessParkOrderByBusIdForPage,
139   - method: 'POST',
140   - data: that.$common.requestSign(paramsData)
141   - }).then(res => {
142   - this.recordList = res.data.dataList
143   - })
144   - },
145   - toRecordDetail: function(i) {
146   - // console.log(orderId)
147   - uni.navigateTo({
148   - url: '../parkRecordList/recordDetail?optionData=' + JSON.stringify(i)
149   - });
150   -
151   - },
152   - bindStartDateChange: function(e) {
153   - this.startTime = e.detail.value
154   - this.getCouponSummary();
155   - this.getBusinessParkOrderByBusIdForPage()
156   - },
157   - bindDateChange: function(e) {
158   - this.endTime = e.detail.value
159   - this.getCouponSummary();
160   - this.getBusinessParkOrderByBusIdForPage()
161   - },
162   - getDate(type) {
163   - const date = new Date();
164   - let year = date.getFullYear();
165   - let month = date.getMonth() + 1;
166   - let day = date.getDate();
167   - if (type === 'start') {
168   - year = year - 60;
169   - } else if (type === 'end') {
170   - year = year + 2;
171   - }
172   - month = month > 9 ? month : '0' + month;
173   - day = day > 9 ? day : '0' + day;
174   - return `${year}-${month}-${day}`;
175   - },
176   - }
177   - }
  64 +export default {
  65 + data() {
  66 + const currentDate = this.getDate({
  67 + format: true
  68 + })
  69 + return {
  70 + detailText: '',
  71 + startTime: currentDate,
  72 + endTime: currentDate,
  73 + mycarNumber: '',
  74 + userIsLogin: false,
  75 + // shownoFlag: 0,
  76 + recordList: [],
  77 + pageNum: 1,//当前页
  78 + pageSize: 10,//每页条数
  79 + totalPages: '1', // 总条数
  80 + status: 'no-more',
  81 + refreshIfNeeded: false,
  82 + }
  83 + },
  84 + onLoad(params) {
  85 + wx.showShareMenu({
  86 + withShareTicket: true
  87 + })
  88 + console.log("params.record : " + params.record);
  89 + this.getCouponSummary();
  90 + this.getBusinessParkOrderByBusIdForPage()
  91 + },
  92 + onShow() {
  93 + var me = this;
  94 + var userInfo = me.getGlobalUser("globalUser");
  95 + if (userInfo != null) {
  96 + me.userIsLogin = true;
  97 + } else {
  98 + me.userIsLogin = false;
  99 + }
  100 +
  101 +
  102 + var pages = getCurrentPages(); // 获取当前页面栈
  103 + var currentPage = pages[pages.length - 1]; // 当前页面
  104 + if (currentPage.data.refreshIfNeeded) {
  105 + console.log('show')
  106 + currentPage.data.refreshIfNeeded = false;
  107 + this.pageNum = 1//当前页
  108 + this.pageSize = 10//每页条数
  109 + this.recordList = []
  110 + this.status = 'no-more'
  111 + this.getBusinessParkOrderByBusIdForPage(); // 当前页面 method中的方法,用来刷新当前页面
  112 + }
  113 +
  114 + },
  115 + // 过滤器
  116 + filters: {},
  117 + // 下拉刷新触发
  118 + onPullDownRefresh(val) {
  119 + console.log('下拉刷新触发')
  120 + this.pageNum = 1
  121 + this.pageSize = this.pageSize
  122 + this.totalPages = 1
  123 + this.recordList = []
  124 + this.getBusinessParkOrderByBusIdForPage()
  125 + },
  126 + // 上拉加载触发
  127 + onReachBottom() {
  128 + console.log('上拉加载触发')
  129 + console.log(this.totalPages)
  130 + console.log(this.recordList.length)
  131 + if (this.totalPages == this.recordList.length) {
  132 + this.status = 'no-more'
  133 + return
  134 + } else {
  135 + this.pageNum++;
  136 + this.getBusinessParkOrderByBusIdForPage()
  137 + }
  138 + },
  139 + //计算属性
  140 + computed: {
  141 + startDate() {
  142 + return this.getDate('start');
  143 + },
  144 + endDate() {
  145 + return this.getDate('end');
  146 + }
  147 + },
  148 + methods: {
  149 + getCouponSummary() {
  150 + let that = this;
  151 + let data = {
  152 + businessId: uni.getStorageSync("indexInfo").businessId,
  153 + startTime: that.startTime,
  154 + endTime: that.endTime
  155 + };
  156 + console.log(data)
  157 + that.$myRequest({
  158 + url: that.$common.parkingCouponSummary,
  159 + method: 'POST',
  160 + data: that.$common.requestSign(data)
  161 + }).then(res => {
  162 + let data = res.data;
  163 + that.detailText = data.totalFeeSummary + ' ' + data.actFeeSummary + ' ' + data.dicountFeeSummary;
  164 + })
  165 + },
  166 + // 通过商户ID查询停车记录信息
  167 + getBusinessParkOrderByBusIdForPage() {
  168 + let that = this
  169 + that.status = 'loading'
  170 + let paramsData = {
  171 + businessId: uni.getStorageSync("indexInfo").businessId,
  172 + startTime: that.startTime,
  173 + endTime: that.endTime,
  174 + pageNum: that.pageNum,
  175 + pageSize: that.pageSize
  176 + }
  177 + // 首页信息获取 接口
  178 + that.$myRequest({
  179 + url: that.$common.getBusinessParkOrderByBusIdForPage,
  180 + method: 'POST',
  181 + data: that.$common.requestSign(paramsData)
  182 + }).then(res => {
  183 + // this.recordList = res.data.dataList
  184 +
  185 + if (res.data.dataList.length > 0) {
  186 + if (res.data.pageTotals < 10) {
  187 + that.status = 'no-more'
  188 + } else {
  189 + that.status = 'more'
  190 + console.log('more')
  191 + }
  192 + } else {
  193 + that.status = 'no-more'
  194 + }
  195 + that.totalPages = res.data.pageTotals;
  196 + that.recordList = that.recordList.concat(res.data.dataList)
  197 + // console.log(that.recordList.length)
  198 +
  199 +
  200 + })
  201 + },
  202 + toRecordDetail: function (i) {
  203 + // console.log(orderId)
  204 + uni.navigateTo({
  205 + url: '../parkRecordList/recordDetail?optionData=' + JSON.stringify(i)
  206 + });
  207 + },
  208 + bindStartDateChange: function (e) {
  209 + this.pageNum = 1
  210 + this.pageSize = this.pageSize
  211 + this.totalPages = 1
  212 + this.recordList = []
  213 + this.startTime = e.detail.value
  214 + this.getCouponSummary();
  215 + this.getBusinessParkOrderByBusIdForPage()
  216 + },
  217 + bindDateChange: function (e) {
  218 + this.pageNum = 1
  219 + this.pageSize = this.pageSize
  220 + this.totalPages = 1
  221 + this.recordList = []
  222 +
  223 + this.endTime = e.detail.value
  224 + this.getCouponSummary();
  225 + this.getBusinessParkOrderByBusIdForPage()
  226 + },
  227 + getDate(type) {
  228 + const date = new Date();
  229 + let year = date.getFullYear();
  230 + let month = date.getMonth() + 1;
  231 + let day = date.getDate();
  232 + if (type === 'start') {
  233 + year = year - 60;
  234 + } else if (type === 'end') {
  235 + year = year + 2;
  236 + }
  237 + month = month > 9 ? month : '0' + month;
  238 + day = day > 9 ? day : '0' + day;
  239 + return `${year}-${month}-${day}`;
  240 + },
  241 + }
  242 +}
178 243 </script>
179 244  
180 245 <style lang="scss" scoped>
181   - .parkRecordWrap {
182   - padding: 5px 40px 5px 15px;
183   - border-bottom: 1px solid #ccc;
184   - position: relative;
185   -
186   - :after {
187   - content: '>';
188   - position: absolute;
189   - top: 20px;
190   - right: 5px;
191   - font-size: 18px;
192   - }
193   - }
194   -
195   - .recordCon {
196   - color: #999;
197   - display: flex;
198   - justify-content: space-between;
199   - }
  246 + .parkRecordWrap {
  247 + padding: 5px 40px 5px 15px;
  248 + border-bottom: 1px solid #ccc;
  249 + position: relative;
  250 +
  251 + :after {
  252 + content: '>';
  253 + position: absolute;
  254 + top: 20px;
  255 + right: 5px;
  256 + font-size: 18px;
  257 + }
  258 + }
  259 +
  260 + .recordCon {
  261 + color: #999;
  262 + display: flex;
  263 + justify-content: space-between;
  264 + }
200 265 </style>
... ...
pages/revisePwd/revisePwd.vue 0 → 100644
  1 +<template>
  2 + <view>
  3 + <view class="setting-content">
  4 + <!--<uni-list>-->
  5 + <!--<uni-list-item title="关于我们" clickable @click="toAboutOur" showArrow></uni-list-item>-->
  6 + <!--<uni-list-item title="修改登录密码" clickable @click="toAboutOur" showArrow></uni-list-item>-->
  7 + <!--<uni-list-item title="清除缓存" clickable @click="cleanStorage" ></uni-list-item>-->
  8 + <!--</uni-list>-->
  9 +
  10 +
  11 + <uni-section title="修改登录密码" type="line">
  12 + <view class="example" style="padding: 0 15px;">
  13 + <!-- 基础表单校验 -->
  14 + <uni-forms ref="valiForm" :rules="rules" :modelValue="valiFormData" label-width="100">
  15 + <uni-forms-item label="原登录密码" required name="oldPwd">
  16 + <uni-easyinput v-model="valiFormData.oldPwd" placeholder="请输入原登录密码"/>
  17 + </uni-forms-item>
  18 + <uni-forms-item label="新登录密码" required name="newPwd">
  19 + <uni-easyinput v-model="valiFormData.newPwd" placeholder="请输入新登录密码"/>
  20 + </uni-forms-item>
  21 + <uni-forms-item label="新登录密码" required name="newPwdAga">
  22 + <uni-easyinput v-model="valiFormData.newPwdAga" placeholder="请再次输入新登录密码"/>
  23 + </uni-forms-item>
  24 + </uni-forms>
  25 +
  26 + </view>
  27 + </uni-section>
  28 +
  29 +
  30 + <view class="uni-padding-wrap uni-common-mt">
  31 + <button type="warn" @click="submit('valiForm')">确定修改</button>
  32 + </view>
  33 +
  34 + </view>
  35 +
  36 + </view>
  37 +</template>
  38 +
  39 +<script>
  40 +
  41 +export default {
  42 + data() {
  43 + return {
  44 + // 校验表单数据
  45 + valiFormData: {
  46 + oldPwd: '',
  47 + newPwd: '',
  48 + newPwdAga: '',
  49 + },
  50 + // 校验规则
  51 + rules: {
  52 + oldPwd: {
  53 + rules: [{
  54 + required: true,
  55 + errorMessage: '原密码不能为空'
  56 + }, {
  57 + minLength: 6,
  58 + errorMessage: '请输入大于六位数',
  59 + }
  60 + ]
  61 + },
  62 + newPwd: {
  63 + rules: [{
  64 + required: true,
  65 + errorMessage: '新密码不能为空'
  66 + }, {
  67 + minLength: 6,
  68 + errorMessage: '请输入大于六位数',
  69 + }
  70 + ]
  71 + },
  72 + newPwdAga: {
  73 + rules: [{
  74 + required: true,
  75 + errorMessage: '新密码不能为空'
  76 + }, {
  77 + minLength: 6,
  78 + errorMessage: '请输入大于六位数',
  79 + }
  80 + ]
  81 + }
  82 + },
  83 + }
  84 + },
  85 + methods: {
  86 + submit(ref) {
  87 + let that = this;
  88 + this.$refs[ref].validate().then(res => {
  89 + if(this.valiFormData.newPwd !== this.valiFormData.newPwdAga){
  90 + uni.showToast({
  91 + icon:'none',
  92 + title: `两次输入的新密码不一样`
  93 + })
  94 + return
  95 + }
  96 + // uni.getStorageSync("indexInfo").userName
  97 +
  98 + let changePassword = this.$common.changePassword;
  99 + let jsondata = {
  100 + userCode: uni.getStorageSync("indexInfo").userCode,
  101 + oldPassWord: this.valiFormData.oldPwd,
  102 + newPassWord: this.valiFormData.newPwdAga,
  103 + };
  104 + uni.request({
  105 + url: changePassword,
  106 + data: JSON.stringify(this.$common.requestSign(jsondata)),
  107 + dataType: "json",
  108 + method: "POST",
  109 + success: (res) => {
  110 + console.log(res)
  111 + if (res.data.code == 0) {
  112 + uni.showToast({
  113 + icon:'none',
  114 + title: `修改成功`
  115 + })
  116 + that.loginOut();
  117 + }else{
  118 + uni.showToast({
  119 + icon:'none',
  120 + title: res.data.message
  121 + })
  122 +
  123 + }
  124 + }
  125 + })
  126 +
  127 + }).catch(err => {
  128 + console.log('err', err);
  129 + })
  130 + },
  131 + toAboutOur() {
  132 + uni.navigateTo({
  133 + url: '../aboutOur/aboutOur'
  134 + });
  135 + },
  136 + cleanStorage() {
  137 + uni.clearStorageSync();
  138 + uni.showToast({
  139 + title: "清理缓存成功",
  140 + mask: false,
  141 + duration: 2000
  142 + })
  143 + },
  144 + loginOutAlert() {
  145 + let that = this;
  146 + uni.showModal({
  147 + title: '提示',
  148 + content: '是否确定退出登录?',
  149 + success: (res) => {
  150 + if (res.confirm) {
  151 + that.loginOut();
  152 + } else if (res.cancel) {
  153 + console.log('用户点击取消')
  154 + }
  155 + }
  156 + })
  157 + },
  158 + loginOut() {
  159 + let that = this;
  160 + that.$myRequest({
  161 + url: that.$common.userLoginout,
  162 + method: 'POST',
  163 + data: that.$common.requestSign()
  164 + }).then(res => {
  165 + // 获取真实数据之前,务必判断状态是否为200
  166 + console.log('退出:' + JSON.stringify(res));
  167 + if (res.code == 0) {
  168 + uni.clearStorageSync();
  169 + uni.reLaunch({
  170 + url: "../index/index"
  171 + })
  172 + uni.hideLoading();
  173 + } else {
  174 + uni.clearStorageSync();
  175 + uni.reLaunch({
  176 + url: "../index/index"
  177 + })
  178 + uni.hideLoading();
  179 + }
  180 + })
  181 + }
  182 + }
  183 +}
  184 +</script>
  185 +
  186 +<style lang="scss">
  187 + .setting-content {
  188 + background-color: #f6f6f6;
  189 + height: 100vh;
  190 +
  191 + }
  192 +</style>
... ...
pages/setting/setting.vue
1 1 <template>
2   - <view>
3   - <view class="setting-content">
4   - <uni-list>
5   - <uni-list-item title="关于我们" clickable @click="toAboutOur" showArrow></uni-list-item>
6   - <uni-list-item title="清除缓存" clickable @click="cleanStorage" ></uni-list-item>
7   - </uni-list>
  2 + <view>
  3 + <view class="setting-content">
  4 + <uni-list>
  5 + <uni-list-item title="关于我们" clickable @click="toAboutOur" showArrow></uni-list-item>
  6 + <uni-list-item title="修改登录密码" clickable @click="toRevisePwd" showArrow></uni-list-item>
  7 + <uni-list-item title="清除缓存" clickable @click="cleanStorage"></uni-list-item>
  8 + </uni-list>
8 9  
9   - <view class="uni-padding-wrap uni-common-mt">
10   - <button type="warn" @click="loginOutAlert">退出登录</button>
11   - </view>
  10 + <view class="uni-padding-wrap uni-common-mt">
  11 + <button type="warn" @click="loginOutAlert">退出登录</button>
  12 + </view>
12 13  
13   - </view>
  14 + </view>
14 15  
15   - </view>
  16 + </view>
16 17 </template>
17 18  
18 19 <script>
19   -
20   - export default {
21   - data() {
22   - return {
23   -
24   - }
25   - },
26   - methods: {
27   - toAboutOur() {
28   - uni.navigateTo({
29   - url: '../aboutOur/aboutOur'
30   -
31   - });
32   - },
33   - cleanStorage() {
34   - uni.clearStorageSync();
35   - uni.showToast({
36   - title: "清理缓存成功",
37   - mask: false,
38   - duration:2000
39   - })
40   - },
41   - loginOutAlert(){
42   - let that = this;
43   - uni.showModal({
44   - title:'提示',
45   - content:'是否确定退出登录?',
46   - success: (res) => {
47   - if(res.confirm){
48   - that.loginOut();
49   - }else if(res.cancel){
50   - console.log('用户点击取消')
51   - }
52   - }
53   - })
54   -
55   - },
56   - loginOut(){
57   - let that = this;
58   - that.$myRequest({
59   - url: that.$common.userLoginout,
60   - method: 'POST',
61   - data: that.$common.requestSign()
62   - }).then(res => {
63   - // 获取真实数据之前,务必判断状态是否为200
64   - console.log('退出:' + JSON.stringify(res));
65   - if (res.code == 0) {
66   -
67   - uni.clearStorageSync();
68   - uni.reLaunch({
69   - url: "../index/index"
70   - })
71   - uni.hideLoading();
72   -
73   - } else {
74   -
75   - uni.clearStorageSync();
76   - uni.reLaunch({
77   - url: "../index/index"
78   - })
79   - uni.hideLoading();
80   -
81   - }
82   -
83   - })
84   - }
85   - }
86   - }
  20 +
  21 +export default {
  22 + data() {
  23 + return {}
  24 + },
  25 + methods: {
  26 + toRevisePwd() {
  27 + uni.navigateTo({
  28 + url: '../revisePwd/revisePwd'
  29 + });
  30 + },
  31 + toAboutOur() {
  32 + uni.navigateTo({
  33 + url: '../aboutOur/aboutOur'
  34 + });
  35 + },
  36 + cleanStorage() {
  37 + uni.clearStorageSync();
  38 + uni.showToast({
  39 + title: "清理缓存成功",
  40 + mask: false,
  41 + duration: 2000
  42 + })
  43 + },
  44 + loginOutAlert() {
  45 + let that = this;
  46 + uni.showModal({
  47 + title: '提示',
  48 + content: '是否确定退出登录?',
  49 + success: (res) => {
  50 + if (res.confirm) {
  51 + that.loginOut();
  52 + } else if (res.cancel) {
  53 + console.log('用户点击取消')
  54 + }
  55 + }
  56 + })
  57 + },
  58 + loginOut() {
  59 + let that = this;
  60 + that.$myRequest({
  61 + url: that.$common.userLoginout,
  62 + method: 'POST',
  63 + data: that.$common.requestSign()
  64 + }).then(res => {
  65 + // 获取真实数据之前,务必判断状态是否为200
  66 + console.log('退出:' + JSON.stringify(res));
  67 + if (res.code == 0) {
  68 + uni.clearStorageSync();
  69 + uni.reLaunch({
  70 + url: "../index/index"
  71 + })
  72 + uni.hideLoading();
  73 + } else {
  74 + uni.clearStorageSync();
  75 + uni.reLaunch({
  76 + url: "../index/index"
  77 + })
  78 + uni.hideLoading();
  79 + }
  80 + })
  81 + }
  82 + }
  83 +}
87 84 </script>
88 85  
89 86 <style lang="scss">
90   - .setting-content {
91   - background-color: #f6f6f6;
92   - height: 100vh;
93   - }
  87 + .setting-content {
  88 + background-color: #f6f6f6;
  89 + height: 100vh;
  90 + }
94 91 </style>
... ...