xulihua 5 år sedan
förälder
incheckning
586e30e202
5 ändrade filer med 49 tillägg och 63 borttagningar
  1. 19 27
      pages/attention/attention.js
  2. 2 25
      pages/attention/attention.wxml
  3. 3 4
      pages/me/me.js
  4. 15 6
      pages/me/me.wxml
  5. 10 1
      pages/me/me.wxss

+ 19 - 27
pages/attention/attention.js

@@ -60,39 +60,31 @@ Page({
     },
     array:[
       {
-        title:'AppL',
-        subtitle:"APPL INC",
-        Increase:"1.22",
+        title:'BK0422',
+        subtitle:"交运物流",
+        Increase:"+1.22",
         digital:"33",
-        data:[52,56,355,444]
+        color:'crimson',
+        data:[52,56,355,444],
+        keep:'已关注'
       },
       {
-        title:'AppL',
-        subtitle:"APPL INC",
-        Increase:"1.22",
+        title:'BK0738',
+        subtitle:"多元金融",
+        Increase:"+1.22",
         digital:"33",
-        data:[52,56,355,444,52,56,355,444,52,56,355,444,2]
+        color:'crimson',
+        data:[52,56,355,444],
+        keep:'已关注'
       },
       {
-        title:'AppL',
-        subtitle:"APPL INC",
-        Increase:"1.22",
+        title:'BK0450',
+        subtitle:"港口水运",
+        Increase:"+1.22",
         digital:"33",
-        data:[52,56,355,44554]
-      },
-      {
-        title:'AppL',
-        subtitle:"APPL INC",
-        Increase:"1.22",
-        digital:"33",
-        data:[52,56,355,444]
-      },
-      {
-        title:'AppL',
-        subtitle:"APPL INC",
-        Increase:"1.22",
-        digital:"33",
-        data:[52,56,355,444]
+        color:'crimson',
+        data:[52,56,355,444,52,56,355,444,52,56,355,444,2],
+        keep:'已关注'
       }
     ],
 
@@ -113,7 +105,7 @@ Page({
   open: function (e) {
     console.log(e)
     wx.navigateTo({
-      url: '../item/item'
+      url: '../item/item?row='+JSON.stringify(e.currentTarget.dataset.row)
     });
   }
 })

+ 2 - 25
pages/attention/attention.wxml

@@ -3,37 +3,14 @@
 <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>
         </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>
-        </view>
-      </view>
-    </scroll-view>
-  </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 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>
+            <button class="mini-btn" type="warn" size="mini">{{item.Increase}}</button>
           </view>
         </view>
       </view>

+ 3 - 4
pages/me/me.js

@@ -15,13 +15,12 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
+    console.log(app.globalData);
     if (app.globalData.userInfo) {
       this.setData({
-        userInfo: app.globalData.userInfo, //将全局用户信息赋值给变量
+        userInfo: app.globalData.userInfo, 
       })
-    } else if (this.data.canIUse) { //getUserInfo在当前版本可用
-      // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回
-      // 所以此处加入 callback 以防止这种情况
+    } else if (this.data.canIUse) { 
       app.userInfoReadyCallback = res => {
         this.setData({
           userInfo: res.userInfo,

+ 15 - 6
pages/me/me.wxml

@@ -3,10 +3,13 @@
    <cover-image src='{{userInfo.avatarUrl}}'  class="personLogo"></cover-image>
       <text class="phoneText">{{userInfo.nickName}}</text>
   </view>
+  <view>
+     <button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber"></button>
+  </view>
   <view class="seasonCard">
       <view class="seasonLeft">
-        <text>季卡会员</text>
-        <text>888</text>
+        <text style="position:relative;top:5px;">季卡会员</text>
+        <text style="position:relative;top:5px;">888</text>
         <button type="default" plain="true" class="seasonOpen">立即开通</button>
       </view>
       <view class="seasonRight">
@@ -15,8 +18,8 @@
   </view>
   <view class="yearCard">
       <view class="yearLeft">
-        <text>年卡会员</text>
-        <text>8888</text>
+        <text style="position:relative;top:5px;">年卡会员</text>
+        <text style="position:relative;top:5px;">8888</text>
         <button type="default" plain="true" class="yearOpen">立即开通</button>
       </view>
       <view class="yearRight">
@@ -24,8 +27,14 @@
       </view> 
   </view>
   <view class="mineButton">
-      <view class="mine">我的</view>
-      <view class="mineAttion" bindtap="gotoAttention">关注</view>
+      <view class="mine">
+        <text class="mineText">我的</text>
+        <text class="mineRight">></text>
+        </view>
+      <view class="mineAttion" bindtap="gotoAttention">
+          <text class="keepText">关注</text>
+          <text class="mineRight">></text>
+      </view>
   </view> 
      
 </view>

+ 10 - 1
pages/me/me.wxss

@@ -44,7 +44,7 @@
   margin-right:5%;
 }
 .seasonOpen,.yearOpen{
-  margin-top:10px;
+  margin-top:15px;
 }
 .mineButton{
   margin-top:10px;
@@ -57,6 +57,15 @@
   line-height: 48px;
   border:1px solid #373535;
   text-align:left;
+  overflow:hidden;
   background:#101010;
   /* margin-left:6%; */
+}
+.mineText,.keepText{
+  float:left;
+  margin-left:6%;
+}
+.mineRight{
+  float:right;
+  margin-right:6%;
 }