jufubao-base 1.0.243-beta201 → 1.0.243-beta202

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 (138) hide show
  1. package/package.json +1 -1
  2. package/src/components/JfbBaseAfterSales/JfbBaseAfterSales.vue +40 -3
  3. package/src/components/JfbBaseAfterSales/Mock.js +2 -9
  4. package/src/components/JfbBaseAfterSalesDetail/JfbBaseAfterSalesDetail.vue +12 -3
  5. package/src/components/JfbBaseAfterSalesDetail/secProd.vue +9 -1
  6. package/src/components/JfbBaseAfterSalesList/Attr.js +23 -0
  7. package/src/components/JfbBaseAfterSalesList/JfbBaseAfterSalesList.vue +31 -6
  8. package/src/components/JfbBaseBalance/Api.js +46 -0
  9. package/src/components/JfbBaseBalance/Attr.js +316 -0
  10. package/src/components/JfbBaseBalance/JfbBaseBalance.vue +336 -0
  11. package/src/components/JfbBaseBalance/JfbBaseBalanceLess.less +79 -0
  12. package/src/components/JfbBaseBalance/JfbBaseBalanceMixin.js +30 -0
  13. package/src/components/JfbBaseBalance/Mock.js +9 -0
  14. package/src/components/JfbBaseCodeOpenVip/Api.js +35 -0
  15. package/src/components/JfbBaseCodeOpenVip/Attr.js +281 -0
  16. package/src/components/JfbBaseCodeOpenVip/JfbBaseCodeOpenVip.vue +251 -0
  17. package/src/components/JfbBaseCodeOpenVip/JfbBaseCodeOpenVipLess.less +79 -0
  18. package/src/components/JfbBaseCodeOpenVip/JfbBaseCodeOpenVipMixin.js +30 -0
  19. package/src/components/JfbBaseCodeOpenVip/Mock.js +13 -0
  20. package/src/components/JfbBaseConsumpCode/Api.js +133 -0
  21. package/src/components/JfbBaseConsumpCode/Attr.js +74 -0
  22. package/src/components/JfbBaseConsumpCode/JfbBaseConsumpCode.vue +1111 -0
  23. package/src/components/JfbBaseConsumpCode/JfbBaseConsumpCodeLess.less +79 -0
  24. package/src/components/JfbBaseConsumpCode/JfbBaseConsumpCodeMixin.js +30 -0
  25. package/src/components/JfbBaseConsumpCode/Mock.js +22 -0
  26. package/src/components/JfbBaseFastLink/Attr.js +12 -1
  27. package/src/components/JfbBaseFastLink/JfbBaseFastLink.vue +66 -0
  28. package/src/components/JfbBaseFooter/Attr.js +12 -0
  29. package/src/components/JfbBaseFooter/JfbBaseFooter.vue +13 -0
  30. package/src/components/JfbBaseHeader/Attr.js +82 -0
  31. package/src/components/JfbBaseHeader/JfbBaseHeader.vue +47 -1
  32. package/src/components/JfbBaseHeaderColumn/Attr.js +82 -0
  33. package/src/components/JfbBaseHeaderColumn/JfbBaseHeaderColumn.vue +48 -2
  34. package/src/components/JfbBaseLogin/JfbBaseLogin.vue +17 -3
  35. package/src/components/JfbBaseNoticeDialog/Api.js +1 -1
  36. package/src/components/JfbBaseNoticeDialog/Attr.js +26 -0
  37. package/src/components/JfbBaseNoticeDialog/JfbBaseNoticeDialog.vue +38 -15
  38. package/src/components/JfbBaseNoticeGroup/Api.js +23 -0
  39. package/src/components/JfbBaseNoticeGroup/Attr.js +237 -0
  40. package/src/components/JfbBaseNoticeGroup/JfbBaseNoticeGroup.vue +174 -0
  41. package/src/components/JfbBaseNoticeGroup/JfbBaseNoticeGroupLess.less +79 -0
  42. package/src/components/JfbBaseNoticeGroup/JfbBaseNoticeGroupMixin.js +30 -0
  43. package/src/components/JfbBaseNoticeGroup/Mock.js +13 -0
  44. package/src/components/JfbBaseOpenVip/Api.js +39 -0
  45. package/src/components/JfbBaseOpenVip/Attr.js +331 -0
  46. package/src/components/JfbBaseOpenVip/JfbBaseOpenVip.vue +459 -0
  47. package/src/components/JfbBaseOpenVip/JfbBaseOpenVipLess.less +79 -0
  48. package/src/components/JfbBaseOpenVip/JfbBaseOpenVipMixin.js +30 -0
  49. package/src/components/JfbBaseOpenVip/Mock.js +7 -0
  50. package/src/components/JfbBaseOpenVip/XdVipList.vue +130 -0
  51. package/src/components/JfbBaseOpenVipCard/Api.js +58 -0
  52. package/src/components/JfbBaseOpenVipCard/Attr.js +48 -0
  53. package/src/components/JfbBaseOpenVipCard/JfbBaseOpenVipCard.vue +111 -0
  54. package/src/components/JfbBaseOpenVipCard/JfbBaseOpenVipCardLess.less +79 -0
  55. package/src/components/JfbBaseOpenVipCard/JfbBaseOpenVipCardMixin.js +30 -0
  56. package/src/components/JfbBaseOpenVipCard/Mock.js +13 -0
  57. package/src/components/JfbBaseOpenVipDetail/Api.js +35 -0
  58. package/src/components/JfbBaseOpenVipDetail/Attr.js +37 -0
  59. package/src/components/JfbBaseOpenVipDetail/JfbBaseOpenVipDetail.vue +234 -0
  60. package/src/components/JfbBaseOpenVipDetail/JfbBaseOpenVipDetailLess.less +79 -0
  61. package/src/components/JfbBaseOpenVipDetail/JfbBaseOpenVipDetailMixin.js +30 -0
  62. package/src/components/JfbBaseOpenVipDetail/Mock.js +15 -0
  63. package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +191 -19
  64. package/src/components/JfbBaseOrderList/Api.js +11 -0
  65. package/src/components/JfbBaseOrderList/JfbBaseOrderList.vue +31 -13
  66. package/src/components/JfbBasePay/Attr.js +52 -0
  67. package/src/components/JfbBasePay/JfbBasePay.vue +23 -6
  68. package/src/components/JfbBasePay/Mock.js +0 -9
  69. package/src/components/JfbBasePersonalData/Api.js +26 -0
  70. package/src/components/JfbBasePersonalData/Attr.js +13 -0
  71. package/src/components/JfbBasePersonalData/JfbBasePersonalData.vue +278 -0
  72. package/src/components/JfbBasePersonalData/JfbBasePersonalDataLess.less +79 -0
  73. package/src/components/JfbBasePersonalData/JfbBasePersonalDataMixin.js +30 -0
  74. package/src/components/JfbBasePersonalData/Mock.js +13 -0
  75. package/src/components/JfbBasePhoneLogin/JfbBasePhoneLogin.vue +11 -1
  76. package/src/components/JfbBasePointsCard/Api.js +18 -0
  77. package/src/components/JfbBasePointsCard/Attr.js +187 -0
  78. package/src/components/JfbBasePointsCard/JfbBasePointsCard.vue +212 -0
  79. package/src/components/JfbBasePointsCard/JfbBasePointsCardLess.less +79 -0
  80. package/src/components/JfbBasePointsCard/JfbBasePointsCardMixin.js +30 -0
  81. package/src/components/JfbBasePointsCard/Mock.js +5 -0
  82. package/src/components/JfbBasePointsDetail/Api.js +48 -0
  83. package/src/components/JfbBasePointsDetail/Attr.js +305 -0
  84. package/src/components/JfbBasePointsDetail/JfbBasePointsDetail.vue +267 -0
  85. package/src/components/JfbBasePointsDetail/JfbBasePointsDetailLess.less +79 -0
  86. package/src/components/JfbBasePointsDetail/JfbBasePointsDetailMixin.js +30 -0
  87. package/src/components/JfbBasePointsDetail/Mock.js +6 -0
  88. package/src/components/JfbBasePoster/Attr.js +1 -1
  89. package/src/components/JfbBasePosterBigSmall/JfbBasePosterBigSmall.vue +2 -2
  90. package/src/components/JfbBasePosterGroup/Api.js +22 -0
  91. package/src/components/JfbBasePosterGroup/Attr.js +156 -0
  92. package/src/components/JfbBasePosterGroup/JfbBasePosterGroup.vue +268 -0
  93. package/src/components/JfbBasePosterGroup/JfbBasePosterGroupLess.less +79 -0
  94. package/src/components/JfbBasePosterGroup/JfbBasePosterGroupMixin.js +30 -0
  95. package/src/components/JfbBasePosterGroup/Mock.js +13 -0
  96. package/src/components/JfbBaseSavingDetail/Api.js +41 -0
  97. package/src/components/JfbBaseSavingDetail/Attr.js +70 -0
  98. package/src/components/JfbBaseSavingDetail/JfbBaseSavingDetail.vue +724 -0
  99. package/src/components/JfbBaseSavingDetail/JfbBaseSavingDetailLess.less +79 -0
  100. package/src/components/JfbBaseSavingDetail/JfbBaseSavingDetailMixin.js +30 -0
  101. package/src/components/JfbBaseSavingDetail/Mock.js +10 -0
  102. package/src/components/JfbBaseSavingDetail/components/echarts.min.js +26 -0
  103. package/src/components/JfbBaseSavingDetail/components/echarts.vue +254 -0
  104. package/src/components/JfbBaseSavingDetail/components/wx-canvas.js +105 -0
  105. package/src/components/JfbBaseShare/Api.js +20 -0
  106. package/src/components/JfbBaseShare/Attr.js +59 -0
  107. package/src/components/JfbBaseShare/JfbBaseShare.vue +282 -0
  108. package/src/components/JfbBaseShare/JfbBaseShareLess.less +79 -0
  109. package/src/components/JfbBaseShare/JfbBaseShareMixin.js +30 -0
  110. package/src/components/JfbBaseShare/Mock.js +16 -0
  111. package/src/components/JfbBaseSuccess/JfbBaseSuccess.vue +14 -3
  112. package/src/components/JfbBaseTfkSearch/ContentProduct.vue +12 -22
  113. package/src/components/JfbBaseTfkSearch/JfbBaseTfkSearch.vue +12 -1
  114. package/src/components/JfbBaseTfkSearch/Mock.js +51 -3
  115. package/src/components/JfbBaseTfkSearch/listMixins.js +2 -1
  116. package/src/components/JfbBaseUserInfo/Attr.js +175 -11
  117. package/src/components/JfbBaseUserInfo/JfbBaseUserInfo.vue +342 -119
  118. package/src/components/JfbBaseUserOrder/Attr.js +16 -0
  119. package/src/components/JfbBaseUserOrder/JfbBaseUserOrder.vue +11 -2
  120. package/src/components/JfbBaseWithDrawAgain/Api.js +41 -0
  121. package/src/components/JfbBaseWithDrawAgain/Attr.js +92 -0
  122. package/src/components/JfbBaseWithDrawAgain/JfbBaseWithDrawAgain.vue +354 -0
  123. package/src/components/JfbBaseWithDrawAgain/JfbBaseWithDrawAgainLess.less +79 -0
  124. package/src/components/JfbBaseWithDrawAgain/JfbBaseWithDrawAgainMixin.js +30 -0
  125. package/src/components/JfbBaseWithDrawAgain/Mock.js +10 -0
  126. package/src/components/JfbBaseWithDrawRecord/Api.js +19 -0
  127. package/src/components/JfbBaseWithDrawRecord/Attr.js +79 -0
  128. package/src/components/JfbBaseWithDrawRecord/JfbBaseWithDrawRecord.vue +233 -0
  129. package/src/components/JfbBaseWithDrawRecord/JfbBaseWithDrawRecordLess.less +79 -0
  130. package/src/components/JfbBaseWithDrawRecord/JfbBaseWithDrawRecordMixin.js +30 -0
  131. package/src/components/JfbBaseWithDrawRecord/Mock.js +7 -0
  132. package/src/components/JfbBaseWithdraw/Api.js +48 -0
  133. package/src/components/JfbBaseWithdraw/Attr.js +328 -0
  134. package/src/components/JfbBaseWithdraw/JfbBaseWithdraw.vue +272 -0
  135. package/src/components/JfbBaseWithdraw/JfbBaseWithdrawLess.less +79 -0
  136. package/src/components/JfbBaseWithdraw/JfbBaseWithdrawMixin.js +30 -0
  137. package/src/components/JfbBaseWithdraw/Mock.js +7 -0
  138. 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,59 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * @description 当表单组件中有联动操作时候,使用方法进行返回
