Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
scrm-wx-merchant-activity
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 e90ca0a4
authored
Aug 04, 2022
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交代码
1 parent
a93a2249
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
23 deletions
src/api/wxConfig.js
src/views/crowdfunding/index.vue
src/api/wxConfig.js
View file @
e90ca0a
...
@@ -3,22 +3,12 @@ import { Notify } from 'vant'
...
@@ -3,22 +3,12 @@ import { Notify } from 'vant'
let
requestCount
=
0
let
requestCount
=
0
let
wwRequestCount
=
0
let
wwRequestCount
=
0
const
WxConfig
=
{
const
WxConfig
=
{
init
(
jsApiList
=
[])
{
async
init
(
jsApiList
=
[])
{
const
isWxWork
=
window
.
$ISWXWORK
const
isWxWork
=
window
.
$ISWXWORK
return
new
Promise
((
resolve
,
reject
)
=>
{
jsApiList
.
map
(
e
=>
{
jsApiList
.
map
(
e
=>
{
if
(
e
==
'chooseImage'
)
jsApiList
.
push
(
'getLocalImgData'
)
if
(
e
==
'chooseImage'
)
jsApiList
.
push
(
'getLocalImgData'
)
})
})
if
(
isWxWork
)
{
await
this
[
isWxWork
?
'getWWConfig'
:
'getWxConfig'
](
jsApiList
)
return
this
.
getWWConfig
(
jsApiList
).
then
(()
=>
{
resolve
()
})
}
else
{
return
this
.
getWxConfig
(
jsApiList
).
then
(()
=>
{
resolve
()
})
}
})
},
},
getWWConfig
(
jsApiList
)
{
getWWConfig
(
jsApiList
)
{
wwRequestCount
+=
1
wwRequestCount
+=
1
...
@@ -48,11 +38,9 @@ const WxConfig = {
...
@@ -48,11 +38,9 @@ const WxConfig = {
signature
:
data
.
signature
,
// 必填,签名,见附录-JS-SDK使用权限签名算法,
signature
:
data
.
signature
,
// 必填,签名,见附录-JS-SDK使用权限签名算法,
jsApiList
:
[
'getContext'
,
...
jsApiList
],
jsApiList
:
[
'getContext'
,
...
jsApiList
],
success
(
res
)
{
success
(
res
)
{
console
.
log
(
res
,
'ww_config'
)
resolve
()
resolve
()
},
},
fail
(
err
)
{
fail
(
err
)
{
console
.
log
(
err
,
'ww_config'
)
Notify
(
message
)
Notify
(
message
)
// util.refreshPage(JSONStringify(err)).then(() => {
// util.refreshPage(JSONStringify(err)).then(() => {
// window.location.reload()
// window.location.reload()
...
@@ -252,7 +240,7 @@ const WxConfig = {
...
@@ -252,7 +240,7 @@ const WxConfig = {
})
})
},
},
/**获取“分享到朋友圈”按钮点击状态及自定义分享内容接口(即将废弃) */
/**获取“分享到朋友圈”按钮点击状态及自定义分享内容接口(即将废弃) */
onMenuShareTimeline
(
params
)
{
onMenuShareTimeline
(
params
)
{
delete
params
.
desc
delete
params
.
desc
return
new
Promise
((
resolve
)
=>
{
return
new
Promise
((
resolve
)
=>
{
wx
.
onMenuShareTimeline
({
wx
.
onMenuShareTimeline
({
...
...
src/views/crowdfunding/index.vue
View file @
e90ca0a
...
@@ -230,12 +230,9 @@ export default {
...
@@ -230,12 +230,9 @@ export default {
scrollY
:
0
,
scrollY
:
0
,
updata
:
Date
.
now
(),
updata
:
Date
.
now
(),
distanceKey
:
Date
.
now
(),
distanceKey
:
Date
.
now
(),
noAuthAddress
:
false
,
showKf
:
false
,
showKf
:
false
,
viewFlag
:
false
,
viewFlag
:
false
,
audio
:
null
,
audioFlag
:
false
audioFlag
:
false
,
videoUrl
:
''
}
}
}
,
}
,
beforeRouteEnter
(
to
,
from
,
next
)
{
beforeRouteEnter
(
to
,
from
,
next
)
{
...
@@ -246,7 +243,7 @@ export default {
...
@@ -246,7 +243,7 @@ export default {
}
,
}
,
created
()
{
created
()
{
let
_this
=
this
let
_this
=
this
le
t
jsApiList
=
[
'getLocation'
,
cons
t
jsApiList
=
[
'getLocation'
,
'openLocation'
,
'openLocation'
,
'getNetworkType'
,
'getNetworkType'
,
'onMenuShareAppMessage'
,
'onMenuShareAppMessage'
,
...
@@ -265,9 +262,6 @@ export default {
...
@@ -265,9 +262,6 @@ export default {
beforeDestroy
()
{
beforeDestroy
()
{
if
(
window
.
$AUDIO
)
window
.
$AUDIO
.
stopVideo
()
if
(
window
.
$AUDIO
)
window
.
$AUDIO
.
stopVideo
()
}
,
}
,
mounted
()
{
}
,
methods
:
{
methods
:
{
refresh
(
activityStatus
)
{
refresh
(
activityStatus
)
{
this
.
updata
=
Date
.
now
()
this
.
updata
=
Date
.
now
()
...
...
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