Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/lin/plugins/axios.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ _axios.interceptors.response.use(async (res) => {
reject(res)
return
}
console.log('msg', msg)
// 本次请求添加 params 参数:showBackend 为 true, 弹出后端返回错误信息
if (params && params.showBackend) {
[message] = msg
Expand All @@ -157,7 +156,7 @@ _axios.interceptors.response.use(async (res) => {
message,
type: 'error',
})
resolve(res.data)
reject()
})
}, (error) => {
if (!error.response) {
Expand Down
2 changes: 1 addition & 1 deletion src/models/book.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Book {

// 类中的方法可以代表一个用户行为
async addBook(info) {
const res = await post('v1/book', info)
const res = await post('v1/book', info, { handleError: true })
return res
}

Expand Down
8 changes: 6 additions & 2 deletions src/plugins/custom/views/Tinymce.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="lin-container">
<div class="lin-title">富文本舞台页面</div>
<div class="lin-wrap">
<tinymce @change="change" upload_url="http://dev.lin.colorful3.com/cms/file/" />
<tinymce @change="change" :defaultContent="text" upload_url="http://dev.lin.colorful3.com/cms/file/" />
</div>
</div>
</template>
Expand All @@ -12,7 +12,11 @@
import Tinymce from '@/components/base/tinymce'

export default {
name: 'ImgsUploadStage1',
data() {
return {
text: 'this is default content',
}
},
components: {
Tinymce,
},
Expand Down
1 change: 1 addition & 0 deletions src/views/book/BookAdd.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export default {
this.resetForm(formName)
}
} catch (error) {
this.$message.error(error.data.msg)
console.log(error)
}
},
Expand Down