...
|
...
|
@@ -53,7 +53,7 @@ Page({ |
|
|
this.setData({show_gold_modal:false,show_normal_modal:false,is_showResult:false});
|
|
|
try {
|
|
|
wx.removeStorageSync('score');
|
|
|
console.log('删除后score',wx.getStorageSync('score'));
|
|
|
// console.log('删除后score',wx.getStorageSync('score'));
|
|
|
} catch (e) {
|
|
|
// Do something when catch error
|
|
|
}
|
...
|
...
|
@@ -98,12 +98,12 @@ Page({ |
|
|
"token": wx.getStorageSync('token')
|
|
|
};
|
|
|
app.post(url, params, {}).then((res) => {
|
|
|
console.log('是否填写个人信息', res);
|
|
|
// console.log('是否填写个人信息', res);
|
|
|
if (+res.code === 1) {
|
|
|
self.setData({
|
|
|
is_write:res.data.is_write,//1:已填写2:未填写
|
|
|
});
|
|
|
console.log('score',wx.getStorageSync('score'));
|
|
|
// console.log('score',wx.getStorageSync('score'));
|
|
|
if(wx.getStorageSync('score') !== '' && wx.getStorageSync('score')>=80) {
|
|
|
self.setData({show_gold_modal:true})
|
|
|
}else if(wx.getStorageSync('score') !== '' && wx.getStorageSync('score')<80) {
|
...
|
...
|
@@ -155,7 +155,6 @@ Page({ |
|
|
},
|
|
|
disableScroll() {},
|
|
|
handleBackground() {
|
|
|
console.log('dianji');
|
|
|
this.setData({is_showAnswer: false, is_showUserInfo: false,is_showRelease:false,is_showResult:false})
|
|
|
},
|
|
|
//搜索
|
...
|
...
|
@@ -229,7 +228,7 @@ Page({ |
|
|
},
|
|
|
//选择开始时间
|
|
|
changeStartTime: function(e) {
|
|
|
console.log('picker发送选择改变,携带值为', e.detail.value)
|
|
|
// console.log('picker发送选择改变,携带值为', e.detail.value)
|
|
|
this.setData({
|
|
|
start_time_date: e.detail.value,
|
|
|
is_showSelect: true,
|
...
|
...
|
@@ -238,7 +237,7 @@ Page({ |
|
|
},
|
|
|
//选择结束时间
|
|
|
changeEndTime: function(e) {
|
|
|
console.log('picker发送选择改变,携带值为', e.detail.value)
|
|
|
// console.log('picker发送选择改变,携带值为', e.detail.value)
|
|
|
this.setData({
|
|
|
end_time_date: e.detail.value,
|
|
|
is_showSelect: true,
|
...
|
...
|
@@ -255,7 +254,7 @@ Page({ |
|
|
chooseType(e) {
|
|
|
const current = e.currentTarget.dataset.index;
|
|
|
const id = e.currentTarget.dataset.id;
|
|
|
console.log('select_id', id);
|
|
|
// console.log('select_id', id);
|
|
|
this.setData({current_type: current, is_all: false, is_showSelect: false, is_showSort: false,select_id:id});
|
|
|
wx.showLoading({
|
|
|
title: '加载中',
|
...
|
...
|
@@ -382,14 +381,14 @@ Page({ |
|
|
//获取首页分类列表
|
|
|
getTypeList() {
|
|
|
const self = this;
|
|
|
console.log('city',self.data.city);
|
|
|
// console.log('city',self.data.city);
|
|
|
let url = '';
|
|
|
if(self.data.current === 0) {//拼餐
|
|
|
url = '/portal/Active/meal';
|
|
|
console.log('拼餐');
|
|
|
// console.log('拼餐');
|
|
|
}else if(self.data.current === 1) { //拼活动
|
|
|
url = '/portal/Active/active';
|
|
|
console.log('拼活动');
|
|
|
// console.log('拼活动');
|
|
|
}
|
|
|
let params = {
|
|
|
lat: wx.getStorageSync('lat') !== ''?self.data.lat:self.data.latitude,
|
...
|
...
|
@@ -405,7 +404,7 @@ Page({ |
|
|
"token": wx.getStorageSync('token')
|
|
|
};
|
|
|
app.post(url, params, {}).then((res) => {
|
|
|
console.log('获取列表', res);
|
|
|
// console.log('获取列表', res);
|
|
|
if (+res.code === 1) {
|
|
|
self.setData({
|
|
|
list: res.data.active,
|
...
|
...
|
@@ -434,7 +433,7 @@ Page({ |
|
|
"token": wx.getStorageSync('token')
|
|
|
};
|
|
|
app.post(url, params, {}).then((res) => {
|
|
|
console.log('获取城市', res);
|
|
|
// console.log('获取城市', res);
|
|
|
if (+res.code === 1) {
|
|
|
self.setData({
|
|
|
addr: res.data.city.city,
|
...
|
...
|
@@ -453,7 +452,7 @@ Page({ |
|
|
type: 'wgs84',
|
|
|
altitude: 'true',
|
|
|
success(res) {
|
|
|
console.log('获取地理位', res);
|
|
|
// console.log('获取地理位', res);
|
|
|
self.setData({latitude: res.latitude, longitude: res.longitude});
|
|
|
self.getCity();
|
|
|
}
|
...
|
...
|
@@ -464,7 +463,7 @@ Page({ |
|
|
* 生命周期函数--监听页面加载
|
|
|
*/
|
|
|
onLoad: function (options) {
|
|
|
console.log('options', options);
|
|
|
// console.log('options', options);
|
|
|
this.setData({current:+options.current?+options.current:0})
|
|
|
},
|
|
|
|
...
|
...
|
@@ -486,7 +485,7 @@ Page({ |
|
|
if(wx.getStorageSync('lat') !== '' &&
|
|
|
wx.getStorageSync('lng') !== '' &&
|
|
|
wx.getStorageSync('addr') !== '') {
|
|
|
console.log('已选择城市',wx.getStorageSync('lat'),wx.getStorageSync('lng'),wx.getStorageSync('addr'));
|
|
|
// console.log('已选择城市',wx.getStorageSync('lat'),wx.getStorageSync('lng'),wx.getStorageSync('addr'));
|
|
|
self.setData({
|
|
|
is_city_change:true,
|
|
|
lat:wx.getStorageSync('lat'),
|
...
|
...
|
|