|
@@ -2,13 +2,11 @@
|
|
<mobile-frame>
|
|
<mobile-frame>
|
|
<view class="main">
|
|
<view class="main">
|
|
<view class="onemain">
|
|
<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="list-scroll-view" id="top">
|
|
<view class="one">
|
|
<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 class="image" :src="item.url" mode="aspectFit">
|
|
</image>
|
|
</image>
|
|
</swiper-item>
|
|
</swiper-item>
|
|
@@ -55,8 +53,8 @@
|
|
<text @click="toMenu" class="iconfont icon-gengduo"></text>
|
|
<text @click="toMenu" class="iconfont icon-gengduo"></text>
|
|
</view>
|
|
</view>
|
|
<view class="menu_1" v-if="menu">
|
|
<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 class="name">{{item.name}}</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -83,7 +81,6 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
export default {
|
|
export default {
|
|
- components: {},
|
|
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
user: {},
|
|
user: {},
|
|
@@ -134,13 +131,42 @@
|
|
},
|
|
},
|
|
onShow: async function() {
|
|
onShow: async function() {
|
|
const that = this;
|
|
const that = this;
|
|
|
|
+ await that.searchConfig();
|
|
// 监听用户是否登录
|
|
// 监听用户是否登录
|
|
await that.watchLogin();
|
|
await that.watchLogin();
|
|
await that.search();
|
|
await that.search();
|
|
},
|
|
},
|
|
methods: {
|
|
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;
|
|
const that = this;
|
|
uni.getStorage({
|
|
uni.getStorage({
|
|
key: 'token',
|
|
key: 'token',
|