jufubao-base 1.0.218-beta1 → 1.0.218-beta2

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.218-beta1",
3
+ "version": "1.0.218-beta2",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -311,6 +311,17 @@ export default {
311
311
  ],
312
312
  groupKey:'content',
313
313
  },
314
+ data.showQuickEntry==='Y'&&{
315
+ label: "快捷入口类型",
316
+ ele: "xd-radio",
317
+ valueKey: "quickEntryType",
318
+ value: data.quickEntryType || "service",
319
+ list: [
320
+ {label: "联系客服", value: "service"},
321
+ ],
322
+ notice:'<div style="color:red">客服功能仅在小程序下生效</div>',
323
+ groupKey:'content',
324
+ },
314
325
  data.showQuickEntry==='Y'&&{
315
326
  ele: 'title',
316
327
  label: '快捷入口功能样式设置',
@@ -83,9 +83,24 @@
83
83
  :style="[searchBtnStyle]"
84
84
  @click="doSearch"
85
85
  >{{searchBtnText || '搜索'}}</view>
86
- <view v-if="showQuickEntry==='Y'" :style="{backgroundColor:quickBackgroundColor}" class="quick">
86
+ <!-- 非预览情况下,H5隐藏客服功能 -->
87
+ <!--#ifdef H5-->
88
+ <view v-if="isPreview">
89
+ <view v-if="showQuickEntry==='Y'" @click="handleQuickEntry" :style="{backgroundColor:quickBackgroundColor}" class="quick">
90
+ <xd-font-icon size="32" :style="{color:quickTextColor||mainColor}" :icon="quickIcon"></xd-font-icon>
91
+ </view>
92
+ </view>
93
+ <view v-else>
94
+ <view v-if="showQuickEntry==='Y'&&quickEntryType!=='service'" @click="handleQuickEntry" :style="{backgroundColor:quickBackgroundColor}" class="quick">
95
+ <xd-font-icon size="32" :style="{color:quickTextColor||mainColor}" :icon="quickIcon"></xd-font-icon>
96
+ </view>
97
+ </view>
98
+ <!-- #endif -->
99
+ <!-- #ifdef MP-WEIXIN -->
100
+ <view v-if="showQuickEntry==='Y'" @click="handleQuickEntry" :style="{backgroundColor:quickBackgroundColor}" class="quick">
87
101
  <xd-font-icon size="32" :style="{color:quickTextColor||mainColor}" :icon="quickIcon"></xd-font-icon>
88
102
  </view>
103
+ <!-- #endif -->
89
104
  </view>
90
105
  </view>
91
106
  </view>
@@ -144,6 +159,7 @@
144
159
  quickTextColor: "",
145
160
  quickIcon: "",
146
161
  showQuickEntry: '',
162
+ quickEntryType: "",
147
163
 
148
164
  //基础
149
165
  textColor: '',
@@ -242,6 +258,8 @@
242
258
  this.quickTextColor = getContainerPropsValue(container, 'content.quickTextColor', "");
243
259
  this.quickIcon = getContainerPropsValue(container, 'content.quickIcon', "iconkefu");
244
260
  this.showQuickEntry = getContainerPropsValue(container, 'content.showQuickEntry', "N");
261
+ this.quickEntryType = getContainerPropsValue(container, 'content.quickEntryType', "");
262
+ this.quickEntryPath = getContainerPropsValue(container, 'content.quickEntryPath', {value:""}).value;
245
263
 
246
264
  let name , logo, platform_logo;
247
265
  if (this.projectAttr['site_name']) name = this.projectAttr['site_name'];
@@ -297,6 +315,25 @@
297
315
  },true)
298
316
  },
299
317
 
