jufubao-base 1.0.237-beta2 → 1.0.237

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/package.json +1 -1
  2. package/src/components/JfbBaseMySetting/JfbBaseMySetting.vue +8 -0
  3. package/src/components/JfbBaseNoticeDialog/Api.js +1 -1
  4. package/src/components/JfbBaseNoticeDialog/Attr.js +0 -26
  5. package/src/components/JfbBaseNoticeDialog/JfbBaseNoticeDialog.vue +6 -25
  6. package/src/components/JfbBaseTfkSearch/ContentProduct.vue +22 -11
  7. package/src/components/JfbBaseTfkSearch/JfbBaseTfkSearch.vue +1 -8
  8. package/src/components/JfbBaseTfkSearch/Mock.js +3 -51
  9. package/src/components/JfbBaseTfkSearch/listMixins.js +1 -1
  10. package/src/components/JfbBaseUserInfo/Attr.js +10 -102
  11. package/src/components/JfbBaseUserInfo/JfbBaseUserInfo.vue +114 -305
  12. package/src/components/JfbBaseBalance/Api.js +0 -46
  13. package/src/components/JfbBaseBalance/Attr.js +0 -316
  14. package/src/components/JfbBaseBalance/JfbBaseBalance.vue +0 -332
  15. package/src/components/JfbBaseBalance/JfbBaseBalanceLess.less +0 -79
  16. package/src/components/JfbBaseBalance/JfbBaseBalanceMixin.js +0 -30
  17. package/src/components/JfbBaseBalance/Mock.js +0 -9
  18. package/src/components/JfbBaseCodeOpenVip/Api.js +0 -36
  19. package/src/components/JfbBaseCodeOpenVip/Attr.js +0 -281
  20. package/src/components/JfbBaseCodeOpenVip/JfbBaseCodeOpenVip.vue +0 -253
  21. package/src/components/JfbBaseCodeOpenVip/JfbBaseCodeOpenVipLess.less +0 -79
  22. package/src/components/JfbBaseCodeOpenVip/JfbBaseCodeOpenVipMixin.js +0 -30
  23. package/src/components/JfbBaseCodeOpenVip/Mock.js +0 -13
  24. package/src/components/JfbBaseConsumpCode/Api.js +0 -133
  25. package/src/components/JfbBaseConsumpCode/Attr.js +0 -61
  26. package/src/components/JfbBaseConsumpCode/JfbBaseConsumpCode.vue +0 -961
  27. package/src/components/JfbBaseConsumpCode/JfbBaseConsumpCodeLess.less +0 -79
  28. package/src/components/JfbBaseConsumpCode/JfbBaseConsumpCodeMixin.js +0 -30
  29. package/src/components/JfbBaseConsumpCode/Mock.js +0 -22
  30. package/src/components/JfbBaseOpenVip/Api.js +0 -39
  31. package/src/components/JfbBaseOpenVip/Attr.js +0 -270
  32. package/src/components/JfbBaseOpenVip/JfbBaseOpenVip.vue +0 -424
  33. package/src/components/JfbBaseOpenVip/JfbBaseOpenVipLess.less +0 -79
  34. package/src/components/JfbBaseOpenVip/JfbBaseOpenVipMixin.js +0 -30
  35. package/src/components/JfbBaseOpenVip/Mock.js +0 -7
  36. package/src/components/JfbBaseOpenVip/XdVipList.vue +0 -125
  37. package/src/components/JfbBaseOpenVipCard/Api.js +0 -58
  38. package/src/components/JfbBaseOpenVipCard/Attr.js +0 -48
  39. package/src/components/JfbBaseOpenVipCard/JfbBaseOpenVipCard.vue +0 -111
  40. package/src/components/JfbBaseOpenVipCard/JfbBaseOpenVipCardLess.less +0 -79
  41. package/src/components/JfbBaseOpenVipCard/JfbBaseOpenVipCardMixin.js +0 -30
  42. package/src/components/JfbBaseOpenVipCard/Mock.js +0 -13
  43. package/src/components/JfbBaseOpenVipDetail/Api.js +0 -36
  44. package/src/components/JfbBaseOpenVipDetail/Attr.js +0 -37
  45. package/src/components/JfbBaseOpenVipDetail/JfbBaseOpenVipDetail.vue +0 -225
  46. package/src/components/JfbBaseOpenVipDetail/JfbBaseOpenVipDetailLess.less +0 -79
  47. package/src/components/JfbBaseOpenVipDetail/JfbBaseOpenVipDetailMixin.js +0 -30
  48. package/src/components/JfbBaseOpenVipDetail/Mock.js +0 -13
  49. package/src/components/JfbBasePersonalData/Api.js +0 -26
  50. package/src/components/JfbBasePersonalData/Attr.js +0 -12
  51. package/src/components/JfbBasePersonalData/JfbBasePersonalData.vue +0 -198
  52. package/src/components/JfbBasePersonalData/JfbBasePersonalDataLess.less +0 -79
  53. package/src/components/JfbBasePersonalData/JfbBasePersonalDataMixin.js +0 -30
  54. package/src/components/JfbBasePersonalData/Mock.js +0 -13
  55. package/src/components/JfbBasePointsCard/Api.js +0 -18
  56. package/src/components/JfbBasePointsCard/Attr.js +0 -187
  57. package/src/components/JfbBasePointsCard/JfbBasePointsCard.vue +0 -208
  58. package/src/components/JfbBasePointsCard/JfbBasePointsCardLess.less +0 -79
  59. package/src/components/JfbBasePointsCard/JfbBasePointsCardMixin.js +0 -30
  60. package/src/components/JfbBasePointsCard/Mock.js +0 -5
  61. package/src/components/JfbBasePointsDetail/Api.js +0 -48
  62. package/src/components/JfbBasePointsDetail/Attr.js +0 -304
  63. package/src/components/JfbBasePointsDetail/JfbBasePointsDetail.vue +0 -267
  64. package/src/components/JfbBasePointsDetail/JfbBasePointsDetailLess.less +0 -79
  65. package/src/components/JfbBasePointsDetail/JfbBasePointsDetailMixin.js +0 -30
  66. package/src/components/JfbBasePointsDetail/Mock.js +0 -6
  67. package/src/components/JfbBasePosterGroup/Api.js +0 -58
  68. package/src/components/JfbBasePosterGroup/Attr.js +0 -48
  69. package/src/components/JfbBasePosterGroup/JfbBasePosterGroup.vue +0 -111
  70. package/src/components/JfbBasePosterGroup/JfbBasePosterGroupLess.less +0 -79
  71. package/src/components/JfbBasePosterGroup/JfbBasePosterGroupMixin.js +0 -30
  72. package/src/components/JfbBasePosterGroup/Mock.js +0 -13
  73. package/src/components/JfbBaseSavingDetail/Api.js +0 -41
  74. package/src/components/JfbBaseSavingDetail/Attr.js +0 -70
  75. package/src/components/JfbBaseSavingDetail/JfbBaseSavingDetail.vue +0 -679
  76. package/src/components/JfbBaseSavingDetail/JfbBaseSavingDetailLess.less +0 -79
  77. package/src/components/JfbBaseSavingDetail/JfbBaseSavingDetailMixin.js +0 -30
  78. package/src/components/JfbBaseSavingDetail/Mock.js +0 -10
  79. package/src/components/JfbBaseSavingDetail/components/echarts.min.js +0 -26
  80. package/src/components/JfbBaseSavingDetail/components/echarts.vue +0 -254
  81. package/src/components/JfbBaseSavingDetail/components/wx-canvas.js +0 -105
  82. package/src/components/JfbBaseShare/Api.js +0 -20
  83. package/src/components/JfbBaseShare/Attr.js +0 -14
  84. package/src/components/JfbBaseShare/JfbBaseShare.vue +0 -261
  85. package/src/components/JfbBaseShare/JfbBaseShareLess.less +0 -79
  86. package/src/components/JfbBaseShare/JfbBaseShareMixin.js +0 -30
  87. package/src/components/JfbBaseShare/Mock.js +0 -16
  88. package/src/components/JfbBaseWithDrawAgain/Api.js +0 -41
  89. package/src/components/JfbBaseWithDrawAgain/Attr.js +0 -92
  90. package/src/components/JfbBaseWithDrawAgain/JfbBaseWithDrawAgain.vue +0 -334
  91. package/src/components/JfbBaseWithDrawAgain/JfbBaseWithDrawAgainLess.less +0 -79
  92. package/src/components/JfbBaseWithDrawAgain/JfbBaseWithDrawAgainMixin.js +0 -30
  93. package/src/components/JfbBaseWithDrawAgain/Mock.js +0 -10
  94. package/src/components/JfbBaseWithDrawRecord/Api.js +0 -19
  95. package/src/components/JfbBaseWithDrawRecord/Attr.js +0 -79
  96. package/src/components/JfbBaseWithDrawRecord/JfbBaseWithDrawRecord.vue +0 -233
  97. package/src/components/JfbBaseWithDrawRecord/JfbBaseWithDrawRecordLess.less +0 -79
  98. package/src/components/JfbBaseWithDrawRecord/JfbBaseWithDrawRecordMixin.js +0 -30
  99. package/src/components/JfbBaseWithDrawRecord/Mock.js +0 -7
  100. package/src/components/JfbBaseWithdraw/Api.js +0 -48
  101. package/src/components/JfbBaseWithdraw/Attr.js +0 -328
  102. package/src/components/JfbBaseWithdraw/JfbBaseWithdraw.vue +0 -245
  103. package/src/components/JfbBaseWithdraw/JfbBaseWithdrawLess.less +0 -79
  104. package/src/components/JfbBaseWithdraw/JfbBaseWithdrawMixin.js +0 -30
  105. package/src/components/JfbBaseWithdraw/Mock.js +0 -7
