zhengkaixin 1 năm trước cách đây
mục cha
commit
af4a07f291

+ 0 - 0
static/img/add-circle-fill.png → assets/tab/add-circle-fill.png


+ 0 - 0
static/img/add-circle-line.png → assets/tab/add-circle-line.png


+ 0 - 0
static/img/home-3-fill.png → assets/tab/home-3-fill.png


+ 0 - 0
static/img/home-3-line.png → assets/tab/home-3-line.png


+ 0 - 0
static/img/todo-fill.png → assets/tab/todo-fill.png


+ 0 - 0
static/img/todo-line.png → assets/tab/todo-line.png


+ 0 - 0
static/img/user-4-fill.png → assets/tab/user-4-fill.png


+ 0 - 0
static/img/user-4-line.png → assets/tab/user-4-line.png


+ 0 - 0
static/img/user-search-fill.png → assets/tab/user-search-fill.png


+ 0 - 0
static/img/user-search-line.png → assets/tab/user-search-line.png


+ 100 - 0
components/Tabbar.vue

@@ -0,0 +1,100 @@
+<template >
+	<view>
+		<u-tabbar v-model="myCurrent"  :list="tabbarList" 
+		:active-color="selectedColor" :inactive-color="color"  ></u-tabbar>
+		
+	</view>
+</template>
+
+<script>
+	var img1=require('@/assets/tab/home-3-line.png')
+	var img2=require('@/assets/tab/home-3-fill.png')
+	var img3=require('@/assets/tab/todo-line.png')
+	var img4=require('@/assets/tab/todo-fill.png')
+	var img5=require('@/assets/tab/add-circle-line.png')
+	var img6=require('@/assets/tab/add-circle-fill.png')
+	var img7=require('@/assets/tab/user-search-line.png')
+	var img8=require('@/assets/tab/user-search-fill.png')
+	var img9=require('@/assets/tab/user-4-line.png')
+	var img10=require('@/assets/tab/user-4-fill.png')
+ 	export default {
+		name:"tabbarJob",
+		props:{
+			current: 0,
+			elderStatus: false
+		},
+		data() {
+			return {
+			
+				color:"#817F99",
+				selectedColor:"#4696f6",
+				tabbarList:[
+					{
+						"text":"首页",
+						"pagePath":"/pages/main/index/index",
+						"iconPath":img1,
+						"selectedIconPath": img2
+						
+					},
+					{
+						"text":"招工",
+						"pagePath":"/pages/tab/jobInformation/jobInformation",
+						"iconPath":img3,
+						"selectedIconPath": img4
+						
+					},
+					{
+						"text":"发布",
+						"pagePath":"/pages/tab/issue/issue",
+						"iconPath":img5,
+						"selectedIconPath":img6
+						
+					},
+					{
+						"text":"找人",
+						"pagePath":"/pages/tab/choreInformation/choreInformation",
+						"iconPath":img7,
+						"selectedIconPath": img8
+						
+					},
+					{
+						"text":"我的",
+						"pagePath":"/pages/tab/mine/mine",
+						"iconPath":img9,
+						"selectedIconPath": img10
+						
+					}
+				],
+				
+				
+				oldindex:this.current,
+				 myCurrent:this.current,
+				
+			};
+			
+		},methods:{
+			setcount(c){
+				//this.myCurrent=c
+			},
+			beforeSwitch(index){
+				
+				
+			
+				
+				
+			},
+			
+		},
+		mounted(){
+			
+		},destroyed(){
+			
+		}
+		
+		
+	}
+</script>
+
+<style>
+	 
+</style>

+ 65 - 97
pages.json

@@ -9,42 +9,7 @@
 						"navigationStyle": "custom"
 					}
 				}
