package com.cooleshow.base.common;

import com.cooleshow.base.BuildConfig;
import com.tencent.open.im.IM;

/**
 * Author by pq, Date on 2022/4/21.
 */
public class BaseConstant {
    public final static String SERVER_ADDRESS = BuildConfig.BASE_SERVER_URL;
    public final static String TEACHER_GROUP = "api-teacher/";
    public final static String STUDENT_GROUP = "api-student/";
    public final static String AUTH_GROUP = "api-auth/";
    public final static String ADMIN_GROUP = "api-admin/";
    public final static String MALL_ADMIN_SERVER = "api-mall-admin/";
    public final static String MALL_PORTAL_SERVER = "api-mall-portal/";
    public final static String CMS_SERVER = "api-cms/";
    public final static String IMAGE_VERIFY_CODE_API_URL = "code/getImageCode?phone=";


    public final static String TABLE_PREFS = "Kotlin_mall";
    public final static String KEY_SP_TOKEN = "token";
    public final static String STUDENT_ID = "student_id";
    public final static String CHECK_ADDRESS = "check_address";

    /**
     * 获取图片验证码地址
     * @return
     */
    public static String getImgCodeApiUrl() {
        if (BaseApplication.Companion.isTeacherClient()) {
            return SERVER_ADDRESS+TEACHER_GROUP + IMAGE_VERIFY_CODE_API_URL;
        }
        return SERVER_ADDRESS+STUDENT_GROUP + IMAGE_VERIFY_CODE_API_URL;
    }
}
