jufubao-base 1.0.238 → 1.0.239-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.
Files changed (128) hide show
  1. package/package.json +1 -1
  2. package/src/components/JfbBaseBalance/Api.js +46 -0
  3. package/src/components/JfbBaseBalance/Attr.js +316 -0
  4. package/src/components/JfbBaseBalance/JfbBaseBalance.vue +334 -0
  5. package/src/components/JfbBaseBalance/JfbBaseBalanceLess.less +79 -0
  6. package/src/components/JfbBaseBalance/JfbBaseBalanceMixin.js +30 -0
  7. package/src/components/JfbBaseBalance/Mock.js +9 -0
  8. package/src/components/JfbBaseCodeOpenVip/Api.js +35 -0
  9. package/src/components/JfbBaseCodeOpenVip/Attr.js +281 -0
  10. package/src/components/JfbBaseCodeOpenVip/JfbBaseCodeOpenVip.vue +251 -0
  11. package/src/components/JfbBaseCodeOpenVip/JfbBaseCodeOpenVipLess.less +79 -0
  12. package/src/components/JfbBaseCodeOpenVip/JfbBaseCodeOpenVipMixin.js +30 -0
  13. package/src/components/JfbBaseCodeOpenVip/Mock.js +13 -0
  14. package/src/components/JfbBaseConsumpCode/Api.js +133 -0
  15. package/src/components/JfbBaseConsumpCode/Attr.js +61 -0
  16. package/src/components/JfbBaseConsumpCode/JfbBaseConsumpCode.vue +1048 -0
  17. package/src/components/JfbBaseConsumpCode/JfbBaseConsumpCodeLess.less +79 -0
  18. package/src/components/JfbBaseConsumpCode/JfbBaseConsumpCodeMixin.js +30 -0
  19. package/src/components/JfbBaseConsumpCode/Mock.js +22 -0
  20. package/src/components/JfbBaseFastLink/Attr.js +12 -1
  21. package/src/components/JfbBaseFastLink/JfbBaseFastLink.vue +66 -0
  22. package/src/components/JfbBaseHeader/Attr.js +82 -0
  23. package/src/components/JfbBaseHeader/JfbBaseHeader.vue +47 -1
  24. package/src/components/JfbBaseHeaderColumn/Attr.js +82 -0
  25. package/src/components/JfbBaseHeaderColumn/JfbBaseHeaderColumn.vue +48 -2
  26. package/src/components/JfbBaseLogin/JfbBaseLogin.vue +11 -0
  27. package/src/components/JfbBaseNoticeDialog/Api.js +1 -1
  28. package/src/components/JfbBaseNoticeDialog/Attr.js +26 -0
  29. package/src/components/JfbBaseNoticeDialog/JfbBaseNoticeDialog.vue +28 -9
  30. package/src/components/JfbBaseNoticeGroup/Api.js +23 -0
  31. package/src/components/JfbBaseNoticeGroup/Attr.js +237 -0
  32. package/src/components/JfbBaseNoticeGroup/JfbBaseNoticeGroup.vue +174 -0
  33. package/src/components/JfbBaseNoticeGroup/JfbBaseNoticeGroupLess.less +79 -0
  34. package/src/components/JfbBaseNoticeGroup/JfbBaseNoticeGroupMixin.js +30 -0
  35. package/src/components/JfbBaseNoticeGroup/Mock.js +13 -0
  36. package/src/components/JfbBaseOpenVip/Api.js +39 -0
  37. package/src/components/JfbBaseOpenVip/Attr.js +331 -0
  38. package/src/components/JfbBaseOpenVip/JfbBaseOpenVip.vue +457 -0
  39. package/src/components/JfbBaseOpenVip/JfbBaseOpenVipLess.less +79 -0
  40. package/src/components/JfbBaseOpenVip/JfbBaseOpenVipMixin.js +30 -0
  41. package/src/components/JfbBaseOpenVip/Mock.js +7 -0
  42. package/src/components/JfbBaseOpenVip/XdVipList.vue +131 -0
  43. package/src/components/JfbBaseOpenVipCard/Api.js +58 -0
  44. package/src/components/JfbBaseOpenVipCard/Attr.js +48 -0
  45. package/src/components/JfbBaseOpenVipCard/JfbBaseOpenVipCard.vue +111 -0
  46. package/src/components/JfbBaseOpenVipCard/JfbBaseOpenVipCardLess.less +79 -0
  47. package/src/components/JfbBaseOpenVipCard/JfbBaseOpenVipCardMixin.js +30 -0
  48. package/src/components/JfbBaseOpenVipCard/Mock.js +13 -0
  49. package/src/components/JfbBaseOpenVipDetail/Api.js +35 -0
  50. package/src/components/JfbBaseOpenVipDetail/Attr.js +37 -0
  51. package/src/components/JfbBaseOpenVipDetail/JfbBaseOpenVipDetail.vue +234 -0
  52. package/src/components/JfbBaseOpenVipDetail/JfbBaseOpenVipDetailLess.less +79 -0
  53. package/src/components/JfbBaseOpenVipDetail/JfbBaseOpenVipDetailMixin.js +30 -0
  54. package/src/components/JfbBaseOpenVipDetail/Mock.js +15 -0
  55. package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +174 -18
  56. package/src/components/JfbBasePay/Attr.js +52 -0
  57. package/src/components/JfbBasePay/JfbBasePay.vue +30 -6
  58. package/src/components/JfbBasePay/Mock.js +0 -9
  59. package/src/components/JfbBasePersonalData/Api.js +26 -0
  60. package/src/components/JfbBasePersonalData/Attr.js +13 -0
  61. package/src/components/JfbBasePersonalData/JfbBasePersonalData.vue +200 -0
  62. package/src/components/JfbBasePersonalData/JfbBasePersonalDataLess.less +79 -0
  63. package/src/components/JfbBasePersonalData/JfbBasePersonalDataMixin.js +30 -0
  64. package/src/components/JfbBasePersonalData/Mock.js +13 -0
  65. package/src/components/JfbBasePhoneLogin/JfbBasePhoneLogin.vue +11 -1
  66. package/src/components/JfbBasePointsCard/Api.js +18 -0
  67. package/src/components/JfbBasePointsCard/Attr.js +187 -0
  68. package/src/components/JfbBasePointsCard/JfbBasePointsCard.vue +212 -0
  69. package/src/components/JfbBasePointsCard/JfbBasePointsCardLess.less +79 -0
  70. package/src/components/JfbBasePointsCard/JfbBasePointsCardMixin.js +30 -0
  71. package/src/components/JfbBasePointsCard/Mock.js +5 -0
  72. package/src/components/JfbBasePointsDetail/Api.js +48 -0
  73. package/src/components/JfbBasePointsDetail/Attr.js +305 -0
  74. package/src/components/JfbBasePointsDetail/JfbBasePointsDetail.vue +267 -0
  75. package/src/components/JfbBasePointsDetail/JfbBasePointsDetailLess.less +79 -0
  76. package/src/components/JfbBasePointsDetail/JfbBasePointsDetailMixin.js +30 -0
  77. package/src/components/JfbBasePointsDetail/Mock.js +6 -0
  78. package/src/components/JfbBasePoster/Attr.js +1 -1
  79. package/src/components/JfbBasePosterBigSmall/JfbBasePosterBigSmall.vue +2 -2
  80. package/src/components/JfbBasePosterGroup/Api.js +22 -0
  81. package/src/components/JfbBasePosterGroup/Attr.js +156 -0
  82. package/src/components/JfbBasePosterGroup/JfbBasePosterGroup.vue +268 -0
  83. package/src/components/JfbBasePosterGroup/JfbBasePosterGroupLess.less +79 -0
  84. package/src/components/JfbBasePosterGroup/JfbBasePosterGroupMixin.js +30 -0
  85. package/src/components/JfbBasePosterGroup/Mock.js +13 -0
  86. package/src/components/JfbBaseSavingDetail/Api.js +41 -0
  87. package/src/components/JfbBaseSavingDetail/Attr.js +70 -0
  88. package/src/components/JfbBaseSavingDetail/JfbBaseSavingDetail.vue +710 -0
  89. package/src/components/JfbBaseSavingDetail/JfbBaseSavingDetailLess.less +79 -0
  90. package/src/components/JfbBaseSavingDetail/JfbBaseSavingDetailMixin.js +30 -0
  91. package/src/components/JfbBaseSavingDetail/Mock.js +10 -0
  92. package/src/components/JfbBaseSavingDetail/components/echarts.min.js +26 -0
  93. package/src/components/JfbBaseSavingDetail/components/echarts.vue +254 -0
  94. package/src/components/JfbBaseSavingDetail/components/wx-canvas.js +105 -0
  95. package/src/components/JfbBaseShare/Api.js +20 -0
  96. package/src/components/JfbBaseShare/Attr.js +59 -0
  97. package/src/components/JfbBaseShare/JfbBaseShare.vue +276 -0
  98. package/src/components/JfbBaseShare/JfbBaseShareLess.less +79 -0
  99. package/src/components/JfbBaseShare/JfbBaseShareMixin.js +30 -0
  100. package/src/components/JfbBaseShare/Mock.js +16 -0
  101. package/src/components/JfbBaseSuccess/JfbBaseSuccess.vue +7 -2
  102. package/src/components/JfbBaseTfkSearch/ContentProduct.vue +12 -22
  103. package/src/components/JfbBaseTfkSearch/JfbBaseTfkSearch.vue +12 -1
  104. package/src/components/JfbBaseTfkSearch/Mock.js +51 -3
  105. package/src/components/JfbBaseTfkSearch/listMixins.js +2 -1
  106. package/src/components/JfbBaseUserInfo/Attr.js +175 -11
  107. package/src/components/JfbBaseUserInfo/JfbBaseUserInfo.vue +337 -115
  108. package/src/components/JfbBaseUserOrder/Attr.js +16 -0
  109. package/src/components/JfbBaseUserOrder/JfbBaseUserOrder.vue +11 -2
  110. package/src/components/JfbBaseWithDrawAgain/Api.js +41 -0
  111. package/src/components/JfbBaseWithDrawAgain/Attr.js +92 -0
  112. package/src/components/JfbBaseWithDrawAgain/JfbBaseWithDrawAgain.vue +354 -0
  113. package/src/components/JfbBaseWithDrawAgain/JfbBaseWithDrawAgainLess.less +79 -0
  114. package/src/components/JfbBaseWithDrawAgain/JfbBaseWithDrawAgainMixin.js +30 -0
  115. package/src/components/JfbBaseWithDrawAgain/Mock.js +10 -0
  116. package/src/components/JfbBaseWithDrawRecord/Api.js +19 -0
  117. package/src/components/JfbBaseWithDrawRecord/Attr.js +79 -0
  118. package/src/components/JfbBaseWithDrawRecord/JfbBaseWithDrawRecord.vue +233 -0
  119. package/src/components/JfbBaseWithDrawRecord/JfbBaseWithDrawRecordLess.less +79 -0
  120. package/src/components/JfbBaseWithDrawRecord/JfbBaseWithDrawRecordMixin.js +30 -0
  121. package/src/components/JfbBaseWithDrawRecord/Mock.js +7 -0
  122. package/src/components/JfbBaseWithdraw/Api.js +48 -0
  123. package/src/components/JfbBaseWithdraw/Attr.js +328 -0
  124. package/src/components/JfbBaseWithdraw/JfbBaseWithdraw.vue +272 -0
  125. package/src/components/JfbBaseWithdraw/JfbBaseWithdrawLess.less +79 -0
  126. package/src/components/JfbBaseWithdraw/JfbBaseWithdrawMixin.js +30 -0
  127. package/src/components/JfbBaseWithdraw/Mock.js +7 -0
  128. package/src/components/JfbBaseWxAuthorize/JfbBaseWxAuthorize.vue +10 -0
