From 16213c0f85aa3ac8317797bf4a05fd12940e16d3 Mon Sep 17 00:00:00 2001 From: zhangwei <1504152376@qq.com> Date: 星期三, 05 三月 2025 17:29:42 +0800 Subject: [PATCH] - --- src/pages/enterprise/index.vue | 122 +++++++++++++++++++++++++++++----------- 1 files changed, 89 insertions(+), 33 deletions(-) diff --git a/src/pages/enterprise/index.vue b/src/pages/enterprise/index.vue index bfb1dc9..0d3637d 100644 --- a/src/pages/enterprise/index.vue +++ b/src/pages/enterprise/index.vue @@ -4,26 +4,35 @@ <up-avatar :src="avatarUrlImg" shape="circle" size='80'></up-avatar> </view> --> <fui-list :topBorder='false'> - <fui-list-cell arrow :bottomBorder='false' :padding="['20rpx', '32rpx', '20rpx', '32rpx']"> + <fui-list-cell :bottomBorder='false' :padding="['20rpx', '32rpx', '20rpx', '32rpx']"> <view class="fui-list__item"> <text class="chuany-font30">浼佷笟鍚嶇О</text> <text class="fui-text__explain">{{enterpriseInfo.suppliername}}</text> </view> </fui-list-cell> - <fui-list-cell arrow :bottomBorder='false' :padding="['20rpx', '32rpx', '20rpx', '32rpx']"> + <fui-list-cell :bottomBorder='false' :padding="['20rpx', '32rpx', '20rpx', '32rpx']"> <view class="fui-list__item"> <text class="chuany-font30">浼佷笟鍦板潃</text> <text class="fui-text__explain address">{{enterpriseInfo.address}}</text> </view> </fui-list-cell> - <fui-list-cell arrow :bottomBorder='false' :padding="['20rpx', '32rpx', '20rpx', '32rpx']"> + <fui-list-cell :bottomBorder='false' :padding="['20rpx', '32rpx', '20rpx', '32rpx']"> <view class="fui-list__item"> <text class="chuany-font30">鑱旂郴鐢佃瘽</text> <text class="fui-text__explain">{{enterpriseInfo.phone}}</text> </view> </fui-list-cell> + <fui-collapse-item :isBorder='false' open> + <view class="fui-item__box"> + <!-- <image src="/static/images/common/logo.png" class="fui-logo"></image> --> + <text>鍏徃绠�浠�</text> + </view> + <template v-slot:content> + <view class="fui-descr">{{enterpriseInfo.resume}}</view> + </template> + </fui-collapse-item> <fui-list-cell arrow @click="goApply" :bottomBorder='false' :padding="['20rpx', '32rpx', '20rpx', '32rpx']"> - <text class="chuany-font30">瀹屽杽浼佷笟璧勬枡</text> + <text class="chuany-font30">{{workerInfo?'淇敼浼佷笟璧勬枡':'瀹屽杽浼佷笟璧勬枡'}}</text> </fui-list-cell> </fui-list> </view> @@ -34,46 +43,67 @@ onLoad, onShow } from "@dcloudio/uni-app"; + import { ref, reactive, - getCurrentInstance + getCurrentInstance, + watch, + computed } from 'vue'; const { $db } = getCurrentInstance().appContext.config.globalProperties + import { + useStore + } from 'vuex' + const store = useStore() onShow(() => { - let data = $db.get('userInfo') ? JSON.parse($db.get('userInfo')).userCompany : null - if (data) { - enterpriseInfo.businessLicense = data.businessLicense - enterpriseInfo.suppliername = data.suppliername //浼佷笟鍚嶇О - enterpriseInfo.regtime = data.regtime //娉ㄥ唽鏃堕棿 - enterpriseInfo.address = data.address //鑱旂郴鍦板潃 - enterpriseInfo.suppliercode = data.suppliercode //浼佷笟娉ㄥ唽鍙� - enterpriseInfo.contact = data.contact //鑱旂郴浜� - enterpriseInfo.phone = data.phone //鑱旂郴鐢佃瘽 - enterpriseInfo.id = data.id - enterpriseInfo.resume = data.resume - } + // getUserInfo() + // let data = $db.get('userInfo') ? $db.get('userInfo').userCompany : null + // console.log(data,'data鈥�'); + // if (data) { + // enterpriseInfo.businessLicense = data.businessLicense + // enterpriseInfo.suppliername = data.suppliername //浼佷笟鍚嶇О + // enterpriseInfo.regtime = data.regtime //娉ㄥ唽鏃堕棿 + // enterpriseInfo.address = data.address //鑱旂郴鍦板潃 + // enterpriseInfo.suppliercode = data.suppliercode //浼佷笟娉ㄥ唽鍙� + // enterpriseInfo.contact = data.contact //鑱旂郴浜� + enterpriseInfo.phone = 123 //鑱旂郴鐢佃瘽 + console.log(enterpriseInfo, enterpriseInfo.phone, 'enterpriseInfo鈥�'); + // enterpriseInfo.id = data.id + // enterpriseInfo.resume = data.resume + // } }) let avatarUrlImg = ref('') - onLoad(() => { - // getUser() - let obj = $db.get('userInfo') ? JSON.parse($db.get('userInfo')) : {} - avatarUrlImg = obj.avatar - }) - const enterpriseInfo = reactive({ - id: 0, //鐢ㄦ埛鍏徃Id - businessLicense: '', //钀ヤ笟鎵х収璺緞 - suppliername: '', //浼佷笟鍚嶇О - regtime: '', //娉ㄥ唽鏃堕棿 - address: '', //鑱旂郴鍦板潃 - suppliercode: '', //浼佷笟娉ㄥ唽鍙� - contact: '', //鑱旂郴浜� - phone: '', //鑱旂郴鐢佃瘽 - resume: '', //鍏徃绠�浠� - }) + onLoad(() => {}) + // let enterpriseInfo = reactive({ + // // id: 0, //鐢ㄦ埛鍏徃Id + // // businessLicense: '', //钀ヤ笟鎵х収璺緞 + // // suppliername: '', //浼佷笟鍚嶇О + // // regtime: '', //娉ㄥ唽鏃堕棿 + // // address: '', //鑱旂郴鍦板潃 + // // suppliercode: '', //浼佷笟娉ㄥ唽鍙� + // // contact: '', //鑱旂郴浜� + // // phone: '', //鑱旂郴鐢佃瘽 + // // resume: '', //鍏徃绠�浠� + // }) + const getUserInfo = () => { + store.dispatch('getUserInfo') + } + let enterpriseInfo = computed(() => store.getters.userInfo.userCompany || {}) + let workerInfo = computed(() => store.getters.userInfo.userWorker ? true : false) + // watch(store.getters.userInfo, (newVal, oldVal) => { + // enterpriseInfo = newVal + // if (!enterpriseInfo.userCompany) { + // enterpriseInfo.userCompany = {} + // } + // console.log(enterpriseInfo,'wacth----------'); + // }, { + // deep: true, // 娣卞害鐩戝惉 + // immediate: true + // }); // let src = "http://pic2.sc.chinaz.com/Files/pic/pic9/202002/hpic2119_s.jpg" const goApply = () => { uni.navigateTo({ @@ -105,4 +135,30 @@ .address { width: 65%; } + + .fui-item__box { + font-size: 30rpx; + width: 100%; + padding: 26rpx 32rpx; + box-sizing: border-box; + display: flex; + align-items: center; + } + + .fui-logo { + width: 48rpx; + height: 48rpx; + margin-right: 24rpx; + display: block; + } + + .fui-descr { + width: 100%; + padding: 32rpx; + font-size: 28rpx; + line-height: 52rpx; + color: #7F7F7F; + word-break: break-all; + box-sizing: border-box; + } </style> \ No newline at end of file -- Gitblit v1.9.1