jufubao-base 1.0.158-beta4 → 1.0.159-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.
Files changed (50) hide show
  1. package/package.json +1 -1
  2. package/src/common/authorize.js +201 -70
  3. package/src/components/JfbBaseAddress/JfbBaseAddress.vue +4 -4
  4. package/src/components/JfbBaseAfterOrderDetail/JfbBaseAfterOrderDetail.vue +2 -1
  5. package/src/components/JfbBaseBack/JfbBaseBack.vue +7 -6
  6. package/src/components/JfbBaseCard/JfbBaseCard.vue +4 -1
  7. package/src/components/JfbBaseCardBindV2/JfbBaseCardBindV2.vue +54 -24
  8. package/src/components/JfbBaseCardDetail/JfbBaseCardDetail.vue +14 -14
  9. package/src/components/JfbBaseCardDetailEntry/JfbBaseCardDetailEntry.vue +313 -394
  10. package/src/components/JfbBaseCardDisabled/JfbBaseCardDisabled.vue +1 -1
  11. package/src/components/JfbBaseCardDisabledEntry/JfbBaseCardDisabledEntry.vue +4 -5
  12. package/src/components/JfbBaseCardEntry/JfbBaseCardEntry.vue +1 -0
  13. package/src/components/JfbBaseCardInfo/JfbBaseCardInfo.vue +21 -19
  14. package/src/components/JfbBaseCardInfoEntry/JfbBaseCardInfoEntry.vue +5 -2
  15. package/src/components/JfbBaseCardMerge/JfbBaseCardMerge.vue +1 -1
  16. package/src/components/JfbBaseCardMergeEntry/JfbBaseCardMergeEntry.vue +20 -16
  17. package/src/components/JfbBaseCardShift/JfbBaseCardShift.vue +1 -1
  18. package/src/components/JfbBaseCardShiftEntry/JfbBaseCardShiftEntry.vue +1 -1
  19. package/src/components/JfbBaseCardSweepInfo/JfbBaseCardSweepInfo.vue +7 -1
  20. package/src/components/JfbBaseCardV2/JfbBaseCardV2.vue +34 -18
  21. package/src/components/JfbBaseEntry/Attr.js +22 -0
  22. package/src/components/JfbBaseEntry/JfbBaseEntry.vue +76 -13
  23. package/src/components/JfbBaseFastLink/JfbBaseFastLink.vue +27 -18
  24. package/src/components/JfbBaseFastLink/XdFastNav.vue +2 -2
  25. package/src/components/JfbBaseLogin/JfbBaseLogin.vue +2 -2
  26. package/src/components/JfbBaseLoginForgetPwd/JfbBaseLoginForgetPwd.vue +1 -1
  27. package/src/components/JfbBaseLoginSetPwd/JfbBaseLoginSetPwd.vue +3 -3
  28. package/src/components/JfbBaseMapOverlay/JfbBaseMapOverlay.vue +13 -0
  29. package/src/components/JfbBaseMapOverlay/XdMapOverlay.vue +52 -37
  30. package/src/components/JfbBaseMultipleExpress/JfbBaseMultipleExpress.vue +2 -1
  31. package/src/components/JfbBaseNotice/Attr.js +0 -2
  32. package/src/components/JfbBaseNotice/JfbBaseNotice.vue +30 -10
  33. package/src/components/JfbBaseNotice/XdNoticeBar.vue +17 -1
  34. package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +2 -2
  35. package/src/components/JfbBaseOrderList/JfbBaseOrderList.vue +1 -1
  36. package/src/components/JfbBasePoster/JfbBasePoster.vue +118 -18
  37. package/src/components/JfbBasePoster/MoreScreen.vue +155 -37
  38. package/src/components/JfbBasePosterBigSmall/Attr.js +1 -4
  39. package/src/components/JfbBasePosterBigSmall/JfbBasePosterBigSmall.vue +191 -67
  40. package/src/components/JfbBasePosterEntry/JfbBasePosterEntry.vue +90 -20
  41. package/src/components/JfbBasePosterType/FourScreen.vue +156 -18
  42. package/src/components/JfbBasePosterType/JfbBasePosterType.vue +0 -35
  43. package/src/components/JfbBaseSuccess/JfbBaseSuccess.vue +2 -1
  44. package/src/components/JfbBaseUserInfo/JfbBaseUserInfo.vue +2 -1
  45. package/src/components/JfbBaseVideo/JfbBaseVideo.vue +8 -7
  46. package/src/components/JfbBaseVideo/XdVideo.vue +0 -4
  47. package/src/components/JfbBaseWalletIndex/JfbBaseWalletIndex.vue +4 -13
  48. package/src/components/JfbBaseWalletItem/JfbBaseWalletItem.vue +5 -4
  49. package/src/components/JfbBaseWxAuthorize/JfbBaseWxAuthorize.vue +2 -2
  50. package/src/mixins/colorCardMixins.js +1 -1
