jufubao-base 1.0.76 → 1.0.77-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.
Files changed (25) hide show
  1. package/package.json +1 -1
  2. package/src/components/JfbBaseAfterOrderList/JfbBaseAfterOrderList.vue +101 -44
  3. package/src/components/JfbBaseCard/JfbBaseCard.vue +75 -65
  4. package/src/components/JfbBaseCardDisabled/JfbBaseCardDisabled.vue +93 -43
  5. package/src/components/JfbBaseCardEntry/JfbBaseCardEntry.vue +161 -92
  6. package/src/components/JfbBaseCardV2/JfbBaseCardV2.vue +101 -45
  7. package/src/components/JfbBaseCardV3/JfbBaseCardV3.vue +24 -14
  8. package/src/components/JfbBaseEntry/JfbBaseEntry.vue +19 -1
  9. package/src/components/JfbBaseFastLink/JfbBaseFastLink.vue +1 -1
  10. package/src/components/JfbBaseLogin/Api.js +9 -0
  11. package/src/components/JfbBaseLogin/Attr.js +29 -6
  12. package/src/components/JfbBaseLogin/JfbBaseLogin.vue +113 -15
  13. package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +3 -0
  14. package/src/components/JfbBaseOrderList/JfbBaseOrderList.vue +194 -114
  15. package/src/components/JfbBasePoster/Attr.js +21 -1
  16. package/src/components/JfbBasePoster/JfbBasePoster.vue +7 -2
  17. package/src/components/JfbBasePosterBigSmall/Api.js +60 -0
  18. package/src/components/JfbBasePosterBigSmall/Attr.js +106 -0
  19. package/src/components/JfbBasePosterBigSmall/JfbBasePosterBigSmall.vue +110 -0
  20. package/src/components/JfbBasePosterBigSmall/JfbBasePosterBigSmallLess.less +80 -0
  21. package/src/components/JfbBasePosterBigSmall/JfbBasePosterBigSmallMixin.js +30 -0
  22. package/src/components/JfbBasePosterBigSmall/Mock.js +5 -0
  23. package/src/components/JfbBaseRechargeOrder/JfbBaseRechargeOrder.vue +95 -30
  24. package/src/components/JfbBaseSuccess/JfbBaseSuccess.vue +3 -0
  25. package/src/components/JfbBaseUserInfo/JfbBaseUserInfo.vue +58 -28
@@ -14,7 +14,17 @@
14
14
  </view>
15
15
  <!-- #endif -->
16
16
  <view class="jfb-base-entry__body" :style="bodyStyle">
17
- <view class="entry_list" :style="entryStyle">
17
+ <view v-if="loadingList" class="entry_list skeleton-wrap" :style="entryStyle">
18
+ <view v-for="i in 5" :key="i"
19
+ :class="'row_num_'+rowNum"
20
+ class="entry_item"
21
+ >
22
+ <image v-if="rowNum == 1" style="height: 260rpx;"/>
23
+ <image v-if="rowNum == 2" style="height: 200rpx;"/>
24
+ <image v-if="rowNum == 3" style="height: 150rpx;"/>
25
+ </view>
26
+ </view>
27
+ <view v-else class="entry_list" :style="entryStyle">
18
28
  <view v-for="(item,i) in entryList" :key="i"
19
29
  class="entry_item"
20
30
  :class="'row_num_'+rowNum"
@@ -52,6 +62,7 @@
52
62
  bgcolor: "",
53
63
  rowNum: 1,
54
64
  paddingInput: 20,
65
+ loadingList: true,
55
66
  }
56
67
  },
