fhrons-mobile-next 2.0.0 → 2.0.2

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 (90) hide show
  1. package/.env.poc +8 -0
  2. package/assets/css/colors.js +6 -0
  3. package/assets/css/customVant.less +60 -0
  4. package/assets/css/extra.css +32 -0
  5. package/assets/css/global.css +1 -0
  6. package/assets/css/global.less +1637 -0
  7. package/assets/css/index.js +63 -0
  8. package/assets/css/static.less +607 -0
  9. package/assets/js/func.js +361 -0
  10. package/assets/js/globalData.js +18 -0
  11. package/assets/js/qywxapi.js +484 -0
  12. package/{packages → assets/js}/storage.js +1 -20
  13. package/assets/js/upload.js +269 -0
  14. package/assets/js/validate.js +48 -0
  15. package/assets/js/vant.js +39 -0
  16. package/assets/js/wxapi.js +297 -0
  17. package/assets/vantLang/index.js +172 -0
  18. package/assets/vantLang/lib/en-US.js +95 -0
  19. package/assets/vantLang/lib/es-ES.js +95 -0
  20. package/assets/vantLang/lib/pt-PT.js +96 -0
  21. package/assets/vantLang/lib/zh-CN.js +96 -0
  22. package/assets/vantLang/lib/zh-HK.js +96 -0
  23. package/assets/vantLang/locales/en_US.js +102 -0
  24. package/assets/vantLang/locales/es_ES.js +102 -0
  25. package/assets/vantLang/locales/index.js +12 -0
  26. package/assets/vantLang/locales/pt_PT.js +102 -0
  27. package/assets/vantLang/locales/zh_CN.js +102 -0
  28. package/assets/vantLang/locales/zh_T.js +102 -0
  29. package/babel.config.js +15 -0
  30. package/index.js +68 -33
  31. package/inject-env-plugin.js +29 -0
  32. package/package.json +46 -32
  33. package/packages/areaMobile/index.js +5 -0
  34. package/packages/areaMobile/index.vue +260 -0
  35. package/packages/autoGraph/VueEsign.vue +309 -0
  36. package/packages/autoGraph/index.js +5 -0
  37. package/packages/autoGraph/index.vue +472 -0
  38. package/packages/commonForm/CommonAsyncAreaPicker.vue +223 -0
  39. package/packages/commonForm/CommonDatePicker.vue +152 -0
  40. package/packages/commonForm/CommonForm.vue +786 -0
  41. package/packages/commonForm/CommonFullTimePicker.vue +137 -0
  42. package/packages/commonForm/CommonSinglePicker.vue +121 -0
  43. package/packages/commonForm/CommonYearMonthPicker.vue +127 -0
  44. package/packages/commonForm/index.js +33 -0
  45. package/packages/dialog/index.js +32 -0
  46. package/packages/dialog/index.vue +379 -0
  47. package/packages/index.js +7 -3
  48. package/packages/introduce/index.js +5 -0
  49. package/packages/introduce/index.vue +31 -0
  50. package/packages/loading/Loading.vue +70 -0
  51. package/packages/loading/index.js +43 -0
  52. package/packages/mindMap/index.js +5 -0
  53. package/packages/mindMap/index.vue +437 -0
  54. package/packages/pdfViewer/index.js +12 -0
  55. package/packages/pdfViewer/index.vue +131 -0
  56. package/packages/sharePanel/SheetPanel.vue +316 -0
  57. package/packages/sharePanel/index.js +5 -0
  58. package/packages/sharePanel/index.vue +476 -0
  59. package/packages/sharePanel/props.js +58 -0
  60. package/packages/sharePanel/utils/QyWxShareMixin.js +93 -0
  61. package/packages/sharePanel/utils/shareWay.js +81 -0
  62. package/packages/theme/index copy.js +89 -0
  63. package/packages/theme/index.js +38 -0
  64. package/packages/theme/theme.css +910 -0
  65. package/packages/theme/theme.less +26 -0
  66. package/packages/uploadFile/VanUploadFile.vue +80 -0
  67. package/packages/uploadFile/index.js +5 -0
  68. package/packages/uploadFile/index.vue +725 -0
  69. package/packages/uploadFile/vanUpload.js +5 -0
  70. package/packages/verify/Verify/VerifyPoints.vue +247 -0
  71. package/packages/verify/Verify/VerifySlide.vue +364 -0
  72. package/packages/verify/index.js +5 -0
  73. package/packages/verify/index.vue +416 -0
  74. package/packages/verify/utils/verify.js +53 -0
  75. package/packages/videoPage/index.js +5 -0
  76. package/packages/videoPage/index.vue +440 -0
  77. package/plugins/sensors/fhsensors.js +84 -0
  78. package/plugins/sensors/sensors.js +175 -0
  79. package/plugins/sensors/sensorsFun.js +1387 -0
  80. package/fhrons-mobile-next-2.0.0.tgz +0 -0
  81. package/packages/fhImage/index.js +0 -5
  82. package/packages/fhImage/index.vue +0 -57
  83. package/packages/fhPresetImage/index.js +0 -5
  84. package/packages/fhPresetImage/index.vue +0 -39
  85. package/packages/html2canvas/index.js +0 -29
  86. package/upload copy.js +0 -468
  87. package/utils/tools.js +0 -22
  88. /package/{dist → fhcommon/dist}/fhcommon.min.js +0 -0
  89. /package/{dist → fhcommon/dist}/fhcommon.min.js.LICENSE.txt +0 -0
  90. /package/{upload.js → fhcommon/upload.js} +0 -0
