Browse Source

修改

master
王健 3 years ago
parent
commit
b57c343fc1
  1. 3
      pages/calendar/calendar.js
  2. 17
      pages/look/look.js
  3. 4
      project.config.json

3
pages/calendar/calendar.js

@ -10,7 +10,6 @@ moment.locale('en', {
import {
formatNumber
} from '../../utils/util'
const CITY = wx.getStorageSync('city')
Page({
@ -39,7 +38,7 @@ Page({
calendarSelectedDate: new Date().toString(),
calendarSelectedDateStr: '',
cityIndex: 0,
cityName: CITY,
cityName: "",
timeValue: '',
year: '',
month: '',

17
pages/look/look.js

@ -19,7 +19,6 @@ for (let idx = min; idx <= max; idx++) {
label: '' + idx + '年'
});
};
const CITY = wx.getStorageSync('city')
let start;
Page({
@ -29,7 +28,7 @@ Page({
data: {
cityList: [],
cityIndex: 0,
cityName: CITY,
cityName: "",
switchYear: true,
satellite: 2,
scale: 13,
@ -873,6 +872,13 @@ Page({
start: arryList[sIdx].value,
end: arryList[eIdx].value,
})
$apiT.getCityList().then(res => {
this.setData({
cityList: res.data
})
})
let city = wx.getStorageSync('city')
this.setCity(city)
},
/**
* 生命周期函数--监听页面显示
@ -884,13 +890,6 @@ Page({
selected: 1
})
}
$apiT.getCityList().then(res => {
this.setData({
cityList: res.data
})
})
let city = wx.getStorageSync('city')
this.setCity(city)
},
onShareAppMessage: function () {
return {

4
project.config.json

@ -40,7 +40,9 @@
}
],
"minifyWXSS": true,
"showES6CompileOption": false
"disableUseStrict": false,
"showES6CompileOption": false,
"useCompilerPlugins": false
},
"compileType": "miniprogram",
"libVersion": "2.18.1",

Loading…
Cancel
Save