guhongwei 2 lat temu
rodzic
commit
881e4b4ff4

+ 25 - 12
pages/index/index.js

@@ -7,19 +7,32 @@ Page({
         const { route } = e.currentTarget.dataset;
         if (route) wx.navigateTo({ url: `/pages/${route}` });
     },
-    // 重置
-    async toMoney() {
+    async toRefund() {
         let obj = {
-            openid: 'oH0y05UqPfQYt7eBWGMzhkfDwMMA',
-            money: 0.1,
-            school_id: '6355f251cb0f85380e83520b',
+            lesson_id: '63563bbd8018a39220eca774',
             student_id: '635629fecb0f85380e8354e5'
         }
-        let res = await app.$post(`/payOrder/toCharge`, obj);
+        let res = await app.$post(`/lessonStudent/toRefund`, obj);
         if (res.errcode == '0') {
+            wx.showToast({
+                title: '退课成功',
+                icon: 'none'
+            })
+        } else {
+            wx.showToast({
+                title: res.errmsg,
+                icon: 'none'
+            })
+        }
+    },
+    async toPay() {
+        let obj = {
+            id: '6357ad3bb78abf276d3ae74e'
+        }
+        let res = await app.$post(`/lessonStudent/toRePay`, obj);
+        if (res?.data?.wxSign) {
             // 调取支付窗口
             let wxSign = res.data.wxSign;
-            console.log(wxSign);
             wx.requestPayment({
                 timeStamp: wxSign.timestamp,
                 nonceStr: wxSign.nonceStr,
@@ -27,15 +40,14 @@ Page({
                 signType: wxSign.signType,
                 paySign: wxSign.paySign,
                 async success(payRes) {
-                    console.log('充值成功');
+                    wx.showToast({ title: '报名成功', icon: 'none' })
                 },
                 async fail(payErr) {
-                    console.log(payErr);
-                    wx.showToast({ title: '充值不成功', icon: 'none' })
+                    wx.showToast({ title: '支付不成功', icon: 'none' })
                 }
             })
         } else {
-            wx.showToast({ title: res.errmsg, icon: 'none' })
+            wx.showToast({ title: '报名成功', icon: 'none' });
         }
     },
     /**
@@ -48,10 +60,11 @@ Page({
         wx.getStorage({
             key: 'user',
             success: async res => {
-                // if (res.data) wx.redirectTo({ url: '/pages/school/index' })
+                if (res.data) wx.redirectTo({ url: '/pages/school/index' })
                 // /pages/school/index
                 // /pagesSchool/common/lessoninfo
                 // /pagesSchool/schAdmin/course/coachlist
+                // /pagesSchool/stuAdmin/money/list
             },
             fail: async res => {
                 wx.login({

+ 2 - 1
pages/index/index.wxml

@@ -7,7 +7,8 @@
                 <!-- <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> -->
-                <button bindtap="toMoney">充值</button>
+                <button bindtap="toRefund">退课</button>
+                <button bindtap="toPay">支付</button>
             </view>
         </view>
     </view>

+ 43 - 1
pagesSchool/common/lessoninfo.js

@@ -3,6 +3,7 @@ const moment = require("../../utils/moment.min")
 Page({
     data: {
         frameStyle: { useTop: true, name: '课程详细信息', leftArrow: true, useBar: false },
+        iconUrl: app.globalData.icon,
         id: '',
         tabs: {
             active: 'a',
@@ -16,6 +17,12 @@ Page({
         form: {},
         // 教练信息
         coachList: [],
+        // 学员信息
+        studentList: [],
+        total: 0,
+        skip: 0,
+        limit: 6,
+        page: 0,
         // 字典表
         //状态
         statusList: [],
@@ -39,7 +46,6 @@ Page({
             success: async res => {
                 let user = res.data;
                 if (user && user.type == '3') {
-                    let time = moment().format('YYYY-MM-DD HH:mm:ss');
                     let obj = { openid: user.openid, money: item.money, school_id: item.school_id, student_id: user.info._id, lesson_id: id };
                     // 创建报名
                     await that.createLesson(obj);
@@ -106,6 +112,8 @@ Page({
             await that.searchInfo();
             // 查询教练
             await that.searchCoach();
+            // 查询学员信息
+            await that.searchStudent()
         }
     },
     async searchInfo() {
@@ -134,6 +142,40 @@ Page({
             wx.showToast({ title: res.errmsg, icon: 'none' })
         }
     },
+    async searchStudent() {
+        const that = this;
+        let id = that.data.id;
+        let info = { skip: that.data.skip, limit: that.data.limit, lesson_id: id }
+        let res = await app.$get(`/lessonStudent`, { ...info });
+        if (res.errcode == '0') {
+            let list = [...that.data.studentList, ...res.data];
+            console.log(list);
+            that.setData({ studentList: list })
+            that.setData({ total: res.total })
+        } else {
+            wx.showToast({ title: res.errmsg, icon: 'none' })
+        }
+    },
+    // 清空列表
+    clearPage() {
+        const that = this;
+        that.setData({ list: [], skip: 0, limit: 6, page: 0 })
+    },
+    // 分页
+    toPage: function () {
+        const that = this;
+        let list = that.data.studentList;
+        let limit = that.data.limit;
+        if (that.data.total > list.length) {
+            wx.showLoading({ title: '加载中', mask: true })
+            let page = that.data.page + 1;
+            that.setData({ page: page })
+            let skip = page * limit;
+            that.setData({ skip: skip })
+            that.searchStudent();
+            wx.hideLoading()
+        } else { wx.showToast({ title: '没有更多数据了', icon: 'none', duration: 2000 }) }
+    },
     searchOther: async function () {
         const that = this;
         let arr;

+ 88 - 0
pagesSchool/common/lessoninfo.less

@@ -47,11 +47,99 @@
         .b_1 {
             margin: 0 0 2vw 0;
             padding: 0 2vw;
+
+            .list {
+                display: flex;
+                padding: 2vw;
+                margin: 0 0 2vw 0;
+                border: 1px dashed #858585;
+                border-radius: 5px;
+
+                .list_1 {
+                    width: 20vw;
+                    height: 20vw;
+
+                    .image {
+                        width: 100%;
+                        height: 100%;
+                        border-radius: 90px;
+                    }
+                }
+
+                .list_2 {
+                    width: 70vw;
+                    padding: 0 0 0 2vw;
+
+                    .name {
+                        font-size: 16px;
+                        font-weight: bold;
+                        margin: 0 0 2vw 0;
+                    }
+
+                    .other_1 {
+                        font-size: 14px;
+                        color: #858585;
+                        margin: 0 0 1vw 0;
+
+                        text:last-child {
+                            color: #000000;
+                        }
+                    }
+                }
+            }
+
+            .list:last-child {
+                margin: 0;
+            }
         }
 
         .c_1 {
             margin: 0 0 2vw 0;
             padding: 0 2vw;
+
+            .list {
+                display: flex;
+                padding: 2vw;
+                margin: 0 0 2vw 0;
+                border: 1px dashed #858585;
+                border-radius: 5px;
+
+                .list_1 {
+                    width: 20vw;
+                    height: 20vw;
+
+                    .image {
+                        width: 100%;
+                        height: 100%;
+                        border-radius: 90px;
+                    }
+                }
+
+                .list_2 {
+                    width: 70vw;
+                    padding: 0 0 0 2vw;
+
+                    .name {
+                        font-size: 16px;
+                        font-weight: bold;
+                        margin: 0 0 2vw 0;
+                    }
+
+                    .other_1 {
+                        font-size: 14px;
+                        color: #858585;
+                        margin: 0 0 1vw 0;
+
+                        text:last-child {
+                            color: #000000;
+                        }
+                    }
+                }
+            }
+
+            .list:last-child {
+                margin: 0;
+            }
         }
     }
 }

+ 27 - 7
pagesSchool/common/lessoninfo.wxml

@@ -72,9 +72,6 @@
                                     <text>{{form.brief||'暂无'}}</text>
                                 </view>
                             </view>
-                            <!-- <view class="btn">
-                                <button type="primary" size="mini" bindtap="toSign" data-item="{{form}}" wx:if="{{form.status=='1'}}">报名课程</button>
-                            </view> -->
                         </view>
                     </view>
                 </scroll-view>
@@ -85,10 +82,18 @@
                         <view class="b_1">
                             <view class="list" wx:for="{{coachList}}" wx:key="index">
                                 <view class="list_1">
-                                    <image></image>
+                                    <image class="image" src="{{item.coach_id_icon.length>0?item.coach_id_icon[0].url:iconUrl}}"></image>
                                 </view>
                                 <view class="list_2">
-                                    2
+                                    <view class="name">{{item.coach_id_name}}</view>
+                                    <view class="other_1">
+                                        <text>联系电话:</text>
+                                        <text>{{item.coach_id_phone||'暂无'}}</text>
+                                    </view>
+                                    <view class="other_1">
+                                        <text>所属学校:</text>
+                                        <text>{{item.school_id_name}}</text>
+                                    </view>
                                 </view>
                             </view>
                         </view>
@@ -96,10 +101,25 @@
                 </scroll-view>
             </view>
             <view wx:elif="{{tabs.active=='c'}}" class="a c">
-                <scroll-view scroll-y="true" class="scroll-view">
+                <scroll-view scroll-y="true" class="scroll-view" bindscrolltolower="toPage">
                     <view class="list-scroll-view">
                         <view class="c_1">
-                            3
+                            <view class="list" wx:for="{{studentList}}" wx:key="index">
+                                <view class="list_1">
+                                    <image class="image" src="{{item.student_id_icon.length>0?item.student_id_icon[0].url:iconUrl}}"></image>
+                                </view>
+                                <view class="list_2">
+                                    <view class="name">{{item.student_id_name}}</view>
+                                    <view class="other_1">
+                                        <text>联系电话:</text>
+                                        <text>{{item.student_id_phone||'暂无'}}</text>
+                                    </view>
+                                    <view class="other_1">
+                                        <text>是否签到:</text>
+                                        <text>{{item.is_sign=='0'?'未签到':'已签到'}}</text>
+                                    </view>
+                                </view>
+                            </view>
                         </view>
                     </view>
                 </scroll-view>

+ 72 - 0
pagesSchool/common/lessoninfo.wxss

@@ -38,10 +38,82 @@
   margin: 0 0 2vw 0;
   padding: 0 2vw;
 }
+.main .two .b_1 .list {
+  display: flex;
+  padding: 2vw;
+  margin: 0 0 2vw 0;
+  border: 1px dashed #858585;
+  border-radius: 5px;
+}
+.main .two .b_1 .list .list_1 {
+  width: 20vw;
+  height: 20vw;
+}
+.main .two .b_1 .list .list_1 .image {
+  width: 100%;
+  height: 100%;
+  border-radius: 90px;
+}
+.main .two .b_1 .list .list_2 {
+  width: 70vw;
+  padding: 0 0 0 2vw;
+}
+.main .two .b_1 .list .list_2 .name {
+  font-size: 16px;
+  font-weight: bold;
+  margin: 0 0 2vw 0;
+}
+.main .two .b_1 .list .list_2 .other_1 {
+  font-size: 14px;
+  color: #858585;
+  margin: 0 0 1vw 0;
+}
+.main .two .b_1 .list .list_2 .other_1 text:last-child {
+  color: #000000;
+}
+.main .two .b_1 .list:last-child {
+  margin: 0;
+}
 .main .two .c_1 {
   margin: 0 0 2vw 0;
   padding: 0 2vw;
 }
+.main .two .c_1 .list {
+  display: flex;
+  padding: 2vw;
+  margin: 0 0 2vw 0;
+  border: 1px dashed #858585;
+  border-radius: 5px;
+}
+.main .two .c_1 .list .list_1 {
+  width: 20vw;
+  height: 20vw;
+}
+.main .two .c_1 .list .list_1 .image {
+  width: 100%;
+  height: 100%;
+  border-radius: 90px;
+}
+.main .two .c_1 .list .list_2 {
+  width: 70vw;
+  padding: 0 0 0 2vw;
+}
+.main .two .c_1 .list .list_2 .name {
+  font-size: 16px;
+  font-weight: bold;
+  margin: 0 0 2vw 0;
+}
+.main .two .c_1 .list .list_2 .other_1 {
+  font-size: 14px;
+  color: #858585;
+  margin: 0 0 1vw 0;
+}
+.main .two .c_1 .list .list_2 .other_1 text:last-child {
+  color: #000000;
+}
+.main .two .c_1 .list:last-child {
+  margin: 0;
+}
 .scroll-view {
   position: absolute;
   top: 0;

+ 36 - 0
pagesSchool/schAdmin/course/coachlist.js

@@ -44,12 +44,47 @@ Page({
         const that = this;
         that.setData({ list: [], skip: 0, limit: 6, page: 0 })
     },
+    // 信息维护
+    async toEdit(e) {
+        const that = this;
+        let { item } = e.currentTarget.dataset;
+        that.clearPage();
+        let res = await app.$get(`/lessonCoach/${item._id}`);
+        if (res.errcode == '0') {
+            that.setData({ form: res.data });
+            that.setData({ dialog: { title: '添加教练', show: true, type: '1' } })
+        } else {
+            wx.showToast({ title: res.errmsg, icon: 'none' })
+        }
+    },
+    // 删除信息
+    async toDel(e) {
+        const that = this;
+        const { item } = e.currentTarget.dataset;
+        wx.showModal({
+            title: '提示',
+            content: '是否确认删除该条数据?',
+            async success(res) {
+                if (res.confirm) {
+                    const arr = await app.$delete(`/lessonCoach/${item.id}`);
+                    if (arr.errcode == '0') {
+                        wx.showToast({ title: `删除信息成功`, icon: 'success', duration: 2000 })
+                        that.clearPage();
+                        that.watchLogin()
+                    } else {
+                        wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 })
+                    }
+                }
+            }
+        })
+    },
     // 添加
     toAdd() {
         const that = this;
         that.clearPage();
         that.setData({ dialog: { title: '添加教练', show: true, type: '1' } })
     },
+
     // 选择教练
     coachChange(e) {
         const that = this;
@@ -81,6 +116,7 @@ Page({
     // 关闭弹框
     toClose: function () {
         const that = this;
+        that.setData({ form: {} })
         that.setData({ dialog: { title: '添加教练', show: false, type: '1' } })
         that.search()
     },

+ 30 - 0
pagesSchool/schAdmin/course/coachlist.less

@@ -32,6 +32,36 @@
         position: relative;
         flex-grow: 1;
 
+        .list {
+            margin: 0 2vw 2vw 2vw;
+            padding: 2vw;
+            background-color: #fff;
+            border-radius: 5px;
+
+            .name {
+                text-align: center;
+                font-size: 16px;
+                font-weight: bold;
+                margin: 0 0 1vw 0;
+            }
+
+            .money {
+                color: #ff0000;
+                font-size: 14px;
+                font-weight: bold;
+                text-align: center;
+                margin: 0 0 2vw 0;
+            }
+
+            .btn {
+                text-align: center;
+
+                button {
+                    margin: 0 2vw;
+                    font-size: 14px;
+                }
+            }
+        }
 
         .list:last-child {
             margin: 0 2vw 0 2vw;

+ 2 - 6
pagesSchool/schAdmin/course/coachlist.wxml

@@ -17,14 +17,10 @@
                         </view>
                         <view class="money">
                             <text>课时费:</text>
-                            <text>{{item.money}}</text>
-                        </view>
-                        <view class="other_1">
-                            <text>课程:</text>
-                            <text>{{item.lesson_id_title}}</text>
+                            <text>¥{{item.money}}</text>
                         </view>
                         <view class="btn">
-                            <button type="primary" size="mini" bindtap="toEdit" data-item="{{item}}">维护信息</button>
+                            <button type="primary" size="mini" bindtap="toEdit" data-item="{{item}}">信息维护</button>
                             <button type="warn" size="mini" bindtap="toDel" data-item="{{item}}">删除信息</button>
                         </view>
                     </view>

+ 26 - 0
pagesSchool/schAdmin/course/coachlist.wxss

@@ -25,6 +25,32 @@
   position: relative;
   flex-grow: 1;
 }
+.main .two .list {
+  margin: 0 2vw 2vw 2vw;
+  padding: 2vw;
+  background-color: #fff;
+  border-radius: 5px;
+}
+.main .two .list .name {
+  text-align: center;
+  font-size: 16px;
+  font-weight: bold;
+  margin: 0 0 1vw 0;
+}
+.main .two .list .money {
+  color: #ff0000;
+  font-size: 14px;
+  font-weight: bold;
+  text-align: center;
+  margin: 0 0 2vw 0;
+}
+.main .two .list .btn {
+  text-align: center;
+}
+.main .two .list .btn button {
+  margin: 0 2vw;
+  font-size: 14px;
+}
 .main .two .list:last-child {
   margin: 0 2vw 0 2vw;
 }

+ 7 - 0
pagesSchool/schAdmin/course/list.js

@@ -75,6 +75,13 @@ Page({
         that.clearPage();
         wx.navigateTo({ url: `/pagesSchool/schAdmin/course/coachlist?id=${item.id}` })
     },
+    // 详细信息
+    toView(e) {
+        const that = this;
+        let { item } = e.currentTarget.dataset;
+        that.clearPage();
+        wx.navigateTo({ url: `/pagesSchool/common/lessoninfo?id=${item.id}` })
+    },
     /**
      * 生命周期函数--监听页面加载
      */

+ 1 - 1
pagesSchool/schAdmin/course/list.less

@@ -71,7 +71,7 @@
                 text-align: center;
 
                 button {
-                    margin: 0 2vw;
+                    margin: 0 2vw 2vw 2vw;
                     font-size: 14px;
                 }
             }

+ 1 - 0
pagesSchool/schAdmin/course/list.wxml

@@ -30,6 +30,7 @@
                         <view class="btn">
                             <button type="primary" size="mini" bindtap="toEdit" data-item="{{item}}">信息维护</button>
                             <button type="primary" size="mini" bindtap="toCoach" data-item="{{item}}">教练管理</button>
+                            <button type="primary" size="mini" bindtap="toView" data-item="{{item}}">详细信息</button>
                             <button type="warn" size="mini" bindtap="toDel" data-item="{{item}}">删除信息</button>
                         </view>
                     </view>

+ 1 - 1
pagesSchool/schAdmin/course/list.wxss

@@ -59,7 +59,7 @@
   text-align: center;
 }
 .main .two .list .btn button {
-  margin: 0 2vw;
+  margin: 0 2vw 2vw 2vw;
   font-size: 14px;
 }
 .main .two .list:last-child {

+ 122 - 4
pagesSchool/stuAdmin/money/list.js

@@ -1,15 +1,92 @@
 const app = getApp();
+import WxValidate from '../../../utils/wxValidate'
+
 Page({
     /**
      * 页面的初始数据
      */
     data: {
         frameStyle: { useTop: true, name: '账号余额', leftArrow: true, useBar: false },
+        user: {},
+        list: [],
+        total: 0,
+        skip: 0,
+        limit: 6,
+        page: 0,
+        // dialog弹框
+        dialog: { title: '充值', show: false, type: '1' },
+        form: {},
+    },
+    initValidate() {
+        const rules = { money: { required: true }, }
+        // 验证字段的提示信息,若不传则调用默认的信息
+        const messages = { money: { required: '请输入充值金额', } };
+        this.WxValidate = new WxValidate(rules, messages)
     },
     // 跳转菜单
     back(e) {
         wx.navigateBack({ delta: 1 })
     },
+    // 清空列表
+    clearPage() {
+        const that = this;
+        that.setData({ list: [], skip: 0, limit: 6, page: 0 })
+    },
+    // 充值
+    toMoney(e) {
+        const that = this;
+        let { item } = e.currentTarget.dataset;
+        let user = that.data.user;
+        that.clearPage();
+        that.setData({ form: { openid: user.openid, student_id: item.student_id, school_id: item.school_id } })
+        that.setData({ dialog: { title: '充值', show: true, type: '1' } })
+    },
+    // 提交保存
+    onSubmit: async function (e) {
+        const that = this;
+        const params = e.detail.value;
+        if (!this.WxValidate.checkForm(params)) {
+            const error = this.WxValidate.errorList[0];
+            wx.showToast({ title: `${error.msg}`, icon: 'error', duration: 2000 })
+            return false
+        } else {
+            params.money = parseFloat(params.money);
+            that.createMoney(params)
+        }
+    },
+    // 充值
+    async createMoney(e) {
+        const that = this;
+        let res = await app.$post(`/payOrder/toCharge`, e);
+        if (res.errcode == '0') {
+            // 调取支付窗口
+            let wxSign = res.data.wxSign;
+            wx.requestPayment({
+                timeStamp: wxSign.timestamp,
+                nonceStr: wxSign.nonceStr,
+                package: `prepay_id=${wxSign.prepay_id}`,
+                signType: wxSign.signType,
+                paySign: wxSign.paySign,
+                async success(payRes) {
+                    wx.showToast({ title: '充值成功', icon: 'none' })
+                    that.toClose();
+                },
+                async fail(payErr) {
+                    console.log(payErr);
+                    wx.showToast({ title: '充值不成功', icon: 'none' })
+                }
+            })
+        } else {
+            wx.showToast({ title: res.errmsg, icon: 'none' })
+        }
+    },
+    // 关闭弹框
+    toClose: function () {
+        const that = this;
+        that.setData({ form: {} })
+        that.setData({ dialog: { title: '充值', show: false, type: '1' } })
+        that.search()
+    },
 
     /**
      * 生命周期函数--监听页面加载
@@ -27,12 +104,53 @@ Page({
     /**
      * 生命周期函数--监听页面显示
      */
-    onShow: function () {
+    onShow: async function () {
         const that = this;
-
+        //验证规则函数
+        that.initValidate();
+        // 监听用户是否登录
+        await that.watchLogin();
+    },
+    watchLogin() {
+        const that = this;
+        wx.getStorage({
+            key: 'user',
+            success: async res => {
+                that.setData({ user: res.data });
+                // 查询列表
+                await that.search()
+            },
+            fail: async res => {
+                wx.redirectTo({ url: '/pages/index/index' })
+            }
+        })
+    },
+    async search() {
+        const that = this;
+        let user = that.data.user;
+        let info = { skip: that.data.skip, limit: that.data.limit, student_id: user.info.id }
+        let res = await app.$get(`/rss`, { ...info });
+        if (res.errcode == '0') {
+            let list = [...that.data.list, ...res.data];
+            that.setData({ list })
+            that.setData({ total: res.total })
+        } else { wx.showToast({ title: res.errmsg, icon: 'none' }) }
+    },
+    // 分页
+    toPage: function () {
+        const that = this;
+        let list = that.data.list;
+        let limit = that.data.limit;
+        if (that.data.total > list.length) {
+            wx.showLoading({ title: '加载中', mask: true })
+            let page = that.data.page + 1;
+            that.setData({ page: page })
+            let skip = page * limit;
+            that.setData({ skip: skip })
+            that.search();
+            wx.hideLoading()
+        } else { wx.showToast({ title: '没有更多数据了', icon: 'none', duration: 2000 }) }
     },
-
-
     /**
      * 生命周期函数--监听页面隐藏
      */

+ 2 - 1
pagesSchool/stuAdmin/money/list.json

@@ -1,6 +1,7 @@
 {
     "component": true,
     "usingComponents": {
-        "mobile-main": "/commpents/mobile-frame/index"
+        "mobile-main": "/commpents/mobile-frame/index",
+        "dialog": "/commpents/dialog/index"
     }
 }

+ 120 - 1
pagesSchool/stuAdmin/money/list.less

@@ -1 +1,120 @@
-@import (css) "/app.wxss";
+@import (css) "/app.wxss";
+
+.main {
+    height: 91vh;
+
+    .one {
+        padding: 2vw;
+        border-bottom: 1px solid #858585;
+        margin: 0 0 2vw 0;
+
+        input {
+            padding: 2vw;
+            font-size: 12px;
+            border-radius: 5px;
+            background-color: #fff;
+        }
+    }
+
+    .two {
+        position: relative;
+        flex-grow: 1;
+
+        .list {
+            background-color: #fff;
+            margin: 0 2vw 2vw 2vw;
+            padding: 2vw;
+            border-radius: 5px;
+
+            .list_1 {
+                display: flex;
+                margin: 0 0 1vw 0;
+
+                .list_1_1 {
+                    width: 20vw;
+                    height: 20vw;
+                    line-height: 20vw;
+                    text-align: center;
+                    background-color: #ff0000;
+                    border-radius: 90px;
+
+                    text {
+                        color: #fff;
+                        font-weight: bold;
+                    }
+                }
+
+                .list_1_2 {
+                    width: 70vw;
+                    padding: 0 0 0 2vw;
+
+                    .other_1 {
+                        font-size: 15px;
+                        color: #858585;
+                        margin: 3vw 0;
+
+                        text:last-child {
+                            color: #000;
+                        }
+                    }
+                }
+            }
+
+            .btn {
+                text-align: center;
+
+                button {
+                    margin: 0 2vw;
+                    font-size: 14px;
+                }
+            }
+        }
+    }
+}
+
+.scroll-view {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+
+    .list-scroll-view {
+        display: flex;
+        flex-direction: column;
+    }
+}
+
+.dialog {
+    .dialog_1 {
+        .content {
+            display: flex;
+            flex-direction: row;
+            border-bottom: 1px dashed var(--f1Color);
+            padding: 2vw 0;
+            margin: 0 2vw 2vw 2vw;
+
+            .value {
+                flex-grow: 1;
+                color: var(--blackColor);
+
+                textarea {
+                    width: 100%;
+                    height: 120px;
+                }
+
+            }
+        }
+
+        .btn {
+            text-align: center;
+            margin: 5vw 0 0 0;
+
+            button {
+                width: 40vw;
+                margin: 0 2vw;
+                padding: 1vw 0;
+            }
+        }
+    }
+}

+ 65 - 2
pagesSchool/stuAdmin/money/list.wxml

@@ -1,5 +1,68 @@
 <mobile-main frameStyle="{{frameStyle}}" bind:back="back">
     <view slot="info" class="container main">
-        <view>账号余额</view>
+        <view class="one">
+            <input type="text" value="{{search.name}}" bindconfirm="toInput" placeholder="请输入关键词" />
+        </view>
+        <view class="two">
+            <scroll-view scroll-y="true" class="scroll-view" bindscrolltolower="toPage">
+                <view class="list-scroll-view">
+                    <view class="list" wx:for="{{list}}" wx:key="index">
+                        <view class="list_1">
+                            <view class="list_1_1">
+                                <text>¥{{item.money}}</text>
+                            </view>
+                            <view class="list_1_2">
+                                <view class="other_1">
+                                    <text>学校名称:</text>
+                                    <text>{{item.school_id_name}}</text>
+                                </view>
+                                <view class="other_1">
+                                    <text>联系电话:</text>
+                                    <text>{{item.school_id_phone||'暂无'}}</text>
+                                </view>
+                            </view>
+                        </view>
+                        <view class="btn">
+                            <button type="default" size="mini" bindtap="toMoney" data-item="{{item}}">充值</button>
+                        </view>
+                    </view>
+                </view>
+            </scroll-view>
+        </view>
     </view>
-</mobile-main>
+</mobile-main>
+<dialog dialog="{{dialog}}" bind:toClose="toClose">
+    <view slot="info" class="dialog">
+        <view class="dialog_1" wx:if="{{dialog.type=='1'}}">
+            <form catchsubmit="onSubmit">
+                <view class="content" style="display: none;">
+                    <view class="label">openid:</view>
+                    <view class="value">
+                        <input name="openid" type="text" value="{{form.openid}}" disabled />
+                    </view>
+                </view>
+                <view class="content" style="display: none;">
+                    <view class="label">student_id:</view>
+                    <view class="value">
+                        <input name="student_id" type="text" value="{{form.student_id}}" disabled />
+                    </view>
+                </view>
+                <view class="content" style="display: none;">
+                    <view class="label">school_id:</view>
+                    <view class="value">
+                        <input name="school_id" type="text" value="{{form.school_id}}" disabled />
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">充值金额:</view>
+                    <view class="value">
+                        <input name="money" type="number" value="{{form.money}}" placeholder="请输入充值金额" />
+                    </view>
+                </view>
+                <view class="btn">
+                    <button type="primary" size="mini" formType="submit">提交</button>
+                </view>
+            </form>
+        </view>
+    </view>
+</dialog>

+ 95 - 1
pagesSchool/stuAdmin/money/list.wxss

@@ -1 +1,95 @@
-@import "/app.wxss";
+@import "/app.wxss";
+.main {
+  height: 91vh;
+}
+.main .one {
+  padding: 2vw;
+  border-bottom: 1px solid #858585;
+  margin: 0 0 2vw 0;
+}
+.main .one input {
+  padding: 2vw;
+  font-size: 12px;
+  border-radius: 5px;
+  background-color: #fff;
+}
+.main .two {
+  position: relative;
+  flex-grow: 1;
+}
+.main .two .list {
+  background-color: #fff;
+  margin: 0 2vw 2vw 2vw;
+  padding: 2vw;
+  border-radius: 5px;
+}
+.main .two .list .list_1 {
+  display: flex;
+  margin: 0 0 1vw 0;
+}
+.main .two .list .list_1 .list_1_1 {
+  width: 20vw;
+  height: 20vw;
+  line-height: 20vw;
+  text-align: center;
+  background-color: #ff0000;
+  border-radius: 90px;
+}
+.main .two .list .list_1 .list_1_1 text {
+  color: #fff;
+  font-weight: bold;
+}
+.main .two .list .list_1 .list_1_2 {
+  width: 70vw;
+  padding: 0 0 0 2vw;
+}
+.main .two .list .list_1 .list_1_2 .other_1 {
+  font-size: 15px;
+  color: #858585;
+  margin: 3vw 0;
+}
+.main .two .list .list_1 .list_1_2 .other_1 text:last-child {
+  color: #000;
+}
+.main .two .list .btn {
+  text-align: center;
+}
+.main .two .list .btn button {
+  margin: 0 2vw;
+  font-size: 14px;
+}
+.scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.scroll-view .list-scroll-view {
+  display: flex;
+  flex-direction: column;
+}
+.dialog .dialog_1 .content {
+  display: flex;
+  flex-direction: row;
+  border-bottom: 1px dashed var(--f1Color);
+  padding: 2vw 0;
+  margin: 0 2vw 2vw 2vw;
+}
+.dialog .dialog_1 .content .value {
+  flex-grow: 1;
+  color: var(--blackColor);
+}
+.dialog .dialog_1 .content .value textarea {
+  width: 100%;
+  height: 120px;
+}
+.dialog .dialog_1 .btn {
+  text-align: center;
+  margin: 5vw 0 0 0;
+}
+.dialog .dialog_1 .btn button {
+  width: 40vw;
+  margin: 0 2vw;
+  padding: 1vw 0;
+}