Bladeren bron

返回组件

张文飞 3 jaren geleden
bovenliggende
commit
d720dd6f73

+ 53 - 0
components/backHome/backHome.vue

@@ -0,0 +1,53 @@
+<template>
+	<view class="back_home" :style="{background:color2}" @click="backHome">
+		<image class="back_home_icon" src="https://dm.static.elab-plus.com/yezhu/icon_home.png" mode=""></image>
+		<text>返回\n任务大厅</text>
+	</view>
+</template>
+
+<script>
+	export default {
+		name:"backHome",
+		data() {
+			return {
+				color2:""
+			};
+		},
+		mounted() {
+			this.color2 = getApp().globalData.color2;
+		},
+		methods:{
+			backHome(){
+				uni.navigateBack({
+					delta:1,
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+.back_home{
+		position: fixed;
+		bottom: 180rpx;
+		right: 0;
+		width: 100rpx;
+		height: 120rpx;
+		border-radius: 20rpx 0rpx 0rpx 20rpx;
+		box-shadow: 0rpx 10rpx 20rpx 0rpx rgba(119,55,12,0.20); 
+		display: flex;
+		flex-direction: column;
+		justify-content: center;
+		align-items: center;
+		.back_home_icon{
+			width: 30rpx;
+			height: 28rpx;
+			margin-bottom: 9rpx;
+		}
+		font-size: 20rpx;
+		font-family: PingFang SC, PingFang SC-Semibold;
+		font-weight: 600;
+		text-align: center;
+		color: #ffffff;
+	}
+</style>

+ 2 - 2
pages/certificationResultPage/certificationResultPage.vue

@@ -48,8 +48,8 @@
 				}
 				}
 			},
 			},
 			toHome(){
 			toHome(){
-				uni.reLaunch({
-					url:'../homePage/homePage'
+				uni.navigateBack({
+					delta:1
 				})
 				})
 			}
 			}
 			
 			

+ 5 - 7
pages/houseDetail/houseDetail.vue

@@ -43,13 +43,7 @@
 			<view class="invitationBtn">邀请好友</view>
 			<view class="invitationBtn">邀请好友</view>
 		</view>
 		</view>
 		
 		
-		<view class="homeBtn"
-		:style="`position: fixed; z-index: 1000; right: 0; bottom: 25%; width: 96rpx; height: 110rpx; display: flex; flex-direction: column; align-items: center;border-radius: 20rpx 0rpx 0px 20rpx;box-shadow: 0rpx 10rpx 20rpx 0px rgba(119,55,12,0.20); background-color: ${color2};`"
-		@click="backAction">
-			<image class="icon" style="margin-top: 8rpx;width: 30rpx; height: 28rpx;" src="https://dm.static.elab-plus.com/yezhu/h5/icon_homeBtn.png" mode="aspectFit"></image>
-			<view class="text" style="margin-top: 6rpx;font-size: 12rpx;font-family: PingFang SC, PingFang SC-Semibold;font-weight: 400;text-align: center;color: #ffffff;">返回</view>
-			<view class="text" style="margin-top: -2rpx;;font-size: 12rpx;font-family: PingFang SC, PingFang SC-Semibold;font-weight: 400;text-align: center;color: #ffffff;">任务大厅</view>
-		</view>
+		<backHome></backHome>
 		<login-notice></login-notice>
 		<login-notice></login-notice>
 		<login></login>
 		<login></login>
 	</view>
 	</view>
@@ -62,6 +56,7 @@
 	} from '../../static/format.js'
 	} from '../../static/format.js'
 	
 	
 	let app = getApp();
 	let app = getApp();
