jufubao-base 1.0.169-beta20 → 1.0.169-beta22

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.169-beta20",
3
+ "version": "1.0.169-beta22",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -775,6 +775,16 @@ export default {
775
775
  className: "input70",
776
776
  hidden: data.previewCurrent !== "account",
777
777
  },
778
+ {
779
+ label: '密码图标:',
780
+ ele: "el-input",
781
+ valueKey: "passwordIcon",
782
+ value: data.passwordIcon || "",
783
+ groupKey:'style',
784
+ placeholder: "请输入密码图标",
785
+ className: "input70",
786
+ hidden: data.previewCurrent !== "account",
787
+ },
778
788
  {
779
789
  label: "标签字体样式设置:",
780
790
  ele: "xd-font",
@@ -175,6 +175,7 @@
175
175
  class="form-item"
176
176
  :class="[inputStyle]"
177
177
  label="密码"
178
+ :leftIcon="passwordIcon"
178
179
  :labelWidth="labelWidth"
179
180
  content-align="left"
180
181
  >
@@ -398,6 +399,7 @@ export default {
398
399
  },
399
400
  phoneIcon: "", //手机号登录输入框图标
400
401
  codeIcon: "", //验证码登录输入框图标
402
+ passwordIcon: "", //密码登录输入框图标
401
403
  inputStyle: "linear", //输入框样式 linear:线性 face: 面性
402
404
  formBorderColor: "#F9F9F9", //
403
405
  formBorderWidth: 1, //表单边框宽度
@@ -658,6 +660,7 @@ export default {
658
660
  this.authBtnPadding = getContainerPropsValue(value, "content.authBtnPadding", {top: 20, left: 20, right: 20, bottom: 20});
659
661
  this.phoneIcon = getContainerPropsValue(value, "content.phoneIcon", '');
660
662
  this.codeIcon = getContainerPropsValue(value, "content.codeIcon", '');
663
+ this.passwordIcon = getContainerPropsValue(value, "content.passwordIcon", '');
661
664
  this.inputStyle = getContainerPropsValue(value, "content.inputStyle", 'linear');
662
665
  this.formBorderColor = getContainerPropsValue(value, "content.formBorderColor", '#F9F9F9');
663
666
  this.formBorderWidth = getContainerPropsValue(value, "content.formBorderWidth", '1');
@@ -198,7 +198,6 @@
198
198
  valid_token: "",
199
199
  formRenderKey: "formRenderKey",
200
200
  hasCon: "", //是否有优惠券
201
- jwxSDK: null,
202
201
 
203
202
  //todo
204
203
  tips: "",
@@ -269,7 +268,8 @@
269
268
  },
270
269
  computed: {
271
270
  ...mapState({
272
- brandInfo: state => state.brandInfo
271
+ brandInfo: state => state.brandInfo,
272
+ jwxSDK: (state) => state.jwxSDK,
273
273
  }),
274
274
  cardFormStyle(){
275
275
  let padding = `${this.checkValue(this.formPadding.top, 20)}rpx`;
@@ -377,15 +377,21 @@
377
377
  this.validImageAPIUrl = this.brandInfo['api_host'] + '/common/v1/valid_code/image/show'
378
378
  this.valid_token = this.$xdUniHelper.randomChar(20);
379
379
  //todo
380
- // #ifdef H5
381
- jfbRootExec("getH5WxAuthorize", {
382
- vm: this,
383
- data: {
384
- jsApiList: ["chooseWXPay"],
385
- }
386
- }).then(res => {
387
- this.jwxSDK = res.jwxSDK;
388
- })
380
+ //#ifdef H5
381
+ if (!this.$configProject.isPreview) {
382
+ jfbRootExec("getH5WxAuthorize", {
383
+ vm: this,
384
+ data: {site_id: "wx_pub"},
385
+ })
386
+ .then(res => {
387
+ console.log(0)
388
+ })
389
+ .catch(error=>{
390
+ this.$xdAlert({
391
+ content: error,
392
+ });
393
+ })
394
+ }
389
395
  // #endif
390
396
  },
391
397
  methods: {
@@ -461,6 +467,7 @@
461
467
  },
462
468
  switchShowType(type){
463
469
  this.menuType = type;
470
+ this.formRenderKey = Date.now();
464
471
  },
465
472
  handlerAfterBindCard(res){
466
473
  //已绑定卡券处理
@@ -582,21 +589,47 @@
582
589
  let valid_token = this.$xdUniHelper.randomChar(20);
583
590
  this.valid_token = valid_token;
584
591
  },
592
+ p_qrCardBind(result){
593
+ jfbRootExec("qrCardBind", {
594
+ vm: this,
595
+ data: {
596
+ card_qrcode: result,
597
+ is_show_pop: "Y"
598
+ }
599
+ }).then(res => {
600
+ console.log(res);
601
+ this.handlerAfterBindCard(res)
602
+ }).catch(err => {
603
+ console.log(err);
604
+ this.$xdLog.catch(err)
605
+ })
606
+ },
585
607
  doScanCode(){
586
608
  console.log("开始扫码");
587
609
  // #ifdef H5
588
610
  this.jwxSDK.scanQRCode({
589
611
  needResult: 1,
612
+ scanType: ["qrCode"],
590
613
  success: res => {
591
- this.$set(this.form, 'card_number', res.resultStr)
614
+ // this.$set(this.form, 'card_number', res.resultStr)
615
+ this.p_qrCardBind(res.resultStr)
616
+ },
617
+ fail: (error) => {
618
+ if (typeof error === 'string') error = {error: error}
619
+ if (window['jwxJfbSDKParams']) error = Object.assign(error, window['jwxJfbSDKParams'])
620
+ this.$xdLog.setARMSError(error)
592
621
  }
593
622
  })
594
623
  // #endif
595
624
  // #ifdef MP
596
625
  uni.scanCode({
597
626
  success: res => {
598
- this.$set(this.form, 'card_number', res.result)
599
- }
627
+ // this.$set(this.form, 'card_number', res.result)
628
+ this.p_qrCardBind(res.result)
629
+ },
630
+ fail: (error) => {
631
+ this.$xdLog.setARMSError(error)
632
+ },
600
633
  })
601
634
  // #endif
602
635
  },
@@ -109,7 +109,7 @@
109
109
  <view v-if="!hasCardList" class="no_more_card" @click="toDisableUrl">没有更多券了,查看失效的票券 ></view>
110
110
  </view>
111
111
  <view v-else>
112
- 暂无数据
112
+ <!-- 暂无数据 -->
113
113
  </view>
114
114
  </view>
115
115
  </template>
@@ -55,7 +55,7 @@
55
55
  <xd-content-xss
56
56
  v-for="(item, i) in contentList"
57
57
  :key="item.content_id"
58
- :html="item.content"
58
+ :html="$xdUniHelper.filterHtml(item.content)"
59
59
  :font-sizes="fontSize"
60
60
  style="display: flex;align-items: center;"
61
61
  ></xd-content-xss>
@@ -114,7 +114,7 @@
114
114
  <view class="xd-xss_wrap">
115
115
  <xd-content-xss
116
116
  :key="contentKey"
117
- :html="content"
117
+ :html="$xdUniHelper.filterHtml(content)"
118
118
  :font-sizes="fontSize"
119
119
  style="display: flex;align-items: center;"
120
120
  ></xd-content-xss>
@@ -51,7 +51,7 @@
51
51
  <view v-for="(item, i) in parent.items" :key="item.key"
52
52
  class="module_cont_inner"
53
53
  :style="[moduleItemContStyle, {
54
- width: getProductCell(parent.tab) == 2 ? `calc(50% - ${allStyle.allModuleItemContMargin/2}rpx)`: '100%',
54
+ width: getProductCell(parent.tab) == 2 ? `calc(50% - ${listItemStyle.outSpacing/2}rpx)`: '100%',
55
55
  }]"
