diff --git a/src/utils/utils.ts b/src/utils/utils.ts index d9c5483..1c425e6 100644 --- a/src/utils/utils.ts +++ b/src/utils/utils.ts @@ -107,6 +107,7 @@ export function getAccount(account: string, channel: string) { } export function channelFill(val: any) { + val += ''; let len = val.length; for (let i = 0; i < 6 - len; i++) { val = '0' + val; @@ -115,6 +116,5 @@ export function channelFill(val: any) { } export function getCompleteChannel(channel: any, subChannel: any) { - return channelFill(channel) + channelFill(subChannel); } diff --git a/src/views/gameRole/role/index.vue b/src/views/gameRole/role/index.vue index 63a48db..52fe2f3 100644 --- a/src/views/gameRole/role/index.vue +++ b/src/views/gameRole/role/index.vue @@ -856,11 +856,10 @@ export default defineComponent({ } }); state.tableData.data = roleList; - // console.log('gameRoleList: ', roleList); }); state.queryParams.orderAccount = list[0].AccountName; state.queryParams.channel = getCompleteChannel(list[0].Channel, list[0].SubChannel); - console.log('gameRoleList: ', list[0],list[0].Channel, list[0].SubChannel, state.queryParams, getCompleteChannel(list[0].Channel, list[0].SubChannel)); + // console.log('gameRoleList: ', list[0],list[0].Channel, list[0].SubChannel, state.queryParams, getCompleteChannel(list[0].Channel+"", list[0].SubChannel+"")); orderList(); loginOut(); loginOutLog(); @@ -904,7 +903,7 @@ export default defineComponent({ const loginOut = () => { state.tableData.loginOutData = []; gameLoginOut({ - account: state.queryParams.orderAccount, + account: getAccount(state.queryParams.orderAccount, state.queryParams.channel), serverId: state.queryParams.serverId, id: state.queryParams.id, pageSize: state.queryParams.loginOutPageSize, @@ -922,7 +921,7 @@ export default defineComponent({ const loginOutLog = () => { state.tableData.loginOutLogData = []; gameLoginOutLog({ - account: state.queryParams.orderAccount, + account:getAccount(state.queryParams.orderAccount, state.queryParams.channel), id: state.queryParams.id, serverId: state.queryParams.serverId, pageSize: state.queryParams.loginOutLogPageSize, @@ -940,7 +939,7 @@ export default defineComponent({ const itemRecord = () => { state.tableData.itemRecordData = []; gameItemRecord({ - account: state.queryParams.orderAccount, + account: getAccount(state.queryParams.orderAccount, state.queryParams.channel), id: state.queryParams.id, serverId: state.queryParams.serverId, pageSize: state.queryParams.itemPageSize, diff --git a/src/views/login/component/email.vue b/src/views/login/component/email.vue index 5c374bb..d9a05ff 100644 --- a/src/views/login/component/email.vue +++ b/src/views/login/component/email.vue @@ -21,7 +21,10 @@ - {{ $t('message.email.codeText') }} + +
{{ countDown }}秒后重新获取
+
{{ $t('message.email.codeText') }}
+
@@ -29,7 +32,7 @@ {{ $t('message.email.btnText') }} - + @@ -44,7 +47,6 @@ import { useStore } from '/@/store'; import { useRoute, useRouter } from 'vue-router'; import { ElMessage } from 'element-plus'; import { formatAxis } from '/@/utils/formatTime'; -import initIconfont from '/@/utils/getStyleSheets'; export default defineComponent({ name: 'loginEmail', @@ -55,6 +57,8 @@ export default defineComponent({ const router = useRouter(); const { proxy } = getCurrentInstance(); const state = reactive({ + disabled: false, + countDown: 60, ruleForm: { userName: '', code: '', @@ -129,19 +133,24 @@ export default defineComponent({ }; const smsCode = () => { // console.log(state.ruleForm); + state.disabled = true; + let timer = setInterval(function () { + if (state.countDown > 0) { + state.countDown--; + } else { + clearInterval(timer); + state.disabled = false; + state.countDown = 60; + } + }, 1000); emailCode(state.ruleForm).then((res) => { console.log(res); - }); + }).catch(()=>{ + clearInterval(timer); + state.disabled = false; + state.countDown = 60; + }); }; - // onMounted(() => { - // // initGetStyleSheets(); - // }); - // const initGetStyleSheets = () => { - // initIconfont.ali().then((res: any) => { - // // state.sheetsIconList = res; - // // console.log(res); - // }); - // }; return { sendSms, smsCode, diff --git a/src/views/login/component/mobile.vue b/src/views/login/component/mobile.vue index c8a321d..84278e4 100644 --- a/src/views/login/component/mobile.vue +++ b/src/views/login/component/mobile.vue @@ -1,5 +1,5 @@