diff --git a/app/api-collect-code/auth/index.js b/app/api-collect-code/auth/index.js index 66c5ee3..b8ab883 100644 --- a/app/api-collect-code/auth/index.js +++ b/app/api-collect-code/auth/index.js @@ -1,24 +1,22 @@ import { request } from '@/api/http.js' -export async function senCode(data) { - +export async function checkPhone(data) { return await request({ + url:'/api/v1/common/check/phone', + method: 'POST', + data + }) +} +export async function userSend(data) { + return await request( { url:'/api/v1/m/user/send', method: 'POST', data }) } -export async function userLogin(data) { - +export async function mobileLogin(data) { return await request( { - url:'/api/v1/m/user/login', - method: 'POST', - data - }) -} -export async function userUpdate(data) { - return await request( { - url:'/api/v1/m/user/update', + url:'/api/v1/m/user/mobile/login', method: 'POST', data }) diff --git a/app/api-collect-code/goods/index.js b/app/api-collect-code/goods/index.js index 99c537d..ebb8eb9 100644 --- a/app/api-collect-code/goods/index.js +++ b/app/api-collect-code/goods/index.js @@ -1,15 +1,15 @@ import { request } from '@/api/http.js' -export async function artworkList(data) { +export async function offlineQrcodeList(data) { return await request( { - url:'/api/v1/m/auction/default/artwork/list', + url:'/api/v1/offlineQrcode/query', method: 'POST', data }) } -export async function defaultDetail(data) { +export async function offlineQrcodeCreate(data) { return await request ({ - url:'/api/v1/m/auction/default/detail', + url:'/api/v1/offlineQrcode/create', method: 'POST', data }) diff --git a/app/pages/collectCode/login/index.vue b/app/pages/collectCode/login/index.vue index d251a55..7065d7c 100644 --- a/app/pages/collectCode/login/index.vue +++ b/app/pages/collectCode/login/index.vue @@ -2,11 +2,12 @@ import { useRouter, useRoute } from 'vue-router'; import { useI18n } from 'vue-i18n' import { senCode, userLogin } from "@/api/auth/index.js"; -import { authStore } from "@/stores/auth/index.js"; +import { codeAuthStore } from "@/stores-collect-code/auth/index.js"; import { message } from '@/components/x-message/useMessage.js' // ... 现有导入 ... import FingerprintJS from '@fingerprintjs/fingerprintjs' -const { userInfo, token,fingerprint } = authStore() +import {checkPhone, mobileLogin, userSend} from "@/api-collect-code/auth/index.js"; +const { userInfo, token,fingerprint } = codeAuthStore() const router = useRouter(); const route = useRoute(); const { locale } = useI18n() @@ -52,11 +53,19 @@ checkFingerprint() const vanSwipeRef = ref(null) const getCode = async () => { loadingRef.value.loading1 = true - const res = await senCode({ - telNum: phoneNum.value, - zone: '86' + const res = await checkPhone({ + tel: phoneNum.value, }) loadingRef.value.loading1 = false + if (res.status === 0){ + const res=await userSend({telNum:phoneNum.value,zone:'+86'}) + if (res.status === 0){ + pane.value = 1 + vanSwipeRef.value?.swipeTo(pane.value) + showKeyboard.value = true + } + } +/* loadingRef.value.loading1 = false if (res.status === 0) { @@ -64,7 +73,7 @@ const getCode = async () => { pane.value = 1 vanSwipeRef.value?.swipeTo(pane.value) showKeyboard.value = true - startCountdown(); + startCountdown();*/ /* pane.value = 1 vanSwipeRef.value?.swipeTo(pane.value) showKeyboard.value=true @@ -81,10 +90,10 @@ const goBack = () => { } const goLogin = async () => { loadingRef.value.loading2 = true - const res = await userLogin({ - telNum: phoneNum.value, - zone: '86', - code: code.value + const res = await mobileLogin({ + TelNum: phoneNum.value, + Password:loginType.value===1?password.value:'', + Code: loginType.value===0?code.value:'' }) if (res.status === 0) { userInfo.value = res.data.accountInfo @@ -110,7 +119,7 @@ const goLogin = async () => {
- +