■登录成功之后添加动态路由
- ●登录的时候会获取到它的菜单配置
- ■动态路由 | Vue Router
<view wx:for="{{list}}">
{{index}}--- {{item.name}}
</view>
<view wx:for="{{list}}" wx:for-item = "ttt" wx:for-index="num">
{{num}}--- {{ttt.name}}
</view>
<view wx:for="{{list}}">
{{index}}--- {{item.name}}
<button data-name="{{item.name}}" data-index="{{index}}" bind:tap="clickItem">按钮</button>
</view>
clickItem(e){
console.log(e);
console.log(e.currentTarget.dataset.name);
console.log(e.currentTarget.dataset.index);
},