-			    ,{
-		            "path" : "pages/main/mine/mine",
-		            "style" :                                                                                    
-		            {
-		                "navigationBarTitleText": "我的",
-		                "enablePullDownRefresh": false
-		            }
-		            
-		        }
-		        ,{
-		            "path" : "pages/main/jobInformation/jobInformation",
-		            "style" :                                                                                    
-		            {
-		                "navigationBarTitleText": "用工信息",
-		                "enablePullDownRefresh": false
-		            }
-		            
-		        }
-		        ,{
-		            "path" : "pages/main/issue/issue",
-		            "style" :                                                                                    
-		            {
-		                "navigationBarTitleText": "发布",
-		                "enablePullDownRefresh": false
-		            }
-		            
-		        }
-		        ,{
-		            "path" : "pages/main/choreInformation/choreInformation",
-		            "style" :                                                                                    
-		            {
-		                "navigationBarTitleText": "零工驿站",
-		                "enablePullDownRefresh": false
-		            }
-		            
-		        }
+			    
        
     ],
 	"globalStyle": {
@@ -53,11 +18,54 @@
 		"enablePullDownRefresh": false
 		
 	},
-	"subPackages": [{
-		
+	"subPackages": [
+		{
+			"root": "pages/tab",
+			"pages": [ 
+				{
+				    "path" : "mine/mine",
+				    "style" :                                                                                    
+				    {
+				        "navigationBarTitleText": "我的",
+				        "enablePullDownRefresh": false
+				    }
+				    
+				}
+				,{
+				    "path" : "jobInformation/jobInformation",
+				    "style" :                                                                                    
+				    {
+				        "navigationBarTitleText": "用工信息",
+				        "enablePullDownRefresh": false
+				    }
+				    
+				}
+				,{
+				    "path" : "issue/issue",
+				    "style" :                                                                                    
+				    {
+				        "navigationBarTitleText": "发布",
+				        "enablePullDownRefresh": false
+				    }
+				    
+				}
+				,{
+				    "path" : "choreInformation/choreInformation",
+				    "style" :                                                                                    
+				    {
+				        "navigationBarTitleText": "零工驿站",
+				        "enablePullDownRefresh": false
+				    }
+				    
+				}
+			]
+		}
+		,
+		{
+		"root": "pages/packages",
 		"pages": [ 
 			{
-			           "path" : "pages/packages/shareEmployment/shareEmployment",
+			           "path" : "shareEmployment/shareEmployment",
 			           "style" :                                                                                    
 			           {
 							"navigationBarTitleText": "共享用工",
@@ -67,7 +75,7 @@
 			       }
 			       
 			       ,{
-			           "path" : "pages/packages/shareEmployment/articleDetail",
+			           "path" : "shareEmployment/articleDetail",
 			           "style" :                                                                                    
 			           {
 			               "navigationBarTitleText": "文章详情",
@@ -77,7 +85,7 @@
 			       }
 			       
 			       ,{
-			           "path" : "pages/packages/search/search",
+			           "path" : "search/search",
 			           "style" :                                                                                    
 			           {
 			               "navigationBarTitleText": "搜索",
@@ -86,7 +94,7 @@
 			           
 			       }
 			       ,{
-			           "path" : "pages/packages/search/searchResult",
+			           "path" : "search/searchResult",
 			           "style" :                                                                                    
 			           {
 			               "navigationBarTitleText": "搜索结果",
@@ -95,7 +103,7 @@
 			           
 			       }
 			       ,{
-			           "path" : "pages/packages/choreInformation/jobSearchDetails",
+			           "path" : "choreInformation/jobSearchDetails",
 			           "style" :                                                                                    
 			           {
 			               "navigationBarTitleText": "求职详情",
@@ -105,7 +113,7 @@
 			       }
 			       
 			       ,{
-			           "path" : "pages/packages/mine/employmentService/shareEmployment",
+			           "path" : "mine/employmentService/shareEmployment",
 			           "style" :                                                                                    
 			           {
 			               "navigationBarTitleText": "共享用工",
@@ -115,7 +123,7 @@
 			           
 			       }
 			       ,{
-			           "path" : "pages/packages/mine/employmentService/postMessage",
+			           "path" : "mine/employmentService/postMessage",
 			           "style" :                                                                                    
 			           {
 			               "navigationBarTitleText": "发布信息",
@@ -124,7 +132,7 @@
 			           
 			       }
 			       ,{
-			           "path" : "pages/packages/skillTraining/skillTraining",
+			           "path" : "skillTraining/skillTraining",
 			           "style" :                                                                                    
 			           {
 			               "navigationBarTitleText": "技能培训",
@@ -133,7 +141,7 @@
 			           
 			       }
 			       ,{
-			           "path" : "pages/packages/skillTraining/trainingRegistration",
+			           "path" : "skillTraining/trainingRegistration",
 			           "style" :                                                                                    
 			           {
 			               "navigationBarTitleText": "培训报名",
@@ -142,7 +150,7 @@
 			           
 			       }
 			       ,{
-			           "path" : "pages/packages/news/news",
+			           "path" : "news/news",
 			           "style" :                                                                                    
 			           {
 			               "navigationBarTitleText": "新闻咨询",
@@ -151,7 +159,7 @@
 			           
 			       }
 			       ,{
-			           "path" : "pages/packages/news/articleDetail",
+			           "path" : "news/articleDetail",
 			           "style" :                                                                                    
 			           {
 			               "navigationBarTitleText": "文章详情",
@@ -160,7 +168,7 @@
 			           
 			       }
 			       ,{
-			           "path" : "pages/packages/jobInformation/jobDetails",
+			           "path" : "jobInformation/jobDetails",
 			           "style" :                                                                                    
 			           {
 			               "navigationBarTitleText": "岗位详情",
@@ -169,7 +177,7 @@
 			           
 			       }
 			       ,{
-			           "path" : "pages/packages/mine/myJobInformation/myJobInformation",
+			           "path" : "mine/myJobInformation/myJobInformation",
 			           "style" :                                                                                    
 			           {
 			               "navigationBarTitleText": "求职信息",
@@ -178,7 +186,7 @@
 			           
 			       }
 			       ,{
-			           "path" : "pages/packages/mine/myJobInformation/myRegistration",
+			           "path" : "mine/myJobInformation/myRegistration",
 			           "style" :                                                                                    
 			           {
 			               "navigationBarTitleText": "我的报名",
@@ -187,7 +195,7 @@
 			           
 			       }
 			       ,{
-			           "path" : "pages/packages/mine/employmentService/laborManagement/laborManagement",
+			           "path" : "mine/employmentService/laborManagement/laborManagement",
 			           "style" :                                                                                    
 			           {
 			               "navigationBarTitleText": "用工管理",
@@ -196,7 +204,7 @@
 			           
 			       }
 			       ,{
-			           "path" : "pages/packages/mine/employmentService/laborManagement/postMessage",
+			           "path" : "mine/employmentService/laborManagement/postMessage",
 			           "style" :                                                                                    
 			           {
 			               "navigationBarTitleText": "发布求职信息",
@@ -205,7 +213,7 @@
 			           
 			       }
 			       ,{
-			           "path" : "pages/packages/mine/employmentService/receiveRegistration",
+			           "path" : "mine/employmentService/receiveRegistration",
 			           "style" :                                                                                    
 			           {
 			               "navigationBarTitleText": "收到报名",
@@ -215,7 +223,7 @@
 			       }
 			       
 			       ,{
-			           "path" : "pages/packages/mine/otherServices/authentication",
+			           "path" : "mine/otherServices/authentication",
 			           "style" :                                                                                    
 			           {
 			               "navigationBarTitleText": "身份认证",
@@ -226,47 +234,7 @@
 		]
 	}],
 	
-	"tabBar":{
-		"color":"#817F99",
-		"selectedColor":"#4696f6",
-		"list":[
-			{
-				"text":"首页",
-				"pagePath":"pages/main/index/index",
-				"iconPath":"static/img/home-3-line.png",
-				"selectedIconPath": "static/img/home-3-fill.png"
-				
-			},
-			{
-				"text":"招工",
-				"pagePath":"pages/main/jobInformation/jobInformation",
-				"iconPath":"static/img/todo-line.png",
-				"selectedIconPath": "static/img/todo-fill.png"
-				
-			},
-			{
-				"text":"发布",
-				"pagePath":"pages/main/issue/issue",
-				"iconPath":"static/img/add-circle-line.png",
-				"selectedIconPath": "static/img/add-circle-fill.png"
-				
-			},
-			{
-				"text":"找人",
-				"pagePath":"pages/main/choreInformation/choreInformation",
-				"iconPath":"static/img/user-search-line.png",
-				"selectedIconPath": "static/img/user-search-fill.png"
-				
-			},
-			{
-				"text":"我的",
-				"pagePath":"pages/main/mine/mine",
-				"iconPath":"static/img/user-4-line.png",
-				"selectedIconPath": "static/img/user-4-fill.png"
-				
-			}
-		]
-	},
+	 
 	
 	
 

+ 6 - 6
pages/main/index/index.vue

@@ -19,7 +19,7 @@
 		</view>
 		<!-- 功能区 -->
 		<view class="function">
-			<view class="function-item"  @click="gotoUrl('pages/choreInformation/choreInformation',true)">
+			<view class="function-item"  @click="gotoUrl('pages/main/choreInformation/choreInformation',true)">
 				<view class="icon-box icon-box3">
 			
 					<view class="icon">
@@ -31,7 +31,7 @@
 					零工驿站
 				</view>
 			</view>
-			<view class="function-item"  @click="gotoUrl('pages/choreInformation/choreInformation')">
+			<view class="function-item"  @click="gotoUrl('pages/packages/news/news')">
 				<view class="icon-box icon-box2">
 
 					<view class="icon">
@@ -134,9 +134,8 @@
 			</view>
 			
 		</view>
-		<!-- <tabbar  ref="mytabbar"
-		:current="0"></tabbar>
-		 -->
+		<tabbar :current="0"></tabbar>
+		
 	</view>
 
 
@@ -144,11 +143,12 @@
 </template>
 
 <script>
+	import tabbar from "@/components/Tabbar.vue"
 	
 	export default {
 		components: {
 		
-			
+			tabbar
 		},
 		data() {
 			return {

+ 2 - 2
pages/packages/mine/employmentService/receiveRegistration.vue

@@ -13,7 +13,7 @@
 					
 				<!-- 头像 -->
 				<view class="photo">
-					<img src="../@/assets/img/informationPhoto.png"></img>
+					<img src="@/assets/img/informationPhoto.png"></img>
 				</view>
 				<!-- 信息 -->
 				<view class="infos">
@@ -63,7 +63,7 @@
 	 			
 	 		<!-- 头像 -->
 	 		<view class="photo">
-	 			<img src="../@/assets/img/informationPhoto.png"></img>
+	 			<img src="@/assets/img/informationPhoto.png"></img>
 	 		</view>
 	 		<!-- 信息 -->
 	 		<view class="infos">

+ 1 - 1
pages/packages/mine/myJobInformation/myJobInformation.vue

@@ -17,7 +17,7 @@
 
 				<view class="photo">
 					<u-avatar :src="src" size="120" mode="circle"></u-avatar>
-					<img class="camera" src="../@/assets/img/riFill-camera-fill Copy@1x.png" alt="">
+					<img class="camera" src="@/assets/img/riFill-camera-fill Copy@1x.png" alt="">
 
 				</view>
 

+ 5 - 5
pages/packages/mine/otherServices/authentication.vue

@@ -45,7 +45,7 @@
 		<!-- 认证成功 -->
 		<view class="success" v-if="!authentication">
 			<view class="img-box">
-				<img src="../@/assets/img/success.png" alt="">
+				<img src="@/assets/img/success.png" alt="">
 			</view>
 			<!-- 信息 -->
 			<view class="infos-box">
@@ -82,7 +82,7 @@
 		<view class="tips" v-if="!authentication" >
 			<view class="tips-item">
 				<view class="icon">
-					<img src="../@/assets/img/shield-user-line.png" alt="">
+					<img src="@/assets/img/shield-user-line.png" alt="">
 				</view>
 						<view class="text">
 							信息安全保护中,认证信息将用于创建信息等功能,与账号为已绑定,未经您允许不对外提供
@@ -137,7 +137,7 @@
 		<!-- 企业认证成功 -->
 		<view class="success" v-if="!enterprise">
 			<view class="img-box">
-				<img src="../@/assets/img/success.png" alt="">
+				<img src="@/assets/img/success.png" alt="">
 			</view>
 			<!-- 信息 -->
 			<view class="infos-box">
@@ -156,7 +156,7 @@
 					
 				</view>
 				<view class="img-box">
-					<img src="../@/assets/img/business-license.png" alt="">
+					<img src="@/assets/img/business-license.png" alt="">
 				</view>
 				
 			</view>
@@ -166,7 +166,7 @@
 		<view class="tips" v-if="!enterprise" >
 			<view class="tips-item">
 				<view class="icon">
-					<img src="../@/assets/img/shield-user-line.png" alt="">
+					<img src="@/assets/img/shield-user-line.png" alt="">
 				</view>
 						<view class="text">
 							信息安全保护中,认证信息将用于创建信息等功能,与账号为已绑定,未经您允许不对外提供

+ 1 - 1
pages/packages/search/search.vue

@@ -37,7 +37,7 @@
 </template>
 
 <script>
-	import nxsearch from "../../components/nx-search.vue"
+	import nxsearch from "@/components/nx-search.vue"
 
 	export default {
 		components: {

+ 1 - 1
pages/packages/search/searchResult.vue

@@ -69,7 +69,7 @@
 </template>
 
 <script>
-	import nxsearch from "../../components/nx-search.vue"
+	import nxsearch from "@/components/nx-search.vue"
 
 	export default {
 		components: {

+ 5 - 3
pages/main/choreInformation/choreInformation.vue → pages/tab/choreInformation/choreInformation.vue

@@ -104,17 +104,19 @@
   </view>
   	</view>
   </u-popup>
-<!-- <tabbar  ref="mytabbar"
-		:current="3"></tabbar> -->
+
+		<tabbar :current="3"></tabbar>
 	</view>
 </template>
 
 <script>
+	import tabbar from "@/components/Tabbar.vue"
+	
 	import nxsearch from "@/components/nx-search.vue"
 	export default {
 		components: {
 			nxsearch,
-			
+			tabbar
 		},
 
 		data() {

+ 4 - 3
pages/main/issue/issue.vue → pages/tab/issue/issue.vue

@@ -66,17 +66,18 @@
 
 		</view>
 
-		<!-- <tabbar ref="mytabbar" :current="2"></tabbar> -->
-
+		
+ <tabbar  :current="2"></tabbar>
 	</view>
 
 </template>
 
 <script>
+	import tabbar from "@/components/Tabbar.vue"
 	
 	export default {
 		components: {
-		
+		tabbar
 
 		},
 		data() {

+ 5 - 3
pages/main/jobInformation/jobInformation.vue → pages/tab/jobInformation/jobInformation.vue

@@ -122,17 +122,19 @@
 		</view>
 			</view>
 		</u-popup>
-
-		<!-- <tabbar ref="mytabbar" :current="1"></tabbar> -->
+		<tabbar :current="1"></tabbar>
+		
 	</view>
 </template>
 
 <script>
+	import tabbar from "@/components/Tabbar.vue"
+	
 	import nxsearch from "@/components/nx-search.vue"
 	export default {
 		components: {
 			nxsearch,
-			
+			tabbar
 
 		},
 		data() {

+ 4 - 3
pages/main/mine/mine.vue → pages/tab/mine/mine.vue

@@ -133,16 +133,17 @@
 				</view>
 			</u-popup>
 		 
-		<!-- <tabbar  ref="mytabbar"
-		:current="4"></tabbar> -->
+
+		<tabbar  :current="4"></tabbar>
 	</view>
 </template>
 
 <script>
+	import tabbar from "@/components/Tabbar.vue"
 	
 	export default {
 		components: {
-		
+			tabbar
 		},
 		data() {
 			return {

+ 1 - 1
uni_modules/uview-ui/components/u-tabbar/u-tabbar.vue

@@ -199,7 +199,7 @@
 				this.$emit('change', index);
 				// 如果有配置pagePath属性,使用uni.switchTab进行跳转
 				if(this.list[index].pagePath) {
-					uni.switchTab({
+					uni.redirectTo({
 						url: this.list[index].pagePath
 					})
 				} else {