question_uniapp/config/baseUrl.js
2025-06-07 04:49:21 +08:00

52 lines
1.4 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

let baseUrl = "";
let socketUrl = "";
if (process.env.NODE_ENV === 'development') {
// 开发环境
// baseUrl = "http://localhost:7001/";
// socketUrl = "ws://localhost:6001/";
baseUrl = "http://api.dxmt.io";
//socketUrl = "ws://8.129.186.35:6001/";
} else if (process.env.NODE_ENV === 'production') {
// 生产环境
baseUrl = "http://api.dxmt.io";
//socketUrl = "ws://8.129.186.35:6001/";
}
const courtConfig = {
//微信公众号APPID
publicAppId: "",
//请求接口
baseUrl: baseUrl,
//webSocket地址
socketUrl: socketUrl,
//平台名称
platformName: "Questionnaire",
//项目logo
logoUrl: "https://qn.kemean.cn/upload/201906/19/3f3b4751f3ed4a97be804450c3ec4c79",
//页面分享配置
share: {
title: 'Questionnaire',
// #ifdef MP-WEIXIN
path: '/pages/home/home', //小程序分享路径
// #endif
// #ifdef H5 || APP-PLUS
//公众号||APP分享
desc: "Questionnaire", // 分享描述
link: "#", // 分享链接该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
imgUrl: "#", // 分享图标
// #endif
}
};
//手机号验证正则表达式
const phoneRegular = /^1\d{10}$/;
//邮箱验证正则表达式
const mailRegular = /^\w+@\w+(\.[a-zA-Z]{2,3}){1,2}$/;
//密码验证正则表达式
const passwordRegular = /^[a-zA-Z0-9]{6,10}$/;
const lang = "en";
export default Object.assign({
phoneRegular,
mailRegular,
passwordRegular,
lang
}, courtConfig);