@@ -0,0 +1,416 @@
1
+ <template>
2
+ <div v-show="showBox" id="DragValidNew" :class="mode=='pop'?'mask':''">
3
+ <div :class="mode=='pop'?'verifybox':''" :style="{'max-width':parseInt(imgSize.width)+30+'px'}">
4
+ <div v-if="mode=='pop'" class="verifybox-top c-23242e">{{$t('verify.index.76gx59')}}</div>
5
+ <van-icon name="close" class="ft22 verifybox-close close-icon c-c8c9cc" @click="closeBox" />
6
+ <div class="verifybox-bottom" :style="{padding:mode=='pop'?'15px':'0'}">
7
+ <!-- 验证码容器 -->
8
+ <components
9
+ :is="componentType"
10
+ v-if="componentType"
11
+ ref="instance"
12
+ :captcha-type="captchaType"
13
+ :type="verifyType"
14
+ :figure="figure"
15
+ :show-box="showBox"
16
+ :arith="arith"
17
+ :mode="mode"
18
+ :v-space="vSpace"
19
+ :explain="explain"
20
+ :img-size="imgSize"
21
+ :block-size="blockSize"
22
+ :bar-size="barSize"
23
+ :default-img="defaultImg"
24
+ @success="success"
25
+ />
26
+ </div>
27
+ </div>
28
+ </div>
29
+ </template>
30
+ <script type="text/babel">
31
+ import VerifySlide from './Verify/VerifySlide';
32
+ import VerifyPoints from './Verify/VerifyPoints';
33
+
34
+ export default {
35
+ name: 'Verify',
36
+ components: {
37
+ VerifySlide,
38
+ VerifyPoints
39
+ },
40
+ props: {
41
+ // 双语化
42
+ locale: {
43
+ require: false,
44
+ type: String,
45
+ default() {
46
+ // 默认语言不输入为浏览器语言
47
+ let language = '';
48
+ if (navigator.language) {
49
+ language = navigator.language;
50
+ } else {
51
+ language = navigator.browserLanguage;
52
+ }
53
+ return language;
54
+ }
55
+ },
56
+ captchaType: {
57
+ type: String,
58
+ required: true
59
+ },
60
+ figure: {
61
+ type: Number,
62
+ default: 0
63
+ },
64
+ arith: {
65
+ type: Number,
66
+ default: 0
67
+ },
68
+ mode: {
69
+ type: String,
70
+ default: 'pop'
71
+ },
72
+ vSpace: {
73
+ type: Number,
74
+ default: 0
75
+ },
76
+ explain: {
77
+ type: String,
78
+ default: ''
79
+ },
80
+ imgSize: {
81
+ type: Object,
82
+ default() {
83
+ return {
84
+ width: '310px',
85
+ height: '155px'
86
+ };
87
+ }
88
+ },
89
+ blockSize: {
90
+ type: Object,
91
+ default: () => { }
92
+ },
93
+ barSize: {
94
+ type: Object,
95
+ default: () => { }
96
+ }
97
+ },
98
+ data() {
99
+ return {
100
+ clickShow: false,
101
+ // 内部类型
102
+ verifyType: '2',
103
+ // 所用组件类型
104
+ componentType: 'VerifySlide',
105
+ // 默认图片
106
+ defaultImg: 'https://dop-pro-1251973116.file.myqcloud.com/upload/img/lzgweb/dragValid1.png'
107
+ };
108
+ },
109
+ computed: {
110
+ instance() {
111
+ return this.$refs.instance || {};
112
+ },
113
+ showBox() {
114
+ if (this.mode === 'pop') {
115
+ return this.clickShow;
116
+ }
117
+ return true;
118
+ }
119
+ },
120
+ watch: {
121
+ captchaType: {
122
+ immediate: true,
123
+ deep: true,
124
+ handler(captchaType) {
125
+ switch (captchaType.toString()) {
126
+ case 'blockPuzzle':
127
+ this.verifyType = '2';
128
+ this.componentType = 'VerifySlide';
129
+ break;
130
+ case 'clickWord':
131
+ this.verifyType = '';
132
+ this.componentType = 'VerifyPoints';
133
+ break;
134
+ }
135
+ }
136
+ }
137
+ },
138
+ mounted() {
139
+ this.uuid();
140
+ },
141
+ methods: {
142
+ // 生成 uuid
143
+ uuid() {
144
+ var s = [];
145
+ var hexDigits = '0123456789abcdef';
146
+ for (var i = 0; i < 36; i++) {
147
+ s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
148
+ }
149
+ s[14] = '4'; // bits 12-15 of the time_hi_and_version field to 0010
150
+ s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1); // bits 6-7 of the clock_seq_hi_and_reserved to 01
151
+ s[8] = s[13] = s[18] = s[23] = '-';
152
+
153
+ var slider = 'slider' + '-' + s.join('');
154
+ var point = 'point' + '-' + s.join('');
155
+ // 判断下是否存在 slider
156
+ if (!localStorage.getItem('slider')) {
157
+ localStorage.setItem('slider', slider);
158
+ }
159
+ if (!localStorage.getItem('point')) {
160
+ localStorage.setItem('point', point);
161
+ }
162
+ },
163
+ i18n(text) {
164
+ if (this.$t) {
165
+ return this.$t(text);
166
+ }
167
+ // 兼容不存在的语言
168
+ const i18n = this.$options.i18n.messages[this.locale] || this.$options.i18n.messages['en-US'];
169
+ return i18n[text];
170
+ },
171
+ refresh() {
172
+ if (this.instance.refresh) {
173
+ this.instance.refresh();
174
+ }
175
+ },
176
+ closeBox() {
177
+ this.clickShow = false;
178
+ },
179
+ show() {
180
+ if (this.mode === 'pop') {
181
+ this.clickShow = true;
182
+ }
183
+ },
184
+ success(res) {
185
+ this.$emit('success', res);
186
+ }
187
+ }
188
+ };
189
+ </script>
190
+ <style lang="less" scope>
191
+ #DragValidNew {
192
+ width: 100%;
193
+ height: 100vh;
194
+ position: fixed;
195
+ top: 0;
196
+ left: 0;
197
+ .verifybox {
198
+ position: relative;
199
+ box-sizing: border-box;
200
+ border-radius: 12px;
201
+ border: 1px solid #e4e7eb;
202
+ background-color: #fff;
203
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
204
+ left: 50%;
205
+ top: 50%;
206
+ transform: translate(-50%, -50%);
207
+ }
208
+ .verifybox-top {
209
+ padding: 0 15px;
210
+ height: 50px;
211
+ line-height: 50px;
212
+ text-align: center;
213
+ font-weight: 500;
214
+ font-size: 18px;
215
+ box-sizing: border-box;
216
+ }
217
+ .verifybox-bottom {
218
+ padding: 15px;
219
+ box-sizing: border-box;
220
+ }
221
+ .verifybox-close {
222
+ position: absolute;
223
+ bottom: -36px;
224
+ left: 50%;
225
+ transform: translateX(-50%);
226
+ width: 24px;
227
+ height: 24px;
228
+ text-align: center;
229
+ cursor: pointer;
230
+ }
231
+ .mask {
232
+ position: fixed;
233
+ top: 0;
234
+ left: 0;
235
+ z-index: 1001;
236
+ width: 100%;
237
+ height: 100vh;
238
+ background: rgba(0, 0, 0, 0.3);
239
+ /* display: none; */
240
+ transition: all 0.5s;
241
+ }
242
+ .verify-tips {
243
+ position: absolute;
244
+ left: 0px;
245
+ bottom: 0px;
246
+ width: 100%;
247
+ height: 30px;
248
+ line-height: 30px;
249
+ color: #fff;
250
+ }
251
+ .suc-bg {
252
+ background-color: rgba(92, 184, 92, 0.5);
253
+ filter: progid:DXImageTransform.Microsoft.gradient(startcolorstr=#7f5CB85C, endcolorstr=#7f5CB85C);
254
+ }
255
+ .err-bg {
256
+ background-color: rgba(217, 83, 79, 0.5);
257
+ filter: progid:DXImageTransform.Microsoft.gradient(startcolorstr=#7fD9534F, endcolorstr=#7fD9534F);
258
+ }
259
+ .tips-enter,
260
+ .tips-leave-to {
261
+ bottom: -30px;
262
+ }
263
+ .tips-enter-active,
264
+ .tips-leave-active {
265
+ transition: bottom 0.5s;
266
+ }
267
+ /* ---------------------------- */
268
+ /*常规验证码*/
269
+ .verify-code {
270
+ font-size: 20px;
271
+ text-align: center;
272
+ cursor: pointer;
273
+ margin-bottom: 5px;
274
+ border: 1px solid #ddd;
275
+ }
276
+
277
+ .cerify-code-panel {
278
+ height: 100%;
279
+ overflow: hidden;
280
+ }
281
+
282
+ .verify-code-area {
283
+ float: left;
284
+ }
285
+
286
+ .verify-input-area {
287
+ float: left;
288
+ width: 60%;
289
+ padding-right: 10px;
290
+ }
291
+
292
+ .verify-change-area {
293
+ line-height: 30px;
294
+ float: left;
295
+ }
296
+
297
+ .varify-input-code {
298
+ display: inline-block;
299
+ width: 100%;
300
+ height: 25px;
301
+ }
302
+
303
+ .verify-change-code {
304
+ color: #337ab7;
305
+ cursor: pointer;
306
+ }
307
+
308
+ .verify-btn {
309
+ width: 200px;
310
+ height: 30px;
311
+ background-color: #337ab7;
312
+ color: #ffffff;
313
+ border: none;
314
+ margin-top: 10px;
315
+ }
316
+
317
+ /*滑动验证码*/
318
+ .verify-bar-area {
319
+ position: relative;
320
+ background: #e8e8e8;
321
+ text-align: center;
322
+ -webkit-box-sizing: content-box;
323
+ -moz-box-sizing: content-box;
324
+ box-sizing: content-box;
325
+ -webkit-border-radius: 6px;
326
+ width: 100%;
327
+ height: 12px;
328
+ margin-top: 8px;
329
+ }
330
+ #verifyPoints .verify-bar-area {
331
+ background: rgba(255, 255, 255, 0);
332
+ }
333
+ .verify-bar-area .verify-move-block {
334
+ position: absolute;
335
+ top: 0px;
336
+ left: 0;
337
+ cursor: pointer;
338
+ -webkit-box-sizing: content-box;
339
+ -moz-box-sizing: content-box;
340
+ -webkit-border-radius: 1px;
341
+ width: 40px;
342
+ height: 25px;
343
+ border-radius: 12px;
344
+ transform: translateY(-6px);
345
+ display: flex;
346
+ justify-content: center;
347
+ align-items: center;
348
+ }
349
+
350
+ .verify-bar-area .verify-left-bar {
351
+ position: absolute;
352
+ cursor: pointer;
353
+ -webkit-box-sizing: content-box;
354
+ -moz-box-sizing: content-box;
355
+ box-sizing: content-box;
356
+ height: 12px;
357
+ -webkit-border-radius: 6px;
358
+ }
359
+
360
+ .verify-img-panel {
361
+ margin: 0;
362
+ -webkit-box-sizing: content-box;
363
+ -moz-box-sizing: content-box;
364
+ box-sizing: content-box;
365
+ border-top: 1px solid #ddd;
366
+ border-bottom: 1px solid #ddd;
367
+ border-radius: 3px;
368
+ position: relative;
369
+ }
370
+
371
+ .verify-refresh {
372
+ padding-top: 18px;
373
+ }
374
+
375
+ .verify-img-panel .verify-gap {
376
+ background-color: #fff;
377
+ position: relative;
378
+ z-index: 2;
379
+ border: 1px solid #fff;
380
+ }
381
+
382
+ .verify-bar-area .verify-move-block .verify-sub-block {
383
+ position: absolute;
384
+ text-align: center;
385
+ z-index: 3;
386
+ }
387
+
388
+ .verify-bar-area .verify-move-block .verify-icon {
389
+ font-size: 18px;
390
+ }
391
+
392
+ .verify-bar-area .verify-msg {
393
+ z-index: 3;
394
+ }
395
+ .icon-zhengque {
396
+ color: #fff;
397
+ line-height: 32px;
398
+ }
399
+ .icon-right:before {
400
+ content: ' ';
401
+ display: block;
402
+ width: 16px;
403
+ height: 16px;
404
+ position: absolute;
405
+ margin: auto;
406
+ left: 0;
407
+ right: 0;
408
+ top: 0;
409
+ bottom: 0;
410
+ background-size: cover;
411
+ z-index: 9999;
412
+ background: url('https://dop-pro-1251973116.file.myqcloud.com/upload/img/funzg/line.svg') no-repeat;
413
+ background-size: 100% 100%;
414
+ }
415
+ }
416
+ </style>
@@ -0,0 +1,53 @@
1
+ // import CryptoJS from 'crypto-js';
2
+ import { loadJavaScript } from '../../../assets/js/func'
3
+
4
+ if (!window.CryptoJS) {
5
+ // 这个cdn链接的版本是4.0.0
6
+ loadJavaScript('https://dop-pro-1251973116.file.myqcloud.com/upload/jsfile/funzg/crypto-js.min.js').then(() => {
7
+ console.log('CryptoJS 加载成功', CryptoJS);
8
+ });
9
+ }
10
+
11
+ /**
12
+ * @word 要加密的内容
13
+ * @keyWord String 服务器随机返回的关键字
14
+ * */
15
+ export function aesEncrypt (word, keyWord = 'XwKsGlMcdPMEhR1B') {
16
+ var key = CryptoJS.enc.Utf8.parse(keyWord);
17
+ var srcs = CryptoJS.enc.Utf8.parse(word);
18
+ var encrypted = CryptoJS.AES.encrypt(srcs, key, { mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7 });
19
+ return encrypted.toString();
20
+ }
21
+
22
+ export function resetSize (vm) {
23
+ var img_width, img_height, bar_width, bar_height; // 图片的宽度、高度,移动条的宽度、高度
24
+
25
+ var parentWidth = vm.$el.parentNode.offsetWidth || window.offsetWidth;
26
+ var parentHeight = vm.$el.parentNode.offsetHeight || window.offsetHeight;
27
+
28
+ if (vm.imgSize.width.indexOf('%') !== -1) {
29
+ img_width = parseInt(this.imgSize.width) / 100 * parentWidth + 'px';
30
+ } else {
31
+ img_width = this.imgSize.width;
32
+ }
33
+
34
+ if (vm.imgSize.height.indexOf('%') !== -1) {
35
+ img_height = parseInt(this.imgSize.height) / 100 * parentHeight + 'px';
36
+ } else {
37
+ img_height = this.imgSize.height;
38
+ }
39
+
40
+ if (vm.barSize.width.indexOf('%') !== -1) {
41
+ bar_width = parseInt(this.barSize.width) / 100 * parentWidth + 'px';
42
+ } else {
43
+ bar_width = this.barSize.width;
44
+ }
45
+
46
+ if (vm.barSize.height.indexOf('%') !== -1) {
47
+ bar_height = parseInt(this.barSize.height) / 100 * parentHeight + 'px';
48
+ } else {
49
+ bar_height = this.barSize.height;
50
+ }
51
+
52
+ return { imgWidth: img_width, imgHeight: img_height, barWidth: bar_width, barHeight: bar_height };
53
+ }
@@ -0,0 +1,5 @@
1
+ import VideoPage from './index.vue';
2
+ VideoPage.install = (Vue) => {
3
+ Vue.component(VideoPage.name, VideoPage);
4
+ };
5
+ export default VideoPage;