export default {
    ossFileBase: '',
    cameraAuthTips:
        "(1)系统将获取相机权限，用于拍照等场景\n(2)系统将获取外部存储(含相册)读取权限，用于选择图片等场景",
    scoreLockingTips: "", //'现在是志愿填报正式阶段，请准确填入您的高考分数和科目，确认后不可再修改',
    scoreLockedTips: "", //'*志愿填报正式阶段不能修改分数与科目',
    scoreRuleTips: "", //'*出分前分数与科目可以多次输入，出分后只能输入一次，系统使用视频可以在个人中心的使用教程查看',
    inlineSiteFunctionPaths: {
        protocolPrivacy: "/protocol/mxjb_privacy_IE.html",
        protocolUser: "/protocol/mxjb_user_IE.html",
        previewPDF: "/pdfView/index.html?src=",
        FAQ: "/FAQ/FAQ_IE.html",
    },
    fileHelper: {
        supportPDFTypes: ["pdf"],
        supportOfficeTypes: [
            "doc",
            "xls",
            "ppt",
            "pdf",
            "docx",
            "xlsx",
            "pptx",
        ],
        supportImageTypes: ["png", "jpg", "jpeg"],
        isPDF: function (url) {
            return this.supportPDFTypes.some((type) => url.endsWith(type));
        },
        isOffice: function (url) {
            return this.supportOfficeTypes.some((type) => url.endsWith(type));
        },
        isImage: function (url) {
            return this.supportImageTypes.some((type) => url.endsWith(type));
        },
        isFile: function (url) {
            return this.isPDF(url) || this.isOffice(url);
        },
        getFileType: function (url) {
            const lastDotIdx = url.lastIndexOf(".");
            const suffix = url.substring(lastDotIdx + 1);
            return suffix;
        },
    },
};
