Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-life-h5-ailipay
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 76255d73
authored
Apr 18, 2022
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复IPhone时间为null
1 parent
43796e83
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
16 deletions
src/api/wxConfig.js
src/views/coupon/index.vue
vue.config.js
src/api/wxConfig.js
View file @
76255d7
...
@@ -8,7 +8,8 @@ const WxConfig = {
...
@@ -8,7 +8,8 @@ const WxConfig = {
if
(
e
==
'chooseImage'
)
jsApiList
.
push
(
'getLocalImgData'
)
if
(
e
==
'chooseImage'
)
jsApiList
.
push
(
'getLocalImgData'
)
})
})
let
[
redirectUrl
]
=
window
.
location
.
href
.
split
(
'#'
)
let
[
redirectUrl
]
=
window
.
location
.
href
.
split
(
'#'
)
const
{
corpId
}
=
util
.
getLocalStorage
(
'dj_scrm_corpId'
)
let
{
corpId
}
=
util
.
getQuery
()
if
(
!
corpId
)
corpId
=
util
.
getLocalStorage
(
'dj_scrm_corpId'
).
corpId
/** 获取企微应用AgentConfig */
/** 获取企微应用AgentConfig */
let
data
=
{
let
data
=
{
corpId
,
corpId
,
...
@@ -227,7 +228,7 @@ const WxConfig = {
...
@@ -227,7 +228,7 @@ const WxConfig = {
onHistoryBack
()
{
onHistoryBack
()
{
return
new
Promise
(
resolve
=>
{
return
new
Promise
(
resolve
=>
{
wx
.
onHistoryBack
(
function
(
res
)
{
wx
.
onHistoryBack
(
function
(
res
)
{
resolve
(
res
)
resolve
(
res
)
})
})
})
})
...
@@ -365,19 +366,19 @@ const WxConfig = {
...
@@ -365,19 +366,19 @@ const WxConfig = {
})
})
},
},
/**自建应用发起审批 */
/**自建应用发起审批 */
thirdPartyOpenPage
(
params
)
{
thirdPartyOpenPage
(
params
)
{
console
.
log
(
params
,
'参数'
)
console
.
log
(
params
,
'参数'
)
return
new
Promise
(
resolve
=>
{
return
new
Promise
(
resolve
=>
{
wx
.
invoke
(
'thirdPartyOpenPage'
,
params
,
function
(
res
){
wx
.
invoke
(
'thirdPartyOpenPage'
,
params
,
function
(
res
)
{
if
(
res
&&
res
.
err_msg
==
'thirdPartyOpenPage:ok'
)
{
if
(
res
&&
res
.
err_msg
==
'thirdPartyOpenPage:ok'
)
{
resolve
(
res
,
'回调'
)
resolve
(
res
,
'回调'
)
}
}
})
})
})
})
},
},
}
}
export
default
WxConfig
export
default
WxConfig
src/views/coupon/index.vue
View file @
76255d7
...
@@ -119,14 +119,17 @@ export default {
...
@@ -119,14 +119,17 @@ export default {
tabList
:
[
'新车精品礼券'
,
'商城优惠券'
],
tabList
:
[
'新车精品礼券'
,
'商城优惠券'
],
showTips
:
true
,
showTips
:
true
,
showCouponModal
:
false
,
showCouponModal
:
false
,
modalChecked
:
false
modalChecked
:
false
,
corpId
:
''
}
}
},
},
mounted
()
{
mounted
()
{
const
{
corpId
}
=
this
.
getLocalStorage
(
'dj_scrm_corpId'
)
let
{
corpId
}
=
this
.
getQuery
()
if
(
!
corpId
)
corpId
=
this
.
getLocalStorage
(
'dj_scrm_corpId'
).
corpId
const
tomorrow
=
this
.
getLocalStorage
(
`dj_scrm_coupon_tips_
${
corpId
}
`
)
const
tomorrow
=
this
.
getLocalStorage
(
`dj_scrm_coupon_tips_
${
corpId
}
`
)
const
couponModal
=
this
.
getLocalStorage
(
`dj_scrm_coupon_modal_
${
corpId
}
`
)
const
couponModal
=
this
.
getLocalStorage
(
`dj_scrm_coupon_modal_
${
corpId
}
`
)
const
now
=
new
Date
().
getTime
()
const
now
=
new
Date
().
getTime
()
this
.
corpId
=
corpId
if
(
tomorrow
)
this
.
showTips
=
now
>=
tomorrow
if
(
tomorrow
)
this
.
showTips
=
now
>=
tomorrow
this
.
showCouponModal
=
!
couponModal
this
.
showCouponModal
=
!
couponModal
},
},
...
@@ -144,17 +147,16 @@ export default {
...
@@ -144,17 +147,16 @@ export default {
})
})
},
},
closeTips
()
{
closeTips
()
{
const
now
=
new
Date
()
let
{
corpId
}
=
this
const
{
corpId
}
=
this
.
getLocalStorage
(
'dj_scrm_corpId'
)
this
.
showTips
=
false
this
.
showTips
=
false
let
tomorrow
=
new
Date
(
`
${
new
Date
(
n
ow
.
setDate
(
now
.
getDate
()
+
1
)).
format
(
'yyyy-MM-
dd'
)}
00:00:00`
).
getTime
()
let
tomorrow
=
new
Date
(
`
${
new
Date
(
n
ew
Date
().
setDate
(
new
Date
().
getDate
()
+
1
)).
format
(
'yyyy/MM/
dd'
)}
00:00:00`
).
getTime
()
this
.
setLocalStorage
(
`dj_scrm_coupon_tips_
${
corpId
}
`
,
tomorrow
)
this
.
setLocalStorage
(
`dj_scrm_coupon_tips_
${
corpId
}
`
,
tomorrow
)
},
},
closeCouponModal
()
{
closeCouponModal
()
{
let
{
modalChecked
}
=
this
let
{
modalChecked
,
corpId
}
=
this
console
.
log
(
modalChecked
)
if
(
!
modalChecked
)
return
if
(
!
modalChecked
)
return
const
{
corpId
}
=
this
.
getLocalStorage
(
'dj_scrm_corpId'
)
this
.
setLocalStorage
(
`dj_scrm_coupon_modal_
${
corpId
}
`
,
true
)
this
.
setLocalStorage
(
`dj_scrm_coupon_modal_
${
corpId
}
`
,
modalChecked
)
}
}
}
}
}
}
...
...
vue.config.js
View file @
76255d7
...
@@ -50,7 +50,7 @@ const spritesmithFunction = data => {
...
@@ -50,7 +50,7 @@ const spritesmithFunction = data => {
return
`
${
shared
}
\n
${
perSprite
}
`
return
`
${
shared
}
\n
${
perSprite
}
`
}
}
module
.
exports
=
{
module
.
exports
=
{
publicPath
:
IS_PROD
?
'./'
:
'/dj-scrm-wx-work-main/'
,
// 本地调试时需登录时使用
publicPath
:
IS_PROD
?
'./'
:
'/dj-scrm-wx-work-main
-lwk
/'
,
// 本地调试时需登录时使用
// publicPath: './',
// publicPath: './',
// publicPath: '/dj-scrm-wx-work-attachment-activity/', // 署应用包时的基本 URL。 vue-router history模式使用
// publicPath: '/dj-scrm-wx-work-attachment-activity/', // 署应用包时的基本 URL。 vue-router history模式使用
outputDir
:
'dist'
,
// 生产环境构建文件的目录
outputDir
:
'dist'
,
// 生产环境构建文件的目录
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment