|
@@ -1,4 +1,6 @@
|
|
import * as echarts from '../../ec-canvas/echarts';
|
|
import * as echarts from '../../ec-canvas/echarts';
|
|
|
|
+// var Api = require('../../api/urls.js');
|
|
|
|
+var wxRequest = require('../../api/request.js')
|
|
|
|
|
|
var app = getApp()
|
|
var app = getApp()
|
|
function initChart(canvas, width, height, dpr, data) {
|
|
function initChart(canvas, width, height, dpr, data) {
|
|
@@ -48,7 +50,6 @@ function initChart(canvas, width, height, dpr, data) {
|
|
}
|
|
}
|
|
|
|
|
|
Page({
|
|
Page({
|
|
-
|
|
|
|
data: {
|
|
data: {
|
|
// 页面配置
|
|
// 页面配置
|
|
winWidth: 0,
|
|
winWidth: 0,
|
|
@@ -58,35 +59,7 @@ Page({
|
|
ec: {
|
|
ec: {
|
|
onInit: initChart
|
|
onInit: initChart
|
|
},
|
|
},
|
|
- array:[
|
|
|
|
- {
|
|
|
|
- title:'BK0422',
|
|
|
|
- subtitle:"交运物流",
|
|
|
|
- Increase:"+1.22",
|
|
|
|
- digital:"33",
|
|
|
|
- color:'crimson',
|
|
|
|
- data:[52,56,355,444],
|
|
|
|
- keep:'已关注'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title:'BK0738',
|
|
|
|
- subtitle:"多元金融",
|
|
|
|
- Increase:"+1.22",
|
|
|
|
- digital:"33",
|
|
|
|
- color:'crimson',
|
|
|
|
- data:[52,56,355,444],
|
|
|
|
- keep:'已关注'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title:'BK0450',
|
|
|
|
- subtitle:"港口水运",
|
|
|
|
- Increase:"+1.22",
|
|
|
|
- digital:"33",
|
|
|
|
- color:'crimson',
|
|
|
|
- data:[52,56,355,444,52,56,355,444,52,56,355,444,2],
|
|
|
|
- keep:'已关注'
|
|
|
|
- }
|
|
|
|
- ],
|
|
|
|
|
|
+ array:[],
|
|
|
|
|
|
},
|
|
},
|
|
onLoad: function() {
|
|
onLoad: function() {
|
|
@@ -100,6 +73,33 @@ Page({
|
|
});
|
|
});
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
+ // 获取关注的信息
|
|
|
|
+ var userId={
|
|
|
|
+ // userId:wx.getStorageSync('openid')
|
|
|
|
+ userId:'ocVI541TGfnTChi5DlIa7beac2YM'
|
|
|
|
+ }
|
|
|
|
+ console.log(userId);
|
|
|
|
+ this.getFollow(userId);
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ getFollow:function(userId){
|
|
|
|
+ var that = this;
|
|
|
|
+ wxRequest.followList(userId).then((res)=>{
|
|
|
|
+ console.log(res);
|
|
|
|
+ console.log(res.data.data);
|
|
|
|
+ if(res.statusCode==200){
|
|
|
|
+ that.setData({
|
|
|
|
+ array:res.data.data
|
|
|
|
+ })
|
|
|
|
+ console.log(that.data.array);
|
|
|
|
+ }else{
|
|
|
|
+ wx.showToast({
|
|
|
|
+ title: '125',
|
|
|
|
+ icon: 'none'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ })
|
|
},
|
|
},
|
|
open: function (e) {
|
|
open: function (e) {
|
|
console.log(e)
|
|
console.log(e)
|