From 69a74309ed12cc13f0fa9fb90c5bffad17ade360 Mon Sep 17 00:00:00 2001
From: wjt <1797368093@qq.com>
Date: 星期四, 27 六月 2024 13:34:56 +0800
Subject: [PATCH] 问题修改

---
 qiye/my/my.vue |   72 +++++++++++++++++++++++++++++++-----
 1 files changed, 62 insertions(+), 10 deletions(-)

diff --git a/qiye/my/my.vue b/qiye/my/my.vue
index 79abcff..eeb3b1e 100644
--- a/qiye/my/my.vue
+++ b/qiye/my/my.vue
@@ -8,26 +8,33 @@
 				<image src="/static/policy/header.png" mode="widthFix"></image>
 				<view class="user-info">
 					<view class="user-name">
-						<view class="inckname">鍒樺皬闆�</view>
+						<view class="inckname">{{msg.companyUser}}</view>
 					</view>
 					<view class="dept-name">
-						鐜繚灞�--绗竴閮ㄩ棬
+						{{msg.companyName}}
 					</view>
 				</view>
 			</view>
 			<view class="show-phone-number">
 				<text class="label">鑱旂郴鐢佃瘽</text>
-				<text>168****4164</text>
+				<text>{{userPhone||""}}</text>
 			</view>
 			<view class="wbox">
-				<view class="item">
+				<view class="item" @click="tousu()">
 					<view class="set-flex">
 						<image src="/static/qiye/q06.png" mode="widthFix"></image>
 						<text class="change">鎶曡瘔璁板綍</text>
 					</view>
 					<u-icon name="arrow-right"></u-icon>
+				</view>
+				<view class="item" @click="switchPhone()" v-if="isShowChange">
+					<view class="set-flex">
+						<image src="/static/qiye/qiehuan.png" mode="widthFix"></image>
+						<text class="change">鍒囨崲璐﹀彿</text>
+					</view>
+					<u-icon name="arrow-right"></u-icon>
 				</view>
-				<view class="item">
+				<view class="item" @click="goChangePhone()">
 					<view class="set-flex">
 						<image src="/static/policy/phone.png" mode="widthFix"></image>
 						<text class="change">淇敼鎵嬫満鍙�</text>
@@ -50,7 +57,7 @@
 			
 		
 		</view> -->
-		<view class="logout">
+		<view class="logout" @click="logout()">
 			閫�鍑虹櫥褰�
 		</view>
 		<tabsCom :activeNumber.sync="activeNumber"></tabsCom>
@@ -60,7 +67,8 @@
 
 <script>
 	import tabsCom from '@/qiye/components/bottom.vue'
-	
+	import { getInfo, getCompanyList } from '@/api/auth.js'
+	import {  company } from '@/api/qiye.js'
 	export default {
 		components: {
 			tabsCom
@@ -68,15 +76,59 @@
 		data() {
 			return {
 				activeNumber: 2,
-				
-				src: '/static/policy/header.png'
+				msg: {},
+				src: '/static/policy/header.png',
+				userPhone: "",
+				companyId: "",
+				isShowChange: false
 			}
 		},
+		onShow() {
+			this.httoInfo()
+		},
 		methods: {
+			httoInfo() {
+				getInfo().then(val => {
+					this.userPhone = val.data.data.phonenumber
+					this.companyId = uni.getStorageSync('companyId')
+					getCompanyList({companyPhone:val.data.data.phonenumber, companyStatus: 0, checkStatus: 2}).then(val => {
+						if(val.data.rows.length > 1) {
+							this.isShowChange = true
+						}
+					})
+					company(this.companyId).then(val => {
+						this.msg = val.data.data
+					})
+				})
+			},
 			goChangePhone() {
 				uni.navigateTo({
-					url: '/policy/changePhone/changePhone'
+					url: `/policy/changePhone/changePhone?code=02&companyId=${this.companyId}`
 				})
+			},
+			tousu(){
+				uni.navigateTo({
+					url: '/qiye/complaint/complaint'
+				})
+			},
+			switchPhone(){
+				uni.navigateTo({
+					url: "/qiye/switchPhone/switchPhone"
+				})
+			},
+			logout(){
+				uni.showModal({
+				     title: '鎻愮ず',
+				     content: '纭閫�鍑虹櫥褰曪紵',
+				     success: res => {
+				      if(res.confirm) {
+				       uni.clearStorageSync()
+				       uni.redirectTo({
+				        url: '/pages/index/index'
+				       })
+				      }
+				     }
+				    })
 			}
 		}
 	}

--
Gitblit v1.9.1