Commit cb316db1 authored by 周宏民's avatar 周宏民

fix: 乐山天气获取

parent ed846ab9
Pipeline #94354 passed with stages
...@@ -33,20 +33,7 @@ const LeshanLogin = forwardRef((props, _ref) => { ...@@ -33,20 +33,7 @@ const LeshanLogin = forwardRef((props, _ref) => {
const formRef = useRef(null); const formRef = useRef(null);
const [isQrcode, setIsQrcode] = useState(false); const [isQrcode, setIsQrcode] = useState(false);
const [weather, setWeather] = useState({ const [weather, setWeather] = useState(null);
province: '四川',
city: '乐山市',
adcode: '511100',
weather: '雾',
temperature: '10',
winddirection: '东南',
windpower: '≤3',
humidity: '84',
reporttime: '2024-11-29 10:06:41',
temperature_float: '10.0',
humidity_float: '84.0',
weatherImg: 0,
});
const [status, setStatus] = useState('normal'); const [status, setStatus] = useState('normal');
const [autoLogin, setAutoLogin] = useState(false); const [autoLogin, setAutoLogin] = useState(false);
const [submitting, setSubmitting] = useState(false); const [submitting, setSubmitting] = useState(false);
...@@ -176,7 +163,7 @@ const LeshanLogin = forwardRef((props, _ref) => { ...@@ -176,7 +163,7 @@ const LeshanLogin = forwardRef((props, _ref) => {
}; };
}, [props.loginMode]); }, [props.loginMode]);
useEffect(() => { useEffect(() => {
// getWeather(); getWeather();
const timer = setInterval(() => { const timer = setInterval(() => {
setDateObj({ setDateObj({
curTime: moment().format('HH:mm:ss'), curTime: moment().format('HH:mm:ss'),
......
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