commit current frontend
此提交包含在:
@@ -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}
|
新增問題並參考
封鎖使用者