@@ -37,8 +37,54 @@
37
37
  field="content_name"
38
38
  :mode="config.mode"
39
39
  :dots-styles="config.dotStyleData"
40
- :style="{height: (getHeight) + 'px'}"
40
+ :style="{height: (getHeight) + 'px', width:'100%'}"
41
41
  >
42
+ <!--#ifdef MP-WEIXIN-->
43
+ <swiper
44
+ class="swiper xd-swiper-content"
45
+ :style="{width: '100%', height: getHeight + 'px'}"
46
+ :indicator-dots="false"
47
+ :autoplay="config.carouselTime > 0"
48
+ :interval="config.carouselTime"
49
+ :duration="500"
50
+ :current="current"
51
+ circular
52
+ @animationfinish="handleAnimationfinish"
53
+ >
54
+ <swiper-item
55
+ v-for="(item,index) in list"
56
+ :key="index"
57
+ :style="{width: '100%', height: getHeight + 'px'}"
58
+ >
59
+ <view
60
+ class="sreen__box-list"
61
+ :class="{
62
+ cell4: config.cells === 4,
63
+ cell5: config.cells === 5,
64
+ }"
65
+ :style="{ height: getHeight + 'px'}"
66
+ >
67
+ <view
68
+ v-for="it in item"
69
+ :key="it['content_id']"
70
+ :style="{height: boxHeight + 'px'}"
71
+ @click="handleClick(it)"
72
+ >
73
+ <view :style="{ height: height + 'px'}">
74
+ <view :style="{
75
+ borderRadius: config.radius + 'rpx',
76
+ boxShadow: config.shadow === 1? `0 0 10rpx rgba(0, 0, 0, .5)` : '',
77
+ }">
78
+ <image :src="it.image_url"></image>
79
+ </view>
80
+ </view>
81
+ <view v-if="it['content_name']" :style="{color: config.textColor}">{{it['content_name']}}</view>
82
+ </view>
83
+ </view>
84
+ </swiper-item>
85
+ </swiper>
86
+ <!--#endif-->
87
+ <!--#ifdef H5-->
42
88
  <xd-swiper
43
89
  :indicator-dots="false"
44
90
  :interval="config.carouselTime"
@@ -81,6 +127,7 @@
81
127
  </view>
82
128
  </template>
83
129
  </xd-swiper>
130
+ <!--#endif-->
84
131
  </xd-swiper-dot>
85
132
  </view>
86
133
  </view>
@@ -115,12 +162,22 @@
115
162
  padding: 0,
116
163
  status: false,
117
164
  list: [],
165
+ filterContentList:[],
118
166
  isPreview: false,
119
167
  current: 0,
120
168
  }
121
169
  },
