jufubao-base 1.0.169-beta1 → 1.0.169-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.
Files changed (40) hide show
  1. package/package.json +1 -1
  2. package/src/components/JfbBaseHeader/JfbBaseHeader.vue +2 -2
  3. package/src/components/JfbBaseLogin/Attr.js +54 -16
  4. package/src/components/JfbBaseMapSearch/MapSearchMp.vue +1 -1
  5. package/src/components/JfbBaseOrderDetail/Api.js +12 -7
  6. package/src/components/JfbBaseOrderDetail/Attr.js +28 -14
  7. package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +68 -18
  8. package/src/components/JfbBaseOrderDetail/Mock.js +3 -1
  9. package/src/components/JfbBaseTfkCardBind/Api.js +49 -30
  10. package/src/components/JfbBaseTfkCardBind/Attr.js +61 -10
  11. package/src/components/JfbBaseTfkCardBind/JfbBaseTfkCardBind.vue +169 -9
  12. package/src/components/JfbBaseTfkCardBind/Mock.js +19 -9
  13. package/src/components/JfbBaseTfkCardDetail/Api.js +26 -0
  14. package/src/components/JfbBaseTfkCardDetail/Attr.js +336 -9
  15. package/src/components/JfbBaseTfkCardDetail/JfbBaseTfkCardDetail.vue +241 -36
  16. package/src/components/JfbBaseTfkCardDetail/Mock.js +2 -2
  17. package/src/components/JfbBaseTfkCardLogin/Attr.js +301 -5
  18. package/src/components/JfbBaseTfkCardLogin/JfbBaseTfkCardLogin.vue +317 -158
  19. package/src/components/JfbBaseTfkCardLogin/Mock.js +2 -46
  20. package/src/components/JfbBaseTfkCardLogin/XdCouponItem.vue +271 -0
  21. package/src/components/JfbBaseTfkSearch/AllList.vue +232 -0
  22. package/src/components/JfbBaseTfkSearch/Api.js +11 -42
  23. package/src/components/JfbBaseTfkSearch/Attr.js +225 -33
  24. package/src/components/JfbBaseTfkSearch/ContentCinema.vue +157 -0
  25. package/src/components/JfbBaseTfkSearch/ContentFilm.vue +180 -0
  26. package/src/components/JfbBaseTfkSearch/ContentProduct.vue +308 -0
  27. package/src/components/JfbBaseTfkSearch/ContentShop.vue +184 -0
  28. package/src/components/JfbBaseTfkSearch/CusAttr.js +213 -0
  29. package/src/components/JfbBaseTfkSearch/CustomList.vue +402 -0
  30. package/src/components/JfbBaseTfkSearch/JfbBaseTfkSearch.vue +230 -26
  31. package/src/components/JfbBaseTfkSearch/Mock.js +90 -11
  32. package/src/components/JfbBaseTfkSearch/SkeletonCinema.vue +45 -0
  33. package/src/components/JfbBaseTfkSearch/SkeletonFilm.vue +109 -0
  34. package/src/components/JfbBaseTfkSearch/SkeletonProduct.vue +246 -0
  35. package/src/components/JfbBaseTfkSearch/SkeletonShop.vue +81 -0
  36. package/src/components/JfbBaseTfkSearch/handleKeyword.js +24 -0
  37. package/src/components/JfbBaseTfkSearch/listMixins.js +153 -0
  38. package/src/components/JfbBaseTfkSearch/search.js +293 -0
  39. package/src/mixins/colorCardMixins.js +71 -9
  40. package/src/mixins/componentsMixins.js +346 -23
