jufubao-base 1.0.242-beta1 → 1.0.242-beta10

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.242-beta1",
3
+ "version": "1.0.242-beta10",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -55,6 +55,19 @@ export default {
55
55
  },
56
56
  inline: false,
57
57
  },
58
+ {
59
+ label: '选取城市路径:',
60
+ ele: 'xd-select-pages-path',
61
+ valueKey: 'cityPath',
62
+ placeholder: '请选择选取城市路径',
63
+ value: data.cityPath || null,
64
+ className: 'input100',
65
+ groupKey:'advanced',
66
+ setting: {
67
+ router: XdBus.getParentApi('getPagesTree')
68
+ },
69
+ inline: false,
70
+ },
58
71
  ].filter(i=>i)
59
72
  },
60
73
  advanced: [],
@@ -115,6 +115,21 @@
115
115
  <XdButton @click="handleConfirm" size="small" type="primary">确认</XdButton>
116
116
  </view>
117
117
  </XdDialog>
118
+ <XdDialog class="location-dialog-title" width="80%" :show.sync="showLocationDialog" :showClose="false"
119
+ :showTitle="true">
120
+ <view slot="title">
121
+ <xd-font-icon icon="icondingweixiao" color="#999999" size="60"></xd-font-icon>
122
+ <text style="font-size: 32rpx;color: #333;margin-top: 12rpx;">定位请求</text>
123
+ </view>
124
+ <view class="location-dialog-content">
125
+ <view>为了给您提供更好的服务需要获取您的位置信息</view>
126
+ </view>
127
+ <view class="dialog-btns" slot="btn">
128
+ <XdButton @click="showLocationDialog=false" bgColor="#EEEEEE" color="#888888" size="small" type="info">取消
129
+ </XdButton>
130
+ <XdButton @click="handleToCity" size="small" type="primary">允许</XdButton>
131
+ </view>
132
+ </XdDialog>
118
133
  </view>
119
134
  </template>
120
135
 
@@ -131,6 +146,9 @@
131
146
  import { mapState } from 'vuex';
132
147
 
133
148
  export default {
149
+ //#ifdef MP-WEIXIN
150
+ options: { styleIsolation: 'shared' },
151
+ //#endif
134
152
  name: "JfbBaseConsumpCode",
135
153
  components: {
136
154
  XdFontIcon,
@@ -174,7 +192,10 @@
174
192
  userInfo: {},
175
193
  is_vip: 'N',
176
194
  isPreview: false,
177
- jwxSDK: null
195
+ jwxSDK: null,
196
+ refresh: true, //onshow是否刷新数据
197
+ showLocationDialog: false,
198
+ cityPath: ''
178
199
  }
179
200
  },
180
201
  watch: {
@@ -240,9 +261,12 @@
240
261
 
241
262
  if (Object.keys(this.stateLocation).length === 0) {
242
263
  this.tip = '为了给您提供更好的服务需要获取您的位置信息'
264
+ this.showLocationDialog = true;
243
265
  this.showMask = true;
244
266
  this.showDialog = false;
245
267
  return
268
+ } else{
269
+ this.showLocationDialog = false
246
270
  }
247
271
  }
248
272
  if (!this.options.shop_id) {
@@ -292,6 +316,13 @@
292
316
  ).value;
293
317
  this.cashPayPath = getContainerPropsValue(container, 'content.cash_pay_path', { value: "" }
294
318
  ).value;
319
+ this.successPath = getContainerPropsValue(
320
+ container,
321
+ "content.successPath",
322
+ { value: "" }
323
+ ).value;
324
+ this.cityPath = getContainerPropsValue(container, 'content.cityPath', { value: "" }
325
+ ).value;
295
326
  },
