|
@@ -150,24 +150,22 @@ export default {
|
|
|
// headers: {
|
|
|
// 'Content-Type': 'multipart/form-data'
|
|
|
// },
|
|
|
- withCredentials: true
|
|
|
+ // withCredentials: true
|
|
|
} // 添加请求头
|
|
|
return new Promise((resolve, reject) => {
|
|
|
axios.post(
|
|
|
- 'http://star.xiaojukeji.com/upload/img.node',
|
|
|
+ '//star.xiaojukeji.com/upload/img.node',
|
|
|
{
|
|
|
- 'imgData': imgData,
|
|
|
+ imgData,
|
|
|
'innerPublic': true
|
|
|
- },
|
|
|
- config
|
|
|
- )
|
|
|
- .then(res => {
|
|
|
- console.log(res)
|
|
|
- // newStr = newStr.replace(imgData, res.url)
|
|
|
- resolve(res.url)
|
|
|
- }).catch(err => {
|
|
|
- reject(err)
|
|
|
- })
|
|
|
+ }
|
|
|
+ ).then(res => {
|
|
|
+ console.log(res)
|
|
|
+ // newStr = newStr.replace(imgData, res.url)
|
|
|
+ resolve(res.url)
|
|
|
+ }).catch(err => {
|
|
|
+ reject(err)
|
|
|
+ })
|
|
|
})
|
|
|
},
|
|
|
changeText(e) { // 富文本内容改变
|