xyc
2025-02-21 664db98c9e8595ce4dd636a27f480e3a08b81ff5
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
<template>
  <zt-dialog ref="dialog" @confirm="formSubmit" append-to-body>
    <el-form :model="dataForm"  ref="dataForm"  :disabled="dataForm.disabled" label-width="120px">
      <el-form-item prop="mobile" :label="$t('sms.mobile')" rule="mobile">
        <el-input v-model="dataForm.mobile" :placeholder="$t('sms.mobile')"></el-input>
      </el-form-item>
      <el-form-item prop="params" :label="$t('sms.params')">
        <el-input v-model="dataForm.params" :placeholder="$t('sms.paramsTips')"></el-input>
      </el-form-item>
    </el-form>
  </zt-dialog>
</template>
 
<script>
  export default {
    data() {
      return {
        dataForm: {
          smsCode: '',
          mobile: '',
          params: ''
        }
      }
    },
    computed: {
    },
    methods: {
      // 表单提交
      async formSubmit() {
        let res = await this.$http.post('/sys/sms/send', this.dataForm, {headers: {'content-type': 'application/x-www-form-urlencoded'}})
        if (res.success) {
          await this.$tip.success()
          this.$refs.dialog.close()
          this.$emit('refreshDataList')
        }
      }
    }
  }
</script>