From 59f4dc012a2c42eebd31301444e0f8df9af088e0 Mon Sep 17 00:00:00 2001 From: wjt <1797368093@qq.com> Date: 星期三, 26 六月 2024 10:13:12 +0800 Subject: [PATCH] Merge branch 'master' of http://218.28.192.34:9999/r/sqys/sqys_xcx --- qiye/qiyeIndex/qiyeIndex.vue | 93 +++++++++++++++++++++++++++++++++++++--------- 1 files changed, 75 insertions(+), 18 deletions(-) diff --git a/qiye/qiyeIndex/qiyeIndex.vue b/qiye/qiyeIndex/qiyeIndex.vue index ba6ef5c..56ea366 100644 --- a/qiye/qiyeIndex/qiyeIndex.vue +++ b/qiye/qiyeIndex/qiyeIndex.vue @@ -1,30 +1,27 @@ <template> <view> <img src="/static/head.png" class="head" alt="" /> - <view class="hqzc"> + <view class="hqzc" @click="more1()"> <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" class="u-line-1" :key="index">{{item.docTitle}}</p> </view> - <img src="/static/i06.png" class="more" alt="" /> + <img src="/static/i06.png" class="more" alt="" style="width: 46rpx;height: 46rpx;"/> </view> <view class="wbox"> <view class="name"> - 鐟為煹杈捐锤鏄撴湁闄愬叕鍙� + {{msg.companyName}} </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> <view style="height: 50rpx;"></view> - <uqrcode class="hide-canvas" :size="470" sizeUnit="rpx" v-if="companyCode" ref="uqrcode" canvas-id="qrcode" :value="companyCode" :options="{ backgroundColor: '#000000',useDynamicSize: true, areaColor: '#ffffff', foregroundColor: '#ffffff' }"></uqrcode> + <uqrcode :errorCorrectLevel="1" class="hide-canvas" :size="470" sizeUnit="rpx" v-if="companyCode" ref="uqrcode" canvas-id="qrcode" :value="companyCode" :options="{ backgroundColor: '#000000',useDynamicSize: true, areaColor: '#ffffff', foregroundColor: '#ffffff' }"></uqrcode> <tabsCom :activeNumber.sync="activeNumber"></tabsCom> </view> @@ -32,27 +29,86 @@ <script> import tabsCom from '@/qiye/components/bottom.vue' - + import { docList } from '@/api/index.js' + import { company } from '@/api/qiye.js' + import { getInfo as httoInfo} from '@/api/auth.js' export default { components: { tabsCom + }, + onShow() { + this.httoInfo() }, data() { return { activeNumber: 0, companyCode: 'code===', - uqrcodeImage: '' + uqrcodeImage: '', + list1:[], + companyId:'', + msg:{} } }, onReady() { - this.$refs.uqrcode.toTempFilePath({ - success: res => { - this.uqrcodeImage = res.tempFilePath - } - }); + + }, + onLoad(options) { + // if(options.id) { + // this.companyId = options.id||33 + // } + // else { + // this.companyId = uni.getStorageSync('qiyedata').companyId + // } + }, methods: { - + httoInfo() { + httoInfo().then(val => { + console.log(val.data.data.deptId) + this.companyId = val.data.data.deptId + this.getInfo() + }) + }, + 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 + + this.companyCode = this.msg.companyCode + uni.setStorageSync('qiyedata', this.msg) + setTimeout(() => { + this.$nextTick(() => { + this.$refs.uqrcode.toTempFilePath({ + success: res => { + this.uqrcodeImage = res.tempFilePath + } + }); + }) + }, 500) + // 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 +153,8 @@ font-size: 26rpx; color: #4A4E60; margin-right: 50rpx; - + width: 450rpx; + // text-align: center; } } .hide-canvas{ -- Gitblit v1.9.1