jufubao-base 1.0.290 → 1.0.291

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-base",
3
- "version": "1.0.290",
3
+ "version": "1.0.291",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -133,9 +133,16 @@
133
133
  */
134
134
  async getNumber(){
135
135
  let status = await jfbRootFnExec(this,'getCurrentPagesIsShow')();
136
- let bar = getContainerPropsValue(this.container, 'content.footer-setting', []);
136
+ this.footerTpl = gCPVal(this.container, 'footerTpl', 'noraml');
137
+
138
+ //设置底部菜单
139
+ let settingKey = 'footer-setting';
140
+ if(this.footerTpl === 'itemCenterBig') settingKey = 'footer-setting-center-big'
141
+ let barlist = gCPVal(this.container, settingKey, []);
142
+
143
+
137
144
  let params = [];
138
- bar.map((item, index) => {
145
+ barlist.map((item, index) => {
139
146
  if(item.api) {
140
147
  let urlObj = this.$xdUniHelper.parseURL(item.api);
141
148
  params.push({
@@ -276,6 +276,7 @@
276
276
  margin-left: -60rpx;
277
277
  bottom: 0;
278
278
  border: var(--center-border);
279
+ overflow: hidden;
279
280
  }
280
281
  }
281
282
 
@@ -11,10 +11,7 @@ import {
11
11
 
12
12
  export default function (data, gValue, gColor, oldData){
13
13
  const {footerSettingImage, footerSetting} = tools(data);
14
-
15
- let footerTpl = dataVal({data, key:'footerTpl', dValue:'normal', gValue});
16
-
17
-
14
+ let footerTpl = dataVal({data, key:'footerTpl', dValue:'normal', gValue});
18
15
  let iconStyle = {
19
16
  cusColor:{
20
17
  iconColor: '#333',
@@ -39,7 +36,6 @@ export default function (data, gValue, gColor, oldData){
39
36
  }
40
37
  if(data.iconStyle !== undefined) iconStyle = data.iconStyle;
41
38
 
42
-
43
39
  return [
44
40
  {
45
41
  label: '',
@@ -513,7 +513,7 @@
513
513
  },
514
514
  getYearAndMonth(dateStr) {
515
515
  // 将输入的日期字符串转换为Date对象
516
- const date = new Date(dateStr.replace("年", "-").replace("月", "-01"));
516
+ const date = new Date(this.convertDateFormat(dateStr));
517
517
 
518
518
  // 获取年份和月份
519
519
  const year = date.getFullYear();
@@ -529,8 +529,20 @@
529
529
  const month = String(date.getMonth() + 1);
530
530
  return `${year}年${month}月`;
531
531
  },
532
+ convertDateFormat(dateStr) {
533
+ if(!dateStr)return''
534
+ // 提取年份和月份
535
+ const year = dateStr.match(/(\d{4})年/)[1];
536
+ const month = dateStr.match(/(\d+)月/)[1];
537
+
538
+ // 确保月份是两位数
539
+ const formattedMonth = month.padStart(2, '0');
540
+
541
+ // 组合成目标格式
542
+ return `${year}-${formattedMonth}-01`;
543
+ },
532
544
  handleLastMonth() {
533
- const dateRange = new Date(this.monthDateRange.replace("年", "-").replace("月", "-01"));
545
+ const dateRange = new Date(this.convertDateFormat(this.monthDateRange));
534
546
  // 获取上一个月的日期范围
535
547
  const previousMonth = new Date(dateRange);
536
548
  previousMonth.setMonth(dateRange.getMonth() - 1);
@@ -540,7 +552,7 @@
540
552
  this.getMonthData()
541
553
  },
542
554
  handleNextMonth() {
543
- const dateRange = new Date(this.monthDateRange.replace("年", "-").replace("月", "-01"));
555
+ const dateRange = new Date(this.convertDateFormat(this.monthDateRange));
544
556
  // 获取下一个月的日期范围
545
557
  const nextMonth = new Date(dateRange);
546
558
  nextMonth.setMonth(dateRange.getMonth() + 1);