guhongwei 2 years ago
parent
commit
c489f6c8f8

+ 12 - 7
components/mobile-frame/index.vue

@@ -8,7 +8,7 @@
 			</scroll-view>
 		</view>
 		<view class="foot" v-if="frameStyle&&frameStyle.useBar||false">
-			<view class="list" v-for="(item,index) in barList" :key="index" @tap="toPath(index,item)">
+			<view class="list" v-for="(item,index) in barList" :key="index" @tap="toPath(index,item)" v-if="item.is_use=='0'">
 				<image class="image" :src="item.normal" mode="" v-if="active!=index"></image>
 				<image class="image" :src="item.active" mode="" v-else></image>
 				<view class="name" :style="{color:active==index?frameStyle.barActive||'#FB1438':''}">{{item.name}}</view>
@@ -32,35 +32,40 @@
 						route: 'pages/home/index',
 						normal: require('@/static/shouye.png'),
 						active: require('@/static/shouye_1.png'),
-						type: '0'
+						type: '0',
+						is_use: '0'
 					},
 					{
 						name: '微店',
 						route: 'pages/store/index',
 						normal: require('@/static/store.png'),
 						active: require('@/static/store_1.png'),
-						type: '0'
+						type: '0',
+						is_use: '1'
 					},
 					{
 						name: '分类',
 						route: 'pages/week/index',
 						normal: require('@/static/type.png'),
 						active: require('@/static/type_1.png'),
-						type: '0'
+						type: '0',
+						is_use: '0'
 					},
 					{
 						name: '购物车',
 						route: 'pages/market/index',
 						normal: require('@/static/market.png'),
 						active: require('@/static/market_1.png'),
-						type: '0'
+						type: '0',
+						is_use: '0'
 					},
 					{
 						name: '我的',
 						route: 'pages/my/index',
 						normal: require('@/static/my.png'),
 						active: require('@/static/my_1.png'),
-						type: '0'
+						type: '0',
+						is_use: '0'
 					},
 				]
 			};
@@ -131,4 +136,4 @@
 			flex-direction: column;
 		}
 	}
-</style>
+</style>

+ 11 - 4
pages/home/index.vue

@@ -114,10 +114,17 @@
 				},
 			};
 		},
