|
@@ -25,7 +25,7 @@ Page({
|
|
|
total_sub:0,
|
|
total_sub:0,
|
|
|
cycleId: 'day',
|
|
cycleId: 'day',
|
|
|
value: ['日榜','周榜','月榜'],
|
|
value: ['日榜','周榜','月榜'],
|
|
|
- select:1,
|
|
|
|
|
|
|
+ select:0,
|
|
|
day:'',
|
|
day:'',
|
|
|
week:'',
|
|
week:'',
|
|
|
month: '',
|
|
month: '',
|
|
@@ -34,7 +34,9 @@ Page({
|
|
|
sub_value:0,
|
|
sub_value:0,
|
|
|
week_h:0,
|
|
week_h:0,
|
|
|
casci_list:[],
|
|
casci_list:[],
|
|
|
- page_csi:1
|
|
|
|
|
|
|
+ page_csi:1,
|
|
|
|
|
+ total_csi: 0,
|
|
|
|
|
+ yestoday:''
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
@@ -44,7 +46,8 @@ Page({
|
|
|
d = d > 9 ? d : '0' + d;
|
|
d = d > 9 ? d : '0' + d;
|
|
|
this.setData({
|
|
this.setData({
|
|
|
day:y+'-'+m+'-'+d,
|
|
day:y+'-'+m+'-'+d,
|
|
|
- month: y + '-' + m
|
|
|
|
|
|
|
+ month: y + '-' + m,
|
|
|
|
|
+ yestoday: y + '-' + m + '-' + (d-1)
|
|
|
})
|
|
})
|
|
|
this.getTimer()
|
|
this.getTimer()
|
|
|
if (this.data.uid){
|
|
if (this.data.uid){
|
|
@@ -81,7 +84,10 @@ Page({
|
|
|
onTabItemClick: function onTabItemClick(e) {
|
|
onTabItemClick: function onTabItemClick(e) {
|
|
|
var id = e.currentTarget.dataset.tabs;
|
|
var id = e.currentTarget.dataset.tabs;
|
|
|
this.setData({
|
|
this.setData({
|
|
|
- select:id
|
|
|
|
|
|
|
+ select:id,
|
|
|
|
|
+ page_csi:1,
|
|
|
|
|
+ total_csi:0,
|
|
|
|
|
+ casci_list:[]
|
|
|
})
|
|
})
|
|
|
this.getcasci()
|
|
this.getcasci()
|
|
|
},
|
|
},
|
|
@@ -91,14 +97,18 @@ Page({
|
|
|
this.setData({
|
|
this.setData({
|
|
|
m_value: id
|
|
m_value: id
|
|
|
})
|
|
})
|
|
|
- this.getcasci()
|
|
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
monthSelect: function () {
|
|
monthSelect: function () {
|
|
|
var week=this.data.columns[this.data.m_value]
|
|
var week=this.data.columns[this.data.m_value]
|
|
|
this.setData({
|
|
this.setData({
|
|
|
week: week,
|
|
week: week,
|
|
|
- show_month:0
|
|
|
|
|
|
|
+ show_month:0,
|
|
|
|
|
+ page_csi: 1,
|
|
|
|
|
+ total_csi: 0,
|
|
|
|
|
+ casci_list: []
|
|
|
})
|
|
})
|
|
|
|
|
+ this.getcasci()
|
|
|
},
|
|
},
|
|
|
open: function () {
|
|
open: function () {
|
|
|
this.setData({
|
|
this.setData({
|
|
@@ -114,21 +124,30 @@ Page({
|
|
|
// 日榜
|
|
// 日榜
|
|
|
bindDateChange:function(e){
|
|
bindDateChange:function(e){
|
|
|
this.setData({
|
|
this.setData({
|
|
|
- day: e.detail.value
|
|
|
|
|
|
|
+ yestoday: e.detail.value,
|
|
|
|
|
+ page_csi: 1,
|
|
|
|
|
+ total_csi: 0,
|
|
|
|
|
+ casci_list: []
|
|
|
})
|
|
})
|
|
|
this.getcasci()
|
|
this.getcasci()
|
|
|
},
|
|
},
|
|
|
//领域期刊
|
|
//领域期刊
|
|
|
subChange:function(e){
|
|
subChange:function(e){
|
|
|
this.setData({
|
|
this.setData({
|
|
|
- sub_value: e.detail.value
|
|
|
|
|
|
|
+ sub_value: e.detail.value,
|
|
|
|
|
+ page_csi: 1,
|
|
|
|
|
+ total_csi: 0,
|
|
|
|
|
+ casci_list: []
|
|
|
})
|
|
})
|
|
|
this.getcasci()
|
|
this.getcasci()
|
|
|
},
|
|
},
|
|
|
//月榜
|
|
//月榜
|
|
|
bindDateChange1: function (e) {
|
|
bindDateChange1: function (e) {
|
|
|
this.setData({
|
|
this.setData({
|
|
|
- month: e.detail.value
|
|
|
|
|
|
|
+ month: e.detail.value,
|
|
|
|
|
+ page_csi: 1,
|
|
|
|
|
+ total_csi: 0,
|
|
|
|
|
+ casci_list: []
|
|
|
})
|
|
})
|
|
|
this.getcasci()
|
|
this.getcasci()
|
|
|
},
|
|
},
|
|
@@ -200,6 +219,17 @@ Page({
|
|
|
this.getsub()
|
|
this.getsub()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ //指数下一页
|
|
|
|
|
+ next_csi: function () {
|
|
|
|
|
+ if (this.data.casci_list.length < this.data.total_csi) {
|
|
|
|
|
+ const page = this.data.page_csi + 1
|
|
|
|
|
+ this.setData({
|
|
|
|
|
+ page_csi: page
|
|
|
|
|
+ })
|
|
|
|
|
+ this.getcasci()
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
//获取所有数据
|
|
//获取所有数据
|
|
|
getData:function(flag){
|
|
getData:function(flag){
|
|
@@ -247,7 +277,7 @@ Page({
|
|
|
if (res.data.code == 0) {
|
|
if (res.data.code == 0) {
|
|
|
const list = res.data.data.list;
|
|
const list = res.data.data.list;
|
|
|
list.unshift({
|
|
list.unshift({
|
|
|
- name:'请选择期刊',
|
|
|
|
|
|
|
+ name:'请选择领域',
|
|
|
id:''
|
|
id:''
|
|
|
})
|
|
})
|
|
|
this.setData({
|
|
this.setData({
|
|
@@ -265,12 +295,10 @@ Page({
|
|
|
//指数
|
|
//指数
|
|
|
getcasci:function(){
|
|
getcasci:function(){
|
|
|
wx.showNavigationBarLoading()
|
|
wx.showNavigationBarLoading()
|
|
|
- this.setData({
|
|
|
|
|
- casci_list: []
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ const casci_list = this.data.casci_list;
|
|
|
var subject_id=this.data.sub_list[this.data.sub_value].id,date='';
|
|
var subject_id=this.data.sub_list[this.data.sub_value].id,date='';
|
|
|
if (this.data.select == 0){
|
|
if (this.data.select == 0){
|
|
|
- date = this.data.day
|
|
|
|
|
|
|
+ date = this.data.yestoday
|
|
|
}
|
|
}
|
|
|
if (this.data.select == 1) {
|
|
if (this.data.select == 1) {
|
|
|
date = this.data.week.replace('至',',')
|
|
date = this.data.week.replace('至',',')
|
|
@@ -285,15 +313,19 @@ Page({
|
|
|
uid: this.data.uid,
|
|
uid: this.data.uid,
|
|
|
date: date,
|
|
date: date,
|
|
|
signup_id: subject_id,
|
|
signup_id: subject_id,
|
|
|
- // page:this.data.page_csi,
|
|
|
|
|
|
|
+ page:this.data.page_csi,
|
|
|
// page_size:20
|
|
// page_size:20
|
|
|
},
|
|
},
|
|
|
success: res => {
|
|
success: res => {
|
|
|
wx.hideNavigationBarLoading()
|
|
wx.hideNavigationBarLoading()
|
|
|
if (res.data.code == 0) {
|
|
if (res.data.code == 0) {
|
|
|
const list = res.data.data[1];
|
|
const list = res.data.data[1];
|
|
|
|
|
+ for (let i = 0; i < list.length; i++) {
|
|
|
|
|
+ casci_list.push(list[i])
|
|
|
|
|
+ }
|
|
|
this.setData({
|
|
this.setData({
|
|
|
- casci_list: list
|
|
|
|
|
|
|
+ casci_list: casci_list,
|
|
|
|
|
+ total_csi: res.data.data[0]
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -527,7 +559,8 @@ Page({
|
|
|
SundayTime = nowTime + (7 - day) * oneDayTime; //显示当前周日
|
|
SundayTime = nowTime + (7 - day) * oneDayTime; //显示当前周日
|
|
|
}
|
|
}
|
|
|
let list = [...new Set(setlist)] // 简单去重一下
|
|
let list = [...new Set(setlist)] // 简单去重一下
|
|
|
- // console.log(list);
|
|
|
|
|
|
|
+ list.shift()
|
|
|
|
|
+ console.log(list);
|
|
|
this.setData({
|
|
this.setData({
|
|
|
columns: list,
|
|
columns: list,
|
|
|
week: list[0]
|
|
week: list[0]
|