Commit cc7014b3 by 李伟康

commit

1 parent 4515bd4e
...@@ -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
...@@ -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',
......
...@@ -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,17 +84,22 @@ export default { ...@@ -87,17 +84,22 @@ 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)
this.activityData = { shopmallApi.getGoodsPosterMediaId({ id }).then(media => {
posterUrl: res, console.log('商品海报ID')
url: data this.activityData = {
} posterUrl: res,
this.showShare = true url: data,
this.hideLoading() posterMediaId: media
}
this.showShare = true
this.hideLoading()
})
}) })
}) })
} }
......
...@@ -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({
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!