...
|
...
|
@@ -3,6 +3,8 @@ import { |
|
|
} from "../../request/index.js";
|
|
|
const a = getApp()
|
|
|
var WxParse = require('../../wxParse/wxParse.js');
|
|
|
var QQMapWX = require('../../qqmap/qqmap-wx-jssdk.min.js');
|
|
|
var qqmapsdk;
|
|
|
var timerPageA; // 计时器
|
|
|
var intPageATime = 0
|
|
|
|
...
|
...
|
@@ -46,7 +48,11 @@ Page({ |
|
|
autoplay: false,
|
|
|
interval: 2000,
|
|
|
duration: 500,
|
|
|
testlist: []
|
|
|
testlist: [],
|
|
|
numberpeople:0,
|
|
|
latitude: null,//纬度
|
|
|
longitude: null,//经度
|
|
|
is_exist: null,//是否有红包
|
|
|
},
|
|
|
onShow: function () {
|
|
|
console.log('页面再展示')
|
...
|
...
|
@@ -59,6 +65,7 @@ Page({ |
|
|
personsun: num
|
|
|
})
|
|
|
that.countTime()
|
|
|
that.getCitied()//获取位置
|
|
|
},
|
|
|
onLoad: function (options) {
|
|
|
let that = this
|
...
|
...
|
@@ -207,7 +214,7 @@ Page({ |
|
|
}
|
|
|
},
|
|
|
|
|
|
async zhanshilist(s4_id) { // 展示列表
|
|
|
async zhanshilist() { // 展示列表
|
|
|
let that = this
|
|
|
try {
|
|
|
const {
|
...
|
...
|
@@ -215,13 +222,14 @@ Page({ |
|
|
} = await request({
|
|
|
url: 'api/active/applyActiveUserList',
|
|
|
data: {
|
|
|
id: s4_id
|
|
|
id: that.data.id
|
|
|
}
|
|
|
})
|
|
|
if (data.code == 1) {
|
|
|
console.log(data.data.data)
|
|
|
console.log(data)
|
|
|
that.setData({
|
|
|
testlist: data.data.data
|
|
|
testlist: data.data.data,
|
|
|
numberpeople: data.data.count
|
|
|
})
|
|
|
} else {
|
|
|
|
...
|
...
|
@@ -255,14 +263,16 @@ Page({ |
|
|
that.setData({
|
|
|
is_start: true,
|
|
|
time: data.start_time_num,
|
|
|
timename: '距开始还有'
|
|
|
timename: '距开始还有',
|
|
|
is_exist: data.is_exist
|
|
|
})
|
|
|
} else if (Number(data.time_num) >= 0) {
|
|
|
that.countown()
|
|
|
that.setData({
|
|
|
is_start: false,
|
|
|
time: data.time_num,
|
|
|
timename: '距结束还有'
|
|
|
timename: '距结束还有',
|
|
|
is_exist: data.is_exist
|
|
|
})
|
|
|
} else {
|
|
|
that.setData({
|
...
|
...
|
@@ -469,12 +479,16 @@ Page({ |
|
|
},
|
|
|
// 发送浏览时间
|
|
|
sendCountTime() {
|
|
|
let that = this
|
|
|
console.log(this.data.id,intPageATime)
|
|
|
request({
|
|
|
url: '/api/new2/userOperateTime',
|
|
|
data: {
|
|
|
type: 2,
|
|
|
active_id: this.data.id,
|
|
|
time: intPageATime
|
|
|
time: intPageATime,
|
|
|
lat: this.data.latitude,
|
|
|
lng: this.data.longitude,
|
|
|
}
|
|
|
})
|
|
|
},
|
...
|
...
|
@@ -519,6 +533,21 @@ Page({ |
|
|
}, 1000)
|
|
|
})
|
|
|
},
|
|
|
//获取位置信息
|
|
|
getCitied() { // 获取城市信息
|
|
|
let that = this
|
|
|
wx.getLocation({
|
|
|
type: 'wgs84', //默认为 wgs84 返回 gps 坐标,gcj02 返回可用于 wx.openLocation 的坐标
|
|
|
success: function (res) {
|
|
|
console.log(res.latitude,res.longitude)
|
|
|
that.setData({
|
|
|
latitude: res.latitude,
|
|
|
longitude: res.longitude
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
return
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 生命周期函数--监听页面隐藏
|
...
|
...
|
@@ -539,7 +568,6 @@ Page({ |
|
|
this.sendCountTime()
|
|
|
console.log(intPageATime)
|
|
|
intPageATime = 0
|
|
|
|
|
|
},
|
|
|
|
|
|
}) |
|
|
\ No newline at end of file |
...
|
...
|
|