|
@@ -153,7 +153,7 @@
|
|
<!-- 我的学分 -->
|
|
<!-- 我的学分 -->
|
|
<div class="credit-title">
|
|
<div class="credit-title">
|
|
<div class="title">我的学分</div>
|
|
<div class="title">我的学分</div>
|
|
- <div class="credit">6</div>
|
|
|
|
|
|
+ <div class="credit">{{xuefencount}}</div>
|
|
</div>
|
|
</div>
|
|
<div class="credit-list">
|
|
<div class="credit-list">
|
|
<br />
|
|
<br />
|
|
@@ -174,7 +174,7 @@
|
|
<div>{{ item.title }}</div>
|
|
<div>{{ item.title }}</div>
|
|
<div>
|
|
<div>
|
|
<span class="labelItem">{{ item.subject_name }}</span>
|
|
<span class="labelItem">{{ item.subject_name }}</span>
|
|
- <span class="creditinfo">3分</span>
|
|
|
|
|
|
+ <span class="creditinfo">{{ item.xuefen }}分</span>
|
|
</div>
|
|
</div>
|
|
<div class="price-wrap">
|
|
<div class="price-wrap">
|
|
<div class="price">¥<span>{{ item.money }}</span></div>
|
|
<div class="price">¥<span>{{ item.money }}</span></div>
|
|
@@ -191,7 +191,7 @@
|
|
<!-- 学习时间 -->
|
|
<!-- 学习时间 -->
|
|
<div class="credit-title">
|
|
<div class="credit-title">
|
|
<div class="title">学习时间</div>
|
|
<div class="title">学习时间</div>
|
|
- <div class="credit">60分钟</div>
|
|
|
|
|
|
+ <div class="credit">{{shichang}}分钟</div>
|
|
</div>
|
|
</div>
|
|
<div class="credit-list">
|
|
<div class="credit-list">
|
|
<br />
|
|
<br />
|
|
@@ -277,7 +277,9 @@
|
|
loadend: false,
|
|
loadend: false,
|
|
page: 1,
|
|
page: 1,
|
|
limit: 20,
|
|
limit: 20,
|
|
- loadTitle:''
|
|
|
|
|
|
+ loadTitle:'',
|
|
|
|
+ xuefencount:0,
|
|
|
|
+ shichang:0,
|
|
},
|
|
},
|
|
mounted: function () {
|
|
mounted: function () {
|
|
this.getActivitySignList();
|
|
this.getActivitySignList();
|
|
@@ -324,9 +326,11 @@
|
|
limit: this.limit
|
|
limit: this.limit
|
|
}, function (res) {
|
|
}, function (res) {
|
|
var activityList = res.data.data;
|
|
var activityList = res.data.data;
|
|
- console.log(activityList);
|
|
|
|
for (let i in activityList) {
|
|
for (let i in activityList) {
|
|
|
|
+ that.xuefencount += activityList[i].xuefen;
|
|
|
|
+ console.log(activityList[i].xuefen);
|
|
activityList[i].add_time = moment(activityList[i].add_time * 1000).format('YYYY.MM.DD')
|
|
activityList[i].add_time = moment(activityList[i].add_time * 1000).format('YYYY.MM.DD')
|
|
|
|
+
|
|
}
|
|
}
|
|
that.activityList = that.activityList.concat(activityList);
|
|
that.activityList = that.activityList.concat(activityList);
|
|
that.loading = false;
|
|
that.loading = false;
|
|
@@ -335,6 +339,43 @@
|
|
that.finished = that.limit > activityList.length;
|
|
that.finished = that.limit > activityList.length;
|
|
that.$set(this, 'activityList', that.activityList);
|
|
that.$set(this, 'activityList', that.activityList);
|
|
});
|
|
});
|
|
|
|
+ } else if (that.navActive == 1) {
|
|
|
|
+ store.baseGet($h.U({ c: 'my', a: 'history', p: { page: that.page, limit: 10000, op:'xuefenlist' } }), 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.xuefencount = 0;
|
|
|
|
+ for (let i in that.activityList) {
|
|
|
|
+ that.xuefencount += that.activityList[i].xuefen;
|
|
|
|
+ }
|
|
|
|
+ that.$set(this, 'activityList', that.activityList);
|
|
|
|
+ }, function (res) {
|
|
|
|
+ // that.loadTitle = '上拉加载更多';
|
|
|
|
+ // that.loading = false;
|
|
|
|
+ });
|
|
|
|
+ } else if (that.navActive == 2) {
|
|
|
|
+ store.baseGet($h.U({ c: 'my', a: 'history', p: { page: that.page, limit: 10000, op:'shichanglist' } }), 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.shichang = 0;
|
|
|
|
+ for (let i in that.activityList) {
|
|
|
|
+ console.log(that.activityList[i].shichang);
|
|
|
|
+ if (that.activityList[i].shichang){
|
|
|
|
+ that.shichang += parseInt(that.activityList[i].shichang / 60);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ that.$set(this, 'activityList', that.activityList);
|
|
|
|
+ }, function (res) {
|
|
|
|
+ // that.loadTitle = '上拉加载更多';
|
|
|
|
+ // that.loading = false;
|
|
|
|
+ });
|
|
} else {
|
|
} else {
|
|
store.baseGet($h.U({ c: 'my', a: 'special_log', p: { page: that.page, limit: that.limit, op:'list' } }), function (res) {
|
|
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;
|
|
var list = res.data.data;
|