jufubao-base 1.0.169-beta2 → 1.0.169-beta21

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 (42) 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/JfbBaseLogin/JfbBaseLogin.vue +3 -1
  5. package/src/components/JfbBaseMapSearch/MapSearchMp.vue +1 -1
  6. package/src/components/JfbBaseNotice/JfbBaseNotice.vue +2 -2
  7. package/src/components/JfbBaseOrderDetail/Api.js +12 -7
  8. package/src/components/JfbBaseOrderDetail/Attr.js +28 -14
  9. package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +68 -18
  10. package/src/components/JfbBaseOrderDetail/Mock.js +3 -1
  11. package/src/components/JfbBaseTfkCardBind/Api.js +49 -30
  12. package/src/components/JfbBaseTfkCardBind/Attr.js +139 -15
  13. package/src/components/JfbBaseTfkCardBind/JfbBaseTfkCardBind.vue +234 -20
  14. package/src/components/JfbBaseTfkCardBind/Mock.js +19 -9
  15. package/src/components/JfbBaseTfkCardDetail/Api.js +11 -0
  16. package/src/components/JfbBaseTfkCardDetail/Attr.js +158 -7
  17. package/src/components/JfbBaseTfkCardDetail/JfbBaseTfkCardDetail.vue +159 -17
  18. package/src/components/JfbBaseTfkCardLogin/Attr.js +490 -4
  19. package/src/components/JfbBaseTfkCardLogin/JfbBaseTfkCardLogin.vue +394 -107
  20. package/src/components/JfbBaseTfkCardLogin/Mock.js +6 -536
  21. package/src/components/JfbBaseTfkCardLogin/XdCouponItem.vue +75 -19
  22. package/src/components/JfbBaseTfkCardLogin/XdNotice.vue +550 -0
  23. package/src/components/JfbBaseTfkSearch/AllList.vue +337 -0
  24. package/src/components/JfbBaseTfkSearch/Api.js +11 -42
  25. package/src/components/JfbBaseTfkSearch/Attr.js +344 -32
  26. package/src/components/JfbBaseTfkSearch/ContentCinema.vue +157 -0
  27. package/src/components/JfbBaseTfkSearch/ContentFilm.vue +218 -0
  28. package/src/components/JfbBaseTfkSearch/ContentProduct.vue +317 -0
  29. package/src/components/JfbBaseTfkSearch/ContentShop.vue +186 -0
  30. package/src/components/JfbBaseTfkSearch/CusAttr.js +213 -0
  31. package/src/components/JfbBaseTfkSearch/CustomList.vue +453 -0
  32. package/src/components/JfbBaseTfkSearch/JfbBaseTfkSearch.vue +286 -35
  33. package/src/components/JfbBaseTfkSearch/Mock.js +242 -11
  34. package/src/components/JfbBaseTfkSearch/SkeletonCinema.vue +45 -0
  35. package/src/components/JfbBaseTfkSearch/SkeletonFilm.vue +109 -0
  36. package/src/components/JfbBaseTfkSearch/SkeletonProduct.vue +246 -0
  37. package/src/components/JfbBaseTfkSearch/SkeletonShop.vue +81 -0
  38. package/src/components/JfbBaseTfkSearch/handleKeyword.js +24 -0
  39. package/src/components/JfbBaseTfkSearch/listMixins.js +187 -0
  40. package/src/mixins/colorCardMixins.js +71 -9
  41. package/src/mixins/componentsMixins.js +376 -23
  42. package/src/mixins/posterMixins.js +122 -0
