ソースを参照

Merge branch 'master' of http://47.92.161.104:10080/zkx/JP-ChargeTeam51

常志远 3 年 前
コミット
4d9a8ee9d1

+ 13 - 15
components/Tabbar.vue

@@ -1,8 +1,7 @@
 <template >
 	<view>
 		<u-tabbar v-model="myCurrent" :list="tabbarList" 
-		:before-switch="beforeSwitch"
-		:mid-button="true" active-color="#1677ff"></u-tabbar>
+		:before-switch="beforeSwitch" active-color="#009143"></u-tabbar>
 		
 	</view>
 </template>
@@ -21,33 +20,32 @@
 				oldindex:this.current,
 				 myCurrent:this.current,
 				 tabbarList: [{
-				 		iconPath: "motuoche-diandongche",
-				 		selectedIconPath: "motuoche-diandongche",
-				 		text: '充电中',
+				 		iconPath: "home-3-line",
+				 		selectedIconPath: "home-3-fill",
+				 		text: '主页 ',
 				 		count: 0,
 				 		isDot: true,
 				 		customIcon: true,
-						pagePath2:"/pages/index/index?k=1",
-						
+						pagePath2:"/pages/index/index",
 				 	},
 				 	{
-				 		iconPath: "/static/img/min_button_select.png",
-				 		selectedIconPath: "/static/img/min_button_select.png",
-				 		text: '充电',
+				 		iconPath: "road-map-line",
+				 		selectedIconPath: "road-map-fill",
+				 		text: '找桩',
 				 		midButton: true,
 				 		customIcon: true,
-						pagePath2:"/pages/charge/index",
+						pagePath2:"/pages/searchPile/searchPile",
 				 	},
 				 	{
-				 		iconPath: "31wode",
-				 		selectedIconPath: "31wode",
+				 		iconPath: "user-5-line",
+				 		selectedIconPath: "user-5-fill",
 				 		text: '我的',
 				 		count: 0,
 				 		isDot: false,
 				 		customIcon: true,
 						pagePath2:"/pages/user/index",
-				 	},
-				 ],
+				 	}
+			 ],
 			};
 			
 		},methods:{

+ 5 - 27
pages/index/index.vue

@@ -188,7 +188,7 @@
 				登录显示更多会员服务
 				<text class="button" >登录/注册</text>
 			</view>
-					<u-tabbar v-model="current" :list="tabbarList" active-color="#009143"></u-tabbar>
+					<Tabbar :current="0"></Tabbar>
 				</view>
 				
 				
@@ -198,8 +198,12 @@
 <script>
 	import * as WxJsApi from '@/utils/wxJsApi.js'
 	import MapLoader from '@/utils/AMap'
+	import Tabbar from '@/components/Tabbar.vue'
 	
 	export default {
+		components: {
+			Tabbar
+		},
 		data() {
 			return {
 				userId: '',
@@ -209,32 +213,6 @@
 				longitude: '',
 				latitude: '',
 				message: '',
-				tabbarList: [{
-						iconPath: "home-3-line",
-						selectedIconPath: "home-3-fill",
-						text: '主页 ',
-						count: 0,
-						isDot: true,
-						customIcon: true,
-					},
-					{
-						iconPath: "road-map-line",
-						selectedIconPath: "road-map-fill",
-						text: '找桩',
-						midButton: true,
-						customIcon: true,
-					},
-					{
-						iconPath: "user-5-line",
-						selectedIconPath: "user-5-fill",
-						text: '我的',
-						count: 0,
-						isDot: false,
-						customIcon: true,
-
-					}
-				],
-				current: 0
 			}
 		},
 		onReachBottom() {

+ 0 - 3
pages/login/login.vue

@@ -167,9 +167,6 @@
 					uni.redirectTo({
 						url: '/pages/index/index'
 					})
-					// uni.switchTab({
-					// 	url: '/pages/index/index'
-					// })
 				}).catch(error => {
 					uni.showToast({
 						title: error,

+ 4 - 27
pages/searchPile/searchPile.vue

@@ -227,7 +227,7 @@
 				</view>
 			</view>
 		</view>
-		<u-tabbar  v-model="current" :list="tabbarList" active-color="#009143"></u-tabbar>
+		<Tabbar :current="1"></Tabbar>
 	</view>
 </template>
 
@@ -237,40 +237,17 @@
 import * as api from '@/apis/site.js';
 import Chargermap from '@/components/Chargermap.vue';
 import DoubleSlider from '@/components/double-slider/DoubleSlider.vue';
+import Tabbar from '@/components/Tabbar.vue';
 
 let _self;
 export default {
 	components: {
 		Chargermap,
-		DoubleSlider
+		DoubleSlider,
+		Tabbar	
 	},
 	data() {
 		return {
-			tabbarList: [{
-					iconPath: "home-3-line",
-					selectedIconPath: "home-3-fill",
-					text: '主页 ',
-					count: 0,
-					isDot: true,
-					customIcon: true,
-				},
-				{
-					iconPath: "road-map-line",
-					selectedIconPath: "road-map-fill",
-					text: '找桩',
-					midButton: true,
-					customIcon: true,
-				},
-				{
-					iconPath: "user-5-line",
-					selectedIconPath: "user-5-fill",
-					text: '我的',
-					count: 0,
-					isDot: false,
-					customIcon: true,
-			
-				}
-			],
 			currentIndex:-1,
 			navBarHeight:88,
 			viewMode: true, //地图

+ 6 - 26
pages/user/index.vue

@@ -64,42 +64,22 @@
 			</view>
 		</view>
 		
-		<u-tabbar v-model="current" :list="tabbarList" active-color="#009143"></u-tabbar>
+		<Tabbar :current="2"></Tabbar>
 	</view>
 </template>
 
 <script>
+	import Tabbar from '@/components/Tabbar.vue'
+	
 	export default {
+		components: {
+			Tabbar
+		},
 		data() {
 			return {
 				show: false,
 				title: '联系客服',
 				content: '0716-8123456',
-				tabbarList: [{
-						iconPath: "home-3-line",
-						selectedIconPath: "home-3-fill",
-						text: '主页',
-						count: 0,
-						isDot: true,
-						customIcon: true,
-					},
-					{
-						iconPath: "road-map-line",
-						selectedIconPath: "road-map-fill",
-						text: '找桩',
-						midButton: true,
-						customIcon: true,
-					},
-					{
-						iconPath: "user-5-line",
-						selectedIconPath: "user-5-fill",
-						text: '我的',
-						count: 0,
-						isDot: false,
-						customIcon: true,
-					},
-				],
-				current: 0,
 				background:{
 					background: 'none'
 				},

+ 1 - 1
pages/user/message.vue

@@ -39,7 +39,7 @@
 		},
 		methods: {
 			submit() {
-				uni.switchTab({
+				uni.redirectTo({
 					url: '/pages/user/index'
 				})
 			}