296
327
  getUserInfo() {
297
328
  jfbRootExec("getConsumpBaseUserInfo", {
@@ -458,6 +489,7 @@
458
489
  if (parseFloat(need_pay_price) > 0) {//补差
459
490
  this.handleThirdPay(pay_order_id, order_id);
460
491
  } else {//订单成功
492
+ this.refresh = false
461
493
  this.$xdUniHelper.redirectTo({
462
494
  url: this.successPath + `?order_id=${order_id}`
463
495
  })
@@ -693,6 +725,7 @@
693
725
  },
694
726
  })
695
727
  .then((res) => {
728
+ this.refresh = false;
696
729
  this.$xdUniHelper.redirectTo({
697
730
  url: this.successPath + `?order_id=${main_order_id}`
698
731
  });
@@ -737,6 +770,11 @@
737
770
  this.price = "";
738
771
  }
739
772
  },
773
+ handleToCity() {
774
+ this.$xdUniHelper.navigateTo({
775
+ url: this.cityPath
776
+ },true);
777
+ },
740
778
  handleNumberChange(num) {
741
779
  let curTag = this.curTag;
742
780
  this.total_price = this.$xdUniHelper.multiplyFloatNumber(curTag.price_yuan, num);
@@ -761,7 +799,9 @@
761
799
  },
762
800
  onJfbShow(options) {
763
801
  console.log('event.onJfbShow', options)
764
- this.onJfbLoad(options);
802
+ if (this.refresh) {
803
+ this.onJfbLoad(options);
804
+ }
765
805
  },
766
806
  onJfbHide(options) {
767
807
  console.log('event.onJfbHide', options)
@@ -1041,8 +1081,29 @@
1041
1081
  .dialog-btns {
1042
1082
  width: 100%;
1043
1083
  display: flex;
1044
- justify-content: space-between;
1084
+ justify-content: space-around;
1085
+
1086
+ }
1087
+
1088
+ .location-dialog-content {
1089
+ display: flex;
1090
+ justify-content: center;
1091
+ align-items: center;
1092
+ border-bottom: 2rpx dashed #E5E5E5;
1093
+ padding-bottom: 30rpx;
1094
+
1095
+ &>view:first-child {
1096
+ font-size: 26rpx;
1097
+ color: #999999;
1098
+ width: 60%;
1099
+ }
1100
+ }
1045
1101
 
1102
+ .location-dialog-title ::v-deep .xd-dailog__body-title {
1103
+ padding-top: 40rpx;
1104
+ padding-bottom: 32rpx;
1105
+ height: auto;
1106
+ line-height: inherit;
1046
1107
  }
1047
1108
  }
1048
1109
  </style>
@@ -56,6 +56,18 @@ export default {
56
56
  },
57
57
  classNmae: 'input80',
58
58
  },