56
56
  >
57
57
  <content-product v-if="parent.type === 'product'"
@@ -151,32 +151,19 @@
151
151
  return this.styleObjectToString(style);
152
152
  },
153
153
  moduleItemContStyle(){
154
- let {
155
- allModuleItemContBorder, allModuleItemContShadow, allModuleItemContPadding, allModuleItemContMargin,
156
- allModuleItemContRadius, allModuleItemContBgColor
157
- } = this.allStyle;
158
- let border = "none";
159
- let boxShadow = "none";
160
- if(allModuleItemContBorder && allModuleItemContBorder.type === 'Y'){
161
- let { width, color } = allModuleItemContBorder.value;
162
- border = `${width}rpx solid ${color}`;
163
- }
164
- if(allModuleItemContShadow && allModuleItemContShadow.type === 'Y'){
165
- let { width, color } = allModuleItemContShadow.value;
166
- boxShadow = `0 0 ${width}rpx ${color}`;
167
- }
168
- let padding = `${this.checkValue(allModuleItemContPadding.top, 20)}rpx`;
169
- padding = `${padding} ${this.checkValue(allModuleItemContPadding.right, 20)}rpx`;
170
- padding = `${padding} ${this.checkValue(allModuleItemContPadding.bottom, 20)}rpx`;
171
- padding = `${padding} ${this.checkValue(allModuleItemContPadding.left, 20)}rpx`;
172
- console.log("allModuleItemContShadow", allModuleItemContShadow)
154
+ const { contBgColor, contShadow, contBorder, contMargin, contRradius, outSpacing } = this.listItemStyle;
155
+
156
+ let padding = `${this.checkValue(contMargin.top, 20)}rpx`;
157
+ padding = `${padding} ${this.checkValue(contMargin.right, 20)}rpx`;
158
+ padding = `${padding} ${this.checkValue(contMargin.bottom, 20)}rpx`;
159
+ padding = `${padding} ${this.checkValue(contMargin.left, 20)}rpx`;
173
160
  return this.styleObjectToString({
174
161
  padding: padding,
175
- border: border,
176
- borderRadius: allModuleItemContRadius + 'rpx',
177
- boxShadow: boxShadow,
178
- marginBottom: allModuleItemContMargin + 'rpx',
179
- background: allModuleItemContBgColor,
162
+ border: contBorder,
163
+ borderRadius: contRradius + 'rpx',
164
+ boxShadow: contShadow,
165
+ marginBottom: outSpacing + 'rpx',
166
+ background: contBgColor,
180
167
  })
181
168
  },
