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) => {
138138 reject ( res )
139139 return
140140 }
141- console . log ( 'msg' , msg )
142141 // 本次请求添加 params 参数:showBackend 为 true, 弹出后端返回错误信息
143142 if ( params && params . showBackend ) {
144143 [ message ] = msg
@@ -157,7 +156,7 @@ _axios.interceptors.response.use(async (res) => {
157156 message,
158157 type : 'error' ,
159158 } )
160- resolve ( res . data )
159+ reject ( )
161160 } )
162161} , ( error ) => {
163162 if ( ! error . response ) {
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ class Book {
1212
1313 // 类中的方法可以代表一个用户行为
1414 async addBook ( info ) {
15- const res = await post ( 'v1/book' , info )
15+ const res = await post ( 'v1/book' , info , { handleError : true } )
1616 return res
1717 }
1818
Original file line number Diff line number Diff line change 22 <div class =" lin-container" >
33 <div class =" lin-title" >富文本舞台页面</div >
44 <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/" />
66 </div >
77 </div >
88</template >
1212import Tinymce from ' @/components/base/tinymce'
1313
1414export default {
15- name: ' ImgsUploadStage1' ,
15+ data () {
16+ return {
17+ text: ' this is default content' ,
18+ }
19+ },
1620 components: {
1721 Tinymce,
1822 },
Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ export default {
6868 this .resetForm (formName)
6969 }
7070 } catch (error) {
71+ this .$message .error (error .data .msg )
7172 console .log (error)
7273 }
7374 },
You can’t perform that action at this time.
0 commit comments