Handy_Cao 2 jaren geleden
bovenliggende
commit
d46e7c43ec

+ 2 - 1
GuangZuan/miniprogram/app.json

@@ -84,7 +84,8 @@
         "pages/myperformance/breach/index",
         "pages/modifypwd/index",
         "pages/inoutgold/index",
-        "pages/myorders/mydelistingapplydetail/index"
+        "pages/myorders/mydelistingapplydetail/index",
+        "pages/about/protocol/index"
       ]
     },
     {

+ 0 - 3
GuangZuan/miniprogram/app.ts

@@ -17,9 +17,6 @@ App({
     /// 获取iPhone底部安全区域
     wx.getSystemInfo({
       success: res => {
-        
-        console.log(res)
-
         this.globalData.safeBottom = res.screenHeight-res.safeArea.bottom
         this.globalData.windowHeight = res.windowHeight
         this.globalData.navHeight = res.screenHeight - res.windowHeight - res.statusBarHeight

+ 3 - 0
GuangZuan/miniprogram/mMine/pages/about/protocol/index.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 1 - 0
GuangZuan/miniprogram/mMine/pages/about/protocol/index.less

@@ -0,0 +1 @@
+/* mMine/pages/about/protocol/index.wxss */

+ 66 - 0
GuangZuan/miniprogram/mMine/pages/about/protocol/index.ts

@@ -0,0 +1,66 @@
+// mMine/pages/about/protocol/index.ts
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 1 - 0
GuangZuan/miniprogram/mMine/pages/about/protocol/index.wxml

@@ -0,0 +1 @@
+<!--mMine/pages/about/protocol/index.wxml-->

+ 1 - 0
GuangZuan/miniprogram/mMine/pages/myperformance/detail/index.ts

@@ -221,6 +221,7 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad(options: any) {
+    console.log(options)
     /// 数据处理
     var item: GuangZuan.MyPerformanc = JSON.parse(options.item)
     

+ 5 - 1
GuangZuan/miniprogram/mMine/pages/myperformance/his/index.less

@@ -81,7 +81,6 @@
     }
 
     :last-child {
-      width: 25%;
       text-align: right;
     }
   }
@@ -92,6 +91,11 @@
   }
 }
 
+/* 选中时添加这个 样式 */
+.active {
+  background: #E6F1FF;
+}
+
 .van-swipe-cell__right {
   height: inherit;
   color: white;

+ 16 - 2
GuangZuan/miniprogram/mMine/pages/myperformance/his/index.ts

@@ -9,6 +9,8 @@ Page({
    * 页面的初始数据
    */
   data: {
+    /// 底部安全区域
+    safeBottom: getApp().globalData.safeBottom,
     /// tab激活索引
     active: 0,
     /// tabs
@@ -23,7 +25,7 @@ Page({
     /// 查询数据
     datas: <GuangZuan.MyPerformanc[]>[],
     /// 显示的值
-    values: <{}[]>[],
+    values: [{ up: [''], dwn: [''], isChecked: false }],
     /// 左滑宽度
     width: 50
   },
@@ -60,7 +62,8 @@ Page({
                               isnullstr(obj.zscolortype1display)+' | '+
                               (obj.weight === 0 ? '--' : obj.weight.toFixed(2))+' | '+
                               isnullstr(obj.accountname),
-                            getPerformancestatus(obj.performancestatus)]}
+                            getPerformancestatus(obj.performancestatus)], 
+                        isChecked: false }
               })
             })
           })
@@ -96,6 +99,17 @@ Page({
   },
 
   /**
+   * 每行选中触发事件
+   */
+  onSelectItem(e: any) {
+    var obj = this.data.values[e.currentTarget.id]
+    obj.isChecked = !obj.isChecked
+    this.data.values[e.currentTarget.id] = obj
+    /// 数据赋值
+    this.setData({ values: this.data.values })
+  },
+
+  /**
    * 按钮点击响应事件
    */
   onButtonPressed(e: any) {

+ 4 - 4
GuangZuan/miniprogram/mMine/pages/myperformance/his/index.wxml

@@ -7,7 +7,7 @@
 
   <!-- tabs -->
   <view class="tab-view">
-    <van-tabs animated color="#2270D9" line-width="20px" title-inactive-color="#333" title-active-color="#407DB8">
+    <van-tabs active="{{ active }}" sticky animated bind:click="onTabChange" color="#2270D9" line-width="20px" title-inactive-color="#333" title-active-color="#407DB8">
       <van-tab wx:for="{{ tabs }}" wx:for-item="itm" wx:key="id" id="{{ itm.id }}" title="{{ itm.name }}"/>
     </van-tabs>  
   </view>
@@ -24,10 +24,10 @@
 </view>
 
 <!-- 内容滚动视图 --> 
-<scroll-view class="content-view">
+<scroll-view class="content-view" style="padding-bottom: {{ safeBottom }}px;">
   <!-- 数据 --> 
-  <van-swipe-cell wx:for="{{ values }}" wx:for-item="itm" wx:if-index="idx" wx:key="idx" right-width="{{ 50 }}">
-    <view class="item-view">
+  <van-swipe-cell wx:for="{{ values }}" wx:for-item="itm" wx:for-index="idx" id="{{ idx }}" wx:key="idx" right-width="{{ 50 }}" bind:click="onSelectItem">
+    <view class="item-view {{ values[idx].isChecked ? 'active' : '' }}">
       <view class="item-view-up">
         <text wx:for="{{ itm.up }}" wx:for-item="data" wx:for-index="idx" wx:key="idx">{{ data }}</text>
       </view>

+ 1 - 1
GuangZuan/miniprogram/pages/trade/index.less

@@ -70,7 +70,7 @@
 
   .vanSwipeCell-item {
     background-color: #fff;
-    margin: 5px 5px 0px 5px;
+    margin: 5px 7.5px 0px 7.5px;
     border-radius: 10px;
     display: flex;
     flex-direction: column;