5
+ */
6
+ export default {
7
+ style: [],
8
+ content: (data) => {
9
+ return [
10
+ {
11
+ label: '发送朋友按钮背景图:', //label
12
+ ele: 'xd-upload', //package 名称
13
+ valueKey: 'shareImage', //form[valueKey]
14
+ value: data.shareImage || null, //v-model
15
+ defaultValue: data.shareImage || null, //默认图片对象
16
+ groupKey: "content",
17
+ slot: true, //按钮是否使用slot
18
+ oneWidth: 150, //单个图片显示宽度
19
+ oneHeight: 40, //单个图片显示高度
20
+ elinputClassName: 'input40',
21
+ tipsformet: '上传文件格式:@imageType@,不超过@size@MB.建议尺寸为300*80px。',
22
+ type: ['jpg', 'png', 'jpeg'],
23
+ styleType: 'one', //其值:one=>单文件上传 auth=>证件正反面上传 list=>多文件上传
24
+ uploadType: 'aliyun', //''=>API服务上传 qiniu=>七牛云OSS上传 aliyun=> 阿里云OSS上传
25
+ size: 5, //5M
26
+ action: 'aliyun',
27
+ sort: true, //当上传图片列表时候,是否启用排序
28
+ maxlen: 100, //当上传图片列表时候,最大数量数量
29
+ rules: [
30
+ { required: true, message: '请上传图片', trigger: ['blur', 'change'] },
31
+ ]
32
+ },
33
+ {
34
+ label: '保存到相册按钮背景图:', //label
35
+ ele: 'xd-upload', //package 名称
36
+ valueKey: 'savaImage', //form[valueKey]
37
+ value: data.savaImage || null, //v-model
38
+ defaultValue: data.savaImage || null, //默认图片对象
39
+ groupKey: "content",
40
+ slot: true, //按钮是否使用slot
41
+ oneWidth: 150, //单个图片显示宽度
42
+ oneHeight: 40, //单个图片显示高度
43
+ elinputClassName: 'input40',
44
+ tipsformet: '上传文件格式:@imageType@,不超过@size@MB.建议尺寸为300*80px。',
45
+ type: ['jpg', 'png', 'jpeg'],
46
+ styleType: 'one', //其值:one=>单文件上传 auth=>证件正反面上传 list=>多文件上传
47
+ uploadType: 'aliyun', //''=>API服务上传 qiniu=>七牛云OSS上传 aliyun=> 阿里云OSS上传
48
+ size: 5, //5M
49
+ action: 'aliyun',
50
+ sort: true, //当上传图片列表时候,是否启用排序
51
+ maxlen: 100, //当上传图片列表时候,最大数量数量
52
+ rules: [
53
+ { required: true, message: '请上传图片', trigger: ['blur', 'change'] },
54
+ ]
55
+ },
56
+ ].filter(i=>i)
57
+ },
58
+ advanced: [],
59
+ };