赵启卫 преди 2 години
родител
ревизия
a77aed40c3

+ 9 - 0
application/wap/controller/My.php

xqd
@@ -493,4 +493,13 @@ class My extends AuthController
         }
         return $this->fetch();
     }
+
+    /**
+     * 我的学分
+     */
+
+     public function credit(){
+        
+        return $this->fetch();
+     }
 }

+ 139 - 0
application/wap/view/first/my/credit.html

xqd
@@ -0,0 +1,139 @@
+<!-- +---------------------------------------------------------------------- -->
+<!-- | CRMEB [ CRMEB赋能开发者,助力企业发展 ] -->
+<!-- +---------------------------------------------------------------------- -->
+<!-- | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved. -->
+<!-- +---------------------------------------------------------------------- -->
+<!-- | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权 -->
+<!-- +---------------------------------------------------------------------- -->
+<!-- | Author: CRMEB Team <admin@crmeb.com> -->
+<!-- +---------------------------------------------------------------------- -->
+{extend name="public/container"}
+{block name="title"}我的学分{/block}
+{block name="head"}
+<style>
+    body {
+        background: #F5F5F5;
+    }
+    .price-wrap {
+        display: flex;
+        align-items: center;
+        font-size: .24rem;
+        line-height: .33rem;
+        color: #DC9845;
+    }
+    .price-wrap .price {
+        flex: 1;
+        font-weight: bold;
+        font-size: .24rem;
+        line-height: .45rem;
+        color: #DC9845;
+    }
+    .price-wrap .price span {
+        font-size: .32rem;
+    }
+</style>
+{/block}
+{block name="content"}
+<div v-cloak id="app">
+    <div class="credit-title">
+        <div class="title">我的学分</div>
+        <div class="credit">6</div>
+    </div>
+    <div class="credit-list">
+        <br />
+        <div class="public_title">
+            <div class="name">
+                <div class="title-circular"></div>
+                <div class="title-text">学院介绍</div>
+            </div> 
+        </div>
+        <div class="content">
+            <ul v-if="activityList.length">
+                <li v-for="(item, index) in activityList" :key="index" @click="specialDetails(item.id)">
+                    <div>
+                        <div>
+                            <img :src="item.image" alt="">
+                        </div>
+                        <div>
+                            <div>{{ item.title }}</div>
+                            <div>
+                                <span class="labelItem">{{ item.subject_name }}</span>
+                                <span class="creditinfo">3分</span>
+                            </div>
+                            <div class="price-wrap">
+                                <div class="price">¥<span>{{ item.money }}</span></div>
+                                <div>共{{ item.count }}节</div>
+                            </div>
+                        </div>
+                    </div>
+                </li>
+            </ul>
+            <div v-if="!activityList.length && loadend" class="empty">
+                <img src="{__WAP_PATH}zsff/images/empty.png" alt="暂无数据">
+                <div>暂无数据</div>
+            </div>
+        </div>
+    </div>
+    <quick-menu></quick-menu>
+</div>
+{/block}
+{block name="foot"}
+<script>
+    require(['vue', 'store', 'helper', '{__WAP_PATH}zsff/js/quick.js'], function (Vue, store, $h) {
+        var app = new Vue({
+            el: '#app',
+            data: {
+                navs: ['全部', '待核销', '已核销'],
+                navActive: 0,
+                activityList: [],
+                loading: false,
+                loadend: false,
+                page: 1,
+                limit: 20,
+                loadTitle:''
+            },
+            mounted: function () {
+                this.geLogList();
+                this.$nextTick(function () {
+                    this.init();
+                });
+            },
+            methods: {
+                init: function () {
+                    var that = this;
+                    window.addEventListener('scroll', function () {
+                        var clientHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight,
+                            scrollHeight = document.documentElement.scrollHeight || document.body.scrollHeight,
+                            scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
+                        if (clientHeight + scrollTop >= scrollHeight) {
+                            that.geLogList();
+                        }
+                    });
+                },
+                specialDetails: function (order_id) {
+                    return window.location.href=$h.U({ c: 'special', a: 'details', q: {id: order_id } });
+                },
+                // 获取历史列表
+                geLogList: function () {
+                    var that = this;
+                    if (that.loading) return;
+                    if (that.loadend) return;
+                    that.loading = true;
+                    store.baseGet($h.U({ c: 'my', a: 'special_log', p: { page: that.page, limit: that.limit, op:'list' } }), function (res) {
+                        var list = res.data.data;
+                        that.activityList.push.apply(that.activityList, list);
+                        that.loadend = list.length < that.limit;
+                        that.loadTitle = that.loadend ? '已全部加载完' : '上拉加载更多';
+                        that.page = that.page + 1;
+                        that.loading = false;
+                        that.$set(this, 'activityList', that.activityList);
+                    }, function (res) {
+                        that.loadTitle = '上拉加载更多';
+                        that.loading = false;
+                    });
+                }
+            }
+        });
+    });
+</script>
+{/block}

+ 0 - 3
application/wap/view/first/my/special_log.html

