zs 2 年之前
父节点
当前提交
1d44ac68ef
共有 1 个文件被更改,包括 36 次插入10 次删除
  1. 36 10
      pagesIntegral/order/detail.vue

+ 36 - 10
pagesIntegral/order/detail.vue

@@ -2,13 +2,11 @@
 	<mobile-frame>
 		<view class="main">
 			<view class="onemain">
-				<scroll-view scroll-y="true" class="scroll-view" scroll-with-animation :scroll-into-view="topItem"
-					@scroll="handleScroll">
+				<scroll-view scroll-y="true" class="scroll-view" scroll-with-animation :scroll-into-view="topItem" @scroll="handleScroll">
 					<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 info.file" :key="index">
+							<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">
 									<image class="image" :src="item.url" mode="aspectFit">
 									</image>
 								</swiper-item>
@@ -55,8 +53,8 @@
 			<text @click="toMenu" class="iconfont icon-gengduo"></text>
 		</view>
 		<view class="menu_1" v-if="menu">
-			<view class="title" v-for="(item,index) in barList" :key="index" @click="toPath(item)">
-				<image class="image" :src="item.normal"></image>
+			<view class="title" v-for="(item,index) in barList" :key="index" @click="toPath(item)" v-if="item.is_use=='0'">
+				<image class="image" :src="item.normal&&item.normal.length>0?item.normal[0].url:''"></image>
 				<view class="name">{{item.name}}</view>
 			</view>
 		</view>
@@ -83,7 +81,6 @@
 
 <script>
 	export default {
-		components: {},
 		data() {
 			return {
 				user: {},
@@ -134,13 +131,42 @@
 		},
 		onShow: async function() {
 			const that = this;
+			await that.searchConfig();
 			// 监听用户是否登录
 			await that.watchLogin();
 			await that.search();
 		},
 		methods: {
-			// 监听用户是否登录
-			watchLogin() {
+			// 查询基本信息
+			searchConfig() {
+				const that = this;
+				uni.getStorage({
+					key: 'config',
+					success: function(res) {
+						let data = res.data;
+						if (data.bottom_menu && data.bottom_menu.list.length > 0) {
+							let list = data.bottom_menu.list.sort((a, b) => {
+								return a.sort - b.sort
+							});
+							that.$set(that, `barList`, list)
+						}
+
+					}
+				})
+			},
+			//主菜单跳转
+			toPath(e) {
+				if (e && e.route) uni.reLaunch({
+					url: `/${e.route}`
+				})
+			},
+			// 菜单展开
+			toMenu() {
+				const that = this;
+				that.menu = !that.menu
+			},
+			// 计算高度
+			handleScroll(e) {
 				const that = this;
 				uni.getStorage({
 					key: 'token',