Commit 4c1cb208 by 杨北旺

Merge branch 'dev_v2.6.0_0718' of http://192.168.3.233:8090/glsx/dj-scrm-wx-work…

…-attachment-activity into dev_v2.6.0_0718
2 parents 13348759 53805339
const url = '/rop-scrm-bigdatautil/router'
import { util } from 'utils'
export default {
/**埋点 */
reportTrack (id) {
let userInfo = util.getLocalStorage('dj_scrm_userInfo')
let data = {
one_id: '',
staff_id: '',
staff_uuid: userInfo.uuid,
user_phone: '',
create_time: Date.now(),
item_type: id,
customer_phone: '',
action_type: 4,
item_id: 3,
business_type: 1,
add_way: 104,
merchant_id: userInfo.merchantId
}
return window.$HTTP({
url,
data: {
method: 'entmicro.api.customercollect.reportCustomerList',
jsonList: [data]
},
})
}
}
\ No newline at end of file \ No newline at end of file
...@@ -15,6 +15,7 @@ import shopmallApi from './shopmallApi' ...@@ -15,6 +15,7 @@ import shopmallApi from './shopmallApi'
import boutiquecouponApi from './boutiquecouponApi' import boutiquecouponApi from './boutiquecouponApi'
import equityApi from './equityApi' import equityApi from './equityApi'
import giftApi from './giftApi' import giftApi from './giftApi'
import bigdatautilApi from './bigdatautilApi'
export { export {
ssoApi, ssoApi,
...@@ -25,5 +26,6 @@ export { ...@@ -25,5 +26,6 @@ export {
liveApi, liveApi,
boutiquecouponApi, boutiquecouponApi,
equityApi, equityApi,
giftApi giftApi,
bigdatautilApi
} }
\ No newline at end of file \ No newline at end of file
...@@ -38,5 +38,5 @@ module.exports = { ...@@ -38,5 +38,5 @@ module.exports = {
source: "scrm-main", source: "scrm-main",
v: "1.0.0", v: "1.0.0",
}, },
vconsole: false vconsole: true
} }
\ No newline at end of file \ No newline at end of file
import { couponApi, wxConfig } from '@/api' import { wxConfig, bigdatautilApi } from '@/api'
export default { export default {
data () { data () {
return { return {
...@@ -101,11 +101,11 @@ export default { ...@@ -101,11 +101,11 @@ export default {
if (name === 'merchant') { /**店铺 */ if (name === 'merchant') { /**店铺 */
switch (+tabIndex) { switch (+tabIndex) {
case 1: case 1:
let isjt = i.packageType==2 let isjt = i.packageType == 2
const STORE_PATH = 'packageEquity/pages/package/package' const STORE_PATH = 'packageEquity/pages/package/package'
const JT_PATH = 'packageEquity/pages/open/open' const JT_PATH = 'packageEquity/pages/open/open'
// params.path = 'packageEquity/pages/package/package' // params.path = 'packageEquity/pages/package/package'
params.path = isjt?JT_PATH:STORE_PATH params.path = isjt ? JT_PATH : STORE_PATH
params.imgUrl = 'http://img01.glsx.com.cn/upload/biz/dracMini-qy-10004.png' params.imgUrl = 'http://img01.glsx.com.cn/upload/biz/dracMini-qy-10004.png'
params.desc = '您的专属客服顾问为您发来了会员套餐,点击查看哦' params.desc = '您的专属客服顾问为您发来了会员套餐,点击查看哦'
query = `id=${id}&${query}&shareStaffName=${this.toUnicode(userName)}&shareStaffUuid=${uuid}&packageType=${i.packageType}` query = `id=${id}&${query}&shareStaffName=${this.toUnicode(userName)}&shareStaffUuid=${uuid}&packageType=${i.packageType}`
...@@ -124,7 +124,7 @@ export default { ...@@ -124,7 +124,7 @@ export default {
desc: '', desc: '',
title: i.activityName, title: i.activityName,
// link: `${baseURL}/dj-scrm-wx-work-main-lwk/#/?id=${i.id}` // link: `${baseURL}/dj-scrm-wx-work-main-lwk/#/?id=${i.id}`
link: `${baseURL}/scrm-wx-merchant-activity/#/?id=${i.id}` link: `${baseURL}/scrm-wx-merchant-activity/#/?${query}&id=${i.id}&staffUuid=${uuid}&staffName=${this.toUnicode(userName)}&staffType=2`
} }
break break
default: default:
...@@ -133,15 +133,19 @@ export default { ...@@ -133,15 +133,19 @@ export default {
} }
if (shareType == 'h5') { if (shareType == 'h5') {
console.log(h5Params) console.log(h5Params)
if (entryType) this.sendChatMessage(h5Params, 'news') if (entryType) this.sendChatMessage(h5Params, 'news', () => {
bigdatautilApi.reportTrack(i.id)
})
else wxConfig else wxConfig
.shareAppMessage(h5Params) .shareAppMessage(h5Params)
.then(() => { .then(() => {
this.hideLoading() this.hideLoading()
bigdatautilApi.reportTrack(i.id)
}) })
.catch(() => { .catch(() => {
this.hideLoading() this.hideLoading()
}) })
} else { } else {
if (entryType) this.sendChatMessage({ if (entryType) this.sendChatMessage({
appid: shopmall_appid, appid: shopmall_appid,
...@@ -160,7 +164,7 @@ export default { ...@@ -160,7 +164,7 @@ export default {
}) })
} }
}, },
sendChatMessage (params, msgtype = 'miniprogram') { sendChatMessage (params, msgtype = 'miniprogram', callBack) {
wxConfig wxConfig
.sendChatMessage({ .sendChatMessage({
msgtype, msgtype,
...@@ -169,6 +173,7 @@ export default { ...@@ -169,6 +173,7 @@ export default {
}) })
.then(() => { .then(() => {
this.hideLoading() this.hideLoading()
if (callBack) callBack()
}) })
.catch(err => { .catch(err => {
console.log('当前会话', err) console.log('当前会话', err)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!