wangtao пре 2 година
родитељ
комит
648f9b94bf
2 измењених фајлова са 10 додато и 4 уклоњено
  1. 4 2
      src/components/weather/index.vue
  2. 6 2
      src/views/login/index.vue

+ 4 - 2
src/components/weather/index.vue

@@ -47,17 +47,19 @@ export default {
 
 
   created(){
   created(){
       this.initData()
       this.initData()
+      setInterval(()=>{
+        this.initData()
+      },1000*60*30)
   },
   },
   methods: {
   methods: {
     //初始化数据
     //初始化数据
     initData() {
     initData() {
       axios({
       axios({
             method: 'get',
             method: 'get',
-            url: 'https://smartpark.caih.com/dxapi/aliWeather?area=广西',
+            url: 'https://smartpark.caih.com/dxapi/aliWeather?area=南宁',
             timeout: 3000,
             timeout: 3000,
         }).then(res =>{
         }).then(res =>{
             this.data = res.data.showapi_res_body.now
             this.data = res.data.showapi_res_body.now
-            console.log(this.data.weather_pic)
         }).catch(err =>{
         }).catch(err =>{
         })
         })
     },
     },

+ 6 - 2
src/views/login/index.vue

@@ -9,7 +9,7 @@
           name="username"
           name="username"
           @keyup.enter.native="login_info()"
           @keyup.enter.native="login_info()"
           type="text" auto-complete="off" >
           type="text" auto-complete="off" >
-          <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
+          <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon z" />
         </el-input>
         </el-input>
       </el-form-item>
       </el-form-item>
       <el-form-item prop="password" style="position: relative;width:100%">
       <el-form-item prop="password" style="position: relative;width:100%">
@@ -21,7 +21,7 @@
           :type="passwordtxt"
           :type="passwordtxt"
           v-model="loginForm.password"
           v-model="loginForm.password"
          >
          >
-          <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
+          <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon z" />
           
           
         </el-input>
         </el-input>
         <div class="eyeWrap ">
         <div class="eyeWrap ">
@@ -278,6 +278,10 @@ export default {
   margin:-2.5rem 0 0 90%;;
   margin:-2.5rem 0 0 90%;;
 
 
 }
 }
+.z{
+  position: absolute;
+  top:0.8rem !important;
+}
 .eye {
 .eye {
   position: absolute;
   position: absolute;
   right: 0.5rem;
   right: 0.5rem;