Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
h5-front
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yimu
h5-front
Commits
4f9dce92
Commit
4f9dce92
authored
Mar 25, 2022
by
verestrasz
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'test' into dev
parents
0d913391
5e02d477
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
36 additions
and
12 deletions
+36
-12
App.vue
src/App.vue
+20
-4
common.js
src/api/apiconfig/common.js
+6
-0
index.js
src/config/index.js
+4
-2
index.vue
src/views/order/payment/index.vue
+1
-1
index.vue
src/views/user-center/customer-service/chat/index.vue
+1
-1
detail-item.vue
src/views/user-center/news/detail-list/detail-item.vue
+1
-1
list-item.vue
src/views/user-center/news/list/list-item.vue
+1
-1
index.vue
src/views/user-center/order/detail/order/index.vue
+1
-1
birthday-popup.vue
src/views/user-center/personal-info/birthday-popup.vue
+1
-1
No files found.
src/App.vue
View file @
4f9dce92
...
@@ -32,14 +32,29 @@ export default {
...
@@ -32,14 +32,29 @@ export default {
methods
:
{
methods
:
{
// ...mapActions(["getShoppingCart"]),
// ...mapActions(["getShoppingCart"]),
...
mapMutations
([
'setAppVersion'
,
"setCurrentTime"
]),
...
mapMutations
([
'setAppVersion'
,
"setCurrentTime"
]),
_getSystemTime
(){
this
.
$api
({
apiName
:
"getSystemTime"
,
success
:(
res
)
=>
{
let
time
=
new
Date
(
res
).
getTime
()
this
.
setCurrentTime
(
time
)
this
.
timeTask
=
setInterval
(()
=>
{
time
+=
1000
this
.
setCurrentTime
(
time
)
},
1000
);
},
fail
:
(
err
)
=>
{
this
.
timeTask
=
setInterval
(()
=>
{
this
.
setCurrentTime
(
+
new
Date
())
},
1000
);
}
})
}
},
},
mounted
()
{
mounted
()
{
var
local
=
window
.
location
.
href
// 获取页面url
var
local
=
window
.
location
.
href
// 获取页面url
var
appid
=
'wxbdddd81913c795e9'
var
appid
=
'wxbdddd81913c795e9'
let
url
=
window
.
location
.
origin
+
"/"
+
window
.
location
.
hash
let
url
=
window
.
location
.
origin
+
"/"
+
window
.
location
.
hash
this
.
timeTask
=
setInterval
(()
=>
{
this
.
setCurrentTime
(
+
new
Date
())
},
1000
);
this
.
code
=
getUrlParam
(
'code'
)
// 截取code
this
.
code
=
getUrlParam
(
'code'
)
// 截取code
if
(
this
.
code
==
null
||
this
.
code
===
''
){
if
(
this
.
code
==
null
||
this
.
code
===
''
){
// 没有code去拿code;
// 没有code去拿code;
...
@@ -72,7 +87,8 @@ export default {
...
@@ -72,7 +87,8 @@ export default {
this
.
getVersionCode
(
e
=>
{
this
.
getVersionCode
(
e
=>
{
this
.
setAppVersion
(
e
)
this
.
setAppVersion
(
e
)
})
})
},
this
.
_getSystemTime
()
}
};
};
</
script
>
</
script
>
...
...
src/api/apiconfig/common.js
View file @
4f9dce92
...
@@ -63,3 +63,9 @@ export const getSysVersion = {
...
@@ -63,3 +63,9 @@ export const getSysVersion = {
requireAuth
:
false
,
requireAuth
:
false
,
method
:
'get'
method
:
'get'
}
}
// 获取服务器时间
export
const
getSystemTime
=
{
url
:
'/without/read/systemTime'
,
requireAuth
:
false
,
type
:
'system'
}
src/config/index.js
View file @
4f9dce92
...
@@ -5,11 +5,13 @@ export default {
...
@@ -5,11 +5,13 @@ export default {
baseUrl
:
{
baseUrl
:
{
dev
:
{
dev
:
{
root
:
'/root/mall'
,
root
:
'/root/mall'
,
chat
:
'/chat/mallcustomer'
chat
:
'/chat/mallcustomer'
,
system
:
"/root/sys-config"
},
},
pro
:
{
pro
:
{
root
:
'/root/mall'
,
root
:
'/root/mall'
,
chat
:
'/chat/mallcustomer'
chat
:
'/chat/mallcustomer'
,
system
:
"/root/sys-config"
}
}
}
}
}
}
src/views/order/payment/index.vue
View file @
4f9dce92
...
@@ -301,7 +301,7 @@ export default {
...
@@ -301,7 +301,7 @@ export default {
let
oids
=
JSON
.
parse
(
res
.
oidsJson
)
let
oids
=
JSON
.
parse
(
res
.
oidsJson
)
this
.
oid
=
oids
[
0
]
||
""
this
.
oid
=
oids
[
0
]
||
""
this
.
payInfo
=
res
;
this
.
payInfo
=
res
;
let
timeOut
=
this
.
payInfo
.
createTime
+
3
*
60
*
1000
-
+
new
Date
()
;
let
timeOut
=
this
.
payInfo
.
createTime
+
3
*
60
*
1000
-
this
.
currentTime
;
this
.
leftTime
=
timeOut
>
0
?
timeOut
:
0
;
this
.
leftTime
=
timeOut
>
0
?
timeOut
:
0
;
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
$hideLoading
();
this
.
$hideLoading
();
...
...
src/views/user-center/customer-service/chat/index.vue
View file @
4f9dce92
...
@@ -391,7 +391,7 @@ export default {
...
@@ -391,7 +391,7 @@ export default {
let
data
=
this
.
list
.
find
((
x
)
=>
{
let
data
=
this
.
list
.
find
((
x
)
=>
{
return
x
.
messageId
===
obj
.
messageId
&&
x
.
Listid
===
obj
.
Listid
;
return
x
.
messageId
===
obj
.
messageId
&&
x
.
Listid
===
obj
.
Listid
;
});
});
data
.
sendTime
=
new
Date
().
getTime
()
;
data
.
sendTime
=
this
.
currentTime
;
data
.
status
=
ChatMsgStatus
.
SUCCESS
;
data
.
status
=
ChatMsgStatus
.
SUCCESS
;
console
.
log
(
"消息发送成功"
);
console
.
log
(
"消息发送成功"
);
...
...
src/views/user-center/news/detail-list/detail-item.vue
View file @
4f9dce92
...
@@ -40,7 +40,7 @@ export default {
...
@@ -40,7 +40,7 @@ export default {
filters
:
{
filters
:
{
getTimeStr
(
val
)
{
getTimeStr
(
val
)
{
if
(
val
)
{
if
(
val
)
{
const
toDay
=
formatTime
(
new
Date
(),
"yyyy-MM-dd"
);
const
toDay
=
formatTime
(
new
Date
(
this
.
currentTime
),
"yyyy-MM-dd"
);
const
itemDay
=
formatTime
(
new
Date
(
val
),
"yyyy-MM-dd hh:mm:ss"
);
const
itemDay
=
formatTime
(
new
Date
(
val
),
"yyyy-MM-dd hh:mm:ss"
);
if
(
itemDay
.
includes
(
toDay
))
{
if
(
itemDay
.
includes
(
toDay
))
{
return
itemDay
.
substr
(
11
,
5
);
return
itemDay
.
substr
(
11
,
5
);
...
...
src/views/user-center/news/list/list-item.vue
View file @
4f9dce92
...
@@ -40,7 +40,7 @@ export default {
...
@@ -40,7 +40,7 @@ export default {
filters
:
{
filters
:
{
getTimeStr
(
val
)
{
getTimeStr
(
val
)
{
if
(
val
)
{
if
(
val
)
{
const
toDay
=
formatTime
(
new
Date
(),
"yyyy-MM-dd"
);
const
toDay
=
formatTime
(
new
Date
(
this
.
currentTime
),
"yyyy-MM-dd"
);
const
itemDay
=
formatTime
(
new
Date
(
val
),
"yyyy-MM-dd hh:mm:ss"
);
const
itemDay
=
formatTime
(
new
Date
(
val
),
"yyyy-MM-dd hh:mm:ss"
);
if
(
itemDay
.
includes
(
toDay
))
{
if
(
itemDay
.
includes
(
toDay
))
{
return
itemDay
.
substr
(
11
,
5
);
return
itemDay
.
substr
(
11
,
5
);
...
...
src/views/user-center/order/detail/order/index.vue
View file @
4f9dce92
...
@@ -105,7 +105,7 @@ export default {
...
@@ -105,7 +105,7 @@ export default {
this
.
$hideLoading
();
this
.
$hideLoading
();
this
.
data
=
res
;
this
.
data
=
res
;
let
timeOut
=
res
.
createTime
+
3
*
60
*
1000
;
let
timeOut
=
res
.
createTime
+
3
*
60
*
1000
;
let
timeNow
=
+
new
Date
()
;
let
timeNow
=
this
.
currentTime
;
this
.
leftTime
=
timeOut
>
timeNow
?
timeOut
-
timeNow
:
0
;
this
.
leftTime
=
timeOut
>
timeNow
?
timeOut
-
timeNow
:
0
;
},
},
});
});
...
...
src/views/user-center/personal-info/birthday-popup.vue
View file @
4f9dce92
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
const
date
=
new
Date
();
const
date
=
new
Date
(
this
.
currentTime
);
const
years
=
[];
const
years
=
[];
const
year
=
date
.
getFullYear
();
const
year
=
date
.
getFullYear
();
const
months
=
[];
const
months
=
[];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment