generated from Leo_Ding/web-template
Compare commits
3 Commits
3e24b16843
...
ae489532cc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ae489532cc | ||
|
|
bfc023d758 | ||
|
|
0a474cbae9 |
@ -1,5 +1,5 @@
|
|||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
import axios from 'axios'
|
||||||
// 获取地区
|
// 获取地区
|
||||||
export const getRegion = (params) => request.basic.get('/region', params)
|
export const getRegion = (params) => request.basic.get('/region', params)
|
||||||
|
|
||||||
@ -10,4 +10,10 @@ export const getCaptcha = (params) => request.basic.get('/api/v1/captcha/id', pa
|
|||||||
export const getCaptchaImage = (params) => request.basic.get('/api/v1/captcha/image', params , { responseType: 'blob' })
|
export const getCaptchaImage = (params) => request.basic.get('/api/v1/captcha/image', params , { responseType: 'blob' })
|
||||||
|
|
||||||
//上传图片
|
//上传图片
|
||||||
export const uploadImg=(params)=>request.basic.post('/api/v1/upload',params,{Headers:{'Content-Type': 'multipart/form-data'}})
|
// export const uploadImg=(params)=>request.basic.post('/api/v1/upload',params,{Headers:{'Authorization':'','Content-Type': 'multipart/form-data'}})
|
||||||
|
export const uploadImg=(params)=>axios.post('https://zh.shibeitong.com/api/v1/upload',params,{
|
||||||
|
headers: {
|
||||||
|
'Authorization':'',
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
},
|
||||||
|
})
|
||||||
@ -190,7 +190,7 @@ function handleOk() {
|
|||||||
try {
|
try {
|
||||||
showLoading()
|
showLoading()
|
||||||
const params = {
|
const params = {
|
||||||
...formData.value,
|
...values,
|
||||||
cover:spliceUrl(formData.value.fileList[0]),
|
cover:spliceUrl(formData.value.fileList[0]),
|
||||||
images:formData.value.fileList?formData.value.fileList.map(item=>spliceUrl(item)):[]
|
images:formData.value.fileList?formData.value.fileList.map(item=>spliceUrl(item)):[]
|
||||||
}
|
}
|
||||||
|
|||||||
@ -131,7 +131,7 @@ async function handleLogin() {
|
|||||||
loading.value = false
|
loading.value = false
|
||||||
if (config('http.code.success') === response.success) {
|
if (config('http.code.success') === response.success) {
|
||||||
if (appStore.complete) {
|
if (appStore.complete) {
|
||||||
goIndex()
|
goIndex();
|
||||||
} else {
|
} else {
|
||||||
await appStore.init()
|
await appStore.init()
|
||||||
goIndex()
|
goIndex()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user