xqd
@@ -39,9 +39,6 @@
 {/block}
 {block name="content"}
 <div class="activity-list" v-cloak id="app">
-    <div class="tab">
-        <div>浏览过的课程</div>
-    </div>
     <div class="content">
         <ul v-if="activityList.length">
             <li v-for="(item, index) in activityList" :key="index" @click="specialDetails(item.id)">

+ 171 - 2
public/wap/first/zsff/css/style.css

xqd
@@ -22887,9 +22887,178 @@ input:-webkit-autofill:focus {
     width: 4.14rem;
     margin: 2rem auto 0;
 }
-
+/*公用头部*/
 .page-title{
     text-align: center;
     margin: .2rem 0;
     font-size: .36rem;
-}
+}
+/* 我的学分页面样式*/
+.credit-title{
+    width: 100%;
+    height: 45vw;
+    background: #191C6E;
+    color: #fff;
+    text-align: center;
+}
+.credit-title .title{
+    padding-top: 0.5rem;
+    font-size: 0.5rem;
+}
+.credit-title .credit{
+    font-size: 0.7rem;
+}
+.credit-list{
+    margin-top: -30px;
+    background: #F5F5F5;
+    border-radius: 30px;
+}
+.credit-list .content{
+    width: 100%;
+    margin: 0.2rem;
+}
+.credit-list .empty {
+margin-top: 6rem;
+font-size: .28rem;
+text-align: center;
+color: #cdcdcd;
+}
+
+.credit-list .empty img {
+display: block;
+width: 4.14rem;
+margin: 0 auto;
+}
+
+
+.credit-list li {
+border-radius: .12rem;
+background: #FFFFFF;
+cursor: pointer;
+}
+
+.credit-list li~li {
+margin-top: .2rem;
+}
+
+.credit-list li>div {
+display: -webkit-box;
+display: -webkit-flex;
+display: -moz-box;
+display: -ms-flexbox;
+display: flex;
+}
+
+.credit-list li>div:first-child {
+-webkit-box-pack: justify;
+-webkit-justify-content: space-between;
+-moz-box-pack: justify;
+-ms-flex-pack: justify;
+justify-content: space-between;
+padding: .23rem .3rem;
+font-size: .28rem;
+line-height: .4rem;
+color: #999999;
+}
+
+.credit-list li>div:first-child>div:last-child {
+color: #F78200;
+}
+
+.credit-list li>div:first-child>div.verify {
+color: #191C6E;
+}
+
+.credit-list li>div:last-child {
+padding: .4rem .3rem;
+border-top: 1px solid #F5F5F5;
+}
+
+.credit-list li img {
+display: block;
+width: 2.5rem;
+height: 1.4rem;
+border-radius: .1rem;
+-o-object-fit: cover;
+object-fit: cover;
+}
+
+.credit-list li>div:last-child>div:last-child {
+-webkit-box-flex: 1;
+-webkit-flex: 1;
+-moz-box-flex: 1;
+-ms-flex: 1;
+flex: 1;
+display: -webkit-box;
+display: -webkit-flex;
+display: -moz-box;
+display: -ms-flexbox;
+display: flex;
+-webkit-box-orient: vertical;
+-webkit-box-direction: normal;
+-webkit-flex-direction: column;
+-moz-box-orient: vertical;
+-moz-box-direction: normal;
+-ms-flex-direction: column;
+flex-direction: column;
+min-width: 0;
+margin-left: .3rem;
+}
+
+.credit-list li>div>div>div:first-child {
+overflow: hidden;
+white-space: nowrap;
+-o-text-overflow: ellipsis;
+text-overflow: ellipsis;
+font-size: .28rem;
+line-height: .4rem;
+color: #333333;
+}
+
+.credit-list li>div>div>div:nth-child(2) {
+-webkit-box-flex: 1;
+-webkit-flex: 1;
+-moz-box-flex: 1;
+-ms-flex: 1;
+flex: 1;
+min-height: 0;
+margin-top: .09rem;
+overflow: hidden;
+white-space: nowrap;
+-o-text-overflow: ellipsis;
+text-overflow: ellipsis;
+font-size: .22rem;
+line-height: .3rem;
+color: #999999;
+}
+
+.credit-list .iconfont {
+margin-right: .1rem;
+font-size: .19rem;
+}
+
+.credit-list li>div>div>div:last-child {
+font-weight: bold;
+font-size: .24rem;
+color: #F78200;
+}
+
+.credit-list li .labelItem {
+    -webkit-flex-shrink: 0;
+    -ms-flex-negative: 0;
+    flex-shrink: 0;
+    padding-right: .12rem;
+    padding-left: .12rem;
+    border-radius: .1rem;
+    background-color: rgba(44, 142, 255, .06);
+    font-size: .2rem;
+    line-height: .36rem;
+    color: #191C6E;
+    vertical-align: middle
+}
+.credit-list li .creditinfo{
+    float: right;
+    color: #F78200;
+    font-size: .35rem;
+    font-weight: bold;
+}