122
170
  computed:{
123
171
  getHeight() {
172
+ let len = this.filterContentList.length
173
+ //不足一行数量,设置高度
174
+ if(len > 0 && len <= this.config.cells * 1){
175
+ return this.height + this.rpxText
176
+ }
177
+ //不足二行数量,设置高度
178
+ if(len > this.config.cells && len <= this.config.cells * 2 && this.config.jdRows >=2){
179
+ return this.height * 2 + this.rpxText * 2
180
+ }
124
181
  return this.height * this.config.jdRows + this.rpxText * this.config.jdRows;
125
182
  },
126
183
  rpxText(){
@@ -147,6 +204,65 @@
147
204
  handleAnimationfinish(e) {
148
205
  this.current = e.detail.current;
149
206
  },
207
+
208
+ /**
209
+ * @description 过滤不可以用
210
+ * 当前项目未H5时,过滤所有小程序应用
211
+ * 当前项目未小程序时,过滤所有非当前小程序应用
212
+ * 站外地址直接返回
213
+ * 站内地址未选值直接返回
214
+ * 预览模式全过
215
+ */
216
+ filterItem(){
217
+ let content = this.content.filter(item=>{
218
+ //预览模式
219
+ if( this.$configProject.isPreview) return true;
220
+
221
+ //非内部应用
222
+ if(item.redirect_type !== 'INN') return true
223
+
224
+ //没有配置链接
225
+ if(!item.redirect_data) return true;
226
+
227
+ //内部应用
228
+ else {
229
+ let redirect_data;
230
+ try {
231
+ redirect_data = JSON.parse(item.redirect_data);
232
+ if(!item['app_type']) item['app_type']= 'h5';
233
+
234
+ //#ifdef H5
235
+ return item['app_type'] !== 'wxmp';
236
+ //#endif
237
+
238
+ //#ifdef MP-WEIXIN
239
+ let actDir = this.$parent.projectAttr.deploy_dir;
240
+ let dir = this.getPathDir(redirect_data.page);
241
+ if(item['app_type'] === 'wxmp'){
242
+ return actDir === dir;
243
+ }
244
+ else if(item['app_type'] === 'h5') return true;
245
+ else return true
246
+ //#endif
247
+ }
248
+ catch (e) {
249
+ return true
250
+ }
251
+ }
252
+ });
253
+ console.warn(`PostTypeLists:${JSON.stringify(content.map(item=>`${item.app_type}:${item.content_name}:${item.redirect_data}`), null,2)}`)
254
+ this.filterContentList = this.$xdUniHelper.checkVarType(content);
255
+ return content;
256
+
257
+ },
258
+
259
+ getPathDir(pathDir){
260
+ if(pathDir.indexOf('@site_domain@/') === 0) {
261
+ return pathDir.replace('@site_domain@/','').split('/')[0]
262
+ }
263
+ return ''
264
+ },
265
+
150
266
  init() {
151
267
  if (this.timer) clearTimeout(this.timer);
152
268
  this.timer = setTimeout(() => {
@@ -154,19 +270,22 @@
154
270
  this.height = this.config.height;
155
271
  this.padding = 0;
156
272
 
273
+ //过滤不可以用
274
+ const content = this.filterItem();
275
+
157
276
  //静态图显示
158
277
  if(this.config.isCarousel === false) {
159
- this.list = this.content.filter((item,index)=>{
278
+ this.list = content.filter((item,index)=>{
160
279
  return index < (this.config.cells * this.config.jdRows);
161
280
  })
162
281
  }
163
282
  //轮播图显示
164
283
  else {
165
284
  let num = this.config.cells * this.config.jdRows;
166
- let maxPage = Math.ceil(this.content.length / num);
285
+ let maxPage = Math.ceil(content.length / num);
167
286
  let arr = [];
168
287
  for(let i =1 ; i <= maxPage; i++) {
169
- arr.push(this.$xdUniHelper.getLocalPaginationData(this.content, i, num))
288
+ arr.push(this.$xdUniHelper.getLocalPaginationData(content, i, num))
170
289
  }
171
290
  this.list = arr;
172
291
  }
@@ -174,51 +293,64 @@
174
293
 
175
294
  }, 100)
176
295
  },
296
+
177
297
  handleClick(item) {
178
- debugger
298
+ if(!item.redirect_data) {
299
+ console.warn(`未配置链接地址: ${item.redirect_data}`);
300
+ console.error(`未配置链接地址: ${item.redirect_data}`);
301
+ return
302
+ }
303
+
179
304
  //内部链接跳转地址
180
305
  if (item.redirect_type === 'INN') {
181
306
  try {
182
307
  let url = JSON.parse(item.redirect_data);
183
308
  let params = '';
184
- if (item['redirect_params']) params = `?${item['redirect_params']}`;
185
- this.$xdUniHelper.navigateTo({
186
- url: url.page + params
187
- })
309
+ if(url.page) {
310
+ if (item['redirect_params']) params = `?${item['redirect_params']}`;
311
+ this.$xdUniHelper.navigateTo({url: url.page + params})
312
+ }
313
+ else {
314
+ console.error(`应用链接配置错误: ${url.page}`)
315
+ }
188
316
  } catch (e) {
189
- console.error(e)
317
+ console.error(`应用链接配置错误: ${item.redirect_data}`)
190
318
  }
191
319
  }
192
320
 
193
321
  //外部链接
194
322
  if (item.redirect_type === 'URL') {
195
323
  let reg = /^(http:\/\/|https:\/\/|\/\/)+.+$/;
324
+ let spReg = /(-apiuri\/v)/;
196
325
  //#ifdef MP-WEIXIN
197
326
  try {
198
327
  let url = JSON.parse(item.redirect_data);
199
- if (reg.test(url.url) && this.$configProject.extras.webview) {
328
+ if (reg.test(url.url) || spReg.test(url.url)) {
200
329
  console.warn(`广告跳转外站: ${url.url}`)
201
- this.$xdUniHelper.navigateTo({
202
- url: `${this.$configProject.extras.webview}?seatUrl=${Base64.encodeURI(url.url)}`
203
- });
330
+ this.$xdUniHelper.navigateTo(url);
204
331
  } else {
205
- throw Error('地址错误')
332
+ console.error(`广告跳转外站配置错误: ${url.url}`)
206
333
  }
207
334
  } catch (e) {
208
- console.error(e)
335
+ console.error(`广告跳转外站配置错误: ${item.redirect_data}`)
209
336
  }
210
337
  //#endif
211
338
  //#ifdef H5
212
339
  try {
213
340
  let url = JSON.parse(item.redirect_data);
214
341
  console.warn(`广告跳转外站: ${url.url}`);
215
- this.$xdUniHelper.navigateTo(url)
342
+ this.$xdUniHelper.redirectTo(url, false)
216
343
  } catch (e) {
217
- console.error(e)
344
+ console.error(`广告跳转外站配置错误: ${item.redirect_data}`)
218
345
  }
219
346
  //#endif
220
347
 
221
348
  }
349
+
350
+ //无跳转地址
351
+ if(item.redirect_type === 'EMP') {
352
+ console.warn(`无跳转地址`);
353
+ }
222
354
  },
223
355
  }
224
356
  }
@@ -227,6 +359,7 @@
227
359
  <style scoped lang="less">
228
360
  .sreen {
229
361
  width: calc(100% + 2px); /**防止宽度不够问**/
362
+ height: 100%;
230
363
  position: relative;
231
364
 
232
365
  & .carousel-mask {
@@ -241,6 +374,7 @@
241
374
 
242
375
  &__box.notCarousel {
243
376
  width: 100%;
377
+ height: 100%;
244
378
  display: flex;
245
379
  justify-content: flex-start;
246
380
  align-items: flex-start;
@@ -333,6 +467,8 @@
333
467
  }
334
468
 
335
469
  &__box.carousel {
470
+ width: 100%;
471
+ height: 100%;
336
472
  display: flex;
337
473
  justify-content: flex-start;
338
474
  align-items: flex-start;
@@ -341,6 +477,8 @@
341
477
  }
342
478
 
343
479
  & .sreen__box-list {
480
+ width: 100%;
481
+ height: 100%;
344
482
  display: flex;
345
483
  justify-content: flex-start;
346
484
  align-items: flex-start;
@@ -131,41 +131,6 @@
131
131
  handleAnimationfinish(e) {
132
132
  this.current = e.detail.current;
133
133
  },
134
- handleClick(item, index){
135
- this.current = index;
136
- const handle = (data) => {
137
- try {
138
- return JSON.parse(data);
139
- } catch (e) {
140
- return {}
141
- }
142
- };
143
- if(this.$configProject.isPreview) {
144
- console.log(item)
145
- }
146
- else {
147
- if (item['redirect_type'] === 'EMP') return;
148
- let url = '';
149
-
150
- if (item['redirect_type'] === 'URL') {
151
- url = handle(item['redirect_data']).url || ''
152
- }
153
-
154
- if (item['redirect_type'] === 'INN') {
155
- url = handle(item['redirect_data']).page || ''
156
- }
157
- if (item['redirect_type'] === 'APP') {
158
- return;
159
- }
160
- if (url === '') {
161
- return;
162
- }
163
-
164
- if(url.indexOf('?') === -1) url = `${url}?vs=${new Date().getTime()}`;
165
- else url = `${url}&vs=${new Date().getTime()}`;
166
- this.$xdUniHelper.navigateTo({url})
167
- }
168
- },
169
134
  handleImage(list){
170
135
  return list.map(item => {
171
136
  return {
@@ -489,8 +489,9 @@ export default {
489
489
  // #ifndef H5
490
490
  uni.setClipboardData({
491
491
  data: text,
492
+ showToast: false,
492
493
  success: () => {
493
- this.$xdAlert({ content: "复制成功" });
494
+ //this.$xdAlert({ content: "复制成功" });
494
495
  },
495
496
  });
496
497
  // #endif
@@ -170,7 +170,8 @@
170
170
  this.$xdShowLoading({});
171
171
  store.dispatch('logout').then(res=>{
172
172
  this.$xdHideLoading();
173
- this.jfbAuthorize.removeToken('card');
173
+ this.jfbAuthorize.removeAllCardToken();
174
+ this.jfbAuthorize.removeAllToken()
174
175
  this.jfbAuthorize.jumpToUserLogin(this, false);
175
176
  }).catch(err=>{
176
177
  console.error(err);
@@ -16,6 +16,7 @@
16
16
  <view class="jfb-base-video__body">
17
17
  <view class="x-line"></view>
18
18
  <view
19
+ v-if="isShow"
19
20
  class="x-video"
20
21
  :style="{
21
22
  backgroundColor:bgColor,
@@ -26,15 +27,13 @@
26
27
  height:contentHeight + 'rpx'
27
28
  }"
28
29
  >
29
-
30
30
  <xd-video
31
31
  v-if="video !== null && video !== ''"
32
32
  :key="videoKey"
33
33
  :poster="videoSetting"
34
34
  :video="video"
35
- :pack-this="$vm"
36
35
  ></xd-video>
37
- <view class="not-video" v-if="video === ''">
36
+ <view class="not-video" v-if="isPreview && video === ''">
38
37
  <image :src="getVideoSrc"></image>
39
38
  </view>
40
39
  </view>
@@ -60,7 +59,7 @@
60
59
  mixins: [componentsMixins,extsMixins,JfbBaseVideoMixin],
61
60
  data() {
62
61
  return {
63
- selfMask: true,
62
+ isPreview: false,
64
63
  page_size: 1,
65
64
  options:{},
66
65
 
@@ -73,11 +72,14 @@
73
72
  width:750,
74
73
  bgColor:'',
75
74
  radius:0,
76
- $vm: {},
77
- videoKey : Date.now()
75
+ videoKey : Date.now(),
78
76
  }
79
77
  },
80
78
  computed: {
79
+ isShow(){
80
+ if(this.isPreview) return true;
81
+ else return this.video
82
+ },
81
83
  iconFont(){
82
84
  if(this.autoplay === 'N') return 'iconplayright'
83
85
  if(this.autoplay === 'E') return 'iconshibai';
@@ -126,7 +128,6 @@
126
128
  }
127
129
  },
128
130
  created() {
129
- this.$vm = this;
130
131
  this.isPreview = this.$configProject.isPreview;
131
132
  this.init(this.container);
132
133
  },
@@ -50,10 +50,6 @@
50
50
  type: String|Number,
51
51
  default: 0
52
52
  },
53
- packThis:{
54
- type:Object,
55
- required: true
56
- },
57
53
  video:{
58
54
  type:Object,
59
55
  required: true
@@ -112,20 +112,11 @@
112
112
  @click="handleToBillDetail(item)"
113
113
  >
114
114
  <view>
115
- <XdFontIcon
116
- :icon="
117
- item.operate_type === 'A' ? 'iconshouru' : 'iconzhichu'
118
- "
119
- ></XdFontIcon>
120
- <text style="margin-left: 10rpx">{{
121
- item.trade_type_name
122
- }}</text>
115
+ <XdFontIcon :icon="item.operate_type === 'A' ? 'iconshouru' : 'iconzhichu'"></XdFontIcon>
116
+ <text style="margin-left: 10rpx">{{item.trade_type_name}}</text>
123
117
  </view>
124
118
  <view>
125
- <view
126
- >{{ item.operate_type === "A" ? "+" : "-" }}
127
- {{ dividePrice(item.amount) }}</view
128
- >
119
+ <view>{{ item.operate_type === "A" ? "+" : "-" }} {{ dividePrice(item.amount) }}</view>
129
120
  <view>{{ item.created_time }}</view>
130
121
  </view>
131
122
  </view>
@@ -140,7 +131,7 @@
140
131
  :cancel="false"
141
132
  :confirm="false"
142
133
  @close="handleClose"
143
- title=""
134
+ title="使用"
144
135
  >
145
136
  <view class="jfb-base-wallet-index__body-qrcode">
146
137
  <view>
@@ -302,12 +302,13 @@ export default {
302
302
  // 设置剪贴板数据
303
303
  uni.setClipboardData({
304
304
  data: text,
305
+ showToast: false,
305
306
  success: function () {
306
307
  // 复制成功,提示用户
307
- uni.showToast({
308
- title: "复制成功",
309
- icon: "success",
310
- });
308
+ // uni.showToast({
309
+ // title: "复制成功",
310
+ // icon: "success",
311
+ // });
311
312
  },
312
313
  fail: function () {
313
314
  // 复制失败,提示用户
@@ -189,7 +189,7 @@
189
189
  }
190
190
  else{
191
191
  this.$xdConfirm({
192
- $vm: this,
192
+ styles: this.styles,
193
193
  isTitle: false,
194
194
  showClose: false,
195
195
  content: '用户登录失败',
@@ -200,7 +200,7 @@
200
200
  }
201
201
  }).catch(error=>{
202
202
  this.$xdConfirm({
203
- $vm: this,
203
+ styles: this.styles,
204
204
  isTitle: false,
205
205
  showClose: false,
206
206
  content: '用户登录失败',
@@ -11,7 +11,7 @@ export default {
11
11
  },
12
12
 
13
13
  created(){
14
- debugger
14
+
15
15
  },
16
16
 
17
17
  methods: {