jufubao-forms 1.0.0-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 (70) hide show
  1. package/README.md +27 -0
  2. package/commands.js +84 -0
  3. package/commands.update.change.js +176 -0
  4. package/file.config.js +16 -0
  5. package/get.package.path.js +22 -0
  6. package/get.package.path.js.tpl +22 -0
  7. package/package.json +119 -0
  8. package/src/CreateClientID.js +16 -0
  9. package/src/ICONS.js +1148 -0
  10. package/src/common/authorize.js +261 -0
  11. package/src/common/getBusinessImageUrl.js +39 -0
  12. package/src/common/getServiceUrl.js +38 -0
  13. package/src/common/paysdk/jweixin.js +98 -0
  14. package/src/components/CusCouponChose/CusCouponChose.vue +1024 -0
  15. package/src/components/CusCouponItem/CusCouponItem.vue +298 -0
  16. package/src/components/CusEnter/CusEnter.vue +333 -0
  17. package/src/components/CusPoster/CusPoster.vue +213 -0
  18. package/src/components/CusPoster/CusSwiperDot.vue +234 -0
  19. package/src/components/CusProduct/CusProduct.vue +362 -0
  20. package/src/components/CusSwiperDot/CusSwiperDot.vue +234 -0
  21. package/src/components/CusTab/CusTab.vue +411 -0
  22. package/src/components/CusVideo/CusVideo.vue +170 -0
  23. package/src/components/JfbFormsDynamicForm/Api.js +66 -0
  24. package/src/components/JfbFormsDynamicForm/Attr.js +35 -0
  25. package/src/components/JfbFormsDynamicForm/JfbFormsDynamicForm.vue +767 -0
  26. package/src/components/JfbFormsDynamicForm/JfbFormsDynamicFormLess.less +79 -0
  27. package/src/components/JfbFormsDynamicForm/JfbFormsDynamicFormMixin.js +30 -0
  28. package/src/components/JfbFormsDynamicForm/Mock.js +194 -0
  29. package/src/components/JfbFormsDynamicForm/XdFormDate.vue +71 -0
  30. package/src/components/JfbFormsDynamicForm/ld-select/ld-select.vue +329 -0
  31. package/src/components/JfbFormsDynamicForm/uni-datetime-picker/calendar-item.vue +177 -0
  32. package/src/components/JfbFormsDynamicForm/uni-datetime-picker/calendar.vue +930 -0
  33. package/src/components/JfbFormsDynamicForm/uni-datetime-picker/i18n/en.json +22 -0
  34. package/src/components/JfbFormsDynamicForm/uni-datetime-picker/i18n/index.js +8 -0
  35. package/src/components/JfbFormsDynamicForm/uni-datetime-picker/i18n/zh-Hans.json +22 -0
  36. package/src/components/JfbFormsDynamicForm/uni-datetime-picker/i18n/zh-Hant.json +22 -0
  37. package/src/components/JfbFormsDynamicForm/uni-datetime-picker/time-picker.vue +934 -0
  38. package/src/components/JfbFormsDynamicForm/uni-datetime-picker/uni-datetime-picker.vue +1042 -0
  39. package/src/components/JfbFormsDynamicForm/uni-datetime-picker/util.js +403 -0
  40. package/src/components/JfbFormsList/Api.js +20 -0
  41. package/src/components/JfbFormsList/Attr.js +70 -0
  42. package/src/components/JfbFormsList/JfbFormsList.vue +228 -0
  43. package/src/components/JfbFormsList/JfbFormsListLess.less +79 -0
  44. package/src/components/JfbFormsList/JfbFormsListMixin.js +30 -0
  45. package/src/components/JfbFormsList/Mock.js +38 -0
  46. package/src/components/JfbFormsQuestionAndAnswer/Api.js +43 -0
  47. package/src/components/JfbFormsQuestionAndAnswer/Attr.js +14 -0
  48. package/src/components/JfbFormsQuestionAndAnswer/JfbFormsQuestionAndAnswer.vue +506 -0
  49. package/src/components/JfbFormsQuestionAndAnswer/JfbFormsQuestionAndAnswerLess.less +79 -0
  50. package/src/components/JfbFormsQuestionAndAnswer/JfbFormsQuestionAndAnswerMixin.js +30 -0
  51. package/src/components/JfbFormsQuestionAndAnswer/Mock.js +144 -0
  52. package/src/components/SkeProduct/SkeProduct.vue +241 -0
  53. package/src/config.app.plus.js +6 -0
  54. package/src/config.h5.js +13 -0
  55. package/src/config.mp.weixin.js +13 -0
  56. package/src/config.project.js +15 -0
  57. package/src/mixins/cardListMixins.js +187 -0
  58. package/src/mixins/colorCardMixins.js +122 -0
  59. package/src/mixins/componentsMixins.js +900 -0
  60. package/src/mixins/extsMixins.js +3 -0
  61. package/src/mixins/locationMixins.js +119 -0
  62. package/src/mixins/newLocaltionMixins.js +754 -0
  63. package/src/mixins/openDebuggerMixins.js +74 -0
  64. package/src/mixins/pageEditx.js +347 -0
  65. package/src/mixins/pageEvent.js +311 -0
  66. package/src/mixins/pageMain.js +120 -0
  67. package/src/mixins/pageUitls.js +738 -0
  68. package/src/mixins/posterMixins.js +122 -0
  69. package/src/mixins/scrollListFixedHeigthMixins.js +174 -0
  70. package/src/mocks.js +4 -0
