natasha há 1 ano atrás
pai
commit
23db281642

+ 36 - 6
src/views/bookShelf/articlePeruseDetail.vue

@@ -52,15 +52,15 @@
                     <span :class="['oppose',oppose?'active':'']" @click="changeStatus('oppose')"><svg-icon icon-class="oppose"></svg-icon></span>
                 </div>
                 <div class="center">
-                    <el-button type="text" class="btn-left" @click="handlePage('-')"><svg-icon icon-class="arrow-left-line"></svg-icon>上一篇</el-button>
-                    <el-button type="text" class="btn-right" @click="handlePage('+')">下一篇<svg-icon icon-class="arrow-right-line"></svg-icon></el-button>
+                    <!-- <el-button type="text" class="btn-left" @click="handlePage('-')"><svg-icon icon-class="arrow-left-line"></svg-icon>上一篇</el-button>
+                    <el-button type="text" class="btn-right" @click="handlePage('+')">下一篇<svg-icon icon-class="arrow-right-line"></svg-icon></el-button> -->
                 </div>
                 <div class="right">
                     <template v-if="noRead">
-                        <span class="support" @click="changeStatus('noRead')"><svg-icon icon-class="no-read"></svg-icon>标记为已读</span>
+                        <span class="support" @click="handleReadArticle"><svg-icon icon-class="no-read"></svg-icon>标记为已读</span>
                     </template>
                     <template v-else>
-                        <span class="support readed" @click="changeStatus('noRead')"><svg-icon icon-class="readed"></svg-icon>已读</span>
+                        <span class="support readed"><svg-icon icon-class="readed"></svg-icon>已读</span>
                     </template>
                 </div>
             </div>
@@ -332,6 +332,8 @@ export default {
         stopAudio: false,
         curTime: null,
         stopAudios: false,
+        timer: null,
+        readLength: 0,
     }
   },
   methods: {
@@ -358,7 +360,10 @@ export default {
                     this.knowledgeList = res.data.content.knowledgeList
                 }
                 this.loading = false
-
+                if(!this.noRead){
+                    clearInterval(this_.timer);
+                    this_.timer = null;
+                }
             }
         })
         .catch(() => {
@@ -456,7 +461,27 @@ export default {
     },
     handleChangeStopAudios(flag){
         this.stopAudios = flag;
-    }
+    },
+    handleReadArticle(){
+        let this_ = this;
+        clearInterval(this_.timer);
+        this_.timer = null;
+        let MethodName = "/ShopServer/Client/ReadingRecordManager/AddReadingRecord_Article";
+        let data = {
+            goods_type: 3,
+            article_id: this.peruseId,
+            duration: this.readLength
+        }
+        getLogin(MethodName, data)
+        .then((res) => {
+            if(res.status===1){
+                this.noRead = false
+            }
+        })
+        .catch(() => {
+            
+        }); 
+    },
   },
   created(){
     if(this.peruseId){
@@ -471,6 +496,11 @@ export default {
         }
         _this.getWordDetail(id)
     }
+    _this.timer = null;
+    _this.readLength = 0
+    _this.timer = setInterval(() => {
+        _this.readLength++;
+    }, 1000);
   }
 }
 </script>

+ 8 - 5
src/views/bookShelf/components/Payment.vue

@@ -8,17 +8,17 @@
     </ul>
     <div class="payment-right">
         <i class="el-icon-close" @click="closeDialogue"></i>
-        <h2>{{data.name}}</h2>
-        <h3>{{data.org_name}}</h3>
-        <p class="price">¥{{data.price_discount|cutMoneyFiter}}</p>
+        <h2>{{data.name||data.cn_title}}</h2>
+        <h3>{{data.org_name||'二十一世纪英文报'}}</h3>
+        <p class="price">¥{{data.price_discount||data.price|cutMoneyFiter}}</p>
         <template v-if="payType==='dui'">
             <el-input class="code" placeholder="在此输入兑换码" v-model="codeValue" maxlength="20"></el-input>
             <a class="exchange" @click="handleExchange">兑换</a>
             <b class="tips">输入兑换码</b>
         </template>
-        <template v-else>
+        <div v-else v-loading="loading">
             <canvas id="QRCode_header" style="width: 338px; height: 338px; cursor: pointer;" @click="handleRefresh"></canvas>
-        </template>
+        </div>
         <template v-if="payType==='wei'">
             <b class="tips">请使用微信扫一扫</b>
         </template>
@@ -83,6 +83,7 @@ export default {
             },
         },
         timer: null,
+        loading: false
     }
   },
   //计算属性 类似于data概念
@@ -108,6 +109,7 @@ export default {
         if(type==='dui'){
             return false
         }
+        this.loading = true
         let MethodName = "/ShopServer/Client/OrderManager/UpdateOrderPayType";
         let data = {
             id: this.orderId,
@@ -130,6 +132,7 @@ export default {
                     this.$message.error("二维码加载失败");
                 }
             });
