MrShi
2024-04-02 174350e855349919ee287a52d3198c7c7558b858
wx/pages/index/index.vue
@@ -2,7 +2,7 @@
   <view class="content">
      <view class="content_head" :style="{backgroundImage: 'url(' + backgroundImg + ')'}">
         <text>{{userInfo.company.name}}</text>
         <text>当前在保:20人</text>
         <text>当前在保:{{num}}人</text>
      </view>
      <view class="content_box">
         <view class="content_box_list">
@@ -58,6 +58,7 @@
      },
      data() {
         return {
            num: 0,
            backgroundImg: require('@/static/background/home_bg@2x.png'),
            backgroundImg1: require('@/static/background/home_ic_toubao@2x.png'),
            backgroundImg2: require('@/static/background/home_ic_baodan@2x.png'),
@@ -69,10 +70,18 @@
            backgroundImg8: require('@/static/background/home_ic_yuangong@2x.png'),
         }
      },
      onLoad() {
      onShow() {
         this.getNum()
      },
      methods: {
         getNum() {
            this.$u.api.guaranteeNum()
               .then(res => {
                  if (res.code === 200) {
                     this.num = res.data
                  }
               })
         },
         loginOut() {
            this.$u.api.logout()
               .then(res => {