index.js 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719
  1. //index.js
  2. //获取应用实例
  3. import * as echarts from '../../ec-canvas/echarts';
  4. var imageUtil = require('../../utils/window.js');
  5. const apiServer = require('../../api/request');
  6. var Chart = null;
  7. const app = getApp()
  8. var timeData = [
  9. '2020/6/1', '2009/6/2', '2009/6/3', '2009/6/4', '2009/6/5', '2009/6/6', '2009/6/7', '2009/6/8', '2009/6/9', '2009/6/10',
  10. ];
  11. timeData = timeData.map(function (str) {
  12. return str.replace('2009/', '');
  13. });
  14. function initChart(canvas, width, height, dpr, data) {
  15. const chart = echarts.init(canvas, null, {
  16. width: width,
  17. height: height,
  18. devicePixelRatio: dpr // new
  19. });
  20. canvas.setChart(chart);
  21. var option = {
  22. title: {//标题
  23. text: '',
  24. left: 'center'
  25. },
  26. renderAsImage: true, //支持渲染为图片模式
  27. color: ["#DF3E3E", "#80CDF8"],//图例图标颜色
  28. legend: {
  29. show: true,
  30. itemGap: 25,//每个图例间的间隔
  31. top: 30,
  32. x: 30,//水平安放位置,离容器左侧的距离 'left'
  33. z: 100,
  34. textStyle: {
  35. color: '#383838'
  36. },
  37. },
  38. grid: {//网格
  39. // left: 30,
  40. // top:100,
  41. containLabel: true,//grid 区域是否包含坐标轴的刻度标签
  42. },
  43. xAxis: {//横坐标
  44. type: 'category',
  45. // nameTextStyle: {//在name值存在下,设置name的样式
  46. // color: 'white',
  47. // fontStyle: 'normal'
  48. // },
  49. nameLocation:'end',
  50. splitLine: {//坐标轴在 grid 区域中的分隔线。
  51. show: true,
  52. lineStyle: {
  53. type: 'dashed',
  54. color: ['#2B2B2B']
  55. }
  56. },
  57. boundaryGap: false,//1.true 数据点在2个刻度直接 2.false 数据点在分割线上,即刻度值上
  58. data: data.timeData,
  59. axisLine: {onZero: true},
  60. axisLabel: {
  61. textStyle: {
  62. fontSize: 13,
  63. color: '#5D5D5D'
  64. }
  65. }
  66. },
  67. dataZoom: [
  68. {
  69. type: 'slider',
  70. xAxisIndex: 0,
  71. filterMode: 'empty'
  72. },
  73. ],
  74. yAxis: {//纵坐标
  75. type: 'value',
  76. position:'right',
  77. // nameTextStyle:{//在name值存在下,设置name的样式
  78. // color:'red',
  79. // fontStyle:'normal'
  80. // },
  81. splitNumber: 5,//坐标轴的分割段数
  82. scale:true,
  83. splitLine: {//坐标轴在 grid 区域中的分隔线。
  84. show: true,
  85. lineStyle: {
  86. type: 'dashed',
  87. color: ['#2B2B2B']
  88. }
  89. },
  90. axisLabel: {//坐标轴刻度标签
  91. // formatter: function (value) {
  92. // var xLable = [];
  93. // if (value == 20) {
  94. // xLable.push('25,883');
  95. // }
  96. // if (value == 40) {
  97. // xLable.push('26,035');
  98. // }
  99. // if (value == 60) {
  100. // xLable.push('26,187');
  101. // }
  102. // if (value == 80) {
  103. // xLable.push('26,339');
  104. // }
  105. // return xLable
  106. // },
  107. textStyle: {
  108. fontSize: 13,
  109. color: '#5D5D5D',
  110. }
  111. },
  112. // min: 0,
  113. // max: 100,
  114. },
  115. series: [{
  116. name: '实际',
  117. type: 'line',
  118. // smooth:true,
  119. data:data.actual,
  120. symbol: 'none',
  121. areaStyle: {
  122. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  123. offset: 0,
  124. color: '#DF3E3E'
  125. }, {
  126. offset: 1,
  127. color: '#1C1C1C'
  128. }])
  129. },
  130. itemStyle: {
  131. normal: {
  132. lineStyle: {
  133. color: '#DF3E3E'
  134. }
  135. }
  136. }
  137. }, {
  138. name: '预测',
  139. type: 'line',
  140. data: data.prediction,
  141. symbol: 'none',
  142. itemStyle: {
  143. normal: {
  144. lineStyle: {
  145. color: '#80CDF8'
  146. }
  147. }
  148. }
  149. }],
  150. };
  151. chart.setOption(option);
  152. return chart;
  153. }
  154. Page({
  155. data: {
  156. url:'../../images/timg.jpg',
  157. motto: '',
  158. currentTab: 0,
  159. userInfo: {},
  160. hasUserInfo: false,
  161. canIUse: wx.canIUse('button.open-type.getUserInfo'),
  162. currPage:1,//当前页
  163. pages:0,//每页条数
  164. total:0,//总条数
  165. aa:[],//列表
  166. imagewidth: 0,//缩放后的宽
  167. imageheight: 0,//缩放后的高
  168. // chartData:{
  169. // actual:[552,586,3555,4454,552,556,4455],
  170. // prediction:[552,546,3585,4424,542,546,35,44,524,56,355,444,2224,421],
  171. // timeData : [
  172. // '2020/6/1', '2020/6/2', '2020/6/3', '2020/6/4', '2020/6/5', '2020/6/6', '2020/6/7', '2020/6/8', '2020/6/9', '2020/6/10','2020/6/11',
  173. // '2020/6/12','2020/6/13','2020/6/14',
  174. // ]
  175. // },
  176. chartDatas:{
  177. // actual:[572,556,3555,4744,552,576,3555],
  178. // prediction:[352,246,385,2424,542,546,255],
  179. // timeData : [
  180. // '2020/6/1', '2020/6/2', '2020/6/3', '2020/6/4', '2020/6/5', '2020/6/6', '2020/6/7'
  181. // ]
  182. },
  183. ec: {
  184. onInit: initChart,
  185. // lazyLoad: true // 延迟加载
  186. },
  187. // ec: {
  188. // onInit: function (canvas, width, height) {
  189. // chart = echarts.init(canvas, null, {
  190. // width: width,
  191. // height: height
  192. // });
  193. // canvas.setChart(chart);
  194. // return chart;
  195. // },
  196. // lazyLoad: true // 延迟加载
  197. // },
  198. aa:[
  199. // {
  200. // id:'0',
  201. // from:"Investing.com 中文",
  202. // nickName:"买入波音(BA.US)好时机?两个问题没解决之前劝你住手",
  203. // reward:"今年迄今,美股航空板块受到公共卫生事件的冲击.....",
  204. // time:"6天前"
  205. // },
  206. // {
  207. // id:'1',
  208. // from:"chinese.aljazeera.net",
  209. // nickName: "波音裁员超1.2万人与警惕最坏时刻尚未到来",
  210. // reward: "波音公司当地时间27日宣布,将在美国裁减超1...",
  211. // time:"6天前"
  212. // },
  213. // {
  214. // id:'2',
  215. // from:"Investing.com 中文",
  216. // nickName: "美股异动|波音737MAX客机恢复生产,盘前涨逾5%",
  217. // reward: "Reuters.美股异动|波音(BA.US)737MAX客...",
  218. // time:"5天前"
  219. // },
  220. // {
  221. // id:'3',
  222. // from:"Investing.com 中文",
  223. // nickName:"买入波音(BA.US)好时机?两个问题没解决之前劝你住手",
  224. // reward:"今年迄今,美股航空板块受到公共卫生事件的冲击.....",
  225. // time:"6天前"
  226. // },
  227. // {
  228. // id:'4',
  229. // from:"chinese.aljazeera.net",
  230. // nickName: "波音裁员超1.2万人与警惕最坏时刻尚未到来",
  231. // reward: "波音公司当地时间27日宣布,将在美国裁减超1...",
  232. // time:"6天前"
  233. // },
  234. // {
  235. // id:'5',
  236. // from:"Investing.com 中文",
  237. // nickName: "美股异动|波音737MAX客机恢复生产,盘前涨逾5%",
  238. // reward: "Reuters.美股异动|波音(BA.US)737MAX客...",
  239. // time:"5天前"
  240. // },
  241. // {
  242. // id:'6',
  243. // from:"Investing.com 中文",
  244. // nickName:"买入波音(BA.US)好时机?两个问题没解决之前劝你住手",
  245. // reward:"今年迄今,美股航空板块受到公共卫生事件的冲击.....",
  246. // time:"6天前"
  247. // },
  248. // {
  249. // id:'7',
  250. // from:"chinese.aljazeera.net",
  251. // nickName: "波音裁员超1.2万人与警惕最坏时刻尚未到来",
  252. // reward: "波音公司当地时间27日宣布,将在美国裁减超1...",
  253. // time:"6天前"
  254. // },
  255. // {
  256. // id:'8',
  257. // from:"Investing.com 中文",
  258. // nickName: "美股异动|波音737MAX客机恢复生产,盘前涨逾5%",
  259. // reward: "Reuters.美股异动|波音(BA.US)737MAX客...",
  260. // time:"5天前"
  261. // },
  262. // {
  263. // id:'9',
  264. // from:"Investing.com 中文",
  265. // nickName:"买入波音(BA.US)好时机?两个问题没解决之前劝你住手",
  266. // reward:"今年迄今,美股航空板块受到公共卫生事件的冲击.....",
  267. // time:"6天前"
  268. // },
  269. // {
  270. // id:'10',
  271. // from:"chinese.aljazeera.net",
  272. // nickName: "波音裁员超1.2万人与警惕最坏时刻尚未到来",
  273. // reward: "波音公司当地时间27日宣布,将在美国裁减超1...",
  274. // time:"6天前"
  275. // },
  276. // {
  277. // id:'11',
  278. // from:"Investing.com 中文",
  279. // nickName: "美股异动|波音737MAX客机恢复生产,盘前涨逾5%",
  280. // reward: "Reuters.美股异动|波音(BA.US)737MAX客...",
  281. // time:"5天前"
  282. // },
  283. // {
  284. // id:'12',
  285. // from:"Investing.com 中文",
  286. // nickName:"买入波音(BA.US)好时机?两个问题没解决之前劝你住手",
  287. // reward:"今年迄今,美股航空板块受到公共卫生事件的冲击.....",
  288. // time:"6天前"
  289. // },
  290. // {
  291. // id:'13',
  292. // from:"chinese.aljazeera.net",
  293. // nickName: "波音裁员超1.2万人与警惕最坏时刻尚未到来",
  294. // reward: "波音公司当地时间27日宣布,将在美国裁减超1...",
  295. // time:"6天前"
  296. // },
  297. // {
  298. // id:'14',
  299. // from:"Investing.com 中文",
  300. // nickName: "美股异动|波音737MAX客机恢复生产,盘前涨逾5%",
  301. // reward: "Reuters.美股异动|波音(BA.US)737MAX客...",
  302. // time:"5天前"
  303. // },
  304. ],
  305. },
  306. //事件处理函数
  307. bindViewTap: function() {
  308. wx.navigateTo({
  309. url: '../logs/logs'
  310. })
  311. },
  312. //沪深
  313. getHushen:function(){
  314. apiServer.getHushen().then((res) =>{
  315. if(res.statusCode == 200){
  316. console.log(res);
  317. this.setData({
  318. chartDatas:this.recursion(res.data.data),
  319. })
  320. }
  321. })
  322. },
  323. recursion:function(row,a=[],b=[],c=[],d){
  324. for(let i in row.actuals){
  325. a.unshift(row.actuals[i].industryDate)
  326. b.unshift(row.actuals[i].close)
  327. c.unshift(row.actuals[i].pred)
  328. }
  329. if(row.tag){
  330. d="#D81E06"
  331. }else{
  332. d="#07c160"
  333. }
  334. return {"timeData":a,"actual":b,"prediction":c,"color":d}
  335. },
  336. onReady: function (e) {
  337. this.computeScrollViewHeight();
  338. // var query = wx.createSelectorQuery()
  339. // query.select('#test').boundingClientRect(function (res) {
  340. // console.log(res.top);
  341. // }).exec();
  342. },
  343. onLoad: function (options) {
  344. getNewsList(this);
  345. this.getHushen();
  346. let sysinfo = wx.getSystemInfoSync(),
  347. windowHeight = sysinfo.windowHeight,
  348. statusHeight = sysinfo.statusBarHeight,
  349. isiOS = sysinfo.system.indexOf('iOS') > -1,
  350. navHeight;
  351. if (!isiOS) {
  352. navHeight = 48;
  353. } else {
  354. navHeight = 44;
  355. }
  356. let height = windowHeight-statusHeight-navHeight;
  357. this.setData({
  358. height:height
  359. })
  360. // this.echartsComponnet = this.selectComponent('#mychart');
  361. // console.log(this.echartsComponnet);
  362. // //如果是第一次绘制
  363. // if (!Chart) {
  364. // this.init_echarts(); //初始化图表
  365. // } else {
  366. // this.setOption(Chart); //更新数据
  367. // }
  368. // this.computeScrollViewHeight();
  369. // if (app.globalData.userInfo) {
  370. // this.setData({
  371. // userInfo: app.globalData.userInfo,
  372. // hasUserInfo: true
  373. // })
  374. // } else if (this.data.canIUse){
  375. // // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回
  376. // // 所以此处加入 callback 以防止这种情况
  377. // app.userInfoReadyCallback = res => {
  378. // this.setData({
  379. // userInfo: res.userInfo,
  380. // hasUserInfo: true
  381. // })
  382. // }
  383. // } else {
  384. // // 在没有 open-type=getUserInfo 版本的兼容处理
  385. // wx.getUserInfo({
  386. // success: res => {
  387. // app.globalData.userInfo = res.userInfo
  388. // this.setData({
  389. // userInfo: res.userInfo,
  390. // hasUserInfo: true
  391. // })
  392. // }
  393. // })
  394. // }
  395. },
  396. /**
  397. * 页面相关事件处理函数--监听用户下拉动作
  398. */
  399. onPullDownRefresh: function () {
  400. //下拉刷新,重新初始化,isMerge = false
  401. getNewsList(this);
  402. },
  403. /**
  404. * 页面上拉触底事件的处理函数
  405. */
  406. onReachBottom: function () {
  407. setPage(this);
  408. },
  409. computeScrollViewHeight() {
  410. var that = this
  411. let query = wx.createSelectorQuery().in(that)
  412. query.select('.swiper-tab').boundingClientRect()
  413. query.select('.chart').boundingClientRect()
  414. query.select('.news').boundingClientRect()
  415. query.exec(res => {
  416. let topHeight = res[0].height
  417. let searchHeight = res[1].height
  418. let titleHeight = res[2].height
  419. let windowHeight = wx.getSystemInfoSync().windowHeight
  420. let windowWidth = wx.getSystemInfoSync().windowWidth
  421. let height = windowHeight - topHeight - searchHeight - titleHeight
  422. let ratio = 750 / windowWidth
  423. let scrollHeight = height * ratio
  424. that.setData({ scrollHeight: scrollHeight})
  425. })
  426. },
  427. imageLoad: function (e) {
  428. var imageSize = imageUtil.imageUtil(e)
  429. this.setData({
  430. imagewidth: imageSize.imageWidth,
  431. imageheight: imageSize.imageHeight
  432. })
  433. this.computeScrollViewHeight();
  434. },
  435. onFold:function(e){
  436. wx.navigateTo({
  437. url:'../news/news?newsId='+e.currentTarget.dataset.id
  438. });
  439. },
  440. choose:function(e){
  441. wx.navigateTo({
  442. url:"../filter/filter"
  443. })
  444. },
  445. swichNav: function(e) {
  446. var that = this;
  447. if (this.data.currentTab === e.target.dataset.current) {
  448. return false;
  449. } else {
  450. that.setData({
  451. currentTab: e.target.dataset.current
  452. })
  453. }
  454. },
  455. // 滑动切换tab
  456. bindChange: function(e) {
  457. var that = this;
  458. that.setData({
  459. currentTab: e.detail.current
  460. });
  461. },
  462. catchTouchMove:function(res){
  463. return false
  464. },
  465. //初始化图表
  466. init_echarts: function () {
  467. this.echartsComponnet.init((canvas, width, height) => {
  468. // 初始化图表
  469. const Chart = echarts.init(canvas, null, {
  470. width: width,
  471. height: height
  472. });
  473. this.setOption(Chart)
  474. // 注意这里一定要返回 chart 实例,否则会影响事件处理等
  475. return Chart
  476. });
  477. },
  478. setOption: function (Chart) {
  479. Chart.clear(); // 清除
  480. Chart.setOption(this.getOption()); //获取新数据
  481. },
  482. // 图表配置项
  483. getOption() {
  484. var self = this;
  485. var option = {
  486. title: {//标题
  487. text: '',
  488. left: 'center'
  489. },
  490. renderAsImage: true, //支持渲染为图片模式
  491. color: ["#DF3E3E", "#80CDF8"],//图例图标颜色
  492. legend: {
  493. // left:'right',
  494. show: true,
  495. itemGap: 25,//每个图例间的间隔
  496. top: 20,
  497. right:20,
  498. x: 100,//水平安放位置,离容器左侧的距离 'left'
  499. z: 100,
  500. textStyle: {
  501. color: '#383838'
  502. },
  503. data: [//图例具体内容
  504. {
  505. name: '实际',
  506. textStyle: {
  507. fontSize: 13,
  508. color: 'white'
  509. },
  510. icon: 'line'
  511. },
  512. {
  513. name: '预测',
  514. textStyle: {
  515. fontSize: 13,
  516. color: 'white'
  517. },
  518. icon: 'line',
  519. }
  520. ]
  521. },
  522. grid: {//网格
  523. // left: 50,
  524. // top:100,
  525. containLabel: true,//grid 区域是否包含坐标轴的刻度标签
  526. },
  527. xAxis: {//横坐标
  528. type: 'category',
  529. // name: '区间',//横坐标名称
  530. nameTextStyle: {//在name值存在下,设置name的样式
  531. color: 'white',
  532. fontStyle: 'normal'
  533. },
  534. nameLocation:'end',
  535. splitLine: {//坐标轴在 grid 区域中的分隔线。
  536. show: true,
  537. lineStyle: {
  538. type: 'dashed',
  539. color: ['#2B2B2B']
  540. }
  541. },
  542. boundaryGap: false,//1.true 数据点在2个刻度直接 2.fals 数据点在分割线上,即刻度值上
  543. data: ['2020/6/29', '2020/6/30', '2020/7/1', '2020/7/2', '2020/7/3'],
  544. axisLine: {onZero: true},
  545. axisLabel: {
  546. textStyle: {
  547. fontSize: 13,
  548. color: '#5D5D5D'
  549. }
  550. }
  551. },
  552. yAxis: {//纵坐标
  553. type: 'value',
  554. position:'right',
  555. name: '股票值',//纵坐标名称
  556. nameTextStyle:{//在name值存在下,设置name的样式
  557. color:'red',
  558. fontStyle:'normal'
  559. },
  560. splitNumber: 5,//坐标轴的分割段数
  561. splitLine: {//坐标轴在 grid 区域中的分隔线。
  562. show: true,
  563. lineStyle: {
  564. type: 'dashed',
  565. color: ['#2B2B2B']
  566. }
  567. },
  568. axisLabel: {//坐标轴刻度标签
  569. // formatter: function (value) {
  570. // var xLable = [];
  571. // if (value == 20) {
  572. // xLable.push('1000');
  573. // }
  574. // if (value == 40) {
  575. // xLable.push('2000');
  576. // }
  577. // if (value == 60) {
  578. // xLable.push('4000');
  579. // }
  580. // if (value == 80) {
  581. // xLable.push('6000');
  582. // }
  583. // return xLable
  584. // },
  585. textStyle: {
  586. fontSize: 13,
  587. color: '#5D5D5D',
  588. }
  589. },
  590. // min: 0,
  591. // max: 100,
  592. },
  593. series: [{
  594. name: '实际',
  595. type: 'line',
  596. // smooth:true,
  597. data: [1888, 3666, 6555, 3000, 7888, 4000, 3333],
  598. symbol: 'none',
  599. areaStyle: {
  600. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  601. {
  602. offset: 0,
  603. color: '#DF3E3E'
  604. },
  605. {
  606. offset: 1,
  607. color: '#1C1C1C'
  608. }
  609. ])
  610. },
  611. itemStyle: {
  612. normal: {
  613. lineStyle: {
  614. color: '#DF3E3E'
  615. }
  616. }
  617. }
  618. }, {
  619. name: '预测',
  620. type: 'line',
  621. data: [1000, 3000, 3111, 5000, 4000, 2000, 1000],
  622. symbol: 'none',
  623. itemStyle: {
  624. normal: {
  625. lineStyle: {
  626. color: '#80CDF8'
  627. }
  628. }
  629. }
  630. }],
  631. }
  632. return option;
  633. },
  634. getUserInfo: function(e) {
  635. console.log(e)
  636. app.globalData.userInfo = e.detail.userInfo
  637. this.setData({
  638. userInfo: e.detail.userInfo,
  639. hasUserInfo: true
  640. })
  641. }
  642. })
  643. /**
  644. * method:分页加载控制函数
  645. *
  646. */
  647. function setPage(that) {
  648. const {
  649. currPage,
  650. pages,
  651. total
  652. } = that.data;
  653. const totalPages = getTotalPages(total,pages);
  654. if (currPage >= totalPages || that.isLoading) {
  655. //控制触底是否加载需要两个条件,满足一下两个条件,都不能调用请求函数
  656. // 1.当前页是最后一页,
  657. // 2. 正在加载中
  658. return
  659. }
  660. //分页加载需要传递isMerge=true参数,表示需要合并到原来的数组上
  661. getList(that,true)
  662. }
  663. /**
  664. * method:得到总页数
  665. * @param {Number,String} total 列表总数
  666. * @param {Number,String} pages 每一页的条数
  667. * @return {Number} totalPages 总页数
  668. */
  669. function getTotalPages(total,pages){
  670. //总数除以每一页条数 如果余数!=0,结果需要+1
  671. const remainder = Number(total) % Number(pages);
  672. const value = Math.floor(total / pages);
  673. const totalPages = remainder == 0 ? value : Number(value) + 1;
  674. return totalPages
  675. }
  676. //获取新闻列表
  677. function getNewsList(that,isMerge){
  678. that.isLoading = true
  679. wx.showLoading({
  680. title: '加载中',
  681. })
  682. const data = {};
  683. data.currPage = Number(that.data.currPage) + 1;
  684. if(!isMerge){
  685. //不合并,页码需要重新设置为1
  686. data.currPage = 1;
  687. }
  688. apiServer.getNewsList(data).then((res)=>{
  689. if(res.statusCode == 200){
  690. let aa = that.data.aa;
  691. if(!isMerge){
  692. aa = [];
  693. }
  694. aa = aa.concat(res.data.data.incInfos)
  695. that.setData({
  696. aa,
  697. currPage:res.data.data.current,
  698. pages: res.data.data.pages,
  699. total: res.data.data.total
  700. })
  701. }
  702. that.isLoading = false
  703. wx.stopPullDownRefresh();
  704. setTimeout(function(){
  705. wx.hideLoading()
  706. },500)
  707. })
  708. }