57
68
  computed: {
@@ -96,6 +107,7 @@
96
107
  vm: this,
97
108
  data: {}
98
109
  }).then(res => {
110
+ this.loadingList = false;
99
111
  this.$xdHideLoading();
100
112
  this.entryList = res.list.map(item => {
101
113
  const {dir, path, host} = item['redirect_data'];
@@ -160,9 +172,15 @@
160
172
  &__body{
161
173
  .entry_list{
162
174
  display: grid;
175
+ &.skeleton-wrap{
176
+ .entry_item{
177
+ .skeleton-item(100%, auto);
178
+ }
179
+ }
163
180
  .entry_item{
164
181
  width: 100%;
165
182
  box-sizing: border-box;
183
+
166
184
  image{
167
185
  width: 100%;
168
186
  display: block;
@@ -196,7 +196,7 @@
196
196
  if(dir) jumpUrl = `//${window.location.host}/${dir}${path}`;
197
197
  else jumpUrl = path;
198
198
  //#endif
199
- jumpUrl = `${jumpUrl}${bus}`;
199
+ jumpUrl = `${jumpUrl}${bus}}`;
200
200
  return { name: item.name, path: jumpUrl, icon: item.icon, size: item.size }
201
201
  }
202
202
  })
@@ -131,4 +131,13 @@ module.exports = [
131
131
  provider_id: ['登陆提供者id', 'String', '必选']
132
132
  }
133
133
  },
134
+ {
135
+ mapFnName: 'loginExperience',
136
+ title: '体验码登录',
137
+ path: '/passport-pb/v1/user/login-experience',
138
+ isRule: false,
139
+ params: {
140
+ experience_code: ['体验码code', 'String', '必选'],
141
+ }
142
+ },
134
143
  ];
@@ -4,6 +4,32 @@ export default {
4
4
  style: [],
5
5
  advanced: [],
6
6
  content: [
7
+ {
8
+ label: 'LOGO文字颜色:',
9
+ ele: 'xd-color',
10
+ valueKey: 'logoTextColor',
11
+ value: '',
12
+ placeholder: '请输入LOGO文字颜色',
13
+ classNmae: 'input80',
14
+ },
15
+ {
16
+ label: '是否使用体验码功能:',
17
+ ele: 'xd-radio',
18
+ valueKey: 'isPreview',
19
+ value: 'N',
20
+ placeholder: '请选择是否使用体验码功能',
21
+ multiple: false,
22
+ className: 'input80',
23
+ list: [
24
+ {label: '是', value: 'Y'},
25
+ {label: '否', value: 'N'},
26
+ ]
27
+ },
28
+ {
29
+ ele: 'title',
30
+ label: '页面连接设置',
31
+ size: 'small',
32
+ },
7
33
  {
8
34
  label: '快速授权失败访问地址:', //label
9
35
  ele: 'xd-select-pages-path', //package 名称
@@ -60,12 +86,9 @@ export default {
60
86
  inline: false,
61
87
  },
62
88
  {
63
- label: 'logo文字颜色:',
64
- ele: 'xd-color',
65
- valueKey: 'logoTextColor',
66
- value: '',
67
- placeholder: '请输入logo文字颜色',
68
- classNmae: 'input80',
89
+ ele: 'title',
90
+ label: '服务设置',
91
+ size: 'small',
69
92
  },
70
93
  {
71
94
  label: '隐私政策:',
@@ -170,6 +170,25 @@
170
170
  >忘记密码</view
171
171
  >
172
172
  </view>
173
+ <view class="bottom_btn" :style="prod_bottom" v-if="isPreview === 'Y'">
174
+ <view @click="dialogPreview = true" :style="{
175
+ color: mainColor,
176
+ border: `1px solid ${mainColor}`
177
+ }">进入体验 ></view>
178
+ </view>
179
+ <xd-dailog
180
+ v-if="dialogPreview"
181
+ title="体验码"
182
+ :show.sync="dialogPreview"
183
+ :cancel="false"
184
+ confirm-text="进入体验模式"
185
+ @onBtn="handlePreview"
186
+ @close="previewAccout=''"
187
+ >
188
+ <view class="preview-login">
189
+ <input v-model="previewAccout" type="text" class="preview-login-input" placeholder="请输入体验码">
190
+ </view>
191
+ </xd-dailog>
173
192
  </view>
174
193
  </view>
175
194
  </template>
@@ -187,6 +206,7 @@ import XdFormCheckbox from "@/components/XdFormCheckbox/XdFormCheckbox";
187
206
  import XdFormInput from "@/components/XdFormInput/XdFormInput";
188
207
  import XdForm from "@/components/XdForm/XdForm";
189
208
  import XdFormItem from "@/components/XdFormItem/XdFormItem";
209
+ import XdDailog from "@/components/XdDailog/XdDailog.vue";
190
210
  import { Base64 } from "js-base64";
191
211
  import { mapState } from "vuex";
192
212
  import getServiceUrl from "@/common/getServiceUrl";
@@ -208,15 +228,19 @@ export default {
208
228
  XdFormInput,
209
229
  XdForm,
210
230
  XdFormItem,
231
+ XdDailog
211
232
  },
212
233
  mixins: [componentsMixins, extsMixins, JfbBaseLoginMixin, privacyMixins],
213
234
  data() {
214
235
  return {
236
+ //体验模式
237
+ dialogPreview: false,
238
+ previewAccout: '',
239
+
215
240
  showStep: 1,
216
241
  panel_1_checked: "",
217
242
  panel_2_checked: "",
218
243
  password: "",
219
- //todo
220
244
  accountLoginType: "phone", //phone: 验证码登录 pwd: 密码登录
221
245
  accountForm: {
222
246
  phone_number: "", //15801505541
@@ -255,6 +279,7 @@ export default {
255
279
  logo: "",
256
280
  partnerName: "",
257
281
  logoTextColor: "",
282
+ isPreview:'N', //是否启用体验码模式
258
283
  };
259
284
  },
260
285
  computed: {
@@ -265,6 +290,9 @@ export default {
265
290
  panelTwoIsChecked() {
266
291
  return this.panel_2_checked.includes(1);
267
292
  },
293
+ prod_bottom() {
294
+ return this.fixedStyle({ height: 0, zIndex: 111 });
295
+ },
268
296
  },
269
297
  watch: {
270
298
  container(value) {
@@ -296,16 +324,46 @@ export default {
296
324
  url: `/pages/content/content?${params}`
297
325
  })
298
326
  },
299
-
300
-
327
+
328
+ loginPreview(experience_code){
329
+ return new Promise((resolve,reject)=>{
330
+ jfbRootExec("loginExperience", {
331
+ vm: this,
332
+ data: {experience_code},
333
+ }).then(res=>{
334
+ resolve(res)
335
+ }).catch(err=>{
336
+ reject(err)
337
+ })
338
+ })
339
+ },
340
+
341
+ async handlePreview(){
342
+ if(!this.previewAccout) {
343
+ this.$xdAlert({
344
+ content: '请输入体验码',
345
+ type:'error'
346
+ });
347
+ return;
348
+ }
349
+ this.$xdShowLoading({});
350
+ try{
351
+ const res = await this.loginPreview(this.previewAccout);
352
+ if(res) this.jfbAuthorize.setAllToken(res);
353
+ this.toHomeAfterLogin();
354
+ this.$xdHideLoading();
355
+ }catch (e){
356
+ this.$xdHideLoading();
357
+ }
358
+ },
359
+
360
+
301
361
  onJfbLoad(options) {
302
362
  this.redirect_url = options.redirect_url ? Base64.decode(options.redirect_url): '';
303
363
  // #ifdef MP-WEIXIN
304
364
  this.authWxMpListProviders();
305
365
  // #endif
306
-
307
366
  this.$xdLog.setProject('JfbBaseLogin', 'JfbBaseLogin.onJfbLoad.start')
308
-
309
367
  // #ifdef H5
310
368
  try{
311
369
  this.authH5ListProviders();
@@ -313,7 +371,6 @@ export default {
313
371
  this.$xdLog.setProject('JfbBaseLogin', 'JfbBaseLogin.onJfbLoad.error');
314
372
  this.$xdLog.setARMSError(error);
315
373
  }
316
-
317
374
  //#endif
318
375
 
319
376
  // if (options.isDebug === "1") {
@@ -354,7 +411,7 @@ export default {
354
411
  this.phone_number_collect_url = getContainerPropsValue(value, "content.phone_number_collect_url", {value: ''}).value;
355
412
  this.forget_pwd_url = getContainerPropsValue(value, "content.forget_pwd_url", {value: ''}).value;
356
413
  this.error_callback_url = getContainerPropsValue(value, "content.error_url", {value: ''}).value;
357
-
414
+ this.isPreview = getContainerPropsValue(value, "content.isPreview", 'N');
358
415
  },
359
416
 
360
417
  /**
@@ -464,22 +521,22 @@ export default {
464
521
  "62fde99f2583a19c58fd937b",
465
522
  "62fde9432583a19c58fd937a",
466
523
  ];
467
-
524
+
468
525
  let { redirect_url, callback_url } = this;
469
-
526
+
470
527
  //不同项目直接域名替换
471
528
  if (/^(@site_domain@).+$/.test(redirect_url)) {
472
529
  redirect_url = redirect_url.replace(/@site_domain@/, location.origin)
473
530
  }
474
-
531
+
475
532
  try {
476
533
  let redirectURL = new URL(redirect_url);
477
534
  redirect_url = redirectURL.href;
478
535
  } catch (e) {
479
536
  redirect_url = location.origin + this.base + redirect_url;
480
537
  }
481
-
482
-
538
+
539
+
483
540
  let params = {
484
541
  providers: providers.join(","),
485
542
  callback_url: redirect_url,
@@ -487,9 +544,9 @@ export default {
487
544
  phone_number_collect_url: location.origin + this.base + this.phone_number_collect_url,
488
545
  error_callback_url: location.origin + this.base + this.error_callback_url,
489
546
  };
490
-
547
+
491
548
  this.$xdLog.setProject('JfbBaseLogin', 'JfbBaseLogin.onJfbLoad.loading..');
492
-
549
+
493
550
  jfbRootExec("listSiteProvider", {
494
551
  vm: this,
495
552
  data: params,
@@ -701,7 +758,7 @@ export default {
701
758
  margin-left: unit(20,rpx) !important;
702
759
  }
703
760
  }
704
-
761
+
705
762
  .form-group {
706
763
  padding: 40rpx 70rpx;
707
764
  }
@@ -851,4 +908,45 @@ export default {
851
908
  .login-pub {
852
909
  margin-top: unit(40, rpx);
853
910
  }
911
+ .bottom_btn {
912
+ position: fixed;
913
+ width: 100%;
914
+ display:flex;
915
+ justify-content: center;
916
+ align-items: center;
917
+ height: unit(100, rpx);
918
+ background: #ffffff;
919
+
920
+ & > view {
921
+ height: unit(44, rpx);
922
+ line-height: unit(44, rpx);
923
+ width: unit(150, rpx);
924
+ text-align: center;
925
+ cursor: pointer;
926
+ font-size: unit(24, rpx);
927
+ border-radius: unit(12, rpx);
928
+ }
929
+ }
930
+
931
+ .preview-login {
932
+ padding: unit(40, rpx) 0;
933
+
934
+ &-input {
935
+ height: unit(70, rpx);
936
+ border-radius: unit(12, rpx);
937
+ padding: 0 unit(20, rpx);
938
+ text-align: left;
939
+ border: 1px solid #eee;
940
+ background: #F7F7F7;
941
+ color: #666;
942
+ transition: box-shadow 0.5s;
943
+ box-shadow: 0 0 0 rgba(0,0,0,0);
944
+
945
+ &:hover {
946
+ box-shadow: 0 0 unit(10, rpx) rgba(0,0,0,.1);
947
+ }
948
+ }
949
+ }
950
+
951
+
854
952
  </style>
@@ -294,6 +294,9 @@
294
294
  <view class="jfb-base-order-detail__body-cashier-text">
295
295
  {{ info.codes[0].can_read_code }}
296
296
  </view>
297
+ <view v-if="info.codes[0].refund_tip_text" style="color:red;font-size:24rpx;text-align:center;margin-top:10rpx">
298
+ {{info.codes[0].refund_tip_text}}
299
+ </view>
297
300
  <view
298
301
  v-if="info.codes[0].code_end_time"
299
302
  class="jfb-base-order-detail__body-cashier-code"