作者 刘朕

代码更新

... ... @@ -233,7 +233,7 @@ App({
// baseUrl: 'http://chemai.shs.broing.cn/',
baseUrl: 'https://xiaoxiangauto.com/',
// baseUrl: 'http://chemai.t.brotop.cn/',
// imagesUrl: 'https://xiaoxiangauto.com/',
imagesUrl: 'https://xiaoxiangauto.com/',
statusHeight: 0,
stores_id: '', //进入4s店id
city_glob_id: '', // 城市定位
... ...
... ... @@ -727,7 +727,7 @@ Page({
*/
onHide: function () {
clearTimeout(timerPageA);
this.sendCountTime()
// this.sendCountTime()
intPageATime = 0
},
... ...
... ... @@ -24,6 +24,7 @@ Page({
id: '',
type: '',
inviter_id: '',
share_inviter_id: '',
time_data: '',
obj: '',
texts: 0,
... ... @@ -68,12 +69,13 @@ Page({
that.getCitied()//获取位置
},
onLoad: function (options) {
console.log('options',options);
let that = this
let token = wx.getStorageSync('token')
console.log(options,wx.getStorageSync('user_id'))
if (options.scene) {
let str = decodeURIComponent(options.scene)
console.log(str)
console.log('str',str)
let sss = str.indexOf (':')
let sssh = str.indexOf (',')
let codeid = str.substring(sss + 1, sssh)
... ... @@ -86,6 +88,12 @@ Page({
type: 2,
inviter_id: codeid
})
if (str.is_share) {
wx.setStorageSync('is_share', str.is_share)
that.setData({
share_inviter_id: str.inviter_id
})
}
// wx.setStorageSync('s4_id', options.s4_id)
// wx.setStorageSync('s4_name', options.s4_name)
} else {
... ... @@ -102,6 +110,9 @@ Page({
}
if (options.is_share) {
wx.setStorageSync('is_share', options.is_share)
that.setData({
share_inviter_id: options.inviter_id
})
}
// 改
// if (options.is_share == 1) {
... ... @@ -489,16 +500,16 @@ Page({
// 发送浏览时间
sendCountTime() {
let that = this
console.log(this.data.id,intPageATime, 'assdsdsdsdsdsdsdsd')
console.log(that.data.id,intPageATime, 'assdsdsdsdsdsdsdsd')
request({
url: '/api/new2/userOperateTime',
data: {
type: 2,
active_id: this.data.id,
active_id: that.data.id,
time: intPageATime,
lat: this.data.latitude,
lng: this.data.longitude,
inviter_id:wx.getStorageSync('user_id')
lat: that.data.latitude,
lng: that.data.longitude,
inviter_id:that.data.share_inviter_id
},
success(res){
console.log('res', res)
... ... @@ -568,7 +579,7 @@ Page({
onHide: function () {
clearTimeout(timerPageA);
console.log(intPageATime)
this.sendCountTime()
// this.sendCountTime()
intPageATime = 0
},
... ... @@ -578,7 +589,10 @@ Page({
*/
onUnload: function () {
clearTimeout(timerPageA);
this.sendCountTime()
if(wx.getStorageSync('is_share') == 1) {
this.sendCountTime()
}
wx.removeStorageSync('is_share')
console.log(intPageATime)
intPageATime = 0
},
... ...
... ... @@ -37,8 +37,12 @@ Page({
id: options.id,
})
} else {
console.log(options.scene);
let scene = options.scene;
scene = scene.split('%2C');
let id = scene[1].split('scene%3A')[1]
that.setData({
id: options.id,
id: id,
})
}
if (token) {
... ...