quanwei
18 hours ago c441dea81bd86bdfb12dff35821fed51f4cc91c2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<template>
  <!--
      作者:luoyiming
      时间:2019-10-25
      描述:应用-公众号设置
  -->
  <div class="product-add">
    <!--form表单-->
    <el-form size="small" ref="form" :model="form" label-width="250px">
      <!--公众号设置-->
      <div class="common-form">公众号设置</div>
 
      </el-form-item>
      <el-form-item label="AppID 公众号ID">
        <el-input v-model="form.mpapp_id" class="max-w460"></el-input>
      </el-form-item>
      <el-form-item label="AppSecret 公众号密钥">
        <el-input v-model="form.mpapp_secret" type="password" class="max-w460"></el-input>
      </el-form-item>
 
      <!--提交-->
      <div class="common-button-wrapper">
          <el-button type="primary" @click="onSubmit">提交</el-button>
      </div>
    </el-form>
 
 
  </div>
 
</template>
 
<script>
  import AppSettingApi from '@/api/appsetting.js';
 
  export default {
    data() {
      return {
        /*切换菜单*/
        // activeIndex: '1',
        /*form表单数据*/
        form: {
        },
 
 
      };
    },
    created() {
      this.getData()
    },
 
    methods: {
      
      /*获取数据*/
      getData() {
        let self = this;
        AppSettingApi.appmpDetail({}, true)
          .then(data => {
            if(data.data.data != null){
              self.form = data.data.data;
            }
          })
          .catch(error => {});
 
      },
      
      /*提交表单*/
      onSubmit() {
        let self = this;
        let params = this.form;
        AppSettingApi.editAppMp(params, true)
          .then(data => {
            self.$message({
              message: '恭喜你,设置成功',
              type: 'success'
            });
            self.$router.push('/appsetting/appmp/index');
          })
          .catch(error => {
 
          });
      },
    }
 
  };
</script>
 
<style>
  .tips {
    color: #ccc;
  }
</style>