Commit 4e2b90b1 by 李伟康

增加埋点

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