-		onShow: function() {
+		onLoad: function() {
 			const that = this;
 			that.search();
 		},
+		onHide: function() {
+			const that = this;
+			// that.clearPage();
+		},
+		onUnload: function() {
+			console.log('1');
+		},
 		methods: {
 			async search() {
 				const that = this;
@@ -197,7 +204,7 @@
 			// 推荐好物更多
 			toMore(e) {
 				const that = this;
-				that.clearPage();
+				// that.clearPage();
 				uni.navigateTo({
 					url: `/pagesRest/recom/index?act_tags=${e.value}`
 				})
@@ -205,7 +212,7 @@
 			// 平台活动
 			toAct(e) {
 				const that = this;
-				that.clearPage();
+				// that.clearPage();
 				uni.navigateTo({
 					url: `/pagesRest/activity/info?id=${e._id}`
 				})
@@ -214,7 +221,7 @@
 			toBuy(e) {
 				const that = this;
 				let id = e._id || e.id;
-				that.clearPage();
+				// that.clearPage();
 				uni.navigateTo({
 					url: `/pagesHome/order/detail?id=${id}`
 				})

+ 4 - 0
pages/store/index.vue

@@ -59,6 +59,10 @@
 			await that.watchLogin();
 			await that.search();
 		},
+		onHide: function() {
+			const that = this;
+			that.clearPage();
+		},
 		methods: {
 			// 监听用户是否登录
 			watchLogin() {

+ 4 - 0
pages/week/index.vue

@@ -86,6 +86,10 @@
 			that.searchConfig();
 			that.search();
 		},
+    		onHide: function() {
+			const that = this;
+			that.clearPage();
+		},
 		onShow: function() {},
 		methods: {
 			// 查询基本设置

+ 4 - 0
pagesHome/exchange/index.vue

@@ -36,6 +36,10 @@
 			// 监听用户是否登录
 			that.watchLogin();
 		},
+    		onHide: function() {
+			const that = this;
+			that.clearPage();
+		},
 		methods: {
 			// 领取优惠劵
 			async toReceive(e) {

+ 4 - 0
pagesHome/group/index.vue

@@ -129,6 +129,10 @@
 			await that.watchLogin();
 			await that.search();
 		},
+    		onHide: function() {
+			const that = this;
+			that.clearPage();
+		},
 		methods: {
 			// 开团
 			async toGroup() {

+ 4 - 0
pagesHome/market/search.vue

@@ -130,6 +130,10 @@
 			const that = this;
 			that.searchConfig();
 		},
+		onHide: function() {
+			const that = this;
+			// that.clearPage();
+		},
 		methods: {
 			// 查询基本设置
 			searchConfig() {

+ 4 - 0
pagesHome/market/type.vue

@@ -84,6 +84,10 @@
 			that.search();
 		},
 		onShow: function() {},
+    onHide: function() {
+			const that = this;
+			that.clearPage();
+		},
 		methods: {
 			// 查询基本设置
 			searchConfig() {

+ 4 - 0
pagesHome/order/appraise.vue

@@ -107,6 +107,10 @@
 			that.$set(that, `id`, e.id || '');
 			that.watchLogin()
 		},
+        onHide: function() {
+			const that = this;
+			that.clearPage();
+		},
 		methods: {
 			async confirm(e) {
 				const that = this;

+ 4 - 0
pagesHome/shop/index.vue

@@ -227,6 +227,10 @@
 			const that = this;
 			that.searchConfig();
 		},
+        onHide: function() {
+			const that = this;
+			that.clearPage();
+		},
 		methods: {
 			// 查询基本设置
 			searchConfig() {

+ 4 - 1
pagesMy/address/index.vue

@@ -72,7 +72,10 @@
 			that.watchLogin();
 
 		},
-
+    onHide: function() {
+			const that = this;
+			that.clearPage();
+		},
 		methods: {
 			// 查询基本设置
 			searchConfig() {

+ 4 - 0
pagesMy/collection/market.vue

@@ -136,6 +136,10 @@
 			const that = this;
 			that.watchLogin()
 		},
+    onHide: function() {
+			const that = this;
+			that.clearPage();
+		},
 		methods: {
 			// 输入框
 			toInput(e) {

+ 4 - 0
pagesMy/collection/shop.vue

@@ -118,6 +118,10 @@
 			const that = this;
 			that.watchLogin()
 		},
+        onHide: function() {
+			const that = this;
+			that.clearPage();
+		},
 		methods: {
 			// 输入框
 			toInput(e) {

+ 4 - 0
pagesMy/discount/index.vue

@@ -45,6 +45,10 @@
 			// 监听用户是否登录
 			that.watchLogin();
 		},
+        onHide: function() {
+			const that = this;
+			that.clearPage();
+		},
 		methods: {
 			// 查询基本设置
 			searchConfig() {

+ 4 - 0
pagesMy/dough/index.vue

@@ -100,6 +100,10 @@
 			const that = this;
 			that.watchLogin()
 		},
+        onHide: function() {
+			const that = this;
+			that.clearPage();
+		},
 		methods: {
 			// 输入框
 			toInput(e) {

+ 4 - 0
pagesMy/integral/index.vue

@@ -58,6 +58,10 @@
 			await that.searchOther();
 			await that.watchLogin();
 		},
+        onHide: function() {
+			const that = this;
+			that.clearPage();
+		},
 		methods: {
 			// 查询基本设置
 			searchConfig() {

+ 4 - 0
pagesMy/order/after.vue

@@ -120,6 +120,10 @@
 			// 监听用户登录
 			await that.watchLogin();
 		},
+        onHide: function() {
+			const that = this;
+			that.clearPage();
+		},
 		methods: {
 			// 查询基本设置
 			searchConfig() {

+ 4 - 0
pagesMy/order/index.vue

@@ -189,6 +189,10 @@
 			that.clearPage();
 			that.search();
 		},
+        onHide: function() {
+			const that = this;
+			that.clearPage();
+		},
 		methods: {
 			// 查询基本设置
 			searchConfig() {

+ 4 - 0
pagesRest/activity/info.vue

@@ -64,6 +64,10 @@
 			await that.searchAct();
 			await that.configShare();
 		},
+        onHide: function() {
+			const that = this;
+			that.clearPage();
+		},
 		methods: {
 			// 查询基本设置
 			searchConfig() {

+ 4 - 0
pagesRest/activity/list.vue

@@ -52,6 +52,10 @@
 			that.searchConfig();
 			that.search();
 		},
+        onHide: function() {
+			const that = this;
+			that.clearPage();
+		},
 		methods: {
 			// 查询基本设置
 			searchConfig() {