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 cc7014b3
authored
Nov 24, 2021
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit
1 parent
4515bd4e
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
10 deletions
src/api/shopmallApi.js
src/components/Poster.vue
src/components/Share.vue
src/store/modules/app.js
src/api/shopmallApi.js
View file @
cc7014b
...
@@ -24,5 +24,13 @@ export default {
...
@@ -24,5 +24,13 @@ export default {
url
,
url
,
data
data
})
})
}
},
/** 获取商品海报企业微信素材mediaId */
getGoodsPosterMediaId
(
data
)
{
data
.
method
=
'scrm.api.shopmall.goods.wework.posterWorkWxMediaId'
return
window
.
$HTTP
({
url
,
data
})
},
}
}
\ No newline at end of file
\ No newline at end of file
src/components/Poster.vue
View file @
cc7014b
...
@@ -65,7 +65,7 @@ export default {
...
@@ -65,7 +65,7 @@ export default {
let
{
currentItem
,
apiName
,
activityData
}
=
this
let
{
currentItem
,
apiName
,
activityData
}
=
this
let
flag
=
apiName
!=
'shopmallApi'
let
flag
=
apiName
!=
'shopmallApi'
if
(
currentItem
.
userId
)
{
if
(
currentItem
.
userId
)
{
console
.
log
(
activityData
.
posterMediaId
)
console
.
log
(
activityData
)
window
.
$wx
window
.
$wx
.
sendChatMessage
({
.
sendChatMessage
({
msgtype
:
'image'
,
msgtype
:
'image'
,
...
...
src/components/Share.vue
View file @
cc7014b
...
@@ -48,7 +48,7 @@ export default {
...
@@ -48,7 +48,7 @@ export default {
value
(
n
)
{
value
(
n
)
{
console
.
log
(
n
)
console
.
log
(
n
)
let
{
let
{
currentItem
:
{
id
,
userId
},
currentItem
:
{
id
,
userId
},
component_id
,
component_id
,
apiName
,
apiName
,
component_api_name
component_api_name
...
@@ -59,13 +59,10 @@ export default {
...
@@ -59,13 +59,10 @@ export default {
}
}
if
(
n
)
{
if
(
n
)
{
let
options
=
this
.
tools
.
deepClone
(
staticOptions
)
let
options
=
this
.
tools
.
deepClone
(
staticOptions
)
if
(
apiName
==
'couponApi'
||
apiName
==
'boutiquecouponApi'
||
apiName
==
'equityApi'
||
apiName
==
'shopmallApi'
)
{
if
(
apiName
==
'couponApi'
||
apiName
==
'boutiquecouponApi'
||
apiName
==
'equityApi'
)
{
if
(
apiName
==
'shopmallApi'
&&
!
userId
)
{
options
[
1
].
className
=
'disabled'
options
[
1
].
className
=
'disabled'
}
else
{
options
[
1
].
className
=
'disabled'
}
this
.
showShare
=
true
this
.
showShare
=
true
return
}
}
this
.
options
=
options
this
.
options
=
options
if
(
apiName
==
'activityApi'
||
apiName
==
'liveApi'
)
{
if
(
apiName
==
'activityApi'
||
apiName
==
'liveApi'
)
{
...
@@ -87,19 +84,24 @@ export default {
...
@@ -87,19 +84,24 @@ export default {
return
return
}
}
if
(
apiName
==
'shopmallApi'
)
{
if
(
apiName
==
'shopmallApi'
)
{
if
(
!
userId
)
options
[
1
].
className
=
'disabled'
this
.
showLoading
()
this
.
showLoading
()
shopmallApi
.
getGoodsLink
({
id
}).
then
(
data
=>
{
shopmallApi
.
getGoodsLink
({
id
}).
then
(
data
=>
{
console
.
log
(
'商品链接'
,
data
)
console
.
log
(
'商品链接'
,
data
)
shopmallApi
.
getGoodsPoster
({
id
}).
then
(
res
=>
{
shopmallApi
.
getGoodsPoster
({
id
}).
then
(
res
=>
{
console
.
log
(
'商品海报'
,
res
)
console
.
log
(
'商品海报'
,
res
)
shopmallApi
.
getGoodsPosterMediaId
({
id
}).
then
(
media
=>
{
console
.
log
(
'商品海报ID'
)
this
.
activityData
=
{
this
.
activityData
=
{
posterUrl
:
res
,
posterUrl
:
res
,
url
:
data
url
:
data
,
posterMediaId
:
media
}
}
this
.
showShare
=
true
this
.
showShare
=
true
this
.
hideLoading
()
this
.
hideLoading
()
})
})
})
})
})
}
}
}
}
}
}
...
...
src/store/modules/app.js
View file @
cc7014b
...
@@ -74,7 +74,7 @@ const actions = {
...
@@ -74,7 +74,7 @@ const actions = {
if
(
data
.
loginList
.
length
>
1
)
{
if
(
data
.
loginList
.
length
>
1
)
{
util
.
setLocalStorage
(
'dj_scrm_loginToken'
,
data
.
loginToken
)
util
.
setLocalStorage
(
'dj_scrm_loginToken'
,
data
.
loginToken
)
util
.
setLocalStorage
(
'dj_scrm_accountList'
,
data
.
loginList
)
util
.
setLocalStorage
(
'dj_scrm_accountList'
,
data
.
loginList
)
let
userInfo
=
data
.
loginList
[
0
]
let
userInfo
=
data
.
loginList
[
2
]
let
{
merchantId
,
accountName
}
=
userInfo
let
{
merchantId
,
accountName
}
=
userInfo
let
loginAccount
=
accountName
let
loginAccount
=
accountName
ssoApi
.
selectAccount
({
ssoApi
.
selectAccount
({
...
...
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