...
|
...
|
@@ -47,9 +47,23 @@ Page({ |
|
|
let that = this
|
|
|
console.log(that.data.private, 'options分享传递的参数', '页面首次加载');
|
|
|
if (options.scene) {
|
|
|
let str = decodeURIComponent(options.scene)
|
|
|
console.log('str',str)
|
|
|
let scene = str.split(',');
|
|
|
let codeid = scene[0].split(':')[1]
|
|
|
let code = scene[1].split(':')[1]
|
|
|
let is_share = scene[2].split(':')[1]
|
|
|
console.log(codeid,code)
|
|
|
that.setData({
|
|
|
id: options.scene,
|
|
|
id: code,
|
|
|
inviter_id: codeid
|
|
|
})
|
|
|
if (is_share) {
|
|
|
wx.setStorageSync('is_share',is_share)
|
|
|
that.setData({
|
|
|
share_inviter_id: codeid
|
|
|
})
|
|
|
}
|
|
|
} else {
|
|
|
if (options.is_share == 1) {
|
|
|
that.setData({
|
...
|
...
|
@@ -59,6 +73,9 @@ Page({ |
|
|
wx.setStorageSync('is_share', options.is_share)
|
|
|
wx.setStorageSync('s4_id', options.s4_id)
|
|
|
wx.setStorageSync('s4_name', options.s4_name)
|
|
|
that.setData({
|
|
|
share_inviter_id: options.inviter_id
|
|
|
})
|
|
|
} else {
|
|
|
that.setData({
|
|
|
id: options.id,
|
...
|
...
|
@@ -105,20 +122,24 @@ Page({ |
|
|
},
|
|
|
// 分享朋友圈
|
|
|
onShareAppMessage: function (res) {
|
|
|
let that = this
|
|
|
let inviter_id = wx.getStorageSync('user_id')
|
|
|
wx.showShareMenu({
|
|
|
withShareTicket: true,
|
|
|
menus: ['shareAppMessage', 'shareTimeline'],
|
|
|
})
|
|
|
return {
|
|
|
title: '汽车互联网4S店全面的汽车电商服务体验,邀您一起参与',
|
|
|
path: '/pages/details/details'
|
|
|
path: '/pages/details/details?id=' + that.data.id + '&type=' + that.data.type + '&inviter_id='+ inviter_id
|
|
|
}
|
|
|
},
|
|
|
|
|
|
onShareTimeline() {
|
|
|
let that = this
|
|
|
let inviter_id = wx.getStorageSync('user_id')
|
|
|
return {
|
|
|
title: '汽车互联网4S店全面的汽车电商服务体验,邀您一起参与',
|
|
|
path: '/pages/details/details'
|
|
|
path: '/pages/details/details' + that.data.id + '&type=' + that.data.type + '&inviter_id='+ inviter_id
|
|
|
}
|
|
|
},
|
|
|
goback() {
|
...
|
...
|
@@ -564,14 +585,16 @@ Page({ |
|
|
var that = this;
|
|
|
let s4_id = wx.getStorageSync('s4_id')
|
|
|
let s4_name = wx.getStorageSync('s4_name')
|
|
|
let inviter_id = wx.getStorageSync('user_id')
|
|
|
that.record();
|
|
|
var shareObj = {
|
|
|
title: that.data.tuanDetail.goods_name, // 默认是小程序的名称(可以写slogan等)
|
|
|
path: '/pages/VtuanDetail/VtuanDetail?id=' + that.data.id + '&is_share=1' + '&s4_id=' + s4_id + '&s4_name=' + s4_name, // 默认是当前页面,必须是以‘/’开头的完整路径
|
|
|
path: '/pages/VtuanDetail/VtuanDetail?id=' + that.data.id + '&is_share=1' + '&s4_id=' + s4_id + '&s4_name=' + s4_name + '&inviter_id='+ inviter_id, // 默认是当前页面,必须是以‘/’开头的完整路径
|
|
|
imageUrl: '', //自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
|
|
|
};
|
|
|
// 返回shareObj
|
|
|
return shareObj;
|
|
|
|
|
|
d
|
|
|
},
|
|
|
//记录流量
|
|
|
record() {
|
...
|
...
|
@@ -599,13 +622,21 @@ Page({ |
|
|
},
|
|
|
// 发送浏览时间
|
|
|
sendCountTime() {
|
|
|
let that = this
|
|
|
console.log(that.data.id,intPageATime, 'assdsdsdsdsdsdsdsd')
|
|
|
request({
|
|
|
url: '/api/new2/userOperateTime',
|
|
|
data: {
|
|
|
type: 1,
|
|
|
goods_id: this.data.id,
|
|
|
time: intPageATime
|
|
|
}
|
|
|
goods_id: that.data.id,
|
|
|
time: intPageATime,
|
|
|
lat: that.data.latitude,
|
|
|
lng: that.data.longitude,
|
|
|
inviter_id:that.data.share_inviter_id
|
|
|
},
|
|
|
success(res){
|
|
|
console.log('res', res)
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
GOcanvas() {
|
...
|
...
|
@@ -618,7 +649,6 @@ Page({ |
|
|
} else {
|
|
|
this.goLogin()
|
|
|
}
|
|
|
|
|
|
},
|
|
|
async getPingList() { // 获取评价
|
|
|
let that = this
|
...
|
...
|
@@ -652,18 +682,6 @@ Page({ |
|
|
})
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async public() {
|
|
|
let that = this
|
|
|
try {
|
...
|
...
|
|