jufubao-base 1.0.77-beta1 → 1.0.77-beta11

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.77-beta1",
3
+ "version": "1.0.77-beta11",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -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"
@@ -19,13 +19,16 @@
19
19
  <view
20
20
  class="jfb-base-order-list__body"
21
21
  >
22
- <xd-tab
23
- v-if="initStatus"
24
- :tabIndex="tabIndex"
25
- :list="tabList"
26
- show-footer-line
27
- @onTab="handleChange"
28
- ></xd-tab>
22
+ <view class="fixed_top" :style="{top: (layoutInfo.top-2)+'rpx'}">
23
+ <xd-tab
24
+ v-if="initStatus"
25
+ :tabIndex="tabIndex"
26
+ :list="tabList"
27
+ show-footer-line
28
+ @onTab="handleChange"
29
+ ></xd-tab>
30
+ </view>
31
+ <view style="height: 100rpx;"></view>
29
32
  <view v-if="loadingList" class="jfb-base-order-list__body-order skeleton-wrap">
30
33
  <view class="jfb-base-order-list__body-order-item"
31
34
  v-for="i in 5" :key="i"
@@ -516,6 +519,14 @@ export default {
516
519
 
517
520
  .jfb-base-order-list {
518
521
  &__body {
522
+ .fixed_top{
523
+ position: fixed;
524
+ top: 0;
525
+ left: 0;
526
+ width: 100%;
527
+ background: #FFFFFF;
528
+ z-index: 999;
529
+ }
519
530
  &-no {
520
531
  display: flex;
521
532
  justify-content: center;
@@ -8,6 +8,7 @@ import console from "@dcloudio/uni-h5/src/core/helpers/console";
8
8
  export default {
9
9
  style:[],
10
10
  content:(params)=>{
11
+ console.log(params,'anananananana');
11
12
  if(!params['isCarousel']) params['isCarousel'] = 1;
12
13
  return [
13
14
  {
@@ -220,7 +221,26 @@ export default {
220
221
  {required: true, message: '请选择广告位置', trigger: 'change'},
221
222
  ],
222
223
  },
223
- params.poster && params.poster['type'] !== '1' && {
224
+ params.poster && params.poster['type']&& params.poster['type'] !== '1' && {
225
+ label: '广告背景图:',
226
+ ele: 'xd-upload',
227
+ valueKey: 'background',
228
+ value: params.background || {},
229
+ defaultValue: params.background || null,
230
+ slot: true,
231
+ oneWidth: 100,
232
+ oneHeight: 100,
233
+ elinputClassName: 'input40',
234
+ tipsformet: '上传文件格式:@imageType@,不超过@size@MB.',
235
+ type: ['jpg', 'png', 'jpeg'],
236
+ styleType: 'one',
237
+ uploadType: 'aliyun',
238
+ size: 5,
239
+ action: 'action',
240
+ sort: true,
241
+ maxlen: 100,
242
+ },
243
+ params.poster && params.poster['type']&& params.poster['type'] !== '1' && {
224
244
  label: '广告位内容间距设置:',
225
245
  ele: 'el-input',
226
246
  type: 'number',
@@ -17,7 +17,10 @@
17
17
  class="jfb-base-poster__body"
18
18
  v-if="noData"
19
19
  :style="{
20
- margin: margin
20
+ margin: margin,
21
+ background: `url(${background})`,
22
+ backgroundSize: '100% 100%',
23
+ backgroundRepeat: 'no-repeat',
21
24
  }
22
25
  ">
23
26
  <!--一分屏-->
@@ -73,7 +76,6 @@
73
76
  </template>
74
77
  </xd-swiper>
75
78
  </xd-swiper-dot>
76
-
77
79
  <view v-if="isPreview" class="carousel-mask"></view>
78
80
  </view>
79
81
  </template>
@@ -84,9 +86,11 @@
84
86
  :content="info"
85
87
  ></more-screen>
86
88
  </view>
89
+ <!--解决图片缓冲预加载问题-->
87
90
  <view v-for="(item,index) in info" :key="index" style="position: absolute; top: -19999px; left: -100000px">
88
- <image :src="item.image_background_url" ></image>
89
- </view>
91
+ <image :src="item.image_background_url" ></image>
92
+ </view>
93
+ <!--解决图片缓冲预加载问题-->
90
94
  </view>
91
95
  </template>
92
96
 
@@ -116,7 +120,8 @@
116
120
  mixins: [componentsMixins,extsMixins,JfbBasePosterMixin],
117
121
  data() {
118
122
  return {
119
- selfMask: true,
123
+ selfMask: false,
124
+ pageShow:false,
120
125
  params: {},
121
126
 
122
127
  //Swiper 配置
@@ -146,6 +151,7 @@
146
151
  },
147
152
  isPreview: false,
148
153
  noData:false,
154
+ background: '',
149
155
 
150
156
  test: {
151
157
  "content_id": "KpBbUKdj4aBejwe7Fh1ki",
@@ -315,10 +321,15 @@
315
321
  return temp
316
322
  },
317
323
  handleAnimationfinish(e) {
324
+ //当前组件已被隐藏或者轮播图记录为0条处理
325
+ if(this.$root.$isShow === false || this.info.length === 0 ) {
326
+ this.$xdRoot.$emit("setLayoutPageBg", null);
327
+ return
328
+ }
318
329
  this.currentImage = this.info[e.detail.current]['image_background_url']
319
- if(this.isSupport==='Y' && this.rows===1 && this.isCarousel===2 && this.$root.$isShow === true) {
330
+ if(this.isSupport==='Y' && this.rows===1 && this.isCarousel===2) {
320
331
  let bg = null;
321
- if(this.info[e.detail.current]['image_background_url']) bg = this.info[e.detail.current]['image_background_url'];
332
+ if(this.info[e.detail.current] && this.info[e.detail.current]['image_background_url']) bg = this.info[e.detail.current]['image_background_url'];
322
333
  this.$xdRoot.$emit("setLayoutPageBg", bg);
323
334
  }
324
335
  this.current = e.detail.current;
@@ -383,6 +394,9 @@
383
394
  },
384
395
  handleOne(list){
385
396
  this.info = this.handleImage(list);
397
+
398
+ //轮播图记录为0条处理
399
+ if( this.info.length === 0) return
386
400
  let current = this.current || 0;
387
401
  this.currentImage = this.info[current]['image_background_url']
388
402
  if(this.isSupport==='Y' && this.rows===1 && this.isCarousel===2) {
@@ -412,6 +426,7 @@
412
426
  this.rows = getContainerPropsValue(container, 'content.rows', 1);
413
427
  this.isSupport = getContainerPropsValue(container, 'content.isSupport', 'Y');
414
428
  this.mS = getContainerPropsValue(container, 'content.margin', this.getDefualtValue('margin'));
429
+ this.background = getContainerPropsValue(container, "content.background", {path: "",}).path;
415
430
 
416
431
  //content
417
432
 
@@ -0,0 +1,60 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * @description API模型
5
+ * 建议:Ffff=>模块 Xxxx=>自定义名字
6
+ * 获取单记录(getByIdFfffXxxx)
7
+ * 获取列表记录(getByListFfffXxxx)
8
+ * 添加列表记录(addFfffXxxxx)
9
+ * 删除列表记录(removeFfffXxxxx|deleteFfffXxxx)
10
+ * 更新列表记录(updateFfffXxxxx)
11
+ * @type {*[]}
12
+ */
13
+ module.exports = [
14
+ {
15
+ mapFnName: 'getByIdFilmSquate', //自定义方法名字(必选)
16
+ title: '获取电影广场列表',
17
+ path: '/api/account/film/list-film-square',
18
+ isRule: false,
19
+ params: {
20
+ last_key: ['当前页', 'Number', '必选'],
21
+ page_size: ['每页数量', 'Number', '必选'],
22
+ },
23
+ isConsole: true,
24
+ disabled: true,
25
+ },
26
+ {
27
+ mapFnName: 'updateFilmPaiqiDate', //自定义方法名字(必选)
28
+ title: '更新排期',
29
+ path: '/api/account/film/paiqi-date',
30
+ isRule: false,
31
+ params: {
32
+ film_id: ['电影id', 'Number', '必选'],
33
+ cinema_id: ['影院id', 'Number', '必选'],
34
+ },
35
+ isConsole: true,
36
+ disabled: true,
37
+ },
38
+ {
39
+ mapFnName: 'removeFilmAddress', //自定义方法名字(必选)
40
+ title: '删除我的配送地址',
41
+ path: '/api/account/film/paiqi-date',
42
+ isRule: false,
43
+ params: {
44
+ film_id: ['电影id', 'Number', '必选'],
45
+ },
46
+ isConsole: true,
47
+ disabled: true,
48
+ },
49
+ {
50
+ mapFnName: 'addFilmcart', //自定义方法名字(必选)
51
+ title: '添加购物车',
52
+ path: '/api/account/film/paiqi-date',
53
+ isRule: false,
54
+ params: {
55
+ film_id: ['电影id', 'Number', '必选'],
56
+ },
57
+ isConsole: true,
58
+ disabled: true,
59
+ },
60
+ ];
@@ -0,0 +1,106 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * @description 当表单组件中有联动操作时候,使用方法进行返回
5
+ */
6
+ export default {
7
+ style: [],
8
+ content: (data) => {
9
+ return [
10
+ {
11
+ label: '背景颜色:', //label
12
+ ele: 'xd-color', //package 名称
13
+ valueKey: 'bgcolor', //form[valueKey]
14
+ value: data.bgcolor || '', //v-model
15
+ placeholder: '请输入占位框背景颜色',
16
+ classNmae: 'input80', //样式名称 //input100,input80,input70,input60,input50,input40,input30,input20,
17
+ rules: [
18
+ {
19
+ required: true,
20
+ message: '请输入占位框背景颜色',
21
+ trigger: 'blur'
22
+ },
23
+ ]
24
+ },
25
+ {
26
+ label: '选中路径:', //label
27
+ ele: 'xd-select-pages-path', //package 名称
28
+ valueKey: 'select-pages-path', //form[valueKey]
29
+ value: data['select-pages-path'] || {},
30
+ setting: {
31
+ router: XdBus.getParentApi('getPagesTree')
32
+ },
33
+ inline: false,
34
+ },
35
+ data.bgcolor && {
36
+ label: '高度:', //label
37
+ ele: 'el-input', //package 名称
38
+ type: 'number',
39
+ valueKey: 'height', //form[valueKey]
40
+ value: data.height || 100, //v-model
41
+ placeholder: '请输入占位框高度,单位像素,默认:10px',
42
+ className: 'input80', //样式名称 //input100,input80,input70,input60,input50,input40,input30,input20,
43
+ rules: [
44
+ {
45
+ required: true,
46
+ message: '请输入占位框高度',
47
+ trigger: 'blur'
48
+ },
49
+ ]
50
+ },
51
+ {
52
+ label: '', //label
53
+ ele: 'slot', //package 名称
54
+ slot: 'is_reference',
55
+ },
56
+ ].filter(i=>i)
57
+ },
58
+ advanced: [
59
+ {
60
+ label: '背景颜色:', //label
61
+ ele: 'xd-color', //package 名称
62
+ valueKey: 'bgcolor', //form[valueKey]
63
+ value: '', //v-model
64
+ placeholder: '请输入占位框背景颜色',
65
+ classNmae: 'input80', //样式名称 //input100,input80,input70,input60,input50,input40,input30,input20,
66
+ rules: [
67
+ {
68
+ required: true,
69
+ message: '请输入占位框背景颜色',
70
+ trigger: 'blur'
71
+ },
72
+ ]
73
+ },
74
+ {
75
+ label: '选中路径:', //label
76
+ ele: 'xd-select-pages-path', //package 名称
77
+ valueKey: 'select-pages-path', //form[valueKey]
78
+ value: null,
79
+ setting: {
80
+ router: XdBus.getParentApi('getPagesTree')
81
+ },
82
+ inline: false,
83
+ },
84
+ {
85
+ label: '高度:', //label
86
+ ele: 'el-input', //package 名称
87
+ type: 'number',
88
+ valueKey: 'height', //form[valueKey]
89
+ value: null, //v-model
90
+ placeholder: '请输入占位框高度,单位像素,默认:10px',
91
+ classNmae: 'input80', //样式名称 //input100,input80,input70,input60,input50,input40,input30,input20,
92
+ rules: [
93
+ {
94
+ required: true,
95
+ message: '请输入占位框高度',
96
+ trigger: 'blur'
97
+ },
98
+ ]
99
+ },
100
+ {
101
+ label: '', //label
102
+ ele: 'slot', //package 名称
103
+ slot: 'is_reference',
104
+ },
105
+ ],
106
+ };
@@ -0,0 +1,110 @@
1
+ <template>
2
+ <view
3
+ class="jfb-base-poster-big-small"
4
+ @click="handleEditxSelect"
5
+ :class="{ editx : isEditx && active }"
6
+ >
7
+ <!--#ifdef H5-->
8
+ <view
9
+ class="jfb-base-poster-big-small__edit"
10
+ :class="{ editx : isEditx && active }"
11
+ v-if="isEditx && active"
12
+ >
13
+ <view class="jfb-base-poster-big-small__edit-icon" @click="delEdit">删除</view>
14
+ </view>
15
+ <!-- #endif -->
16
+ <view class="jfb-base-poster-big-small__body">
17
+ <view>测试插件( {{containerId}} )</view>
18
+ </view>
19
+ </view>
20
+ </template>
21
+
22
+ <script>
23
+ import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
24
+ import { jfbRootExec } from "@/utils/xd.event";
25
+ import JfbBasePosterBigSmallMixin from "./JfbBasePosterBigSmallMixin";
26
+ import { getContainerPropsValue } from "@/utils/xd.base";
27
+ import componentsMixins from "@/mixins/componentsMixins";
28
+ import extsMixins from "@/mixins/extsMixins";
29
+ export default {
30
+ name: "JfbBasePosterBigSmall",
31
+ components: {
32
+ XdFontIcon
33
+ },
34
+ mixins: [
35
+ componentsMixins, extsMixins, JfbBasePosterBigSmallMixin
36
+ ],
37
+ data() {
38
+ return {
39
+
40
+ //todo
41
+ }
42
+ },
43
+ watch: {
44
+ container(value) {
45
+ this.init(value)
46
+ }
47
+ },
48
+ created() {
49
+ this.init(this.container);
50
+
51
+ //todo
52
+ },
53
+ methods: {
54
+ onJfbLoad(options) {
55
+
56
+ // jfbRootExec('baiduUserLogin', {
57
+
58
+ // vm: this,// data: {
59
+
60
+ // account: 'gaoshiyong',// password: '123456789',// type: 3,// ...options
61
+
62
+ // }
63
+
64
+ // }).then().catch()
65
+ },
66
+ /**
67
+ * @description 监听事件变化
68
+ * @param container {object} 业务组件对象自己
69
+ */
70
+ init(container) {
71
+
72
+ //this.bgcolor = getContainerPropsValue(container, 'content.bgcolor', '#fff');
73
+
74
+ //this.height = getContainerPropsValue(container, 'content.height', 10);
75
+ },
76
+ onJfbScroll(options) {
77
+ console.log('event.onJfbScroll', options)
78
+ },
79
+ onJfbReachBottom(options) {
80
+ console.log('event.onJfbReachBottom', options)
81
+ },
82
+ onJfbShow(options) {
83
+ console.log('event.onJfbShow', options)
84
+ },
85
+ onJfbHide(options) {
86
+ console.log('event.onJfbHide', options)
87
+ },
88
+ onJfbBack(options) {
89
+ console.log('event.onJfbBack', options)
90
+ },
91
+ onJfbUpdate(...data) {
92
+ console.log('event.onJfbUpdate', data)
93
+ },
94
+ onJfbCustomEvent(options) {
95
+ console.log('event.onJfbReachBottom', options)
96
+ },
97
+ }
98
+ }
99
+
100
+ </script>
101
+
102
+ <style scoped lang="less">
103
+ @import "./JfbBasePosterBigSmallLess.less";
104
+
105
+ .jfb-base-poster-big-small {
106
+ &__body{
107
+
108
+ }
109
+ }
110
+ </style>
@@ -0,0 +1,80 @@
1
+ /**
2
+ * @desc 获取绝对路径完整地址
3
+ * @param @path
4
+ **/
5
+ //例如:https://image.jufubao.cn/20220501010108/image/bg/default_gonghui_bg.png
6
+ @basePath: 'business/';
7
+ @doMain: '//sandbox-img.jufubao.cn/';
8
+
9
+ .getBusinessImageUrl(@path, @size: 'size8') {
10
+ @url: "@{doMain}@{basePath}@{path}?x-oss-process=style/@{size}";
11
+ background-image: url(@url);
12
+ }
13
+
14
+ //start
15
+ .jfb-base-poster-big-small {
16
+ border: 1px dashed rgba(0, 0, 0, 0);
17
+ box-sizing: border-box;
18
+ min-height: unit(50, rpx);
19
+
20
+ &__body{
21
+ position: relative;
22
+ overflow: hidden;
23
+ z-index: 2
24
+ }
25
+
26
+ &.editx {
27
+ position: relative;
28
+ border: 1px dashed blue;
29
+ box-sizing: border-box;
30
+ z-index: 3
31
+
32
+ }
33
+
34
+ &:hover {
35
+ border: 1px dashed blue;
36
+ }
37
+
38
+ &.noBorder {
39
+ border-color: rgba(0,0,0,0);
40
+ border-width: 0;
41
+ }
42
+
43
+
44
+ &__edit {
45
+ cursor: pointer;
46
+ position: absolute;
47
+ right: unit(0, rpx);
48
+ top: unit(-52, rpx);
49
+ height: unit(50, rpx);
50
+ line-height: unit(50, rpx);
51
+ display: flex;
52
+ justify-content: center;
53
+ align-items: center;
54
+ background: rgba(0, 0, 0, .6);
55
+ border-radius: unit(10, rpx);
56
+ box-shadow: 0 0 10px rbga(0, 0, 0, 0.3);
57
+ color: #fff;
58
+ font-size: unit(22, rpx);
59
+
60
+ &-icon{
61
+ padding: 0 unit(20, rpx);
62
+ }
63
+
64
+ &.editx {
65
+ box-sizing: border-box;
66
+
67
+ }
68
+ }
69
+ }
70
+ //end
71
+
72
+
73
+ /**notPreview**/
74
+ .jfb-base-poster-big-small {
75
+ &:before {
76
+ content: " ";
77
+ display: table;
78
+ }
79
+ }
80
+ /**endNotPreview**/
@@ -0,0 +1,30 @@
1
+ 'use strict';
2
+
3
+
4
+ //@AttrImport
5
+ import Attr from "./Attr";
6
+ //@EndAttrImport
7
+
8
+
9
+ export default {
10
+ data() {
11
+ return {
12
+ //#ifdef H5
13
+
14
+ //@AttrData
15
+ Attr:{}, //对外开发编辑属性
16
+ //@EndAttrData
17
+
18
+ // #endif
19
+ cssRoot: 'jfb-base-poster-big-small'
20
+ }
21
+ },
22
+ created() {
23
+
24
+ //@AttrDataCreated
25
+ this.Attr = this.$xdUniHelper.customClone(Attr);
26
+ //@EndAttrDataCreated
27
+
28
+
29
+ },
30
+ }
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ module.exports = {
4
+ aaaa: {}
5
+ }
@@ -98,6 +98,9 @@
98
98
  <view class="jfb-base-success__body-cashier-text">
99
99
  {{ info.codes[0].can_read_code }}
100
100
  </view>
101
+ <view v-if="info.codes[0].refund_tip_text" style="color:red;font-size:24rpx;text-align:center;margin-top:10rpx">
102
+ {{info.codes[0].refund_tip_text}}
103
+ </view>
101
104
  <view
102
105
  v-if="info.codes[0].code_end_time"
103
106
  class="jfb-base-success__body-cashier-code"
@@ -37,25 +37,28 @@
37
37
  <xd-font-icon :color="color" icon="iconwode_mian" size="100"></xd-font-icon>
38
38
  </view>
39
39
  </template>
40
- <view class="no-image" :style="{borderColor: color}" v-else>
40
+ <view v-else class="no-image" :style="{borderColor: color}">
41
41
  <xd-font-icon :color="color" icon="iconwode_mian" size="90"></xd-font-icon>
42
42
  </view>
43
+
43
44
  <view v-if="logined && textType ==='N'" :style="{color:color}">{{userInfo|getName}}</view>
44
45
  <view class="vertical-user" v-if="logined && textType ==='Y'" :style="{color:color}">
45
46
  <view>{{userInfo|getName}}</view>
46
- <view @click="handleToLink()" v-if="0">
47
+ <view @click="handleToLink()">
47
48
  <xd-font-icon :color="color" size="40" icon="iconshezhi_mian"></xd-font-icon>
48
49
  </view>
49
50
  </view>
50
51
  </view>
51
- <view @click="handleToLink()" v-if="logined && textType ==='N' && 0 ">
52
- <xd-font-icon :color="color" size="40" icon="iconshezhi_mian"></xd-font-icon>
52
+
53
+ <view @click="handleLogout()" v-if="logined" class="logout">
54
+ <view v-if="textType ==='N'">[退出登录]</view>
53
55
  </view>
54
56
  </view>
55
57
  </view>
56
58
  </view>
57
59
  </template>
58
60
 
61
+
59
62
  <script>
60
63
  import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
61
64
  import { jfbRootExec } from "@/utils/xd.event";
@@ -64,6 +67,7 @@
64
67
  import extsMixins from "@/mixins/extsMixins"
65
68
  import { getContainerPropsValue } from "@/utils/xd.base";
66
69
  import {mapState} from 'vuex';
70
+ import store from "@/store";
67
71
  export default {
68
72
  name: "JfbBaseUserInfo",
69
73
  components: {
@@ -72,7 +76,7 @@
72
76
  mixins: [componentsMixins,extsMixins,JfbBaseUserInfoMixin],
73
77
  computed: {
74
78
  ...mapState(['jfbAuthorize']),
75
-
79
+
76
80
  outMargin() {
77
81
  let margin = `${this.margin.top !== null ? this.margin.top : 20}rpx`;
78
82
  margin = `${margin} ${this.margin.right !== null ? this.margin.right : 20}rpx`;
@@ -106,24 +110,24 @@
106
110
  logined: false,
107
111
  userInfo: null,
108
112
  address_url: '',
109
-
113
+
110
114
  //基础
111
115
  color: '#333',
112
116
  backgroundColor: 'rgba(0,0,0,0)',
113
117
  textType: 'N', //默认水平
114
118
  radius: 0,
115
-
119
+
116
120
  //投影
117
121
  is_shadow: 'Y',
118
122
  is_shadow_bg: 0,
119
123
  is_shadow_w: 0,
120
-
121
-
124
+
125
+
122
126
  //边框
123
127
  is_border: 'Y',
124
128
  is_border_w: 0,
125
129
  is_border_c: '',
126
-
130
+
127
131
  //其他
128
132
  margin: {
129
133
  top: 0,
@@ -137,7 +141,7 @@
137
141
  right: 0,
138
142
  bottom: 0
139
143
  },
140
-
144
+
141
145
  }
142
146
  },
143
147
  watch: {
@@ -154,8 +158,27 @@
154
158
  url: '/pages/settings/settings'
155
159
  })
156
160
  },
161
+
162
+ async handleLogout(){
163
+ debugger
164
+ // #ifdef H5
165
+ if (this.$configProject.isPreview) return;
166
+ // #endif
167
+
168
+ if (this.jfbAuthorize !== null) {
169
+ this.$xdShowLoading({});
170
+ store.dispatch('logout').then(res=>{
171
+ this.$xdHideLoading();
172
+ this.jfbAuthorize.removeToken('card');
173
+ this.jfbAuthorize.jumpToUserLogin(this, false);
174
+ }).catch(err=>{
175
+ console.error(err);
176
+ })
177
+ }
178
+ },
179
+
157
180
  async onJfbLoad(options) {
158
-
181
+
159
182
  //预览模式
160
183
  if(this.$configProject.isPreview) {
161
184
  jfbRootExec('getBaseUserInfo', {
@@ -170,10 +193,10 @@
170
193
  });
171
194
  return;
172
195
  }
173
-
196
+
174
197
  this.logined = await this.jfbAuthorize.checkUserLogin(true, this, false);
175
198
  if(!this.logined) return;
176
-
199
+
177
200
  jfbRootExec('getBaseUserInfo', {
178
201
  vm: this,
179
202
  data: {}
@@ -195,15 +218,15 @@
195
218
  this.color = getContainerPropsValue(container, 'content.textColor', '#333');
196
219
  this.backgroundColor = getContainerPropsValue(container, 'content.backgroundColor', 'rgba(0,0,0,0)');
197
220
  this.textType = getContainerPropsValue(container, 'content.text_type', 'N');
198
-
221
+
199
222
  this.is_shadow = getContainerPropsValue(container, 'content.is_shadow', 'N');
200
223
  this.is_shadow_bg = getContainerPropsValue(container, 'content.is_shadow_bg', '#fff');
201
224
  this.is_shadow_w = getContainerPropsValue(container, 'content.is_shadow_w', '10');
202
-
225
+
203
226
  this.is_border = getContainerPropsValue(container, 'content.is_border', 'N');
204
227
  this.is_border_c = getContainerPropsValue(container, 'content.is_border_c', '#fff');
205
228
  this.is_border_w = getContainerPropsValue(container, 'content.is_border_w', '10');
206
-
229
+
207
230
  this.radius = getContainerPropsValue(container, 'content.radius', '0');
208
231
  },
209
232
  }
@@ -213,7 +236,7 @@
213
236
 
214
237
  <style scoped lang="less">
215
238
  @import "./JfbBaseUserInfoLess.less";
216
-
239
+
217
240
  .vertical-user {
218
241
  display: flex;
219
242
  justify-content: center;
@@ -229,29 +252,29 @@
229
252
  display: flex;
230
253
  align-items: center;
231
254
  justify-content: flex-start;
232
-
233
-
255
+
256
+
234
257
  &-left {
235
258
  display: flex;
236
259
  align-items: center;
237
260
  flex: 1;
238
-
261
+
239
262
  &.vertical {
240
263
  width: 100%;
241
264
  flex-direction: column;
242
-
265
+
243
266
  & > view:last-child {
244
267
  width: 100%;
245
268
  text-align: center;
246
269
  flex-shrink: 0;
247
270
  padding-top: unit(20, rpx);
248
271
  }
249
-
272
+
250
273
  & > image, .no-image {
251
274
  margin-right: unit(0, rpx);
252
275
  }
253
276
  }
254
-
277
+
255
278
  & > image, .no-image {
256
279
  width: unit(140, rpx);
257
280
  height: unit(140, rpx);
@@ -263,21 +286,28 @@
263
286
  flex-shrink: 0;
264
287
  overflow: hidden;
265
288
  }
266
-
289
+
267
290
  .no-image {
268
291
  border: unit(4, rpx) solid #e5e5e5;
269
292
  }
270
-
293
+
271
294
  & > view {
272
295
  color: #383838;
273
296
  font-size: unit(32, rpx);
274
297
  }
275
298
  }
276
-
299
+
277
300
  & > view:nth-child(2) {
278
301
  flex-shrink: 0;
279
302
  }
280
303
  }
281
304
  }
305
+
306
+ .logout {
307
+ font-size: unit(26, rpx);
308
+ & > view {
309
+ color: #333;
310
+ }
311
+ }
282
312
  }
283
313
  </style>