@@ -0,0 +1,298 @@
1
+ <template>
2
+ <view @click="toDetail" class="xd-coupon_item" :style="couponItemBoxStyle">
3
+ <view class="coupon_left" :style="{
4
+ background: couponLeftBgColor
5
+ }">
6
+ <view class="_point">
7
+ <xd-unit
8
+ :unitFontSize="24"
9
+ :fontSize="48"
10
+ :price="item.card_point"
11
+ :isOld="false"
12
+ :unit="item.unit || ''"
13
+ :colorNew="'#ffffff'"
14
+ ></xd-unit>
15
+ <!-- <text style="font-size: 24rpx;">{{ item.unit }}</text> -->
16
+ </view>
17
+ <view class="_rule">{{ item.show_name }}</view>
18
+ </view>
19
+ <view class="coupon_right" :style="couponRightItemBoxStyle">
20
+ <view class="cont_top" :style="{
21
+ background: couponTitleBgColor,
22
+ color: mainColor
23
+ }">{{ item.card_type_name }}</view>
24
+ <view class="cont_main">
25
+ <view class="cou_number">券号:{{ item.card_number }}</view>
26
+ <view class="cou_time">有效期:{{getTimeFormat(item.end_time) }}</view>
27
+ <view class="cou_point">
28
+ 余额:
29
+ <xd-unit
30
+ :unitFontSize="24"
31
+ :fontSize="28"
32
+ :price="item.card_point"
33
+ :isOld="false"
34
+ :unit="item.unit || ''"
35
+ :colorNew="'#333333'"
36
+ ></xd-unit>
37
+ </view>
38
+ <slot name="btn">
39
+ <view class="cou_btn"
40
+ :style="[
41
+ item.is_login === 'Y' ? couponBtnActiveStyle : couponBtnStyle,
42
+ {
43
+ padding: couponBtnPadding,
44
+ borderRadius: couponBtnRadius + 'rpx'
45
+ }
46
+ ]"
47
+ @click.stop="goToUseCoupon"
48
+ >{{item.is_login === 'Y' ? '已登录' : '去使用'}}</view>
49
+ </slot>
50
+ </view>
51
+ <view class="cont_bottom">
52
+ <view class="switch_rule" @click.stop="switchRule">
53
+ <view>使用规则</view>
54
+ <view>
55
+ <xd-font-icon v-if="!expand" icon="iconxia_down" size="24"></xd-font-icon>
56
+ <xd-font-icon v-else icon="iconshang_up" size="24"></xd-font-icon>
57
+ </view>
58
+ </view>
59
+ <view v-if="expand" class="expand_rule">
60
+ {{ item.card_use_rule }}
61
+ </view>
62
+ </view>
63
+ </view>
64
+ </view>
65
+ </template>
66
+ <script>
67
+ import getServiceUrl from '@/common/getServiceUrl'
68
+ import XdUnit from "@/components/XdUnit/XdUnit";
69
+ import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
70
+ export default{
71
+ name: "CusCouponItem",
72
+ components: {
73
+ XdFontIcon,
74
+ XdUnit
75
+ },
76
+ props: {
77
+ item:{
78
+ type: Object,
79
+ },
80
+ couponRadius: {
81
+ type: String | Number,
82
+ default: "16"
83
+ },
84
+ couponLeftBgColor: {
85
+ type: String,
86
+ default: 'linear-gradient(180deg, #FFA852 0%, #FF5733 100%)'
87
+ },
88
+ couponImageUrl: {
89
+ type: Object | String
90
+ },
91
+ couponTitleBgColor: {
92
+ type: String,
93
+ default: "rgba(255, 87, 51, 0.1)"
94
+ },
95
+ mainColor: {
96
+ type: String,
97
+ default: "#000"
98
+ },
99
+ couponUseBtnPadding: {
100
+ type: Object,
101
+ default(){
102
+ return {
103
+ top: 20,
104
+ right: 20,
105
+ bottom: 10,
106
+ left: 20
107
+ }
108
+ },
109
+ },
110
+ couponBtnRadius: {
111
+ type: String | Number,
112
+ default: "16"
113
+ },
114
+ couponBtnTextStyle: {
115
+ type: Object,
116
+ default(){
117
+ return {
118
+ color: '#fff',
119
+ bgColor: '#ff5722',
120
+ fontSize: '30rpx',
121
+ fontWeight: 'normal'
122
+ }
123
+ }
124
+ }
125
+ },
126
+ data() {
127
+ return {
128
+ expand: false,
129
+ }
130
+ },
131
+ computed: {
132
+ couponItemBoxStyle(){
133
+ return this.styleObjectToString({
134
+ borderRadius: this.couponRadius + 'rpx',
135
+ })
136
+ },
137
+ couponBtnPadding(){
138
+ let padding = `${this.checkValue(this.couponUseBtnPadding.top, 20)}rpx`;
139
+ padding = `${padding} ${this.checkValue(this.couponUseBtnPadding.right, 20)}rpx`;
140
+ padding = `${padding} ${this.checkValue(this.couponUseBtnPadding.bottom, 20)}rpx`;
141
+ padding = `${padding} ${this.checkValue(this.couponUseBtnPadding.left, 20)}rpx`;
142
+ return padding;
143
+ },
144
+ couponBtnStyle(){
145
+ let styleObj = {
146
+ color: this.couponBtnTextStyle['color'] || '#333',
147
+ background: this.couponBtnTextStyle['bgColor'] || '#fff',
148
+ fontSize: this.couponBtnTextStyle['fontSize'] || '30rpx',
149
+ fontWeight: this.couponBtnTextStyle['fontWeight'] || 'normal',
150
+ }
151
+ return this.styleObjectToString(styleObj)
152
+ },
153
+ couponBtnActiveStyle(){
154
+ return this.styleObjectToString({
155
+ color: this.couponBtnTextStyle['actColor'] || '#fff',
156
+ background: this.couponBtnTextStyle['actBgColor'] || '#ff5722',
157
+ fontSize: this.couponBtnTextStyle['actFontSize'] || '30rpx',
158
+ fontWeight: this.couponBtnTextStyle['actFontWeight'] || 'normal',
159
+ })
160
+ },
161
+ couponRightItemBoxStyle(){
162
+ let image = {};
163
+ if(this.cardImageUrl) image = {
164
+ backgroundImage: `url(${this.getCouponBgImage})`,
165
+ backgroundSize: '100%',
166
+ backgroundRepeat: 'no-repeat',
167
+ }
168
+ return this.styleObjectToString(image)
169
+ },
170
+ getCouponBgImage(){
171
+ let bg = '';
172
+ if(this.$xdUniHelper.checkVarType(this.couponImageUrl) === 'object'
173
+ || this.$xdUniHelper.checkVarType(this.couponImageUrl) === 'array'
174
+ ) {
175
+ if(!this.$xdUniHelper.isEmpty(this.couponImageUrl)) {
176
+ return getServiceUrl(this.couponImageUrl.url)
177
+ }
178
+ }
179
+ return bg
180
+ },
181
+ },
182
+ methods: {
183
+ switchRule(){
184
+ this.expand = !this.expand;
185
+ },
186
+ getTimeFormat(time) {
187
+ let date = null;
188
+ if (time == +time) {
189
+ if ((time + "").length <= 10) date = new Date(+time * 1000);
190
+ else date = new Date(+time);
191
+ return (
192
+ date.getFullYear() +
193
+ "-" +
194
+ (date.getMonth() + 1) +
195
+ "-" +
196
+ date.getDate()
197
+ );
198
+ }
199
+ return time;
200
+ },
201
+ toDetail(){
202
+ this.$emit('toDetail', this.item);
203
+ },
204
+ goToUseCoupon(){
205
+ this.$emit('useCoupon', this.item);
206
+ },
207
+ checkValue(value, dValue = 0){
208
+ if(value === undefined || value === '' || value === null) return dValue;
209
+ return Number(value || 0);
210
+ },
211
+ }
212
+ }
213
+
214
+ </script>
215
+ <style lang="less" scoped>
216
+ .xd-coupon_item{
217
+ display: flex;
218
+ margin: 20rpx 0;
219
+ border-radius: 16rpx;
220
+ background: #FFFFFF;
221
+ overflow: hidden;
222
+ border: 2rpx solid #eee;
223
+ .coupon_left{
224
+ color: #FFFFFF;
225
+ width: 170rpx;
226
+ flex-shrink: 0;
227
+ display: flex;
228
+ flex-direction: column;
229
+ align-items: center;
230
+ justify-content: center;
231
+
232
+ ._point{
233
+ font-size: 48rpx;
234
+ }
235
+ ._rule{
236
+ font-size: 24rpx;
237
+ }
238
+ }
239
+ .coupon_right{
240
+ flex: 1;
241
+ width: 0;
242
+ .cont_top{
243
+ background: rgba(255, 87, 51, 0.1);
244
+ padding: 8rpx 40rpx;
245
+ font-size: 24rpx;
246
+ overflow: hidden;
247
+ white-space: nowrap;
248
+ text-overflow: ellipsis;
249
+ }
250
+ .cont_main{
251
+ position: relative;
252
+ padding: 28rpx 20rpx 28rpx 40rpx;
253
+ color: #333333;
254
+ .cou_number{
255
+ font-size: 32rpx;
256
+ font-weight: bold;
257
+ }
258
+ .cou_time{
259
+ font-size: 28rpx;
260
+ margin: 16rpx 0;
261
+ }
262
+ .cou_point{
263
+ font-size: 28rpx;
264
+ display: flex;
265
+ align-items: center;
266
+ }
267
+ .cou_btn{
268
+ position: absolute;
269
+ padding: 10rpx 30rpx;
270
+ background-color: #ddd;
271
+ border-radius: 12rpx;
272
+ right: 20rpx;
273
+ bottom: 20rpx;
274
+ }
275
+ }
276
+ .cont_bottom{
277
+ background: #EEEEEE;
278
+ .switch_rule{
279
+ display: flex;
280
+ align-items: center;
281
+ justify-content: space-between;
282
+ padding: 12rpx 40rpx;
283
+ font-size: 24rpx;
284
+ color: #666666;
285
+ }
286
+ .expand_rule{
287
+ padding: 12rpx 40rpx;
288
+ font-size: 20rpx;
289
+ color: #333333;
290
+ overflow: hidden;
291
+ white-space: nowrap;
292
+ text-overflow: ellipsis;
293
+ background-color: #F5F5F5;
294
+ }
295
+ }
296
+ }
297
+ }
298
+ </style>
@@ -0,0 +1,333 @@
1
+ <template>
2
+ <view
3
+ class="list-poster"
4
+ v-if="enterList !== null && enterList.length > 0"
5
+ >
6
+ <!--静态显示-->
7
+ <view class="list-poster-one" v-if="0"></view>
8
+ <!--静态显示-->
9
+
10
+ <view class="list-poster-more" v-else>
11
+ <cus-swiper-dot
12
+ :style="[outStyleBoxComp]"
13
+ :current="current"
14
+ :info="enterListComp"
15
+ field="content_name"
16
+ :mode="mode"
17
+ :dots-styles="dotStyleData"
18
+ >
19
+ <swiper
20
+ class="swiper xd-swiper-content"
21
+ :style="[inStyleBoxComp]"
22
+ :indicator-dots="false"
23
+ :autoplay="time > 0"
24
+ :interval="time"
25
+ :duration="500"
26
+ :current="current"
27
+ circular
28
+ @animationfinish="handleAnimationFinish"
29
+ @change="handleChange"
30
+ >
31
+ <swiper-item
32
+ v-for="(item,index) in enterListComp"
33
+ :key="index"
34
+ class="swiper-list"
35
+ >
36
+ <view
37
+ v-for="(brand,idx) in item"
38
+ :key="brand.value"
39
+ :style="[itemStyleComp,{marginRight:(idx>0&&(idx+1)%column===0)?0:(columnSpacing + 'rpx')}]"
40
+ @click.stop="handlePosterClick(brand,index)"
41
+ >
42
+ <view :style="[itemImageComp]" class="list-image">
43
+ <image v-if="brand['error-status']===false" :style="{borderRadius:iconRadius+'rpx'}" :src="brand.brand_icon" :alt="brand.label"></image>
44
+ <image v-else :style="{borderRadius:iconRadius+'rpx'}" :src="iconErrorUrl" :alt="brand.label"></image>
45
+ </view>
46
+ <view class="list-title" :style="[titleStyle]">{{brand.label}}</view>
47
+ </view>
48
+ </swiper-item>
49
+ </swiper>
50
+ </cus-swiper-dot>
51
+ </view>
52
+ </view>
53
+ </template>
54
+
55
+ <script>
56
+
57
+ import CusSwiperDot from "@/components/CusSwiperDot/CusSwiperDot.vue";
58
+ import Color from "color";
59
+
60
+ export default {
61
+ name: "CusEnter",
62
+ components: {
63
+ CusSwiperDot
64
+ },
65
+ props:{
66
+ isPoster:{
67
+ type:Boolean,
68
+ default: false,
69
+ },
70
+ iconErrorUrl: {
71
+ type:String,
72
+ required: true,
73
+ },
74
+ outWidth: {
75
+ type: Number,
76
+ required: true
77
+ },
78
+ columnSpacing:{
79
+ type: Number,
80
+ default: 0
81
+ },
82
+ rowSpacing:{
83
+ type: Number,
84
+ default: 0
85
+ },
86
+ iconSize: {
87
+ type:Number,
88
+ default: 20,
89
+ },
90
+ iconRadius:{
91
+ type:Number,
92
+ default: 20,
93
+ },
94
+ column:{
95
+ type: Number,
96
+ default: 5
97
+ },
98
+ row:{
99
+ type: Number,
100
+ default: 2
101
+ },
102
+ time:{
103
+ type: Number,
104
+ default: 5
105
+ },
106
+ enterList:{
107
+ type: Array|null,
108
+ default: null
109
+ },
110
+ mode:{
111
+ type: String,
112
+ default:'round'
113
+ },
114
+ mainColor:{
115
+ type:String,
116
+ required: true
117
+ },
118
+ titleStyle:{
119
+ type:Object,
120
+ default(){
121
+ return {}
122
+ }
123
+ },
124
+ },
125
+
126
+ computed:{
127
+ dotStyleData(){
128
+ return this.dotStyleDataConf()[this.mode];
129
+ },
130
+ enterListComp(){
131
+ let temp = [];
132
+ let page_token = this.column * this.row;
133
+ let len = Math.ceil(this.enterList.length/page_token);
134
+ for(let i=0; i < len; i++) {
135
+ temp.push(this.$xdUniHelper.getLocalPaginationData(this.enterList, i+1,page_token));
136
+ }
137
+ return temp;
138
+ },
139
+ itemImageComp(){
140
+ return {
141
+ width: this.itemWidth + 'rpx',
142
+ height: this.itemWidth + 'rpx',
143
+ padding: this.iconSize+'rpx',
144
+ }
145
+ },
146
+ itemStyleComp(){
147
+ return {
148
+ width: this.itemImageComp.width,
149
+ }
150
+ },
151
+
152
+ outStyleBoxComp(){
153
+ return this.styleBox();
154
+ },
155
+
156
+ inStyleBoxComp(){
157
+ return this.styleBox('in');
158
+ },
159
+ itemWidth(){
160
+ return (this.outWidth - (this.column - 1) * this.columnSpacing)/this.column;
161
+ },
162
+ },
163
+
164
+ data(){
165
+ return {
166
+ current:0,
167
+ dotStyleDataConf(){
168
+ let alpha = 0.6;
169
+ let selectedColor = `rgba(${Color(this.mainColor).alpha(alpha).array().join(',')})`;
170
+ let textColor = `rgba(${Color(this.mainColor).alpha(0.2).array().join(',')})`;
171
+ return {
172
+ dot: {
173
+ backgroundColor: 'rgba(166,166,166,.5)',
174
+ border: '0px rgba(166,166,166,.5) solid',
175
+ color: '#fff',
176
+ selectedBackgroundColor: selectedColor,
177
+ selectedBorder: `0px this.mainColor solid`
178
+ },
179
+ default: {
180
+ width: 16,
181
+ backgroundColor: 'rgba(200,200,200,.45)',
182
+ border: '1px rgba(200,200,200,.45) solid',
183
+ color: '#fff',
184
+ selectedBackgroundColor: selectedColor,
185
+ selectedBorder: `1px this.mainColor solid`
186
+ },
187
+ round: {
188
+ backgroundColor: 'rgba(166,166,166,.5)',
189
+ border: '0px rgba(166,166,166,.5) solid',
190
+ color: '#fff',
191
+ selectedBackgroundColor: selectedColor,
192
+ selectedBorder: `0px this.mainColor solid`
193
+ },
194
+ nav: {
195
+ backgroundColor: selectedColor,
196
+ border: '1px rgba(0,0,0,.2) solid',
197
+ color: '#fff',
198
+ selectedBackgroundColor: selectedColor,
199
+ selectedBorder: '1px rgba(255, 255, 255 1) solid'
200
+ },
201
+ indexes: {
202
+ backgroundColor: textColor,
203
+ border: '0px rgba(0,0,0,.2) solid',
204
+ color: '#fff',
205
+ selectedBackgroundColor: selectedColor,
206
+ selectedBorder: '0px rgba(0,0,0,.8) solid',
207
+ selectedColor: '#fff',
208
+ }
209
+ }
210
+ },
211
+ }
212
+ },
213
+ methods:{
214
+
215
+ styleBox(out='out'){
216
+ let height = this.itemWidth * (this.row);
217
+ let text = 32 * this.row;
218
+ let columnSpacings = this.rowSpacing * (this.row -1);
219
+ let modeHeight = 46;
220
+ if(this.mode === "normal") modeHeight = 10;
221
+ if(out === 'in') modeHeight = 0;
222
+ return {
223
+ width: this.outWidth + 'rpx',
224
+ height: (height + columnSpacings + modeHeight + text) + 'rpx'
225
+ }
226
+ },
227
+
228
+ handlePosterClick(item,index){
229
+ if(!this.isPoster) {
230
+ this.$emit('on-detail', {item,index});
231
+ return;
232
+ }
233
+
234
+ if(!item.redirect_data) {
235
+ console.warn(`未配置链接地址: ${item.redirect_data}`);
236
+ console.error(`未配置链接地址: ${item.redirect_data}`);
237
+ return
238
+ }
239
+
240
+ //内部链接跳转地址
241
+ if (item.redirect_type === 'INN') {
242
+ try {
243
+ let url = JSON.parse(item.redirect_data);
244
+ let params = '';
245
+ if(url.page) {
246
+ if (item['redirect_params']) params = `?${item['redirect_params']}`;
247
+ this.$xdUniHelper.navigateTo({url: url.page + params})
248
+ }
249
+ else {
250
+ console.error(`应用链接配置错误: ${url.page}`)
251
+ }
252
+ } catch (e) {
253
+ console.error(`应用链接配置错误: ${item.redirect_data}`)
254
+ }
255
+ }
256
+
257
+ //外部链接
258
+ if (item.redirect_type === 'URL') {
259
+ let reg = /^(http:\/\/|https:\/\/|\/\/)+.+$/;
260
+ let spReg = /(-apiuri\/v)/;
261
+ //#ifdef MP-WEIXIN
262
+ try {
263
+ let url = JSON.parse(item.redirect_data);
264
+ if (reg.test(url.url) || spReg.test(url.url)) {
265
+ console.warn(`广告跳转外站: ${url.url}`)
266
+ this.$xdUniHelper.navigateTo(url);
267
+ } else {
268
+ console.error(`广告跳转外站配置错误: ${url.url}`)
269
+ }
270
+ } catch (e) {
271
+ console.error(`广告跳转外站配置错误: ${item.redirect_data}`)
272
+ }
273
+ //#endif
274
+ //#ifdef H5
275
+ try {
276
+ let url = JSON.parse(item.redirect_data);
277
+ console.warn(`广告跳转外站: ${url.url}`);
278
+ this.$xdUniHelper.redirectTo(url, false)
279
+ } catch (e) {
280
+ console.error(`广告跳转外站配置错误: ${item.redirect_data}`)
281
+ }
282
+ //#endif
283
+
284
+ }
285
+
286
+ //无跳转地址
287
+ if(item.redirect_type === 'EMP') {
288
+ console.warn(`无跳转地址`);
289
+ }
290
+ },
291
+
292
+ handleChange(e){
293
+ this.current = e.detail.current;
294
+ },
295
+
296
+ handleAnimationFinish(e){
297
+ },
298
+ }
299
+ }
300
+
301
+ </script>
302
+
303
+
304
+ <style scoped lang="less">
305
+ .swiper-list {
306
+ display: flex;
307
+ justify-content: flex-start;
308
+ align-items: flex-start;
309
+ flex-flow: wrap;
310
+ flex-shrink: 0;
311
+
312
+ .list-image {
313
+ display: flex;
314
+ justify-content: center;
315
+ align-items: center;
316
+ box-sizing: border-box;
317
+ }
318
+
319
+ .list-title {
320
+ text-align: center;
321
+ font-size: 24rpx;
322
+ color: #666;
323
+ line-height: 32rpx;
324
+ .uni-one-cut(32);
325
+ padding: 0 6rpx;
326
+ }
327
+
328
+ & image {
329
+ width:100%;
330
+ height: 100%;
331
+ }
332
+ }
333
+ </style>