318
+ handleQuickEntry() {
319
+ // #ifdef H5
320
+ this.$xdUniHelper.navigateTo({
321
+ url: this.quickEntryPath
322
+ })
323
+ // #endif
324
+ // #ifdef MP-WEIXIN
325
+ if(this.quickEntryType!=='service') {
326
+ this.$xdUniHelper.navigateTo({
327
+ url: this.quickEntryPath
328
+ })
329
+ } else {
330
+ var button = document.createElement("button");
331
+ button.setAttribute("open-type", "contact");
332
+ button.onclick();
333
+ }
334
+ // #endif
335
+ },
336
+
300
337
  onJfbBack(options) {
301
338
  if(getCurrentPages().length === 1 ) {
302
339
  this.$xdUniHelper.redirectTo({
@@ -6,51 +6,15 @@
6
6
  */
7
7
  module.exports = [
8
8
  {
9
- //设置方法名字当别忘记加上【模块名字】:Notice
10
- mapFnName: 'getNoticeByIdFilmSquate',
11
- title: '获取电影广场列表',
12
- path: '/api/account/film/list-film-square',
9
+ mapFnName: 'getListNoticeDialogContent', //自定义方法名字(必选)
10
+ title: '获取内容',
11
+ path: '/cms/v1/news-content',
13
12
  isRule: false,
14
13
  params: {
15
- last_key: ['当前页', 'Number', '必选'],
16
- page_size: ['每页数量', 'Number', '必选'],
17
- },
18
- isConsole: true,
19
- disabled: true,
20
- },
21
- {
22
- //设置方法名字当别忘记加上【模块名字】:Notice
23
- mapFnName: 'updateNoticeFilmPaiqiDate',
24
- title: '更新排期',
25
- path: '/api/account/film/paiqi-date',
26
- isRule: false,
27
- params: {
28
- film_id: ['电影id', 'Number', '必选'],
29
- cinema_id: ['影院id', 'Number', '必选'],
30
- },
31
- isConsole: true,
32
- disabled: true,
33
- },
34
- {
35
- //设置方法名字当别忘记加上【模块名字】:Notice
36
- mapFnName: 'removeNoticeFilmAddress',
37
- title: '删除我的配送地址',
38
- path: '/api/account/film/paiqi-date',
39
- isRule: false,
40
- params: {
41
- film_id: ['电影id', 'Number', '必选'],
42
- },
43
- isConsole: true,
44
- disabled: true,
45
- },
46
- {
47
- //设置方法名字当别忘记加上【模块名字】:Notice
48
- mapFnName: 'addNoticeFilmcart',
49
- title: '添加购物车',
50
- path: '/api/account/film/paiqi-date',
51
- isRule: false,
52
- params: {
53
- film_id: ['电影id', 'Number', '必选'],
14
+ scene: ['使用场景', 'String', '选填'],
15
+ container_id: ['插件ID', 'String', '必填'],
16
+ page_id: ['页面ID', 'String', '必填'],
17
+ page_size: ['记录条数', 'Number', '必填', '1'],
54
18
  },
55
19
  isConsole: true,
56
20
  disabled: true,
@@ -8,39 +8,281 @@ export default {
8
8
  content: (data) => {
9
9
  return [
10
10
  {
11
- label: '背景颜色:',
12
- ele: 'xd-color',
13
- valueKey: 'bgColor',
14
- value: data.bgColor || '',
15
- placeholder: '请输入占位框背景颜色',
11
+ label: '弹框内容设置:',
12
+ ele: 'xd-site-poster',
13
+ valueKey: 'background',
16
14
  groupKey:'content',
17
- },
18
- {
19
- label: '选中路径:',
20
- groupKey:'advanced',
21
- className: 'input100',
22
- ele: 'xd-select-pages-path',
23
- valueKey: 'select-pages-path',
24
- value: data['select-pages-path'] || null,
15
+ className: 'input80',
16
+ value: data.background || {size:{"width":"730", "height":"730"}},
25
17
  setting: {
26
- router: XdBus.getParentApi('getPagesTree')
18
+ count: 1,
19
+ scene: { label: '背景', value: 'normal'},
20
+ width: 730,
21
+ height: 730,
22
+ typeDisabled: true,
23
+ },
24
+ handleCustom({action, data}) {
25
+ //设置场景参数
26
+ if(data) {
27
+ data.params = Object.assign({}, {scene: 'normal'}, data.params || {})
28
+ }
29
+
30
+ //获取显示内容
31
+ if (action === 'screenList') {
32
+ XdBus.getParentApi('getOptionsSettingList')({setting_id: 'editx_base_ad_split_screen'})
33
+ .then(res => {
34
+ data.cb(res['list'])
35
+ })
36
+ .catch(error => {
37
+ console.error(error);
38
+ });
39
+ return
40
+ }
41
+
42
+ //获取返回参数(广告位高度必选项)
43
+ if (action === 'getPosterInfo') {
44
+ XdBus.getParentApi('cmsGetPublishEditxContent')(data.params)
45
+ .then(res => {
46
+ data.cb({list: res.list, selectId: res.selected})
47
+ })
48
+ .catch(error => {
49
+ console.error(error);
50
+ });
51
+ return
52
+ }
53
+
54
+ //使用内容分类
55
+ if (action === 'cmsPublishEditxContent') {
56
+ XdBus.getParentApi('cmsPublishEditxContent')(data.params)
57
+ .then(res => {
58
+ data.cb(res)
59
+ })
60
+ .catch(error => {
61
+ console.error(error);
62
+ });
63
+ return
64
+ }
65
+
66
+ let loading = XdBus.getParentApi('loading')({});
67
+ //位置列表
68
+ if (action === 'getListPostion') {
69
+ XdBus.getParentApi('getListPosterPosition')(data.params)
70
+ .then(res => {
71
+ loading.close();
72
+ data.cb(res)
73
+ })
74
+ .catch(error => {
75
+ loading.close();
76
+ console.error(error);
77
+ });
78
+ }
79
+
80
+ //位置创建
81
+ if (action === 'addPostion') {
82
+ XdBus.getParentApi('addPosterPosition')(data.params)
83
+ .then(res => {
84
+ loading.close();
85
+ data.cb(true)
86
+ })
87
+ .catch(error => {
88
+ console.error(error);
89
+ loading.close();
90
+ data.cb(false)
91
+ });
92
+ }
93
+
94
+ //位置编辑
95
+ if (action === 'editPostion') {
96
+ XdBus.getParentApi('updatePosterPosition')(data.params)
97
+ .then(res => {
98
+ loading.close();
99
+ data.cb(true)
100
+ })
101
+ .catch(error => {
102
+ console.error(error);
103
+ loading.close();
104
+ data.cb(false)
105
+ });
106
+ }
107
+
108
+ //位置删除
109
+ if (action === 'deleltePostion') {
110
+ XdBus.getParentApi('deletePosterPosition')(data.params)
111
+ .then(res => {
112
+ loading.close();
113
+ data.cb(true)
114
+ })
115
+ .catch(error => {
116
+ console.error(error);
117
+ loading.close();
118
+ data.cb(false)
119
+ });
120
+ }
121
+
122
+ //获取广告位内容列表
123
+ if (action === 'getListContent') {
124
+ XdBus.getParentApi('getListPosterContent')(data.params)
125
+ .then(res => {
126
+ loading.close();
127
+ data.cb(res)
128
+ })
129
+ .catch(error => {
130
+ loading.close();
131
+ console.error(error);
132
+ });
133
+ }
134
+
135
+ //广告内容创建
136
+ if (action === 'addContent') {
137
+ XdBus.getParentApi('addPosterContent')(data.params)
138
+ .then(res => {
139
+ loading.close();
140
+ data.cb(true)
141
+ })
142
+ .catch(error => {
143
+ console.error(error);
144
+ loading.close();
145
+ data.cb(false)
146
+ });
147
+ }
148
+
149
+ //广告内容编辑
150
+ if (action === 'editContent') {
151
+ XdBus.getParentApi('updatePosterContent')(data.params)
152
+ .then(res => {
153
+ loading.close();
154
+ data.cb(true)
155
+ })
156
+ .catch(error => {
157
+ console.error(error);
158
+ loading.close();
159
+ data.cb(false)
160
+ });
161
+ }
162
+
163
+ //广告内容删除
164
+ if (action === 'deleteContent') {
165
+ XdBus.getParentApi('deletePosterContent')(data.params)
166
+ .then(res => {
167
+ loading.close();
168
+ data.cb(true)
169
+ })
170
+ .catch(error => {
171
+ console.error(error);
172
+ loading.close();
173
+ data.cb(false)
174
+ });
175
+ }
176
+
177
+ //获取广告内容跳转地址类型
178
+ if (action === 'jumpPosterContentType') {
179
+ XdBus.getParentApi('getOptionsSettingList')({setting_id: "cms_setting"})
180
+ .then(res => {
181
+ loading.close();
182
+ data.cb(res['redirect_type'])
183
+ })
184
+ .catch(error => {
185
+ loading.close();
186
+ console.error(error);
187
+ });
188
+ }
189
+
190
+ //发布
191
+ if (action === 'publish') {
192
+ console.log('publish', data.params)
193
+ XdBus.getParentApi('cmsPublishContent')(data.params)
194
+ .then(res => {
195
+ loading.close();
196
+ data.cb(res)
197
+ })
198
+ .catch(error => {
199
+ loading.close();
200
+ console.error(error);
201
+ });
202
+ }
203
+
204
+ //获取站内页面地址
205
+ if (action === 'router') {
206
+ loading.close()
207
+ return XdBus.getParentApi('getPagesTree');
208
+
209
+ }
210
+
211
+ //通知页面进行刷新
212
+ if(action === 'update') {
213
+ XdBus.getParentApi('getXdBusUpdateView')('onUpdateView', {});
214
+ loading.close()
215
+ }
27
216
  },
217
+ inline: false,
218
+ notice: '设置背景图片时候,建议上传图片尺寸大小为:<span style="color:red">750 * 1500</span>像素',
28
219
  },
29
- data.bgColor && {
30
- label: '高度:',
220
+ {
221
+ label: '使用数量:',
31
222
  ele: 'el-input',
32
- groupKey:'style',
33
223
  type: 'number',
34
- valueKey: 'height',
35
- value: data.height || 100,
36
- placeholder: '请输入占位框高度,单位像素,默认:10px',
224
+ valueKey: 'number',
225
+ groupKey:'content',
226
+ value: data.number || 1,
227
+ placeholder: '请输入使用数量',
228
+ className: 'input40',
229
+ unit: '张',
230
+ rules: [
231
+ {
232
+ required: true,
233
+ message: '请输入使用数量',
234
+ trigger: 'blur'
235
+ },
236
+ ]
237
+ },
238
+ {
239
+ label: '弹框提示方式:',
240
+ ele: 'xd-radio',
241
+ valueKey: 'type',
242
+ groupKey:'content',
243
+ value: data['type'] || 'pop',
244
+ placeholder: '请选择弹框提示方式',
37
245
  className: 'input60',
246
+ list: [
247
+ { label: '弹框', value: 'pop' },
248
+ ]
38
249
  },
39
250
  {
40
- label: '', //label
41
- groupKey:'advanced',
42
- ele: 'slot', //package 名称
43
- slot: 'is_reference',
251
+ label: '是否隐藏弹框(仅预览模式生效):',
252
+ ele: 'xd-radio',
253
+ valueKey: 'is_hide_dailog',
254
+ groupKey:'content',
255
+ value: data['is_hide_dailog'] || 'N',
256
+ placeholder: '请选择是否隐藏弹框',
257
+ className: 'input60',
258
+ list: [
259
+ { label: '是', value: 'Y' },
260
+ { label: '否', value: 'N' },
261
+ ]
262
+ },
263
+ {
264
+ label: '关闭按钮位置:',
265
+ ele: 'xd-radio',
266
+ valueKey: 'close_position',
267
+ groupKey:'content',
268
+ value: data['close_position'] || 'right',
269
+ placeholder: '请选择关闭按钮位置',
270
+ className: 'input60',
271
+ list: [
272
+ { label: '右上角', value: 'right' },
273
+ { label: '下居中', value: 'bottom' },
274
+ ]
275
+ },
276
+ {
277
+ label: '弹窗间隔:',
278
+ ele: 'el-input',
279
+ type: 'text',
280
+ groupKey:'content',
281
+ valueKey: 'time',
282
+ value: data.time || '',
283
+ className: 'input80',
284
+ inline: false,
285
+ notice: '弹窗间隔,单位:小时。默认值:<span style="color: red">3</span>小时',
44
286
  },
45
287
  ].filter(i=>i)
46
288
  },
@@ -2,110 +2,283 @@
2
2
  <view
3
3
  class="jfb-base-notice-dialog"
4
4
  @click="handleEditxSelect"
5
- :class="{ editx : isEditx && active }"
5
+ :class="{ editx: isEditx && active }"
6
6
  >
7
7
  <!--#ifdef H5-->
8
8
  <view
9
9
  class="jfb-base-notice-dialog__edit"
10
- :class="{ editx : isEditx && active }"
10
+ :class="{ editx: isEditx && active }"
11
11
  v-if="isEditx && active"
12
12
  >
13
- <view class="jfb-base-notice-dialog__edit-icon" @click="delEdit">删除</view>
13
+ <view class="jfb-base-notice-dialog__edit-icon" @click="delEdit"
14
+ >删除</view
15
+ >
14
16
  </view>
15
17
  <!-- #endif -->
16
18
  <view class="jfb-base-notice-dialog__body">
17
- <view>测试插件( {{containerId}} )</view>
19
+ <view v-if="isShow && contentList && contentList.length" class="jfb-base-notice-dialog__body_dialog">
20
+ <view
21
+ class="jfb-base-notice-dialog__body_dialog_mask"
22
+ @click.stop="handleMaskHide"
23
+ ></view>
24
+ <view class="jfb-base-notice-dialog__body_dialog_content">
25
+ <xd-font-icon
26
+ @click.stop="handleClose"
27
+ v-if="close_position === 'right'"
28
+ class="close-top"
29
+ icon="iconguanbi_xian"
30
+ color="#fff"
31
+ size="64"
32
+ ></xd-font-icon>
33
+ <image
34
+ @click="handleToLink"
35
+ mode="widthFix"
36
+ :src="currentImage"
37
+ ></image>
38
+ <xd-font-icon
39
+ @click.stop="handleClose"
40
+ v-if="close_position === 'bottom'"
41
+ class="close-bottom"
42
+ icon="iconguanbi_xian"
43
+ color="#fff"
44
+ size="64"
45
+ ></xd-font-icon>
46
+ </view>
47
+ </view>
48
+ <view
49
+ :style="{ background: backgroundColor, color: warningColor }"
50
+ class="jfb-base-notice-dialog__body-pop"
51
+ v-if="isPreview"
52
+ >弹框方便编辑(占位),在线上此模块不显</view
53
+ >
18
54
  </view>
19
55
  </view>
20
56
  </template>
21
57
 
22
58
  <script>
23
- import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
24
- import { jfbRootExec } from "@/utils/xd.event";
25
- import JfbBaseNoticeDialogMixin from "./JfbBaseNoticeDialogMixin";
26
- import { getContainerPropsValue } from "@/utils/xd.base";
27
- import componentsMixins from "@/mixins/componentsMixins";
28
- import extsMixins from "@/mixins/extsMixins";
29
- export default {
30
- name: "JfbBaseNoticeDialog",
31
- components: {
32
- XdFontIcon
33
- },
34
- mixins: [
35
- componentsMixins, extsMixins, JfbBaseNoticeDialogMixin
36
- ],
37
- data() {
38
- return {
39
-
40
- //todo
41
- }
59
+ import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
60
+ import { jfbRootExec } from "@/utils/xd.event";
61
+ import JfbBaseNoticeDialogMixin from "./JfbBaseNoticeDialogMixin";
62
+ import { getContainerPropsValue } from "@/utils/xd.base";
63
+ import componentsMixins from "@/mixins/componentsMixins";
64
+ import extsMixins from "@/mixins/extsMixins";
65
+ import getServiceUrl from "@/common/getServiceUrl";
66
+ import storage from "@/common/storage";
67
+ const Color = require("color");
68
+ export default {
69
+ name: "JfbBaseNoticeDialog",
70
+ components: {
71
+ XdFontIcon,
72
+ },
73
+ mixins: [componentsMixins, extsMixins, JfbBaseNoticeDialogMixin],
74
+ data() {
75
+ return {
76
+ isShow: true,
77
+ backgroundColor: "",
78
+ isPreview: false, //是否预览
79
+ is_hide_dailog: "N",
80
+ time: 3, //小时
81
+ close_position: "",
82
+ type: "",
83
+ currentImage: "",
84
+ currentLinkUrl: "",
85
+ currentIndex: 0,
86
+ contentList: [],
87
+ number: ''
88
+ };
89
+ },
90
+ watch: {
91
+ container(value, oldValue) {
92
+ if (JSON.stringify(value) === JSON.stringify(oldValue)) return;
93
+ if (this.$configProject["isPreview"]) this.init(value);
42
94
  },
43
- watch: {
44
- container(value, oldValue) {
45
- if (JSON.stringify(value) === JSON.stringify(oldValue)) return;
46
- if (this.$configProject['isPreview']) this.init(value)
47
- },
95
+ is_hide_dailog(value) {
96
+ if (value === "N") {
97
+ storage.remove(this.containerId);
98
+ }
99
+ this.onJfbLoad();
48
100
  },
49
- created() {
50
- this.init(this.container);
101
+ },
102
+ created() {
103
+ this.isPreview = this.$configProject.isPreview;
104
+ this.backgroundColor = Color(this.warningColor).alpha(0.2).toString();
105
+ this.init(this.container);
51
106
 
52
- //todo
107
+ //todo
108
+ },
109
+ methods: {
110
+ onJfbLoad(options) {
111
+ //预览模式
112
+ if (this.isPreview) {
113
+ if (this.is_hide_dailog === "N") {
114
+ this.getContent();
115
+ } else {
116
+ this.isShow = false;
117
+ }
118
+ return;
119
+ } else {
120
+ if (!storage.get(this.containerId)) this.getContent();
121
+ }
53
122
  },
54
- methods: {
55
- onJfbLoad(options) {
56
-
57
- // jfbRootExec('baiduUserLogin', {
58
-
59
- // vm: this,// data: {
60
-
61
- // account: 'gaoshiyong',// password: '123456789',// type: 3,// ...options
62
-
63
- // }
123
+ getContent() {
124
+ jfbRootExec("getListNoticeDialogContent", {
125
+ vm: this,
126
+ data: {
127
+ page_id: this.pageAttr["page_id"], //页面ID
128
+ container_id: this.containerId, //组件ID
129
+ page_size: this.number, //数量
130
+ },
131
+ })
132
+ .then((res) => {
133
+ console.log(res.list, "res.list");
64
134
 
65
- // }).then().catch()
66
- },
67
- /**
68
- * @description 监听事件变化
69
- * @param container {object} 业务组件对象自己
70
- */
71
- init(container) {
72
-
73
- //this.bgcolor = getContainerPropsValue(container, 'content.bgcolor', '#fff');
74
-
75
- //this.height = getContainerPropsValue(container, 'content.height', 10);
76
- },
77
- onJfbScroll(options) {
78
- console.log('event.onJfbScroll', options)
79
- },
80
- onJfbReachBottom(options) {
81
- console.log('event.onJfbReachBottom', options)
82
- },
83
- onJfbShow(options) {
84
- console.log('event.onJfbShow', options)
85
- },
86
- onJfbHide(options) {
87
- console.log('event.onJfbHide', options)
88
- },
89
- onJfbBack(options) {
90
- console.log('event.onJfbBack', options)
91
- },
92
- onJfbUpdate(...data) {
93
- console.log('event.onJfbUpdate', data)
94
- },
95
- onJfbCustomEvent(options) {
96
- console.log('event.onJfbReachBottom', options)
97
- },
98
- }
99
- }
135
+ //弹窗显示
136
+ if (res.list.length > 0) {
137
+ this.contentList = res.list.map((item) => {
138
+ return JSON.parse(item.content);
139
+ });
140
+ this.currentImage = getServiceUrl(
141
+ this.contentList[0].image_url,
142
+ "size3"
143
+ );
144
+ this.currentLinkUrl = this.getLinkUrl(
145
+ this.contentList[0].redirect_data
146
+ );
147
+ this.currentIndex = 0;
100
148
 
149
+ this.handlePop();
150
+ }
151
+ })
152
+ .catch((error) => {
153
+ console.error(error);
154
+ });
155
+ },
156
+ getLinkUrl(data) {
157
+ data = JSON.parse(data);
158
+ return `${data.page}?${data.redirect_params}`;
159
+ },
160
+ /**
161
+ * @description 监听事件变化
162
+ * @param container {object} 业务组件对象自己
163
+ */
164
+ init(container) {
165
+ this.time = Number(getContainerPropsValue(container, "content.time", 3));
166
+ this.is_hide_dailog = getContainerPropsValue(
167
+ container,
168
+ "content.is_hide_dailog",
169
+ "N"
170
+ );
171
+ this.close_position = getContainerPropsValue(
172
+ container,
173
+ "content.close_position",
174
+ "right"
175
+ );
176
+ this.type = getContainerPropsValue(container, "content.type", "pop");
177
+ this.number = getContainerPropsValue(container, "content.number", 1);
178
+ },
179
+ handlePop() {
180
+ console.warn(`this.time${this.time * 60 + "分钟"}`);
181
+ storage.set(this.containerId, 1, this.time);
182
+ this.isShow = true;
183
+ },
184
+ handleMaskHide() {
185
+ if (this.isPreview) return;
186
+ this.isShow = false;
187
+ },
188
+ handleClose() {
189
+ //切换下一张,没有下一张,关闭
190
+ if (this.currentIndex === this.contentList.length - 1) {
191
+ this.isShow = false;
192
+ return;
193
+ }
194
+ this.currentIndex = this.currentIndex + 1;
195
+ this.currentLinkUrl = this.getLinkUrl(
196
+ this.contentList[this.currentIndex].redirect_data
197
+ );
198
+ this.currentImage = getServiceUrl(
199
+ this.contentList[this.currentIndex].image_url,
200
+ "size3"
201
+ );
202
+ },
203
+ handleToLink() {
204
+ if (this.isPreview) return;
205
+ this.$xdUniHelper.navigateTo({
206
+ url: this.currentLinkUrl,
207
+ });
208
+ },
209
+ onJfbScroll(options) {
210
+ console.log("event.onJfbScroll", options);
211
+ },
212
+ onJfbReachBottom(options) {
213
+ console.log("event.onJfbReachBottom", options);
214
+ },
215
+ onJfbShow(options) {
216
+ console.log("event.onJfbShow", options);
217
+ },
218
+ onJfbHide(options) {
219
+ console.log("event.onJfbHide", options);
220
+ },
221
+ onJfbBack(options) {
222
+ console.log("event.onJfbBack", options);
223
+ },
224
+ onJfbUpdate(...data) {
225
+ console.log("event.onJfbUpdate", data);
226
+ },
227
+ onJfbCustomEvent(options) {
228
+ console.log("event.onJfbReachBottom", options);
229
+ },
230
+ },
231
+ };
101
232
  </script>
102
233
 
103
234
  <style scoped lang="less">
104
- @import "./JfbBaseNoticeDialogLess.less";
105
-
106
- .jfb-base-notice-dialog {
107
- &__body{
235
+ @import "./JfbBaseNoticeDialogLess.less";
108
236
 
237
+ .jfb-base-notice-dialog {
238
+ &__body {
239
+ &-pop {
240
+ min-height: 100rpx;
241
+ text-align: center;
242
+ vertical-align: middle;
243
+ color: #666;
244
+ font-size: unit(24, rpx);
245
+ line-height: 100rpx;
246
+ }
247
+ &_dialog {
248
+ position: fixed;
249
+ top: 0;
250
+ left: 0;
251
+ bottom: 0;
252
+ right: 0;
253
+ z-index: 3000;
254
+ &_mask {
255
+ position: absolute;
256
+ top: 0;
257
+ bottom: 0;
258
+ left: 0;
259
+ right: 0;
260
+ background: rgba(0, 0, 0, 0.6);
261
+ }
262
+ &_content {
263
+ position: absolute;
264
+ top: 50%;
265
+ left: 50%;
266
+ transform: translate(-50%, -50%);
267
+ display: flex;
268
+ flex-direction: column;
269
+ & > image {
270
+ width: 730rpx;
271
+ }
272
+ .close-top {
273
+ position: relative;
274
+ right: -40%;
275
+ margin-bottom: 20rpx;
276
+ }
277
+ .close-bottom {
278
+ margin-top: 68rpx;
279
+ }
280
+ }
109
281
  }
110
282
  }
283
+ }
111
284
  </style>
@@ -2,12 +2,4 @@
2
2
 
3
3
  module.exports = {
4
4
 
5
- getNoticeByIdFilmSquate:{},
6
-
7
- updateNoticeFilmPaiqiDate:{},
8
-
9
- removeNoticeFilmAddress:{},
10
-
11
- addNoticeFilmcart:{},
12
-
13
5
  }