@@ -1,679 +0,0 @@
1
- <template>
2
- <view class="jfb-base-saving-detail" @click="handleEditxSelect" :class="{ editx : isEditx && active }">
3
- <!--#ifdef H5-->
4
- <view class="jfb-base-saving-detail__edit" :class="{ editx : isEditx && active }" v-if="isEditx && active">
5
- <view class="jfb-base-saving-detail__edit-icon" @click="delEdit">删除</view>
6
- </view>
7
- <!-- #endif -->
8
- <view class="jfb-base-saving-detail__body">
9
- <scroll-view scroll-x="true">
10
- <view class="tab_list" :style="[tabStyleComp]">
11
- <view class="tab_item" v-for="(tab, i) in tabs" :key="tab.value" :style="{
12
- color: i === tabIndex? titleActColor : titleColor,
13
- }" @click="switchTab(i)">
14
- {{tab.label}}
15
- <view v-if="i === tabIndex" class="check" :style="{background: titleActColor
16
- }"></view>
17
- <view class="check" v-else></view>
18
- </view>
19
-
20
- </view>
21
- </scroll-view>
22
- <view v-if="tab==='month'">
23
- <view style="width: 710rpx;margin: 0 auto;borderRadius: 20rpx;background:#FFF">
24
- <view class="jfb-base-saving-detail__body-month">
25
- <view @click="handleLastMonth">上一月</view>
26
- <view>{{monthDateRange}}</view>
27
- <view @click="handleNextMonth">下一月</view>
28
- </view>
29
- <view style="width: 710rpx;height: 480rpx">
30
- <echarts ref="monthEcharts" :option="option" canvasId="monthEcharts"></echarts>
31
- </view>
32
- <view class="jfb-base-saving-detail__body-block"></view>
33
- </view>
34
- </view>
35
- <view v-if="tab==='year'">
36
- <view style="width: 710rpx;margin: 0 auto;borderRadius: 20rpx;background:#FFF">
37
- <view class="jfb-base-saving-detail__body-cycle">{{yearDateRange}}</view>
38
- <view style="width: 710rpx;height: 480rpx">
39
- <echarts ref="yearEcharts" :option="option" canvasId="yearEcharts"></echarts>
40
- </view>
41
- <view class="jfb-base-saving-detail__body-block"></view>
42
- </view>
43
- </view>
44
- <view v-if="tab==='total'">
45
- <view style="width: 710rpx;margin: 0 auto;borderRadius: 20rpx;background:#FFF">
46
- <view class="jfb-base-saving-detail__body-cycle">{{totalDateRange}}</view>
47
- <view style="width: 710rpx;height: 480rpx">
48
- <echarts ref="totalEcharts" :option="option" canvasId="totalEcharts"></echarts>
49
- </view>
50
- <view class="jfb-base-saving-detail__body-block"></view>
51
- </view>
52
- </view>
53
- <view class="jfb-base-saving-detail__body-product">
54
- <view class="jfb-base-saving-detail__body-product-title">
55
- <view>购物</view>
56
- <view>已省:{{getAmout(saveAmount)}}</view>
57
- </view>
58
- <view v-if="productList.length>0">
59
- <view v-for="(item,index) in productList" :key="index" class="jfb-base-saving-detail__body-product-item">
60
- <image :src="item.product_image">
61
- </image>
62
- <view class="jfb-base-saving-detail__body-product-item-info">
63
- <view class="jfb-base-saving-detail__body-product-item-info-name">{{item.product_name}}</view>
64
- <view class="jfb-base-saving-detail__body-product-item-info-time">
65
- <view>{{item.order_time}}</view>
66
- <view>{{item.product_num}}件</view>
67
- </view>
68
- <view class="jfb-base-saving-detail__body-product-item-info-price">
69
- <view>合计节省</view>
70
- <view :style="{color:mainColor}">{{getAmout(item.saving_amount)}}</view>
71
- </view>
72
- </view>
73
- </view> 
74
- </view>
75
- </view>
76
- </view>
77
- </view>
78
- </template>
79
-
80
- <script>
81
- import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
82
- import { jfbRootExec } from "@/utils/xd.event";
83
- import JfbBaseSavingDetailMixin from "./JfbBaseSavingDetailMixin";
84
- import { getContainerPropsValue } from "@/utils/xd.base";
85
- import echarts from './components/echarts.vue'
86
- import componentsMixins from "@/mixins/componentsMixins";
87
- import extsMixins from "@/mixins/extsMixins";
88
- export default {
89
- name: "JfbBaseSavingDetail",
90
- components: {
91
- XdFontIcon,
92
- echarts
93
- },
94
- mixins: [
95
- componentsMixins, extsMixins, JfbBaseSavingDetailMixin
96
- ],
97
- data() {
98
- return {
99
- tabs: [
100
- {
101
- label: '月度',
102
- value: 'month'
103
- },
104
- {
105
- label: '年度',
106
- value: 'year'
107
- },
108
- {
109
- label: '累计',
110
- value: 'total'
111
- }
112
- ],
113
- //标题
114
- titleBgc: '',
115
- titleColor: '',
116
- titleActColor: '',
117
- titlePadding: '',
118
- tabPadding: '',
119
- tabIndex: 0,
120
- tab: 'month',
121
- option: null,
122
- monthDateRange: '',
123
- yearDateRange: '',
124
- totalDateRange: '',
125
- saveAmount: 0, //节省金额
126
- productList: [],
127
- hasNext: true,
128
- page_token: 1
129
- }
130
- },
131
- computed: {
132
- tabStyleComp() {
133
- return {
134
- background: this.titleBgc,
135
- marginBottom: this.titlePadding + 'rpx',
136
- padding: this.getMarginAndPadding(this.tabPadding, { top: 40, right: 0, bottom: 40, left: 0 }),
137
- }
138
- },
139
- },
140
- watch: {
141
- container(value, oldValue) {
142
- if (JSON.stringify(value) === JSON.stringify(oldValue)) return;
143
- if (this.$configProject['isPreview']) this.init(value)
144
- },
145
- tab(value, oldValue) {
146
- //请求数据
147
- if (value === 'month') {
148
- this.getMonthData()
149
- } else if (value === 'year') {
150
- this.getYearData()
151
- } else if (value === 'total') {
152
- this.getTotalData()
153
- }
154
- this.hasNext = true;
155
- this.page_token = 1
156
- this.monthDateRange = ""
157
- }
158
- },
159
- created() {
160
- this.init(this.container);
161
- },
162
- methods: {
163
- onJfbLoad(options) {
164
- if (this.tab === 'month') {
165
- this.getMonthData()
166
- } else if (this.tab === 'year') {
167
- this.getYearData()
168
- } else if (this.tab === 'total') {
169
- this.getTotalData()
170
- }
171
- },
172
- getMonthData() {
173
- let data = {}
174
- if (this.monthDateRange) {
175
- data.year = this.getYearAndMonth(this.monthDateRange).year
176
- data.month = this.getYearAndMonth(this.monthDateRange).month
177
- }
178
- jfbRootExec('getMonthSavingDetail', {
179
- vm: this,
180
- data: data,
181
- }).then(res => {
182
- const textColor = '#999'
183
- const seriesData = res.record_months.map(item => {
184
- return item.value
185
- })
186
- const xAxisList = res.record_months.map(item => {
187
- return item.label
188
- })
189
- this.option = {
190
-
191
- tooltip: {
192
- trigger: 'axis'
193
- },
194
- grid: {
195
- top: '15%',
196
- left: '15%',
197
- right: '15%',
198
- bottom: '15%',
199
- containLabel: false
200
- },
201
- xAxis: {
202
- type: 'category',
203
- data: xAxisList,
204
- axisLabel: {
205
- // 坐标轴字体颜色
206
- color: textColor,
207
- fontSize: 10,
208
- },
209
- axisLine: {
210
- show: false
211
- },
212
- axisLine: {
213
- show: false,
214
- },
215
- axisTick: { //y轴刻度线
216
- show: false
217
- },
218
- splitLine: {
219
- // 网格
220
- show: false
221
- },
222
- boundaryGap: false
223
- },
224
- yAxis: {
225
- type: 'value',
226
- min: 0,
227
- nameTextStyle: {
228
- color: textColor,
229
- fontSize: 10,
230
- padding: [0, 0, 0, 80]
231
- },
232
- axisLabel: {
233
- // 坐标轴字体颜色
234
- color: textColor,
235
- fontSize: 10
236
- },
237
- axisLine: {
238
- show: false,
239
- },
240
- axisTick: { //y轴刻度线
241
- show: false
242
- },
243
- splitLine: {
244
- // 网格
245
- show: true,
246
- lineStyle: {
247
- color: '#CCCCCC',
248
- type: 'dashed'
249
- }
250
- }
251
- },
252
-
253
- series: [
254
- {
255
- name: '成绩(分)',
256
- type: 'line',
257
- symbol: 'circle',
258
- symbolSize: 10,
259
- smooth: true,
260
- z: 1,
261
- itemStyle: {
262
- color: '#5487FF'
263
- },
264
- lineStyle: {
265
- color: '#5487FF'
266
- },
267
- data: seriesData
268
- }
269
- ]
270
- };
271
- this.monthDateRange = res.date_range
272
- this.saveAmount = res.save_amount
273
- this.hasNext = res.next_page_token !== "";
274
- if (this.page_token === 1) {
275
- this.productList = res.list
276
- } else {
277
- this.productList = this.productList.concat(res.list);
278
- }
279
- })
280
- },
281
- getYearData() {
282
- jfbRootExec('getYearSavingDetail', {
283
- vm: this,
284
- data: {},
285
- }).then(res => {
286
- // 最大值
287
- let max = this.getAmout(res.total_amount);
288
- // 数量
289
- let value = this.getAmout(res.save_amount);
290
- // 计算
291
- let rate = Math.round((value * 1000) / max)||0;
292
- this.option = {
293
- backgroundColor: '#fff', // 设置图表区域的背景颜色
294
- borderRadius: 10, // 设置图表区域的圆角
295
- title: [
296
- {
297
- text: '{a|周期已省}\n{b|' + rate + '}', // 显示标题
298
- show: true, // 是否显示
299
- x: 'center', // x轴位置
300
- y: 'center', // y轴位置
301
- textStyle: { // 样式配置
302
- rich: {
303
- a: {
304
- fontSize: 16,
305
- fontWeight: 'normal',
306
- color: '#666',
307
- padding: [0, 0, 10, 0], // 边距
308
- },
309
- b: {
310
- fontSize: 40,
311
- fontWeight: 700,
312
- color: '#000'
313
- },
314
- },
315
- },
316
- },
317
- ],
318
- polar: {
319
- center: ['50%', '50%'],
320
- radius: ['60%', '75%'],
321
- },
322
- angleAxis: {
323
- max: max,
324
- startAngle: 90, // 开始的角度
325
- show: false,
326
- },
327
- radiusAxis: {
328
- type: 'category',
329
- show: true,
330
- axisLabel: {
331
- show: false, // 是否显示标签
332
- },
333
- axisLine: {
334
- show: false, // 是否显示轴线
335
- },
336
- axisTick: {
337
- show: false, // 是否显示刻度
338
- },
339
- },
340
- series: [
341
- {
342
- name: '',
343
- type: 'bar',
344
- roundCap: true,
345
- showBackground: true,
346
- backgroundStyle: {
347
- color: '#f5f5f5',
348
- },
349
- data: [value],
350
- coordinateSystem: 'polar',
351
- itemStyle: {
352
- normal: {
353
- color: this.mainColor,
354
- },
355
- },
356
- },
357
- ],
358
- };
359
- this.yearDateRange = res.date_range
360
- this.saveAmount = res.save_amount
361
- this.hasNext = res.next_page_token !== "";
362
- if (this.page_token === 1) {
363
- this.productList = res.list
364
- } else {
365
- this.productList = this.productList.concat(res.list);
366
- }
367
- })
368
- },
369
- getTotalData() {
370
- jfbRootExec('getTotalSavingDetail', {
371
- vm: this,
372
- data: {},
373
- }).then(res => {
374
- let max = this.getAmout(res.total_amount);
375
- // 数量
376
- let value = this.getAmout(res.save_amount);
377
- // 计算
378
- let rate = Math.round((value * 1000) / max)||0;
379
- this.option = {
380
- backgroundColor: '#fff', // 设置图表区域的背景颜色
381
- borderRadius: 10, // 设置图表区域的圆角
382
- title: [
383
- {
384
- text: '{a|周期已省}\n{b|' + rate + '}', // 显示标题
385
- show: true, // 是否显示
386
- x: 'center', // x轴位置
387
- y: 'center', // y轴位置
388
- textStyle: { // 样式配置
389
- rich: {
390
- a: {
391
- fontSize: 16,
392
- fontWeight: 'normal',
393
- color: '#666',
394
- padding: [0, 0, 10, 0], // 边距
395
- },
396
- b: {
397
- fontSize: 40,
398
- fontWeight: 700,
399
- color: '#000'
400
- },
401
- },
402
- },
403
- },
404
- ],
405
- polar: {
406
- center: ['50%', '50%'],
407
- radius: ['60%', '75%'],
408
- },
409
- angleAxis: {
410
- max: max,
411
- startAngle: 90, // 开始的角度
412
- show: false,
413
- },
414
- radiusAxis: {
415
- type: 'category',
416
- show: true,
417
- axisLabel: {
418
- show: false, // 是否显示标签
419
- },
420
- axisLine: {
421
- show: false, // 是否显示轴线
422
- },
423
- axisTick: {
424
- show: false, // 是否显示刻度
425
- },
426
- },
427
- series: [
428
- {
429
- name: '',
430
- type: 'bar',
431
- roundCap: true,
432
- showBackground: true,
433
- backgroundStyle: {
434
- color: '#f5f5f5',
435
- },
436
- data: [value],
437
- coordinateSystem: 'polar',
438
- itemStyle: {
439
- normal: {
440
- color: this.mainColor,
441
- },
442
- },
443
- },
444
- ],
445
- };
446
- this.totalDateRange = res.date_range
447
- this.saveAmount = res.save_amount
448
- this.hasNext = res.next_page_token !== "";
449
- if (this.page_token === 1) {
450
- this.productList = res.list
451
- } else {
452
- this.productList = this.productList.concat(res.list);
453
- }
454
- })
455
- },
456
- /**
457
- * @description 监听事件变化
458
- * @param container {object} 业务组件对象自己
459
- */
460
- init(container) {
461
- //标题
462
- this.titleBgc = getContainerPropsValue(container, 'content.titleBgc', '#ffff');
463
- this.titlePadding = getContainerPropsValue(container, 'content.titlePadding', 20);
464
- this.tabPadding = getContainerPropsValue(container, 'content.tabPadding', { top: 40, right: 0, bottom: 40, left: 0 });
465
- this.titleColor = getContainerPropsValue(container, 'content.titleColor', '#666');
466
- this.titleActColor = getContainerPropsValue(container, 'content.titleActColor', this.mainColor);
467
- },
468
- switchTab(i) {
469
- this.tab = this.tabs[i].value;
470
- this.tabIndex = i;
471
- },
472
- getAmout(amount) {
473
- return this.$xdUniHelper.divisionFloatNumber(amount, 100)||0
474
- },
475
- getYearAndMonth(dateStr) {
476
- // 将输入的日期字符串转换为Date对象
477
- const date = new Date(dateStr.replace("年", "-").replace("月", "-01"));
478
-
479
- // 获取年份和月份
480
- const year = date.getFullYear();
481
- const month = String(date.getMonth() + 1).padStart(2);
482
-
483
- return {
484
- year: year,
485
- month: month
486
- };
487
- },
488
- formatDate(date) {
489
- const year = date.getFullYear();
490
- const month = String(date.getMonth() + 1).padStart(2);
491
- return `${year}年${month}月`;
492
- },
493
- handleLastMonth() {
494
- const dateRange = new Date(this.monthDateRange.replace("年", "-").replace("月", "-01"));
495
- // 获取上一个月的日期范围
496
- const previousMonth = new Date(dateRange);
497
- previousMonth.setMonth(dateRange.getMonth() - 1);
498
- const previousMonthStart = new Date(previousMonth.getFullYear(), previousMonth.getMonth(), 1);
499
- const previousMonthEnd = new Date(previousMonth.getFullYear(), previousMonth.getMonth() + 1, 0);
500
- this.monthDateRange = this.formatDate(previousMonthStart)
501
- this.getMonthData()
502
- },
503
- handleNextMonth() {
504
- const dateRange = new Date(this.monthDateRange.replace("年", "-").replace("月", "-01"));
505
- // 获取下一个月的日期范围
506
- const nextMonth = new Date(dateRange);
507
- nextMonth.setMonth(dateRange.getMonth() + 1);
508
- const nextMonthStart = new Date(nextMonth.getFullYear(), nextMonth.getMonth(), 1);
509
- const nextMonthEnd = new Date(nextMonth.getFullYear(), nextMonth.getMonth() + 1, 0);
510
- this.monthDateRange = this.formatDate(nextMonthEnd)
511
- this.getMonthData()
512
- },
513
- onJfbScroll(options) {
514
- console.log('event.onJfbScroll', options)
515
- },
516
- onJfbReachBottom(options) {
517
- if (this.hasNext) {
518
- this.page_token = this.next_page_token;
519
- if (this.tab === 'month') {
520
- this.getMonthData()
521
- } else if (this.tab === 'year') {
522
- this.getYearData()
523
- } else if (this.tab === 'total') {
524
- this.getTotalData()
525
- }
526
- }
527
- },
528
- onJfbShow(options) {
529
- console.log('event.onJfbShow', options)
530
- },
531
- onJfbHide(options) {
532
- console.log('event.onJfbHide', options)
533
- },
534
- onJfbBack(options) {
535
- console.log('event.onJfbBack', options)
536
- },
537
- onJfbUpdate(...data) {
538
- console.log('event.onJfbUpdate', data)
539
- },
540
- onJfbCustomEvent(options) {
541
- console.log('event.onJfbReachBottom', options)
542
- },
543
- }
544
- }
545
-
546
- </script>
547
-
548
- <style scoped lang="less">
549
- @import "./JfbBaseSavingDetailLess.less";
550
-
551
- .jfb-base-saving-detail {
552
- &__body {
553
- .tab_list {
554
- display: flex;
555
- justify-content: space-around;
556
- align-items: center;
557
- white-space: nowrap;
558
-
559
- .tab_item {
560
- flex: 1;
561
- display: flex;
562
- align-items: center;
563
- justify-content: center;
564
- flex-direction: column;
565
- color: #666666;
566
- font-size: unit(32, rpx);
567
- white-space: nowrap;
568
- }
569
-
570
- .check {
571
- width: 60rpx;
572
- height: 6rpx;
573
- margin-top: 12rpx;
574
- }
575
- }
576
-
577
- &-cycle {
578
- font-size: 32rpx;
579
- color: #999;
580
- text-align: center;
581
- padding-top: 40rpx;
582
- }
583
-
584
- &-block {
585
- height: 40rpx;
586
- width: 100%;
587
- }
588
-
589
- &-month {
590
- display: flex;
591
- align-items: center;
592
- justify-content: space-around;
593
- padding: 40rpx 24rpx 20rpx 24rpx;
594
-
595
- &>view:first-child,
596
- &>view:last-child {
597
- font-size: 28rpx;
598
- color: #999999;
599
- padding: 12rpx 60rpx;
600
- background: #F5F5F5;
601
- border-radius: 40rpx;
602
- }
603
-
604
- &>view:nth-child(2) {
605
- font-size: 32rpx;
606
- color: #999;
607
- }
608
- }
609
-
610
- &-product {
611
- border-radius: 20rpx;
612
- background: #fff;
613
- margin: 20rpx;
614
-
615
- &-title {
616
- font-size: 28rpx;
617
- display: flex;
618
- align-items: center;
619
- justify-content: space-between;
620
- padding: 24rpx;
621
- border-bottom: 2rpx solid #eee;
622
-
623
- &>view:first-child {
624
- color: #333;
625
- font-weight: 500;
626
- }
627
-
628
- &>view:nth-child(2) {
629
- color: #999999;
630
- font-size: 24rpx;
631
- }
632
- }
633
-
634
- &-item {
635
- display: flex;
636
- padding: 26rpx;
637
- border-bottom: 2rpx solid #eee;
638
-
639
- &>image {
640
- width: 200rpx;
641
- height: 200rpx;
642
- margin-right: 32rpx;
643
- flex-shrink: 0;
644
-
645
- }
646
-
647
- &-info {
648
- flex: 1;
649
- &-name {
650
- font-size: 28rpx;
651
- color: #333333;
652
- .uni-max-cut(2, 80);
653
- }
654
-
655
- &-time {
656
- display: flex;
657
- align-items: center;
658
- justify-content: space-between;
659
- font-size: 24rpx;
660
- color: #999999;
661
- margin: 40rpx 0 12rpx 0;
662
- }
663
-
664
- &-price {
665
- display: flex;
666
- align-items: center;
667
- justify-content: space-between;
668
- font-size: 24rpx;
669
-
670
- &>view:nth-child(2) {
671
- font-weight: 500;
672
- }
673
- }
674
- }
675
- }
676
- }
677
- }
678
- }
679
- </style>