Browse Source

添加报错提示

master V0.1.6
zhangyj-html 2 years ago
parent
commit
26a0370f39
  1. 2
      dist/css/app.d5a8d1c6.css
  2. 2
      dist/index.html
  3. 2
      dist/js/app.07964316.js
  4. 1
      dist/js/app.07964316.js.map
  5. 2
      dist/js/app.f44e32b8.js
  6. 1
      dist/js/app.f44e32b8.js.map
  7. 2
      dist/js/chunk-vendors.11e05337.js
  8. 1
      dist/js/chunk-vendors.11e05337.js.map
  9. 1
      dist/js/chunk-vendors.132157ac.js.map
  10. 4
      src/main.js
  11. 11
      src/utils/request.js
  12. 26
      src/views/Home.vue
  13. 8
      vue.config.js

2
dist/css/app.bd1520db.css → dist/css/app.d5a8d1c6.css

@ -1 +1 @@
body,html{height:100%}body{margin:0}#app{font-family:Avenir,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#2c3e50;height:100%}::-webkit-scrollbar{width:7px!important;height:7px}::-webkit-scrollbar-track{border-radius:10px;background-color:#e7e7e7}::-webkit-scrollbar-thumb{border-radius:10px;background-color:#909399}.el-dialog__wrapper .el-dialog .el-dialog__body .box_style .demo-ruleForm .el-row{margin-left:0!important;margin-right:0!important}.box_style[data-v-940a84bc]{overflow-y:auto}.index[data-v-6a24fcce]{padding:10px 30px 10px;height:100%;display:flex;flex-direction:column;background-color:#fff;border-radius:5px;box-sizing:border-box}.index .search_b[data-v-6a24fcce]{margin-bottom:0;padding:5px 0}.index .search_b[data-v-6a24fcce] .search_form{flex:1}.index .search_b[data-v-6a24fcce] .search_form .el-row{margin-left:0!important;margin-right:0!important}.index .search_b[data-v-6a24fcce] .el-form-item{margin-bottom:0;display:flex}.index .search_b[data-v-6a24fcce] .el-form-item .el-form-item__content{flex:1}.index .search_b[data-v-6a24fcce] .btn_b .el-button{margin:0}.index .search_b[data-v-6a24fcce] .btn_b .el-button:not(:first-child){margin-top:10px}.index .add_count_b[data-v-6a24fcce]{padding:8px 0;border-top:1px solid #ebeef5}.index .add_count_b .total_b[data-v-6a24fcce]{font-size:14px;color:#606266}.index .page_b[data-v-6a24fcce]{display:flex;align-items:center;justify-content:space-between;padding:5px 0}.index .el-table[data-v-6a24fcce] .el-image-viewer__wrapper .el-image-viewer__close{color:#fff}.index .demo-ruleForm .el-row[data-v-6a24fcce]{margin-left:0!important;margin-right:0!important}.index .label[data-v-6a24fcce]{width:150px}.index .el-dropdown-link[data-v-6a24fcce]{cursor:pointer;color:#1890ff;font-size:12px}.index .el-icon-arrow-down[data-v-6a24fcce]{font-size:12px}.detail_item{border-bottom:1px dashed #eee;padding:0 10px;border-radius:5px;line-height:30px;min-height:30px}.el-upload-list__item{transition:none!important}.u-f{display:flex}.u-fdc{flex-direction:column}.u-as{align-items:flex-start}.u-ac{align-items:center}.u-ae{align-items:flex-end}.u-jcs{justify-content:flex-start}.u-jcc{justify-content:center}.u-jce{justify-content:flex-end}.u-jca{justify-content:space-around}.u-jcb{justify-content:space-between}.u-flex{flex:1}.u-fcc{justify-content:center}.u-fcb,.u-fcc{display:flex;align-items:center}.u-fcb{justify-content:space-between}.u-fca{display:flex;align-items:center;justify-content:space-around}
body,html{height:100%}body{margin:0}#app{font-family:Avenir,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#2c3e50;height:100%}::-webkit-scrollbar{width:7px!important;height:7px}::-webkit-scrollbar-track{border-radius:10px;background-color:#e7e7e7}::-webkit-scrollbar-thumb{border-radius:10px;background-color:#909399}.el-dialog__wrapper .el-dialog .el-dialog__body .box_style .demo-ruleForm .el-row{margin-left:0!important;margin-right:0!important}.box_style[data-v-940a84bc]{overflow-y:auto}.index[data-v-59a9e38e]{padding:10px 30px 10px;height:100%;display:flex;flex-direction:column;background-color:#fff;border-radius:5px;box-sizing:border-box}.index .search_b[data-v-59a9e38e]{margin-bottom:0;padding:5px 0}.index .search_b[data-v-59a9e38e] .search_form{flex:1}.index .search_b[data-v-59a9e38e] .search_form .el-row{margin-left:0!important;margin-right:0!important}.index .search_b[data-v-59a9e38e] .el-form-item{margin-bottom:0;display:flex}.index .search_b[data-v-59a9e38e] .el-form-item .el-form-item__content{flex:1}.index .search_b[data-v-59a9e38e] .btn_b .el-button{margin:0}.index .search_b[data-v-59a9e38e] .btn_b .el-button:not(:first-child){margin-top:10px}.index .add_count_b[data-v-59a9e38e]{padding:8px 0;border-top:1px solid #ebeef5}.index .add_count_b .total_b[data-v-59a9e38e]{font-size:14px;color:#606266}.index .page_b[data-v-59a9e38e]{display:flex;align-items:center;justify-content:space-between;padding:5px 0}.index .el-table[data-v-59a9e38e] .el-image-viewer__wrapper .el-image-viewer__close{color:#fff}.index .demo-ruleForm .el-row[data-v-59a9e38e]{margin-left:0!important;margin-right:0!important}.index .label[data-v-59a9e38e]{width:150px}.index .el-dropdown-link[data-v-59a9e38e]{cursor:pointer;color:#1890ff;font-size:12px}.index .el-icon-arrow-down[data-v-59a9e38e]{font-size:12px}.detail_item{border-bottom:1px dashed #eee;padding:0 10px;border-radius:5px;line-height:30px;min-height:30px}.el-upload-list__item{transition:none!important}.u-f{display:flex}.u-fdc{flex-direction:column}.u-as{align-items:flex-start}.u-ac{align-items:center}.u-ae{align-items:flex-end}.u-jcs{justify-content:flex-start}.u-jcc{justify-content:center}.u-jce{justify-content:flex-end}.u-jca{justify-content:space-around}.u-jcb{justify-content:space-between}.u-flex{flex:1}.u-fcc{justify-content:center}.u-fcb,.u-fcc{display:flex;align-items:center}.u-fcb{justify-content:space-between}.u-fca{display:flex;align-items:center;justify-content:space-around}

