File tree Expand file tree Collapse file tree 4 files changed +9
-5
lines changed Expand file tree Collapse file tree 4 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -138,7 +138,6 @@ _axios.interceptors.response.use(async (res) => {
138
138
reject ( res )
139
139
return
140
140
}
141
- console . log ( 'msg' , msg )
142
141
// 本次请求添加 params 参数:showBackend 为 true, 弹出后端返回错误信息
143
142
if ( params && params . showBackend ) {
144
143
[ message ] = msg
@@ -157,7 +156,7 @@ _axios.interceptors.response.use(async (res) => {
157
156
message,
158
157
type : 'error' ,
159
158
} )
160
- resolve ( res . data )
159
+ reject ( )
161
160
} )
162
161
} , ( error ) => {
163
162
if ( ! error . response ) {
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ class Book {
12
12
13
13
// 类中的方法可以代表一个用户行为
14
14
async addBook ( info ) {
15
- const res = await post ( 'v1/book' , info )
15
+ const res = await post ( 'v1/book' , info , { handleError : true } )
16
16
return res
17
17
}
18
18
Original file line number Diff line number Diff line change 2
2
<div class =" lin-container" >
3
3
<div class =" lin-title" >富文本舞台页面</div >
4
4
<div class =" lin-wrap" >
5
- <tinymce @change =" change" upload_url =" http://dev.lin.colorful3.com/cms/file/" />
5
+ <tinymce @change =" change" :defaultContent = " text " upload_url =" http://dev.lin.colorful3.com/cms/file/" />
6
6
</div >
7
7
</div >
8
8
</template >
12
12
import Tinymce from ' @/components/base/tinymce'
13
13
14
14
export default {
15
- name: ' ImgsUploadStage1' ,
15
+ data () {
16
+ return {
17
+ text: ' this is default content' ,
18
+ }
19
+ },
16
20
components: {
17
21
Tinymce,
18
22
},
Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ export default {
68
68
this .resetForm (formName)
69
69
}
70
70
} catch (error) {
71
+ this .$message .error (error .data .msg )
71
72
console .log (error)
72
73
}
73
74
},
You can’t perform that action at this time.
0 commit comments