#
whycq
2023-11-13 81b8089d94e7f9537b8f5a00b68c95a9e858e2bf
pages/index/index.vue
@@ -6,11 +6,12 @@
            <view class="item-title">{{it.subTitle}}</view>
            <view class="item-content">
               <view style="width: 50%;" v-for="item in it.items">
                  <view style="font-size: 32rpx;">{{item.name}}</view>
                  <view class="content-data">
                     <text class="c-data">{{item.content}}</text>
                     <text class="c-val">{{item.unit}}</text>
                  </view>
                  <view style="font-size: 16rpx;">{{item.name}}</view>
               </view>
            </view>
         </view>
@@ -33,8 +34,9 @@
               <text style="flex: 1;align-self: center;padding: 8px 4px;">{{item.content}}</text>
               <text style="width: 150rpx;align-self: center;padding: 0 2px;">{{item.updateTime$}}</text>
            </view>
            <view>查看更多 >></view>
         </view>
         <view>查看更多 >></view>
      </view>
      
      <view class="charts-box">
@@ -83,7 +85,7 @@
               {username: '李世豪1级',money:'112万元'}
            ],
            bgs: ['bg-blue','bg-red'],
            red: '#aaffff',
            red: '#4286db',
            notices: [
               {notice: '这条测试公告被修改了asdas这条测试公告被修改了这条测试公告被修改了',crtate_time: '2023-09-09 13:49:46',update_time: '2023-10-09 13:49:46'},
               {notice: '这是一条测试公告',crtate_time: '2023-09-09 13:49:46',update_time: '2023-10-09 13:49:46'},
@@ -97,7 +99,14 @@
               {notice: '这是一条测试公告',crtate_time: '2023-09-09 13:49:46',update_time: '2023-10-09 13:49:46'},
               {notice: '这是一条测试公告',crtate_time: '2023-09-09 13:49:46',update_time: '2023-10-09 13:49:46'},
               {notice: '浙江中扬立库技术有限公司是中扬集团旗下专业的智能仓储物流设备源头服务商,致力于让制造与物流更高效。集团年销售额超5亿人民币,是中国立体仓库大型厂家之一,集科研、生产、销售、售后为一体的国家高新技术企业,浙江省“专精特新”企业,浙江省“尖兵、领雁”企业,浙江省重点培育企业,综合实力位居行业前列',crtate_time: '2023-09-09 13:49:46',update_time: '2023-10-09 13:49:46'}
            ]
            ],
            Column: {
               categories: ["1月", "2月", "3月", "4月", "5月", "6月","7月", "8月", "9月", "10月", "11月", "12月"],
               series: [{
                  name: "销售额",
                  data: [35, 36, 31, 33, 13, 34,18, 27, 21, 24, 6, 28]
               }]
            }
            
            
         }
@@ -112,6 +121,7 @@
         this.getPersonData()
         this.getStaffRank()
         this.getCompanyPostList()
         this.getMonthData()
      },
      mounted() {
         
@@ -121,7 +131,7 @@
           setTimeout(() => {
              //因部分数据格式一样,这里不同图表引用同一数据源的话,需要深拷贝一下构造不同的对象
              //开发者需要自行处理服务器返回的数据,应与标准数据格式一致,注意series的data数值应为数字格式
              this.chartsDataColumn4=JSON.parse(JSON.stringify(demodata.Column))
              this.chartsDataColumn4=JSON.parse(JSON.stringify(this.Column))
           }, 1500);
         },
         backGroundRepeat() {
@@ -166,13 +176,21 @@
         },
         async getCompanyPostList() {
            let res = await getCompanyData.getCompanyPostList()
            console.log(res);
            if (res.code === 200) {
               this.notices = res.data.records.splice(0,5)
            } else if (res.code === 403) {
               this.backLogin(res)
            }
         },
         async getMonthData() {
            let res = await getCompanyData.getMonthData()
            if (res.code === 200) {
               this.Column.series[0].data = res.data
            } else if (res.code === 403) {
               this.backLogin(res)
            }
         },
         backLogin(res) {
            uni.showToast({title: res.msg, icon: "none", position: 'top'})
            setTimeout(() => {