59
+ {
60
+ label: '边框颜色:',
61
+ ele: 'xd-color',
62
+ valueKey: 'borderColor',
63
+ groupKey:'content',
64
+ value: data['borderColor'] || '',
65
+ placeholder: '请选择边框颜色',
66
+ setting: {
67
+ isAlpha: false
68
+ },
69
+ classNmae: 'input80',
70
+ },
59
71
  {
60
72
  label: '菜单文字颜色:',
61
73
  ele: 'xd-color',
@@ -19,6 +19,7 @@
19
19
  <view class="jfb-base-footer__body">
20
20
  <view :style="[bodyStyle]">
21
21
  <xd-footer-bar
22
+ class="footer-bar-deep"
22
23
  style="height:100%"
23
24
  v-if="list !== null"
24
25
  :height="height"
@@ -48,6 +49,9 @@
48
49
  import getServiceUrl from "@/common/getServiceUrl";
49
50
 
50
51
  export default {
52
+ //#ifdef MP-WEIXIN
53
+ options: { styleIsolation: 'shared' },
54
+ //#endif
51
55
  name: "JfbBaseFooter",
52
56
  components: {
53
57
  XdFontIcon,
@@ -61,6 +65,7 @@
61
65
  backgroundSize: '100% 100%',
62
66
  backgroundRepeat: 'no-repeat',
63
67
  backgroundPosition: 'top center',
68
+ '--border-color': this.borderColor
64
69
  }
65
70
 
66
71
  if(this.backgroundImage && this.backgroundImage.url) {
@@ -78,6 +83,7 @@
78
83
  footerBarKey: 'footerBarKey', //刷新
79
84
  baseUrl: '',
80
85
  backgroundImage: '',
86
+ borderColor: ''
81
87
  }
82
88
  },
83
89
  watch: {
@@ -197,6 +203,7 @@
197
203
  let bar = getContainerPropsValue(value, 'content.footer-setting', []);
198
204
  let imageIcons = getContainerPropsValue(value, 'content.footerSettingImage', []);
199
205
  this.backgroundImage = getContainerPropsValue(value, 'content.backgroundImage', '');
206
+ this.borderColor = getContainerPropsValue(value, 'content.borderColor', '#eee');
200
207
  this.list = {
201
208
  bgColor: getContainerPropsValue(value, 'content.bgColor', '#fff'),
202
209
  bodyStyle: this.bodyStyle,
@@ -222,6 +229,12 @@
222
229
 
223
230
  <style scoped lang="less">
224
231
  @import "./JfbBaseFooterLess.less";
232
+ .footer-bar-deep {
233
+ ::v-deep .xd-footer-tabbar__border {
234
+ border-color: var(--border-color);
235
+ }
236
+ }
237
+
225
238
 
226
239
  .jfb-base-footer {
227
240
 
@@ -605,8 +605,8 @@ export default {
605
605
  },
606
606
 
607
607
  onJfbLoad(options) {
608
- if(options['x-common']){
609
- let decodeParams = Base64.decode(options['x-common']);
608
+ if(options['x-share']){
609
+ let decodeParams = Base64.decode(options['x-share']);
610
610
  try{
611
611
  let commonParams = JSON.parse(decodeParams);
612
612
  this.share_code = commonParams.share_code;
@@ -788,6 +788,7 @@ export default {
788
788
  data: {
789
789
  third_auth_code: loginRes.code,
790
790
  provider_id: this.quickLogin.provider_id,
791
+ share_code: this.share_code
791
792
  },
792
793
  })
793
794
  .then((res) => {
@@ -1045,6 +1045,7 @@ export default {
1045
1045
  custom_content_container_id: this.cid,
1046
1046
  is_show_jhd_code: Number(this.is_show),
1047
1047
  is_show_product: this.is_show_product === "Y" ? 1 : 0,
1048
+ version: 'v2'
1048
1049
  },
1049
1050
  })
1050
1051
  .then((res) => {
@@ -24,7 +24,6 @@
24
24
  <view class="column_value text-gray">
25
25
  <xd-unit
26
26
  :price="payInfo.total_amount"
27
- :isShowIcon="isShowIcon"
28
27
  :isOld="false"
29
28
  :font-size="28"
30
29
  :icon-size="0.28"
@@ -40,7 +39,6 @@
40
39
  <!-- <xd-button width="220rpx" radius="60rpx" type="primary" size="small" @click="xdDownDrawer=true">使用新票券</xd-button> -->
41
40
  <xd-unit
42
41
  :price="payInfo.card_amount"
43
- :isShowIcon="isShowIcon"
44
42
  :isOld="false"
45
43
  :font-size="28"
46
44
  :icon-size="0.28"
@@ -106,7 +104,6 @@
106
104
  <view class="column_value text-primary">
107
105
  <xd-unit
108
106
  :price="payInfo.channel_amount"
109
- :isShowIcon="isShowIcon"
110
107
  :isOld="false"
111
108
  :font-size="28"
112
109
  :icon-size="0.28"
@@ -247,10 +244,6 @@ export default {
247
244
  }
248
245
  return url
249
246
  },
250
- isShowIcon() {
251
- if(this.$configProject['isPreview']) return true;
252
- return this.siteInfo.mapping.is_show_coin_icon==='Y'
253
- },
254
247
  ...styleForm.getComputedItem(),
255
248
  },
256
249
  created() {
@@ -371,8 +371,8 @@ export default {
371
371
  this.auth_code = options.auth_code;
372
372
  this.provider_id = options.provider_id;
373
373
  this.callback_url = options.callback_url;
374
- if(options['x-common']){
375
- let decodeParams = Base64.decode(options['x-common']);
374
+ if(options['x-share']){
375
+ let decodeParams = Base64.decode(options['x-share']);
376
376
  try{
377
377
  let commonParams = JSON.parse(decodeParams);
378
378
  this.share_code = commonParams.share_code;
@@ -574,7 +574,7 @@ export default {
574
574
  auth_code,
575
575
  provider_id,
576
576
  phone_number,
577
- share_code,
577
+ share_code: this.share_code,
578
578
  }
579
579
  }).then(res => {
580
580
  this.$xdHideLoading();
@@ -142,9 +142,9 @@
142
142
  padding: this.getMarginAndPadding(this.tabPadding, { top: 40, right: 0, bottom: 40, left: 0 }),
143
143
  }
144
144
  },
145
- disabledMonth(){
145
+ disabledMonth() {
146
146
  let month = new Date().getMonth() + 1
147
- return this.getYearAndMonth(this.monthDateRange).month==month
147
+ return this.getYearAndMonth(this.monthDateRange).month == month
148
148
  }
149
149
  },
150
150
  watch: {
@@ -154,6 +154,8 @@
154
154
  },
155
155
  tab(value, oldValue) {
156
156
  //请求数据
157
+ this.hasNext = true;
158
+ this.page_token = 1
157
159
  if (value === 'month') {
158
160
  this.getMonthData()
159
161
  } else if (value === 'year') {
@@ -161,8 +163,6 @@
161
163
  } else if (value === 'total') {
162
164
  this.getTotalData()
163
165
  }
164
- this.hasNext = true;
165
- this.page_token = 1
166
166
  this.monthDateRange = ""
167
167
  }
168
168
  },
@@ -180,7 +180,10 @@
180
180
  }
181
181
  },
182
182
  getMonthData() {
183
- let data = {}
183
+ let data = {
184
+ page_size: 10,
185
+ page_token: this.page_token,
186
+ }
184
187
  if (this.monthDateRange) {
185
188
  data.year = this.getYearAndMonth(this.monthDateRange).year
186
189
  data.month = this.getYearAndMonth(this.monthDateRange).month
@@ -287,18 +290,22 @@
287
290
  };
288
291
  this.monthDateRange = res.date_range
289
292
  this.saveAmount = res.save_amount
290
- this.hasNext = res.next_page_token !== "";
291
293
  if (this.page_token === 1) {
292
294
  this.productList = list
293
295
  } else {
294
296
  this.productList = this.productList.concat(list);
295
297
  }
298
+ this.next_page_token = res.next_page_token
299
+ this.hasNext = res.next_page_token !== "";
296
300
  })
297
301
  },
298
302
  getYearData() {
299
303
  jfbRootExec('getYearSavingDetail', {
300
304
  vm: this,
301
- data: {},
305
+ data: {
306
+ page_size: 10,
307
+ page_token: this.page_token,
308
+ },
302
309
  }).then(res => {
303
310
  let list = res.list.map(item => {
304
311
  item["order_time"] = this.$xdUniHelper.getDate(
@@ -380,18 +387,22 @@
380
387
  };
381
388
  this.yearDateRange = res.date_range
382
389
  this.saveAmount = res.save_amount
383
- this.hasNext = res.next_page_token !== "";
384
390
  if (this.page_token === 1) {
385
391
  this.productList = list
386
392
  } else {
387
393
  this.productList = this.productList.concat(list);
388
394
  }
395
+ this.next_page_token = res.next_page_token
396
+ this.hasNext = res.next_page_token !== "";
389
397
  })
390
398
  },
391
399
  getTotalData() {
392
400
  jfbRootExec('getTotalSavingDetail', {
393
401
  vm: this,
394
- data: {},
402
+ data: {
403
+ page_size: 10,
404
+ page_token: this.page_token,
405
+ },
395
406
  }).then(res => {
396
407
  let list = res.list.map(item => {
397
408
  item["order_time"] = this.$xdUniHelper.getDate(
@@ -472,12 +483,13 @@
472
483
  };
473
484
  this.totalDateRange = res.date_range
474
485
  this.saveAmount = res.save_amount
475
- this.hasNext = res.next_page_token !== "";
476
486
  if (this.page_token === 1) {
477
487
  this.productList = list
478
488
  } else {
479
489
  this.productList = this.productList.concat(list);
480
490
  }
491
+ this.next_page_token = res.next_page_token
492
+ this.hasNext = res.next_page_token !== "";
481
493
  })
482
494
  },
483
495
  /**
@@ -497,7 +509,7 @@
497
509
  this.tabIndex = i;
498
510
  },
499
511
  getAmout(amount) {
500
- return this.$xdUniHelper.divisionFloatNumber(amount, 100)||0
512
+ return this.$xdUniHelper.divisionFloatNumber(amount, 100) || 0
501
513
  },
502
514
  getYearAndMonth(dateStr) {
503
515
  // 将输入的日期字符串转换为Date对象
@@ -673,6 +685,7 @@
673
685
 
674
686
  &-info {
675
687
  flex: 1;
688
+
676
689
  &-name {
677
690
  font-size: 28rpx;
678
691
  color: #333333;
@@ -701,7 +714,8 @@
701
714
  }
702
715
  }
703
716
  }
704
- .monthDisabled{
717
+
718
+ .monthDisabled {
705
719
  background: #FCFCFC !important;
706
720
  color: #EEEEEE !important;
707
721
  }
@@ -25,11 +25,11 @@
25
25
  </view>
26
26
 
27
27
  <view v-if="showShare" class="share_wrap">
28
- <button class="share_btn" open-type="share" @click="toSendWx" :style="{backgroundImage: `url(${shareImage})`}">
29
- <!-- <image :src="shareImage" mode="widthFix"></image> -->
28
+ <button class="share_btn" open-type="share" @click="toSendWx">
29
+ <image :src="shareImage" mode="widthFix"></image>
30
30
  </button>
31
- <view class="share_btn" @click="toSaveImg" :style="{backgroundImage: `url(${savaImage})`}">
32
- <!-- <image src="https://sandbox-img1.jufubao.cn/uploads/20250410/faeb136bfd684ab6fa4608208ad26294.png?x-oss-process=style/size8" mode="widthFix"></image> -->
31
+ <view class="share_btn" @click="toSaveImg">
32
+ <image :src="savaImage" mode="widthFix"></image>
33
33
  </view>
34
34
  </view>
35
35
 
@@ -66,6 +66,7 @@
66
66
  //todo
67
67
  shareImage: "",
68
68
  savaImage: "",
69
+ shareData: {},
69
70
  }
70
71
  },
71
72
  computed: {
@@ -116,8 +117,10 @@
116
117
  let urlSearch = item.share_image_url.split('?')[1];
117
118
  let newImgUrl = getServiceUrl(item.share_image_url);
118
119
  item.share_image_url = newImgUrl.split('?')[0] + '?' + urlSearch;
120
+ item.wx_mini_share_image = getServiceUrl(item.wx_mini_share_image);
119
121
  return item;
120
122
  });
123
+ this.shareData = res;
121
124
  })
122
125
  },
123
126
  handleSwitch(e){
@@ -127,9 +130,9 @@
127
130
  let shareIndex = this.shareIndex;
128
131
  let curShare = this.shareList[shareIndex];
129
132
  this.setShareInfo({
130
- title: "您的好友邀请您使用PLUS会员",
131
- imageUrl: curShare.share_image_url,
132
- path: `${curShare.jump_url}`,
133
+ title: this.shareData.wx_mini_title,
134
+ imageUrl: curShare.wx_mini_share_image,
135
+ path: this.shareData.wx_mini_path,
133
136
  });
134
137
  },
135
138
  toSaveImg(){
@@ -245,16 +248,19 @@
245
248
  }
246
249
  .share_wrap{
247
250
  display: flex;
248
- align-items: center;
251
+ // align-items: center;
252
+ align-items: flex-start;
249
253
  justify-content: center;
250
254
  .share_btn{
251
255
  width: 300rpx;
252
- height: 80rpx;
256
+ // height: 80rpx;
253
257
  background-size: 100% 100%;
254
258
  background-color: transparent;
255
259
  margin: 60rpx 0 0 0;
260
+ padding: 0;
256
261
  &::after{
257
262
  border: none !important;
263
+ content: initial !important;
258
264
  }
259
265
  image{
260
266
  width: 100%;
@@ -575,6 +575,7 @@ export default {
575
575
  is_show_product: this.is_show_product === "Y" ? 1 : 0,
576
576
  custom_content_page_id: this.pageAttr.page_id,
577
577
  custom_content_container_id: this.cid,
578
+ version: 'v2'
578
579
  },
579
580
  })
580
581
  .then((res) => {
@@ -256,8 +256,8 @@
256
256
  this.auth_code = options.auth_code;
257
257
  this.provider_id = options.provider_id;
258
258
  if(options.url) this.nextUrl = Base64.decode(options.url);
259
- if(options['x-common']){
260
- let decodeParams = Base64.decode(options['x-common']);
259
+ if(options['x-share']){
260
+ let decodeParams = Base64.decode(options['x-share']);
261
261
  try{
262
262
  let commonParams = JSON.parse(decodeParams);
263
263
  this.share_code = commonParams.share_code;