jufubao-base 1.0.169-beta9 → 1.0.169

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 (37) hide show
  1. package/package.json +1 -1
  2. package/src/components/JfbBaseLogin/Attr.js +510 -1147
  3. package/src/components/JfbBaseLogin/JfbBaseLogin.vue +63 -364
  4. package/src/components/JfbBaseMapSearch/MapSearchMp.vue +1 -1
  5. package/src/components/JfbBaseTfkCardBind/Api.js +30 -49
  6. package/src/components/JfbBaseTfkCardBind/Attr.js +38 -635
  7. package/src/components/JfbBaseTfkCardBind/JfbBaseTfkCardBind.vue +22 -589
  8. package/src/components/JfbBaseTfkCardBind/Mock.js +9 -19
  9. package/src/components/JfbBaseTfkCardDetail/Api.js +32 -19
  10. package/src/components/JfbBaseTfkCardDetail/Attr.js +33 -692
  11. package/src/components/JfbBaseTfkCardDetail/JfbBaseTfkCardDetail.vue +23 -630
  12. package/src/components/JfbBaseTfkCardDetail/Mock.js +11 -151
  13. package/src/components/JfbBaseTfkCardLogin/Api.js +34 -19
  14. package/src/components/JfbBaseTfkCardLogin/Attr.js +33 -885
  15. package/src/components/JfbBaseTfkCardLogin/JfbBaseTfkCardLogin.vue +16 -729
  16. package/src/components/JfbBaseTfkCardLogin/Mock.js +11 -721
  17. package/src/components/JfbBaseTfkSearch/Api.js +42 -11
  18. package/src/components/JfbBaseTfkSearch/Attr.js +33 -143
  19. package/src/components/JfbBaseTfkSearch/JfbBaseTfkSearch.vue +22 -171
  20. package/src/components/JfbBaseTfkSearch/Mock.js +11 -90
  21. package/src/mixins/colorCardMixins.js +9 -71
  22. package/src/mixins/componentsMixins.js +23 -346
  23. package/src/components/JfbBaseTfkCardLogin/XdCouponItem.vue +0 -271
  24. package/src/components/JfbBaseTfkSearch/AllList.vue +0 -231
  25. package/src/components/JfbBaseTfkSearch/ContentCinema.vue +0 -157
  26. package/src/components/JfbBaseTfkSearch/ContentFilm.vue +0 -179
  27. package/src/components/JfbBaseTfkSearch/ContentProduct.vue +0 -308
  28. package/src/components/JfbBaseTfkSearch/ContentShop.vue +0 -184
  29. package/src/components/JfbBaseTfkSearch/CusAttr.js +0 -203
  30. package/src/components/JfbBaseTfkSearch/CustomList.vue +0 -401
  31. package/src/components/JfbBaseTfkSearch/SkeletonCinema.vue +0 -45
  32. package/src/components/JfbBaseTfkSearch/SkeletonFilm.vue +0 -109
  33. package/src/components/JfbBaseTfkSearch/SkeletonProduct.vue +0 -246
  34. package/src/components/JfbBaseTfkSearch/SkeletonShop.vue +0 -81
  35. package/src/components/JfbBaseTfkSearch/handleKeyword.js +0 -24
  36. package/src/components/JfbBaseTfkSearch/listMixins.js +0 -151
  37. package/src/components/JfbBaseTfkSearch/search.js +0 -293
@@ -14,309 +14,30 @@
14
14
  </view>
15
15
  <!-- #endif -->
16
16
  <view class="jfb-base-tfk-card-detail__body">