182
169
  moduleMoreStyle(){
@@ -239,83 +239,83 @@ export default {
239
239
  groupKey: "style",
240
240
  type: "number",
241
241
  },
242
- {
243
- label: "全部 - 列表单个样式配置",
244
- ele: "title",
245
- groupKey:'style',
246
- size: "small",
247
- },
248
- {
249
- label: "业务板块列表单个背景色",
250
- ele: "xd-color",
251
- valueKey: 'allModuleItemContBgColor',
252
- value: data['allModuleItemContBgColor'] || '#FFFFFF',
253
- groupKey:'style',
254
- },
255
- {
256
- label: "业务板块列表单个间距",
257
- ele: "el-input",
258
- valueKey: "allModuleItemContMargin",
259
- value: data.allModuleItemContMargin || 20,
260
- groupKey:'style',
261
- type: "number",
262
- },
263
- {
264
- label: "业务板块列表单个边框",
265
- ele: "xd-border",
266
- valueKey: 'allModuleItemContBorder',
267
- value: data['allModuleItemContBorder'] || null,
268
- groupKey:'style',
269
- },
270
- {
271
- label: "业务板块列表单个阴影",
272
- ele: "xd-shadow",
273
- groupKey:'style',
274
- valueKey: 'allModuleItemContShadow',
275
- value: data['allModuleItemContShadow'] || null,
276
- handleCustom({action, data}) {
277
- XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
278
- .then(res => {
279
- data.cb(res.list)
280
- })
281
- .catch(error => {
282
- console.error(error);
283
- data.cb([])
284
- });
285
- },
286
- },
287
- {
288
- label: "业务板块列表单个内边距",
289
- ele: "xd-margin-padding",
290
- valueKey: "allModuleItemContPadding",
291
- value: data['allModuleItemContPadding'] || null,
292
- groupKey:'style',
293
- setting: {
294
- type: 'padding',
295
- },
296
- placeholder: '请设置内边距',
297
- inline: false,
298
- notice: '设置内边距,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">20</span>像素',
299
- },
300
- {
301
- label: "业务板块列表单个圆角",
302
- ele: 'xd-site-select-list',
303
- valueKey: 'allModuleItemContRadius',
304
- value: data.allModuleItemContRadius || 16,
305
- groupKey:'style',
306
- placeholder: '请选择内容圆角设置',
307
- multiple: false,
308
- className: 'input80',
309
- handleCustom({ action, data }) {
310
- XdBus.getParentApi('getOptionsSettingList')({ setting_id: 'edtix_style_radius' })
311
- .then(res => {
312
- data.cb(res.list)
313
- })
314
- .catch(error => {
315
- console.error(error);
316
- });
317
- },
318
- },
242
+ // {
243
+ // label: "全部 - 列表单个样式配置",
244
+ // ele: "title",
245
+ // groupKey:'style',
246
+ // size: "small",
247
+ // },
248
+ // {
249
+ // label: "业务板块列表单个背景色",
250
+ // ele: "xd-color",
251
+ // valueKey: 'allModuleItemContBgColor',
252
+ // value: data['allModuleItemContBgColor'] || '#FFFFFF',
253
+ // groupKey:'style',
254
+ // },
255
+ // {
256
+ // label: "业务板块列表单个间距",
257
+ // ele: "el-input",
258
+ // valueKey: "allModuleItemContMargin",
259
+ // value: data.allModuleItemContMargin || 20,
260
+ // groupKey:'style',
261
+ // type: "number",
262
+ // },
263
+ // {
264
+ // label: "业务板块列表单个边框",
265
+ // ele: "xd-border",
266
+ // valueKey: 'allModuleItemContBorder',
267
+ // value: data['allModuleItemContBorder'] || null,
268
+ // groupKey:'style',
269
+ // },
270
+ // {
271
+ // label: "业务板块列表单个阴影",
272
+ // ele: "xd-shadow",
273
+ // groupKey:'style',
274
+ // valueKey: 'allModuleItemContShadow',
275
+ // value: data['allModuleItemContShadow'] || null,
276
+ // handleCustom({action, data}) {
277
+ // XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
278
+ // .then(res => {
279
+ // data.cb(res.list)
280
+ // })
281
+ // .catch(error => {
282
+ // console.error(error);
283
+ // data.cb([])
284
+ // });
285
+ // },
286
+ // },
287
+ // {
288
+ // label: "业务板块列表单个内边距",
289
+ // ele: "xd-margin-padding",
290
+ // valueKey: "allModuleItemContPadding",
291
+ // value: data['allModuleItemContPadding'] || null,
292
+ // groupKey:'style',
293
+ // setting: {
294
+ // type: 'padding',
295
+ // },
296
+ // placeholder: '请设置内边距',
297
+ // inline: false,
298
+ // notice: '设置内边距,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">20</span>像素',
299
+ // },
300
+ // {
301
+ // label: "业务板块列表单个圆角",
302
+ // ele: 'xd-site-select-list',
303
+ // valueKey: 'allModuleItemContRadius',
304
+ // value: data.allModuleItemContRadius || 16,
305
+ // groupKey:'style',
306
+ // placeholder: '请选择内容圆角设置',
307
+ // multiple: false,
308
+ // className: 'input80',
309
+ // handleCustom({ action, data }) {
310
+ // XdBus.getParentApi('getOptionsSettingList')({ setting_id: 'edtix_style_radius' })
311
+ // .then(res => {
312
+ // data.cb(res.list)
313
+ // })
314
+ // .catch(error => {
315
+ // console.error(error);
316
+ // });
317
+ // },
318
+ // },
319
319
 
320
320
  {
321
321
  label: '选择综合入口类型:',