jufubao-base 1.0.238-beta71 → 1.0.239-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 (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 +1044 -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 +27 -8
  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 +179 -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 +14 -0
  97. package/src/components/JfbBaseShare/JfbBaseShare.vue +273 -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 +12 -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
@@ -0,0 +1,254 @@
1
+ <template>
2
+ <!-- #ifdef MP-WEIXIN || MP-TOUTIAO -->
3
+ <canvas type="2d" class="echarts" :canvas-id="canvasId" :id="canvasId" @touchstart="touchStart"
4
+ @touchmove="touchMove" @touchend="touchEnd" />
5
+ <!-- #endif -->
6
+ <!-- #ifndef MP-WEIXIN || MP-TOUTIAO -->
7
+ <canvas :key="canvasId" style="border-radius: 20rpx;" class="echarts" :canvas-id="canvasId" :id="canvasId" @touchstart="touchStart" @touchmove="touchMove"
8
+ @touchend="touchEnd" />
9
+ <!-- #endif -->
10
+
11
+ </template>
12
+ <script>
13
+
14
+ /**
15
+ * echartsForUniApp echart兼容uni-app
16
+ * @description echart兼容uni-app
17
+ * @property {Object} option 图表数据
18
+ * @property {String} canvasId 画布id
19
+ * @example <echarts ref="echarts" :option="option" canvasId="echarts"></echarts>
20
+ */
21
+ import WxCanvas from './wx-canvas.js';
22
+ import * as echarts from './echarts.min.js';
23
+
24
+ var chartList = {}
25
+ export default {
26
+ props: {
27
+ canvasId: {
28
+ type: String,
29
+ default: 'echarts'
30
+ },
31
+ option: {
32
+ type: Object,
33
+ default: () => {
34
+ return {}
35
+ }
36
+ },
37
+ },
38
+ watch: {
39
+ option(newValue, oldValue) {
40
+ if(newValue.series){
41
+ this.initChart(newValue)
42
+ }
43
+ }
44
+ },
45
+ data() {
46
+ return {
47
+ ctx:null
48
+ }
49
+ },
50
+
51
+ mounted() {
52
+ // Disable prograssive because drawImage doesn't support DOM as parameter
53
+ // See https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.drawImage.html
54
+ console.log(echarts,'echartsechartsecharts');
55
+
56
+ echarts.registerPreprocessor(option => {
57
+ console.log(option,'optionoptionoption');
58
+
59
+ if (option && option.series) {
60
+ if (option.series.length > 0) {
61
+ option.series.forEach(series => {
62
+ series.progressive = 0;
63
+ });
64
+ } else if (typeof option.series === 'object') {
65
+ option.series.progressive = 0;
66
+ }
67
+ }
68
+ });
69
+
70
+ },
71
+
72
+ methods: {
73
+ getCanvasAttr2d() {
74
+ return new Promise((resolve, reject) => {
75
+ const query = uni.createSelectorQuery().in(this)
76
+ query
77
+ .select('#' + this.canvasId)
78
+ .fields({
79
+ node: true,
80
+ size: true
81
+ })
82
+ .exec(res => {
83
+ const canvasNode = res[0].node
84
+ this.canvasNode = canvasNode
85
+ const canvasDpr = uni.getSystemInfoSync().pixelRatio
86
+ const canvasWidth = res[0].width
87
+ const canvasHeight = res[0].height
88
+ const canvasRadius = res[0].borderRadius
89
+ this.ctx = canvasNode.getContext('2d')
90
+
91
+ const canvas = new WxCanvas(this.ctx, this.canvasId, true, canvasNode)
92
+ echarts.setCanvasCreator(() => {
93
+ return canvas
94
+ })
95
+ resolve({
96
+ canvas,
97
+ canvasWidth,
98
+ canvasHeight,
99
+ canvasDpr,
100
+ canvasRadius
101
+ })
102
+ })
103
+ });
104
+ },
105
+ getCanvasAttr() {
106
+ return new Promise((resolve, reject) => {
107
+ this.ctx = uni.createCanvasContext(this.canvasId, this);
108
+ var canvas = new WxCanvas(this.ctx, this.canvasId, false);
109
+ echarts.setCanvasCreator(() => {
110
+ return canvas;
111
+ });
112
+ const canvasDpr = 1
113
+ var query = uni.createSelectorQuery()
114
+ // #ifndef MP-ALIPAY
115
+ .in(this)
116
+ // #endif
117
+ query.select('#' + this.canvasId).boundingClientRect(res => {
118
+ const canvasWidth = res.width
119
+ const canvasHeight = res.height
120
+ const canvasRadius = res.borderRadius
121
+ resolve({
122
+ canvas,
123
+ canvasWidth,
124
+ canvasHeight,
125
+ canvasDpr,
126
+ canvasRadius
127
+ })
128
+ }).exec();
129
+ });
130
+ },
131
+ // #ifdef H5
132
+ //H5绘制图表
133
+ initChart(option) {
134
+ this.ctx = uni.createCanvasContext(this.canvasId, this);
135
+ chartList[this.canvasId] = echarts.init(document.getElementById(this.canvasId));
136
+ chartList[this.canvasId].setOption(option?option:this.option);
137
+ console.log(chartList[this.canvasId],this.canvasId,'canvasIdcanvasId');
138
+ },
139
+ //H5生成图片
140
+ canvasToTempFilePath(opt) {
141
+ const base64 = chartList[this.canvasId].getDataURL()
142
+ opt.success && opt.success({tempFilePath:base64})
143
+ },
144
+ // #endif
145
+ // #ifndef H5
146
+ //绘制图表
147
+ async initChart(option) {
148
+ // #ifdef MP-WEIXIN || MP-TOUTIAO
149
+ const canvasAttr = await this.getCanvasAttr2d();
150
+ // #endif
151
+ // #ifndef MP-WEIXIN || MP-TOUTIAO
152
+ const canvasAttr = await this.getCanvasAttr();
153
+ // #endif
154
+ const {
155
+ canvas,
156
+ canvasWidth,
157
+ canvasHeight,
158
+ canvasDpr,
159
+ canvasRadius
160
+ } = canvasAttr
161
+ chartList[this.canvasId] = echarts.init(canvas, null, {
162
+ width: canvasWidth,
163
+ height: canvasHeight,
164
+ devicePixelRatio: canvasDpr, // new
165
+ borderRadius: canvasRadius
166
+ });
167
+ canvas.setChart(chartList[this.canvasId]);
168
+ chartList[this.canvasId].setOption(option?option:this.option);
169
+ },
170
+ //生成图片
171
+ canvasToTempFilePath(opt) {
172
+ // #ifdef MP-WEIXIN || MP-TOUTIAO
173
+ var query = uni.createSelectorQuery()
174
+ // #ifndef MP-ALIPAY
175
+ .in(this)
176
+ // #endif
177
+ query.select('#' + this.canvasId).fields({ node: true, size: true }).exec(res => {
178
+ const canvasNode = res[0].node
179
+ opt.canvas = canvasNode
180
+ uni.canvasToTempFilePath(opt, this)
181
+ })
182
+ // #endif
183
+ // #ifndef MP-WEIXIN || MP-TOUTIAO
184
+ if (!opt.canvasId) {
185
+ opt.canvasId = this.canvasId;
186
+ }
187
+ this.ctx.draw(true, () => {
188
+ uni.canvasToTempFilePath(opt, this);
189
+ });
190
+ // #endif
191
+ },
192
+ // #endif
193
+
194
+ touchStart(e) {
195
+ if (chartList[this.canvasId] && e.touches.length > 0) {
196
+ var touch = e.touches[0];
197
+ var handler = chartList[this.canvasId].getZr().handler;
198
+ handler.dispatch('mousedown', {
199
+ zrX: touch.x,
200
+ zrY: touch.y
201
+ });
202
+ handler.dispatch('mousemove', {
203
+ zrX: touch.x,
204
+ zrY: touch.y
205
+ });
206
+ handler.processGesture(wrapTouch(e), 'start');
207
+ }
208
+ },
209
+ touchMove(e) {
210
+ if (chartList[this.canvasId] && e.touches.length > 0) {
211
+ var touch = e.touches[0];
212
+ var handler = chartList[this.canvasId].getZr().handler;
213
+ handler.dispatch('mousemove', {
214
+ zrX: touch.x,
215
+ zrY: touch.y
216
+ });
217
+ handler.processGesture(wrapTouch(e), 'change');
218
+ }
219
+ },
220
+
221
+ touchEnd(e) {
222
+ if (chartList[this.canvasId]) {
223
+ const touch = e.changedTouches ? e.changedTouches[0] : {};
224
+ var handler = chartList[this.canvasId].getZr().handler;
225
+ handler.dispatch('mouseup', {
226
+ zrX: touch.x,
227
+ zrY: touch.y
228
+ });
229
+ handler.dispatch('click', {
230
+ zrX: touch.x,
231
+ zrY: touch.y
232
+ });
233
+ handler.processGesture(wrapTouch(e), 'end');
234
+ }
235
+ }
236
+ }
237
+ }
238
+
239
+ function wrapTouch(event) {
240
+ for (let i = 0; i < event.touches.length; ++i) {
241
+ const touch = event.touches[i];
242
+ touch.offsetX = touch.x;
243
+ touch.offsetY = touch.y;
244
+ }
245
+ return event;
246
+ }
247
+ </script>
248
+ <style lang="scss" scoped>
249
+ .echarts {
250
+ width: 100%;
251
+ height: 100%;
252
+ border-radius: 40rpx;
253
+ }
254
+ </style>
@@ -0,0 +1,105 @@
1
+ export default class WxCanvas {
2
+ constructor(ctx, canvasId, isNew, canvasNode) {
3
+ this.ctx = ctx;
4
+ this.canvasId = canvasId;
5
+ this.chart = null;
6
+ this.isNew = isNew
7
+ if (isNew) {
8
+ this.canvasNode = canvasNode;
9
+ }
10
+ else {
11
+ this._initStyle(ctx);
12
+ }
13
+
14
+ // this._initCanvas(zrender, ctx);
15
+
16
+ this._initEvent();
17
+ }
18
+
19
+ getContext(contextType) {
20
+ if (contextType === '2d') {
21
+ return this.ctx;
22
+ }
23
+ }
24
+
25
+ // canvasToTempFilePath(opt) {
26
+ // if (!opt.canvasId) {
27
+ // opt.canvasId = this.canvasId;
28
+ // }
29
+ // return wx.canvasToTempFilePath(opt, this);
30
+ // }
31
+
32
+ setChart(chart) {
33
+ this.chart = chart;
34
+ }
35
+
36
+ attachEvent() {
37
+ // noop
38
+ }
39
+
40
+ detachEvent() {
41
+ // noop
42
+ }
43
+
44
+ _initCanvas(zrender, ctx) {
45
+ zrender.util.getContext = function () {
46
+ return ctx;
47
+ };
48
+
49
+ zrender.util.$override('measureText', function (text, font) {
50
+ ctx.font = font || '12px sans-serif';
51
+ return ctx.measureText(text);
52
+ });
53
+ }
54
+
55
+ _initStyle(ctx) {
56
+ ctx.createRadialGradient = () => {
57
+ return ctx.createCircularGradient(arguments);
58
+ };
59
+ }
60
+
61
+ _initEvent() {
62
+ this.event = {};
63
+ const eventNames = [{
64
+ wxName: 'touchStart',
65
+ ecName: 'mousedown'
66
+ }, {
67
+ wxName: 'touchMove',
68
+ ecName: 'mousemove'
69
+ }, {
70
+ wxName: 'touchEnd',
71
+ ecName: 'mouseup'
72
+ }, {
73
+ wxName: 'touchEnd',
74
+ ecName: 'click'
75
+ }];
76
+
77
+ eventNames.forEach(name => {
78
+ this.event[name.wxName] = e => {
79
+ const touch = e.touches[0];
80
+ this.chart.getZr().handler.dispatch(name.ecName, {
81
+ zrX: name.wxName === 'tap' ? touch.clientX : touch.x,
82
+ zrY: name.wxName === 'tap' ? touch.clientY : touch.y
83
+ });
84
+ };
85
+ });
86
+ }
87
+
88
+ set width(w) {
89
+ if (this.canvasNode) this.canvasNode.width = w
90
+ }
91
+ set height(h) {
92
+ if (this.canvasNode) this.canvasNode.height = h
93
+ }
94
+
95
+ get width() {
96
+ if (this.canvasNode)
97
+ return this.canvasNode.width
98
+ return 0
99
+ }
100
+ get height() {
101
+ if (this.canvasNode)
102
+ return this.canvasNode.height
103
+ return 0
104
+ }
105
+ }
@@ -0,0 +1,20 @@
1
+ 'use strict';
2
+ /**
3
+ * @description 接口配置,
4
+ * 在设置方法名字当时候,别忘记加上【模块名字】:Share
5
+ * @type {*[]}
6
+ */
7
+ module.exports = [
8
+ {
9
+ mapFnName: "getInviteCardList",
10
+ title: "获取邀请卡列表",
11
+ path: "/dist/v1/invitation_card",
12
+ isRule: false,
13
+ params: {
14
+ page_token: ['当前页', 'Number', '必选'],
15
+ page_size: ['每页数量', 'Number', '必选'],
16
+ },
17
+ isConsole: true,
18
+ disabled: false,
19
+ },
20
+ ];
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * @description 当表单组件中有联动操作时候,使用方法进行返回
5
+ */
6
+ export default {
7
+ style: [],
8
+ content: (data) => {
9
+ return [
10
+
11
+ ].filter(i=>i)
12
+ },
13
+ advanced: [],
14
+ };
@@ -0,0 +1,273 @@
1
+ <template>
2
+ <view
3
+ class="jfb-base-share"
4
+ @click="handleEditxSelect"
5
+ :class="{ editx : isEditx && active }"
6
+ >
7
+ <!--#ifdef H5-->
8
+ <view
9
+ class="jfb-base-share__edit"
10
+ :class="{ editx : isEditx && active }"
11
+ v-if="isEditx && active"
12
+ >
13
+ <view class="jfb-base-share__edit-icon" @click="delEdit">删除</view>
14
+ </view>
15
+ <!-- #endif -->
16
+ <view class="jfb-base-share__body">
17
+ <view class="card_wrap">
18
+ <swiper class="card_swiper" next-margin="50rpx" previous-margin="50rpx" :current="shareIndex" @change="handleSwitch">
19
+ <swiper-item class="swiper_item" v-for="(item,i) in shareList" :key="i">
20
+ <view class="swiper_item-inner">
21
+ <image :src="item.share_image_url" mode="aspectFill"></image>
22
+ <!-- <view class="swiper_item-logo"></view>
23
+ <view class="swiper_item-title">邀请好友领福利</view>
24
+ <view class="swiper_item-qrcode"></view>
25
+ <view class="swiper_item-visit">邀请码<br/>LWNXK7H</view> -->
26
+ </view>
27
+ <!-- <image style="width: 600rpx;height: 900rpx;"
28
+ src="https://sandbox-img.jufubao.cn/uploads/20250410/34559f90dd5a01e7368c02bf33f1b484.png?ver=1744249748881&x-oss-process=style/size5"></image> -->
29
+ </swiper-item>
30
+ </swiper>
31
+ </view>
32
+
33
+ <view v-if="showShare" class="share_wrap">
34
+ <view class="share_btn" @click="toSendWx">
35
+ <image src="https://sandbox-img.jufubao.cn/uploads/20250410/57bc093618bc51a85dc8bb68825d2b97.png?x-oss-process=style/size8" mode="widthFix"></image>
36
+ </view>
37
+ <view class="share_btn" @click="toSaveImg">
38
+ <image src="https://sandbox-img1.jufubao.cn/uploads/20250410/faeb136bfd684ab6fa4608208ad26294.png?x-oss-process=style/size8" mode="widthFix"></image>
39
+ </view>
40
+ </view>
41
+
42
+ <view class="visit_tip">
43
+ 好友使用你的邀请码成功注册后<br/>Ta将成为你的邀请用户
44
+ </view>
45
+ </view>
46
+ </view>
47
+ </template>
48
+
49
+ <script>
50
+ import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
51
+ import { jfbRootExec } from "@/utils/xd.event";
52
+ import JfbBaseShareMixin from "./JfbBaseShareMixin";
53
+ import { getContainerPropsValue } from "@/utils/xd.base";
54
+ import componentsMixins from "@/mixins/componentsMixins";
55
+ import extsMixins from "@/mixins/extsMixins";
56
+ import getServiceUrl from "@/common/getServiceUrl";
57
+ import { mapState, mapMutations } from "vuex";
58
+ export default {
59
+ name: "JfbBaseShare",
60
+ components: {
61
+ XdFontIcon
62
+ },
63
+ mixins: [
64
+ componentsMixins, extsMixins, JfbBaseShareMixin
65
+ ],
66
+ data() {
67
+ return {
68
+ closeMask: true,
69
+ shareIndex: 0,
70
+ shareList: [],
71
+ isPreview: false,
72
+ //todo
73
+ }
74
+ },
75
+ computed: {
76
+ ...mapState(["shareInfo"]),
77
+ ...mapMutations(["setShareInfo"]),
78
+ showShare(){
79
+ if(this.isPreview) return true;
80
+ // #ifdef MP-WEIXIN
81
+ return true;
82
+ // #endif
83
+ // #ifdef H5
84
+ return false;
85
+ // #endif
86
+ }
87
+ },
88
+ watch: {
89
+ container(value, oldValue) {
90
+ if (JSON.stringify(value) === JSON.stringify(oldValue)) return;
91
+ if (this.$configProject['isPreview']) this.init(value)
92
+ },
93
+ },
94
+ created() {
95
+ this.init(this.container);
96
+ this.isPreview = this.$configProject['isPreview'];
97
+ //todo
98
+ },
99
+ methods: {
100
+ onJfbLoad(options) {
101
+
102
+ this.p_getInviteCardList();
103
+ },
104
+ /**
105
+ * @description 监听事件变化
106
+ * @param container {object} 业务组件对象自己
107
+ */
108
+ init(container) {
109
+
110
+ },
111
+ p_getInviteCardList(){
112
+ jfbRootExec("getInviteCardList", {
113
+ vm: this,
114
+ data: {
115
+ page_token: '1'
116
+ }
117
+ }).then(res => {
118
+ this.shareList = res.list.map(item => {
119
+ let urlSearch = item.share_image_url.split('?')[1];
120
+ let newImgUrl = getServiceUrl(item.share_image_url);
121
+ item.share_image_url = newImgUrl.split('?')[0] + '?' + urlSearch;
122
+ return item;
123
+ });
124
+ })
125
+ },
126
+ handleSwitch(e){
127
+ this.shareIndex = e.detail.current;
128
+ },
129
+ toSendWx(){
130
+ let shareIndex = this.shareIndex;
131
+ let curShare = this.shareList[shareIndex];
132
+ this.setShareInfo({
133
+ title: "您的好友邀请您使用PLUS会员",
134
+ imageUrl: curShare.share_image_url,
135
+ path: `${curShare.jump_url}`,
136
+ });
137
+ },
138
+ toSaveImg(){
139
+ let shareIndex = this.shareIndex;
140
+ let curShare = this.shareList[shareIndex];
141
+ uni.getImageInfo({
142
+ src: curShare.share_image_url,
143
+ success: (res) => {
144
+ uni.saveImageToPhotosAlbum({
145
+ filePath: res.path,
146
+ success: () => {
147
+ uni.showToast({
148
+ title: '保存成功',
149
+ icon: "success"
150
+ })
151
+ }
152
+ })
153
+ }
154
+ })
155
+
156
+ },
157
+ onJfbScroll(options) {
158
+ // console.log('event.onJfbScroll', options)
159
+ },
160
+ onJfbReachBottom(options) {
161
+ console.log('event.onJfbReachBottom', options)
162
+ },
163
+ onJfbShow(options) {
164
+ console.log('event.onJfbShow', options)
165
+ },
166
+ onJfbHide(options) {
167
+ console.log('event.onJfbHide', options)
168
+ },
169
+ onJfbBack(options) {
170
+ console.log('event.onJfbBack', options)
171
+ },
172
+ onJfbUpdate(...data) {
173
+ console.log('event.onJfbUpdate', data)
174
+ },
175
+ onJfbCustomEvent(options) {
176
+ console.log('event.onJfbReachBottom', options)
177
+ },
178
+ }
179
+ }
180
+
181
+ </script>
182
+
183
+ <style scoped lang="less">
184
+ @import "./JfbBaseShareLess.less";
185
+
186
+ .jfb-base-share {
187
+ &__body{
188
+ padding: 60rpx 0;
189
+ box-sizing: border-box;
190
+ .card_wrap{
191
+ height: 960rpx;
192
+ box-sizing: border-box;
193
+ .card_swiper{
194
+ height: 100%;
195
+ width: 100%;
196
+ .swiper_item{
197
+ display: flex;
198
+ align-items: center;
199
+ justify-content: center;
200
+
201
+ &-inner{
202
+ width: 100%;
203
+ height: 100%;
204
+ // background: url('https://sandbox-img.jufubao.cn/uploads/20250410/2d9f5ec31efb5cddece747d8b8da51f0.png?x-oss-process=style/size8') no-repeat;
205
+ // background-size: auto 100%;
206
+ box-sizing: border-box;
207
+ // display: flex;
208
+ // flex-direction: column;
209
+ // align-items: center;
210
+ image{
211
+ width: 100%;
212
+ height: 100%;
213
+ }
214
+ }
215
+ &-logo{
216
+ height: 96rpx;
217
+ width: 96rpx;
218
+ background-color: #FFFFFF;
219
+ }
220
+ &-title{
221
+ margin-top: 24rpx;
222
+ color: #B35300;
223
+ font-size: 40rpx;
224
+ font-weight: 500;
225
+ }
226
+ &-qrcode{
227
+ width: 400rpx;
228
+ height: 400rpx;
229
+ background-color: #FFFFFF;
230
+ margin-top: 60rpx;
231
+ border-radius: 24rpx;
232
+ }
233
+ &-visit{
234
+ width: 400rpx;
235
+ height: 120rpx;
236
+ background: linear-gradient(180deg, #FEFEF5 0%, #FDFDCB 100%);
237
+ margin-top: 36rpx;
238
+ border-radius: 24rpx;
239
+ font-size: 32rpx;
240
+ font-weight: 500;
241
+ color: #965720;
242
+ text-align: center;
243
+ padding-top: 20rpx;
244
+ box-sizing: border-box;
245
+ }
246
+ }
247
+ }
248
+ }
249
+ .share_wrap{
250
+ display: flex;
251
+ align-items: center;
252
+ justify-content: center;
253
+ .share_btn{
254
+ margin-top: 60rpx;
255
+ width: 300rpx;
256
+ image{
257
+ width: 100%;
258
+ }
259
+
260
+ & + .share_btn{
261
+ margin-left: 32rpx;
262
+ }
263
+ }
264
+ }
265
+ .visit_tip{
266
+ color: #965720;
267
+ font-size: 26rpx;
268
+ margin-top: 32rpx;
269
+ text-align: center;
270
+ }
271
+ }
272
+ }
273
+ </style>