+	import backHome from "@/components/backHome/backHome.vue"
 	export default {
 	export default {
 		data() {
 		data() {
 			return {
 			return {
@@ -130,6 +125,9 @@
 		onLoad(param) {
 		onLoad(param) {
 			this.projectId = param.projectId;
 			this.projectId = param.projectId;
 		},
 		},
+		components:{
+			backHome
+		},
 		mounted() {
 		mounted() {
 			this.color1 = app.globalData.color1;
 			this.color1 = app.globalData.color1;
 			this.color2 = app.globalData.color2;
 			this.color2 = app.globalData.color2;

+ 4 - 8
pages/reportPage/reportPage.vue

@@ -83,13 +83,7 @@
 			
 			
 		</view>
 		</view>
 		
 		
-		<view class="homeBtn" 
-		:style="`position: fixed; z-index: 1000; right: 0; bottom: 15%; width: 96rpx; height: 110rpx; display: flex; flex-direction: column; align-items: center;border-radius: 20rpx 0rpx 0px 20rpx;box-shadow: 0rpx 10rpx 20rpx 0px rgba(119,55,12,0.20); background-color: ${color2};`"
-		@click="backAction">
-			<image class="icon" style="margin-top: 8rpx;width: 30rpx; height: 28rpx;" src="https://dm.static.elab-plus.com/yezhu/h5/icon_homeBtn.png" mode="aspectFit"></image>
-			<view class="text" style="margin-top: 6rpx;font-size: 12rpx;font-family: PingFang SC, PingFang SC-Semibold;font-weight: 400;text-align: center;color: #ffffff;">返回</view>
-			<view class="text" style="margin-top: -2rpx;;font-size: 12rpx;font-family: PingFang SC, PingFang SC-Semibold;font-weight: 400;text-align: center;color: #ffffff;">任务大厅</view>
-		</view>
+		<backHome></backHome>
 		
 		
 		<dm-calendar-picker-view ref='calendarPickerView' @confirmSelDate='confirmSelDate'></dm-calendar-picker-view>
 		<dm-calendar-picker-view ref='calendarPickerView' @confirmSelDate='confirmSelDate'></dm-calendar-picker-view>
 	    <dmWithDrawalRecord ref='withDrawalRecord'></dmWithDrawalRecord>
 	    <dmWithDrawalRecord ref='withDrawalRecord'></dmWithDrawalRecord>
@@ -106,6 +100,7 @@
 	import moment from '../../static/moment.min.js'
 	import moment from '../../static/moment.min.js'
 	import dmWithDrawalRecord from '../../components/subComponents/dmWithDrawalRecord.vue' 
 	import dmWithDrawalRecord from '../../components/subComponents/dmWithDrawalRecord.vue' 
 	import dmWithDrawal from '../../components/subComponents/dmWithDrawal.vue'
 	import dmWithDrawal from '../../components/subComponents/dmWithDrawal.vue'
+	import backHome from "@/components/backHome/backHome.vue"
 	let app = getApp();
 	let app = getApp();
 	export default {
 	export default {
 		data() {
 		data() {
@@ -307,7 +302,8 @@
 			numRun,
 			numRun,
 			dmCalendarPickerView,
 			dmCalendarPickerView,
 			dmWithDrawalRecord,
 			dmWithDrawalRecord,
-			dmWithDrawal
+			dmWithDrawal,
+			backHome
 		}
 		}
 	}
 	}
 </script>
 </script>

+ 5 - 5
pages/revenueRankingPage/revenueRankingPage.vue

@@ -56,11 +56,7 @@
 				<image class="emptyImg" src="https://dm.static.elab-plus.com/yezhu/h5/icon_empty.png" mode=""></image>
 				<image class="emptyImg" src="https://dm.static.elab-plus.com/yezhu/h5/icon_empty.png" mode=""></image>
 				<view class="text">暂无数据</view>
 				<view class="text">暂无数据</view>
 			</view>
 			</view>
-			
-			<view class="back_home" :style="{background:color2}" @click="backHome">
-				<image class="back_home_icon" src="https://dm.static.elab-plus.com/yezhu/icon_home.png" mode=""></image>
-				<text>返回\n任务大厅</text>
-			</view>
+			<backHome></backHome>
 		</view>
 		</view>
 		<login-notice></login-notice>
 		<login-notice></login-notice>
 		<login></login>
 		<login></login>
@@ -69,6 +65,7 @@
 
 
 <script>
 <script>
 	let app = getApp();
 	let app = getApp();
+	import backHome from "@/components/backHome/backHome.vue"
 	export default {
 	export default {
 		data() {
 		data() {
 			return {
 			return {
@@ -78,6 +75,9 @@
 				currentTab:1,
 				currentTab:1,
 			};
 			};
 		},
 		},
+		components:{
+			backHome
+		},
 		created() {
 		created() {
 			
 			
 		},
 		},

+ 2 - 2
pages/shareCardPage/shareCardPage.vue

@@ -70,8 +70,8 @@
 				}
 				}
 			},
 			},
 			back(){
 			back(){
-				uni.reLaunch({
-					url:"../homePage/homePage"
+				uni.navigateBack({
+					delta:1
 				})
 				})
 			},
 			},
 			copy(){
 			copy(){