17
- <view v-if="curModule === 'main'">
18
- <view class="card_wrap" :style="cardWrapBoxStyle">
19
- <view class="ticket_card" :style="cardBoxStyle">
20
- <view class="card_top">
21
- <view class="card_point_name">
22
- <view class="_point">
23
- <xd-unit
24
- :unitFontSize="24"
25
- :fontSize="40"
26
- :price="cardInfo.card_point"
27
- :isOld="false"
28
- :colorNew="cardFontColor"
29
- :unit="cardInfo.unit || ''"
30
- ></xd-unit>
31
- </view>
32
- <view class="_name">{{ cardInfo.card_type_name }}</view>
33
- </view>
34
- <view v-if="cardInfo.other_card_point && cardInfo.card_point_type !== 1">
35
- <view class="card_deduct">
36
- 购买其他物品可抵扣:{{ cardInfo.other_card_point }}
37
- </view>
38
- </view>
39
- </view>
40
- <view class="card_bottom">
41
- <view>ID:{{ cardInfo.card_number}}</view>
42
- <view>{{ cardInfo.end_time }}到期</view>
43
- </view>
44
- </view>
45
- </view>
46
- <view class="business_login" :style="businessWrapBox">
47
- <view v-if="showBusinessList === 'Y'">
48
- <view class="bus_title">进入业务板块</view>
49
- <view class="bus_list">
50
- <view class="bus_item" v-for="(item, i) in businessList" :key="i"
51
- :style="businessItemBox"
52
- @click="handleBusinessLogin(item)"
53
- >
54
- <view class="bus_img">
55
- <image :src="item.image_url" />
56
- </view>
57
- <view class="bus_name">{{item.entry_name}}</view>
58
- </view>
59
- </view>
60
- </view>
61
- <view v-else>
62
- <xd-button type="primary" @click="doCardLogin">立即使用</xd-button>
63
- </view>
64
- </view>
65
- <view class="list_col_wrap" :style="listColWrapBoxStyle">
66
- <view class="list_item" :style="listColItemStyle" @click="switchModule('rule')">
67
- <view class="list_title">使用规则</view>
68
- <view class="list_icon">
69
- <xd-font-icon icon="iconxiangyou_xian" size="24"></xd-font-icon>
70
- </view>
71
- </view>
72
- <view class="list_item" :style="listColItemStyle" @click="switchModule('pickup')">
73
- <view class="list_title">提货码</view>
74
- <view class="list_icon">
75
- <xd-font-icon icon="iconxiangyou_xian" size="24"></xd-font-icon>
76
- </view>
77
- </view>
78
- </view>
79
- </view>
80
- <view v-if="curModule === 'rule'">
81
- <view v-if="cardRule" v-html="cardRule" class="rule_wrap" :style="ruleDetailBoxStyle">
82
- </view>
83
- <view v-else class="rule_wrap" :style="ruleDetailBoxStyle">
84
- 使用规则暂无
85
- </view>
86
- </view>
87
- <view v-if="curModule === 'pickup'">
88
- <view class="code_wrap" :style="codeDetailBoxStyle">
89
- <view class="code_title">
90
- <view><xd-font-icon :icon='payPreIcon || "iconsaoma1"' size="54"></xd-font-icon></view>
91
- <view class="_title">向商家付款</view>
92
- </view>
93
- <view class="barcode">
94
- <image :src="cardInfo.barcode" mode="widthFix"></image>
95
- </view>
96
- <view class="qrcode" :style="qrcodeBoxStyle">
97
- <image :src="cardInfo.card_qrcode"></image>
98
- </view>
99
- <view class="time_loop">{{ timeStr }}后自动刷新</view>
100
- <view class="refresh_btn" @click="handleRefresh">
101
- <xd-font-icon class="btn_icon" :icon="refreshIcon"></xd-font-icon>
102
- 刷新二维码
103
- </view>
104
- </view>
105
- </view>
17
+ <view>测试插件( {{containerId}} )</view>
106
18
  </view>
107
19
  </view>
108
20
  </template>
109
21
 
110
22
  <script>
111
23
  import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
112
- import XdButton from "@/components/XdButton/XdButton";
113
- import XdUnit from "@/components/XdUnit/XdUnit";
114
24
  import { jfbRootExec } from "@/utils/xd.event";
115
25
  import JfbBaseTfkCardDetailMixin from "./JfbBaseTfkCardDetailMixin";
116
26
  import { getContainerPropsValue } from "@/utils/xd.base";
117
27
  import componentsMixins from "@/mixins/componentsMixins";
118
28
  import extsMixins from "@/mixins/extsMixins";