2
dist/index.html

@ -1 +1 @@
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>articleadmin</title><link href="/js/about.ed7f9285.js" rel="prefetch"><link href="/css/app.bd1520db.css" rel="preload" as="style"><link href="/css/chunk-vendors.06c3b195.css" rel="preload" as="style"><link href="/js/app.07964316.js" rel="preload" as="script"><link href="/js/chunk-vendors.132157ac.js" rel="preload" as="script"><link href="/css/chunk-vendors.06c3b195.css" rel="stylesheet"><link href="/css/app.bd1520db.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but articleadmin doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="/js/chunk-vendors.132157ac.js"></script><script src="/js/app.07964316.js"></script></body></html>
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>articleadmin</title><link href="/js/about.ed7f9285.js" rel="prefetch"><link href="/css/app.d5a8d1c6.css" rel="preload" as="style"><link href="/css/chunk-vendors.06c3b195.css" rel="preload" as="style"><link href="/js/app.f44e32b8.js" rel="preload" as="script"><link href="/js/chunk-vendors.11e05337.js" rel="preload" as="script"><link href="/css/chunk-vendors.06c3b195.css" rel="stylesheet"><link href="/css/app.d5a8d1c6.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but articleadmin doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="/js/chunk-vendors.11e05337.js"></script><script src="/js/app.f44e32b8.js"></script></body></html>

2
dist/js/app.07964316.js
File diff suppressed because it is too large
View File

1
dist/js/app.07964316.js.map
File diff suppressed because it is too large
View File

2
dist/js/app.f44e32b8.js
File diff suppressed because it is too large
View File

1
dist/js/app.f44e32b8.js.map
File diff suppressed because it is too large
View File

2
dist/js/chunk-vendors.11e05337.js
File diff suppressed because it is too large
View File