@@ -438,6 +438,7 @@ export default {
438
438
  showLogo: "Y", //是否显示logo
439
439
  customLogoUrl: {}, //自定义logo地址
440
440
  loginMenuMargin: {},
441
+ share_code: "",
441
442
  };
442
443
  },
443
444
  computed: {
@@ -604,6 +605,14 @@ export default {
604
605
  },
605
606
 
606
607
  onJfbLoad(options) {
608
+ if(options['x-common']){
609
+ let decodeParams = Base64.decode(options['x-common']);
610
+ try{
611
+ let commonParams = JSON.parse(decodeParams);
612
+ this.share_code = commonParams.share_code;
613
+ }catch(e){}
614
+ }
615
+
607
616
  this.$xdLog.setProject('JfbBaseLogin', 'JfbBaseLogin.onJfbLoad.start')
608
617
  this.redirect_url = options.redirect_url ? Base64.decode(options.redirect_url): '';
609
618
  this.isDebugPreview = options['x-test'] === 'jfb-tiyan';
@@ -979,6 +988,7 @@ export default {
979
988
  data: {
980
989
  raw_data,
981
990
  provider_id,
991
+ share_code: this.share_code,
982
992
  },
983
993
  })
984
994
  .then(() => {
@@ -1031,6 +1041,7 @@ export default {
1031
1041
  provider_id: this.phoneLogin.provider_id,
1032
1042
  phone_number,
1033
1043
  verification_code,
1044
+ share_code: this.share_code,
1034
1045
  },
1035
1046
  })
1036
1047
  .then((res) => {
@@ -8,7 +8,7 @@ module.exports = [
8
8
  {
9
9
  mapFnName: 'getListNoticeDialogContent', //自定义方法名字(必选)
10
10
  title: '获取内容',
11
- path: '/cms/v1/news-content',
11
+ path: '/cms/v1/ad-content',
12
12
  isRule: false,
13
13
  params: {
14
14
  scene: ['使用场景', 'String', '选填'],
@@ -247,6 +247,32 @@ export default {
247
247
  { label: '弹框', value: 'pop' },
248
248
  ]
249
249
  },
250
+ {
251
+ label: '展示位置:',
252
+ ele: 'xd-radio',
253
+ valueKey: 'systemType',
254
+ groupKey:'content',
255
+ value: data['systemType'] || 'fuli',
256
+ placeholder: '请选择展示位置',
257
+ className: 'input60',
258
+ list: [
259
+ { label: '福利系统', value: 'fuli' },
260
+ { label: 'plus系统', value: 'plus' },
261
+ ]
262
+ },
263
+ data['systemType']==='plus'&&{
264
+ label: '展示方式:',
265
+ ele: 'xd-radio',
266
+ valueKey: 'showGroup',
267
+ groupKey:'content',
268
+ value: data['showGroup'] || 'all',
269
+ placeholder: '请选择展示方式',
270
+ className: 'input60',
271
+ list: [
272
+ { label: '全部用户', value: 'all' },
273
+ { label: '仅会员', value: 'vip' },
274
+ ]
275
+ },
250
276
  {
251
277
  label: '是否隐藏弹框(仅预览模式生效):',
252
278
  ele: 'xd-radio',
@@ -73,7 +73,7 @@ export default {
73
73
  mixins: [componentsMixins, extsMixins, JfbBaseNoticeDialogMixin],
74
74
  data() {
75
75
  return {
76
- isShow: true,
76
+ isShow: false,
77
77
  backgroundColor: "",
78
78
  isPreview: false, //是否预览
79
79
  is_hide_dailog: "N",
@@ -84,7 +84,9 @@ export default {
84
84
  currentLinkUrl: "",
85
85
  currentIndex: 0,
86
86
  contentList: [],
87
- number: ''
87
+ number: '',
88
+ systemType: '',
89
+ showGroup: ''
88
90
  };
89
91
  },
90
92
  watch: {
@@ -134,19 +136,26 @@ export default {
134
136
 
135
137
  //弹窗显示
136
138
  if (res.list.length > 0) {
137
- this.contentList = res.list.map((item) => {
138
- return JSON.parse(item.content);
139
- });
139
+ this.contentList = res.list
140
140
  this.currentImage = getServiceUrl(
141
141
  this.contentList[0].image_url,
142
- "size3"
142
+ "size8"
143
143
  );
144
144
  this.currentLinkUrl = this.getLinkUrl(
145
145
  this.contentList[0].redirect_data
146
146
  );
147
147
  this.currentIndex = 0;
148
-
149
- this.handlePop();
148
+ if(this.systemType === 'fuli'){
149
+ this.handlePop();
150
+ } else {
151
+ if(this.showGroup==='all') {
152
+ this.handlePop();
153
+ }else {
154
+ if(this.getTokenForKey('user_level')&&this.getTokenForKey('user_level')==='VIP') {
155
+ this.handlePop();
156
+ }
157
+ }
158
+ }
150
159
  }
151
160
  })
152
161
  .catch((error) => {
@@ -175,6 +184,16 @@ export default {
175
184
  );
176
185
  this.type = getContainerPropsValue(container, "content.type", "pop");
177
186
  this.number = getContainerPropsValue(container, "content.number", 1);
187
+ this.systemType = getContainerPropsValue(
188
+ container,
189
+ "content.systemType",
190
+ "fuli"
191
+ );
192
+ this.showGroup = getContainerPropsValue(
193
+ container,
194
+ "content.showGroup",
195
+ "all"
196
+ );
178
197
  },
179
198
  handlePop() {
180
199
  console.warn(`this.time${this.time * 60 + "分钟"}`);
@@ -197,7 +216,7 @@ export default {
197
216
  );
198
217
  this.currentImage = getServiceUrl(
199
218
  this.contentList[this.currentIndex].image_url,
200
- "size3"
219
+ "size8"
201
220
  );
202
221
  },
203
222
  handleToLink() {
@@ -0,0 +1,23 @@
1
+ 'use strict';
2
+ /**
3
+ * @description 接口配置,
4
+ * 在设置方法名字当时候,别忘记加上【模块名字】:Notice
5
+ * @type {*[]}
6
+ */
7
+ module.exports = [
8
+ {
9
+ mapFnName: 'getNoticeNewsContent', //自定义方法名字(必选)
10
+ title: '获取内容',
11
+ path: '/cms/v1/news-content',
12
+ isRule: false,
13
+ params: {
14
+ scene: ['使用场景', 'String', '选填'],
15
+ container_id: ['插件ID', 'String', '必填'],
16
+ page_id: ['页面ID', 'String', '必填'],
17
+ page_size: ['记录条数', 'Number', '必填', 1],
18
+ code: ['业务线id', 'String', '选填'],
19
+ },
20
+ isConsole: true,
21
+ disabled: true,
22
+ },
23
+ ];
@@ -0,0 +1,237 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * @description 当表单组件中有联动操作时候,使用方法进行返回
5
+ */
6
+ export default {
7
+ style: [],
8
+ content: (data) => {
9
+ return [
10
+ {
11
+ label: '公告内容:',
12
+ ele: 'xd-site-news',
13
+ valueKey: 'notice',
14
+ groupKey: 'content',
15
+ value: data.notice || null,
16
+ className: 'input70',
17
+ setting: {
18
+ config: {
19
+ sort: true,
20
+ maxlen: 100,
21
+ action: 'aliyun',
22
+ size: 5,
23
+ tipsformet: '上传文件格式:@imageType@,不超过@size@MB.',
24
+ uploadType: 'aliyun',
25
+ type: ['jpg', 'png', 'jpeg']
26
+ },
27
+ },
28
+ handleCustom({ action, data }) {
29
+ if (data && data.params) {
30
+ //当一个插件中出现使用内容分类时候需要设置code值,在页面引用时候容器id + code进行拼接
31
+ //data.params = Object.assign({}, data.params, {code: 'g_test_id'});
32
+ }
33
+
34
+ //获取返回参数(场景类型名称为必填)
35
+ //获取返回参数(场景类型名称为必填)
36
+ let loading = { close() { } }
37
+
38
+ //获取显示内容
39
+ if (action === 'screen') {
40
+ XdBus.getParentApi('getOptionsSettingList')({ setting_id: 'edtix_bucket_content_tip' })
41
+ .then(res => {
42
+ loading.close();
43
+ data.cb(res['list'])
44
+ })
45
+ .catch(error => {
46
+ console.error(error);
47
+ loading.close();
48
+ });
49
+
50
+ }
51
+
52
+ //获取返回参数(广告位高度必选项)
53
+ if (action === 'getNewsInfo') {
54
+ XdBus.getParentApi('cmsGetPublishEditxContent')(data.params)
55
+ .then(res => {
56
+ loading.close()
57
+ data.cb({ list: res.list, selectId: res.selected })
58
+ })
59
+ .catch(error => {
60
+ loading.close()
61
+ console.error(error);
62
+ });
63
+ }
64
+
65
+ //获取产品业务线列表
66
+ if (action === 'namespace') {
67
+ XdBus.getParentApi('getOptionsNamespaces')({})
68
+ .then(res => {
69
+ loading.close()
70
+ data.cb(res['list'])
71
+ })
72
+ .catch(error => {
73
+ loading.close()
74
+ console.error(error);
75
+ });
76
+ }
77
+
78
+ //使用内容分类
79
+ if (action === 'cmsPublishEditxContent') {
80
+ loading = XdBus.getParentApi('loading')({});
81
+ XdBus.getParentApi('cmsPublishEditxContent')(data.params)
82
+ .then(res => {
83
+ console.log('cmsPublishEditxContent', res)
84
+ loading.close();
85
+ data.cb(res)
86
+ })
87
+ .catch(error => {
88
+ loading.close();
89
+ console.error(error);
90
+ });
91
+ }
92
+
93
+ //位置列表
94
+ if (action === 'getListPostion') {
95
+ loading = XdBus.getParentApi('loading')({});
96
+ XdBus.getParentApi('getListNewsPosition')(data.params)
97
+ .then(res => {
98
+ loading.close();
99
+ data.cb(res)
100
+ })
101
+ .catch(error => {
102
+ loading.close();
103
+ console.error(error);
104
+ });
105
+ }
106
+
107
+ //位置创建
108
+ if (action === 'addPostion') {
109
+ loading = XdBus.getParentApi('loading')({});
110
+ XdBus.getParentApi('addNewsPosition')(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 === 'editPostion') {
124
+ loading = XdBus.getParentApi('loading')({});
125
+ XdBus.getParentApi('updateNewsPosition')(data.params)
126
+ .then(res => {
127
+ loading.close();
128
+ data.cb(true)
129
+ })
130
+ .catch(error => {
131
+ console.error(error);
132
+ loading.close();
133
+ data.cb(false)
134
+ });
135
+ }
136
+
137
+ //位置删除
138
+ if (action === 'deleltePostion') {
139
+ loading = XdBus.getParentApi('loading')({});
140
+ XdBus.getParentApi('deleteNewsPosition')(data.params)
141
+ .then(res => {
142
+ loading.close();
143
+ data.cb(true)
144
+ })
145
+ .catch(error => {
146
+ console.error(error);
147
+ loading.close();
148
+ data.cb(false)
149
+ });
150
+ }
151
+
152
+ //获取广告位内容列表
153
+ if (action === 'getListContent') {
154
+ loading = XdBus.getParentApi('loading')({});
155
+ XdBus.getParentApi('getListNewsContent')(data.params)
156
+ .then(res => {
157
+ loading.close();
158
+ data.cb(res)
159
+ })
160
+ .catch(error => {
161
+ loading.close();
162
+ console.error(error);
163
+ });
164
+ }
165
+
166
+ //广告内容创建
167
+ if (action === 'addContent') {
168
+ loading = XdBus.getParentApi('loading')({});
169
+ XdBus.getParentApi('addNewsContent')(data.params)
170
+ .then(res => {
171
+ loading.close();
172
+ data.cb(true)
173
+ })
174
+ .catch(error => {
175
+ console.error(error);
176
+ loading.close();
177
+ data.cb(false)
178
+ });
179
+ }
180
+
181
+ //广告内容编辑
182
+ if (action === 'editContent') {
183
+ loading = XdBus.getParentApi('loading')({});
184
+ XdBus.getParentApi('updateNewsContent')(data.params)
185
+ .then(res => {
186
+ loading.close();
187
+ data.cb(true)
188
+ })
189
+ .catch(error => {
190
+ console.error(error);
191
+ loading.close();
192
+ data.cb(false)
193
+ });
194
+ }
195
+
196
+ //广告内容删除
197
+ if (action === 'deleteContent') {
198
+ loading = XdBus.getParentApi('loading')({});
199
+ XdBus.getParentApi('deleteNewsContent')(data.params)
200
+ .then(res => {
201
+ loading.close();
202
+ data.cb(true)
203
+ })
204
+ .catch(error => {
205
+ console.error(error);
206
+ loading.close();
207
+ data.cb(false)
208
+ });
209
+ }
210
+
211
+ //内容发布
212
+ if (action === 'publish') {
213
+ loading = XdBus.getParentApi('loading')({});
214
+ console.log('publish', data.params)
215
+ XdBus.getParentApi('cmsPublishContent')(data.params)
216
+ .then(res => {
217
+ loading.close();
218
+ data.cb(res)
219
+ })
220
+ .catch(error => {
221
+ loading.close();
222
+ console.error(error);
223
+ });
224
+ }
225
+
226
+ //通知页面进行刷新
227
+ if (action === 'update') {
228
+ loading = XdBus.getParentApi('loading')({});
229
+ XdBus.getParentApi('getXdBusUpdateView')('onUpdateView', {});
230
+ loading.close()
231
+ }
232
+ },
233
+ }
234
+ ].filter(i => i)
235
+ },
236
+ advanced: [],
237
+ };
@@ -0,0 +1,174 @@
1
+ <template>
2
+ <view class="jfb-base-notice-group" @click="handleEditxSelect" :class="{ editx : isEditx && active }">
3
+ <!--#ifdef H5-->
4
+ <view class="jfb-base-notice-group__edit" :class="{ editx : isEditx && active }" v-if="isEditx && active">
5
+ <view class="jfb-base-notice-group__edit-icon" @click="delEdit">删除</view>
6
+ </view>
7
+ <!-- #endif -->
8
+ <view class="jfb-base-notice-group__body">
9
+ <view v-if="contentList.length>0">
10
+ <view @click="handleTo(item)" v-for="(item,index) in contentList" :key="index"
11
+ class="jfb-base-notice-group__body-item">
12
+ <view>
13
+ {{item.title}}
14
+ </view>
15
+ <XdFontIcon size="25" color="#2C2C2C" icon="iconxiangyou_xian"></XdFontIcon>
16
+ </view>
17
+ </view>
18
+ <view class="logout-btn">
19
+ <xd-button type="primary" width="600rpx" @click="handleLogout">退出登录</xd-button>
20
+ </view>
21
+ <view class="version">当前版本: {{version}}</view>
22
+ </view>
23
+ </view>
24
+ </template>
25
+
26
+ <script>
27
+ import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
28
+ import { jfbRootExec } from "@/utils/xd.event";
29
+ import JfbBaseNoticeGroupMixin from "./JfbBaseNoticeGroupMixin";
30
+ import { getContainerPropsValue } from "@/utils/xd.base";
31
+ import componentsMixins from "@/mixins/componentsMixins";
32
+ import XdButton from "@/components/XdButton/XdButton";
33
+ import extsMixins from "@/mixins/extsMixins";
34
+ import { mapState } from 'vuex';
35
+ import store from "@/store";
36
+ export default {
37
+ name: "JfbBaseNoticeGroup",
38
+ components: {
39
+ XdFontIcon,
40
+ XdButton
41
+ },
42
+ computed: {
43
+ ...mapState(['jfbAuthorize']),
44
+ },
45
+ mixins: [
46
+ componentsMixins, extsMixins, JfbBaseNoticeGroupMixin
47
+ ],
48
+ data() {
49
+ return {
50
+ contentList: [],
51
+ version: ''
52
+ }
53
+ },
54
+ watch: {
55
+ container(value, oldValue) {
56
+ if (JSON.stringify(value) === JSON.stringify(oldValue)) return;
57
+ if (this.$configProject['isPreview']) {
58
+ this.init(value);
59
+ this.onJfbLoad()
60
+ }
61
+ },
62
+ },
63
+ created() {
64
+ this.init(this.container);
65
+ },
66
+ methods: {
67
+ onJfbLoad(options) {
68
+ this.version = this.projectAttr.headers['X-Version']
69
+ if (this.$configProject['isPreview']) {
70
+ this.version = 'v11.21.12'
71
+ }
72
+ this.getContent()
73
+ },
74
+ /**
75
+ * @description 监听事件变化
76
+ * @param container {object} 业务组件对象自己
77
+ */
78
+ init(container) { },
79
+ getContent() {
80
+ jfbRootExec("getNoticeNewsContent", {
81
+ vm: this,
82
+ data: {
83
+ page_id: this.pageAttr["page_id"], //页面ID
84
+ container_id: this.containerId, //组件ID
85
+ page_size: 200,
86
+ },
87
+ })
88
+ .then((res) => {
89
+ console.log(res, 'aiaiaaiia');
90
+ this.contentList = res.list
91
+ })
92
+ .catch((error) => {
93
+ console.error(error);
94
+ });
95
+ },
96
+ handleTo(item) {
97
+ let params = `page_id=${this.pageAttr["page_id"]}`;
98
+ params = `${params}&container_id=${this.containerId}&content_id=${item.content_id}`;
99
+ this.$xdUniHelper.navigateTo({
100
+ url: `/pages/content/content?${params}`
101
+ })
102
+ },
103
+ async handleLogout() {
104
+ // #ifdef H5
105
+ if (this.$configProject.isPreview) return;
106
+ // #endif
107
+
108
+ if (this.jfbAuthorize !== null) {
109
+ this.$xdShowLoading({});
110
+ store.dispatch('logout').then(res => {
111
+ this.$xdHideLoading();
112
+ this.jfbAuthorize.removeAllToken();
113
+ this.jfbAuthorize.removeAllCardToken();
114
+ this.jfbAuthorize.jumpToUserLogin(this, false);
115
+ }).catch(err => {
116
+ console.error(err);
117
+ })
118
+ }
119
+ },
120
+ onJfbScroll(options) {
121
+ console.log('event.onJfbScroll', options)
122
+ },
123
+ onJfbReachBottom(options) {
124
+ console.log('event.onJfbReachBottom', options)
125
+ },
126
+ onJfbShow(options) {
127
+ console.log('event.onJfbShow', options)
128
+ },
129
+ onJfbHide(options) {
130
+ console.log('event.onJfbHide', options)
131
+ },
132
+ onJfbBack(options) {
133
+ console.log('event.onJfbBack', options)
134
+ },
135
+ onJfbUpdate(...data) {
136
+ console.log('event.onJfbUpdate', data)
137
+ },
138
+ onJfbCustomEvent(options) {
139
+ console.log('event.onJfbReachBottom', options)
140
+ },
141
+ }
142
+ }
143
+
144
+ </script>
145
+
146
+ <style scoped lang="less">
147
+ @import "./JfbBaseNoticeGroupLess.less";
148
+
149
+ .jfb-base-notice-group {
150
+ &__body {
151
+ &-item {
152
+ display: flex;
153
+ align-items: center;
154
+ justify-content: space-between;
155
+ padding: 32rpx 46rpx;
156
+ background: #fff;
157
+ border-radius: 18rpx;
158
+ font-size: 25rpx;
159
+ color: #333;
160
+ margin: 20rpx;
161
+ }
162
+ }
163
+
164
+ .logout-btn {
165
+ margin: 60rpx auto;
166
+ }
167
+
168
+ .version {
169
+ color: #999999;
170
+ font-size: 24rpx;
171
+ text-align: center;
172
+ }
173
+ }
174
+ </style>
@@ -0,0 +1,79 @@
1
+ /**
2
+ * @desc 获取绝对路径完整地址
3
+ * @param @path
4
+ **/
5
+ //例如:https://image.jufubao.cn/20220501010108/image/bg/default_gonghui_bg.png
6
+ @basePath: 'business/';
7
+ @doMain: '//sandbox-img.jufubao.cn/';
8
+
9
+ .getBusinessImageUrl(@path, @size: 'size8') {
10
+ @url: "@{doMain}@{basePath}@{path}?x-oss-process=style/@{size}";
11
+ background-image: url(@url);
12
+ }
13
+
14
+ //start
15
+ .jfb-base-notice-group {
16
+ box-sizing: border-box;
17
+
18
+ &__body{
19
+ position: relative;
20
+ overflow: hidden;
21
+ z-index: 2
22
+ }
23
+
24
+ &.editx,&.editx:hover {
25
+ position: relative;
26
+ min-height: unit(100, rpx);
27
+ z-index: 3;
28
+ &::after {
29
+ border: 2rpx dashed blue;
30
+ content: " ";
31
+ position: absolute;
32
+ top:0;
33
+ left:0;
34
+ bottom:0;
35
+ right:0;
36
+ z-index: 4;
37
+ cursor: pointer;
38
+ }
39
+
40
+ }
41
+
42
+
43
+ &__edit {
44
+ cursor: pointer;
45
+ position: absolute;
46
+ right: unit(0, rpx);
47
+ top: unit(-52, rpx);
48
+ height: unit(50, rpx);
49
+ line-height: unit(50, rpx);
50
+ display: flex;
51
+ justify-content: center;
52
+ align-items: center;
53
+ background: rgba(0, 0, 0, .6);
54
+ border-radius: unit(10, rpx);
55
+ box-shadow: 0 0 10px rbga(0, 0, 0, 0.3);
56
+ color: #fff;
57
+ font-size: unit(22, rpx);
58
+
59
+ &-icon{
60
+ padding: 0 unit(20, rpx);
61
+ }
62
+
63
+ &.editx {
64
+ box-sizing: border-box;
65
+
66
+ }
67
+ }
68
+ }
69
+ //end
70
+
71
+
72
+ /**notPreview**/
73
+ .jfb-base-notice-group {
74
+ //&:before {
75
+ //content: " ";
76
+ //display: table;
77
+ //}
78
+ }
79
+ /**endNotPreview**/
@@ -0,0 +1,30 @@
1
+ 'use strict';
2
+
3
+
4
+ //@AttrImport
5
+ import Attr from "./Attr";
6
+ //@EndAttrImport
7
+
8
+
9
+ export default {
10
+ data() {
11
+ return {
12
+ //#ifdef H5
13
+
14
+ //@AttrData
15
+ Attr:{}, //对外开发编辑属性
16
+ //@EndAttrData
17
+
18
+ // #endif
19
+ cssRoot: 'jfb-base-notice-group'
20
+ }
21
+ },
22
+ created() {
23
+
24
+ //@AttrDataCreated
25
+ this.Attr = this.$xdUniHelper.customClone(Attr);
26
+ //@EndAttrDataCreated
27
+
28
+
29
+ },
30
+ }