Browse Source

添加支付页

lex-xin 5 years ago
parent
commit
a4b93b62f7

File diff suppressed because it is too large
+ 0 - 0
dist/css/app.9cfdfe37.css


+ 1 - 0
dist/css/chunk-16faf17c.0ca42ee1.css

@@ -0,0 +1 @@
+.order[data-v-1e37353d]{background:#fff;min-height:100vh}header[data-v-1e37353d]{height:.4rem;line-height:.4rem;color:#000;font-size:.17rem;background:#fff;-webkit-box-shadow:0 1px 8px 0 rgba(0,0,0,.07);box-shadow:0 1px 8px 0 rgba(0,0,0,.07);text-align:center;margin-bottom:.06rem}h2[data-v-1e37353d]{font-size:.16rem;color:#fff;padding:.1rem 0;text-align:center;background:#14928a}.table .title[data-v-1e37353d]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;text-align:center;border-bottom:1px solid #eaeaea}.table span[data-v-1e37353d]{-webkit-box-flex:1;-ms-flex:1;flex:1;padding:.08rem 0}.table span[data-v-1e37353d]:first-child{width:.3rem;-webkit-box-flex:inherit;-ms-flex:inherit;flex:inherit}.table .content>div[data-v-1e37353d]{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;text-align:center}.table .content>div[data-v-1e37353d]:nth-child(2n+2){background:#eaeaea}

File diff suppressed because it is too large
+ 0 - 0
dist/css/chunk-660d4768.9368ebe8.css


File diff suppressed because it is too large
+ 0 - 0
dist/css/chunk-a106f9c0.aa4f1aea.css


+ 0 - 1
dist/css/chunk-c31fba8e.f6ad5df5.css

@@ -1 +0,0 @@
-.order[data-v-3ad5218c]{padding:.1rem .2rem}header[data-v-3ad5218c]{height:.4rem;line-height:.4rem;color:#000;font-size:.17rem;background:#fff;-webkit-box-shadow:0 1px 8px 0 rgba(0,0,0,.07);box-shadow:0 1px 8px 0 rgba(0,0,0,.07);text-align:center;margin-bottom:.06rem}h2[data-v-3ad5218c]{font-size:.16rem;color:#444}table[data-v-3ad5218c]{width:100%;text-align:center;border-color:#ccc}table tr[data-v-3ad5218c]{display:-webkit-box;display:-ms-flexbox;display:flex}table tr td[data-v-3ad5218c],table tr th[data-v-3ad5218c]{-webkit-box-flex:1;-ms-flex:1;flex:1;text-align:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}table tr td[data-v-3ad5218c]:first-child,table tr th[data-v-3ad5218c]:first-child{-webkit-box-flex:inherit;-ms-flex:inherit;flex:inherit;-ms-flex-preferred-size:0.3rem;flex-basis:0.3rem}

File diff suppressed because it is too large
+ 0 - 0
dist/index.html


File diff suppressed because it is too large
+ 0 - 0
dist/js/app.54c794e4.js


File diff suppressed because it is too large
+ 0 - 0
dist/js/app.54c794e4.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/js/app.e30b8e49.js


File diff suppressed because it is too large
+ 0 - 0
dist/js/app.e30b8e49.js.map


+ 2 - 0
dist/js/chunk-16faf17c.ba9f8957.js

@@ -0,0 +1,2 @@
+(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-16faf17c"],{b3b8:function(s,t,a){},c44d:function(s,t,a){"use strict";var n=a("b3b8"),e=a.n(n);e.a},dbf5:function(s,t,a){"use strict";a.r(t);var n=function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("div",{staticClass:"order"},[a("header",[s._v("支付列表")]),a("h2",[s._v(s._s(s.schoolName))]),a("div",{staticClass:"orderList"},[a("div",{staticClass:"table"},[s._m(0),a("div",{staticClass:"content"},s._l(s.dataList,function(t,n){return a("div",{key:t.id},[a("span",[s._v(" "+s._s(++n)+" ")]),a("span",[s._v(" "+s._s(t.userName)+" ")]),a("span",[s._v(" "+s._s(t.voicyPart)+" ")]),a("span",[s._v(" "+s._s(t.amount)+" ")]),a("span",[s._v(" "+s._s(t.payTime)+" ")])])}),0)])])])},e=[function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("div",{staticClass:"title"},[a("span"),a("span",[s._v("姓名")]),a("span",[s._v("声部")]),a("span",[s._v("支付金额")]),a("span",[s._v("到账时间")])])}],i=a("4328"),c=a.n(i),r={name:"order",data:function(){return{classId:null,schoolName:null,dataList:{}}},mounted:function(){var s=this,t=this.$route.query.classId;this.schoolName=this.$route.query.schoolName,axios.post("/order/checkOrderList",c.a.stringify({classId:t,type:1})).then(function(t){s.dataList=t.data.data})}},o=r,d=(a("c44d"),a("2877")),u=Object(d["a"])(o,n,e,!1,null,"1e37353d",null);t["default"]=u.exports}}]);
+//# sourceMappingURL=chunk-16faf17c.ba9f8957.js.map

File diff suppressed because it is too large
+ 0 - 0
dist/js/chunk-16faf17c.ba9f8957.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/js/chunk-660d4768.c2d07a73.js


File diff suppressed because it is too large
+ 0 - 0
dist/js/chunk-660d4768.c2d07a73.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/js/chunk-a106f9c0.5d9c085d.js


File diff suppressed because it is too large
+ 0 - 0
dist/js/chunk-a106f9c0.5d9c085d.js.map


+ 0 - 2
dist/js/chunk-c31fba8e.42fb6de7.js

@@ -1,2 +0,0 @@
-(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-c31fba8e"],{"2b31":function(t,a,s){"use strict";var e=s("41f4"),n=s.n(e);n.a},"41f4":function(t,a,s){},dbf5:function(t,a,s){"use strict";s.r(a);var e=function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("div",{staticClass:"order"},[s("h2",[t._v("乐团名称:"+t._s(t.schoolName))]),s("div",{staticClass:"orderList"},[s("table",{attrs:{border:"1"}},[t._m(0),t._l(t.dataList,function(a,e){return s("tr",{key:a.id},[s("td",[t._v(t._s(++e))]),s("td",[t._v(t._s(a.userName))]),s("td",[t._v(t._s(a.amount))]),s("td",[t._v(t._s(a.payTime))])])})],2)])])},n=[function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("tr",[s("th"),s("th",[t._v("学生姓名")]),s("th",[t._v("支付金额")]),s("th",[t._v("到账时间")])])}],r=(s("7f7f"),s("4328")),o=s.n(r),i={name:"order",data:function(){return{classId:null,schoolName:null,dataList:{}}},mounted:function(){var t=this,a=this.$route.query.schoolId;axios.post("/user/getClassDetail",o.a.stringify({schoolId:a})).then(function(a){var s=a.data;t.schoolName=s.data.name,axios.post("/order/checkOrderList",o.a.stringify({classId:"",type:1})).then(function(a){t.dataList=a.data.data})})}},c=i,d=(s("2b31"),s("2877")),u=Object(d["a"])(c,e,n,!1,null,"3ad5218c",null);a["default"]=u.exports}}]);
-//# sourceMappingURL=chunk-c31fba8e.42fb6de7.js.map

File diff suppressed because it is too large
+ 0 - 0
dist/js/chunk-c31fba8e.42fb6de7.js.map


+ 2 - 2
src/views/Home.vue

@@ -42,7 +42,7 @@
             </div>
 
             <div class="coutInfo" v-if="result.payMethod >= 26">
-                <i class="trumpet_icon"></i>年度安排十个月训练,共计168课时,120元/课时,原价20160元,现仅支付{{ result.classAmount }}元/月(约合34.5元/课时)                    
+                <i class="trumpet_icon"></i>年度安排十个月训练,共计168课时,120元/课时,原价20160元,现仅支付{{ result.classAmount }}元/月(约合{{ (result.classAmount * 10 / 168).toFixed(2) }}元/课时)                    
             </div>
         </div>
 
@@ -300,7 +300,7 @@ export default {
                     instrumentName = config.name
                 }
             })
-            if(((this.result.payMethod == 25 && this.result.isCopperPipe) || this.result.payMethod == 26) && instrumentName != '自备') {
+            if(((this.result.payMethod == 25 && this.result.isCopperPipe) || this.result.payMethod == 26 || this.result.payMethod == 22) && instrumentName != '自备') {
                 this.protocol()
             } else {
                 this.buy()

+ 6 - 0
src/views/login.vue

@@ -118,6 +118,12 @@ export default {
                                     classId: result.data.classId
                                 }
                             })
+                        } else if(parseInt(result.data.status) == 1) {
+                            Dialog.alert({
+                                title: '注册完成',
+                                message: '您已完成注册,欢迎加入管乐团开启您的器乐学习之旅,请等待开课通知!',
+                                confirmButtonColor: '#269a93'
+                            })
                         }
                     } else {
                         this.sendCode() // 发送短信

+ 80 - 46
src/views/order.vue

@@ -1,22 +1,30 @@
 <template>
     <div class="order">
-        <!-- <header>支付列表</header> -->
-        <h2>乐团名称:{{schoolName}}</h2>
+        <header>支付列表</header>
+        <h2>{{schoolName}}</h2>
         <div class="orderList">
-            <table border="1">
-                <tr>
-                    <th></th>
-                    <th>学生姓名</th>
-                    <th>支付金额</th>
-                    <th>到账时间</th>
-                </tr>
-                <tr v-for="(data, index) in dataList" :key="data.id">
-                    <td>{{ ++index }}</td>
-                    <td>{{ data.userName }}</td>
-                    <td>{{ data.amount }}</td>
-                    <td>{{ data.payTime }}</td>
-                </tr>
-            </table>
+            <div class="table">
+                <div class="title">
+                    <span></span>
+                    <span>姓名</span>
+                    <span>声部</span>
+                    <span>支付金额</span>
+                    <span>到账时间</span>
+                </div>
+                <div class="content">
+                    <div v-for="(data, index) in dataList" :key="data.id">
+                    <!-- <div> -->
+                        <span> {{ ++index }} </span>
+                        <span> {{ data.userName }} </span>
+                        <span> {{ data.voicyPart }} </span>
+                        <span> {{ data.amount }} </span>
+                        <span> {{ data.payTime }} </span>
+                    </div>
+                    
+                </div>
+
+                
+            </div>
         </div>
     </div>
 </template>
@@ -33,19 +41,28 @@ export default {
         }
     },
     mounted() {
-        let schoolId = this.$route.query.schoolId
-        axios.post(`/user/getClassDetail`,qs.stringify({
-            schoolId: schoolId
-        })).then((response) => {
-            let result = response.data
-            this.schoolName = result.data.name
-            axios.post('/order/checkOrderList', qs.stringify({
-                classId: '',
-                type: 1
-            })).then(r => {
-                // console.log(r)
-                this.dataList = r.data.data
-            })
+        // let schoolId = this.$route.query.schoolId
+        // axios.post(`/user/getClassDetail`, qs.stringify({
+        //     schoolId: schoolId
+        // })).then((response) => {
+        //     let result = response.data
+        //     this.schoolName = result.data.name
+        //     axios.post('/order/checkOrderList', qs.stringify({
+        //         classId: result.data.id,
+        //         type: 1
+        //     })).then(r => {
+        //         this.dataList = r.data.data
+        //     })
+        // })
+
+        let classIds = this.$route.query.classId
+        this.schoolName = this.$route.query.schoolName
+        // console.log(classId)
+        axios.post('/order/checkOrderList', qs.stringify({
+            classId: classIds,
+            type: 1
+        })).then(r => {
+            this.dataList = r.data.data
         })
 
         
@@ -55,7 +72,8 @@ export default {
 
 <style lang="less" scoped>
 .order {
-    padding: .1rem .2rem;
+    background: #fff;
+    min-height: 100vh;
 }
 header {
     height: .40rem;
@@ -69,27 +87,43 @@ header {
 }
 h2 {
     font-size: .16rem;
-    color: #444;
+    color: #fff;
+    padding: .1rem 0;
+    text-align: center;
+    background: #14928a;
 }
 
-table {
-    width: 100%;
-    text-align: center;
-    border-color: #ccc;
 
-    tr {
+.table {
+    .title {
         display: flex;
-        th, td {
-            flex: 1;
-            text-align: center;
-            display: flex;
-            align-items: center;
-            justify-content: center;
-            &:first-child {
-                flex: inherit;
-                flex-basis: .3rem;
-            }
+        align-items: center;
+        text-align: center;
+        border-bottom: 1px solid #eaeaea;
+    }
+
+    span {
+        flex: 1;
+        padding: .08rem 0;
+
+        &:first-child {
+            width: .3rem;
+            flex: inherit;
+        }
+    }
+
+    .content > div{
+        // border: 1px solid #ccc;
+        // border-left: 0;
+        // border-right: 0;
+        width: 100%;
+        display: flex;
+        align-items: center;
+        text-align: center;
+        &:nth-child(2n+2) {
+            background: #eaeaea;
         }
+
     }
 }
 </style>

+ 55 - 4
src/views/payment.vue

@@ -30,8 +30,12 @@
                         </span>
                     </div>
                 </div>
-
                 <div class="classInfo">
+                    <div class="class" v-if="c.memo">
+                        <p style="color: #FA101D;">{{ c.memo }}</p>
+                    </div>
+                </div>
+                <div class="classInfo" :class="[c.memo? 'classStatus' : '']">
                     <div class="class">
                         <p>学习科目:{{ c.subNames }}</p>
                         <p>指导老师:{{ c.teaNames }}</p>
@@ -42,6 +46,7 @@
                         <p>每课时长:{{ c.duration }}分钟</p>
                     </div>
                 </div>
+                
                 <div class="classTime">
                     <p class="title">购买次数:</p>
                     <div class="ct_button_group">
@@ -87,6 +92,7 @@ export default {
             protocolData: {}, // 协议参数
             type: true,
             classInfo: [],
+            memo: null,
             inputTimes: 0, // 输入次数
             // mainSubject: [], // 主课程
             // 金额列表,金额计算
@@ -107,11 +113,20 @@ export default {
         let userId = this.$route.query.userId
 
         axios.post('/user/queryUserCourse', qs.stringify({ userId: userId })).then((res) => {
-            let data = res.data.data
-            if(!res.data.data) {
+            let data = res.data.data.courses
+            // let data = res.data.data
+            if(!data) {
                 throw '数据为空'
             }
-            
+            this.memo = res.data.data.memo // 特殊描述
+            let tempClassForm = {}
+            if(this.memo) {
+                let tempMemo = this.memo.split('&')
+                tempMemo.forEach(me => {
+                    var memoItem = me.split('^')
+                    tempClassForm[memoItem[0]] = memoItem[1]
+                })
+            }
             /**
              * 过滤数据
              * 乐团课同一个乐团只需要显示一个乐团(价格高的)
@@ -128,6 +143,7 @@ export default {
                 el.status = false // 状态
                 el.inputNumber = null // 输入的内容
                 el.smallAmount = 0 // 小课金额
+                el.memo = this.memo ? tempClassForm[this.classFormToCN(el.classForm)] : ''
                 // 开课周期
                 el.startCycel = this.weekSelect(5) + ' ' + el.planBegin.split(' ')[1]
 
@@ -346,6 +362,36 @@ export default {
             // this.popupStatus = false
 
             this.buy()
+        },
+        classFormToCN(number) { // 小课课程类型
+            let resultStr
+            switch(number) {
+                case 1001:
+                    resultStr = '1V1'
+                break;
+                case 2002:
+                    resultStr = '1V2'
+                break;
+                case 3003:
+                    resultStr = '1V3'
+                break;
+                case 4004:
+                    resultStr = '1V4'
+                break;
+                case 5005:
+                    resultStr = '1V5'
+                break;
+                case 6020:
+                    resultStr = '小组课'
+                break;
+                case 21099:
+                    resultStr = '大课'
+                break;
+                case 999999:
+                    resultStr = '团体课'
+                break;
+            }
+            return resultStr
         }
     }
 }
@@ -355,6 +401,11 @@ export default {
 .payment {
     margin-bottom: .7rem;
 }
+.classStatus {
+    border-top:0 !important; 
+    margin-top: 0 !important; 
+    padding-top: 0 !important;
+}
 
 header {
     height: .40rem;

+ 12 - 16
src/views/protocol.vue

@@ -4,24 +4,21 @@
             <svg t="1565680265421" class="icon back" @click="goBack" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1100" width="200" height="200"><path d="M672 928c-8 0-16-3.2-22.4-9.6l-384-384c-12.8-12.8-12.8-32 0-44.8l384-384c12.8-12.8 32-12.8 44.8 0 12.8 12.8 12.8 32 0 44.8L332.8 512l361.6 361.6c12.8 12.8 12.8 32 0 44.8-6.4 6.4-14.4 9.6-22.4 9.6z" p-id="1101"></path></svg>
             领用协议</header> -->
 
-        <div class="container" v-if="proto.payMethod == 26">
+        <div class="container" v-if="proto.payMethod == 26 || proto.payMethod == 22">
             <h1>《课程服务协议》</h1>
             甲方:深圳大雅乐盟网络教育股份有限公司 <br/>
             <div style="display: flex;">乙方:
                 <div style="flex: 1 auto;">
                     <div class="iInfo">
-                        <span>家长姓名 {{ dataList.patriarchName }}</span>
-                        <span>电话:{{ dataList.patriarchPhone }}</span>
+                        <span>家长姓名 {{ proto.patriarchName }}</span>
+                        <span>电话:{{ proto.patriarchPhone }}</span>
                     </div>
-                    <!-- <div class="iInfo">
-                        <span>单位: {{ dataList.pCompany }}</span>
-                    </div> -->
                     <div class="iInfo">
-                        <span>学生姓名:{{ dataList.stuName }}</span>
-                        <span>所在班级:{{ dataList.grade }}</span>
+                        <span>学生姓名:{{ proto.stuName }}</span>
+                        <span>所在班级:{{ proto.grade }}</span>
                     </div>
                     <div class="iInfo">
-                        <span>所在声部:{{ proto.stuName }}</span>
+                        <span>所在声部:{{ proto.subName }}</span>
                     </div>
                 </div>
             </div>  
@@ -89,19 +86,19 @@
                 <div class="sign">甲方签章 <img class="cachet" src="../assets/cachet.png" alt=""> 
                     <span>{{nowDate}}</span>
                 </div>
-                <div class="sign">乙方签字:{{ dataList.realName }}
+                <div class="sign">乙方签字:{{ proto.stuName }}
                     <span> {{ nowDate }} </span>
                 </div>
             </div>
         </div>
 
-        <div v-if="proto.payMethod == 26">
+        <div v-if="proto.payMethod == 26 || proto.payMethod == 22">
             <br />
             <br />
             <hr />
         </div>
 
-        <div class="container" v-if="proto.payMethod == 25 || proto.payMethod == 22">
+        <div class="container" v-if="proto.payMethod == 26 ||proto.payMethod == 25">
             <h1>《乐器借用协议》</h1>
             甲方:深圳大雅乐盟网络教育股份有限公司 <br/>
             <div style="display: flex;">乙方:
@@ -177,7 +174,6 @@
 </template>
 
 <script>
-import qs from 'qs'
 export default {
     name: 'protocol',
     props: ['proto'],
@@ -206,9 +202,9 @@ export default {
         let tempDate = new Date()
         console.log(this.params)
         this.nowDate = tempDate.getFullYear() + '年' + (tempDate.getMonth() + 1) + '月' + tempDate.getDate() + '日'
-        axios.post('/user/findMecUser', qs.stringify({userId: this.params.userId})).then(res => {
-            this.dataList = res.data.data
-        })
+        // axios.post('/user/findMecUser', qs.stringify({userId: this.params.userId})).then(res => {
+        //     this.dataList = res.data.data
+        // })
     },
     methods: {
         goBack() {

+ 6 - 6
vue.config.js

@@ -7,8 +7,8 @@ module.exports = {
         // 查阅 https://github.com/vuejs/vue-doc-zh-cn/vue-cli/cli-service.md#配置代理
         proxy: {
             '/user': {
-                target: 'http://testpay.dayaedu.com',
-                // target: 'http://192.168.3.38:9000',
+                // target: 'http://testpay.dayaedu.com',
+                target: 'http://192.168.3.38:9000',
                 // target: 'http://192.168.3.28:8005',
                 changeOrigin: true,
                 ws: true,
@@ -16,8 +16,8 @@ module.exports = {
                 xfwd: true
             },
             '/yqpay': {
-                target: 'http://testpay.dayaedu.com',
-                // target: 'http://192.168.3.38:9000',
+                // target: 'http://testpay.dayaedu.com',
+                target: 'http://192.168.3.38:9000',
                 // target: 'http://192.168.3.28:8005',
                 changeOrigin: true,
                 ws: true,
@@ -25,8 +25,8 @@ module.exports = {
                 xfwd: true
             },
             '/order': {
-                target: 'http://testpay.dayaedu.com',
-                // target: 'http://192.168.3.38:9000',
+                // target: 'http://testpay.dayaedu.com',
+                target: 'http://192.168.3.38:9000',
                 // target: 'http://192.168.3.28:8005',
                 changeOrigin: true,
                 ws: true,

Some files were not shown because too many files changed in this diff