Commit 4e2b90b1 by 李伟康

增加埋点

1 parent 5de451ae
......@@ -84,5 +84,12 @@ class outputApi {
...data
})
}
/**长按海报埋点 */
reportPosterTrack(data) {
return api.post({
method: 'scrm.api.busassistant.crowdFunding.poster.shared.createRecord',
...data
})
}
}
export default outputApi
......@@ -21,6 +21,10 @@ Component({
findKey: {
type: String,
value: 'activityId'
},
scrollImg: {
type: Boolean,
value: true
}
},
......
......@@ -212,7 +212,10 @@ Component({
wxLogin({
detail
}) {
if (!detail.code) return
if (!detail.code) {
wx.$api.showToast('当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。')
return
}
this.setBtnLoading()
USERAPI.authUserPhone(detail, this.loginToken)
.then(({
......
// packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.js
import wxqrcode from '~/utils/lib/wxqrcode'
import { IMG_URL } from '~/utils/constantData'
import {
IMG_URL
} from '~/utils/constantData'
import outputApi from '~/api/outputApi/index'
const IMAGES = Object.freeze({
download: `${IMG_URL}/output/download.webp`
......@@ -30,8 +32,7 @@ Component({
IMGURL: IMG_URL,
IMAGES,
isShowTip: true,
orderFormList: [
{
orderFormList: [{
label: '总场次',
name: 'totalNum'
},
......@@ -45,8 +46,7 @@ Component({
prefix: '¥'
}
],
merchantFormList: [
{
merchantFormList: [{
label: '活动时间',
name: 'time'
},
......@@ -66,8 +66,7 @@ Component({
prefix: '¥'
}
],
tableHeadList: [
{
tableHeadList: [{
label: 'rankIdx',
width: '40rpx'
},
......@@ -114,7 +113,9 @@ Component({
})
},
handleMore(e) {
var { idx } = e.currentTarget.dataset
var {
idx
} = e.currentTarget.dataset
var list = this.data.orderObj
var item = list.activityList[idx]
list.activityList[idx].showStaffList = list.activityList[idx].showStaffList.concat(item.staffList.length > 10 ? item.staffList.slice(0, 10) : item.staffList)
......@@ -124,7 +125,9 @@ Component({
})
},
handleCopy(e) {
var { idx } = e.currentTarget.dataset
var {
idx
} = e.currentTarget.dataset
var currentItem = this.data.orderObj.activityList[idx]
var qr = wxqrcode.createQrCodeImg(currentItem.activityUrl)
const base64src = function (base64data) {
......@@ -166,9 +169,7 @@ Component({
const {
item
} = e.currentTarget.dataset,
posterObj = this.selectComponent('#poster'),
{options} = wx.$router.getPageInstance()
console.log(options)
posterObj = this.selectComponent('#poster')
try {
let flag = await posterObj.check(item)
posterObj.setData({
......@@ -185,14 +186,21 @@ Component({
posterItem: item,
isShowTip: false
})
}).catch(()=>{
}).catch(() => {
wx.$api.showToast('下载海报失败')
})
}
},
/**长按海报 */
longtouch(e){
console.log('长按海报',e)
async longtouch(e) {
console.log('长按海报', e)
let {
activityId
} = e.detail
const res = await outputApi.reportPosterTrack({
activityId
})
console.log(res)
}
}
})
})
\ No newline at end of file
......@@ -112,5 +112,5 @@
</view>
</view>
</view>
<crowdfund-poster item="{{posterItem}}" id="poster" bindlongtouch="longtouch" />
<crowdfund-poster item="{{posterItem}}" id="poster" scrollImg="{{false}}" bindlongtouch="longtouch" />
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!