From 3a45da15c947c2d478a44a51bd0f926647b1b841 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期五, 11 四月 2025 16:33:17 +0800
Subject: [PATCH] 提交
---
company/src/components/business/operaverifyPhoneNumberWindew.vue | 150 +++++++++++++++++++++++++-------------------------
1 files changed, 75 insertions(+), 75 deletions(-)
diff --git a/company/src/components/business/operaverifyPhoneNumberWindew.vue b/company/src/components/business/operaverifyPhoneNumberWindew.vue
index 85cd927..4e815c7 100644
--- a/company/src/components/business/operaverifyPhoneNumberWindew.vue
+++ b/company/src/components/business/operaverifyPhoneNumberWindew.vue
@@ -22,80 +22,80 @@
</template>
<script>
- import BaseOpera from '@/components/base/BaseOpera'
- import GlobalWindow from '@/components/common/GlobalWindow'
- import { sendSms, validateCode } from '@/api/business/smsEmail'
- import { mapState } from 'vuex'
- export default {
- name: 'operaverifyPhoneNumberWindew',
- extends: BaseOpera,
- components: { GlobalWindow },
- data () {
- return {
- form: {
- phone: this.$store.state.userInfo.company.phone,
- code: ''
- },
- rules: {
- code: [
- { required: true, message: '璇疯緭鍏ラ獙璇佺爜' }
- ]
- },
- num: 0,
- timer: null
- }
- },
- computed: {
- ...mapState(['userInfo'])
- },
- methods: {
- open (title) {
- this.title = title
- this.num = 0
- clearInterval(this.timer)
- this.timer = null
- this.visible = true
- this.$nextTick(() => {
- this.$refs.form.resetFields()
- })
- },
- send () {
- sendSms({
- phone: this.form.phone
- }).then(res => {
- this.num = 60
- this.setTime()
- })
- },
- setTime () {
- this.timer = setInterval(() => {
- if (this.num === 0) {
- clearInterval(this.timer)
- this.timer = null
- return
- }
- this.num = this.num - 1
- }, 1000)
- },
- confirm () {
- this.$refs.form.validate((valid) => {
- if (!valid) {
- return
- }
- this.isWorking = true
- validateCode({
- code: this.form.code
- }).then(res => {
- this.visible = false
- this.$tip.apiSuccess('鎿嶄綔鎴愬姛')
- this.$emit('success')
- }).catch(e => {
- this.$tip.apiFailed(e)
- }).finally(() => {
- this.isWorking = false
- })
- })
- }
- }
+import BaseOpera from '@/components/base/BaseOpera'
+import GlobalWindow from '@/components/common/GlobalWindow'
+import { sendSms, validateCode } from '@/api/business/smsEmail'
+import { mapState } from 'vuex'
+export default {
+ name: 'operaverifyPhoneNumberWindew',
+ extends: BaseOpera,
+ components: { GlobalWindow },
+ data () {
+ return {
+ form: {
+ phone: this.$store.state.userInfo.company? this.$store.state.userInfo.company.phone:null,
+ code: ''
+ },
+ rules: {
+ code: [
+ { required: true, message: '璇疯緭鍏ラ獙璇佺爜' }
+ ]
+ },
+ num: 0,
+ timer: null
}
+ },
+ computed: {
+ ...mapState(['userInfo'])
+ },
+ methods: {
+ open (title) {
+ this.title = title
+ this.num = 0
+ clearInterval(this.timer)
+ this.timer = null
+ this.visible = true
+ this.$nextTick(() => {
+ this.$refs.form.resetFields()
+ })
+ },
+ send () {
+ sendSms({
+ phone: this.form.phone
+ }).then(res => {
+ this.num = 60
+ this.setTime()
+ })
+ },
+ setTime () {
+ this.timer = setInterval(() => {
+ if (this.num === 0) {
+ clearInterval(this.timer)
+ this.timer = null
+ return
+ }
+ this.num = this.num - 1
+ }, 1000)
+ },
+ confirm () {
+ this.$refs.form.validate((valid) => {
+ if (!valid) {
+ return
+ }
+ this.isWorking = true
+ validateCode({
+ code: this.form.code
+ }).then(res => {
+ this.visible = false
+ this.$tip.apiSuccess('鎿嶄綔鎴愬姛')
+ this.$emit('success')
+ }).catch(e => {
+ this.$tip.apiFailed(e)
+ }).finally(() => {
+ this.isWorking = false
+ })
+ })
+ }
+ }
+}
</script>
--
Gitblit v1.9.3