jufubao-base 1.0.268 → 1.0.269-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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-base",
3
- "version": "1.0.268",
3
+ "version": "1.0.269-beta1",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -307,6 +307,17 @@ export default {
307
307
  { label: "否", value: "N" }
308
308
  ],
309
309
  },
310
+ {
311
+ label: '登录按钮是否隐藏:',
312
+ ele: "xd-radio",
313
+ valueKey: 'hide_login_btn',
314
+ groupKey: 'content',
315
+ value: data.hide_login_btn || 'N',
316
+ list: [
317
+ { label: "否", value: "N" },
318
+ { label: "是", value: "Y" }
319
+ ],
320
+ },
310
321
  {
311
322
  ele: 'title',
312
323
  label: '登录样式设置',
@@ -150,7 +150,7 @@
150
150
  border:`1px solid ${item['is_login'] === 'Y'? mainSubBorderColor:'#eeeeee'}`
151
151
  }"
152
152
  >
153
- <view class="jfb-base-card__body-card-item-left">
153
+ <view class="jfb-base-card__body-card-item-left" v-if="showLoginBtn">
154
154
  <xd-font-icon
155
155
  size="100"
156
156
  :color="mainColor"
@@ -198,7 +198,7 @@
198
198
  class="jfb-base-card__body-card-item-right-bottom-info-deduction"
199
199
  >购买其他物品可抵:{{ item.other_card_point }}</view>
200
200
  </view>
201
- <view @click.stop="toDetail(item)" :style="lookStyle">{{look_name}}</view>
201
+ <view v-if='showLoginBtn' @click.stop="toDetail(item)" :style="lookStyle">{{look_name}}</view>
202
202
  </view>
203
203
  </view>
204
204
  </view>
@@ -300,7 +300,9 @@ export default {
300
300
  jfbAuthorize: (state) => state.jfbAuthorize,
301
301
  }),
302
302
 
303
-
303
+ showLoginBtn(){
304
+ return this.hide_login_btn === 'N'
305
+ },
304
306
 
305
307
  //布局2特殊样式,布局1在行内样式
