|
|
@@ -0,0 +1,63 @@ |
|
|
|
<!-- |
|
|
|
* @Date: 2021-07-08 11:02:40 |
|
|
|
* @LastEditTime: 2022-07-27 10:48:43 |
|
|
|
* @Description: 广告位 |
|
|
|
--> |
|
|
|
<template> |
|
|
|
<div class="app-container"> |
|
|
|
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="130px" class="resetform"> |
|
|
|
<el-form-item label="联系方式" prop="title"> |
|
|
|
<el-input v-model="ruleForm.title"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="联系邮箱" prop="remark"> |
|
|
|
<el-input v-model="ruleForm.remark" type="textarea"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-button type="primary" @click="submitForm('ruleForm')">保存</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
import { concact, saveGuangGao } from '@/api/about' |
|
|
|
|
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
ruleForm: { |
|
|
|
id: '', |
|
|
|
title: '', |
|
|
|
remark: '' |
|
|
|
}, |
|
|
|
rules: {} |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.getData() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
getData() { |
|
|
|
concact().then(res => { |
|
|
|
this.ruleForm.id = res.id |
|
|
|
this.ruleForm.remark = res.remark |
|
|
|
this.ruleForm.title = res.title |
|
|
|
}) |
|
|
|
}, |
|
|
|
submitForm(formName) { |
|
|
|
this.$refs[formName].validate((valid) => { |
|
|
|
if (valid) { |
|
|
|
saveGuangGao(this.ruleForm).then(res => { |
|
|
|
this.$message({ |
|
|
|
message: '操作成功!', |
|
|
|
type: 'success' |
|
|
|
}) |
|
|
|
}) |
|
|
|
} else { |
|
|
|
console.log('error submit!!') |
|
|
|
return false |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |