From d405d7cfefd8ac846e7ae4afd293198d6de6a9e6 Mon Sep 17 00:00:00 2001 From: 346149741 <346149741@qq.com> Date: 星期六, 22 六月 2024 17:12:54 +0800 Subject: [PATCH] 企业首页,我的,执法记录,接口 --- qiye/qiyeIndex/qiyeIndex.vue | 56 ++++++++++++++++++++++++++++++++++++++++++++++---------- 1 files changed, 46 insertions(+), 10 deletions(-) diff --git a/qiye/qiyeIndex/qiyeIndex.vue b/qiye/qiyeIndex/qiyeIndex.vue index ba6ef5c..4b462b9 100644 --- a/qiye/qiyeIndex/qiyeIndex.vue +++ b/qiye/qiyeIndex/qiyeIndex.vue @@ -5,21 +5,18 @@ <img src="/static/hqzc.png" class="img" alt="" /> <view class="line"></view> <view class="font"> - <p>娴峰叧鎬荤讲璐告槗鎸佺画鍙戝睍2024骞寸珛娉�...</p> - <p>鍥藉鍖荤枟淇濋殰灞�鍔炲叕瀹ゅ叧浜庡彂甯冪鐞�... </p> + <p v-for="(item,index) in list1" :key="index">{{item.docTitle}}</p> </view> - <img src="/static/i06.png" class="more" alt="" /> + <img src="/static/i06.png" class="more" @click="more1()" alt="" /> </view> <view class="wbox"> <view class="name"> - 鐟為煹杈捐锤鏄撴湁闄愬叕鍙� + {{msg.companyUser}} </view> <view class="imgbox"> <image :src="uqrcodeImage" mode="widthFix" class="qrcode-1"></image> </view> - <!-- <view class=""> - - </view> --> + <img src="/static/qiye/q05.png" style="width: 100%;height: 201rpx;" alt="" /> </view> @@ -32,16 +29,24 @@ <script> import tabsCom from '@/qiye/components/bottom.vue' + import { docList } from '@/api/index.js' + import { company } from '@/api/qiye.js' export default { components: { tabsCom }, + onShow() { + this.getInfo() + }, data() { return { activeNumber: 0, companyCode: 'code===', - uqrcodeImage: '' + uqrcodeImage: '', + list1:[], + companyId:33,//todo + msg:{} } }, onReady() { @@ -52,7 +57,37 @@ }); }, methods: { - + more1(){ + uni.navigateTo({ + url: `/pages/hqzc/list` + }) + }, + getInfo() { + docList({pageNum:1,pageSize:2}).then(val =>{ + let data = val.data.rows + for(let i = 0;i<data.length;i++){ + if(data[i].docTitle.length>17){ + data[i].docTitle = data[i].docTitle.slice(0, 17) + '...' + } + } + this.list1 = data + }) + company(this.companyId).then(val => { + this.msg = val.data.data + console.log(this.msg) + this.companyCode = this.msg.companyCode + uni.setStorageSync('qiyedata', this.msg) + // this.msg.createTime = this.msg.createTime.slice(0, 10) + // this.msg.docContent = decodeURIComponent(this.msg.docContent) + // console.log(this.msg.docContent) + // getDicts('doc_type').then(val => { + // console.log(this.msg.docType) + + // const value = val.data.data.find(item => item.dictValue == this.msg.docType) + // this.type = value.dictLabel + // }) + }) + }, } } </script> @@ -97,7 +132,8 @@ font-size: 26rpx; color: #4A4E60; margin-right: 50rpx; - + width: 450rpx; + text-align: center; } } .hide-canvas{ -- Gitblit v1.9.1