You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
607 B
JavaScript

let url_ = "https://zwzyy-api.cjy.net.cn";
const dev = 0
if (dev === 1) {
url_ = "http://127.0.0.1:8000"
}
let url_array = {};
url_array['Question/save'] = `${url_}/api/Mp/Question/save`;
url_array['Upload/image'] = `${url_}/api/Mp/Upload/image`;
url_array['User/info'] = `${url_}/api/Mp/User/info`;
url_array['Question/list'] = `${url_}/api/Mp/Question/list`;
url_array['Post/info'] = `${url_}/api/Mp/Post/info`;
url_array['Post/list'] = `${url_}/api/Mp/Post/list`;
url_array['YO'] = `${url_}/api/yo`;
const api = (mark) => {
if (mark === '') return url_;
return url_array[mark];
}
export default api;