commit current frontend

此提交包含在:
2021-08-01 23:51:52 +08:00
父節點 c2e4a97373
當前提交 b839c99028
共有 25 個檔案被更改,包括 1765 行新增0 行删除

查看文件

@@ -0,0 +1,22 @@
import axios from 'axios'
import {appConfig} from "../config"
import Swal from "sweetalert2"
let myAxios=axios.create({
baseURL:appConfig.baseUrl
})
export function textbookTitleRefine(str){
return firstUpperCase(str.split('-').slice(1).join(' '))
}
export function firstUpperCase(str) {
return str.toLowerCase().replace(/( |^)[a-z]/g, (L) => L.toUpperCase())
}
export function showServerErrorAlert(){
Swal.fire({
title: '错误',
icon: 'error',
text: '拉取伺服器资料时出错'
})
}
export {myAxios}