Browse Source

Merge pull request 'login修改 无验证码登录 文件迁移 Vue2升级Vue3 10/25-11/8' (#1) from hella_vue3 into syhx_app_vue3

Reviewed-on: http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-uniapp/pulls/1
syhx_app_vue3
zhousq_java 2 weeks ago
parent
commit
e246087a53
  1. 2
      src/api/login.js
  2. 15
      src/pages/login/index.vue

2
src/api/login.js

@ -11,7 +11,7 @@ export function login(username, password, captchaVerification, tenantName, remem
code,
uuid,
}
return http.post('/system/auth/login', data)
return http.post('/system/auth/loginNoCode', data)
}
// 获取用户详细信息

15
src/pages/login/index.vue

@ -43,7 +43,7 @@
</view>
</view>
</view>
<view style="display: flex; flex-direction: row">
<view style="display: flex; flex-direction: row" v-if="needCode">
<view class="uni-input-wrapper">
<input class="" style="height: 80rpx; background-color: #f7f9ff; margin-right: 20rpx" placeholder="请输入验证码" type="number" v-model="code" />
</view>
@ -87,6 +87,7 @@ const code = ref('')
const uuid = ref('')
const version = ref('')
const comMessageRef = ref('')
const needCode = ref(false)
//
onNavigationBarButtonTap((e) => {
if (e.index === 0) {
@ -102,8 +103,8 @@ onLoad(() => {
tenantValue.value = tenantArray.value[0].value
storage.clearStorage()
if (import.meta.env.VITE_USER_NODE_ENV === 'development') {
username.value = 'admin'
password.value = 'win123456'
username.value = ''
password.value = ''
}
uni.setNavigationBarColor({
frontColor: '#ffffff',
@ -123,9 +124,11 @@ const handelerlogin = () => {
proxy.$modal.showToast('用户名不能为空')
} else if (password.value === '') {
proxy.$modal.showToast('密码不能为空')
} else if (code.value === '') {
proxy.$modal.showToast('验证码不能为空')
} else {
}
// else if (code.value === '') {
// proxy.$modal.showToast('')
// }
else {
// console.log("", this.username, "", this.password, this.tapstyle, this.smloginmsg)
const logininfo = {
username: '',

Loading…
Cancel
Save