zjh 5 tahun lalu
induk
melakukan
5e151c560c
9 mengubah file dengan 322 tambahan dan 281 penghapusan
  1. 8 0
      components/commom.wxs
  2. 76 129
      pages/item/item.js
  3. 12 12
      pages/item/item.wxml
  4. 1 1
      pages/item/item.wxss
  5. 149 101
      pages/rise/rise.js
  6. 2 0
      pages/rise/rise.json
  7. 43 36
      pages/rise/rise.wxml
  8. 10 1
      pages/rise/rise.wxss
  9. 21 1
      utils/api.js

+ 8 - 0
components/commom.wxs

@@ -0,0 +1,8 @@
+function Intercept(row){
+  console.log(row)
+  // return Math.round(row * 100)
+  return row.toFixed(2)
+}
+module.exports={
+  Intercept:Intercept
+}

+ 76 - 129
pages/item/item.js

@@ -1,5 +1,7 @@
 // pages/item/item.js
 import * as echarts from '../../ec-canvas/echarts';
+var Api = require('../../utils/api.js');
+var wxRequest = require('../../utils/wxRequest.js') 
 var timeData = [
   '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',
 ];
@@ -289,137 +291,29 @@ Page({
           ec: {
       onInit: initChart
     },
-    chartData:{
+    realchartData:{
       actual:[552,586,3555,4454,552,556,4455],
       prediction:[552,546,3585,4424,542,546,35,44,524,56,355,444,2224,421],
       timeData : [
         '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',
         '2020/6/12','2020/6/13','2020/6/14',
       ],
-      color:""
+      color:"crimson"
     },
-      chartDatas:{
+      nextchartData:{
         actual:[572,556,3555,4744,552,576,3555],
         prediction:[352,246,385,2424,542,546,255],
         timeData : [
           '2020/6/1', '2020/6/2', '2020/6/3', '2020/6/4', '2020/6/5', '2020/6/6', '2020/6/7'
         ],
-        color:""
+        color:"crimson"
       },
       object:{
-        title:"appl",
-        Withtitle:"appl inc",
-        Volume:"545455",
-        float:"-5555",
+        Name:"appl",
+        value:"545455",
         color:'crimson',
       },
-      aa:[
-        {
-          id:'0',
-          from:"Investing.com 中文",
-          nickName:"买入波音(BA.US)好时机?两个问题没解决之前劝你住手",
-          reward:"今年迄今,美股航空板块受到公共卫生事件的冲击.....",
-          time:"6天前"
-        },
-        { 
-          id:'1',
-          from:"chinese.aljazeera.net",
-          nickName: "波音裁员超1.2万人与警惕最坏时刻尚未到来",
-          reward: "波音公司当地时间27日宣布,将在美国裁减超1...",
-          time:"6天前"
-        },
-        {
-          id:'2',
-          from:"Investing.com 中文",
-          nickName: "美股异动|波音737MAX客机恢复生产,盘前涨逾5%",
-          reward: "Reuters.美股异动|波音(BA.US)737MAX客...",
-          time:"5天前"
-        },
-        {
-          id:'3',
-          from:"Investing.com 中文",
-          nickName:"买入波音(BA.US)好时机?两个问题没解决之前劝你住手",
-          reward:"今年迄今,美股航空板块受到公共卫生事件的冲击.....",
-          time:"6天前"
-        },
-        { 
-          id:'4',
-          from:"chinese.aljazeera.net",
-          nickName: "波音裁员超1.2万人与警惕最坏时刻尚未到来",
-          reward: "波音公司当地时间27日宣布,将在美国裁减超1...",
-          time:"6天前"
-        },
-        {
-          id:'5',
-          from:"Investing.com 中文",
-          nickName: "美股异动|波音737MAX客机恢复生产,盘前涨逾5%",
-          reward: "Reuters.美股异动|波音(BA.US)737MAX客...",
-          time:"5天前"
-        },
-        {
-          id:'6',
-          from:"Investing.com 中文",
-          nickName:"买入波音(BA.US)好时机?两个问题没解决之前劝你住手",
-          reward:"今年迄今,美股航空板块受到公共卫生事件的冲击.....",
-          time:"6天前"
-        },
-        { 
-          id:'7',
-          from:"chinese.aljazeera.net",
-          nickName: "波音裁员超1.2万人与警惕最坏时刻尚未到来",
-          reward: "波音公司当地时间27日宣布,将在美国裁减超1...",
-          time:"6天前"
-        },
-        {
-          id:'8',
-          from:"Investing.com 中文",
-          nickName: "美股异动|波音737MAX客机恢复生产,盘前涨逾5%",
-          reward: "Reuters.美股异动|波音(BA.US)737MAX客...",
-          time:"5天前"
-        },
-        {
-          id:'9',
-          from:"Investing.com 中文",
-          nickName:"买入波音(BA.US)好时机?两个问题没解决之前劝你住手",
-          reward:"今年迄今,美股航空板块受到公共卫生事件的冲击.....",
-          time:"6天前"
-        },
-        { 
-          id:'10',
-          from:"chinese.aljazeera.net",
-          nickName: "波音裁员超1.2万人与警惕最坏时刻尚未到来",
-          reward: "波音公司当地时间27日宣布,将在美国裁减超1...",
-          time:"6天前"
-        },
-        {
-          id:'11',
-          from:"Investing.com 中文",
-          nickName: "美股异动|波音737MAX客机恢复生产,盘前涨逾5%",
-          reward: "Reuters.美股异动|波音(BA.US)737MAX客...",
-          time:"5天前"
-        },
-        {
-          id:'12',
-          from:"Investing.com 中文",
-          nickName:"买入波音(BA.US)好时机?两个问题没解决之前劝你住手",
-          reward:"今年迄今,美股航空板块受到公共卫生事件的冲击.....",
-          time:"6天前"
-        },
-        { 
-          id:'13',
-          from:"chinese.aljazeera.net",
-          nickName: "波音裁员超1.2万人与警惕最坏时刻尚未到来",
-          reward: "波音公司当地时间27日宣布,将在美国裁减超1...",
-          time:"6天前"
-        },
-        {
-          id:'14',
-          from:"Investing.com 中文",
-          nickName: "美股异动|波音737MAX客机恢复生产,盘前涨逾5%",
-          reward: "Reuters.美股异动|波音(BA.US)737MAX客...",
-          time:"5天前"
-        },
-      ],
+      newsData:[],
   },
   catchTouchMove:function(res){
     return false
@@ -454,25 +348,78 @@ Page({
    */
   onLoad: function (options) {
     console.log(JSON.parse(options.row))
-    var title = "object.title"
-    var Withtitle ="object.Withtitle"
-    var Volume = "object.Volume"
-    var float ="object.float"
+    var Name = "object.Name"
+    var value = "object.value"
     var color='object.color'
-    var chartData="chartData.color"
-    var chartDatas="chartDatas.color"
+    let  realcolor="realchartData.color",nextcolor="nextchartData.color", Values,colors
+    if(JSON.parse(options.row).Tag){
+       Values="+"+JSON.parse(options.row).Value.toFixed(2)+"%";
+       colors="#D81E06";
+    }else{
+      Values="-"+JSON.parse(options.row).Value.toFixed(2)+"%"
+      colors="#07c160"
+
+    }
     this.setData({
-   [title]:JSON.parse(options.row).title,
-      [Withtitle]:JSON.parse(options.row).subtitle,
-    [Volume]:JSON.parse(options.row).digital,
-     [float]:JSON.parse(options.row).Increase,
-     [color]:JSON.parse(options.row).color,
-     [chartData]:JSON.parse(options.row).color,
-     [chartDatas]:JSON.parse(options.row).color,
-     button:JSON.parse(options.row).keep,
+   [Name]:JSON.parse(options.row).Name,
+   [value]:Values,
+   [color]:colors,
+   [realcolor]:colors,
+   [nextcolor]:colors,
     })
+  var that = this;
+  that.postbyiid(JSON.parse(options.row).IID,)
+  that.postnewsbyiid(JSON.parse(options.row).IID)
   },
+    //获取数据
+    postbyiid:function(){
+      var that = this;
+      var postbyiid = wxRequest.postRequest(Api.postbyiid(),{'iid':'12'});
+      postbyiid.then((res)=>{
+        console.log(res)
+        console.log(that.recursion(res.data))
+        if(res.statusCode==200){
+         that.setData({
+          realchartData:that.recursion(res.data)
+         })
+        }
+      })
+    },
+    recursion:function(row,a=[],b=[],c=[],d){
+        for(let i in row.data){
+        a.push(row.data[i].Date)
+        b.push(row.data[i].Close)
+        c.push(row.data[i].Pred)
+        }
+        if(row.tag){
+          d="#D81E06"
+        }else{
+          d="#07c160"
+        }
 
+      return {"timeData":a,"actual":b,"prediction":c,"color":d}
+      },
+     //获取新闻
+     postnewsbyiid:function(){
+      var that = this;
+      var postbyiid = wxRequest.postRequest(Api.postnewsbyiid(),{'iid':'12'});
+      postbyiid.then((res)=>{
+        console.log(res)
+        // NID: "新闻id"
+        // Title: "标题"
+        // From: "来源"
+        // MiniContent: "内容"
+        // EID: ""
+        // Date: "时间"
+        // Tag: "情绪"
+        console.log(that.recursion(res.data))
+        if(res.statusCode==200){
+         that.setData({
+          newsData:res.data.data
+         })
+        }
+      })
+    },
   /**
    * 生命周期函数--监听页面初次渲染完成
    */

+ 12 - 12
pages/item/item.wxml

@@ -3,12 +3,12 @@
   <button type="default" size="mini">{{button}}</button>
  </view>
  <view class="title-name">
-   <text class="title-name-Big">{{object.title}}</text>
-    <text class="title-name-small">{{object.Withtitle}}</text>
+   <text class="title-name-Big">{{object.Name}}</text>
+    <!-- <text class="title-name-small">{{object.Withtitle}}</text> -->
  </view>
  <view class="tile-number">
-   <text class="tile-number-Volume">{{object.Volume}}</text>
-    <text class="tile-number-float" style="color:{{object.color}}">{{object.float}}</text>
+   <!-- <text class="tile-number-Volume">{{object.va}}</text> -->
+    <text class="tile-number-float" style="color:{{object.color}}">{{object.value}}</text>
  </view>
 </view>
 <view class="swiper-tab">
@@ -26,12 +26,12 @@
 
     <swiper-item catchtouchmove='catchTouchMove'>
      <view style="width:100%;height:100%">
-       <ec-canvas  id="mychart-dom-line" canvas-id="mychart-line" tuData="{{ chartDatas }}" ec="{{ ec }}"></ec-canvas>
+       <ec-canvas  id="mychart-dom-line" canvas-id="mychart-line" tuData="{{ realchartData }}" ec="{{ ec }}"></ec-canvas>
      </view>
     </swiper-item>
 
     <swiper-item catchtouchmove='catchTouchMove'>
- <ec-canvas  id="mychart-dom-line" canvas-id="mychart-line" tuData="{{ chartData }}" ec="{{ ec }}"></ec-canvas>
+ <ec-canvas  id="mychart-dom-line" canvas-id="mychart-line" tuData="{{ nextchartData }}" ec="{{ ec }}"></ec-canvas>
     </swiper-item>
   </swiper>
 </view>
@@ -39,11 +39,11 @@
     <text class="news-today">今日快讯</text>
   </view>
 
-  <block wx:for-index="idx" wx:for='{{aa}}' wx:key="key" >
-    <view class='content-item' bindtap="onFold" data-id="{{item.id}}" >
-      <text class='from' >{{item.from}}</text>
-      <text class='name'>{{item.nickName}}</text>
-      <text class='wawa'>{{item.reward}}</text>
-      <text class='time'>{{item.time}}</text>
+  <block wx:for-index="idx" wx:for='{{newsData}}' wx:key="key" >
+    <view class='content-item' bindtap="onFold" data-id="{{item.NID}}" >
+      <text class='from' >{{item.From}}</text>
+      <text class='name'>{{item.Title}}</text>
+      <text class='wawa'>{{item.MiniContent}}</text>
+      <text class='time'>{{item.Date}}</text>
     </view>
 </block> 

+ 1 - 1
pages/item/item.wxss

@@ -45,7 +45,7 @@ ec-canvas {
 }
 .title .tile-number .tile-number-float{
   /* color: crimson; */
-  margin-left: 20px;
+  margin-left: 10px;
 }
 
 .swiper-tab {

+ 149 - 101
pages/rise/rise.js

@@ -59,108 +59,112 @@ Page({
     ec: {
       onInit: initChart
     },
-    array:[
-      {
-        title:'BK0422',
-        subtitle:"交运物流",
-        Increase:"+1.22",
-        digital:"33",
-        color:'crimson',
-        keep:"已关注",
-        data:[52,56,355,444]
-      },
-      {
-        title:'BK0738',
-        subtitle:"多元金融",
-        Increase:"+1.22",
-        digital:"33",
-        color:'crimson',
-        keep:"已关注",
-        data:[52,56,355,444]
-      },
-      {
-        title:'BK0450',
-        subtitle:"港口水运",
-        Increase:"+1.22",
-        digital:"33",
-        color:'crimson',
-        keep:"已关注",
-        data:[52,56,355,444,52,56,355,444,52,56,355,444,2]
-      },
-      {
-        title:'BK0734',
-        subtitle:"珠宝首饰",
-        Increase:"+1.22",
-        digital:"33",
-        color:'crimson',
-        keep:"关注",
-        data:[52,56,355,44554]
-      },
-      {
-        title:'BK0471',
-        subtitle:"化纤行业",
-        Increase:"+1.22",
-        digital:"33",
-        keep:"关注",
-        color:'crimson',
-        data:[52,56,355,444]
-      },
-      {
-        title:'BK0485',
-        subtitle:"旅游酒店",
-        Increase:"+1.22",
-        digital:"33",
-        color:'crimson',
-        keep:"关注",
-        data:[52,56,355,444]
-      },
-      {
-        title:'BK0475',
-        subtitle:"银行",
-        Increase:"+1.22",
-        digital:"33",
-        keep:"关注",
-        color:'crimson',
-        data:[52,56,355,44554]
-      },
-      {
-        title:'BK0473',
-        subtitle:"券商信托",
-        Increase:"+1.22",
-        digital:"33",
-        color:'crimson',
-        keep:"关注",
-        data:[52,56,355,444]
-      },
-      {
-        title:'BK0474',
-        subtitle:"保险",
-        Increase:"+1.22",
-        color:'crimson',
-        keep:"关注",
-        digital:"33",
-        data:[52,56,355,444]
-      },
-      {
-        title:'BK0478',
-        subtitle:"有色金属",
-        Increase:"+1.22",
-        keep:"关注",
-        digital:"33",
-        color:'crimson',
-        data:[52,56,355,44554]
-      },
-      {
-        title:'BK0738',
-        subtitle:"多元金融",
-        Increase:"+1.22",
-        digital:"33",
-        keep:"关注",
-        color:'crimson',
-        data:[52,56,355,44554]
-      }
-    ]
+    realData:[
+      // {
+      //   title:'BK0422',
+      //   subtitle:"交运物流",
+      //   Increase:"+1.22",
+      //   digital:"33",
+      //   color:'crimson',
+      //   keep:"已关注",
+      //   data:[52,56,355,444]
+      // },
+      // {
+      //   title:'BK0738',
+      //   subtitle:"多元金融",
+      //   Increase:"+1.22",
+      //   digital:"33",
+      //   color:'crimson',
+      //   keep:"已关注",
+      //   data:[52,56,355,444]
+      // },
+      // {
+      //   title:'BK0450',
+      //   subtitle:"港口水运",
+      //   Increase:"+1.22",
+      //   digital:"33",
+      //   color:'crimson',
+      //   keep:"已关注",
+      //   data:[52,56,355,444,52,56,355,444,52,56,355,444,2]
+      // },
+      // {
+      //   title:'BK0734',
+      //   subtitle:"珠宝首饰",
+      //   Increase:"+1.22",
+      //   digital:"33",
+      //   color:'crimson',
+      //   keep:"关注",
+      //   data:[52,56,355,44554]
+      // },
+      // {
+      //   title:'BK0471',
+      //   subtitle:"化纤行业",
+      //   Increase:"+1.22",
+      //   digital:"33",
+      //   keep:"关注",
+      //   color:'crimson',
+      //   data:[52,56,355,444]
+      // },
+      // {
+      //   title:'BK0485',
+      //   subtitle:"旅游酒店",
+      //   Increase:"+1.22",
+      //   digital:"33",
+      //   color:'crimson',
+      //   keep:"关注",
+      //   data:[52,56,355,444]
+      // },
+      // {
+      //   title:'BK0475',
+      //   subtitle:"银行",
+      //   Increase:"+1.22",
+      //   digital:"33",
+      //   keep:"关注",
+      //   color:'crimson',
+      //   data:[52,56,355,44554]
+      // },
+      // {
+      //   title:'BK0473',
+      //   subtitle:"券商信托",
+      //   Increase:"+1.22",
+      //   digital:"33",
+      //   color:'crimson',
+      //   keep:"关注",
+      //   data:[52,56,355,444]
+      // },
+      // {
+      //   title:'BK0474',
+      //   subtitle:"保险",
+      //   Increase:"+1.22",
+      //   color:'crimson',
+      //   keep:"关注",
+      //   digital:"33",
+      //   data:[52,56,355,444]
+      // },
+      // {
+      //   title:'BK0478',
+      //   subtitle:"有色金属",
+      //   Increase:"+1.22",
+      //   keep:"关注",
+      //   digital:"33",
+      //   color:'crimson',
+      //   data:[52,56,355,44554]
+      // },
+      // {
+      //   title:'BK0738',
+      //   subtitle:"多元金融",
+      //   Increase:"+1.22",
+      //   digital:"33",
+      //   keep:"关注",
+      //   color:'crimson',
+      //   data:[52,56,355,44554]
+      // }
+    ],
+    onperData:[],
+    uperData:[],
+
   },
+
   onLoad: function() {
     var that = this;
     // 获取系统信息 
@@ -172,6 +176,7 @@ Page({
             navHeight=44
           }else{
             navHeight=48
+            
           }
         that.setData({
           winWidth: res.windowWidth,
@@ -179,9 +184,52 @@ Page({
         });
       }
     });
+    that.getinclast()
+    that.getinclpred()
+    that.getincnpred()
+  },
+  onPullDownRefresh: function () {
+    wx.showNavigationBarLoading()
+    var that = this;
+    this.onLoad(); //重新加载onLoad()
+  },
+  //获取上周实际
+  getinclast:function(){
+    var that = this;
     var getinclast = wxRequest.postRequest(Api.getinclast());
     getinclast.then((res)=>{
       console.log(res)
+      if(res.statusCode==200){
+       that.setData({
+        realData:res.data.value
+       })
+      }
+    })
+  },
+    //获取上周预测
+    getinclpred:function(){
+      var that = this;
+      var getinclast = wxRequest.postRequest(Api.getinclpred());
+      getinclast.then((res)=>{
+        console.log(res)
+        if(res.statusCode==200){
+         that.setData({
+          onperData:res.data.value
+         })
+        }
+      })
+    },
+      //获取下周预测
+      getincnpred:function(){
+        var that = this;
+    var getinclast = wxRequest.postRequest(Api.getincnpred());
+    getinclast.then((res)=>{
+      console.log(res)
+      if(res.statusCode==200){
+       that.setData({
+        uperData:res.data.value
+       })
+      }
     })
   },
   // 滑动切换tab 

+ 2 - 0
pages/rise/rise.json

@@ -1,5 +1,7 @@
 {
   "navigationStyle": "custom",
+  "enablePullDownRefresh":true,
+  "backgroundTextStyle": "dark",
   "usingComponents": {
     "navBar": "/components/navBar/navBar",
     "ec-canvas": "../../ec-canvas/ec-canvas"

+ 43 - 36
pages/rise/rise.wxml

@@ -1,4 +1,5 @@
 <navBar></navBar>
+<wxs module="commom" src="../../components/commom.wxs"></wxs>
 <view class="swiper-tab">
   <view class="swiper-tab-list {{currentTab==0 ? 'on' : ''}}" data-current="0" bindtap="swichNav">下周预测榜</view>
   <view class="swiper-tab-list {{currentTab==1 ? 'on' : ''}}" data-current="1" bindtap="swichNav">上周实际榜</view>
@@ -8,18 +9,20 @@
 <swiper current="{{currentTab}}" class="swiper-box" duration="300"  style="height:{{winHeight - 48}}px" bindchange="bindChange">
   <swiper-item>
     <scroll-view scroll-y style="height: 100%;">
-      <view wx:for="{{array}}"class="swiper-box-view" wx:key="index" bindtap="open" data-row='{{item}}'>
-        <view class="swiper-box-left">
-          <view>{{item.title}}</view>
-          <view class="swiper-box-subtitle">{{item.subtitle}}</view>
-        </view>
-        <view class="swiper-box-right">
-          <!-- <view class="swiper-box-canvas">
-            <ec-canvas  id="mychart-dom-line" canvas-id="mychart-line" tuData="{{ item.data }}" ec="{{ ec }}"></ec-canvas>
-          </view> -->
-          <view class="swiper-box-button">
-            <!-- <view>{{item.digital}}</view> -->
-            <button  class="mini-btn" type="warn" size="mini" >{{item.Increase}}</button>
+      <view class="swiper-box-list">
+        <view wx:for="{{uperData}}"class="swiper-box-view" wx:key="index" bindtap="open" data-row='{{item}}'>
+          <view class="swiper-box-left">
+            <view>{{item.Name}}</view>
+            <!-- <view class="swiper-box-subtitle">{{item.subtitle}}</view> -->
+          </view>
+          <view class="swiper-box-right">
+            <!-- <view class="swiper-box-canvas">
+              <ec-canvas  id="mychart-dom-line" canvas-id="mychart-line" tuData="{{ item.data }}" ec="{{ ec }}"></ec-canvas>
+            </view> -->
+            <view class="swiper-box-button">
+              <!-- <view>{{item.digital}}</view> -->
+              <button  class="mini-btn" type="warn" size="mini" >+{{commom.Intercept(item.Value)}}%</button>
+            </view>
           </view>
         </view>
       </view>
@@ -27,18 +30,20 @@
   </swiper-item>
   <swiper-item>
     <scroll-view scroll-y style="height: 100%;">
-      <view wx:for="{{array}}"class="swiper-box-view" wx:key="index" bindtap="open" data-row='{{item}}'>
-        <view class="swiper-box-left">
-          <view>{{item.title}}</view>
-          <view class="swiper-box-subtitle">{{item.subtitle}}</view>
-        </view>
-        <view class="swiper-box-right">
-          <!-- <view class="swiper-box-canvas">
-            <ec-canvas  id="mychart-dom-line" canvas-id="mychart-line" tuData="{{ item.data }}" ec="{{ ec }}"></ec-canvas>
-          </view> -->
-          <view class="swiper-box-button">
-            <!-- <view>{{item.digital}}</view> -->
-            <button class="mini-btn" type="warn" size="mini">{{item.Increase}}</button>
+      <view class="swiper-box-list">
+        <view wx:for="{{realData}}"class="swiper-box-view" wx:key="index" bindtap="open" data-row='{{item}}'>
+          <view class="swiper-box-left">
+            <view>{{item.Name}}</view>
+            <!-- <view class="swiper-box-subtitle">{{item.subtitle}}</view> -->
+          </view>
+          <view class="swiper-box-right">
+            <!-- <view class="swiper-box-canvas">
+              <ec-canvas  id="mychart-dom-line" canvas-id="mychart-line" tuData="{{ item.data }}" ec="{{ ec }}"></ec-canvas>
+            </view> -->
+            <view class="swiper-box-button">
+              <!-- <view>{{item.digital}}</view> -->
+              <button class="mini-btn" type="warn" size="mini">+{{commom.Intercept(item.Value)}}%</button>
+            </view>
           </view>
         </view>
       </view>
@@ -46,18 +51,20 @@
   </swiper-item>
     <swiper-item>
     <scroll-view scroll-y style="height: 100%;">
-      <view wx:for="{{array}}"class="swiper-box-view" wx:key="index" bindtap="open" data-row='{{item}}'>
-        <view class="swiper-box-left">
-          <view>{{item.title}}</view>
-          <view class="swiper-box-subtitle">{{item.subtitle}}</view>
-        </view>
-        <view class="swiper-box-right">
-          <!-- <view class="swiper-box-canvas">
-            <ec-canvas  id="mychart-dom-line" canvas-id="mychart-line" tuData="{{ item.data }}" ec="{{ ec }}"></ec-canvas>
-          </view> -->
-          <view class="swiper-box-button">
-            <!-- <view>{{item.digital}}</view> -->
-            <button class="mini-btn" type="warn" size="mini">{{item.Increase}}</button>
+      <view class="swiper-box-list">
+        <view wx:for="{{onperData}}"class="swiper-box-view" wx:key="index" bindtap="open" data-row='{{item}}'>
+          <view class="swiper-box-left">
+            <view>{{item.Name}}</view>
+            <!-- <view class="swiper-box-subtitle">{{item.subtitle}}</view> -->
+          </view>
+          <view class="swiper-box-right">
+            <!-- <view class="swiper-box-canvas">
+              <ec-canvas  id="mychart-dom-line" canvas-id="mychart-line" tuData="{{ item.data }}" ec="{{ ec }}"></ec-canvas>
+            </view> -->
+            <view class="swiper-box-button">
+              <!-- <view>{{item.digital}}</view> -->
+              <button class="mini-btn" type="warn" size="mini">+{{commom.Intercept(item.Value)}}%</button>
+            </view>
           </view>
         </view>
       </view>

+ 10 - 1
pages/rise/rise.wxss

@@ -1,5 +1,6 @@
 page {
   background: #000;
+
 }  
 .swiper-tab {
   width: 100%;
@@ -26,7 +27,15 @@ page {
   overflow: hidden;
   color: #fff;
 }
-
+.swiper-box .swiper-box-list{
+  overflow:auto;
+  margin:auto;
+  position:absolute;
+  top:0;
+  bottom:0;
+  left:0;
+  right:0;
+}
 .swiper-box .swiper-box-view {
  display: flex;
  justify-content: space-between;

+ 21 - 1
utils/api.js

@@ -1,9 +1,29 @@
 
 var HOST_URI = 'http://192.168.1.60:6900';
 module.exports = {  
-  // 获取推荐文章列表数据
+  // 获取涨幅上周实际
   getinclast: function (obj) {
     var url =HOST_URI + '/inc/last';
     return url;
   },
+    // 获取涨幅上周预测
+    getinclpred: function (obj) {
+      var url =HOST_URI + '/inc/lpred';
+      return url;
+    },
+      // 获取涨幅下周预测
+  getincnpred: function (obj) {
+    var url =HOST_URI + '/inc/npred';
+    return url;
+  },
+  // 获取详情
+  postbyiid: function (obj) {
+    var url =HOST_URI + '/his/byiid';
+    return url;
+  },
+    // 获取iid获取
+    postnewsbyiid: function (obj) {
+      var url =HOST_URI + '/news/byiid';
+      return url;
+    },
 }