Skip to content

Commit

Permalink
Delete Useless Codes
Browse files Browse the repository at this point in the history
  • Loading branch information
zhrrobert committed Dec 11, 2022
1 parent 8cffb55 commit 0669a07
Showing 1 changed file with 10 additions and 96 deletions.
106 changes: 10 additions & 96 deletions eaterplanet_ecommerce/pages/index/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const height = wx.getSystemInfoSync().windowHeight
var utils = require('../../utils/weather.js')
var util = require('../../utils/util.js');
var status = require('../../utils/index.js');
var a = require("../../utils/public");
Expand All @@ -10,69 +9,15 @@ var timerOut = '';
var globalData = getApp().globalData
const key = globalData.key
var SYSTEMINFO = globalData.systeminfo

Page({
mixins: [countDownInit.default, require('../../mixin/globalMixin.js'), require('../../mixin/compoentCartMixin.js')],
data: {
isIPhoneX: globalData.isIPhoneX,
bh:"",
cityDatas: {},
hourlyDatas: [],
weatherIconUrl: globalData.weatherIconUrl,
weatherIconUrl1: globalData.weatherIconUrl1,
weatherBackgroundUrl:globalData.weatherBackgroundUrl,
detailsDic: {
key: ['tmp', 'fl', 'hum', 'pcpn', 'wind_dir', 'wind_deg', 'wind_sc', 'wind_spd', 'vis', 'pres', 'cloud', ''],
val: {
tmp: '温度(℃)',
fl: '体感温度(℃)',
hum: '相对湿度(%)',
pcpn: '降水量(mm)',
wind_dir: '风向',
wind_deg: '风向角度(deg)',
wind_sc: '风力(级)',
wind_spd: '风速(mk/h)',
vis: '能见度(km)',
pres: '气压(mb)',
cloud: '云量',
},
},
lifestyles: {
'comf': '舒适度指数',
'cw': '洗车指数',
'drsg': '穿衣指数',
'flu': '感冒指数',
'sport': '运动指数',
'trav': '旅游指数',
'uv': '紫外线指数',
'air': '空气污染扩散条件指数',
'ac': '空调开启指数',
'ag': '过敏指数',
'gl': '太阳镜指数',
'mu': '化妆指数',
'airc': '晾晒指数',
'ptfc': '交通指数',
'fsh': '钓鱼指数',
'spi': '防晒指数',
},
// 用来清空 input
searchText: '',
// 是否已经弹出
hasPopped: false,
animationMain: {},
animationOne: {},
animationTwo: {},
animationThree: {},
// 是否切换了城市
located: true,
// 需要查询的城市
searchCity: '',
setting: {},
openSettingButtonShow: false,
shareInfo: {},
isfixed: !1,
statusBarHeight: app.globalData.statusBarHeight + 44 + 'px',
searchBarHeight: app.globalData.statusBarHeight + 'px',
rushboxHeight: app.globalData.statusBarHeight + 200 + 'px',
isIPhoneX: globalData.isIPhoneX,
isfixed: !1,
statusBarHeight: app.globalData.statusBarHeight + 44 + 'px',
searchBarHeight: app.globalData.statusBarHeight + 'px',
rushboxHeight: app.globalData.statusBarHeight + 200 + 'px',
needAuth: false,
stopClick: false,
community: {},
Expand All @@ -95,7 +40,7 @@ isIPhoneX: globalData.isIPhoneX,
tabs: [],
activeIndex: -1
},
common_header_backgroundimage: "",
common_header_backgroundimage: "",
isShowCommingClassification: true,
isShowClassification: true,
showChangeCommunity: false,
Expand Down Expand Up @@ -144,8 +89,8 @@ isIPhoneX: globalData.isIPhoneX,
},
isFirst: 0,
$data: {
statusBarHeight: app.globalData.statusBarHeight + 44,
top: 0,
statusBarHeight: app.globalData.statusBarHeight + 44,
top: 0,
stickyFlag: false,
scrollTop: 0,
overPageNum: 1,
Expand Down Expand Up @@ -196,43 +141,12 @@ isIPhoneX: globalData.isIPhoneX,
this.$data.scrollTop = t.scrollTop
}
},
/**reloadPage () {
this.getCityDatas()
this.reloadInitSetting()
this.reloadWeather()
},*/

onLoad: function(options) {
app.setShareConfig();
wx.hideTabBar();
var that = this;
var token = wx.getStorageSync('token');
var i = this, s = wx.getStorageSync("token");
var timestamp = Date.parse(new Date());
timestamp = timestamp / 1000;
console.log("当前时间戳为:" + timestamp);

//获取当前时间
var nn = timestamp * 1000;

var date = new Date(nn);
//获取时
var hh = date.getHours();

console.log("现在的时间是"+hh+"点")


if (6 < hh && hh <= 20) {

console.log("勤奋的你")
i.setData({
bh: 'd'
})
} else {
i.setData({
bh: 'n'
})
}

status.setNavBgColor();
status.setGroupInfo().then((groupInfo) => { that.setData({ groupInfo }) });
console.log('step1');
Expand Down

0 comments on commit 0669a07

Please sign in to comment.