zjh 5 år sedan
förälder
incheckning
1b67ac7449
4 ändrade filer med 62 tillägg och 54 borttagningar
  1. 3 0
      pages/drop/drop.js
  2. 10 9
      pages/item/item.js
  3. 1 0
      pages/item/item.json
  4. 48 45
      pages/rise/rise.js

+ 3 - 0
pages/drop/drop.js

@@ -200,6 +200,7 @@ Page({
     wx.showLoading({title: '加载中…'})
     getinclast.then((res)=>{
       wx.hideLoading()
+      wx.stopPullDownRefresh()
       // console.log(res)
       if(res.statusCode==200){
        that.setData({
@@ -215,6 +216,7 @@ Page({
       wx.showLoading({title: '加载中…'})
       getinclast.then((res)=>{
         wx.hideLoading()
+        wx.stopPullDownRefresh()
         // console.log(res)
         if(res.statusCode==200){
          that.setData({
@@ -230,6 +232,7 @@ Page({
     wx.showLoading({title: '加载中…'})
     getinclast.then((res)=>{
       wx.hideLoading()
+      wx.stopPullDownRefresh()
       // console.log(res)
       if(res.statusCode==200){
        that.setData({

+ 10 - 9
pages/item/item.js

@@ -348,11 +348,12 @@ Page({
     }
 
   },
+
   /**
    * 生命周期函数--监听页面加载
    */
+  
   onLoad: function (options) {
-    // console.log(options)
     var that = this;
     var Name = "object.Name"
     var value = "object.value"
@@ -378,6 +379,12 @@ Page({
   that.postpredfind(JSON.parse(options.row).industryId,)
   // console.log(app.globalData.userInfo)
   },
+  onPullDownRefresh: function () {
+    console.log('sss')
+    wx.showNavigationBarLoading()
+    var that = this;
+    this.onLoad(); //重新加载onLoad()
+  },
   postfollow:function(){
     var that = this;
     var data={
@@ -430,6 +437,7 @@ Page({
       postbyiid.then((res)=>{
       //  console.log(res)
        wx.hideLoading()
+       wx.stopPullDownRefresh()
         // console.log(that.recursion(res.data))
         if(res.statusCode==200){
           that.setData({
@@ -474,6 +482,7 @@ Page({
         wx.showLoading({title: '加载中…'})
         postbyiid.then((res)=>{
           wx.hideLoading()
+          wx.stopPullDownRefresh()
           if(res.statusCode==200){
             that.setData({
               nextchartData:that.recursion(res.data.data),
@@ -783,14 +792,6 @@ Page({
   onUnload: function () {
 
   },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh: function () {
-
-  },
-
   /**
    * 页面上拉触底事件的处理函数
    */

+ 1 - 0
pages/item/item.json

@@ -1,5 +1,6 @@
 {
   "navigationBarTitleText": "详情",
+
   "usingComponents": {
     "ec-canvas": "../../ec-canvas/ec-canvas"
   }

+ 48 - 45
pages/rise/rise.js

@@ -2,51 +2,51 @@ import * as echarts from '../../ec-canvas/echarts';
 var Api = require('../../utils/api.js');
 var wxRequest = require('../../utils/wxRequest.js') 
 var app = getApp()
-function initChart(canvas, width, height, dpr, data) {
-  const chart = echarts.init(canvas, null, {
-    width: width,
-    height: height,
-    devicePixelRatio: dpr // new
-  });
-  canvas.setChart(chart);
+// function initChart(canvas, width, height, dpr, data) {
+//   const chart = echarts.init(canvas, null, {
+//     width: width,
+//     height: height,
+//     devicePixelRatio: dpr // new
+//   });
+//   canvas.setChart(chart);
 
-  var option = {
-    xAxis : {
-          type : 'category',
-          splitNumber: 2,
-          scale: true,
-          show:false,
-          splitLine:{
-      show:false
-        }
-      },
-  yAxis : {
-          type : 'value',
-          splitNumber: 2,
-          scale: true,
-          show:false,
-          splitLine:{
-      show:false
-       }
-      },
+//   var option = {
+//     xAxis : {
+//           type : 'category',
+//           splitNumber: 2,
+//           scale: true,
+//           show:false,
+//           splitLine:{
+//       show:false
+//         }
+//       },
+//   yAxis : {
+//           type : 'value',
+//           splitNumber: 2,
+//           scale: true,
+//           show:false,
+//           splitLine:{
+//       show:false
+//        }
+//       },
     
-    series: [{
-      type: 'line',
-      smooth: true,
-      symbol: 'none',
-      lineStyle: {
-        color: '#D81E06',
-    },
-      data:data,
-      areaStyle: {
-        color: '#D81E06',
-      },
-    }]
-  };
+//     series: [{
+//       type: 'line',
+//       smooth: true,
+//       symbol: 'none',
+//       lineStyle: {
+//         color: '#D81E06',
+//     },
+//       data:data,
+//       areaStyle: {
+//         color: '#D81E06',
+//       },
+//     }]
+//   };
 
-  chart.setOption(option);
-  return chart;
-}
+//   chart.setOption(option);
+//   return chart;
+// }
 
 Page({
 
@@ -56,9 +56,9 @@ Page({
     winHeight: 0,
     // tab切换 
     currentTab: 0,
-    ec: {
-      onInit: initChart
-    },
+    // ec: {
+    //   onInit: initChart
+    // },
     realData:[
       // {
       //   title:'BK0422',
@@ -201,6 +201,7 @@ Page({
     getinclast.then((res)=>{
       // console.log(res)
       wx.hideLoading()
+      wx.stopPullDownRefresh()
       if(res.statusCode==200){
        that.setData({
         realData:res.data.data
@@ -215,6 +216,7 @@ Page({
       wx.showLoading({title: '加载中…'})
       getinclast.then((res)=>{
         wx.hideLoading()
+        wx.stopPullDownRefresh()
         // console.log(res)
         if(res.statusCode==200){
          that.setData({
@@ -230,6 +232,7 @@ Page({
     wx.showLoading({title: '加载中…'})
     getinclast.then((res)=>{
       wx.hideLoading()
+      wx.stopPullDownRefresh()
       // console.log(res)
       if(res.statusCode==200){
        that.setData({