guhongwei 2 лет назад
Родитель
Сommit
603f5d30c1
1 измененных файлов с 13 добавлено и 41 удалено
  1. 13 41
      pagesIntegral/order/detail.vue

+ 13 - 41
pagesIntegral/order/detail.vue

@@ -6,7 +6,7 @@
 					<view class="list-scroll-view" id="top">
 						<view class="one">
 							<swiper class="swiper" circular :indicator-dots="true" indicator-color="#ffffff" indicator-active-color="#FB1438" :autoplay="true" :interval="3000" :duration="1000">
-								<swiper-item class="list" v-for="(item,index) in bannerList" :key="index">
+								<swiper-item class="list" v-for="(item,index) in info.file" :key="index">
 									<image class="image" :src="item.url" mode="aspectFit">
 									</image>
 								</swiper-item>
@@ -92,27 +92,7 @@
 				shop: {},
 				// 数量
 				num: 1,
-				barList: [{
-						name: '首页',
-						route: 'pages/home/index',
-						normal: require('@/static/shouye.png'),
-					},
-					{
-						name: '微店',
-						route: 'pages/store/index',
-						normal: require('@/static/store.png'),
-					},
-					{
-						name: '购物车',
-						route: 'pages/market/index',
-						normal: require('@/static/market.png'),
-					},
-					{
-						name: '我的',
-						route: 'pages/my/index',
-						normal: require('@/static/my.png'),
-					},
-				],
+				barList: [],
 				buttonGroup: [{
 					text: '兑换',
 					backgroundColor: 'linear-gradient(90deg, #6A5ACD, #6A5ACD)',
@@ -132,7 +112,6 @@
 		onShow: async function() {
 			const that = this;
 			await that.searchConfig();
-			// 监听用户是否登录
 			await that.watchLogin();
 			await that.search();
 		},
@@ -154,19 +133,7 @@
 					}
 				})
 			},
-			//主菜单跳转
-			toPath(e) {
-				if (e && e.route) uni.reLaunch({
-					url: `/${e.route}`
-				})
-			},
-			// 菜单展开
-			toMenu() {
-				const that = this;
-				that.menu = !that.menu
-			},
-			// 计算高度
-			handleScroll(e) {
+			watchLogin() {
 				const that = this;
 				uni.getStorage({
 					key: 'token',
@@ -191,7 +158,7 @@
 					}
 				}
 			},
-			//立即兑换
+			//立即兑换弹框打开
 			buttonClick(e) {
 				const that = this;
 				that.$refs.popup.open();
@@ -239,9 +206,14 @@
 			// 计算高度
 			handleScroll(e) {
 				const that = this;
-				let scrollTop = e.detail.scrollTop;
-				that.isShow = scrollTop > 500;
-				that.topItem = '';
+				uni.getStorage({
+					key: 'token',
+					success: function(res) {
+						let user = that.$jwt(res.data);
+						if (user) that.$set(that, `user`, user);
+					},
+					fail: function(err) {}
+				});
 			},
 			// 返回顶部
 			backTop() {
@@ -258,7 +230,7 @@
 				if (e && e.route) uni.reLaunch({
 					url: `/${e.route}`
 				})
-			}
+			},
 		}
 	}
 </script>