@@ -0,0 +1,246 @@
1
+ <template>
2
+ <view class="skeleton-wrap-item" :class="{display: cell===1}">
3
+ <template v-if="cell===1">
4
+ <view class="image skeleton-item" :style="{marginRight:outSpacing + 'rpx'}"></view>
5
+ <view class="content">
6
+ <view class="top">
7
+ <view class="title skeleton-item"></view>
8
+ <view class="brand skeleton-item" v-if="productConfig.is_show_brand==='Y'"></view>
9
+ <view class="tags">
10
+ <view class="skeleton-item" v-if="productConfig.showActivityPrice==='Y'"></view>
11
+ <template v-if="productConfig.isShowTag==='Y'">
12
+ <view class="skeleton-item"></view>
13
+ <view class="skeleton-item"></view>
14
+ <view class="skeleton-item"></view>
15
+ </template>
16
+ </view>
17
+ </view>
18
+ <view class="bottom">
19
+ <view class="price skeleton-item" v-if="productConfig.isPrice==='Y'"></view>
20
+ <view class="orgPrice skeleton-item" v-if="productConfig.isPrice==='Y' && productConfig.isShowDiscount === 'Y'"></view>
21
+ <view class="cart">
22
+ <view class="skeleton-item" v-if="productConfig.isAddCart === 'Y'"></view>
23
+ </view>
24
+ </view>
25
+ </view>
26
+ </template>
27
+ <template v-if="cell===2">
28
+ <view class="image2 skeleton-item" :style="{marginBottom:outSpacing + 'rpx', height: height + 'rpx'}"></view>
29
+ <view class="content2">
30
+ <view class="top">
31
+ <view class="title skeleton-item"></view>
32
+ <view class="brand skeleton-item" v-if="productConfig.is_show_brand==='Y'"></view>
33
+ <view class="tags">
34
+ <view class="skeleton-item" v-if="productConfig.showActivityPrice==='Y'"></view>
35
+ <template v-if="productConfig.isShowTag==='Y'">
36
+ <view class="skeleton-item"></view>
37
+ <view class="skeleton-item"></view>
38
+ <view class="skeleton-item"></view>
39
+ </template>
40
+ </view>
41
+ </view>
42
+ <view class="bottom">
43
+ <view class="price skeleton-item" v-if="productConfig.isPrice==='Y'"></view>
44
+ <view class="orgPrice skeleton-item" v-if="productConfig.isPrice==='Y' && productConfig.isShowDiscount === 'Y'"></view>
45
+ <view class="cart">
46
+ <view class="skeleton-item" v-if="productConfig.isAddCart === 'Y'"></view>
47
+ </view>
48
+ </view>
49
+ </view>
50
+ </template>
51
+ </view>
52
+ </template>
53
+
54
+ <script>
55
+ export default {
56
+ name: "SkeletonProduct",
57
+ props:{
58
+ outSpacing:{
59
+ type: Number|String,
60
+ default:20
61
+ },
62
+ cell:{
63
+ type: Number|String,
64
+ required: true
65
+ },
66
+ height:{
67
+ type: Number|String,
68
+ default:''
69
+ },
70
+ productConfig:{
71
+ type:Object|null,
72
+ default: null
73
+ },
74
+ }
75
+ }
76
+ </script>
77
+
78
+
79
+
80
+ <style scoped lang="less">
81
+ .skeleton-wrap-item {
82
+ min-height: 200rpx;
83
+
84
+ &.display {
85
+ display: flex;
86
+ justify-content: space-between;
87
+ align-items: center;
88
+ align-content: space-between;
89
+
90
+ & .image {
91
+ .skeleton-item(200rpx, 200rpx);
92
+ }
93
+
94
+
95
+ & .content {
96
+ flex: 1;
97
+ min-height: 200rpx;
98
+
99
+ .top {
100
+ height: 140rpx;
101
+
102
+ & .title {
103
+ .skeleton-item(100%, 60rpx);
104
+
105
+ }
106
+
107
+ & .brand {
108
+ margin-top: 10rpx;
109
+ .skeleton-item(70%, 25rpx);
110
+ }
111
+
112
+ .tags {
113
+ display: flex;
114
+ justify-content: flex-start;
115
+ align-items: center;
116
+ flex-flow: wrap;
117
+ margin-top: 10rpx;
118
+
119
+ & > view {
120
+ .skeleton-item(80rpx, 30rpx);
121
+ margin-left: 10rpx;
122
+ &:first-child {
123
+ margin-left: 0;
124
+ width: 120rpx;
125
+ }
126
+ }
127
+ }
128
+ }
129
+
130
+ .bottom {
131
+ display: flex;
132
+ justify-content: flex-end;
133
+ align-content: center;
134
+ align-items: center;
135
+ width: 100%;
136
+ height: 40rpx;
137
+ margin-top: 20rpx;
138
+
139
+ & .price {
140
+ flex-shrink: 0;
141
+ .skeleton-item(120rpx, 35rpx);
142
+ }
143
+
144
+ & .orgPrice {
145
+ flex-shrink: 0;
146
+ margin-left: 20rpx;
147
+ .skeleton-item(130rpx, 20rpx);
148
+ }
149
+
150
+ & .cart {
151
+ flex: 1;
152
+ display: flex;
153
+ justify-content: flex-end;
154
+ align-items: center;
155
+ & > view {
156
+ .skeleton-item(40rpx, 40rpx);
157
+ }
158
+ }
159
+ }
160
+ }
161
+ }
162
+
163
+ & .image2 {
164
+ .skeleton-item();
165
+ }
166
+
167
+ & .content2 {
168
+ flex: 1;
169
+
170
+ .top {
171
+ min-height: 140rpx;
172
+
173
+ & .title {
174
+ .skeleton-item(100%, 60rpx);
175
+
176
+ }
177
+
178
+ & .brand {
179
+ margin-top: 10rpx;
180
+ .skeleton-item(70%, 25rpx);
181
+ }
182
+
183
+ .tags {
184
+ display: flex;
185
+ justify-content: flex-start;
186
+ align-items: center;
187
+ flex-flow: wrap;
188
+ margin-top: 10rpx;
189
+
190
+
191
+ & > view {
192
+ .skeleton-item(80rpx, 30rpx);
193
+ margin-right: 10rpx;
194
+
195
+ &:first-child {
196
+ margin-right: 0;
197
+ width: 120rpx;
198
+ }
199
+
200
+ &:nth-child(4) {
201
+ margin-top: 10rpx;
202
+ }
203
+ &:nth-child(5) {
204
+ margin-top: 10rpx;
205
+ }
206
+ &:nth-child(6) {
207
+ margin-top: 10rpx;
208
+ }
209
+ }
210
+ }
211
+ }
212
+
213
+ .bottom {
214
+ display: flex;
215
+ justify-content: flex-end;
216
+ align-content: center;
217
+ align-items: center;
218
+ width: 100%;
219
+ height: 40rpx;
220
+ margin-top: 20rpx;
221
+
222
+ & .price {
223
+ flex-shrink: 0;
224
+ .skeleton-item(100rpx, 35rpx);
225
+ }
226
+
227
+ & .orgPrice {
228
+ flex-shrink: 0;
229
+ margin-left: 20rpx;
230
+ .skeleton-item(100rpx, 20rpx);
231
+ }
232
+
233
+ & .cart {
234
+ flex: 1;
235
+ display: flex;
236
+ justify-content: flex-end;
237
+ align-items: center;
238
+ & > view {
239
+ .skeleton-item(40rpx, 40rpx);
240
+ }
241
+ }
242
+ }
243
+ }
244
+
245
+ }
246
+ </style>
@@ -0,0 +1,81 @@
1
+ <template>
2
+ <view class="skeleton-wrap-item">
3
+ <view class="image skeleton-item" :style="{marginRight: outSpacing + 'rpx'}"></view>
4
+ <view class="content">
5
+ <view class="title">
6
+ <view class="title-left skeleton-item"></view>
7
+ <view class="title-right skeleton-item"></view>
8
+ </view>
9
+ <view class="address skeleton-item"></view>
10
+ <view class="phone skeleton-item"></view>
11
+ <view class="btn">
12
+ <view class="skeleton-item"></view>
13
+ </view>
14
+ </view>
15
+ </view>
16
+ </template>
17
+
18
+ <script>
19
+ export default {
20
+ name: "SkeletonShop",
21
+ props:{
22
+ outSpacing:{
23
+ type: Number|String,
24
+ default:20
25
+ }
26
+ }
27
+ }
28
+ </script>
29
+
30
+ <style scoped lang="less">
31
+ .skeleton-wrap-item {
32
+ height: 200rpx;
33
+ display: flex;
34
+ justify-content: space-between;
35
+ align-items: center;
36
+
37
+ & > .image {
38
+ .skeleton-item(200rpx, 200rpx);
39
+ flex-shrink: 0;
40
+ }
41
+
42
+ .content {
43
+ height: 100%;
44
+
45
+ .title {
46
+ display: flex;
47
+ justify-content: space-between;
48
+ align-items: center;
49
+ margin-bottom: 20rpx;
50
+
51
+ &-left {
52
+ flex: 1;
53
+ margin-right: 20rpx;
54
+ .skeleton-item(100%, 40rpx);
55
+ }
56
+ &-right {
57
+ flex-shrink: 0;
58
+ .skeleton-item(100rpx, 30rpx);
59
+ }
60
+ }
61
+
62
+ flex: 1;
63
+ .address {
64
+ margin-bottom: 10rpx;
65
+ .skeleton-item(100%, 30rpx);
66
+ }
67
+ .phone {
68
+ margin-bottom: 10rpx;
69
+ .skeleton-item(100%, 30rpx);
70
+ }
71
+ .btn {
72
+ display: flex;
73
+ justify-content: flex-end;
74
+
75
+ .skeleton-item {
76
+ .skeleton-item(100rpx, 50rpx)
77
+ }
78
+ }
79
+ }
80
+ }
81
+ </style>
@@ -0,0 +1,24 @@
1
+ 'use strict';
2
+
3
+ export default ($vm, str , keyword='', options={})=>{
4
+ if(keyword === '') return str;
5
+ try {
6
+ let __option = {
7
+ tag: 'text',
8
+ color: 'red',
9
+ weight: '500',
10
+ };
11
+ if ($vm.$xdUniHelper.checkVarType(keyword) === 'array') {
12
+ keyword = keyword.join('|');
13
+ } else if ($vm.$xdUniHelper.checkVarType(keyword) === 'string') {
14
+ keyword = keyword.trim();
15
+ }
16
+ let opt = Object.assign({}, __option, options);
17
+ let reg = new RegExp(`(${keyword})`, 'ig');
18
+ return str.replace(reg, `<${opt.tag} style="color:${opt.color};font-weight: ${opt.weight}">$1</${opt.tag}>`);
19
+ } catch (e) {
20
+ console.error(e)
21
+ return str;
22
+ }
23
+ }
24
+
@@ -0,0 +1,153 @@
1
+ 'use strict';
2
+ import { getContainerPropsValue } from "@/utils/xd.base";
3
+
4
+ export default {
5
+ data(){
6
+ return {
7
+ isShowExchange:'N',
8
+
9
+ contMargin:{},
10
+ contRradius:'10',
11
+ contShadow:'',
12
+ contBorder:'',
13
+ contBgColor:'',
14
+ contBorderWidth: 0,
15
+
16
+ imgRradius:'10',
17
+
18
+ productConfig:null,
19
+ }
20
+ },
21
+ created(){
22
+
23
+ },
24
+ methods:{
25
+
26
+ cusInit(container){
27
+ this.isShowExchange = getContainerPropsValue(container, 'content.isShowExchange', 'N');
28
+
29
+ //商品相关
30
+ let is_show_brand = getContainerPropsValue(container, 'content.is_show_brand', 'N');
31
+ let isPrice = getContainerPropsValue(container, 'content.isPrice', "Y");
32
+ let isShowTag = getContainerPropsValue(container, 'content.isShowTag', "Y");
33
+ let isShowDiscount = getContainerPropsValue(container, 'content.isShowDiscount', "Y");
34
+ let isAddCart = getContainerPropsValue(container, 'content.isAddCart', "Y");
35
+ let differ = getContainerPropsValue(container, 'content.differ', 1);
36
+ let showActivityPrice = getContainerPropsValue(container, 'content.showActivityPrice', 'N');
37
+ this.productConfig = {is_show_brand,isPrice,isShowTag,isShowDiscount,isAddCart,differ,showActivityPrice}
38
+
39
+ this.brandColor = getContainerPropsValue(container, 'content.brandColor', '#aaa');
40
+
41
+ //内容
42
+ this.contMargin = getContainerPropsValue(container, 'content.contMargin', {});
43
+ this.contRradius = getContainerPropsValue(container, 'content.contRradius', '10');
44
+ this.contShadow = this.getXdShadow({width:20, color:'rgba(0,0,0,0)'},getContainerPropsValue(container, 'content.contShadow', {}))
45
+ this.contBorder = this.getXdBorder({width:2,color:'rgba(0,0,0,0)'},getContainerPropsValue(container, 'content.contBorder', {}));
46
+ this.contBgColor = getContainerPropsValue(container, 'content.contBgColor', '#fff');
47
+ this.contObjBorder = getContainerPropsValue(container, 'content.contBorder', {});
48
+ if(this.contObjBorder && this.contObjBorder.type === 'Y') {
49
+ if(this.contObjBorder.value && this.contObjBorder.value.width) {
50
+ this.contBorderWidth = Number(this.contObjBorder.value.width);
51
+ }
52
+ else this.contBorderWidth = 2;
53
+ }
54
+
55
+ //图片
56
+ this.imgRradius = getContainerPropsValue(container, 'content.imgRradius', '10');
57
+
58
+ },
59
+
60
+
61
+ //通信相关================
62
+ handleParentVm(cb){
63
+ cb(this)
64
+ },
65
+
66
+ onJfbReachBottom(options) {
67
+ console.log('event.onJfbReachBottom', options)
68
+ this.$refs['customList']['onCusReachBottom'](options)
69
+
70
+ },
71
+
72
+ onCusReload() {
73
+ console.log('event.onCusReload', this.options)
74
+ this.$refs['customList']['onCusReloadList'](this.options)
75
+ },
76
+ //通信相关================
77
+
78
+ //cinema/film/shop/product
79
+
80
+ //影片列表事件
81
+ handleFilmDetail(film_id,film){
82
+ // console.warn(`toFilmInfo(影片详情).${film_id}`)
83
+ // if(!this.fimeDetailPath) {
84
+ // console.error('未配置链接');
85
+ // return;
86
+ // }
87
+ // if( this.isPreview) return;
88
+ // this.$xdUniHelper.navigateTo({
89
+ // url: this.fimeDetailPath + `?film_id=${film_id}`
90
+ // })
91
+ },
92
+ handleBuy(film_id,film){
93
+ // console.warn(`toBuyChooseCinema(选择影院).${film_id}`)
94
+ // if(!this.buyPath) {
95
+ // console.error('未配置链接');
96
+ // return;
97
+ // }
98
+ // if( this.isPreview) return;
99
+ // this.$xdUniHelper.navigateTo({
100
+ // url: this.buyPath + `?film_id=${film_id}`
101
+ // })
102
+ },
103
+ //影片列表事件
104
+
105
+ //影院列表事件
106
+ handleSchedule(item, cinema){
107
+ // console.warn(`handleSchedule(选择排期).${item.cinema_id}`)
108
+ // if(!this.onlinePath) {
109
+ // console.error('未配置链接');
110
+ // return;
111
+ // }
112
+ // if( this.isPreview) return;
113
+ // this.$xdUniHelper.navigateTo({
114
+ // url: this.onlinePath + `?cinema_id=${item.cinema_id}`,
115
+ // });
116
+ },
117
+ handleCodeDetail(item, cinema){
118
+ // console.warn(`handleCodeDetail(选择电子码列表).${item.cinema_id}`)
119
+ // if(!this.codePath) {
120
+ // console.error('未配置链接');
121
+ // return;
122
+ // }
123
+ // if( this.isPreview) return;
124
+ // this.$xdUniHelper.navigateTo({
125
+ // url: this.codePath + `?cinema_id=${item.cinema_id}`,
126
+ // });
127
+ },
128
+ handleCashierDetail(item, cinema){
129
+ //todo
130
+ },
131
+ //影院列表事件
132
+
133
+ //门店列表事件
134
+ handleShopJhd(item, shop){
135
+ debugger
136
+ },
137
+ handleShopDetail(item, shop){
138
+ debugger
139
+ },
140
+ //门店列表事件
141
+
142
+ //商品链接事件
143
+ handleProductDetail(item, product){
144
+ let url = this.checkUrlIsValid(product.detail_redirect_data)
145
+ if(product.detail_redirect_data) {
146
+
147
+ }
148
+ debugger
149
+ }
150
+ //商品链接事件
151
+ },
152
+ }
153
+