Commit 1b1899f0 authored by wangxuelai's avatar wangxuelai

Merge remote-tracking branch 'origin/sj-dev-v5' into wxl-develop

parents 6af4e94a f6a3ec60
......@@ -20,6 +20,6 @@
<text class="awardstatic1" selectable="false" space="false" decode="false">X</text>
<text class="awardstatic2" selectable="false" space="false" decode="false">{{integral}}</text>
</view>
<view class="statictext" hover-class="none" hover-stop-propagation="false">恭喜你,点赞成功!获得{{integral}}积分~</view>
<view class="statictext" hover-class="none" hover-stop-propagation="false">恭喜你,成功获得{{integral}}积分~</view>
</view>
</view>
\ No newline at end of file
......@@ -2122,6 +2122,7 @@ Page({
var diffDay = new Date();
var dateList = new Array;
var i = 0;
var maxIndex = 0;
diffDay.setDate(beginDay[2]);
diffDay.setMonth(beginDay[1] - 1);
diffDay.setFullYear(beginDay[0]);
......@@ -2150,9 +2151,13 @@ Page({
isdone: false // 是否打过卡
}
});
maxIndex++;
if (dateList[0] == Number(endDay[0]) && dateList[1] == Number(endDay[1]) && dateList[2] == Number(endDay[2])) {
i = 1;
}
if(maxIndex>999) {
i = 1;
}
};
}
// console.log(result)
......
......@@ -141,6 +141,7 @@ Page({
}
})
}
wx.login({
success(res) {
const sessionCode = res.code;
......@@ -579,8 +580,32 @@ Page({
if (code == 200) {
let _tabList = ['全部', '学员动态', '机构介绍'];
if (data) {
_tabList = ['全部']
data.distance = getFlatternDistance(this.data.latitude, this.data.longitude, Number(data.latitude), Number(data.longitude));
_tabList = ['全部'];
const myLocation = LocalStorage.getItem('myLocation');
const that = this;
if (myLocation) {
this.setData({
latitude: Number(myLocation.split('-')[0]),
longitude: Number(myLocation.split('-')[1]),
})
data.distance = getFlatternDistance(this.data.latitude, this.data.longitude, Number(data.latitude), Number(data.longitude))
} else {
wx.getLocation({
type: 'wgs84',
success(res) {
const {
latitude,
longitude
} = res;
LocalStorage.setItem('myLocation', latitude + '-' + longitude)
that.setData({
latitude: latitude,
longitude: longitude,
'schoolInfo.distance': getFlatternDistance(latitude,longitude, Number(data.latitude), Number(data.longitude))
})
}
})
}
data.banner = data.banner ? JSON.parse(data.banner) : '';
data.sort = data.sort ? JSON.parse(data.sort) : [{
name: 'schoolinfo',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment