...
|
...
|
@@ -38,14 +38,12 @@ Page({ |
|
|
|
|
|
onLoad: function (options) {
|
|
|
let that = this
|
|
|
console.log(options);
|
|
|
if (options.scene) {
|
|
|
that.setData({
|
|
|
id: options.scene,
|
|
|
})
|
|
|
} else {
|
|
|
if (options.is_share == 1) {
|
|
|
console.log('是分享进入');
|
|
|
this.setData({
|
|
|
is_share: options.is_share,
|
|
|
id: options.id,
|
...
|
...
|
@@ -57,7 +55,14 @@ Page({ |
|
|
}
|
|
|
}
|
|
|
this.getTuanDetail()
|
|
|
|
|
|
// 分享朋友圈
|
|
|
wx.showShareMenu({
|
|
|
menus: ['shareAppMessage', 'shareTimeline'],
|
|
|
success(res) {
|
|
|
},
|
|
|
fail(e) {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
|
|
|
onShow: function () {
|
...
|
...
|
@@ -67,7 +72,24 @@ Page({ |
|
|
}
|
|
|
this.countTime()
|
|
|
},
|
|
|
// 分享朋友圈
|
|
|
onShareAppMessage: function (res) {
|
|
|
wx.showShareMenu({
|
|
|
withShareTicket: true,
|
|
|
menus: ['shareAppMessage', 'shareTimeline'],
|
|
|
})
|
|
|
return {
|
|
|
title: '汽车互联网4S店全面的汽车电商服务体验,邀您一起参与',
|
|
|
path: '/pages/details/details'
|
|
|
}
|
|
|
},
|
|
|
|
|
|
onShareTimeline() {
|
|
|
return {
|
|
|
title: '汽车互联网4S店全面的汽车电商服务体验,邀您一起参与',
|
|
|
path: '/pages/details/details'
|
|
|
}
|
|
|
},
|
|
|
goback() {
|
|
|
if (this.data.is_share == 1) {
|
|
|
wx.reLaunch({
|
...
|
...
|
@@ -196,13 +218,11 @@ Page({ |
|
|
a.popTest(err.msg)
|
|
|
}
|
|
|
|
|
|
// console.log(tuan_id, "我是团id");
|
|
|
},
|
|
|
pingdanOn(e) {
|
|
|
|
|
|
let tuan_id = e.currentTarget.dataset.tuan_id || ''
|
|
|
let shop_id = e.currentTarget.dataset.id
|
|
|
// console.log(tuan_id, shop_id);
|
|
|
this.setData({
|
|
|
tuan_id,
|
|
|
shop_id,
|
...
|
...
|
@@ -272,7 +292,6 @@ Page({ |
|
|
id: that.data.id
|
|
|
}
|
|
|
})
|
|
|
// console.log(data, "消tuanId情");
|
|
|
that.setData({
|
|
|
goodsPrice: data.goods_price
|
|
|
})
|
...
|
...
|
@@ -300,7 +319,6 @@ Page({ |
|
|
that.setData({
|
|
|
tuanGui: list
|
|
|
})
|
|
|
// console.log(that.data.tuanGui, "tuanGui");
|
|
|
}
|
|
|
})
|
|
|
if (list.length == 0 || list.length < arr.length) {
|
...
|
...
|
@@ -438,7 +456,6 @@ Page({ |
|
|
details = details.substring(details.indexOf('style="') + 7); //style后面的内容拼接
|
|
|
|
|
|
} else {
|
|
|
// // console.log(34449898)
|
|
|
|
|
|
texts += ' style="width:750rpx;height:auto;margin:0 auto;" ';
|
|
|
}
|
...
|
...
|
@@ -451,7 +468,6 @@ Page({ |
|
|
},
|
|
|
onShareAppMessage(options) {
|
|
|
var that = this;
|
|
|
console.log(options)
|
|
|
var shareObj = {
|
|
|
title: that.data.tuanDetail.goods_name, // 默认是小程序的名称(可以写slogan等)
|
|
|
path: '/pages/VtuanDetail/VtuanDetail?id=' + that.data.id + '&is_share=1', // 默认是当前页面,必须是以‘/’开头的完整路径
|
...
|
...
|
@@ -464,7 +480,6 @@ Page({ |
|
|
//记录流量
|
|
|
record() {
|
|
|
let that = this
|
|
|
console.log(that.data.id)
|
|
|
request({
|
|
|
url: '/api/new2/userOperateShare',
|
|
|
data: {
|
...
|
...
|
@@ -478,7 +493,6 @@ Page({ |
|
|
let that = this
|
|
|
// 计时过程
|
|
|
timerPageA = setTimeout(function () {
|
|
|
console.log('团购+1', intPageATime);
|
|
|
intPageATime = intPageATime + 1
|
|
|
wx.setStorage({
|
|
|
key: "timerPageA",
|
...
|
...
|
@@ -617,7 +631,6 @@ Page({ |
|
|
*/
|
|
|
onHide: function () {
|
|
|
clearTimeout(timerPageA);
|
|
|
console.log(intPageATime)
|
|
|
this.sendCountTime()
|
|
|
intPageATime = 0
|
|
|
|
...
|
...
|
@@ -629,7 +642,6 @@ Page({ |
|
|
onUnload: function () {
|
|
|
clearTimeout(timerPageA);
|
|
|
this.sendCountTime()
|
|
|
console.log(intPageATime)
|
|
|
intPageATime = 0
|
|
|
|
|
|
},
|
...
|
...
|
|