Commit cc7014b3 by 李伟康

commit

1 parent 4515bd4e
......@@ -24,5 +24,13 @@ export default {
url,
data
})
}
},
/** 获取商品海报企业微信素材mediaId */
getGoodsPosterMediaId(data) {
data.method = 'scrm.api.shopmall.goods.wework.posterWorkWxMediaId'
return window.$HTTP({
url,
data
})
},
}
\ No newline at end of file
......@@ -65,7 +65,7 @@ export default {
let { currentItem, apiName, activityData } = this
let flag = apiName != 'shopmallApi'
if (currentItem.userId) {
console.log(activityData.posterMediaId)
console.log(activityData)
window.$wx
.sendChatMessage({
msgtype: 'image',
......
......@@ -48,7 +48,7 @@ export default {
value(n) {
console.log(n)
let {
currentItem: { id , userId },
currentItem: { id, userId },
component_id,
apiName,
component_api_name
......@@ -59,13 +59,10 @@ export default {
}
if (n) {
let options = this.tools.deepClone(staticOptions)
if (apiName == 'couponApi' || apiName == 'boutiquecouponApi' || apiName == 'equityApi' || apiName == 'shopmallApi') {
if (apiName == 'shopmallApi' && !userId) {
options[1].className = 'disabled'
} else {
options[1].className = 'disabled'
}
if (apiName == 'couponApi' || apiName == 'boutiquecouponApi' || apiName == 'equityApi') {
options[1].className = 'disabled'
this.showShare = true
return
}
this.options = options
if (apiName == 'activityApi' || apiName == 'liveApi') {
......@@ -87,17 +84,22 @@ export default {
return
}
if (apiName == 'shopmallApi') {
if (!userId) options[1].className = 'disabled'
this.showLoading()
shopmallApi.getGoodsLink({ id }).then(data => {
console.log('商品链接', data)
shopmallApi.getGoodsPoster({ id }).then(res => {
console.log('商品海报', res)
this.activityData = {
posterUrl: res,
url: data
}
this.showShare = true
this.hideLoading()
shopmallApi.getGoodsPosterMediaId({ id }).then(media => {
console.log('商品海报ID')
this.activityData = {
posterUrl: res,
url: data,
posterMediaId: media
}
this.showShare = true
this.hideLoading()
})
})
})
}
......
......@@ -74,7 +74,7 @@ const actions = {
if (data.loginList.length > 1) {
util.setLocalStorage('dj_scrm_loginToken', data.loginToken)
util.setLocalStorage('dj_scrm_accountList', data.loginList)
let userInfo = data.loginList[0]
let userInfo = data.loginList[2]
let { merchantId, accountName } = userInfo
let loginAccount = accountName
ssoApi.selectAccount({
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!