jufubao-base 1.0.237-beta9 → 1.0.238-beta1

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