1
dist/js/chunk-vendors.11e05337.js.map
File diff suppressed because it is too large
View File

1
dist/js/chunk-vendors.132157ac.js.map
File diff suppressed because it is too large
View File

4
src/main.js

@ -8,6 +8,10 @@ import 'element-ui/lib/theme-chalk/index.css';
Vue.use(Element)
Vue.config.productionTip = false
Vue.config.errorHandler = function (err, vm, info) {
console.log(err.message);
console.log(info);
};
new Vue({
router,

11
src/utils/request.js

@ -1,5 +1,5 @@
import axios from 'axios'
import { MessageBox, Message } from 'element-ui'
// create an axios instance
const service = axios.create({
// baseURL:process.env.NODE_ENV === 'development' ? '' : '/api',
@ -17,7 +17,7 @@ service.interceptors.request.use(
},
error => {
// do something with request error
console.log(error) // for debug
// console.log(error) // for debug
return Promise.reject(error)
}
)
@ -36,16 +36,15 @@ service.interceptors.response.use(
*/
res => {
// if the custom code is not 20000, it is judged as an error.
if (res.data.code !== 200) {
if (res.data.code != 200) {
Message.error(res.data.data)
return Promise.reject(res.data)
} else {
return res.data
}
},
error => {
console.log('err' + error) // for debug
// console.log('err' + error) // for debug
return Promise.reject(error)
}
)

26
src/views/Home.vue

@ -131,7 +131,7 @@
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="封面" required>
<el-form-item label="封面" prop="cover">
<uploadimg :limit="1" :name="'file'" :img-url-list="articleCover" @onUpload="eqrcodeUpload" />
</el-form-item>
</el-col>
@ -212,7 +212,7 @@
title: '', //
content: '', //
doctorId: '',
cover:''
cover: ''
},
@ -239,6 +239,11 @@
message: '请选择作者',
trigger: 'blur'
}],
cover: [{
required: true,
message: '请上传封面',
trigger: 'blur'
}],
},
dataId: '', // ID
setFormTit: '添加', //
@ -337,7 +342,7 @@
...this.clearForm
}
this.articleCover=[]
this.articleCover = []
this.editIndex++
this.$nextTick(() => {
this.$refs.editform.clearValidate()
@ -381,7 +386,7 @@
this.editform.content = res.data.content
this.editform.cover = res.data.cover
// this.editform.doctorId = res.data.account?res.data.account.split(',').map(Number):[]
this.editform.doctorId = res.data.account-0
this.editform.doctorId = res.data.account?res.data.account - 0:''
this.articleCover = res.data.cover ? [{
url: res.data.cover
}] : []
@ -441,6 +446,8 @@
type: 'success'
})
this.search()
}).finally(f=>{
})
})
.catch(() => {})
@ -463,16 +470,17 @@
type: 'success'
})
this.search()
}).finally(f=>{
})
})
.catch(() => {})
.catch((err) => {})
},
detailconfirm() {},
async editconfirm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
if (this.articleCover.length == 0) return this.$message('请上传封面')
if (this.editform.content=='') return this.$message('请填写文章内容')
if (this.editform.content == '') return this.$message('请填写文章内容')
this.adddialogLoading = true
// const wangEditorRef1 = this.$refs.wangEditorRef1
// if (wangEditorRef1 != null) {
@ -504,8 +512,9 @@
})
.finally((f) => {
this.adddialogLoading = false
}).catch(err => {
})
}else{
} else {
copyArticle({
title: this.editform.title, //
account: this.editform.doctorId,
@ -520,6 +529,7 @@
})
.finally((f) => {
this.adddialogLoading = false
}).catch(err => {
})
}

8
vue.config.js

@ -12,13 +12,13 @@ module.exports = {
'/api': { //代理api
// target: 'http://192.168.5.102:8001/',//服务器api地址
// target: 'https://7cc72bb9.r3.cpolar.top',//服务器api地址
// target: 'https://article.kkxxkj.cn/',
target: 'http://192.168.5.105:70/',
target: 'https://article.kkxxkj.cn/',
// target: 'http://192.168.5.105:70/',
ws: true, // proxy websockets
changeOrigin: true, //是否跨域
pathRewrite: {
// '^/api': '/api'
'^/api': ''
'^/api': '/api'
// '^/api': ''
} //重写路径
},
'/image': { //代理api

Loading…
Cancel
Save