sunran 3 жил өмнө
parent
commit
ffea12d7b0

+ 2 - 2
src/views/weibao/views/consultation/index.vue

@@ -47,6 +47,7 @@ export default {
   components: { initiateConsultation },
   data() {
     return {
+      bgimg: require('../../assets/newsbg.png'),
       roleIdStr: JSON.parse(sessionStorage.getItem('userInfo')).roleIdStr,
       active: 0,
       value: '',
@@ -94,8 +95,7 @@ export default {
       }
     },
     getpics(item) {
-      console.log(item)
-      if (!item) return
+      if (!item) return this.bgimg
       var url = ''
       var arr = item.split(',')
       arr.forEach((item, index) => {

+ 19 - 6
src/views/weibao/views/home/index.vue

@@ -39,7 +39,7 @@
     </div>
     <div class="main">
       <van-sticky>
-        <van-tabs v-model="active" @change="onLoad">
+        <van-tabs v-model="active" @change="changeTab">
           <van-tab title="通知公告"></van-tab>
           <van-tab title="政策文件"></van-tab>
           <van-tab title="新闻资讯"></van-tab>
@@ -99,6 +99,7 @@ export default {
     },
     async pageNews() {
       const res = await pageNews(this.newsform)
+      this.loading = false
       if (this.newsform.pageNum == 1) {
         this.newsList = res.data.records
       } else {
@@ -109,11 +110,12 @@ export default {
       if (this.newsList.length >= res.data.total) {
         this.finished = true
       } else {
-        this.loading = false
+        this.finished = false
       }
     },
     async pageNotice() {
       const res = await pageNotice(this.noticeform)
+      this.loading = false
       if (this.noticeform.pageNum == 1) {
         this.noticeList = res.data.records
       } else {
@@ -123,11 +125,12 @@ export default {
       if (this.noticeList.length >= res.data.total) {
         this.finished = true
       } else {
-        this.loading = false
+        this.finished = false
       }
     },
     async pagePolicy() {
       const res = await pagePolicy(this.policyform)
+      this.loading = false
       if (this.policyform.pageNum == 1) {
         this.policyList = res.data.records
       } else {
@@ -138,12 +141,10 @@ export default {
       if (this.policyList.length >= res.data.total) {
         this.finished = true
       } else {
-        this.loading = false
+        this.finished = false
       }
     },
     onLoad() {
-      this.loading = true
-      this.finished = false
       if (this.active == 0) {
         this.pageNotice()
       } else if (this.active == 1) {
@@ -152,6 +153,18 @@ export default {
         this.pageNews()
       }
     },
+    changeTab() {
+      if (this.active == 0) {
+        this.noticeform.pageNum = 1
+        this.pageNotice()
+      } else if (this.active == 1) {
+        this.policyform.pageNum = 1
+        this.pagePolicy()
+      } else if (this.active == 2) {
+        this.newsform.pageNum = 1
+        this.pageNews()
+      }
+    },
     onRefresh() {
       setTimeout(() => {
         this.isLoading = false

+ 44 - 2
src/views/weibao/views/home/text.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <van-nav-bar :title="title" @click-left="$router.back()" left-arrow fixed placeholder safe-area-inset-top />
-    <div v-html="content"></div>
+    <div class="style" v-html="content"></div>
   </div>
 </template>
 <script>
@@ -64,5 +64,47 @@ export default {
   },
 }
 </script>
-<style lang="scss" scoped>
+<style lang="scss">
+.style {
+  padding: 0 30px;
+  h1,
+  h2,
+  h3,
+  h3,
+  h4,
+  h6 {
+    text-align: center;
+  }
+
+  h1 {
+    font-size: 64px;
+  }
+  h2 {
+    font-size: 48px;
+  }
+  h3 {
+    font-size: 36px;
+  }
+  h4 {
+    font-size: 32px;
+  }
+  h5 {
+    font-size: 28px;
+  }
+  h6 {
+    font-size: 24px;
+  }
+  p {
+    line-height: 2em !important;
+    font-size: 32px;
+  }
+  ul {
+    li {
+      font-size: 32px;
+    }
+  }
+  img {
+    width: 100%;
+  }
+}
 </style>

+ 53 - 74
src/views/weibao/views/login/index.vue

@@ -6,30 +6,10 @@
 
     <p class="title">邹平未保客户端</p>
     <van-form>
-      <van-field
-        v-model="username"
-        name="用户名"
-        label="用户名:"
-        placeholder="用户名"
-        :rules="[{ required: true, message: '请输入用户名' }]"
-      />
-      <van-field
-        v-model="password"
-        type="password"
-        name="密码:"
-        label="密码:"
-        placeholder="密码"
-        :rules="[{ required: true, message: '请输入密码' }]"
-      />
+      <van-field v-model="username" name="用户名" label="用户名:" placeholder="用户名" :rules="[{ required: true, message: '请输入用户名' }]" />
+      <van-field v-model="password" type="password" name="密码:" label="密码:" placeholder="密码" :rules="[{ required: true, message: '请输入密码' }]" />
       <div class="submit_bg" style="margin: 60px 26px">
-        <van-button
-          round
-          block
-          type="info"
-          native-type="submit"
-          @click="onSubmit"
-          >登录</van-button
-        >
+        <van-button round block type="info" native-type="submit" @click="onSubmit">登录</van-button>
       </div>
     </van-form>
     <div class="img_bottom">
@@ -41,37 +21,37 @@
 import { loginApp } from '../../../../api/index.js'
 export default {
   components: {},
-  name: "Login",
+  name: 'Login',
   data() {
     return {
-      imgUrl: "../../assets/login/bg.jpeg",
-      username: "",
-      password: "",
-    };
+      imgUrl: '../../assets/login/bg.jpeg',
+      username: '',
+      password: '',
+    }
   },
   created() {},
   methods: {
     async onSubmit() {
-        if(this.username == "" || this.password == "") {
-            this.$toast("请输入账号或密码");
-            return;
-        }
-        const res = await loginApp({
-            loginName: this.username,//'15620220622'
-            // loginName: '16601217325',
-            password: this.password,//'123456'
-        })
-        if(res.data.jwtToken) {
-            // this.$toast.success("登录成功");
-            sessionStorage.setItem('userInfo', JSON.stringify(res.data))
-            sessionStorage.setItem('x-token', res.data.jwtToken)
-            this.$router.replace('/home')
-        } else {
-            this.$toast.fail("账号或密码错误");
-        }
-    }
+      if (this.username == '' || this.password == '') {
+        this.$toast('请输入账号或密码')
+        return
+      }
+      const res = await loginApp({
+        loginName: this.username, //'15620220622'
+        // loginName: '16601217325',
+        password: this.password, //'123456'
+      })
+      if (res.data.jwtToken) {
+        // this.$toast.success("登录成功");
+        sessionStorage.setItem('userInfo', JSON.stringify(res.data))
+        sessionStorage.setItem('x-token', res.data.jwtToken)
+        this.$router.replace('/home')
+      } else {
+        this.$toast.fail('账号或密码错误')
+      }
+    },
   },
-};
+}
 </script>
 <style lang="scss" scoped>
 .img_top {
@@ -95,34 +75,33 @@ export default {
   text-align: center;
 }
 /deep/.van-cell {
-    margin-top: 100px;
-    background-color:transparent;
-    width: 94%;
-    margin: 0 auto;
-    border-bottom: 1px solid rgba(0, 0, 0, 0.35);
-    .van-field__label {
-        color: #2a2a2a;
-        font-size: 30px;
-       width: 120px;
-       text-align: center;
-       line-height: 80px;
-       
-    }
-    .van-field__control {
-        height: 80px;
-        padding-left: 8px;
-        box-sizing: border-box;
-        color: #3d3d3d;
-        font-size: 28px;
-    }
-    .van-field__control::placeholder {
-        color: #3d3d3d;
-    }
-    .van-field__error-message {
-        color: #1a1a1a;
-    }
+  margin-top: 100px;
+  background-color: transparent;
+  width: 94%;
+  margin: 0 auto;
+  border-bottom: 1px solid rgba(0, 0, 0, 0.35);
+  .van-field__label {
+    color: #2a2a2a;
+    font-size: 30px;
+    width: 120px;
+    text-align: center;
+    line-height: 80px;
+  }
+  .van-field__control {
+    height: 80px;
+    padding-left: 8px;
+    box-sizing: border-box;
+    color: #3d3d3d;
+    font-size: 28px;
+  }
+  .van-field__control::placeholder {
+    color: #3d3d3d;
+  }
+  .van-field__error-message {
+    color: #1a1a1a;
+  }
 }
- 
+
 .img_bottom {
   .img {
     position: fixed;

+ 2 - 1
src/views/weibao/views/loveHelp/index.vue

@@ -31,6 +31,7 @@ import { lovingHelpPage } from '../../api/index.js'
 export default {
   data() {
     return {
+      bgimg: require('../../assets/newsbg.png'),
       roleIdStr: JSON.parse(sessionStorage.getItem('userInfo')).roleIdStr,
       loading: false,
       finished: false,
@@ -71,7 +72,7 @@ export default {
     },
     getpics(item) {
       console.log(item)
-      if (!item) return
+      if (!item) return this.bgimg
       var url = ''
       var arr = item.split(',')
       arr.forEach((item, index) => {