From 3efb4b13a0c22332f75b48af4015541d6833c1fe Mon Sep 17 00:00:00 2001 From: YM <479443481@qq.com> Date: 星期三, 29 五月 2024 11:17:20 +0800 Subject: [PATCH] 人物详情 --- src/components/headNav/headNav.vue | 70 ++++++++++------------------------ 1 files changed, 21 insertions(+), 49 deletions(-) diff --git a/src/components/headNav/headNav.vue b/src/components/headNav/headNav.vue index 4ecbf60..27a7c40 100644 --- a/src/components/headNav/headNav.vue +++ b/src/components/headNav/headNav.vue @@ -1,9 +1,15 @@ <template> <view class="headNav"> - <view class="NavTop flex" :style="{ backgroundImage: 'url(' + bg + ')' }" > + <view class="NavTop flex" :style="{ backgroundImage: 'url(' + bg + ')' }"> <view class="santiaogang" - style="width: 0.34rem; height: 0.34rem; margin-right: 3rem;cursor: pointer;" + style=" + width: 0.34rem; + height: 0.34rem; + margin-right: 3rem; + cursor: pointer; + " + title="瀵艰埅鑿滃崟" @click="menuNav = !menuNav" ><img style="width: 100%; height: 100%" @@ -13,13 +19,7 @@ <view class="flex" style="letter-spacing: 5rpx"> <view class="logo"></view> <view - class="" - style=" - margin-left: 0.19rem; - font-size: 0.24rem; - font-family: cursive; - font-weight: 900; - " + style="margin-left: 0.19rem; font-size: 0.24rem; font-weight: 900" > {{ text }} </view> @@ -35,7 +35,6 @@ justify-content: flex-end; " > - <!-- overflow: hidden; --> <input :style="{ display: isExpanded == true ? 'block' : 'none' }" type="text" @@ -46,6 +45,7 @@ font-size: 0.13rem; " @blur="InputBlur" + @confirm="toggleSearch" class="search-input" v-model="searchInput" placeholder="璇疯緭鍏ユ悳绱㈠唴瀹�" @@ -97,7 +97,7 @@ > <!-- 鑳屾櫙 --> <img class="leftListBgImage" src="@/static/image/leftListBg.png" alt="" /> - <view class="" style="position: relative; z-index: 999"> + <view style="position: relative; z-index: 999"> <view class="flex flex-center LeftLogo"> <!-- <img src="@/static/image/logo.png" ></img> --> <view class="img"></view> @@ -118,7 +118,7 @@ <span slot="title">涓栧尰鍖诲鏁版嵁搴�</span> </el-menu-item> <el-menu-item index="3"> - <span slot="title">涓尰鍖诲娴佹淳</span> + <span slot="title">涓尰瀛︽湳娴佹淳</span> </el-menu-item> <el-menu-item index="4"> <span slot="title">涓尰鍦板煙鍥捐氨</span> @@ -129,7 +129,7 @@ </el-menu> </view> </el-dialog> - <!-- <view class="" style="position: fixed;right: 0;top: 0;" @click="dialogVisible = !dialogVisible">姘存按姘存按</view> --> + <!-- <view style="position: fixed;right: 0;top: 0;" @click="dialogVisible = !dialogVisible">姘存按姘存按</view> --> <!-- <el-card v-if="menuNav" style="position: fixed;left: 0;top: 0; z-index: 999999999; width: 240px;height: 100vh;"> @@ -186,26 +186,21 @@ // 淇敼瀵嗙爜 changePassword(index) { if (index == 1) { - // console.log('sdfdsf'); // 妫�鏌� localStorage 涓槸鍚﹀瓨鍦� token if (localStorage.getItem("access_token")) { // token 瀛樺湪 - console.log("access_token"); this.isCommand = true; } else { // token 涓嶅瓨鍦� - // console.log('Token does not exist.'); this.isCommand = false; // uni.navigateTo({ // url: '/pages/Login/Login' // }) - console.log("涓嶅瓨鍦�"); uni.showModal({ // 璇㈤棶鐢ㄦ埛鏄惁閫�鍑虹櫥褰� title: "璇烽噸鏂扮櫥褰�", content: "鎮ㄧ‘瀹氳閲嶆柊鐧诲綍鍚�?", success: async (res) => { - console.log(res, "reresresrer"); if (res.confirm) { setTimeout(() => { uni.reLaunch({ @@ -214,10 +209,6 @@ }, 1500); } else if (res.cancel) { // console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷'); - uni.showToast({ - title: "鐢ㄦ埛鐐瑰嚮鍙栨秷", - icon: "none" - }); } } }); @@ -232,52 +223,35 @@ // 淇敼鑾峰彇閫�鍑烘寜閽� handleCommand(int) { if (int == 1) { - console.log("淇敼瀵嗙爜"); uni.navigateTo({ url: "/pages/changePassword/changePassword" }); } else if (int == 2) { - // console.log('閫�鍑虹櫥褰�'); uni.showModal({ // 璇㈤棶鐢ㄦ埛鏄惁閫�鍑虹櫥褰� title: "閫�鍑虹櫥褰�", content: "鎮ㄧ‘瀹氳閫�鍑虹櫥褰曞悧?", - success: async (res) => { - console.log(res, "reresresrer"); - + success: (res) => { if (res.confirm) { // 閫�鍑烘帴鍙� - await getlogout().then((res) => { + getlogout().then((res) => { //纭畾閫�鍑烘嬁鍒皌oken骞舵竻闄oken let TOKEN = uni.getStorageSync("access_token"); uni.clearStorageSync(); //閫�鍑烘垚鍔燂紒骞惰烦杞埌鍏朵粬椤甸潰 - uni.showToast({ - title: "閫�鍑烘垚鍔�", - icon: "none" - }); - }); - setTimeout(() => { + this.$message.success("閫�鍑烘垚鍔�"); uni.reLaunch({ url: "/pages/Login/Login" }); - }, 1500); + }); } else if (res.cancel) { // console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷'); - uni.showToast({ - title: "鐢ㄦ埛鐐瑰嚮鍙栨秷", - icon: "none" - }); } } }); } }, - aaa() { - console.log("ss"); - }, handleSelect(index) { - console.log(index); if (index === "0") { uni.navigateTo({ url: "/pages/index/index?id=" + 0 @@ -311,17 +285,15 @@ }, // 鍒囨崲鎼滅储妗嗙殑灞曞紑鍜屾敹璧风姸鎬� toggleSearch() { - // console.log('鎾掓棪鑼冨痉钀ㄥ彂鐢熺殑',this.searchInput); this.isExpanded = !this.isExpanded; this.$nextTick(() => { if (this.searchInput.trim() !== "") { - console.log("鎼滅储", this.searchInput); - } else { - console.log("涓嶆悳绱�"); + uni.navigateTo({ + url: + "/pages/knowledgeBase/knowledgeBase?keyword=" + this.searchInput + }); } - this.searchInput = ""; - console.log(this.isExpanded); }); } } -- Gitblit v1.9.1