+            this.loading = false
         }, 1000);
     },
     closeDialogue(){

+ 3 - 0
src/views/bookShelf/components/TreeList.vue

@@ -35,6 +35,9 @@ export default {
   methods: {
     // 跳转
     handleLink(item,flag,index){
+        if(!flag){
+            return
+        }
         let url  = this.LoginNavIndex +'&&&'+ this.userBg +'&&&'+ this.headerBorder +'&&&'+ this.headerBg
         if(this.cardType==='baozhi'){
             this.$router.push({

+ 8 - 9
src/views/bookStore/Subscribe.vue

@@ -33,7 +33,7 @@
                         <span class="old-price" v-if="info.price_discount&&info.price_discount!==info.price">¥{{info.price|cutMoneyFiter}}</span>
                         <b>元 / 期</b>
                     </div>
-                    <span class="sales-right" v-if="sales>=1000">累计销售 {{salesCn}}</span>
+                    <span class="sales-right" v-if="sales>=1000">累计订阅 {{salesCn}}</span>
                 </div>
                 <div class="label-box">
                     <label v-for="(itemL,indexL) in info.label_name_list" :key="indexL" :style="{background:tagBg[indexL%3],color:tagColor[indexL%3]}">
@@ -236,8 +236,8 @@ export default {
         sales: null,
         salesCn: '',
         isBuy: 'false',
-        studyType: null,
-        orderTotalNumber: null,
+        studyType: 11,
+        orderTotalNumber: 5,
         orderList:[
             {
                 label:'5 期',
@@ -428,17 +428,16 @@ export default {
     },
     // 详情
     getInfo(){
-        let MethodName = "/CourseServer/Client/LBCourseQuery/GetLBCourseInfo";
+        let MethodName = "/ShopServer/Client/ReservationQuery/GetReservationInfo_Issue";
         let data = {
-            id: '001-202307051147PXIKH4JPGX',
-            is_contain_cs_item: "true",
-            cs_item_sort_mode: "ASCE"
+            study_phase: this.studyType,
+            period_count: this.orderTotalNumber,
+            is_custom_select_issue_no: "false"
         }
         getLogin(MethodName, data)
         .then((res) => {
             if(res.status===1){
-                this.info = res.lb_course
-                this.isBuy = res.buy_info.is_buy
+                
                 this.sales = res.buy_info.total_buy_count
                 if(this.sales<1000){
                     this.salesCn = ''

+ 16 - 1
src/views/personalCenter/components/ConversionCode.vue

@@ -6,6 +6,8 @@
     </el-input>
     <el-table
         :data="dataList"
+        v-loading="tableLoading"
+        :max-height="tableHeight"
         style="width: 100%">
         <el-table-column type="expand">
             <template slot-scope="props">
@@ -105,7 +107,9 @@ export default {
                 ]
             },
         ],
-        total_count: 0
+        total_count: 0,
+        tableLoading: false,
+        tableHeight: "", // 表格高度
     }
   },
   //计算属性 类似于data概念
@@ -116,6 +120,16 @@ export default {
   },
   //方法集合
   methods: {
+    //计算table高度(动态设置table高度)
+    getTableHeight() {
+      let tableH = 360; //距离页面下方的高度
+      let tableHeightDetil = window.innerHeight - tableH;
+      if (tableHeightDetil <= 300) {
+        this.tableHeight = 300;
+      } else {
+        this.tableHeight = window.innerHeight - tableH;
+      }
+    },
     handleSizeChange(val) {
         this.pageSize = val
     },
@@ -129,6 +143,7 @@ export default {
   },
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {
+    this.getTableHeight()
   },
   //生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {

+ 16 - 1
src/views/personalCenter/components/MyShare.vue

@@ -25,6 +25,8 @@
     </div>
     <el-table
         :data="share_record_list"
+        v-loading="tableLoading"
+        :max-height="tableHeight"
     >
         <el-table-column
             type="index"
@@ -134,7 +136,9 @@ export default {
         searchInput:'',
         searchSelect:-1,
         total_count: 0,
-        share_record_list: []
+        share_record_list: [],
+        tableLoading: false,
+        tableHeight: "", // 表格高度
     }
   },
   //计算属性 类似于data概念
@@ -145,6 +149,16 @@ export default {
   },
   //方法集合
   methods: {
+    //计算table高度(动态设置table高度)
+    getTableHeight() {
+      let tableH = 360; //距离页面下方的高度
+      let tableHeightDetil = window.innerHeight - tableH;
+      if (tableHeightDetil <= 300) {
+        this.tableHeight = 300;
+      } else {
+        this.tableHeight = window.innerHeight - tableH;
+      }
+    },
     handleSizeChange(val) {
         this.pageSize = val
         this.pageNumber = 1
@@ -183,6 +197,7 @@ export default {
   },
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {
+    this.getTableHeight()
     this.getList()
   },
   //生命周期 - 挂载完成(可以访问DOM元素)

+ 31 - 10
src/views/personalCenter/components/OrderList.vue

@@ -5,11 +5,14 @@
         :data="orderList"
         @sort-change="handleSort"
         :default-sort = dataSort
+        v-loading="tableLoading"
+        :max-height="tableHeight"
     >
         <el-table-column
             type="index"
             label="#"
-            width="48">
+            width="48"
+            :index="(pageNumber-1)*pageSize+1">
         </el-table-column>
         <el-table-column
             prop="sn"
@@ -20,7 +23,10 @@
             prop="pay_time"
             label="交易时间"
             width="180"
-            sortable>
+            sortable="custom">
+            <template slot-scope="scope">
+                {{scope.row.pay_time?scope.row.pay_time.substring(0,16):'-'}}
+            </template>
         </el-table-column>
         <el-table-column
             prop="goods_name"
@@ -31,7 +37,7 @@
             label="类型"
             width="72">
             <template slot-scope="scope" v-if="scope.row.goods_type>=0">
-                <span class="items-type" :style="{background:typeList[scope.row.goods_type].bg, color:typeList[scope.row.goods_type].color}">{{typeList[scope.row.goods_type].text}}</span>
+                <span class="items-type" :style="{background:typeList[scope.row.goods_type]?typeList[scope.row.goods_type].bg:'', color:typeList[scope.row.goods_type]?typeList[scope.row.goods_type].color:''}">{{typeList[scope.row.goods_type]?typeList[scope.row.goods_type].text:'-'}}</span>
             </template>
         </el-table-column>
         <el-table-column
@@ -172,11 +178,11 @@ export default {
             //     color:'#F53F3F',
             //     bg:'#FFECE8'
             // },
-            // '3':{
-            //     text:'练习',
-            //     color:'#0FC6C2',
-            //     bg:'#E8FFFB'
-            // },
+            '3':{
+                text:'精读',
+                color:'#0FC6C2',
+                bg:'#E8FFFB'
+            },
             0:{
                 text:'课程',
                 color:'#722ED1',
@@ -200,7 +206,9 @@ export default {
         },
         orderList:[],
         total_count: 0,
-        dataSort: {}
+        dataSort: {},
+        tableLoading: false,
+        tableHeight: "", // 表格高度
     }
   },
   //计算属性 类似于data概念
@@ -211,6 +219,16 @@ export default {
   },
   //方法集合
   methods: {
+    //计算table高度(动态设置table高度)
+    getTableHeight() {
+      let tableH = 260; //距离页面下方的高度
+      let tableHeightDetil = window.innerHeight - tableH;
+      if (tableHeightDetil <= 300) {
+        this.tableHeight = 300;
+      } else {
+        this.tableHeight = window.innerHeight - tableH;
+      }
+    },
     handleSort(value){
         let dataSort = {
             prop: value.prop,
@@ -252,6 +270,7 @@ export default {
       window.getSelection().removeAllRanges();
     },
     getList(){
+        this.tableLoading = true
         let MethodName = "/ShopServer/Client/OrderManager/PageQueryMyOrderList";
         let order_column_list = []
         if(this.dataSort != {}){
@@ -269,18 +288,20 @@ export default {
         }
         getLogin(MethodName, data)
         .then((res) => {
+            this.tableLoading = false
             if(res.status===1){
                this.orderList = res.order_list
                this.total_count = res.total_count
             }
         })
         .catch(() => {
-            this.loading = false
+            this.tableLoading = false
         });
     }
   },
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {
+    this.getTableHeight()
     this.getList()
   },
   //生命周期 - 挂载完成(可以访问DOM元素)

+ 18 - 3
src/views/personalCenter/components/PersonalInfo.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="personal-info" v-loading="loading" v-if="readInfo">
+  <div class="personal-info" v-loading="loading">
     <div class="personal-info-top">
         <div class="avator-box">
            <el-image
@@ -12,7 +12,7 @@
             <span class="org_name">{{data.org_name}}</span>
             <!-- <span class="class">{{data.class}}</span> -->
         </div>
-        <div class="right">
+        <div class="right" v-if="readInfo">
             <div class="item">
                 <p>共阅读文章</p>
                 <b class="number">{{readInfo.article_count}}</b>
@@ -47,6 +47,8 @@
             <!-- 序号默认倒序 文章增加跳转链接 -->
             <el-table
                 :data="articleList"
+                v-loading="tableLoading"
+                :max-height="tableHeight"
             >
                 <el-table-column
                     type="index"
@@ -342,7 +344,9 @@ export default {
             org_name: ''
         },
         loading: false,
-        readInfo: null
+        readInfo: null,
+        tableLoading: false,
+        tableHeight: "", // 表格高度
     }
   },
   //计算属性 类似于data概念
@@ -429,10 +433,21 @@ export default {
         }).catch((res) =>{
             this.loading = false
         })
+    },
+    //计算table高度(动态设置table高度)
+    getTableHeight() {
+      let tableH = 360; //距离页面下方的高度
+      let tableHeightDetil = window.innerHeight - tableH;
+      if (tableHeightDetil <= 300) {
+        this.tableHeight = 300;
+      } else {
+        this.tableHeight = window.innerHeight - tableH;
+      }
     }
   },
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {
+    this.getTableHeight()
     this.getInfo()
     this.getList()
   },