zjh 5 anos atrás
pai
commit
a87d3238d5

+ 45 - 34
pages/drop/drop.js

@@ -61,80 +61,91 @@ Page({
     },
     array:[
       {
-        title:'AppL',
-        subtitle:"APPL INC",
-        Increase:"1.22",
+        title:'BK0422',
+        subtitle:"交运物流",
+        Increase:"-1.22",
         digital:"33",
+        color:'#07c160',
         data:[52,56,355,444]
       },
       {
-        title:'AppL D',
-        subtitle:"APPL INC",
-        Increase:"1.22",
+        title:'BK0738',
+        subtitle:"多元金融",
+        Increase:"-1.22",
         digital:"33",
+        color:'#07c160',
         data:[52,56,355,444]
       },
       {
-        title:'AppL',
-        subtitle:"APPL INC",
-        Increase:"1.22",
+        title:'BK0450',
+        subtitle:"港口水运",
+        Increase:"-1.22",
+        color:'#07c160',
         digital:"33",
         data:[52,56,355,444,52,56,355,444,52,56,355,444,2]
       },
       {
-        title:'AppL',
-        subtitle:"APPL INC",
-        Increase:"1.22",
+        title:'BK0734',
+        subtitle:"珠宝首饰",
+        Increase:"-1.22",
+        color:'#07c160',
         digital:"33",
         data:[52,56,355,44554]
       },
       {
-        title:'AppL',
-        subtitle:"APPL INC",
-        Increase:"1.22",
+        title:'BK0471',
+        subtitle:"化纤行业",
+        Increase:"-1.22",
         digital:"33",
+        color:'#07c160',
         data:[52,56,355,444]
       },
       {
-        title:'AppL',
-        subtitle:"APPL INC",
-        Increase:"1.22",
+        title:'BK0485',
+        subtitle:"旅游酒店",
+        Increase:"-1.22",
         digital:"33",
+        color:'#07c160',
         data:[52,56,355,444]
       },
       {
-        title:'AppL',
-        subtitle:"APPL INC",
-        Increase:"1.22",
+        title:'BK0475',
+        subtitle:"银行",
+        Increase:"-1.22",
         digital:"33",
+        color:'#07c160',
         data:[52,56,355,44554]
       },
       {
-        title:'AppL',
-        subtitle:"APPL INC",
-        Increase:"1.22",
+        title:'BK0473',
+        subtitle:"券商信托",
+        Increase:"-1.22",
+        color:'#07c160',
         digital:"33",
         data:[52,56,355,444]
       },
       {
-        title:'AppL',
-        subtitle:"APPL INC",
-        Increase:"1.22",
+        title:'BK0474',
+        subtitle:"保险",
+        Increase:"-1.22",
         digital:"33",
+        color:'#07c160',
         data:[52,56,355,444]
       },
       {
-        title:'AppL',
-        subtitle:"APPL INC",
-        Increase:"1.22",
+        title:'BK0478',
+        subtitle:"有色金属",
+        Increase:"-1.22",
         digital:"33",
+        color:'#07c160',
         data:[52,56,355,44554]
       },
       {
-        title:'AppL',
-        subtitle:"APPL INC",
-        Increase:"1.22",
+        title:'BK0738',
+        subtitle:"多元金融",
+        Increase:"-1.22",
         digital:"33",
+        color:'#07c160',
         data:[52,56,355,44554]
       }
     ],
@@ -180,7 +191,7 @@ Page({
   open: function (e) {
     console.log(e)
     wx.navigateTo({
-      url: '../item/item'
+      url: '../item/item?row='+JSON.stringify(e.currentTarget.dataset.row)
     });
   }
 })

+ 4 - 4
pages/drop/drop.wxml

@@ -8,7 +8,7 @@
 <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-index="{{index}}">
+      <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>
@@ -19,7 +19,7 @@
           </view> -->
           <view class="swiper-box-button">
             <!-- <view>{{item.digital}}</view> -->
-            <button  class="mini-btn" type="primary" size="mini" >-{{item.Increase}}</button>
+            <button  class="mini-btn" type="primary" size="mini" >{{item.Increase}}</button>
           </view>
         </view>
       </view>
@@ -27,7 +27,7 @@
   </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-index="{{index}}">
+      <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>
@@ -46,7 +46,7 @@
   </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-index="{{index}}">
+      <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>

+ 1 - 1
pages/filter/filter.wxss

@@ -57,7 +57,7 @@ page{
   float: left; */
   /*每个item设置宽度是33.33%*/
   width: 100%;
-  height: 80px;
+  height: 40px;
   text-align: center;
 }
 .nav_right .nav_right_items image{

+ 25 - 6
pages/item/item.js

@@ -199,7 +199,7 @@ function initChart(canvas, width, height, dpr, data) {
       areaStyle: {
         color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
           offset: 0,
-          color: '#DF3E3E'
+          color: data.color
       }, {
           offset: 1,
           color: '#1C1C1C'
@@ -212,7 +212,7 @@ function initChart(canvas, width, height, dpr, data) {
 
           lineStyle: {
 
-            color: '#DF3E3E'
+            color: data.color
 
           }
 
@@ -272,20 +272,23 @@ Page({
       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:""
     },
       chartDatas:{
         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:""
       },
       object:{
         title:"appl",
         Withtitle:"appl inc",
         Volume:"545455",
-        float:"-5555"
+        float:"-5555",
+        color:'crimson',
       },
       aa:[
         {
@@ -427,7 +430,23 @@ 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 color='object.color'
+    var chartData="chartData.color"
+    var chartDatas="chartDatas.color"
+    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,
+    })
   },
 
   /**

+ 1 - 1
pages/item/item.wxml

@@ -8,7 +8,7 @@
  </view>
  <view class="tile-number">
    <text class="tile-number-Volume">{{object.Volume}}</text>
-    <text class="tile-number-float">{{object.float}}</text>
+    <text class="tile-number-float" style="color:{{object.color}}">{{object.float}}</text>
  </view>
 </view>
 <view class="swiper-tab">

+ 1 - 1
pages/item/item.wxss

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

+ 50 - 33
pages/rise/rise.js

@@ -60,77 +60,94 @@ Page({
     },
     array:[
       {
-        title:'AppL',
-        subtitle:"APPL INC",
-        Increase:"1.22",
+        title:'BK0422',
+        subtitle:"交运物流",
+        Increase:"+1.22",
         digital:"33",
+        color:'crimson',
         data:[52,56,355,444]
       },
       {
-        title:'AppL',
-        subtitle:"APPL INC",
-        Increase:"1.22",
+        title:'BK0738',
+        subtitle:"多元金融",
+        Increase:"+1.22",
         digital:"33",
+        color:'crimson',
+        data:[52,56,355,444]
+      },
+      {
+        title:'BK0450',
+        subtitle:"港口水运",
+        Increase:"+1.22",
+        digital:"33",
+        color:'crimson',
         data:[52,56,355,444,52,56,355,444,52,56,355,444,2]
       },
       {
-        title:'AppL',
-        subtitle:"APPL INC",
-        Increase:"1.22",
+        title:'BK0734',
+        subtitle:"珠宝首饰",
+        Increase:"+1.22",
         digital:"33",
+        color:'crimson',
         data:[52,56,355,44554]
       },
       {
-        title:'AppL',
-        subtitle:"APPL INC",
-        Increase:"1.22",
+        title:'BK0471',
+        subtitle:"化纤行业",
+        Increase:"+1.22",
         digital:"33",
+        color:'crimson',
         data:[52,56,355,444]
       },
       {
-        title:'AppL',
-        subtitle:"APPL INC",
-        Increase:"1.22",
+        title:'BK0485',
+        subtitle:"旅游酒店",
+        Increase:"+1.22",
         digital:"33",
+        color:'crimson',
         data:[52,56,355,444]
       },
       {
-        title:'AppL',
-        subtitle:"APPL INC",
-        Increase:"1.22",
+        title:'BK0475',
+        subtitle:"银行",
+        Increase:"+1.22",
         digital:"33",
+        color:'crimson',
         data:[52,56,355,44554]
       },
       {
-        title:'AppL',
-        subtitle:"APPL INC",
-        Increase:"1.22",
+        title:'BK0473',
+        subtitle:"券商信托",
+        Increase:"+1.22",
         digital:"33",
+        color:'crimson',
         data:[52,56,355,444]
       },
       {
-        title:'AppL',
-        subtitle:"APPL INC",
-        Increase:"1.22",
+        title:'BK0474',
+        subtitle:"保险",
+        Increase:"+1.22",
+        color:'crimson',
         digital:"33",
         data:[52,56,355,444]
       },
       {
-        title:'AppL',
-        subtitle:"APPL INC",
-        Increase:"1.22",
+        title:'BK0478',
+        subtitle:"有色金属",
+        Increase:"+1.22",
         digital:"33",
+        color:'crimson',
         data:[52,56,355,44554]
       },
       {
-        title:'AppL',
-        subtitle:"APPL INC",
-        Increase:"1.22",
+        title:'BK0738',
+        subtitle:"多元金融",
+        Increase:"+1.22",
         digital:"33",
+        color:'crimson',
         data:[52,56,355,44554]
       }
-    ],
-
+    ]
   },
   onLoad: function() {
     var that = this;
@@ -172,7 +189,7 @@ Page({
   open: function (e) {
     console.log(e)
     wx.navigateTo({
-      url: '../item/item'
+      url: '../item/item?row='+JSON.stringify(e.currentTarget.dataset.row)
     });
   }
 })

+ 4 - 4
pages/rise/rise.wxml

@@ -8,7 +8,7 @@
 <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-index="{{index}}">
+      <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>
@@ -27,7 +27,7 @@
   </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-index="{{index}}">
+      <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>
@@ -38,7 +38,7 @@
           </view> -->
           <view class="swiper-box-button">
             <!-- <view>{{item.digital}}</view> -->
-            <button class="mini-btn" type="warn" size="mini">+{{item.Increase}}</button>
+            <button class="mini-btn" type="warn" size="mini">{{item.Increase}}</button>
           </view>
         </view>
       </view>
@@ -46,7 +46,7 @@
   </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-index="{{index}}">
+      <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>