Ver código fonte

fix:职位列表跳转

jianghaili 7 meses atrás
pai
commit
9696dd41ab
2 arquivos alterados com 11 adições e 1 exclusões
  1. 10 0
      components/nav-bar/index.vue
  2. 1 1
      pages/jobManagement/jobManagement.vue

+ 10 - 0
components/nav-bar/index.vue

@@ -20,6 +20,10 @@ export default {
 			type: String,
 			default: ''
 		},
+		goMy: {
+			type: String,
+			default: '/pages/my/index'
+		},
 		isBack: {
 			type: Boolean,
 			default: true  // 这里默认是 true
@@ -38,6 +42,12 @@ export default {
 	},
 	methods: {
 		goBack() {
+			if (this.goMy) {
+				uni.switchTab({
+					url: this.goMy
+				})
+				return;
+			}
 			if (this.backUrl) {
 				const isTabPage = [
 					'/pages/index/index',

+ 1 - 1
pages/jobManagement/jobManagement.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="job-management-page">
 		<view class="fixed-header">
-			<navBar title="职位管理" color="#000" :backUrl="backUrl"/>
+			<navBar title="职位管理" color="#000" :backUrl="backUrl" goMy="/pages/my/index"/>
 			<!-- 标签页导航 - 使用uview的u-tabs组件 -->
 			<view class="sticky-tabs">
 				<u-tabs