Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
tswj
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2022-06-30 13:56:27 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
12a03a0123a05281ddd1c9db2bf187563a22f769
12a03a01
1 parent
61302764
🔧 build: 使用dayjs替换moment
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
10 deletions
package.json
src/composables/useLogin.js
src/utils/tools.js
yarn.lock
package.json
View file @
12a03a0
...
...
@@ -15,6 +15,7 @@
"@vitejs/plugin-legacy"
:
"^1.8.2"
,
"@vueuse/core"
:
"^8.5.0"
,
"animate.css"
:
"^4.1.1"
,
"dayjs"
:
"^1.11.3"
,
"default-passive-events"
:
"^2.0.0"
,
"global"
:
"^4.4.0"
,
"html2canvas"
:
"^1.4.1"
,
...
...
src/composables/useLogin.js
View file @
12a03a0
/*
* @Date: 2022-06-22 00:07:42
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-06-
22 08:51:37
* @LastEditTime: 2022-06-
30 13:45:54
* @FilePath: /tswj/src/composables/useLogin.js
* @Description: 文件描述
*/
...
...
@@ -16,7 +16,7 @@ import { Toast } from 'vant'
export
const
useLogin
=
()
=>
{
const
phone
=
ref
(
''
);
const
code
=
ref
(
''
)
const
refForm
=
ref
(
null
);
const
validateForm
=
()
=>
{
const
valid
=
refForm
.
value
.
validate
();
...
...
@@ -34,10 +34,10 @@ export const useLogin = () => {
}
/**
* 判断微信环境看是否弹出控件框
* 桌面微信直接输入
* 其他环境弹出输入框
*/
* 判断微信环境看是否弹出控件框
* 桌面微信直接输入
* 其他环境弹出输入框
*/
let
use_widget
=
ref
(
true
);
use_widget
.
value
=
!!
(
wxInfo
().
isiOS
||
wxInfo
().
isAndroid
);
...
...
@@ -109,7 +109,7 @@ export const useLogin = () => {
});
}
};
return
{
phone
,
code
,
...
...
src/utils/tools.js
View file @
12a03a0
/*
* @Date: 2022-04-18 15:59:42
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-06-30
01:15:33
* @LastEditTime: 2022-06-30
13:54:32
* @FilePath: /tswj/src/utils/tools.js
* @Description: 文件描述
*/
import
moment
from
'moment
'
;
import
dayjs
from
'dayjs
'
;
// 格式化时间
const
formatDate
=
(
date
)
=>
{
return
moment
(
date
).
format
(
'YYYY-MM-DD HH:mm'
);
return
dayjs
(
date
).
format
(
'YYYY-MM-DD HH:mm'
);
};
/**
...
...
yarn.lock
View file @
12a03a0
...
...
@@ -938,6 +938,11 @@ dayjs@^1.10.4:
resolved "http://mirrors.tencent.com/npm/dayjs/-/dayjs-1.11.2.tgz#fa0f5223ef0d6724b3d8327134890cfe3d72fbe5"
integrity sha512-F4LXf1OeU9hrSYRPTTj/6FbO4HTjPKXvEIC1P2kcnFurViINCVk3ZV0xAS3XVx9MkMsXbbqlK6hjseaYbgKEHw==
dayjs@^1.11.3:
version "1.11.3"
resolved "https://mirrors.cloud.tencent.com/npm/dayjs/-/dayjs-1.11.3.tgz#4754eb694a624057b9ad2224b67b15d552589258"
integrity sha512-xxwlswWOlGhzgQ4TKzASQkUhqERI3egRNqgV4ScR8wlANA/A9tZ7miXa44vTTKEq5l7vWoL5G57bG3zA+Kow0A==
debug@4.3.4, debug@^4.1.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4:
version "4.3.4"
resolved "https://mirrors.tencent.com/npm/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865"
...
...
Please
register
or
login
to post a comment