user_bond_config.vue 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <template>
  2. <el-form label-width="100px" v-loading="loading" style="padding-top: 40px;padding-right: 20px;width: 400px;">
  3. <el-form-item label="10万项目">
  4. <el-input v-model="ruleForm.user_bond_config.money_10"></el-input>
  5. </el-form-item>
  6. <el-form-item label="5万项目">
  7. <el-input v-model="ruleForm.user_bond_config.money_5"></el-input>
  8. </el-form-item>
  9. <el-form-item label="2万项目">
  10. <el-input v-model="ruleForm.user_bond_config.money_2"></el-input>
  11. </el-form-item>
  12. <el-form-item>
  13. <el-button type="primary" @click="save()">保存</el-button>
  14. </el-form-item>
  15. </el-form>
  16. </template>
  17. <script>
  18. export default {
  19. components: {},
  20. props: {
  21. id: {
  22. type: Number,
  23. default: 0
  24. },
  25. back:{
  26. type:Object
  27. }
  28. },
  29. async mounted() {
  30. this.getInfo();
  31. },
  32. data() {
  33. return {
  34. loading:false,
  35. ruleForm: {
  36. user_bond_config:{}
  37. },
  38. user_module_list:[],
  39. menu:[],
  40. };
  41. },
  42. methods: {
  43. handleClose:function()
  44. {
  45. this.back.child_page.type="";
  46. },
  47. async getInfo()
  48. {
  49. this.loading=true;
  50. let res = await this.$post("/uapi/pub/info/admin/config/admin_get",{key:"user_bond_config"});
  51. if (res.status == 1) {
  52. this.ruleForm.user_bond_config=res.data;
  53. }
  54. this.loading=false;
  55. },
  56. async save()
  57. {
  58. this.loading=true;
  59. let res = await this.$post("/uapi/pub/info/admin/config/admin_save",{key:"user_bond_config",val:JSON.stringify(this.ruleForm.user_bond_config)});
  60. if (res.status == 1) {
  61. this.$message({
  62. type: 'success',
  63. message: '保存成功!'
  64. });
  65. }
  66. this.loading=false;
  67. }
  68. }
  69. }
  70. </script>