guhongwei 2 năm trước cách đây
mục cha
commit
9cb907b775

+ 3 - 2
pages/index/index.wxml

@@ -3,9 +3,10 @@
         <view class="one">
         <view class="one">
             <view>系统首页</view>
             <view>系统首页</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="test/index">组件页面</button> -->
+                <!-- <button type="primary" size="mini" bindtap="toCommon" data-route="login/index">去登陆</button> -->
             </view>
             </view>
         </view>
         </view>
     </view>
     </view>

+ 16 - 1
pages/school/info.js

@@ -4,12 +4,27 @@ Page({
         frameStyle: { useTop: true, name: '羽校信息', leftArrow: true, useBar: false },
         frameStyle: { useTop: true, name: '羽校信息', leftArrow: true, useBar: false },
         user: {},
         user: {},
         id: '',
         id: '',
-        form: {}
+        form: {},
+        // 选中
+        tabs: {
+            active: '0',
+            menu: [
+                { title: '账号管理1', active: '0' },
+                { title: '信息管理2', active: '1' },
+                { title: '哈哈管理3', active: '2' },
+            ]
+        }
     },
     },
     // 跳转菜单
     // 跳转菜单
     back(e) {
     back(e) {
         wx.navigateBack({ delta: 1 })
         wx.navigateBack({ delta: 1 })
     },
     },
+    // 选项卡选择
+    tabsChange: function (e) {
+        const that = this;
+        const { item } = e.currentTarget.dataset;
+        that.setData({ 'tabs.active': item.active })
+    },
 
 
 
 
     /**
     /**

+ 23 - 3
pages/school/info.less

@@ -1,7 +1,27 @@
 .main {
 .main {
-
     background-color: var(--mainColor);
     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;
+    }
+}

+ 10 - 1
pages/school/info.wxml

@@ -1,5 +1,14 @@
 <mobile-main frameStyle="{{frameStyle}}" bind:back="back">
 <mobile-main frameStyle="{{frameStyle}}" bind:back="back">
     <view slot="info" class="container main">
     <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>
+        <view class="two">
+            <view wx:if="{{tabs.active=='0'}}">第一</view>
+            <view wx:elif="{{tabs.active=='1'}}">第二</view>
+            <view wx:elif="{{tabs.active=='2'}}">第三</view>
+        </view>
     </view>
     </view>
 </mobile-main>
 </mobile-main>

+ 19 - 0
pages/school/info.wxss

@@ -1,3 +1,22 @@
 .main {
 .main {
   background-color: var(--mainColor);
   background-color: var(--mainColor);
 }
 }
+.main .one {
+  background-color: #ff0000;
+  display: flex;
+  flex-direction: row;
+  justify-content: space-around;
+  width: 100vw;
+}
+.main .one .list {
+  width: 20vw;
+  text-align: center;
+  border-bottom: 1px solid #00ffff;
+}
+.main .one .list .list_1 {
+  padding: 3vw 0;
+  font-size: 16px;
+}
+.main .two {
+  background-color: #0000ff;
+}