|
@@ -53,7 +53,7 @@ Page({ |
|
@@ -53,7 +53,7 @@ Page({ |
53
|
this.setData({show_gold_modal:false,show_normal_modal:false,is_showResult:false});
|
53
|
this.setData({show_gold_modal:false,show_normal_modal:false,is_showResult:false});
|
54
|
try {
|
54
|
try {
|
55
|
wx.removeStorageSync('score');
|
55
|
wx.removeStorageSync('score');
|
56
|
- console.log('删除后score',wx.getStorageSync('score'));
|
56
|
+ // console.log('删除后score',wx.getStorageSync('score'));
|
57
|
} catch (e) {
|
57
|
} catch (e) {
|
58
|
// Do something when catch error
|
58
|
// Do something when catch error
|
59
|
}
|
59
|
}
|
|
@@ -98,12 +98,12 @@ Page({ |
|
@@ -98,12 +98,12 @@ Page({ |
98
|
"token": wx.getStorageSync('token')
|
98
|
"token": wx.getStorageSync('token')
|
99
|
};
|
99
|
};
|
100
|
app.post(url, params, {}).then((res) => {
|
100
|
app.post(url, params, {}).then((res) => {
|
101
|
- console.log('是否填写个人信息', res);
|
101
|
+ // console.log('是否填写个人信息', res);
|
102
|
if (+res.code === 1) {
|
102
|
if (+res.code === 1) {
|
103
|
self.setData({
|
103
|
self.setData({
|
104
|
is_write:res.data.is_write,//1:已填写2:未填写
|
104
|
is_write:res.data.is_write,//1:已填写2:未填写
|
105
|
});
|
105
|
});
|
106
|
- console.log('score',wx.getStorageSync('score'));
|
106
|
+ // console.log('score',wx.getStorageSync('score'));
|
107
|
if(wx.getStorageSync('score') !== '' && wx.getStorageSync('score')>=80) {
|
107
|
if(wx.getStorageSync('score') !== '' && wx.getStorageSync('score')>=80) {
|
108
|
self.setData({show_gold_modal:true})
|
108
|
self.setData({show_gold_modal:true})
|
109
|
}else if(wx.getStorageSync('score') !== '' && wx.getStorageSync('score')<80) {
|
109
|
}else if(wx.getStorageSync('score') !== '' && wx.getStorageSync('score')<80) {
|
|
@@ -155,7 +155,6 @@ Page({ |
|
@@ -155,7 +155,6 @@ Page({ |
155
|
},
|
155
|
},
|
156
|
disableScroll() {},
|
156
|
disableScroll() {},
|
157
|
handleBackground() {
|
157
|
handleBackground() {
|
158
|
- console.log('dianji');
|
|
|
159
|
this.setData({is_showAnswer: false, is_showUserInfo: false,is_showRelease:false,is_showResult:false})
|
158
|
this.setData({is_showAnswer: false, is_showUserInfo: false,is_showRelease:false,is_showResult:false})
|
160
|
},
|
159
|
},
|
161
|
//搜索
|
160
|
//搜索
|
|
@@ -229,7 +228,7 @@ Page({ |
|
@@ -229,7 +228,7 @@ Page({ |
229
|
},
|
228
|
},
|
230
|
//选择开始时间
|
229
|
//选择开始时间
|
231
|
changeStartTime: function(e) {
|
230
|
changeStartTime: function(e) {
|
232
|
- console.log('picker发送选择改变,携带值为', e.detail.value)
|
231
|
+ // console.log('picker发送选择改变,携带值为', e.detail.value)
|
233
|
this.setData({
|
232
|
this.setData({
|
234
|
start_time_date: e.detail.value,
|
233
|
start_time_date: e.detail.value,
|
235
|
is_showSelect: true,
|
234
|
is_showSelect: true,
|
|
@@ -238,7 +237,7 @@ Page({ |
|
@@ -238,7 +237,7 @@ Page({ |
238
|
},
|
237
|
},
|
239
|
//选择结束时间
|
238
|
//选择结束时间
|
240
|
changeEndTime: function(e) {
|
239
|
changeEndTime: function(e) {
|
241
|
- console.log('picker发送选择改变,携带值为', e.detail.value)
|
240
|
+ // console.log('picker发送选择改变,携带值为', e.detail.value)
|
242
|
this.setData({
|
241
|
this.setData({
|
243
|
end_time_date: e.detail.value,
|
242
|
end_time_date: e.detail.value,
|
244
|
is_showSelect: true,
|
243
|
is_showSelect: true,
|
|
@@ -255,7 +254,7 @@ Page({ |
|
@@ -255,7 +254,7 @@ Page({ |
255
|
chooseType(e) {
|
254
|
chooseType(e) {
|
256
|
const current = e.currentTarget.dataset.index;
|
255
|
const current = e.currentTarget.dataset.index;
|
257
|
const id = e.currentTarget.dataset.id;
|
256
|
const id = e.currentTarget.dataset.id;
|
258
|
- console.log('select_id', id);
|
257
|
+ // console.log('select_id', id);
|
259
|
this.setData({current_type: current, is_all: false, is_showSelect: false, is_showSort: false,select_id:id});
|
258
|
this.setData({current_type: current, is_all: false, is_showSelect: false, is_showSort: false,select_id:id});
|
260
|
wx.showLoading({
|
259
|
wx.showLoading({
|
261
|
title: '加载中',
|
260
|
title: '加载中',
|
|
@@ -382,14 +381,14 @@ Page({ |
|
@@ -382,14 +381,14 @@ Page({ |
382
|
//获取首页分类列表
|
381
|
//获取首页分类列表
|
383
|
getTypeList() {
|
382
|
getTypeList() {
|
384
|
const self = this;
|
383
|
const self = this;
|
385
|
- console.log('city',self.data.city);
|
384
|
+ // console.log('city',self.data.city);
|
386
|
let url = '';
|
385
|
let url = '';
|
387
|
if(self.data.current === 0) {//拼餐
|
386
|
if(self.data.current === 0) {//拼餐
|
388
|
url = '/portal/Active/meal';
|
387
|
url = '/portal/Active/meal';
|
389
|
- console.log('拼餐');
|
388
|
+ // console.log('拼餐');
|
390
|
}else if(self.data.current === 1) { //拼活动
|
389
|
}else if(self.data.current === 1) { //拼活动
|
391
|
url = '/portal/Active/active';
|
390
|
url = '/portal/Active/active';
|
392
|
- console.log('拼活动');
|
391
|
+ // console.log('拼活动');
|
393
|
}
|
392
|
}
|
394
|
let params = {
|
393
|
let params = {
|
395
|
lat: wx.getStorageSync('lat') !== ''?self.data.lat:self.data.latitude,
|
394
|
lat: wx.getStorageSync('lat') !== ''?self.data.lat:self.data.latitude,
|
|
@@ -405,7 +404,7 @@ Page({ |
|
@@ -405,7 +404,7 @@ Page({ |
405
|
"token": wx.getStorageSync('token')
|
404
|
"token": wx.getStorageSync('token')
|
406
|
};
|
405
|
};
|
407
|
app.post(url, params, {}).then((res) => {
|
406
|
app.post(url, params, {}).then((res) => {
|
408
|
- console.log('获取列表', res);
|
407
|
+ // console.log('获取列表', res);
|
409
|
if (+res.code === 1) {
|
408
|
if (+res.code === 1) {
|
410
|
self.setData({
|
409
|
self.setData({
|
411
|
list: res.data.active,
|
410
|
list: res.data.active,
|
|
@@ -434,7 +433,7 @@ Page({ |
|
@@ -434,7 +433,7 @@ Page({ |
434
|
"token": wx.getStorageSync('token')
|
433
|
"token": wx.getStorageSync('token')
|
435
|
};
|
434
|
};
|
436
|
app.post(url, params, {}).then((res) => {
|
435
|
app.post(url, params, {}).then((res) => {
|
437
|
- console.log('获取城市', res);
|
436
|
+ // console.log('获取城市', res);
|
438
|
if (+res.code === 1) {
|
437
|
if (+res.code === 1) {
|
439
|
self.setData({
|
438
|
self.setData({
|
440
|
addr: res.data.city.city,
|
439
|
addr: res.data.city.city,
|
|
@@ -453,7 +452,7 @@ Page({ |
|
@@ -453,7 +452,7 @@ Page({ |
453
|
type: 'wgs84',
|
452
|
type: 'wgs84',
|
454
|
altitude: 'true',
|
453
|
altitude: 'true',
|
455
|
success(res) {
|
454
|
success(res) {
|
456
|
- console.log('获取地理位', res);
|
455
|
+ // console.log('获取地理位', res);
|
457
|
self.setData({latitude: res.latitude, longitude: res.longitude});
|
456
|
self.setData({latitude: res.latitude, longitude: res.longitude});
|
458
|
self.getCity();
|
457
|
self.getCity();
|
459
|
}
|
458
|
}
|
|
@@ -464,7 +463,7 @@ Page({ |
|
@@ -464,7 +463,7 @@ Page({ |
464
|
* 生命周期函数--监听页面加载
|
463
|
* 生命周期函数--监听页面加载
|
465
|
*/
|
464
|
*/
|
466
|
onLoad: function (options) {
|
465
|
onLoad: function (options) {
|
467
|
- console.log('options', options);
|
466
|
+ // console.log('options', options);
|
468
|
this.setData({current:+options.current?+options.current:0})
|
467
|
this.setData({current:+options.current?+options.current:0})
|
469
|
},
|
468
|
},
|
470
|
|
469
|
|
|
@@ -486,7 +485,7 @@ Page({ |
|
@@ -486,7 +485,7 @@ Page({ |
486
|
if(wx.getStorageSync('lat') !== '' &&
|
485
|
if(wx.getStorageSync('lat') !== '' &&
|
487
|
wx.getStorageSync('lng') !== '' &&
|
486
|
wx.getStorageSync('lng') !== '' &&
|
488
|
wx.getStorageSync('addr') !== '') {
|
487
|
wx.getStorageSync('addr') !== '') {
|
489
|
- console.log('已选择城市',wx.getStorageSync('lat'),wx.getStorageSync('lng'),wx.getStorageSync('addr'));
|
488
|
+ // console.log('已选择城市',wx.getStorageSync('lat'),wx.getStorageSync('lng'),wx.getStorageSync('addr'));
|
490
|
self.setData({
|
489
|
self.setData({
|
491
|
is_city_change:true,
|
490
|
is_city_change:true,
|
492
|
lat:wx.getStorageSync('lat'),
|
491
|
lat:wx.getStorageSync('lat'),
|