guhongwei 2 anos atrás
pai
commit
61efb0a968

+ 3 - 5
app.json

@@ -10,7 +10,6 @@
         "pages/smy/index",
         "pages/club/index",
         "pages/match/index",
-
         "pages/superAdmin/suser/list",
         "pages/superAdmin/suser/add",
         "pages/superAdmin/suser/bind",
@@ -22,7 +21,6 @@
         "pages/superAdmin/sstudent/add",
         "pages/superAdmin/system/dictionary",
         "pages/superAdmin/system/adddictionary",
-
         "pages/schAdmin/school/info",
         "pages/schAdmin/coach/list",
         "pages/schAdmin/coach/add",
@@ -33,12 +31,13 @@
         "pages/schAdmin/studentexam/info",
         "pages/schAdmin/course/list",
         "pages/schAdmin/course/add",
+        "pages/schAdmin/course/coachlist",
+        "pages/schAdmin/course/coachadd",
         "pages/schAdmin/coursetryexam/list",
         "pages/schAdmin/courseexam/list",
         "pages/schAdmin/income/list",
         "pages/schAdmin/stustat/list",
         "pages/schAdmin/coachstat/list",
-
         "pages/stuAdmin/archives/list",
         "pages/stuAdmin/school/list",
         "pages/stuAdmin/school/info",
@@ -49,13 +48,12 @@
         "pages/stuAdmin/course/sign",
         "pages/stuAdmin/study/list",
         "pages/stuAdmin/fee/list",
-
         "pages/user/basic",
         "pages/setting/basic",
         "pages/setting/contact",
-
         "pages/test/index",
         "pages/logs/logs"
