wui-components-v2 1.1.69 → 1.1.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/core/index.ts +74 -74
- package/api/feishu.ts +20 -20
- package/api/index.ts +4 -4
- package/api/login.ts +51 -51
- package/api/menu.ts +45 -45
- package/api/page.ts +114 -114
- package/api/sys.ts +12 -12
- package/api/tree.ts +28 -28
- package/components/action-popup/action-popup.vue +116 -116
- package/components/add-address-list/add-address-list.vue +187 -187
- package/components/add-address-page/add-address-page.vue +77 -77
- package/components/add-address-page/config.ts +297 -297
- package/components/audio-play/audio-play.vue +220 -220
- package/components/batch-upload-file/batch-upload-file.vue +75 -75
- package/components/card-botom-buttons/card-botom-buttons.vue +279 -279
- package/components/custom-date-picker/custom-date-picker.vue +106 -106
- package/components/custom-select-picker/custom-select-picker.vue +95 -95
- package/components/demo-block/demo-block.vue +63 -63
- package/components/demo-card/demo-card.vue +44 -44
- package/components/detail-popup/detail-popup.vue +99 -99
- package/components/evaluation-page/evaluation-page.vue +196 -196
- package/components/fold-card/fold-card.vue +171 -171
- package/components/form-control/form-control.vue +661 -661
- package/components/global-loading/GlobalLoading.md +366 -366
- package/components/global-loading/global-loading.vue +55 -55
- package/components/global-message/GlobalMessage.md +570 -570
- package/components/global-message/global-message.vue +68 -68
- package/components/global-toast/GlobalToast.md +261 -261
- package/components/global-toast/global-toast.vue +56 -56
- package/components/label-value/label-value.vue +144 -144
- package/components/label-value/open-value-more.vue +56 -56
- package/components/list-top-buttons/list-top-buttons.vue +19 -19
- package/components/loading/loading.vue +5 -5
- package/components/login-form/login-form.vue +126 -126
- package/components/login-form-box/login-form-box.vue +65 -65
- package/components/mulselect-picker/mulselect-picker.vue +86 -86
- package/components/phone-login-form/phone-login-form.vue +204 -204
- package/components/privacy-popup/privacy-popup.vue +191 -191
- package/components/product-card/product-card.vue +201 -201
- package/components/scan-input/scan-input.vue +406 -406
- package/components/search/search.vue +128 -128
- package/components/select-col-picker/select-col-picker.vue +168 -168
- package/components/tab-search/tab-search.vue +73 -73
- package/components/tree-select/components/TreeNode.vue +200 -200
- package/components/tree-select/components/index.vue +471 -471
- package/components/tree-select/components/tree-select.vue +56 -56
- package/components/tree-select/index.vue +93 -93
- package/components/user-choose/user-choose.vue +169 -151
- package/components/video-play/video-play.vue +56 -56
- package/components/wui-auto-update-component/wui-auto-update-component.vue +132 -132
- package/components/wui-default/wui-default.vue +49 -49
- package/components/wui-details-page/wui-details-page.vue +147 -147
- package/components/wui-edit-page/wui-edit-page-copy.vue +757 -757
- package/components/wui-edit-page/wui-edit-page.vue +793 -793
- package/components/wui-enume-select-control/wui-enume-select-control.vue +92 -92
- package/components/wui-list/wui-list.vue +235 -235
- package/components/wui-login/wui-login.vue +43 -43
- package/components/wui-login1/wui-login.vue +41 -41
- package/components/wui-menus/wui-menus-top.vue +137 -137
- package/components/wui-menus/wui-menus-top1.vue +8 -8
- package/components/wui-menus/wui-menus.vue +247 -247
- package/components/wui-menus1/components/banner-carousel.vue +320 -320
- package/components/wui-menus1/components/navbar.vue +43 -43
- package/components/wui-menus1/components/quick-panel.vue +55 -55
- package/components/wui-menus1/components/search-bar.vue +49 -49
- package/components/wui-menus1/components/section-menus.vue +208 -208
- package/components/wui-menus1/wui-menus-top.vue +718 -718
- package/components/wui-menus1/wui-menus-top1.vue +398 -398
- package/components/wui-menus1/wui-menus.vue +564 -564
- package/components/wui-notify-info/notify-handle.vue +53 -53
- package/components/wui-notify-info/wui-notify-info.vue +280 -280
- package/components/wui-scan-binding-sensor/wui-scan-binding-sensor.vue +75 -75
- package/components/wui-search-history-babbar/components/SearchBar.vue +70 -70
- package/components/wui-search-history-babbar/wui-search-history-babbar.vue +204 -204
- package/components/wui-select-list/wui-select-list.vue +310 -310
- package/components/wui-select-popup/wui-select-popup.vue +613 -612
- package/components/wui-system-settings/wui-system-settings.vue +144 -144
- package/components/wui-tabbar/wui-tabbar.vue +106 -106
- package/components/wui-tree-page/components/tree-item.vue +238 -238
- package/components/wui-tree-page/wui-tree-page.vue +297 -297
- package/components/wui-update-component/wui-update-component.vue +221 -221
- package/components/wui-user/wui-user.vue +202 -202
- package/composables/types/theme.ts +65 -65
- package/composables/types/user.ts +5 -5
- package/composables/useColorGenerator.ts +221 -221
- package/composables/useCompanyFieldFilter.ts +91 -91
- package/composables/useEnumes.ts +43 -43
- package/composables/useEventBus.ts +37 -37
- package/composables/useGlobalLoading.ts +47 -47
- package/composables/useGlobalMessage.ts +53 -53
- package/composables/useGlobalToast.ts +63 -63
- package/composables/useLocale.ts +54 -54
- package/composables/useManualTheme.ts +179 -179
- package/composables/useMenus.ts +193 -193
- package/composables/useSectionMenus.ts +120 -120
- package/composables/useTabbar.ts +50 -50
- package/composables/useTheme.ts +74 -74
- package/composables/useUser.ts +24 -24
- package/index.d.ts +90 -90
- package/index.ts +83 -83
- package/package.json +24 -24
- package/static/iconfont/iconfont.css +63 -63
- package/store/language.ts +151 -151
- package/store/manualThemeStore.ts +143 -143
- package/store/persist.ts +41 -41
- package/store/themeStore.ts +74 -74
- package/store/userStore.ts +22 -22
- package/styles/dark-mode.css +523 -523
- package/styles/dark-mode.min.css +1 -1
- package/styles/dark-mode.scss +498 -498
- package/type.ts +154 -154
- package/utils/control-tree.ts +353 -353
- package/utils/control-type-supportor.ts +148 -148
- package/utils/eventBus.ts +36 -36
- package/utils/idata-scan.ts +99 -99
- package/utils/index.ts +979 -979
- package/utils/rsaEncrypt.ts +10 -10
|
@@ -1,204 +1,204 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { defineOptions, defineProps, onUnmounted, reactive, ref } from 'vue'
|
|
3
|
-
import { useRouter } from 'uni-mini-router'
|
|
4
|
-
import { useGlobalToast } from '../../composables/useGlobalToast'
|
|
5
|
-
import { getUserConfig } from '../../api/login'
|
|
6
|
-
import { req } from '../../api/index'
|
|
7
|
-
import { useUser } from '../../composables/useUser'
|
|
8
|
-
import { useTabbar } from '../../composables/useTabbar'
|
|
9
|
-
import type { TabbarItem } from '../../composables/useTabbar'
|
|
10
|
-
|
|
11
|
-
defineOptions({
|
|
12
|
-
name: 'PhoneLoginForm',
|
|
13
|
-
})
|
|
14
|
-
|
|
15
|
-
const props = defineProps<Props>()
|
|
16
|
-
// 定义 Props 类型
|
|
17
|
-
interface Props {
|
|
18
|
-
gurl?: string// 获取验证码接口
|
|
19
|
-
url?: string// 手机号登录接口
|
|
20
|
-
tabbarItems: TabbarItem[]
|
|
21
|
-
}
|
|
22
|
-
const codeLoading = ref(false) // 添加验证码按钮加载状态
|
|
23
|
-
const countdown = ref(0) // 添加倒计时
|
|
24
|
-
const timer = ref(0) // 添加定时器引用
|
|
25
|
-
const subloading = ref(false)
|
|
26
|
-
const router = useRouter()
|
|
27
|
-
const toast = useGlobalToast()
|
|
28
|
-
const { setUserInfo } = useUser()
|
|
29
|
-
const model = reactive<{
|
|
30
|
-
phone: string
|
|
31
|
-
code: string
|
|
32
|
-
}>({
|
|
33
|
-
phone: '',
|
|
34
|
-
code: '',
|
|
35
|
-
|
|
36
|
-
})
|
|
37
|
-
const { setTabbarItemActive } = useTabbar(props.tabbarItems)
|
|
38
|
-
const form = ref()
|
|
39
|
-
// 添加获取验证码函数
|
|
40
|
-
function handleGetCode() {
|
|
41
|
-
// 如果正在倒计时或加载中,则不执行
|
|
42
|
-
if (countdown.value > 0 || codeLoading.value) {
|
|
43
|
-
return
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
// 验证手机号
|
|
47
|
-
if (!model.phone) {
|
|
48
|
-
return toast.warning('请先填写手机号')
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
if (!/^1[3-9]\d{9}$/.test(model.phone)) {
|
|
52
|
-
return toast.warning('请输入正确的手机号')
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
// 开始获取验证码流程
|
|
56
|
-
codeLoading.value = true
|
|
57
|
-
|
|
58
|
-
// 模拟发送验证码请求
|
|
59
|
-
// // 这里应该替换为实际的API调用
|
|
60
|
-
// setTimeout(() => {
|
|
61
|
-
// codeLoading.value = false
|
|
62
|
-
// // 启动倒计时
|
|
63
|
-
// startCountdown()
|
|
64
|
-
// toast.success('验证码已发送')
|
|
65
|
-
// }, 1000)
|
|
66
|
-
if (!props.gurl)
|
|
67
|
-
return toast.error({ msg: '请设置登录接口' })
|
|
68
|
-
// 实际使用时替换上面的模拟代码
|
|
69
|
-
req({
|
|
70
|
-
url: props.gurl,
|
|
71
|
-
method: 'POST',
|
|
72
|
-
data: {
|
|
73
|
-
number: model.phone,
|
|
74
|
-
},
|
|
75
|
-
}).then((res: any) => {
|
|
76
|
-
codeLoading.value = false
|
|
77
|
-
if (res.success) {
|
|
78
|
-
// 启动倒计时
|
|
79
|
-
startCountdown()
|
|
80
|
-
toast.success('验证码已发送')
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
83
|
-
toast.error(res.msg)
|
|
84
|
-
}
|
|
85
|
-
}).catch(() => {
|
|
86
|
-
codeLoading.value = false
|
|
87
|
-
toast.error('验证码发送失败')
|
|
88
|
-
})
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
// 添加启动倒计时函数
|
|
92
|
-
function startCountdown() {
|
|
93
|
-
countdown.value = 60
|
|
94
|
-
if (timer.value) {
|
|
95
|
-
clearInterval(timer.value)
|
|
96
|
-
}
|
|
97
|
-
timer.value = setInterval(() => {
|
|
98
|
-
if (countdown.value > 0) {
|
|
99
|
-
countdown.value--
|
|
100
|
-
}
|
|
101
|
-
else {
|
|
102
|
-
if (timer.value) {
|
|
103
|
-
clearInterval(timer.value)
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}, 1000)
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
// 添加清理定时器函数
|
|
110
|
-
function clearTimer() {
|
|
111
|
-
if (timer.value) {
|
|
112
|
-
clearInterval(timer.value)
|
|
113
|
-
timer.value = 0
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
onUnmounted(() => {
|
|
117
|
-
clearTimer()
|
|
118
|
-
})
|
|
119
|
-
// 提交登录表单
|
|
120
|
-
function handleSubmit() {
|
|
121
|
-
form.value
|
|
122
|
-
.validate()
|
|
123
|
-
.then(async ({ valid, errors }: any) => {
|
|
124
|
-
if (valid) {
|
|
125
|
-
if (!props.url)
|
|
126
|
-
return toast.error({ msg: '请设置登录接口' })
|
|
127
|
-
try {
|
|
128
|
-
subloading.value = true
|
|
129
|
-
// 登录
|
|
130
|
-
const res = await req({
|
|
131
|
-
url: props.url,
|
|
132
|
-
method: 'POST',
|
|
133
|
-
data: {
|
|
134
|
-
number: model.phone,
|
|
135
|
-
code: model.code,
|
|
136
|
-
},
|
|
137
|
-
})
|
|
138
|
-
|
|
139
|
-
if (res.success) {
|
|
140
|
-
// 保存token
|
|
141
|
-
uni.setStorageSync('TOKEN', res.msg)
|
|
142
|
-
// 获取用户配置
|
|
143
|
-
const res1 = await getUserConfig()
|
|
144
|
-
if (res1.status === 'success') {
|
|
145
|
-
// 保存用户信息
|
|
146
|
-
setUserInfo(res1.user)
|
|
147
|
-
// 跳转首页
|
|
148
|
-
router.pushTab('/pages/index/index')
|
|
149
|
-
setTabbarItemActive('index')
|
|
150
|
-
toast.success({ msg: '登录成功!' })
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
else {
|
|
154
|
-
toast.error({ msg: res.msg })
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
catch (error: any) {
|
|
158
|
-
console.log(error, 'error')
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
else {
|
|
162
|
-
toast.error({ msg: '请填写登录信息' })
|
|
163
|
-
console.log(errors, 'errors')
|
|
164
|
-
}
|
|
165
|
-
subloading.value = false
|
|
166
|
-
})
|
|
167
|
-
.catch((error: any) => {
|
|
168
|
-
toast.error({ msg: error })
|
|
169
|
-
console.log(error, 'error')
|
|
170
|
-
})
|
|
171
|
-
}
|
|
172
|
-
</script>
|
|
173
|
-
|
|
174
|
-
<template>
|
|
175
|
-
<view class="bg-white pa-3 dark:bg-[var(--wot-dark-background2)]">
|
|
176
|
-
<!-- //账号登录 -->
|
|
177
|
-
<wd-form ref="form" :model="model">
|
|
178
|
-
<wd-cell-group border>
|
|
179
|
-
<wd-input
|
|
180
|
-
v-model="model.phone" label="手机号" label-width="100px" prop="phone" clearable placeholder="请输入手机号"
|
|
181
|
-
:rules="[{ required: true, message: '请填写手机号' }, { required: true, pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号' }]"
|
|
182
|
-
/>
|
|
183
|
-
<wd-input
|
|
184
|
-
v-model="model.code" required type="text" :rules="[{ required: true, message: '请填写验证码' }]" label="验证码"
|
|
185
|
-
prop="code"
|
|
186
|
-
>
|
|
187
|
-
<template #suffix>
|
|
188
|
-
<wd-button
|
|
189
|
-
size="small" :round="false" :loading="codeLoading" :disabled="countdown > 0"
|
|
190
|
-
@click="handleGetCode"
|
|
191
|
-
>
|
|
192
|
-
{{ countdown > 0 ? `${countdown}s后重新获取` : '获取验证码' }}
|
|
193
|
-
</wd-button>
|
|
194
|
-
</template>
|
|
195
|
-
</wd-input>
|
|
196
|
-
</wd-cell-group>
|
|
197
|
-
<view class="p-4">
|
|
198
|
-
<wd-button block :loading="subloading" :round="false" @click="handleSubmit">
|
|
199
|
-
登录
|
|
200
|
-
</wd-button>
|
|
201
|
-
</view>
|
|
202
|
-
</wd-form>
|
|
203
|
-
</view>
|
|
204
|
-
</template>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { defineOptions, defineProps, onUnmounted, reactive, ref } from 'vue'
|
|
3
|
+
import { useRouter } from 'uni-mini-router'
|
|
4
|
+
import { useGlobalToast } from '../../composables/useGlobalToast'
|
|
5
|
+
import { getUserConfig } from '../../api/login'
|
|
6
|
+
import { req } from '../../api/index'
|
|
7
|
+
import { useUser } from '../../composables/useUser'
|
|
8
|
+
import { useTabbar } from '../../composables/useTabbar'
|
|
9
|
+
import type { TabbarItem } from '../../composables/useTabbar'
|
|
10
|
+
|
|
11
|
+
defineOptions({
|
|
12
|
+
name: 'PhoneLoginForm',
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
const props = defineProps<Props>()
|
|
16
|
+
// 定义 Props 类型
|
|
17
|
+
interface Props {
|
|
18
|
+
gurl?: string// 获取验证码接口
|
|
19
|
+
url?: string// 手机号登录接口
|
|
20
|
+
tabbarItems: TabbarItem[]
|
|
21
|
+
}
|
|
22
|
+
const codeLoading = ref(false) // 添加验证码按钮加载状态
|
|
23
|
+
const countdown = ref(0) // 添加倒计时
|
|
24
|
+
const timer = ref(0) // 添加定时器引用
|
|
25
|
+
const subloading = ref(false)
|
|
26
|
+
const router = useRouter()
|
|
27
|
+
const toast = useGlobalToast()
|
|
28
|
+
const { setUserInfo } = useUser()
|
|
29
|
+
const model = reactive<{
|
|
30
|
+
phone: string
|
|
31
|
+
code: string
|
|
32
|
+
}>({
|
|
33
|
+
phone: '',
|
|
34
|
+
code: '',
|
|
35
|
+
|
|
36
|
+
})
|
|
37
|
+
const { setTabbarItemActive } = useTabbar(props.tabbarItems)
|
|
38
|
+
const form = ref()
|
|
39
|
+
// 添加获取验证码函数
|
|
40
|
+
function handleGetCode() {
|
|
41
|
+
// 如果正在倒计时或加载中,则不执行
|
|
42
|
+
if (countdown.value > 0 || codeLoading.value) {
|
|
43
|
+
return
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// 验证手机号
|
|
47
|
+
if (!model.phone) {
|
|
48
|
+
return toast.warning('请先填写手机号')
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (!/^1[3-9]\d{9}$/.test(model.phone)) {
|
|
52
|
+
return toast.warning('请输入正确的手机号')
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// 开始获取验证码流程
|
|
56
|
+
codeLoading.value = true
|
|
57
|
+
|
|
58
|
+
// 模拟发送验证码请求
|
|
59
|
+
// // 这里应该替换为实际的API调用
|
|
60
|
+
// setTimeout(() => {
|
|
61
|
+
// codeLoading.value = false
|
|
62
|
+
// // 启动倒计时
|
|
63
|
+
// startCountdown()
|
|
64
|
+
// toast.success('验证码已发送')
|
|
65
|
+
// }, 1000)
|
|
66
|
+
if (!props.gurl)
|
|
67
|
+
return toast.error({ msg: '请设置登录接口' })
|
|
68
|
+
// 实际使用时替换上面的模拟代码
|
|
69
|
+
req({
|
|
70
|
+
url: props.gurl,
|
|
71
|
+
method: 'POST',
|
|
72
|
+
data: {
|
|
73
|
+
number: model.phone,
|
|
74
|
+
},
|
|
75
|
+
}).then((res: any) => {
|
|
76
|
+
codeLoading.value = false
|
|
77
|
+
if (res.success) {
|
|
78
|
+
// 启动倒计时
|
|
79
|
+
startCountdown()
|
|
80
|
+
toast.success('验证码已发送')
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
toast.error(res.msg)
|
|
84
|
+
}
|
|
85
|
+
}).catch(() => {
|
|
86
|
+
codeLoading.value = false
|
|
87
|
+
toast.error('验证码发送失败')
|
|
88
|
+
})
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// 添加启动倒计时函数
|
|
92
|
+
function startCountdown() {
|
|
93
|
+
countdown.value = 60
|
|
94
|
+
if (timer.value) {
|
|
95
|
+
clearInterval(timer.value)
|
|
96
|
+
}
|
|
97
|
+
timer.value = setInterval(() => {
|
|
98
|
+
if (countdown.value > 0) {
|
|
99
|
+
countdown.value--
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
if (timer.value) {
|
|
103
|
+
clearInterval(timer.value)
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}, 1000)
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// 添加清理定时器函数
|
|
110
|
+
function clearTimer() {
|
|
111
|
+
if (timer.value) {
|
|
112
|
+
clearInterval(timer.value)
|
|
113
|
+
timer.value = 0
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
onUnmounted(() => {
|
|
117
|
+
clearTimer()
|
|
118
|
+
})
|
|
119
|
+
// 提交登录表单
|
|
120
|
+
function handleSubmit() {
|
|
121
|
+
form.value
|
|
122
|
+
.validate()
|
|
123
|
+
.then(async ({ valid, errors }: any) => {
|
|
124
|
+
if (valid) {
|
|
125
|
+
if (!props.url)
|
|
126
|
+
return toast.error({ msg: '请设置登录接口' })
|
|
127
|
+
try {
|
|
128
|
+
subloading.value = true
|
|
129
|
+
// 登录
|
|
130
|
+
const res = await req({
|
|
131
|
+
url: props.url,
|
|
132
|
+
method: 'POST',
|
|
133
|
+
data: {
|
|
134
|
+
number: model.phone,
|
|
135
|
+
code: model.code,
|
|
136
|
+
},
|
|
137
|
+
})
|
|
138
|
+
|
|
139
|
+
if (res.success) {
|
|
140
|
+
// 保存token
|
|
141
|
+
uni.setStorageSync('TOKEN', res.msg)
|
|
142
|
+
// 获取用户配置
|
|
143
|
+
const res1 = await getUserConfig()
|
|
144
|
+
if (res1.status === 'success') {
|
|
145
|
+
// 保存用户信息
|
|
146
|
+
setUserInfo(res1.user)
|
|
147
|
+
// 跳转首页
|
|
148
|
+
router.pushTab('/pages/index/index')
|
|
149
|
+
setTabbarItemActive('index')
|
|
150
|
+
toast.success({ msg: '登录成功!' })
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
toast.error({ msg: res.msg })
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
catch (error: any) {
|
|
158
|
+
console.log(error, 'error')
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
toast.error({ msg: '请填写登录信息' })
|
|
163
|
+
console.log(errors, 'errors')
|
|
164
|
+
}
|
|
165
|
+
subloading.value = false
|
|
166
|
+
})
|
|
167
|
+
.catch((error: any) => {
|
|
168
|
+
toast.error({ msg: error })
|
|
169
|
+
console.log(error, 'error')
|
|
170
|
+
})
|
|
171
|
+
}
|
|
172
|
+
</script>
|
|
173
|
+
|
|
174
|
+
<template>
|
|
175
|
+
<view class="bg-white pa-3 dark:bg-[var(--wot-dark-background2)]">
|
|
176
|
+
<!-- //账号登录 -->
|
|
177
|
+
<wd-form ref="form" :model="model">
|
|
178
|
+
<wd-cell-group border>
|
|
179
|
+
<wd-input
|
|
180
|
+
v-model="model.phone" label="手机号" label-width="100px" prop="phone" clearable placeholder="请输入手机号"
|
|
181
|
+
:rules="[{ required: true, message: '请填写手机号' }, { required: true, pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号' }]"
|
|
182
|
+
/>
|
|
183
|
+
<wd-input
|
|
184
|
+
v-model="model.code" required type="text" :rules="[{ required: true, message: '请填写验证码' }]" label="验证码"
|
|
185
|
+
prop="code"
|
|
186
|
+
>
|
|
187
|
+
<template #suffix>
|
|
188
|
+
<wd-button
|
|
189
|
+
size="small" :round="false" :loading="codeLoading" :disabled="countdown > 0"
|
|
190
|
+
@click="handleGetCode"
|
|
191
|
+
>
|
|
192
|
+
{{ countdown > 0 ? `${countdown}s后重新获取` : '获取验证码' }}
|
|
193
|
+
</wd-button>
|
|
194
|
+
</template>
|
|
195
|
+
</wd-input>
|
|
196
|
+
</wd-cell-group>
|
|
197
|
+
<view class="p-4">
|
|
198
|
+
<wd-button block :loading="subloading" :round="false" @click="handleSubmit">
|
|
199
|
+
登录
|
|
200
|
+
</wd-button>
|
|
201
|
+
</view>
|
|
202
|
+
</wd-form>
|
|
203
|
+
</view>
|
|
204
|
+
</template>
|