306
308
  loginStyle(){
@@ -408,6 +410,7 @@ export default {
408
410
 
409
411
  dialogEvent: false,
410
412
  show_coupon_tab: "N",
413
+ hide_login_btn: 'N',
411
414
  // is_show_change: false,
412
415
  popup: "https://img.zcool.cn/community/01784158abe781a801219c77e981ee.jpg?x-oss-process=image/auto-orient,1/resize,m_lfit,w_1280,limit_1/sharpen,100",
413
416
  buy_name: '',
@@ -475,6 +478,7 @@ export default {
475
478
  this.buy_name = getContainerPropsValue(container, "content.buy_name", "购买新卡");
476
479
  this.buy_new_url = getContainerPropsValue(container,"content.buy_new_url",{value: ""}).value;
477
480
  this.show_coupon_tab = getContainerPropsValue(container, "content.show_coupon_tab", "N");
481
+ this.hide_login_btn = getContainerPropsValue(container, "content.hide_login_btn", "N");
478
482
  },
479
483
 
480
484
  handleToLink(path) {
@@ -565,6 +569,7 @@ export default {
565
569
  */
566
570
  handleBindLogin(item) {
567
571
  if(this.$configProject.isPreview) return;
572
+ if(!this.showLoginBtn) return;
568
573
  //普通卡
569
574
  if (this.tabIndex === 1) {
570
575
  //无效卡
@@ -30,6 +30,28 @@ module.exports = [
30
30
  isConsole: true,
31
31
  disabled: true,
32
32
  },
33
+ {
34
+ path: "/pay/v1/quickpay/list-my-config",
35
+ title: "快捷支付-获取我的支付顺序",
36
+ mapFnName: "getMyPayOrderConfig",
37
+ isRule: false,
38
+ params: {},
39
+ isConsole: true,
40
+ disabled: true,
41
+ },
42
+ {
43
+ path: "/pay/v1/quickpay/save-my-config",
44
+ title: "保存支付顺便配置",
45
+ mapFnName: "saveMyPayOrderConfig",
46
+ isRule: false,
47
+ data: {
48
+ configs: ['支付顺序配置', 'String', '必选'],
49
+ pay_method: ['支付方式 card=卡,coupon=优惠券,wallet=钱包', 'String', '必选'],
50
+ priority_rules: ['优先级规则', 'array[string]', '必选'],
51
+ },
52
+ isConsole: true,
53
+ disabled: true,
54
+ },
33
55
  {
34
56
  mapFnName: "getConsumpListUserPayChannel",
35
57
  title: "获取用户可用支付渠道",
@@ -12,7 +12,7 @@
12
12
  }">
13
13
  <view class="content-box">
14
14
  <view class="logo-box">
15
- <image v-if="userInfo['head_url']" :src="userInfo['head_url']" class="logo"></image>
15
+ <image v-if="shopLogo" :src="shopLogo" class="logo"></image>
16
16
  <image v-else class="logo" src="https://img1-b.jufubao.cn/uploads/20250528/e88bb70d4ccdcdd01a277bdf6b66c488.jpg"></image>
17
17
  </view>
18
18
  <view v-if="isFlow">
@@ -33,8 +33,8 @@
33
33
  <view class="verification-item-label">提货点数</view>
34
34
  <view class="verification-item-input">
35
35
  <input v-model="total_price" @input="(value)=>handlerPrice(value)" type="text">
36
- <xd-number v-if="curTag.is_static_price" class="xd-number" :min="1" :max="999" v-model="num"
37
- @change="handleNumberChange"></xd-number>
36
+ <!-- <xd-number v-if="curTag.is_static_price" class="xd-number" :min="1" :max="999" v-model="num"
37
+ @change="handleNumberChange"></xd-number> -->
38
38
  <view :style="{color:mainColor}" class="tip">*提货点数请咨询店员,提货成功后无法退换</view>
39
39
  </view>
40
40
  </view>
@@ -42,7 +42,7 @@
42
42
  下一步</XdButton>
43
43
  <XdButton v-else style="margin-top: 200rpx;display:block" width="260rpx" type="primary" @click="toPayOrder">
44
44
  下一步</XdButton>
45
- <view v-if="plusDiscount">
45
+ <view v-if="plusDiscount" style="margin-top: 40rpx;">
46
46
  <view class="vip" v-if="is_vip==='N'">
47
47
  <view class="vip-title">
48
48
  <view class="vip-title-left">PLUS会员专享</view>
@@ -71,11 +71,18 @@
71
71
  </image>
72
72
  <view class="bar-code-text">{{barCode}}</view>
73
73
  <view style="position: relative">
74
- <image mode="aspectFit" class="qrcode" :src="code_url">
74
+ <image mode="aspectFit" class="qrcode" :src="code_url"></image>
75
75
  <image v-if="qrcode_icon" class="logo-icon" :src="qrcode_icon"></image>
76
76
  </view>
77
- </image>
77
+
78
78
  <view class="code-refresh">{{expiration_sec_str}}后自动更新</view>
79
+ <view class="pay_way">
80
+ <view class="pay_title">此二维码优先使用以下账户进行支付</view>
81
+ <view class="pay_select" @click="showSortDialog">
82
+ <view>{{ curPaySelectShow }}</view>
83
+ <xd-font-icon icon="iconxia_down" size="28" style="margin-left: 24rpx;"></xd-font-icon>
84
+ </view>
85
+ </view>
79
86
  <view v-if="plusDiscount">
80
87
  <view class="vip" v-if="is_vip==='N'">
81
88
  <view class="vip-title">
@@ -134,6 +141,34 @@
134
141
  <XdButton @click="handleToCity" size="small" type="primary">允许</XdButton>
135
142
  </view>
136
143
  </XdDialog>
144
+ <xd-down-drawer
145
+ :show.sync="showShopList"
146
+ :isClose="false"
147
+ :isBodyClose="false"
148
+ height="60vh"
149
+ >
150
+ <shop-list
151
+ v-if="showShopList"
152
+ :getList="p_getShopList"
153
+ @handleCityDone="handleCityDone"
154
+ @handleCityChange="handleCityChange"
155
+ @onChose="handleChoseShop"
156
+ @toChoseOther="handleToShop"
157
+ ></shop-list>
158
+ </xd-down-drawer>
159
+
160
+ <!-- 扣费排序弹框 -->
161
+ <view class="deduct_dialog" v-if="deductDialog">
162
+ <view class="deduct_mask" @touchmove.stop.prevent="moveHandle"></view>
163
+ <view class="deduct_content">
164
+ <view class="deduct_body">
165
+ <xd-deduct-sort :list="paySortList" @onChange="handleDeductSort" @onClose="handleSortClose"></xd-deduct-sort>
166
+ </view>
167
+ <view class="deduct_foot">
168
+ <view class="deduct_btn" @click="doConfirmSortPay">确定</view>
169
+ </view>
170
+ </view>
171
+ </view>
137
172
  </view>
138
173
  </template>
139
174
 
@@ -141,6 +176,9 @@
141
176
  import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
142
177
  import XdDialog from "@/components/XdDailog/XdDailog";
143
178
  import XdButton from "@/components/XdButton/XdButton";
179
+ import XdDownDrawer from "@/components/XdDownDrawer/XdDownDrawer"
180
+ import ShopList from "./shopList.vue"
181
+ import XdDeductSort from "./XdDeductSort.vue"
144
182
  import { jfbRootExec } from "@/utils/xd.event";
145
183
  import JfbBaseConsumpCodeMixin from "./JfbBaseConsumpCodeMixin";
146
184
  import getServiceUrl from "@/common/getServiceUrl";
@@ -157,7 +195,10 @@
157
195
  components: {
158
196
  XdFontIcon,
159
197
  XdDialog,
160
- XdButton
198
+ XdButton,
199
+ XdDownDrawer,
200
+ ShopList,
201
+ XdDeductSort
161
202
  },
162
203
  mixins: [
163
204
  componentsMixins, extsMixins, JfbBaseConsumpCodeMixin
@@ -171,6 +212,7 @@
171
212
  showDialog: false,
172
213
  showMask: true,
173
214
  shop_id: '',
215
+ showShopList: true,
174
216
  secondTimer: null,
175
217
  expiration_sec: '',
176
218
  code_url: '',
@@ -190,6 +232,7 @@
190
232
  num: 1,
191
233
  tip: '',
192
234
  shopName: '',
235
+ shopLogo: "",
193
236
  isFlow: false,
194
237
  xnamespace: '',
195
238
  plusDiscount: 0,
@@ -202,6 +245,9 @@
202
245
  cityPath: '',
203
246
  resource_shop_id: '',
204
247
  qrcode_icon: '',
248
+ deductDialog: false,
249
+ paySortList: [],
250
+ tempList: [],
205
251
  }
206
252
  },
207
253
  watch: {
@@ -245,6 +291,10 @@
245
291
  },
246
292
  btnDisabled() {
247
293
  return this.total_price === '' || !this.tag_id;
294
+ },
295
+ curPaySelectShow(){
296
+ let curPay = this.paySortList[0];
297
+ return curPay.pay_method_name + (curPay.wallet_amount ? `: ${$xdUniHelper.divisionFloatNumber(curPay.wallet_amount, 100)}` : '')
248
298
  }
249
299
  },
250
300
  created() {
@@ -276,31 +326,39 @@
276
326
  }
277
327
  }
278
328
  if (!this.options.shop_id) {
279
- jfbRootExec("getConsumpShopList", {
280
- vm: this,
281
- data: {
282
- city_code: this.stateCity.city_code,
283
- consume_mode: 'SELL',
284
- latitude: this.stateLocation.latitude + '',
285
- longitude: this.stateLocation.longitude + '',
286
- },
287
- }).then(res => {
288
- if (res && res.list.length > 0) {
289
- this.shop_id = res.list[0].shop_id;
290
- this.resource_shop_id = res.list[0].resource_shop_id;
291
- this.shopName = res.list[0].resource_shop_name;
292
- this.showMask = true;
293
- this.showDialog = true;
294
- } else {
295
- this.tip = '您的附近暂时没有支持的店铺'
296
- this.showDialog = false;
297
- }
298
- })
329
+ // jfbRootExec("getConsumpShopList", {
330
+ // vm: this,
331
+ // data: {
332
+ // city_code: this.stateCity.city_code,
333
+ // consume_mode: 'SELL',
334
+ // latitude: this.stateLocation.latitude + '',
335
+ // longitude: this.stateLocation.longitude + '',
336
+ // },
337
+ // }).then(res => {
338
+ // if (res && res.list.length > 0) {
339
+ // this.shop_id = res.list[0].shop_id;
340
+ // this.resource_shop_id = res.list[0].resource_shop_id;
341
+ // this.shopName = res.list[0].resource_shop_name;
342
+ // // this.showMask = true;
343
+ // // this.showDialog = true;
344
+ // } else {
345
+ // this.tip = '您的附近暂时没有支持的店铺'
346
+ // this.showDialog = false;
347
+ // }
348
+ // })
299
349
  } else {
300
350
  this.shop_id = this.options.shop_id;
301
351
  this.resource_shop_id = this.options.resource_shop_id;
302
- this.p_getAsyncStep();
352
+ this.p_getAsyncStep((err) => {
353
+ if(err === 'error'){
354
+ }else{
355
+ this.showShopList = false;
356
+ this.showMask = false;
357
+ }
358
+
359
+ });
303
360
  }
361
+ this.p_getMyPayOrderConfig();
304
362
  },
305
363
  /**
306
364
  * @description 监听事件变化
@@ -332,6 +390,67 @@
332
390
  this.cityPath = getContainerPropsValue(container, 'content.cityPath', { value: "" }
333
391
  ).value;
334
392
  },
393
+ handleSortClose(){
394
+ this.deductDialog = false;
395
+ },
396
+ handleChoseShop(shop){
397
+ this.shop_id = shop.shop_id;
398
+ this.resource_shop_id = shop.resource_shop_id;
399
+ this.shopName = shop.resource_shop_name;
400
+ this.p_getAsyncStep((err) => {
401
+ if(err === 'error'){
402
+ }else{
403
+ this.showShopList = false;
404
+ this.showMask = false;
405
+ }
406
+ });
407
+ },
408
+ moveHandle(){},
409
+ handleCityChange(){
410
+ this.$xdUniHelper.navigateTo({
411
+ url: this.cityPath
412
+ })
413
+ },
414
+ handleCityDone(city){
415
+ console.log("handleCityDone", city);
416
+ },
417
+ showSortDialog(){
418
+ this.deductDialog = true;
419
+ },
420
+ handleDeductSort(list){
421
+ console.log("handleDeductSort",list);
422
+ this.tempList = list;
423
+ },
424
+ doConfirmSortPay(){
425
+ if(this.tempList.length === 0){
426
+ this.deductDialog = false;
427
+ return false;
428
+ }
429
+ let configs = this.tempList.map(item => {
430
+ return {
431
+ pay_method: item.pay_method,
432
+ priority_rules: item.options.map(ii => ii.value)
433
+ }
434
+ })
435
+ console.log('configs',configs);
436
+ jfbRootExec("saveMyPayOrderConfig", {
437
+ vm: this,
438
+ data: {
439
+ configs: configs
440
+ }
441
+ }).then(res => {
442
+ this.deductDialog = false;
443
+ this.paySortList = this.tempList;
444
+ })
445
+ },
446
+ p_getMyPayOrderConfig(){
447
+ jfbRootExec("getMyPayOrderConfig", {
448
+ vm: this,
449
+ data: {},
450
+ }).then(res => {
451
+ this.paySortList = res.configs;
452
+ })
453
+ },
335
454
  getUserInfo() {
336
455
  jfbRootExec("getConsumpBaseUserInfo", {
337
456
  vm: this,
@@ -342,8 +461,32 @@
342
461
  this.userInfo = res;
343
462
  })
344
463
  },
345
- async p_getAsyncStep() {
346
- await this.p_getQuickPayQRCode();
464
+ p_getShopList(params = {}, cb){
465
+ return new Promise((resolve, reject) => {
466
+ jfbRootExec("getConsumpShopList", {
467
+ vm: this,
468
+ data: {
469
+ consume_mode: 'SELL',
470
+ latitude: this.stateLocation.latitude + '',
471
+ longitude: this.stateLocation.longitude + '',
472
+ ...params,
473
+ }
474
+ }).then(res => {
475
+ if(cb) cb(res.list);
476
+ resolve(res.list);
477
+ }).catch(err => {
478
+ reject(err);
479
+ })
480
+ })
481
+ },
482
+ async p_getAsyncStep(cb) {
483
+ try{
484
+ await this.p_getQuickPayQRCode();
485
+ }catch(e){
486
+ if(cb) cb('error');
487
+ return;
488
+ }
489
+ if(cb) cb();
347
490
  if (!this.isFlow) {
348
491
  this.p_getQRCodeStatus();
349
492
  this.p_getListUserPayChannel();
@@ -399,6 +542,7 @@
399
542
  this.showMask = false;
400
543
  this.shopName = res.resource_shop_name;
401
544
  this.getSettleTagList()
545
+ resolve();
402
546
  } else {
403
547
  // 消费码
404
548
  this.temp_order_id = res.temp_order_id;
@@ -417,6 +561,7 @@
417
561
  this.expiration_sec = res.expiration_sec;
418
562
  this.showMask = false;
419
563
  this.shopName = res.resource_shop_name;
564
+ this.shopLogo = getServiceUrl(res.shop_icon)
420
565
  clearInterval(this.secondTimer);
421
566
  this.secondTimer = setInterval(() => {
422
567
  this.expiration_sec--;
@@ -918,6 +1063,28 @@
918
1063
  font-size: 24rpx;
919
1064
  width: 95%;
920
1065
  text-align: center;
1066
+ margin-bottom: 40rpx;
1067
+ }
1068
+ .pay_way{
1069
+ display: flex;
1070
+ flex-direction: column;
1071
+ padding: 40rpx 0;
1072
+ align-items: center;
1073
+ border-top: 1px dashed rgba(229, 229, 229, 1);
1074
+ .pay_title{
1075
+ font-size: 28rpx;
1076
+ margin-bottom: 24rpx;
1077
+ color: #333333;
1078
+ }
1079
+ .pay_select{
1080
+ display: flex;
1081
+ font-size: 28rpx;
1082
+ align-items: center;
1083
+ padding: 20rpx 40rpx;
1084
+ border-radius: 100rpx;
1085
+ background-color: #000;
1086
+ color: #FFFFFF;
1087
+ }
921
1088
  }
922
1089
 
923
1090
  .is-vip {
@@ -943,7 +1110,6 @@
943
1110
  justify-content: space-between;
944
1111
  width: 100%;
945
1112
  padding-top: 40rpx;
946
- margin-top: 40rpx;
947
1113
  border-top: 1px dashed rgba(229, 229, 229, 1);
948
1114
 
949
1115
  &-title {
@@ -1133,5 +1299,54 @@
1133
1299
  transform: translate(-40rpx, -40rpx);
1134
1300
  margin-top: 0;
1135
1301
  }
1302
+ .deduct_dialog{
1303
+ position: fixed;
1304
+ top: 0;
1305
+ bottom: 0;
1306
+ left: 0;
1307
+ right: 0;
1308
+ z-index: 3000;
1309
+ .deduct_mask{
1310
+ position: absolute;
1311
+ top: 0;
1312
+ bottom: 0;
1313
+ left: 0;
1314
+ right: 0;
1315
+ background: rgba(0, 0, 0, 0.3);
1316
+ }
1317
+ .deduct_content{
1318
+ width: 590rpx;
1319
+ background-color: #FFFFFF;
1320
+ box-sizing: border-box;
1321
+ position: absolute;
1322
+ top: 50%;
1323
+ left: 50%;
1324
+ transform: translate(-50%, -50%);
1325
+ display: flex;
1326
+ flex-direction: column;
1327
+ border-radius: 16rpx;
1328
+ overflow: hidden;
1329
+ .deduct_foot{
1330
+ border-top: 1px solid #F5F9FA;
1331
+ display: flex;
1332
+ align-items: center;
1333
+ justify-content: center;
1334
+ background-color: #FFFFFF;
1335
+ padding: 24rpx 0;
1336
+ border-radius: 0 0 16rpx 16rpx;
1337
+ .deduct_btn{
1338
+ width: 300rpx;
1339
+ height: 72rpx;
1340
+ font-size: 28rpx;
1341
+ color: #FFFFFF;
1342
+ background-color: #333333;
1343
+ border-radius: 50rpx;
1344
+ display: flex;
1345
+ align-items: center;
1346
+ justify-content: center;
1347
+ }
1348
+ }
1349
+ }
1350
+ }
1136
1351
  }
1137
1352
  </style>