119
- import colorCardMixins from "@/mixins/colorCardMixins";
120
- import getServiceUrl from '@/common/getServiceUrl'
121
- import { mapState, mapActions } from "vuex";
122
29
  export default {
123
30
  name: "JfbBaseTfkCardDetail",
124
31
  components: {
125
- XdFontIcon,
126
- XdButton,
127
- XdUnit,
32
+ XdFontIcon
128
33
  },
129
34
  mixins: [
130
- componentsMixins, extsMixins, JfbBaseTfkCardDetailMixin, colorCardMixins
35
+ componentsMixins, extsMixins, JfbBaseTfkCardDetailMixin
131
36
  ],
132
37
  data() {
133
38
  return {
134
- curModule: "main",
135
- card_number: "",
136
- cardInfo: {},
137
- businessList: [],
138
- timeStr: "",
139
- timeer: null,
140
- date: 2, //时间底数
141
- time: 2, //时间幂指数
142
- stopTimer: false, //停止轮询
143
39
 
144
- cardRule: "",
145
- showBusinessList: "Y",
146
40
  //todo
147
- cardInfoMargin: {},
148
- cardInfoPadding: {},
149
- cardImageUrl: "",
150
- cardHeight: 260,
151
- cardRadius: 10,
152
- bussPadding: {},
153
- bussMargin: {},
154
- bussTempMargin: {},
155
- bussTempBgColor: "",
156
- listColMargin: {},
157
- listColPadding: {},
158
- listColSpace: 0,
159
- cardFontColor: "",
160
- ruleDetailMargin: {},
161
- ruleDetailPadding: {},
162
- ruleDetailBgColor: "",
163
- codeDetailMargin: {},
164
- codeDetailPadding: {},
165
- codeDetailBgColor: "",
166
- qrcodeWidth: 300,
167
- payPreIcon: "",
168
- refreshIcon: "",
169
- bussWidth: 100,
170
- codeDetailRadius: 16,
171
- codeDetailBorder: {},
172
- codeDetailShadow: {},
173
- ruleDetailFontColor: "",
174
- ruleDetailRadius: 0,
175
- }
176
- },
177
- computed: {
178
- ...mapState({
179
- jwxSDK: (state) => state.jwxSDK,
180
- jfbAuthorize: (state) => state.jfbAuthorize,
181
- }),
182
- cardWrapBoxStyle(){
183
- let padding = `${this.checkValue(this.cardInfoMargin.top, 20)}rpx`;
184
- padding = `${padding} ${this.checkValue(this.cardInfoMargin.right, 20)}rpx`;
185
- padding = `${padding} ${this.checkValue(this.cardInfoMargin.bottom, 20)}rpx`;
186
- padding = `${padding} ${this.checkValue(this.cardInfoMargin.left, 20)}rpx`;
187
-
188
- return this.styleObjectToString({
189
- padding: padding,
190
- })
191
- },
192
- businessWrapBox(){
193
- let margin = `${this.checkValue(this.bussTempMargin.top, 20)}rpx`;
194
- margin = `${margin} ${this.checkValue(this.bussTempMargin.right, 20)}rpx`;
195
- margin = `${margin} ${this.checkValue(this.bussTempMargin.bottom, 20)}rpx`;
196
- margin = `${margin} ${this.checkValue(this.bussTempMargin.left, 20)}rpx`;
197
-
198
- let padding = `${this.checkValue(this.bussPadding.top, 20)}rpx`;
199
- padding = `${padding} ${this.checkValue(this.bussPadding.right, 20)}rpx`;
200
- padding = `${padding} ${this.checkValue(this.bussPadding.bottom, 20)}rpx`;
201
- padding = `${padding} ${this.checkValue(this.bussPadding.left, 20)}rpx`;
202
-
203
- return this.styleObjectToString({
204
- margin: margin,
205
- padding: padding,
206
- backgroundColor: this.bussTempBgColor,
207
- })
208
- },
209
-
210
- businessItemBox(){
211
- let margin = `${this.checkValue(this.bussMargin.top, 20)}rpx`;
212
- margin = `${margin} ${this.checkValue(this.bussMargin.right, 20)}rpx`;
213
- margin = `${margin} ${this.checkValue(this.bussMargin.bottom, 20)}rpx`;
214
- margin = `${margin} ${this.checkValue(this.bussMargin.left, 20)}rpx`;
215
- return this.styleObjectToString({
216
- margin: margin,
217
- width: this.bussWidth + 'rpx'
218
- })
219
- },
220
- cardBoxStyle(){
221
- let style = {};
222
- if(this.cardImageUrl) style = {
223
- backgroundImage: `url(${this.getCardBgImage})`,
224
- backgroundSize: '100%',
225
- backgroundRepeat: 'no-repeat',
226
- }
227
- let padding = `${this.checkValue(this.cardInfoPadding.top, 20)}rpx`;
228
- padding = `${padding} ${this.checkValue(this.cardInfoPadding.right, 20)}rpx`;
229
- padding = `${padding} ${this.checkValue(this.cardInfoPadding.bottom, 20)}rpx`;
230
- padding = `${padding} ${this.checkValue(this.cardInfoPadding.left, 20)}rpx`;
231
- style = Object.assign(style, {
232
- padding: padding,
233
- height: this.cardHeight + 'rpx',
234
- borderRadius: this.cardRadius + 'rpx',
235
- color: this.cardFontColor,
236
- })
237
- return this.styleObjectToString(style)
238
- },
239
- getCardBgImage(){
240
- let bg = '';
241
- if(this.$xdUniHelper.checkVarType(this.cardImageUrl) === 'object'
242
- || this.$xdUniHelper.checkVarType(this.cardImageUrl) === 'array'
243
- ) {
244
- if(!this.$xdUniHelper.isEmpty(this.cardImageUrl)) {
245
- return getServiceUrl(this.cardImageUrl.url)
246
- }
247
- }
248
- return bg
249
- },
250
- listColWrapBoxStyle(){
251
- let margin = `${this.checkValue(this.listColMargin.top, 20)}rpx`;
252
- margin = `${margin} ${this.checkValue(this.listColMargin.right, 20)}rpx`;
253
- margin = `${margin} ${this.checkValue(this.listColMargin.bottom, 20)}rpx`;
254
- margin = `${margin} ${this.checkValue(this.listColMargin.left, 20)}rpx`;
255
- return this.styleObjectToString({
256
- margin: margin,
257
- })
258
- },
259
- listColItemStyle(){
260
- let padding = `${this.checkValue(this.listColPadding.top, 20)}rpx`;
261
- padding = `${padding} ${this.checkValue(this.listColPadding.right, 20)}rpx`;
262
- padding = `${padding} ${this.checkValue(this.listColPadding.bottom, 20)}rpx`;
263
- padding = `${padding} ${this.checkValue(this.listColPadding.left, 20)}rpx`;
264
- return this.styleObjectToString({
265
- padding,
266
- marginBottom: this.listColSpace + 'rpx',
267
- })
268
- },
269
- ruleDetailBoxStyle(){
270
- let padding = `${this.checkValue(this.ruleDetailPadding.top, 20)}rpx`;
271
- padding = `${padding} ${this.checkValue(this.ruleDetailPadding.right, 20)}rpx`;
272
- padding = `${padding} ${this.checkValue(this.ruleDetailPadding.bottom, 20)}rpx`;
273
- padding = `${padding} ${this.checkValue(this.ruleDetailPadding.left, 20)}rpx`;
274
- let margin = `${this.checkValue(this.ruleDetailMargin.top, 20)}rpx`;
275
- margin = `${margin} ${this.checkValue(this.ruleDetailMargin.right, 20)}rpx`;
276
- margin = `${margin} ${this.checkValue(this.ruleDetailMargin.bottom, 20)}rpx`;
277
- margin = `${margin} ${this.checkValue(this.ruleDetailMargin.left, 20)}rpx`;
278
- return this.styleObjectToString({
279
- margin: margin,
280
- padding: padding,
281
- backgroundColor: this.ruleDetailBgColor,
282
- color: this.ruleDetailFontColor,
283
- borderRadius: this.ruleDetailRadius + 'rpx',
284
- })
285
- },
286
- codeDetailBoxStyle(){
287
- let border = "none";
288
- let boxShadow = "none";
289
- if(this.codeDetailBorder && this.codeDetailBorder.type === 'Y'){
290
- let { width, color } = this.codeDetailBorder.value || {};
291
- border = `${width || 0}rpx solid ${color || 'transparent'}`;
292
- }
293
- if(this.codeDetailShadow && this.codeDetailShadow.type === 'Y'){
294
- let { width, color } = this.codeDetailShadow.value || {};
295
- boxShadow = `0 0 ${width || 0}rpx ${color || 'transparent'}`;
296
- }
297
- let padding = `${this.checkValue(this.codeDetailPadding.top, 20)}rpx`;
298
- padding = `${padding} ${this.checkValue(this.codeDetailPadding.right, 20)}rpx`;
299
- padding = `${padding} ${this.checkValue(this.codeDetailPadding.bottom, 20)}rpx`;
300
- padding = `${padding} ${this.checkValue(this.codeDetailPadding.left, 20)}rpx`;
301
- let margin = `${this.checkValue(this.codeDetailMargin.top, 20)}rpx`;
302
- margin = `${margin} ${this.checkValue(this.codeDetailMargin.right, 20)}rpx`;
303
- margin = `${margin} ${this.checkValue(this.codeDetailMargin.bottom, 20)}rpx`;
304
- margin = `${margin} ${this.checkValue(this.codeDetailMargin.left, 20)}rpx`;
305
- return this.styleObjectToString({
306
- margin: margin,
307
- padding: padding,
308
- backgroundColor: this.codeDetailBgColor,
309
- borderRadius: this.codeDetailRadius + 'rpx',
310
- border: border,
311
- boxShadow: boxShadow,
312
- })
313
- },
314
- qrcodeBoxStyle(){
315
-
316
- return this.styleObjectToString({
317
- width: this.qrcodeWidth + 'rpx',
318
- height: this.qrcodeWidth + 'rpx',
319
- })
320
41
  }
321
42
  },
322
43
  watch: {
@@ -332,224 +53,41 @@
332
53
  },
333
54
  methods: {
334
55
  onJfbLoad(options) {
335
- this.card_number = options.card_number;
336
- this.getCardDetail();
337
- this.getContent();
338
- },
339
- /**
340
- * @description 监听事件变化
341
- * @param container {object} 业务组件对象自己
342
- */
343
- init(value) {
344
- this.previewCurrent = getContainerPropsValue(value, 'content.previewCurrent', "main");
345
- this.showBusinessList = getContainerPropsValue(value, 'content.showBusinessList', "Y");
346
- this.cardInfoMargin = getContainerPropsValue(value, 'content.cardInfoMargin', {top: 20, left: 20, right: 20, bottom: 20});
347
- this.cardInfoPadding = getContainerPropsValue(value, 'content.cardInfoPadding', {top: 20, left: 20, right: 20, bottom: 20});
348
- this.cardImageUrl = getContainerPropsValue(value, 'content.cardImageUrl', '');
349
- this.cardHeight = getContainerPropsValue(value, 'content.cardHeight', 260);
350
- this.cardRadius = getContainerPropsValue(value, 'content.cardRadius', 16);
351
- this.bussPadding = getContainerPropsValue(value, 'content.bussPadding', {top: 20, left: 20, right: 20, bottom: 20});
352
- this.bussMargin = getContainerPropsValue(value, 'content.bussMargin', {top: 20, left: 20, right: 20, bottom: 20});
353
- this.bussTempMargin = getContainerPropsValue(value, 'content.bussTempMargin', {top: 20, left: 20, right: 20, bottom: 20});
354
- this.bussTempBgColor = getContainerPropsValue(value, 'content.bussTempBgColor', 'transparent');
355
- this.listColMargin = getContainerPropsValue(value, 'content.listColMargin', {top: 20, left: 20, right: 20, bottom: 20});
356
- this.listColPadding = getContainerPropsValue(value, 'content.listColPadding', {top: 20, left: 20, right: 20, bottom: 20});
357
- this.listColSpace = getContainerPropsValue(value, 'content.listColSpace', 10);
358
- this.cardFontColor = getContainerPropsValue(value, 'content.cardFontColor', '#333');
359
- this.ruleDetailMargin = getContainerPropsValue(value, 'content.ruleDetailMargin', {top: 20, left: 20, right: 20, bottom: 20});
360
- this.ruleDetailPadding = getContainerPropsValue(value, 'content.ruleDetailPadding', {top: 20, left: 20, right: 20, bottom: 20});
361
- this.ruleDetailBgColor = getContainerPropsValue(value, 'content.ruleDetailBgColor', '#fff');
362
- this.codeDetailMargin = getContainerPropsValue(value, 'content.codeDetailMargin', {top: 20, left: 20, right: 20, bottom: 20});
363
- this.codeDetailPadding = getContainerPropsValue(value, 'content.codeDetailPadding', {top: 20, left: 20, right: 20, bottom: 20});
364
- this.codeDetailBgColor = getContainerPropsValue(value, 'content.codeDetailBgColor', '#fff');
365
- this.qrcodeWidth = getContainerPropsValue(value, 'content.qrcodeWidth', 300);
366
- this.payPreIcon = getContainerPropsValue(value, 'content.payPreIcon', '');
367
- this.refreshIcon = getContainerPropsValue(value, 'content.refreshIcon', '');
368
- this.bussWidth = getContainerPropsValue(value, 'content.bussWidth', 100);
369
- this.codeDetailRadius = getContainerPropsValue(value, 'content.codeDetailRadius', 16);
370
- this.codeDetailBorder = getContainerPropsValue(value, 'content.codeDetailBorder', {});
371
- this.codeDetailShadow = getContainerPropsValue(value, 'content.codeDetailShadow', {});
372
- this.ruleDetailFontColor = getContainerPropsValue(value, 'content.ruleDetailFontColor', '');
373
- this.ruleDetailRadius = getContainerPropsValue(value, 'content.ruleDetailRadius', 0);
374
56
 
375
- console.log(this.codeDetailBorder, 'codeDetailBorder')
57
+ // jfbRootExec('baiduUserLogin', {
376
58
 
377
- if(this.$configProject.isPreview){
378
- this.curModule = this.previewCurrent;
379
- }
380
- },
381
- switchModule(module){
382
- this.curModule = module;
383
- },
384
- handleBusinessLogin(item){
385
- this.doCardLogin(() => {
386
- this.handleClick(item);
387
- })
388
- },
389
- doCardLogin(cb){
390
- this.$xdShowLoading({});
391
- jfbRootExec("loginTfkCardBind", {
392
- vm: this,
393
- data: {
394
- card_number: this.card_number
395
- }
396
- }).then(res => {
397
- this.$xdHideLoading();
398
- //#ifdef MP-WEIXIN
399
- if (this.jfbAuthorize !== null) {
400
- this.jfbAuthorize.setCardToken(res);
401
- }
402
- //#endif
59
+ // vm: this,// data: {
403
60
 
404
- if(cb) return cb();
405
-
406
- if (this.$configProject.isPreview) {
407
- console.log("handleBindLogin", "预览模式不跳转", this.inCallback);
408
- } else {
409
- this.$xdUniHelper.redirectTo({
410
- url: this.settings.index
411
- });
412
- }
413
- }).catch((res) => {
414
- this.$xdHideLoading();
415
- });
416
- },
417
- getCardDetail(){
418
- jfbRootExec("getTfkCardDetail", {
419
- vm: this,
420
- data: {
421
- card_number: this.card_number,
422
- is_show_entry_settings: this.curModule === 'main' ? this.showBusinessList : "N",
423
- }
424
- }).then(res => {
425
- this.cardInfo = Object.assign({}, res, {
426
- other_card_point: res.other_card_point ? this.$xdUniHelper.divisionFloatNumber(res.other_card_point, 100) : 0
427
- });
428
- let businessList = this.filterNotSupportEntry(res.site_entry_settings);
429
- this.businessList = businessList.filter(item => {
430
- item['image_url'] = getServiceUrl(item.image_url);
431
- return res.business_codes.includes(item.business_code);
432
- })
433
- if(!this.$configProject.isPreview) {
434
- this.setIntval(res.card_qrcode_expire);
435
- }else{
436
- this.timeStr = "08分10秒";
437
- }
438
- })
439
- },
440
- handleClick(entry){
441
- const {dir, path, host, appType} = entry['redirect_data'];
442
- let regHttp = /^(\/\/|http:\/\/|https:\/\/).+$/;
443
- let regSp = /(-apiuri\/v)/;
61
+ // account: 'gaoshiyong',// password: '123456789',// type: 3,// ...options
444
62
 
445
- if(!appType) entry.redirect_data.appType = 'h5';
446
- let nsp = Base64.encodeURI(JSON.stringify({business_code: entry['business_code']}));
63
+ // }
447
64
 
448
- //外站配置地址
449
- if(entry.redirect_type === 'URL') {
450
- if(regHttp.test(entry.redirect_data['path']) || regSp.test(entry.redirect_data['path'])) {
451
- this.$xdUniHelper.redirectTo({
452
- url:`${entry.redirect_data['path']}?x-common=${nsp}&vs=${new Date().getTime()}${cardPathStr}`
453
- }, false)
454
- }
455
- else {
456
- console.error(`配置错误:${entry.redirect_data['path']}`);
457
- throw new Error(`配置错误:${entry.redirect_data['path']}`)
458
- }
459
- return
460
- }
461
-
462
- //站内应用处理
463
- let jumpUrl = path;
464
- let cardPathStr = '';
465
- const {deploy_dir} = this.projectAttr;
466
- if(host === this.projectAttr.host && deploy_dir !== dir){
467
- jumpUrl = `//${host}/${dir}${path}`;
468
- //#ifdef MP-WEIXIN
469
- jumpUrl = `https:${jumpUrl}`;
470
- //#endif
471
- }
65
+ // }).then().catch()
66
+ },
67
+ /**
68
+ * @description 监听事件变化
69
+ * @param container {object} 业务组件对象自己
70
+ */
71
+ init(container) {
472
72
 
473
- //#ifdef MP-WEIXIN
474
- //获取自定义卡券登录地址(微信小程序跳转到H5平台起作用)
475
- if(entry.redirect_data.appType === 'h5') {
476
- const custom_redirect_data = this.$xdUniHelper.checkVarType(entry['custom_redirect_data']) === 'object'?entry['custom_redirect_data']:{};
477
- const cardPathObject = this.getCardPath(custom_redirect_data);
478
- if(cardPathObject !== null) {
479
- const {cardPath, cardSelf} =cardPathObject
480
- if(cardPath) cardPathStr = `&card-login=${encodeURIComponent(cardPath)}&cardSelf=${cardSelf}`
481
- }
482
- }
483
- //#endif
73
+ //this.bgcolor = getContainerPropsValue(container, 'content.bgcolor', '#fff');
484
74
 
485
- jumpUrl = `${jumpUrl}?x-common=${nsp}&vs=${new Date().getTime()}${cardPathStr}`;
486
- console.warn(`entry.path:${jumpUrl}`);
487
- if(regHttp.test(jumpUrl)) this.$xdUniHelper.redirectTo({url:jumpUrl}, false)
488
- else this.$xdUniHelper.navigateTo({url:jumpUrl}, false)
489
- },
490
- getContent() {
491
- jfbRootExec("getListBaseNewsContent", {
492
- vm: this,
493
- data: {
494
- page_id: this.pageAttr["page_id"], //页面ID
495
- container_id: this.containerId, //组件ID
496
- limit: 1,
497
- },
498
- })
499
- .then((res) => {
500
- if (res.list.length > 0) {
501
- if(res.list && res.list.length > 0) {
502
- this.cardRule = this.$xdUniHelper.filterHtml(res.list[0].content);
503
- }
504
- // this.noticeStatus = true;
505
- }
506
- })
507
- .catch((error) => {
508
- console.error(error);
509
- });
510
- },
511
- handleRefresh(){
512
- clearInterval(this.timeer);
513
- this.getCardDetail();
75
+ //this.height = getContainerPropsValue(container, 'content.height', 10);
514
76
  },
515
- setIntval(time){
516
- this.timeer = setInterval(() => {
517
- if (time === 0) {
518
- this.timeStr = "00分00秒";
519
- clearInterval(this.timeer);
520
- if (!this.stopTimer) this.getCardDetail();
521
- } else {
522
- time--;
523
- let f = Math.floor(time / 60);
524
- f = f < 10 ? "0" + f : f;
525
- let m = time % 60;
526
- m = m < 10 ? "0" + m : m;
527
- this.timeStr = `${f}分${m}秒`;
528
- }
529
- }, 1000);
77
+ onJfbScroll(options) {
78
+ console.log('event.onJfbScroll', options)
530
79
  },
531
-
532
- onJfbUnload(){
533
- this.timeStr = ""
534
- if (this.timeer) {
535
- clearInterval(this.timeer);
536
- }
80
+ onJfbReachBottom(options) {
81
+ console.log('event.onJfbReachBottom', options)
537
82
  },
538
83
  onJfbShow(options) {
539
- this.onJfbLoad(options)
84
+ console.log('event.onJfbShow', options)
540
85
  },
541
86
  onJfbHide(options) {
542
- this.timeStr = ""
543
- if (this.timeer) {
544
- clearTimeout(this.timeer);
545
- }
87
+ console.log('event.onJfbHide', options)
546
88
  },
547
89
  onJfbBack(options) {
548
- this.timeStr = ""
549
- if (this.timeer) {
550
- clearTimeout(this.timeer);
551
- }
552
- this.$xdUniHelper.navigateBack();
90
+ console.log('event.onJfbBack', options)
553
91
  },
554
92
  onJfbUpdate(...data) {
555
93
  console.log('event.onJfbUpdate', data)
@@ -567,152 +105,7 @@
567
105
 
568
106
  .jfb-base-tfk-card-detail {
569
107
  &__body{
570
- .ticket_card{
571
- display: flex;
572
- flex-direction: column;
573
- justify-content: space-between;
574
- font-size: 26rpx;
575
- .card_top{
576
- display: flex;
577
- flex-direction: column;
578
- .card_point_name{
579
- display: flex;
580
- justify-content: space-between;
581
- align-items: center;
582
- ._point{
583
- font-size: 40rpx;
584
- font-weight: bold;
585
- ::v-deep .xd-unit{
586
- height: auto !important;
587
- font-weight: bold;
588
- align-items: flex-end;
589
- .xd-unit__unit{
590
- line-height: 1.5 !important;
591
- }
592
- }
593
- ._unit{
594
- font-size: 24rpx;
595
- margin-left: 4rpx;
596
- }
597
- }
598
- ._name{
599
- font-size: 26rpx;
600
- }
601
- }
602
- .card_deduct{
603
- font-size: 26rpx;
604
- background-color: rgba(255, 255, 255, 0.2);
605
- display: inline-block;
606
- padding: 8rpx 16rpx;
607
- border-radius: 8rpx;
608
- }
609
- }
610
- .card_bottom{
611
- display: flex;
612
- justify-content: space-between;
613
- align-items: center;
614
- font-weight: 400;
615
- }
616
- }
617
- .business_login{
618
- .bus_title{
619
- text-align: center;
620
- }
621
- .bus_list{
622
- display: flex;
623
- flex-wrap: wrap;
624
- margin-top: 24rpx;
625
- .bus_item{
626
- margin: 0 10rpx;
627
- display: flex;
628
- flex-direction: column;
629
- align-items: center;
630
- .bus_img{
631
- width: 76rpx;
632
- height: 76rpx;
633
- background-color: #DDD;
634
- border-radius: 76rpx;
635
- overflow: hidden;
636
- image{
637
- width: 100%;
638
- height: 100%;
639
- }
640
- }
641
- .bus_name{
642
- margin-top: 12rpx;
643
- font-size: 24rpx;
644
- color: #242424;
645
- overflow: hidden;
646
- text-overflow: ellipsis;
647
- white-space: nowrap;
648
- width: 100%;
649
- text-align: center;
650
- }
651
- }
652
- }
653
- }
654
- .list_col_wrap{
655
- margin: 40rpx 0;
656
108
 
657
- .list_item{
658
- display: flex;
659
- align-items: center;
660
- padding: 10rpx 24rpx;
661
- background-color: #FFFFFF;
662
- .list_title{
663
- flex: 1;
664
- font-size: 24rpx;
665
- color: #333333;
666
- }
667
- }
668
- }
669
-
670
- .code_wrap{
671
- display: flex;
672
- flex-direction: column;
673
- font-size: 28rpx;
674
- .code_title{
675
- display: flex;
676
- align-items: center;
677
- ._title{
678
- margin-left: 30rpx;
679
- font-size: 32rpx;
680
- }
681
- }
682
- .barcode{
683
- width: 100%;
684
- margin-top: 32rpx;
685
- image{
686
- width: 100%;
687
- }
688
- }
689
- .qrcode{
690
- margin: 40rpx 24rpx;
691
- align-self: center;
692
- image{
693
- width: 100%;
694
- height: 100%;
695
- }
696
- }
697
- .time_loop{
698
- align-self: center;
699
- }
700
- .refresh_btn{
701
- align-self: center;
702
- border: 1px solid #999999;
703
- border-radius: 50rpx;
704
- width: 300rpx;
705
- height: 80rpx;
706
- display: flex;
707
- align-items: center;
708
- justify-content: center;
709
- margin-top: 40rpx;
710
- color: #999999;
711
- .btn_icon{
712
- margin-right: 16rpx;
713
- }
714
- }
715
- }
716
109
  }
717
110
  }
718
111
  </style>