@@ -0,0 +1,109 @@
1
+ <template>
2
+ <view class="skeleton-wrap-item">
3
+ <view class="skeleton-wrap-item-image skeleton-item" :style="{marginRight:outSpacing + 'rpx'}"></view>
4
+ <view class="skeleton-wrap-item-title">
5
+ <view class="title skeleton-item"></view>
6
+ <view class="type skeleton-item"></view>
7
+ <view class="director skeleton-item"></view>
8
+ <view class="star skeleton-item"></view>
9
+ </view>
10
+ <view class="skeleton-wrap-item-btn skeleton-item" :style="{marginLeft:outSpacing + 'rpx'}">
11
+ <view class="score skeleton-item"></view>
12
+ <view class="btn skeleton-item"></view>
13
+ </view>
14
+ </view>
15
+ </template>
16
+
17
+ <script>
18
+ export default {
19
+ name: "SkeletonFilm",
20
+ props:{
21
+ outSpacing:{
22
+ type: Number|String,
23
+ default:20
24
+ }
25
+ }
26
+ }
27
+ </script>
28
+
29
+
30
+
31
+ <style scoped lang="less">
32
+ .skeleton-wrap-item {
33
+ height: 240rpx;
34
+ display: flex;
35
+ justify-content: space-between;
36
+ align-items: center;
37
+
38
+ //影片列表骨架
39
+ &-image {
40
+ .skeleton-item(160rpx, 240rpx);
41
+ flex-shrink: 0;
42
+ margin-right: 20rpx;
43
+ }
44
+
45
+ &-title {
46
+ flex: 1;
47
+
48
+ .title {
49
+ .skeleton-item(100%, 50rpx);
50
+ margin-bottom: 20rpx;
51
+ }
52
+
53
+ .director,.star,.type {
54
+ .skeleton-item(100%, 40rpx);
55
+ margin-bottom: 10rpx;
56
+ }
57
+ }
58
+
59
+ &-btn {
60
+ display: flex;
61
+ align-content: space-between;
62
+ align-items: flex-end;
63
+ justify-content: flex-end;
64
+ flex-flow: wrap;
65
+ height: 100%;
66
+ box-sizing: border-box;
67
+ padding: 10rpx 0;
68
+ width: 130rpx;
69
+ flex-shrink: 0;
70
+
71
+ & > .score {
72
+ .skeleton-item(100rpx, 40rpx);
73
+ }
74
+ & > .btn {
75
+ .skeleton-item(130rpx, 60rpx);
76
+ }
77
+ }
78
+
79
+ &:last-child {
80
+ margin-bottom: 0!important;
81
+ }
82
+
83
+ //影院列表骨架
84
+ &.list {
85
+ display: block;
86
+ }
87
+ & > .title {
88
+ .skeleton-item(100%, 60rpx);
89
+ margin-bottom: 20rpx;
90
+ }
91
+ & > .address {
92
+ .skeleton-item(100%, 40rpx);
93
+ margin-bottom: 20rpx;
94
+ }
95
+ & > .bottom {
96
+ display: flex;
97
+ justify-content: space-between;
98
+ align-items: center;
99
+ padding-top: 30rpx;
100
+
101
+ & > .local {
102
+ .skeleton-item(120rpx, 30rpx);
103
+ }
104
+ & > .btn {
105
+ .skeleton-item(150rpx, 70rpx);
106
+ }
107
+ }
108
+ }
109
+ </style>
@@ -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,187 @@
1
+ 'use strict';
2
+ import { getContainerPropsValue } from "@/utils/xd.base";
3
+
4
+ export default {
5
+ data(){
6
+ return {
7
+ listItemStyle:null,
8
+ productConfig:null,
9
+ }
10
+ },
11
+ created(){
12
+
13
+ },
14
+ methods:{
15
+
16
+ cusInit(container){
17
+
18
+ //商品相关
19
+ let is_show_brand = getContainerPropsValue(container, 'content.is_show_brand', 'N');
20
+ let isPrice = getContainerPropsValue(container, 'content.isPrice', "Y");
21
+ let isShowTag = getContainerPropsValue(container, 'content.isShowTag', "Y");
22
+ let isShowDiscount = getContainerPropsValue(container, 'content.isShowDiscount', "Y");
23
+ let isAddCart = getContainerPropsValue(container, 'content.isAddCart', "Y");
24
+ let differ = getContainerPropsValue(container, 'content.differ', 1);
25
+ let showActivityPrice = getContainerPropsValue(container, 'content.showActivityPrice', 'N');
26
+ let isShowExchange = getContainerPropsValue(container, 'content.isShowExchange', 'N');
27
+ this.productConfig = {is_show_brand, isPrice, isShowTag, isShowDiscount, isAddCart, differ, showActivityPrice, isShowExchange};
28
+
29
+ //内容
30
+ let brandColor = getContainerPropsValue(container, 'content.brandColor', '#aaa');
31
+ let imgRradius = getContainerPropsValue(container, 'content.imgRradius', '10');
32
+ let contMargin = getContainerPropsValue(container, 'content.contMargin', {});
33
+ let contRradius = getContainerPropsValue(container, 'content.contRradius', '10');
34
+ let contShadow = this.getXdShadow({width:20, color:'rgba(0,0,0,0)'},getContainerPropsValue(container, 'content.contShadow', {}))
35
+ let contBorder = this.getXdBorder({width:2,color:'rgba(0,0,0,0)'},getContainerPropsValue(container, 'content.contBorder', {}));
36
+ let contBgColor = getContainerPropsValue(container, 'content.contBgColor', '#fff');
37
+ let contObjBorder = getContainerPropsValue(container, 'content.contBorder', {});
38
+ let contBorderWidth = 0
39
+ if(contObjBorder && contObjBorder.type === 'Y') {
40
+ if(contObjBorder.value && contObjBorder.value.width) {
41
+ contBorderWidth = Number(contObjBorder.value.width);
42
+ }
43
+ else contBorderWidth = 2;
44
+ }
45
+ this.listItemStyle = {
46
+ outSpacing: this.outSpacing,
47
+ mainColor: this.mainColor,
48
+ subMainColor: this.subMainColor,
49
+ successColor: this.successColor,
50
+ brandColor,imgRradius,contMargin,contRradius,contShadow,contBorder,contBgColor,contObjBorder,contBorderWidth}
51
+ },
52
+
53
+ filtersResData(res){
54
+ let list = res.list.filter(item=>{
55
+ return item.items.length > 0
56
+ });
57
+ if(res.list.length === list.length) return res;
58
+ let tabs = list.map(item=>{
59
+ return {
60
+ label: item.name,
61
+ value: item.tab
62
+ }
63
+ });
64
+ return {...res, list, tabs}
65
+ },
66
+
67
+
68
+ //通信相关================
69
+ handleParentVm(cb){
70
+ cb(this.emitParent.options.getParent)
71
+ },
72
+
73
+ onJfbReachBottom(options) {
74
+ if(this.tabId !== "all") {
75
+ this.$refs['customList']['onCusReachBottom'](options)
76
+ }
77
+ },
78
+
79
+ onCusReload() {
80
+ this.$refs['customList']['onCusReloadList'](this.options)
81
+ },
82
+ //通信相关================
83
+
84
+ //cinema/film/shop/product
85
+
86
+ //影片列表事件
87
+ handleFilmDetail(item,film){
88
+ console.warn(`handleFilmDetail(影片详情).${item.film_id}`)
89
+ this.checkUrlError(item, film,(url)=>{
90
+ url = url + `?film_id=${item.film_id}`;
91
+ console.warn(`handleFilmDetail.url:${url}`)
92
+ this.toLink(url)
93
+ },'detail1_redirect_data');
94
+ },
95
+ handleBuy(item,film){
96
+ console.warn(`handleBuy(购买详情).${item.film_id}`)
97
+ this.checkUrlError(item, film,(url)=>{
98
+ url = url + `?film_id=${item.film_id}`;
99
+ console.warn(`handleBuy.url:${url}`)
100
+ this.toLink(url)
101
+ });
102
+ },
103
+ //影片列表事件
104
+
105
+ //影院列表事件
106
+ handleSchedule(item, cinema){
107
+ console.warn(`handleSchedule(去排期页面).${item.cinema_id}`);
108
+ this.checkUrlError(item, cinema,(url)=>{
109
+ url = url + `?cinema_id=${item.cinema_id}`;
110
+ console.warn(`handleSchedule.url:${url}`)
111
+ this.toLink(url)
112
+ });
113
+ },
114
+ handleCodeDetail(item, cinema){
115
+ console.warn(`handleCodeDetail(电子列表).${item.cinema_id}`);
116
+ this.checkUrlError(item, cinema,(url)=>{
117
+ url = url + `?cinema_id=${item.cinema_id}`;
118
+ console.warn(`handleSchedule.url:${url}`)
119
+ this.toLink(url)
120
+ },'detail1_redirect_data');
121
+ },
122
+ handleCashierDetail(item, cinema){
123
+ //todo
124
+ },
125
+ //影院列表事件
126
+
127
+ //门店列表事件
128
+ handleShopJhd(item, shop){
129
+ console.warn(`handleShopJhd(去核销).${item.resource_shop_name}`)
130
+ this.checkUrlError(item, shop,(url)=>{
131
+ let params = {
132
+ 'x-params':Base64.encodeURI(`shop_id:${item.shop_id}`),
133
+ 'x-jfb-os':'jhd',
134
+ }
135
+ params = this.$xdUniHelper.jsonToParams(params);
136
+ url = url + `?${params}`;
137
+ console.warn(`handleShopJhd.url:${url}`)
138
+ this.toLink(url)
139
+ },'detail1_redirect_data');
140
+ },
141
+ handleShopDetail(item, shop){
142
+ console.warn(`handleShopDetail(店铺详情).${item.resource_shop_name}`)
143
+ this.checkUrlError(item, shop,(url)=>{
144
+ url = url + `?resource_shop_id=${item.resource_shop_id}`;
145
+ if(item['exts_params']) {
146
+ url = url + `&exts_params=${item['exts_params']}`
147
+ }
148
+ console.warn(`handleShopDetail.url:${url}`)
149
+ this.toLink(url)
150
+ });
151
+ },
152
+ //门店列表事件
153
+
154
+ //商品链接事件
155
+ handleProductDetail(item, product){
156
+ console.warn(`handleProductDetail(商品详情).${item.product_id}`)
157
+ this.checkUrlError(item, product,(url)=>{
158
+ url = url + `?product_id=${item.product_id}`;
159
+ console.warn(`handleProductDetail.url:${url}`)
160
+ this.toLink(url)
161
+ });
162
+ },
163
+ //商品链接事件
164
+
165
+ //检查错误跳转
166
+ checkUrlError(item, config, cb , key='detail_redirect_data'){
167
+ if(!config[key]) {
168
+ console.error('未配置链接');
169
+ return false;
170
+ }
171
+ if( this.isPreview) return false;
172
+ let url = this.checkUrlIsValid(config[key]);
173
+ if(url === null) {
174
+ console.error('配置链接格式错误');
175
+ console.warn(`配置链接:${config[key]}`);
176
+ return false;
177
+ }
178
+ cb(url)
179
+ },
180
+
181
+ //跳转页面
182
+ toLink(url) {
183
+ this.$xdUniHelper.navigateTo({url});
184
+ }
185
+ },
186
+ }
187
+