|
@@ -53,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>
|
|
@@ -81,30 +81,9 @@
|
|
|
|
|
|
<script>
|
|
|
export default {
|
|
|
- components: {},
|
|
|
data() {
|
|
|
return {
|
|
|
- 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)',
|
|
@@ -134,11 +113,29 @@
|
|
|
},
|
|
|
onShow: async function() {
|
|
|
const that = this;
|
|
|
+ await that.searchConfig();
|
|
|
// 监听用户是否登录
|
|
|
await that.watchLogin();
|
|
|
await that.search();
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 查询基本信息
|
|
|
+ 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({
|