Browse Source

删除接口

xiaoxin 2 years ago
parent
commit
b59f1e73ac
4 changed files with 19 additions and 33 deletions
  1. 2 13
      pages/community/community.vue
  2. 3 14
      pages/my/my.vue
  3. 11 2
      pages/orderDetail/orderDetail.vue
  4. 3 4
      pages/payStatus/payStatus.vue

+ 2 - 13
pages/community/community.vue

@@ -84,7 +84,7 @@
 		</view>
 		</view>
 
 
 		<!-- 悬浮按钮区域 -->
 		<!-- 悬浮按钮区域 -->
-		<uni-fab v-if="showFab" :pattern="pattern" horizontal="right" @fabClick="handleClickBtn"></uni-fab>
+		<uni-fab :pattern="pattern" horizontal="right" @fabClick="handleClickBtn"></uni-fab>
 	</view>
 	</view>
 </template>
 </template>
 
 
@@ -122,12 +122,10 @@ export default {
 			// 瀑布流第一列数据
 			// 瀑布流第一列数据
 			list1: [],
 			list1: [],
 			// 瀑布流第二列数据
 			// 瀑布流第二列数据
-			list2: [],
-			showFab: true
+			list2: []
 		}
 		}
 	},
 	},
 	onShow() {
 	onShow() {
-		this.getShow()
 		let userInfo = uni.getStorageSync('userInfo')
 		let userInfo = uni.getStorageSync('userInfo')
 		let tokenId = uni.getStorageSync('tokenId')
 		let tokenId = uni.getStorageSync('tokenId')
 		if (!userInfo || !tokenId) {
 		if (!userInfo || !tokenId) {
@@ -158,15 +156,6 @@ export default {
 		}
 		}
 	},
 	},
 	methods: {
 	methods: {
-		async getShow() {
-			const res = await this.$myRequest({
-				url: '/mhotel/admintrueStr.action'
-			})
-			// console.log(res)
-			if (res.code == 200) {
-				res.data == 0 ? (this.showFab = true) : (this.showFab = false)
-			}
-		},
 		// 获取乡镇列表数组
 		// 获取乡镇列表数组
 		async getTownList() {
 		async getTownList() {
 			const res = await this.$myRequest({
 			const res = await this.$myRequest({

+ 3 - 14
pages/my/my.vue

@@ -83,11 +83,11 @@
 			<view class="body_box">
 			<view class="body_box">
 				<view class="box_title">常用工具</view>
 				<view class="box_title">常用工具</view>
 				<view class="box_list">
 				<view class="box_list">
-					<view class="item_box" @click="handleShowCar" v-if="showFab">
+					<view class="item_box" @click="handleShowCar">
 						<img class="box_img" src="../../static/my/shopcar.png" />
 						<img class="box_img" src="../../static/my/shopcar.png" />
 						<view class="box_text">购物车</view>
 						<view class="box_text">购物车</view>
 					</view>
 					</view>
-					<view class="item_box" @click="handleShowAddress" v-if="showFab">
+					<view class="item_box" @click="handleShowAddress">
 						<img class="box_img" src="../../static/my/address.png" />
 						<img class="box_img" src="../../static/my/address.png" />
 						<view class="box_text">收货地址</view>
 						<view class="box_text">收货地址</view>
 					</view>
 					</view>
@@ -119,8 +119,7 @@ export default {
 			// 胶囊按钮栏高度
 			// 胶囊按钮栏高度
 			customBarH: 0,
 			customBarH: 0,
 			// 顶部页面标题栏显示隐藏控制
 			// 顶部页面标题栏显示隐藏控制
-			headerType: false,
-			showFab: true
+			headerType: false
 		}
 		}
 	},
 	},
 	created() {
 	created() {
@@ -146,7 +145,6 @@ export default {
 		uni.$on('changeFlag', this.changeFlag)
 		uni.$on('changeFlag', this.changeFlag)
 	},
 	},
 	onShow() {
 	onShow() {
-		this.getShow()
 		let openid = uni.getStorageSync('openid')
 		let openid = uni.getStorageSync('openid')
 		if (openid) {
 		if (openid) {
 			this.flag = true
 			this.flag = true
@@ -156,15 +154,6 @@ export default {
 		}
 		}
 	},
 	},
 	methods: {
 	methods: {
-		async getShow() {
-			const res = await this.$myRequest({
-				url: '/mhotel/admintrueStr.action'
-			})
-			// console.log(res)
-			if (res.code == 200) {
-				res.data == 0 ? (this.showFab = true) : (this.showFab = false)
-			}
-		},
 		// 跳转页面回调
 		// 跳转页面回调
 		handleGoPage(url) {
 		handleGoPage(url) {
 			if (this.isLogin()) {
 			if (this.isLogin()) {

+ 11 - 2
pages/orderDetail/orderDetail.vue

@@ -177,12 +177,15 @@ export default {
 			// 胶囊按钮栏高度
 			// 胶囊按钮栏高度
 			customBarH: 0,
 			customBarH: 0,
 			// 顶部页面标题栏显示隐藏控制
 			// 顶部页面标题栏显示隐藏控制
-			headerType: false
+			headerType: false,
+			// 是否前往首页控制
+			goHome: null
 		}
 		}
 	},
 	},
 	onLoad(options) {
 	onLoad(options) {
 		this.id = options.id
 		this.id = options.id
 		this.distance = options.distance
 		this.distance = options.distance
+		this.goHome = options.goHome
 		this.getData()
 		this.getData()
 	},
 	},
 	onPageScroll(e) {
 	onPageScroll(e) {
@@ -231,7 +234,13 @@ export default {
 			})
 			})
 		},
 		},
 		handleBack() {
 		handleBack() {
-			uni.navigateBack(1)
+			if (this.goHome) {
+				uni.switchTab({
+					url: '/pages/home3/home3'
+				})
+			} else {
+				uni.navigateBack(1)
+			}
 		},
 		},
 		// 点击地图/导航文字回调
 		// 点击地图/导航文字回调
 		handleMap() {
 		handleMap() {

+ 3 - 4
pages/payStatus/payStatus.vue

@@ -71,14 +71,13 @@ export default {
 										url: '/pages/home3/home3'
 										url: '/pages/home3/home3'
 									})
 									})
 								} else if (type == 2) {
 								} else if (type == 2) {
-									uni.navigateTo({
-										url: `/pages/orderDetail/orderDetail?id=${this.id}`
+									uni.reLaunch({
+										url: `/pages/orderDetail/orderDetail?id=${this.id}&goHome=${true}`
 									})
 									})
 								}
 								}
 							},
 							},
 							fail(err) {
 							fail(err) {
-								console.log(err)
-								// console.log('拒绝')
+								// console.log(err)
 							}
 							}
 						})
 						})
 					} else {
 					} else {