<!-- -->
<div class="menulist">
<!-- -->
<scroll-view scroll-y="true" class="left" >
<block v-for="item in menu" :key="item">
<view class="menuList">
<view class="menu" :class="selected==index?"selected":""" :data-index="index" @click="turnMenu">
{{item.cate_name}}
</view>
</view>
</block>
</scroll-view>
<!-- -->
<scroll-view class="right" scroll-y="true">
<!-- <view class="title">{{menu[selected].cate_name}}</view> -->
<view class="title">{{selected}}</view>
<block v-for="(item,k) in menu" :key="k">
<navigator url="/pages/shoppingdetail/main">
<view class="food">
</view>
</navigator>
</block>
</scroll-view>
this is the data format returned by the background. Ask the great god for advice.