jufubao-base 1.0.77-beta7 → 1.0.78-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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-base",
3
- "version": "1.0.77-beta7",
3
+ "version": "1.0.78-beta1",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -29,6 +29,7 @@ class JfbAuthorize {
29
29
  'card': 'JFB-CARD-TOKEN-{siteID}',
30
30
  'refresh': 'JFB-REFRESH-TOKEN-{siteID}',
31
31
  'access': 'JFB-ACCESS-TOKEN',
32
+ 'cardCode':'JFB-CARD-CODE-{siteID}'
32
33
  }, settings.token? settings.token: {});
33
34
  }
34
35
 
@@ -40,6 +41,7 @@ class JfbAuthorize {
40
41
  * @returns {string|*}
41
42
  */
42
43
  getTokenKeyword(key){
44
+
43
45
  if (!this.config[key]) key = 'user';
44
46
  if(key === 'access') return this.config.access;
45
47
  else{
@@ -83,6 +85,8 @@ class JfbAuthorize {
83
85
  */
84
86
  removeToken(key, options = {}) {
85
87
  key = this.getTokenKeyword(key);
88
+ let codeKey = this.getTokenKeyword('cardCode');
89
+ debugger
86
90
  //#ifdef H5
87
91
  cookie.remove(key, options);
88
92
  console.warn(`cookie.key=${key}`);
@@ -142,7 +146,7 @@ class JfbAuthorize {
142
146
  * @description 跳转到用户登陆页面
143
147
  * @param $vm {Vue}
144
148
  */
145
- jumpToUserLogin($vm) {
149
+ jumpToUserLogin($vm,isRedirect) {
146
150
  let redirect_url = '';
147
151
  if(store.state.configProject.platform === 'mp.weixin') {
148
152
  redirect_url = $vm['$xdUniHelper'].parseURL().source;
@@ -20,9 +20,12 @@
20
20
  <!-- #endif -->
21
21
  <view class="jfb-base-after-order-list__body">
22
22
  <view :style="{ padding: outMargin }">
23
- <view v-if="loadingList" class="skeleton-wrap">
23
+ <view v-if="orderList && orderList.length > 0">
24
24
  <view
25
- class="jfb-base-after-order-list__body-order" v-for="i in 3" :key="i"
25
+ class="jfb-base-after-order-list__body-order"
26
+ v-for="(item, index) in orderList"
27
+ :key="index"
28
+ @click="handleToLink(item)"
26
29
  :style="{
27
30
  background: backgroundColor,
28
31
  border: borderBox,
@@ -32,81 +35,52 @@
32
35
  }"
33
36
  >
34
37
  <view class="jfb-base-after-order-list__body-order-biz">
35
- <view></view>
38
+ <view
39
+ v-if="item.business_icon"
40
+ class="jfb-base-after-order-list__body-order-biz-icon"
41
+ >
42
+ <xd-font-icon
43
+ :icon="item.business_icon"
44
+ :size="item.business_icon_size"
45
+ ></xd-font-icon>
46
+ </view>
47
+
48
+ <view>{{ item.business_name }}订单</view>
36
49
  </view>
37
50
  <view class="jfb-base-after-order-list__body-order-title">
38
- <view></view>
39
- <view></view>
40
- </view>
41
- <view class="jfb-base-after-order-list__body-order-content">
42
- <view class="image"></view>
43
- <view></view>
51
+ <view>服务单号:{{ item.order_id }}</view>
52
+ <view :style="{ color: mainColor }">
53
+ <!-- <xd-font-icon
54
+ style="margin-right: 16rpx"
55
+ icon="iconqianbao-01"
56
+ size="40rpx"
57
+ :color="mainColor"
58
+ ></xd-font-icon> -->
59
+ {{ item.after_sale_method_name }}
60
+ </view>
44
61
  </view>
45
- </view>
46
- </view>
47
- <template v-else>
48
- <view v-if="orderList && orderList.length > 0">
49
62
  <view
50
- class="jfb-base-after-order-list__body-order"
51
- v-for="(item, index) in orderList"
52
- :key="index"
53
- @click="handleToLink(item)"
54
- :style="{
55
- background: backgroundColor,
56
- border: borderBox,
57
- borderRadius: radius + 'rpx',
58
- boxShadow: shadowBox,
59
- marginBottom: padding + 'rpx',
60
- }"
63
+ class="jfb-base-after-order-list__body-order-content"
64
+ v-for="(Sitem, Sindex) in item.sale_goods"
65
+ :key="Sindex"
61
66
  >
62
- <view class="jfb-base-after-order-list__body-order-biz">
63
- <view
64
- v-if="item.business_icon"
65
- class="jfb-base-after-order-list__body-order-biz-icon"
66
- >
67
- <xd-font-icon
68
- :icon="item.business_icon"
69
- :size="item.business_icon_size"
70
- ></xd-font-icon>
71
- </view>
72
-
73
- <view>{{ item.business_name }}订单</view>
74
- </view>
75
- <view class="jfb-base-after-order-list__body-order-title">
76
- <view>服务单号:{{ item.order_id }}</view>
77
- <view :style="{ color: mainColor }">
78
- <!-- <xd-font-icon
79
- style="margin-right: 16rpx"
80
- icon="iconqianbao-01"
81
- size="40rpx"
82
- :color="mainColor"
83
- ></xd-font-icon> -->
84
- {{ item.after_sale_method_name }}
85
- </view>
86
- </view>
87
- <view
88
- class="jfb-base-after-order-list__body-order-content"
89
- v-for="(Sitem, Sindex) in item.sale_goods"
90
- :key="Sindex"
91
- >
92
- <image
93
- style="background: #ffffff"
94
- mode="aspectFit"
95
- :src="Sitem.thumb"
96
- ></image>
97
- <view>{{ Sitem.product_name }}</view>
98
- </view>
67
+ <image
68
+ style="background: #ffffff"
69
+ mode="aspectFit"
70
+ :src="Sitem.thumb"
71
+ ></image>
72
+ <view>{{ Sitem.product_name }}</view>
99
73
  </view>
100
74
  </view>
101
- <view v-else class="jfb-base-after-order-list__body-no">
102
- <xd-font-icon
103
- size="120"
104
- color="#B3C1C4"
105
- icon="iconzanwudingdan"
106
- ></xd-font-icon>
107
- <view>暂无订单</view>
108
- </view>
109
- </template>
75
+ </view>
76
+ <view v-else class="jfb-base-after-order-list__body-no">
77
+ <xd-font-icon
78
+ size="120"
79
+ color="#B3C1C4"
80
+ icon="iconzanwudingdan"
81
+ ></xd-font-icon>
82
+ <view>暂无订单</view>
83
+ </view>
110
84
  </view>
111
85
  </view>
112
86
  </view>
@@ -135,7 +109,6 @@ export default {
135
109
  page_token: 1,
136
110
  hasNext: true,
137
111
  next_page_token: "",
138
- loadingList: false,
139
112
 
140
113
  //基础
141
114
  radius: 0,
@@ -248,7 +221,6 @@ export default {
248
221
  },
249
222
  getList() {
250
223
  this.$xdShowLoading({});
251
- this.loadingList = true;
252
224
  jfbRootExec("getAfterOrderList", {
253
225
  vm: this,
254
226
  data: {
@@ -257,7 +229,6 @@ export default {
257
229
  },
258
230
  })
259
231
  .then((res) => {
260
- this.loadingList = false;
261
232
  this.$xdHideLoading();
262
233
  let list =
263
234
  res.list &&
@@ -343,12 +314,6 @@ export default {
343
314
  display: flex;
344
315
  align-items: center;
345
316
 
346
- & > view {
347
- .skeleton-wrap &{
348
- .skeleton-item(100rpx, 40rpx, 20rpx);
349
- }
350
- }
351
-
352
317
  &-icon {
353
318
  margin-right: unit(10, rpx);
354
319
  }
@@ -363,19 +328,10 @@ export default {
363
328
  padding-top: unit(40, rpx);
364
329
  color: #333333;
365
330
 
366
- & > view:first-child {
367
- .skeleton-wrap &{
368
- .skeleton-item(300rpx, 40rpx, 20rpx);
369
- }
370
- }
371
-
372
331
  & > view:nth-child(2) {
373
332
  display: flex;
374
333
  align-items: center;
375
334
  font-weight: 400;
376
- .skeleton-wrap &{
377
- .skeleton-item(100rpx);
378
- }
379
335
  }
380
336
  }
381
337
 
@@ -391,19 +347,6 @@ export default {
391
347
  flex-shrink: 0;
392
348
  }
393
349
 
394
- .image{
395
- .skeleton-wrap &{
396
- .skeleton-item(160rpx, 160rpx);
397
- max-height: none;
398
- flex: none;
399
- }
400
- }
401
- & > :last-child{
402
- .skeleton-wrap &{
403
- .skeleton-item(300rpx);
404
- }
405
- }
406
-
407
350
  view {
408
351
  margin-left: unit(20, rpx);
409
352
  flex: 1;
@@ -124,82 +124,77 @@
124
124
  :style="{ color: warningColor }"
125
125
  v-if="tabIndex === 2"
126
126
  >* 目前仅支持电影票兑换券进行转换</view>
127
- <view v-if="loadingCardList">
128
- <xd-card-v2-skelton v-for="i in 3" :key="i"></xd-card-v2-skelton>
129
- </view>
130
- <template v-else>
131
- <view
132
- v-if="tabIndex === 2 || tabIndex === 1"
133
- class="jfb-base-card__body-card"
134
- >
135
- <template v-if="cardLayout === '1'">
136
- <view
137
- v-for="(item, index) in showList"
138
- :key="index"
139
- @click="handleBindLogin(item)"
140
- class="jfb-base-card__body-card-item"
141
- >
142
- <view class="jfb-base-card__body-card-item-left">
143
- <xd-font-icon
144
- size="100"
145
- :color="mainColor"
146
- icon="iconyouhuiquan1-011"
147
- ></xd-font-icon>
148
- <view>{{ tabIndex === 1 ? login_name : "转换" }}</view>
149
- </view>
150
- <view class="jfb-base-card__body-card-item-right">
151
- <view class="jfb-base-card__body-card-item-right-top">
152
- <view>
153
- <xd-font-icon
154
- icon="iconkaquan"
155
- size="38"
156
- :style="{marginRight: '18rpx'}"
157
- :color="mainColor"
158
- ></xd-font-icon>
159
- <view>{{ item.card_type_name }}</view>
160
- </view>
161
- <view>
162
- <view>{{ item.card_number }}</view>
163
- <view>有效期至:{{ item.end_time }}</view>
164
- </view>
127
+ <view
128
+ v-if="tabIndex === 2 || tabIndex === 1"
129
+ class="jfb-base-card__body-card"
130
+ >
131
+ <template v-if="cardLayout === '1'">
132
+ <view
133
+ v-for="(item, index) in showList"
134
+ :key="index"
135
+ @click="handleBindLogin(item)"
136
+ class="jfb-base-card__body-card-item"
137
+ >
138
+ <view class="jfb-base-card__body-card-item-left">
139
+ <xd-font-icon
140
+ size="100"
141
+ :color="mainColor"
142
+ icon="iconyouhuiquan1-011"
143
+ ></xd-font-icon>
144
+ <view>{{ tabIndex === 1 ? login_name : "转换" }}</view>
145
+ </view>
146
+ <view class="jfb-base-card__body-card-item-right">
147
+ <view class="jfb-base-card__body-card-item-right-top">
148
+ <view>
149
+ <xd-font-icon
150
+ icon="iconkaquan"
151
+ size="38"
152
+ :style="{marginRight: '18rpx'}"
153
+ :color="mainColor"
154
+ ></xd-font-icon>
155
+ <view>{{ item.card_type_name }}</view>
156
+ </view>
157
+ <view>
158
+ <view>{{ item.card_number }}</view>
159
+ <view>有效期至:{{ item.end_time }}</view>
165
160
  </view>
166
- <view class="jfb-base-card__body-card-item-right-bottom">
167
- <view class="jfb-base-card__body-card-item-right-bottom-info">
168
- <view
169
- class="jfb-base-card__body-card-item-right-bottom-info-residue"
170
- >
171
- 剩余{{ item.unit }}数:{{ item.card_point }}{{ item.unit }}
172
- </view>
173
- <view
174
- v-if="item.other_card_point && item.card_point_type !== 1"
175
- class="jfb-base-card__body-card-item-right-bottom-info-deduction"
176
- >
177
- 购买其他物品可抵:{{ item.other_card_point }}
178
- </view>
161
+ </view>
162
+ <view class="jfb-base-card__body-card-item-right-bottom">
163
+ <view class="jfb-base-card__body-card-item-right-bottom-info">
164
+ <view
165
+ class="jfb-base-card__body-card-item-right-bottom-info-residue"
166
+ >
167
+ 剩余{{ item.unit }}数:{{ item.card_point }}{{ item.unit }}
179
168
  </view>
180
169
  <view
181
- @click.stop="toDetail(item)"
182
- :style="{ background: mainColor }"
183
- >查看</view
170
+ v-if="item.other_card_point && item.card_point_type !== 1"
171
+ class="jfb-base-card__body-card-item-right-bottom-info-deduction"
184
172
  >
173
+ 购买其他物品可抵:{{ item.other_card_point }}
174
+ </view>
185
175
  </view>
176
+ <view
177
+ @click.stop="toDetail(item)"
178
+ :style="{ background: mainColor }"
179
+ >查看</view
180
+ >
186
181
  </view>
187
182
  </view>
188
- </template>
189
- <template v-else>
190
- <xd-card-v2
191
- :login-name="login_name"
192
- v-for="(item, index) in showList"
193
- :mainColor="mainColor"
194
- :key="index"
195
- :cardInfo="item"
196
- :tabIndex="tabIndex"
197
- @toDetail="toDetail(item)"
198
- @bindLogin="handleBindLogin(item)">
199
- </xd-card-v2>
200
- </template>
201
- </view>
202
- </template>
183
+ </view>
184
+ </template>
185
+ <template v-else>
186
+ <xd-card-v2
187
+ :login-name="login_name"
188
+ v-for="(item, index) in showList"
189
+ :mainColor="mainColor"
190
+ :key="index"
191
+ :cardInfo="item"
192
+ :tabIndex="tabIndex"
193
+ @toDetail="toDetail(item)"
194
+ @bindLogin="handleBindLogin(item)">
195
+ </xd-card-v2>
196
+ </template>
197
+ </view>
203
198
  <view v-if="showDisabled==='Y'" @click="handleToDisabled" class="jfb-base-card__body-disabled">
204
199
  已失效票券>>>
205
200
  </view>
@@ -229,7 +224,6 @@
229
224
  import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
230
225
  import XdButton from "@/components/XdButton/XdButton";
231
226
  import XdCardV2 from "@/components/XdCardV2/XdCardV2";
232
- import XdCardV2Skelton from "@/components/XdCardV2/XdCardV2Skeleton"
233
227
  import { jfbRootExec } from "@/utils/xd.event";
234
228
  import JfbBaseCardMixin from "./JfbBaseCardMixin";
235
229
  import componentsMixins from "@/mixins/componentsMixins";
@@ -245,8 +239,7 @@ export default {
245
239
  XdFontIcon,
246
240
  XdButton,
247
241
  XdNoticeBar,
248
- XdCardV2,
249
- XdCardV2Skelton
242
+ XdCardV2
250
243
  },
251
244
  mixins: [componentsMixins, extsMixins, JfbBaseCardMixin],
252
245
  computed: {
@@ -286,7 +279,6 @@ export default {
286
279
  changeList: [],
287
280
  disableList: [],
288
281
  inCallback: null, //内部跳转地址
289
- loadingCardList: true,
290
282
 
291
283
  //页面跳转地址
292
284
  login_name:'',//登陆文案
@@ -508,13 +500,11 @@ export default {
508
500
  params['card_business_code'] = options['jfb_business_code'];
509
501
  }
510
502
  this.$xdShowLoading({});
511
- this.loadingCardList = true;
512
503
  jfbRootExec("getListCardBind", {
513
504
  vm: this,
514
505
  data: params
515
506
  })
516
507
  .then((res) => {
517
- this.loadingCardList = false;
518
508
  this.showDisabled = res.is_show_invalid_card_entrance;
519
509
  res.list = res.list.map((item) => {
520
510
  return {
@@ -16,78 +16,56 @@
16
16
  </view>
17
17
  <!-- #endif -->
18
18
  <view class="jfb-base-card-disabled__body">
19
- <view v-if="loadingList">
20
- <view class="jfb-base-card-disabled__body-card skeleton-card">
21
- <view v-for="i in 3" :key="i" class="jfb-base-card-disabled__body-card-item" >
22
- <view class="jfb-base-card-disabled__body-card-item-left">
23
- <view></view>
24
- </view>
25
- <view class="jfb-base-card-disabled__body-card-item-right">
26
- <view class="jfb-base-card-disabled__body-card-item-right-top">
27
- <view> <view> </view> </view>
28
- <view> </view>
29
- </view>
30
- <view class="jfb-base-card-disabled__body-card-item-right-bottom">
31
- <view class="jfb-base-card-disabled__body-card-item-right-bottom-info">
32
- <view class="jfb-base-card-disabled__body-card-item-right-bottom-info-residue"></view>
33
- </view>
34
- </view>
35
- </view>
36
- </view>
37
- </view>
38
- </view>
39
- <template v-else>
19
+ <view
20
+ class="jfb-base-card-disabled__body-card"
21
+ v-if="disableList && disableList.length > 0"
22
+ >
40
23
  <view
41
- class="jfb-base-card-disabled__body-card"
42
- v-if="disableList && disableList.length > 0"
24
+ v-for="(item, index) in disableList"
25
+ :key="index"
26
+ class="jfb-base-card-disabled__body-card-item"
43
27
  >
44
- <view
45
- v-for="(item, index) in disableList"
46
- :key="index"
47
- class="jfb-base-card-disabled__body-card-item"
48
- >
49
- <view class="jfb-base-card-disabled__body-card-item-left">
50
- <xd-font-icon
51
- color="#B8B7BE"
52
- size="100"
53
- icon="iconyouhuiquan1-011"
54
- ></xd-font-icon>
55
- <view style="color: #b8b7be">票券失效</view>
56
- </view>
57
- <view class="jfb-base-card-disabled__body-card-item-right">
58
- <view class="jfb-base-card-disabled__body-card-item-right-top">
59
- <view>
60
- <xd-font-icon
61
- icon="iconkaquan"
62
- size="38"
63
- :style="{marginRight: '18rpx'}"
64
- color="#B8B7BE"
65
- ></xd-font-icon>
66
- <view style="color: #b8b7be">{{ item.card_type_name }}</view>
67
- </view>
68
- <view>
69
- <view>{{ item.card_number }}</view>
70
- <view>有效期至:--</view>
71
- </view>
28
+ <view class="jfb-base-card-disabled__body-card-item-left">
29
+ <xd-font-icon
30
+ color="#B8B7BE"
31
+ size="100"
32
+ icon="iconyouhuiquan1-011"
33
+ ></xd-font-icon>
34
+ <view style="color: #b8b7be">票券失效</view>
35
+ </view>
36
+ <view class="jfb-base-card-disabled__body-card-item-right">
37
+ <view class="jfb-base-card-disabled__body-card-item-right-top">
38
+ <view>
39
+ <xd-font-icon
40
+ icon="iconkaquan"
41
+ size="38"
42
+ :style="{marginRight: '18rpx'}"
43
+ color="#B8B7BE"
44
+ ></xd-font-icon>
45
+ <view style="color: #b8b7be">{{ item.card_type_name }}</view>
46
+ </view>
47
+ <view>
48
+ <view>{{ item.card_number }}</view>
49
+ <view>有效期至:--</view>
72
50
  </view>
73
- <view class="jfb-base-card-disabled__body-card-item-right-bottom">
74
- <view class="jfb-base-card-disabled__body-card-item-right-bottom-info">
75
- <view
76
- style="color: #b8b7be"
77
- class="jfb-base-card-disabled__body-card-item-right-bottom-info-residue"
78
- >剩余{{ item.unit }}数:--{{ item.unit }}</view>
79
- </view>
51
+ </view>
52
+ <view class="jfb-base-card-disabled__body-card-item-right-bottom">
53
+ <view class="jfb-base-card-disabled__body-card-item-right-bottom-info">
80
54
  <view
81
- @click.stop="handleUnBindCard(item)"
82
- v-if="isShowUnbind"
83
- :style="{ background: '#fff',color:'#999',border: '1px solid #999' }"
84
- >解绑</view>
55
+ style="color: #b8b7be"
56
+ class="jfb-base-card-disabled__body-card-item-right-bottom-info-residue"
57
+ >剩余{{ item.unit }}数:--{{ item.unit }}</view>
85
58
  </view>
59
+ <view
60
+ @click.stop="handleUnBindCard(item)"
61
+ v-if="isShowUnbind"
62
+ :style="{ background: '#fff',color:'#999',border: '1px solid #999' }"
63
+ >解绑</view>
86
64
  </view>
87
65
  </view>
88
66
  </view>
89
- <xd-no-data height="80vh" v-else></xd-no-data>
90
- </template>
67
+ </view>
68
+ <xd-no-data height="80vh" v-else></xd-no-data>
91
69
  </view>
92
70
  </view>
93
71
  </template>
@@ -110,8 +88,7 @@ export default {
110
88
  data() {
111
89
  return {
112
90
  disableList: [],
113
- isShowUnbind: false,
114
- loadingList: false,
91
+ isShowUnbind: false
115
92
  };
116
93
  },
117
94
  watch: {
@@ -129,7 +106,6 @@ export default {
129
106
  },
130
107
  getCardList() {
131
108
  this.$xdShowLoading({});
132
- this.loadingList = true;
133
109
  jfbRootExec("getDisableCardList", {
134
110
  vm: this,
135
111
  data: {
@@ -137,7 +113,6 @@ export default {
137
113
  },
138
114
  })
139
115
  .then((res) => {
140
- this.loadingList = false;
141
116
  this.isShowUnbind = (res["is_can_unbind"] === 'Y' || res["is_can_unbind"] === undefined);
142
117
  res.list = res.list.map((item) => {
143
118
  return {
@@ -231,14 +206,6 @@ export default {
231
206
  align-items: center;
232
207
  justify-content: center;
233
208
  font-size: unit(24, rpx);
234
-
235
- & > view{
236
- .skeleton-card &{
237
- background-color: #DDDD;
238
- height: 100rpx;
239
- width: 100rpx;
240
- }
241
- }
242
209
  }
243
210
 
244
211
  &-right {
@@ -253,19 +220,11 @@ export default {
253
220
  display: flex;
254
221
  font-size: unit(28, rpx);
255
222
  margin-bottom: unit(18, rpx);
256
- .skeleton-card &{
257
- background-color: #DDDD;
258
- height: 28rpx;
259
- }
260
223
  }
261
224
 
262
225
  & > view:nth-child(2) {
263
226
  font-size: unit(24, rpx);
264
227
  color: #bbb;
265
- .skeleton-card &{
266
- background-color: #DDDD;
267
- height: 70rpx;
268
- }
269
228
 
270
229
  & > view:nth-child(1) {
271
230
  margin-right: unit(30, rpx);
@@ -283,20 +242,11 @@ export default {
283
242
  &-residue {
284
243
  font-size: unit(24, rpx);
285
244
  margin-bottom: unit(8, rpx);
286
- .skeleton-card &{
287
- width: 200rpx;
288
- background-color: #DDDD;
289
- height: 34rpx;
290
- }
291
245
  }
292
246
 
293
247
  &-deduction {
294
248
  font-size: unit(24, rpx);
295
249
  color: #bbb;
296
- .skeleton-card &{
297
- background-color: #DDDD;
298
- height: 18rpx;
299
- }
300
250
  }
301
251
  }
302
252