+
     ],
     "usingComponents": {
         "van-sidebar": "@vant/weapp/sidebar/index",

+ 66 - 0
pages/schAdmin/course/coachadd.js

@@ -0,0 +1,66 @@
+// pages/schAdmin/course/coachadd.js
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad(options) {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload() {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh() {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom() {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage() {
+
+    }
+})

+ 3 - 0
pages/schAdmin/course/coachadd.json

@@ -0,0 +1,3 @@
+{
+    "usingComponents": {}
+}

+ 0 - 0
pages/schAdmin/course/coachadd.less


+ 2 - 0
pages/schAdmin/course/coachadd.wxml

@@ -0,0 +1,2 @@
+<!--pages/schAdmin/course/coachadd.wxml-->
+<text>pages/schAdmin/course/coachadd.wxml</text>

+ 1 - 0
pages/schAdmin/course/coachadd.wxss

@@ -0,0 +1 @@
+/* pages/schAdmin/course/coachadd.wxss */

+ 66 - 0
pages/schAdmin/course/coachlist.js

@@ -0,0 +1,66 @@
+// pages/schAdmin/course/coachlist.js
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad(options) {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload() {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh() {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom() {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage() {
+
+    }
+})

+ 3 - 0
pages/schAdmin/course/coachlist.json

@@ -0,0 +1,3 @@
+{
+    "usingComponents": {}
+}

+ 0 - 0
pages/schAdmin/course/coachlist.less


+ 2 - 0
pages/schAdmin/course/coachlist.wxml

@@ -0,0 +1,2 @@
+<!--pages/schAdmin/course/coachlist.wxml-->
+<text>pages/schAdmin/course/coachlist.wxml</text>

+ 1 - 0
pages/schAdmin/course/coachlist.wxss

@@ -0,0 +1 @@
+/* pages/schAdmin/course/coachlist.wxss */

+ 4 - 6
pages/school/info.js

@@ -12,12 +12,9 @@ Page({
             menu: [
                 { title: '羽校信息', active: '0' },
                 { title: '师资信息', active: '1' },
-                { title: '公开课', active: '2' },
-                { title: '私教课', active: '3' },
+                { title: '课程信息', active: '2' },
             ]
         },
-        // 公开课
-        openList: []
     },
     // 跳转菜单
     back(e) {
@@ -57,8 +54,9 @@ Page({
      * 生命周期函数--监听页面加载
      */
     onLoad: function (options) {
+        console.log(options);
         const that = this;
-        that.setData({ id: options.id || null })
+        that.setData({ id: options.id || '62fc48778f740d555aa5035d' })
         // 监听用户是否登录
         that.watchLogin();
     },
@@ -76,7 +74,7 @@ Page({
                     if (arr.errcode == '0') { that.setData({ form: arr.data }) }
                     else { wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 }) }
                     // 公开课
-                    arr = await app.$get(`/lessonPublic`, { school_id: that.data.id, status: '1' });
+                    arr = await app.$get(`/lesson`, { school_id: that.data.id });
                     if (arr.errcode == '0') { that.setData({ openList: arr.data }) }
                     else { wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 }) }
                 }

+ 33 - 17
pages/school/info.less

@@ -9,29 +9,45 @@
     .two {
         position: relative;
         flex-grow: 1;
-        background-color: #0000ff;
 
         .a {
-            .school {
-                position: fixed;
+            width: 96vw;
+            padding: 2vw;
+
+            .one {
                 width: 96vw;
-                bottom: 8vh;
-                right: 1vw;
-                text-align: right;
-
-                .school_txt {
-                    display: inline-block;
-                    width: 10vw;
-                    padding: 1vw;
-                    text-align: center;
-                    background-color: #53C9F8;
-                    color: var(--mainColor);
-                    font-size: var(--font14Size);
-                    border-radius: 5px;
+
+                swiper {
+                    height: 25vh;
+
+                    .image {
+                        width: 100%;
+                        height: 100%;
+                        border-radius: 10px;
+                    }
                 }
             }
         }
 
         .b {}
     }
-}
+}
+
+// .school {
+//     position: fixed;
+//     width: 96vw;
+//     bottom: 8vh;
+//     right: 1vw;
+//     text-align: right;
+
+//     .school_txt {
+//         display: inline-block;
+//         width: 10vw;
+//         padding: 1vw;
+//         text-align: center;
+//         background-color: #53C9F8;
+//         color: var(--mainColor);
+//         font-size: var(--font14Size);
+//         border-radius: 5px;
+//     }
+// }

+ 23 - 2
pages/school/info.wxml

@@ -5,10 +5,31 @@
         </view>
         <view class="two">
             <view wx:if="{{tabs.active=='0'}}" class="a">
-                {{form.name}}
+                <view class="one">
+                    <swiper autoplay="true" circular="true" interval="3000" duration="1000">
+                        <block wx:for="{{form.img_url}}" wx:key="tag" wx:for-item="tag" wx:for-index="tagindex">
+                            <swiper-item>
+                                <image class="image" src="{{tag.url}}"></image>
+                            </swiper-item>
+                        </block>
+                    </swiper>
+                </view>
+                <view class="two">
+                    <view class="name">{{form.name}}</view>
+                    <view class="other">
+                        <view class="other_1"><text>学校简介:</text><text>{{form.brief||'暂无'}}</text></view>
+                        <view class="other_1"><text>联系方式:</text><text>{{form.phone||'暂无'}}</text></view>
+                        <view class="other_1"><text>训练地址</text><text>{{form.address||'暂无'}}</text></view>
+                        <view class="other_1"><text>教练人数</text><text>{{form.coach_num||'暂无'}}</text></view>
+                        <view class="other_1"><text>学员人数</text><text>{{form.student_num||'暂无'}}</text></view>
+                        <view class="other_1"><text>过往荣誉</text><text>{{form.honor||'暂无'}}</text></view>
+                        <view class="other_1"><text>网址</text><text>{{form.url||'暂无'}}</text></view>
+                    </view>
+                </view>
+                <!-- {{form.name}}
                 <view class="school" wx:if="{{user.type=='3'}}">
                     <text class="school_txt" bindtap="toApply">申请入学</text>
-                </view>
+                </view> -->
             </view>
             <view wx:elif="{{tabs.active=='1'}}" class="b">师资信息</view>
             <view wx:elif="{{tabs.active=='2'}}" class="c">

+ 12 - 15
pages/school/info.wxss

@@ -8,22 +8,19 @@
 .main .two {
   position: relative;
   flex-grow: 1;
-  background-color: #0000ff;
 }
-.main .two .a .school {
-  position: fixed;
+.main .two .a {
   width: 96vw;
-  bottom: 8vh;
-  right: 1vw;
-  text-align: right;
+  padding: 2vw;
 }
-.main .two .a .school .school_txt {
-  display: inline-block;
-  width: 10vw;
-  padding: 1vw;
-  text-align: center;
-  background-color: #53C9F8;
-  color: var(--mainColor);
-  font-size: var(--font14Size);
-  border-radius: 5px;
+.main .two .a .one {
+  width: 96vw;
+}
+.main .two .a .one swiper {
+  height: 25vh;
+}
+.main .two .a .one swiper .image {
+  width: 100%;
+  height: 100%;
+  border-radius: 10px;
 }