|
@@ -26,7 +26,7 @@
|
|
|
<el-card class="box-card">
|
|
<el-card class="box-card">
|
|
|
<div slot="header" class="clearfix">
|
|
<div slot="header" class="clearfix">
|
|
|
<span>站点公告</span>
|
|
<span>站点公告</span>
|
|
|
- <el-button style="float: right; padding: 3px 0" type="text" @click="onUpdate">更新</el-button>
|
|
|
|
|
|
|
+ <el-button style="float: right; padding: 3px 0" type="text" @click="handleUpdateNotice">更新</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="text item">
|
|
<div class="text item">
|
|
|
{{ siteNotice }}
|
|
{{ siteNotice }}
|
|
@@ -89,7 +89,7 @@
|
|
|
<el-form-item>
|
|
<el-form-item>
|
|
|
<el-button
|
|
<el-button
|
|
|
type="primary"
|
|
type="primary"
|
|
|
- @click.native="updateNotice"
|
|
|
|
|
|
|
+ @click.native="onUpdateNotice"
|
|
|
>更新</el-button>
|
|
>更新</el-button>
|
|
|
<el-button
|
|
<el-button
|
|
|
type="primary"
|
|
type="primary"
|
|
@@ -137,7 +137,7 @@
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import { userMixin } from 'assets/js/mixin'
|
|
import { userMixin } from 'assets/js/mixin'
|
|
|
-import { getSiteNotice, getVipPlan } from '@/api/admin'
|
|
|
|
|
|
|
+import {getSiteNotice, getVipPlan, updateSiteNotice} from '@/api/admin'
|
|
|
import { videoCategories } from '@/api/video'
|
|
import { videoCategories } from '@/api/video'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
@@ -168,65 +168,54 @@ export default {
|
|
|
document.title = '站点分区'
|
|
document.title = '站点分区'
|
|
|
this.getData()
|
|
this.getData()
|
|
|
},
|
|
},
|
|
|
- mounted() {
|
|
|
|
|
- },
|
|
|
|
|
methods: {
|
|
methods: {
|
|
|
getData() {
|
|
getData() {
|
|
|
getVipPlan().then(resp => {
|
|
getVipPlan().then(resp => {
|
|
|
if (resp.code === 0) {
|
|
if (resp.code === 0) {
|
|
|
this.vipPlanList = resp.data
|
|
this.vipPlanList = resp.data
|
|
|
} else {
|
|
} else {
|
|
|
- this.$message.error(resp.msg)
|
|
|
|
|
|
|
+ this.$message.warning(resp.msg)
|
|
|
}
|
|
}
|
|
|
}).catch(error => {
|
|
}).catch(error => {
|
|
|
- this.$notify({
|
|
|
|
|
- title: '提示',
|
|
|
|
|
- message: error.message,
|
|
|
|
|
- type: 'warning',
|
|
|
|
|
- duration: 3000
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ this.$message.error(error.message)
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
videoCategories().then(resp => {
|
|
videoCategories().then(resp => {
|
|
|
if (resp.code === 0) {
|
|
if (resp.code === 0) {
|
|
|
this.treeNode = resp.data
|
|
this.treeNode = resp.data
|
|
|
} else {
|
|
} else {
|
|
|
- this.$message.error(resp.msg)
|
|
|
|
|
|
|
+ this.$message.warning(resp.msg)
|
|
|
}
|
|
}
|
|
|
}).catch(error => {
|
|
}).catch(error => {
|
|
|
- this.$notify({
|
|
|
|
|
- title: '提示',
|
|
|
|
|
- message: error.message,
|
|
|
|
|
- type: 'warning',
|
|
|
|
|
- duration: 3000
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ this.$message.error(error.message)
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
getSiteNotice().then(resp => {
|
|
getSiteNotice().then(resp => {
|
|
|
if (resp.code === 0) {
|
|
if (resp.code === 0) {
|
|
|
this.siteNotice = resp.data
|
|
this.siteNotice = resp.data
|
|
|
} else {
|
|
} else {
|
|
|
- this.$message.error(resp.msg)
|
|
|
|
|
|
|
+ this.$message.warning(resp.msg)
|
|
|
}
|
|
}
|
|
|
}).catch(error => {
|
|
}).catch(error => {
|
|
|
- this.$notify({
|
|
|
|
|
- title: '提示',
|
|
|
|
|
- message: error.message,
|
|
|
|
|
- type: 'warning',
|
|
|
|
|
- duration: 3000
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ this.$message.error(error.message)
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
// ****************************************************************************************************************
|
|
// ****************************************************************************************************************
|
|
|
handleNodeClick() {
|
|
handleNodeClick() {
|
|
|
this.$message.info('handleNodeClick')
|
|
this.$message.info('handleNodeClick')
|
|
|
},
|
|
},
|
|
|
- onUpdate() {
|
|
|
|
|
|
|
+ handleUpdateNotice() {
|
|
|
this.updateDialog = true
|
|
this.updateDialog = true
|
|
|
},
|
|
},
|
|
|
- updateNotice() {
|
|
|
|
|
- this.updateDialog = false
|
|
|
|
|
- this.$message.info(this.updateForm.content)
|
|
|
|
|
|
|
+ onUpdateNotice() {
|
|
|
|
|
+ updateSiteNotice(this.updateForm).then(resp => {
|
|
|
|
|
+ if (resp.code === 0) {
|
|
|
|
|
+ this.$message.warning(resp.msg)
|
|
|
|
|
+ this.updateDialog = false
|
|
|
|
|
+ }
|
|
|
|
|
+ }).catch(error => {
|
|
|
|
|
+ this.$message.error(error.message)
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
onAddCategory() {
|
|
onAddCategory() {
|
|
|
this.addCategoryDialog = true
|
|
this.addCategoryDialog = true
|