@@ -3,9 +3,10 @@
<view class="one">
<view>系统首页</view>
<view>
- <button type="primary" size="mini" bindtap="toCommon" data-route="register/index">去注册</button>
- <button type="primary" size="mini" bindtap="toCommon" data-route="school/index">系统首页</button>
+ <!-- <button type="primary" size="mini" bindtap="toCommon" data-route="register/index">去注册</button> -->
+ <!-- <button type="primary" size="mini" bindtap="toCommon" data-route="school/index">系统首页</button> -->
<!-- <button type="primary" size="mini" bindtap="toCommon" data-route="test/index">组件页面</button> -->
+ <!-- <button type="primary" size="mini" bindtap="toCommon" data-route="login/index">去登陆</button> -->
</view>
@@ -4,12 +4,27 @@ Page({
frameStyle: { useTop: true, name: '羽校信息', leftArrow: true, useBar: false },
user: {},
id: '',
- form: {}
+ form: {},
+ // 选中
+ tabs: {
+ active: '0',
+ menu: [
+ { title: '账号管理1', active: '0' },
+ { title: '信息管理2', active: '1' },
+ { title: '哈哈管理3', active: '2' },
+ ]
+ }
},
// 跳转菜单
back(e) {
wx.navigateBack({ delta: 1 })
+ // 选项卡选择
+ tabsChange: function (e) {
+ const that = this;
+ const { item } = e.currentTarget.dataset;
+ that.setData({ 'tabs.active': item.active })
+ },
/**
@@ -1,7 +1,27 @@
.main {
-
background-color: var(--mainColor);
-}
+ .one {
+ background-color: #ff0000;
+ display: flex;
+ flex-direction: row;
+ justify-content: space-around;
+ width: 100vw;
+
+ .list {
+ width: 20vw;
+ text-align: center;
+ border-bottom: 1px solid #00ffff;
+ .list_1 {
+ padding: 3vw 0;
+ font-size: 16px;
+ .two {
+ background-color: #0000ff;
+}
@@ -1,5 +1,14 @@
<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
<view slot="info" class="container main">
- {{form.name}}
+ <view class="one">
+ <view class="list" wx:for="{{tabs.menu}}" wx:key="item" wx:for-item="item" wx:for-index="index" bindtap="tabsChange" data-item="{{item}}">
+ <view class="list_1"><text>{{item.title}}</text></view>
+ </view>
+ <view class="two">
+ <view wx:if="{{tabs.active=='0'}}">第一</view>
+ <view wx:elif="{{tabs.active=='1'}}">第二</view>
+ <view wx:elif="{{tabs.active=='2'}}">第三</view>
</mobile-main>
@@ -1,3 +1,22 @@
}
+.main .one {
+.main .one .list {
+.main .one .list .list_1 {
+.main .two {