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,175 @@
1
+ import i18n from 'assets/vantLang';
2
+ import sensorsFunc from './sensorsFun';
3
+ import { getStorage } from 'assets/js/storage'
4
+ function judgeHkp() {
5
+ return process.env.VUE_APP_ENV_CONFIG.includes('hk') || window.location.origin.includes('openuat.fhrons.net') || window.location.origin.includes('open.avantech.io');
6
+ }
7
+ function judgeNotHk() {
8
+ return !process.env.VUE_APP_ENV_CONFIG.includes('hk') && !window.location.origin.includes('openuat.fhrons.net') && !window.location.origin.includes('open.avantech.io')
9
+ }
10
+ function getPlatFormCode() {
11
+ const userGlobalGist = getStorage({ name: 'userGlobalGist' }) || {};
12
+ const loginResponseDO = userGlobalGist.loginResponseDO || {};
13
+ const platformCode = getStorage({ name: 'platformCode' });
14
+ const isShared = getStorage({ key: 'isTourists', type: 'session' });
15
+ const userHrefPlatformCode = getStorage({ name: 'userHrefPlatformCode' });
16
+ const finalPlatformCode = (isShared || userHrefPlatformCode) ? (platformCode || loginResponseDO?.platformCode || '00') : (loginResponseDO?.platformCode || platformCode || '00');
17
+ return finalPlatformCode; // 00 表示元租户;
18
+ }
19
+
20
+ function getPlatSaasId() {
21
+ const saasId = getStorage({ name: 'saasId' });
22
+ const userInfo = getStorage({ name: 'userInfo' });
23
+ return userInfo?.saasId || saasId || '000000';// 000000 表示元租户;
24
+ }
25
+ export default {
26
+ baseParam: null,
27
+ sensors: null,
28
+ getSensors() {
29
+ return this.sensors;
30
+ },
31
+ initBaseParam(baseParam) {
32
+ if (this.baseParam === null) {
33
+ this.baseParam = baseParam;
34
+ } else {
35
+ this.baseParam = Object.assign(this.baseParam, baseParam);
36
+ }
37
+ },
38
+ getBaseParam() {
39
+ return this.baseParam;
40
+ },
41
+ initSensorsData() {
42
+ // 埋点
43
+ function isWeiXin() {
44
+ var ua = window.navigator.userAgent.toLowerCase();
45
+ if (ua.match(/MicroMessenger/i) == 'micromessenger' && (ua.match(/wxwork/i) != 'wxwork')) {
46
+ return true;
47
+ }
48
+ return false;
49
+ }
50
+ function isQYWeiXin() {
51
+ var ua = window.navigator.userAgent.toLowerCase();
52
+ if ((ua.match(/MicroMessenger/i) == 'micromessenger') && (ua.match(/wxwork/i) == 'wxwork')) {
53
+ return true;
54
+ }
55
+ return false;
56
+ }
57
+
58
+ function isIOS() {
59
+ var ua = window.navigator.userAgent.toLowerCase();
60
+ if (ua.match(/iphone|ipad|ipod/)) {
61
+ return true;
62
+ }
63
+ return false;
64
+ }
65
+
66
+ function isAndroid() {
67
+ var ua = window.navigator.userAgent.toLowerCase();
68
+ if (ua.match(/android/)) {
69
+ return true;
70
+ }
71
+ return false;
72
+ }
73
+ var sensors = window['sensorsDataAnalytic201505'];
74
+ if (!sensors || judgeHkp()) return;
75
+ const sensorsUrl = process.env.VUE_APP_ENV_CONFIG === 'pro'
76
+ ? 'https://track.fhrons.com/sa?project=production' : 'https://track.fhrons.com/sa?project=default';
77
+ const heatmap_url = 'https://dop-pro-1251973116.file.myqcloud.com/upload/jsfile/sensors/heatmap.js';
78
+ const localTerminal = getStorage({ name: 'terminal', type: 'session' });
79
+ const terminal = localTerminal ? (localTerminal === 'normal' ? 'WECHAT' : localTerminal.toLowerCase() === 'pub' ? 'PUB' : localTerminal.toLowerCase() === 'app' ? 'APP' : '') : '';
80
+
81
+ sensors.init({
82
+ server_url: sensorsUrl,
83
+ heatmap_url,
84
+ heatmap: {
85
+ clickmap: 'default',
86
+ scroll_notice_map: 'default',
87
+ collect_tags: {
88
+ li: true,
89
+ img: true,
90
+ svg: true,
91
+ get_vtrack_config: true
92
+ }
93
+ },
94
+ is_track_single_page: true,
95
+ use_client_time: true,
96
+ send_type: 'beacon',
97
+ show_log: false,
98
+ app_js_bridge: true
99
+ });
100
+ sensors.registerPage({
101
+ product_name: function() {
102
+ if (getPlatFormCode() == '2') {
103
+ return i18n.t('api.sesnsor_request.w9jfj8');
104
+ }
105
+ return getStorage({ name: 'smPlatformInfoDto' })?.smSaasPlatformDO?.platformName;
106
+ },
107
+ refer_product_name: function() {
108
+ if (isWeiXin()) {
109
+ return getStorage({ name: 'smPlatformInfoDto' })?.smSaasPlatformDO?.platformName + i18n.t('applyprocess.examine.qi3cfh');
110
+ } else if (isQYWeiXin()) {
111
+ return getStorage({ name: 'smPlatformInfoDto' })?.smSaasPlatformDO?.platformName + i18n.t('utils.mockdata.unoim4');
112
+ } else if (isAndroid() || isIOS()) {
113
+ return getStorage({ name: 'smPlatformInfoDto' })?.smSaasPlatformDO?.platformName + (terminal || 'APP');
114
+ }
115
+ return getStorage({ name: 'smPlatformInfoDto' })?.smSaasPlatformDO?.platformName + (terminal || 'MOBILE_WEB');
116
+ },
117
+ saas_id: getPlatSaasId()
118
+ });
119
+ sensors.quick('autoTrack');
120
+ this.sensors = sensors;
121
+ },
122
+ getParam(param) {
123
+ const baseParam = Object.assign({}, this.baseParam);
124
+ if (baseParam) {
125
+ return Object.assign(baseParam, param);
126
+ }
127
+ return param;
128
+ },
129
+ separator(key, param, target) {
130
+ if (target) {
131
+ if (key === 'coreButtonClickNew' || key === 'coreButtonClickTeam' || key === 'coreButtonClickSale') {
132
+ target.track('coreButtonClick', param);
133
+ } else if (key === 'helpPageNew') {
134
+ target.track('helpPage', param);
135
+ } else if (key === 'searchClickTeam') {
136
+ target.track('searchClick', param);
137
+ } else if (key === 'searchReturnTeam') {
138
+ target.track('searchReturn', param);
139
+ } else if (key === 'digitaltabClick') {
140
+ target.track('tabClick', param);
141
+ } else {
142
+ target.track(key, param);
143
+ }
144
+ }
145
+ },
146
+ callTrack(methodName, _this, callParamFunc) {
147
+ const thirdSensors = window['sensorsDataAnalytic201505'];
148
+ if (thirdSensors && judgeNotHk()) {
149
+ if (!this.sensors) {
150
+ console.error('sensors is null ,please init first');
151
+ this.initSensorsData();
152
+ }
153
+ if (!methodName) {
154
+ this.sensors.login(_this);
155
+ return;
156
+ }
157
+ }
158
+ const rtnObj = sensorsFunc[methodName] && sensorsFunc[methodName].apply(_this, [methodName, _this]) || { key: methodName, param: _this };
159
+ // {key,param}
160
+ let { key, param } = rtnObj;
161
+ if (!key || !param) {
162
+ if (judgeHkp()) return;
163
+ alert('key or param is null');
164
+ return;
165
+ }
166
+ if (callParamFunc) {
167
+ param = callParamFunc.apply(_this, [param]);
168
+ }
169
+ if (thirdSensors && judgeNotHk()) {
170
+ this.separator(key, param, this.sensors);
171
+ }
172
+ const fhsensors = window['fhronsSensorsAnalytic202402'];
173
+ this.separator(key, param, fhsensors);
174
+ }
175
+ };