import mxConfig from "@/common/mxConfig";
import {combineOssFile} from "@/utils";

export default {
    data() {
        return {
            formGroupBinding: {
                type: 'main',
                bold: true,
                margin: '15px 0 0 0'
            },
            formInputBinding: {
                fontSize: 16,
                border: "bottom",
                inputAlign: "right"
            },
            gradientBtnBinding: {
                color: `linear-gradient(270deg, var(--primary-light-color), var(--primary-deep-color)`,
                customStyle: {height: '44px'},
                shape: 'circle',
                class: '!flex-1'
            },
            plainBtnBinding: {
                type: 'primary',
                plain: true,
                shape: 'circle',
                customStyle: {height: '44px'},
                class: '!flex-1'
            },
            singleTitleBinding: {
                title: '院校录取概率测试',
                subTitle: '测录取概率',
                description: '选择院校专业，测算录取概率及分析'
            },
            analysisTitleBinding: {
                mode: 'light',
                title: '模拟志愿分析',
                subTitle: '志愿分析',
                description: '输入院校专业，分析志愿合理性',
                bgIcon: '/static/ie/entry/bg-large-header-analysis.png',
                bgIconWidth: 128,
                titleStyle: {
                    backgroundImage: this.makeEnvImagePath('static/ie/entry/bg-large-header-title.png'),
                    backgroundPosition: 'bottom right',
                    backgroundSize: '80% auto',
                    backgroundRepeat: 'no-repeat'
                }
            },
            aiTitleBinding: {
                mode: 'light',
                title: 'AI志愿',
                subTitle: 'AI志愿',
                description: '填写信息，人工智能推荐合理志愿',
                bgIcon: '/static/ie/entry/bg-large-header-light.png',
                bgIconWidth: 96
            },
            reportTitleBinding: {
                title: '志愿报告',
                bgIcon: '/static/ie/entry/bg-ai-report.png',
                bgIconHeight: '110',
                subTitle: '你的专属报告',
                description: '精准分析 提升录取概率',
                contentCustomClass: 'ai-sta'
            },
            calculateTitleBinding: {
                mode: 'light',
                title: '职业技能分测算',
                subTitle: '测职业技能分',
                description: '输入分数，测算所需职业技能分',
                bgIcon: '/static/ie/entry/bg-large-header-calculate.png',
                bgIconHeight: 104
            }
        }
    },
    methods: {
        makeEnvImagePath(path) {
            // backgroundImage的路径需要手工处理
            const routerBase = mxConfig.ossFileBase || __uniConfig.router.base || '/'
            return `url('${combineOssFile(routerBase + path)}')`
        }
    },
}