fhrons-mobile-next 2.0.0 → 2.0.1
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.
- package/.env.poc +8 -0
- package/assets/css/colors.js +6 -0
- package/assets/css/customVant.less +60 -0
- package/assets/css/extra.css +32 -0
- package/assets/css/global.css +1 -0
- package/assets/css/global.less +1637 -0
- package/assets/css/index.js +63 -0
- package/assets/css/static.less +607 -0
- package/assets/js/func.js +361 -0
- package/assets/js/globalData.js +18 -0
- package/assets/js/qywxapi.js +484 -0
- package/{packages → assets/js}/storage.js +1 -20
- package/assets/js/upload.js +269 -0
- package/assets/js/validate.js +48 -0
- package/assets/js/vant.js +39 -0
- package/assets/js/wxapi.js +297 -0
- package/assets/vantLang/index.js +172 -0
- package/assets/vantLang/lib/en-US.js +95 -0
- package/assets/vantLang/lib/es-ES.js +95 -0
- package/assets/vantLang/lib/pt-PT.js +96 -0
- package/assets/vantLang/lib/zh-CN.js +96 -0
- package/assets/vantLang/lib/zh-HK.js +96 -0
- package/assets/vantLang/locales/en_US.js +102 -0
- package/assets/vantLang/locales/es_ES.js +102 -0
- package/assets/vantLang/locales/index.js +12 -0
- package/assets/vantLang/locales/pt_PT.js +102 -0
- package/assets/vantLang/locales/zh_CN.js +102 -0
- package/assets/vantLang/locales/zh_T.js +102 -0
- package/babel.config.js +15 -0
- package/fhcommon/index.js +33 -0
- package/fhcommon/package.json +40 -0
- package/index.js +68 -33
- package/inject-env-plugin.js +29 -0
- package/package.json +46 -32
- package/packages/areaMobile/index.js +5 -0
- package/packages/areaMobile/index.vue +260 -0
- package/packages/autoGraph/VueEsign.vue +309 -0
- package/packages/autoGraph/index.js +5 -0
- package/packages/autoGraph/index.vue +472 -0
- package/packages/commonForm/CommonAsyncAreaPicker.vue +223 -0
- package/packages/commonForm/CommonDatePicker.vue +152 -0
- package/packages/commonForm/CommonForm.vue +786 -0
- package/packages/commonForm/CommonFullTimePicker.vue +137 -0
- package/packages/commonForm/CommonSinglePicker.vue +121 -0
- package/packages/commonForm/CommonYearMonthPicker.vue +127 -0
- package/packages/commonForm/index.js +33 -0
- package/packages/dialog/index.js +32 -0
- package/packages/dialog/index.vue +379 -0
- package/packages/index.js +7 -3
- package/packages/introduce/index.js +5 -0
- package/packages/introduce/index.vue +31 -0
- package/packages/loading/Loading.vue +70 -0
- package/packages/loading/index.js +43 -0
- package/packages/mindMap/index.js +5 -0
- package/packages/mindMap/index.vue +437 -0
- package/packages/pdfViewer/index.js +12 -0
- package/packages/pdfViewer/index.vue +131 -0
- package/packages/sharePanel/SheetPanel.vue +316 -0
- package/packages/sharePanel/index.js +5 -0
- package/packages/sharePanel/index.vue +476 -0
- package/packages/sharePanel/props.js +58 -0
- package/packages/sharePanel/utils/QyWxShareMixin.js +93 -0
- package/packages/sharePanel/utils/shareWay.js +81 -0
- package/packages/theme/index copy.js +89 -0
- package/packages/theme/index.js +38 -0
- package/packages/theme/theme.css +910 -0
- package/packages/theme/theme.less +26 -0
- package/packages/uploadFile/VanUploadFile.vue +80 -0
- package/packages/uploadFile/index.js +5 -0
- package/packages/uploadFile/index.vue +725 -0
- package/packages/uploadFile/vanUpload.js +5 -0
- package/packages/verify/Verify/VerifyPoints.vue +247 -0
- package/packages/verify/Verify/VerifySlide.vue +364 -0
- package/packages/verify/index.js +5 -0
- package/packages/verify/index.vue +416 -0
- package/packages/verify/utils/verify.js +53 -0
- package/packages/videoPage/index.js +5 -0
- package/packages/videoPage/index.vue +405 -0
- package/plugins/sensors/fhsensors.js +84 -0
- package/plugins/sensors/sensors.js +175 -0
- package/plugins/sensors/sensorsFun.js +1387 -0
- package/fhrons-mobile-next-2.0.0.tgz +0 -0
- package/packages/fhImage/index.js +0 -5
- package/packages/fhImage/index.vue +0 -57
- package/packages/fhPresetImage/index.js +0 -5
- package/packages/fhPresetImage/index.vue +0 -39
- package/packages/html2canvas/index.js +0 -29
- package/upload copy.js +0 -468
- package/utils/tools.js +0 -22
- /package/{dist → fhcommon/dist}/fhcommon.min.js +0 -0
- /package/{dist → fhcommon/dist}/fhcommon.min.js.LICENSE.txt +0 -0
- /package/{upload.js → fhcommon/upload.js} +0 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import i18n from '../../../assets/vantLang';
|
|
2
|
+
export default () => [
|
|
3
|
+
{
|
|
4
|
+
name: i18n.t('mystore.mystore.th2a97'),
|
|
5
|
+
icon: 'https://scrm-pro-1251973116.cos.ap-shanghai-fsi.myqcloud.com/upload/common/scrm/2022/01/10/bcfd8ba8_e3f1_4ca8_85f7_5f4982a4923c.png',
|
|
6
|
+
type: 'AppMessage',
|
|
7
|
+
flag: '1'
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
name: i18n.t('signsale.productposter.87yko0'),
|
|
11
|
+
icon: 'https://scrm-pro-1251973116.cos.ap-shanghai-fsi.myqcloud.com/upload/common/scrm/2022/01/10/d845cb67_09bd_43e7_8711_627bb006fb42.png',
|
|
12
|
+
type: 'Timeline',
|
|
13
|
+
flag: '0'
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
name: i18n.t('utils.mockdata.unoim4'),
|
|
17
|
+
icon: 'https://dop-pro-1251973116.file.myqcloud.com/upload/img/funzg/qiwei.png',
|
|
18
|
+
type: 'QyAppMessage',
|
|
19
|
+
flag: '2'
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
name: i18n.t('componentsfile.sharemediapanel.wt1879'),
|
|
23
|
+
icon: 'https://scrm-pro-1251973116.cos.ap-shanghai-fsi.myqcloud.com/upload/common/scrm/2022/01/10/3688edc7_92bf_4b1a_ac0b_72555ee56c79.png',
|
|
24
|
+
type: 'AppDownload',
|
|
25
|
+
flag: '3'
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: i18n.t('mystore.mystore.8dm6b7'),
|
|
29
|
+
icon: 'https://dop-pro-1251973116.file.myqcloud.com/upload/img/funzg/icon_fuzhilianjie.png',
|
|
30
|
+
type: 'link'
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: i18n.t('mystore.mystore.rxyypz'),
|
|
34
|
+
icon: 'https://dop-pro-1251973116.file.myqcloud.com/upload/img/funzg/icon_xiazaierweima.png',
|
|
35
|
+
type: 'AppDownloadCode'
|
|
36
|
+
},
|
|
37
|
+
...AbroadShareWay()
|
|
38
|
+
]
|
|
39
|
+
|
|
40
|
+
// 海外分享方式 AppType - 传给Android的App类型
|
|
41
|
+
export const AbroadShareWay = () => [
|
|
42
|
+
{
|
|
43
|
+
name: 'WhatsApp',
|
|
44
|
+
icon: 'https://dop-pro-1251973116.file.myqcloud.com/upload/img/funzg/whatsApp.png',
|
|
45
|
+
type: 'WhatsApp',
|
|
46
|
+
AppType: 0
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: 'Twitter',
|
|
50
|
+
icon: 'https://dop-pro-1251973116.file.myqcloud.com/upload/img/funzg/twitter.png',
|
|
51
|
+
type: 'Twitter',
|
|
52
|
+
AppType: 1
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: 'Facebook',
|
|
56
|
+
icon: 'https://dop-pro-1251973116.file.myqcloud.com/upload/img/funzg/facebook.png',
|
|
57
|
+
type: 'Facebook',
|
|
58
|
+
AppType: 2
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: 'Instagram',
|
|
62
|
+
icon: 'https://dop-pro-1251973116.file.myqcloud.com/upload/img/funzg/instagram.png',
|
|
63
|
+
type: 'Instagram',
|
|
64
|
+
AppType: 3
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: 'Gmail',
|
|
68
|
+
icon: 'https://dop-pro-1251973116.file.myqcloud.com/upload/img/funzg/Gmail.png',
|
|
69
|
+
type: 'Gmail',
|
|
70
|
+
AppType: 6
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
|
|
74
|
+
// 分享指引多语言图片静态资源
|
|
75
|
+
export const shareGuide = {
|
|
76
|
+
zh_CN: 'https://dop-pro-1251973116.file.myqcloud.com/upload/img/funzg/share2.png',
|
|
77
|
+
zh_T: 'https://dop-pro-1251973116.file.myqcloud.com/upload/img/lzgweb/productNotice/shareT.png',
|
|
78
|
+
en_US: 'https://dop-pro-1251973116.file.myqcloud.com/upload/img/lzgweb/productNotice/shareEnUs.png',
|
|
79
|
+
pt_PT: 'https://dop-pro-1251973116.file.myqcloud.com/upload/img/lzgweb/productNotice/shareEnUs.png',
|
|
80
|
+
es_ES: 'https://dop-pro-1251973116.file.myqcloud.com/upload/img/lzgweb/productNotice/shareES.png'
|
|
81
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { hexToRGBA, isEmpty } from '../../assets/js/func';
|
|
2
|
+
import { setStorage, getStorage } from '../../assets/js/storage';
|
|
3
|
+
const path = require('path');
|
|
4
|
+
|
|
5
|
+
let lessNodesAppended;
|
|
6
|
+
/**
|
|
7
|
+
* 更新主题色的方法
|
|
8
|
+
* @param {*} colorObj // 色值对象,包含mainColor和subColor
|
|
9
|
+
* @param {*} lessPath // 自定义的主题色less文件的位置,建议放在public文件夹下 '/' + projectName + '/static/theme.less'
|
|
10
|
+
* @param {*} isPreview // 是否是预览页,主要用于装修的预览,可以不传
|
|
11
|
+
* @returns
|
|
12
|
+
*/
|
|
13
|
+
const updateTheme = (colorObj, lessPath = '', isPreview = false) => {
|
|
14
|
+
const fontColor = colorObj.mainColor || '#158cff';
|
|
15
|
+
const subColor = colorObj.subColor || '#e7f3ff';
|
|
16
|
+
let sessionPlatformInfo = getStorage({ name: 'platformInfo', type: 'session' });
|
|
17
|
+
|
|
18
|
+
if (isEmpty(sessionPlatformInfo)) {
|
|
19
|
+
sessionPlatformInfo = { primaryColor: fontColor, attachedColor: subColor };
|
|
20
|
+
} else {
|
|
21
|
+
if (typeof sessionPlatformInfo === 'string') {
|
|
22
|
+
sessionPlatformInfo = JSON.parse(sessionPlatformInfo);
|
|
23
|
+
}
|
|
24
|
+
sessionPlatformInfo = Object.assign(sessionPlatformInfo, { primaryColor: fontColor, attachedColor: subColor });
|
|
25
|
+
}
|
|
26
|
+
setStorage({ name: 'platformInfo', content: sessionPlatformInfo, type: 'session' });
|
|
27
|
+
return new Promise(resolve => {
|
|
28
|
+
if (!fontColor) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
function buildIt () {
|
|
32
|
+
// 正确的判定less是否已经加载less.modifyVars可用
|
|
33
|
+
if (!window.less || !window.less.modifyVars) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const colorObj = {};
|
|
37
|
+
for (let i = 1; i < 101; i++) {
|
|
38
|
+
colorObj[`@themeColor${i}`] = hexToRGBA(fontColor, i / 100);
|
|
39
|
+
colorObj[`@themeColor`] = fontColor;
|
|
40
|
+
}
|
|
41
|
+
window.less
|
|
42
|
+
.modifyVars(colorObj)
|
|
43
|
+
.then(() => {
|
|
44
|
+
if (!isPreview) setStorage({ name: 'themeColor', content: fontColor });
|
|
45
|
+
resolve('success');
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
}
|
|
50
|
+
if (!lessNodesAppended) {
|
|
51
|
+
const lessList = ['https://dop-pro-1251973116.file.myqcloud.com/upload/jsfile/funzg/fhrons-mobile-theme.less', lessPath ? path.join(lessPath) : '']
|
|
52
|
+
|
|
53
|
+
const lessConfigNode = document.createElement('script');
|
|
54
|
+
const lessScriptNode = document.createElement('script');
|
|
55
|
+
// 下方这个color.less位置大家也可以按需修改
|
|
56
|
+
// '/' + projectName + '/static/theme.less'
|
|
57
|
+
lessConfigNode.innerHTML = `
|
|
58
|
+
window.less = {
|
|
59
|
+
async: true,
|
|
60
|
+
env: 'production',
|
|
61
|
+
javascriptEnabled: true
|
|
62
|
+
};
|
|
63
|
+
`;
|
|
64
|
+
// less的src地址也可以是cdn地址
|
|
65
|
+
lessScriptNode.src = `https://dop-pro-1251973116.file.myqcloud.com/upload/jsfile/funzg/less.min.js`;
|
|
66
|
+
lessScriptNode.crossorigin = 'anonymous';
|
|
67
|
+
lessScriptNode.async = true;
|
|
68
|
+
lessScriptNode.onload = () => {
|
|
69
|
+
buildIt();
|
|
70
|
+
lessScriptNode.onload = null;
|
|
71
|
+
};
|
|
72
|
+
lessList.forEach(item => {
|
|
73
|
+
if (item) {
|
|
74
|
+
const lessStyleNode = document.createElement('link');
|
|
75
|
+
lessStyleNode.setAttribute('rel', 'stylesheet/less');
|
|
76
|
+
lessStyleNode.setAttribute('type', 'text/css');
|
|
77
|
+
lessStyleNode.setAttribute('href', item);
|
|
78
|
+
document.body.appendChild(lessStyleNode);
|
|
79
|
+
}
|
|
80
|
+
})
|
|
81
|
+
document.body.appendChild(lessConfigNode);
|
|
82
|
+
document.body.appendChild(lessScriptNode);
|
|
83
|
+
lessNodesAppended = true;
|
|
84
|
+
} else {
|
|
85
|
+
buildIt();
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
};
|
|
89
|
+
export default updateTheme;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { hexToRGBA, isEmpty } from '../../assets/js/func';
|
|
2
|
+
import { setStorage, getStorage } from '../../assets/js/storage';
|
|
3
|
+
// const path = require('path');
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* 更新主题色的方法
|
|
7
|
+
* @param {*} lessPath // 自定义的主题色less文件的位置,建议放在public文件夹下 '/' + projectName + '/static/theme.less'
|
|
8
|
+
* @param {*} colorObj // 色值对象,包含mainColor和subColor
|
|
9
|
+
* @param {*} isPreview // 是否是预览页,主要用于装修的预览,可以不传
|
|
10
|
+
* @returns
|
|
11
|
+
*/
|
|
12
|
+
const updateTheme = (colorObj=getStorage({name: 'themeColorObj'}), lessPath = '', isPreview = false) => {
|
|
13
|
+
const fontColor = colorObj && colorObj.mainColor || '#158cff';
|
|
14
|
+
const subColor = colorObj && colorObj.subColor || '#e7f3ff';
|
|
15
|
+
let sessionPlatformInfo = getStorage({ name: 'platformInfo', type: 'session' });
|
|
16
|
+
|
|
17
|
+
if (isEmpty(sessionPlatformInfo)) {
|
|
18
|
+
sessionPlatformInfo = { primaryColor: fontColor, attachedColor: subColor };
|
|
19
|
+
} else {
|
|
20
|
+
if (typeof sessionPlatformInfo === 'string') {
|
|
21
|
+
sessionPlatformInfo = JSON.parse(sessionPlatformInfo);
|
|
22
|
+
}
|
|
23
|
+
sessionPlatformInfo = Object.assign(sessionPlatformInfo, { primaryColor: fontColor, attachedColor: subColor });
|
|
24
|
+
}
|
|
25
|
+
setStorage({ name: 'platformInfo', content: sessionPlatformInfo, type: 'session' });
|
|
26
|
+
return new Promise(resolve => {
|
|
27
|
+
if (!fontColor) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
function buildIt () {
|
|
31
|
+
for (let i = 1; i < 101; i++) {
|
|
32
|
+
document.documentElement.style.setProperty(`--theme-color${i}`, hexToRGBA(fontColor, i / 100));
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
buildIt();
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
export default updateTheme;
|