浏览代码

代码提交;

Handy_Cao 3 年之前
父节点
当前提交
ca94216d90
共有 50 个文件被更改,包括 871 次插入411 次删除
  1. 19 8
      GuangZuan/miniprogram/app.json
  2. 1 10
      GuangZuan/miniprogram/app.less
  3. 1 1
      GuangZuan/miniprogram/app.ts
  4. 1 0
      GuangZuan/miniprogram/common/common.less
  5. 0 3
      GuangZuan/miniprogram/common/common.wxss
  6. 4 0
      GuangZuan/miniprogram/components/news-item/news-item.json
  7. 31 0
      GuangZuan/miniprogram/components/news-item/news-item.less
  8. 23 0
      GuangZuan/miniprogram/components/news-item/news-item.ts
  9. 8 0
      GuangZuan/miniprogram/components/news-item/news-item.wxml
  10. 4 6
      GuangZuan/miniprogram/components/num-range/num-range.less
  11. 23 18
      GuangZuan/miniprogram/mHome/pages/calculator/calculator.less
  12. 1 1
      GuangZuan/miniprogram/mHome/pages/calculator/calculator.wxml
  13. 61 52
      GuangZuan/miniprogram/mHome/pages/exchangeRate/exchangeRate.less
  14. 24 25
      GuangZuan/miniprogram/mHome/pages/goldPrice/goldPrice.less
  15. 4 0
      GuangZuan/miniprogram/mHome/pages/goodsdetail/goodsdetail.json
  16. 1 0
      GuangZuan/miniprogram/mHome/pages/goodsdetail/goodsdetail.less
  17. 66 0
      GuangZuan/miniprogram/mHome/pages/goodsdetail/goodsdetail.ts
  18. 1 0
      GuangZuan/miniprogram/mHome/pages/goodsdetail/goodsdetail.wxml
  19. 28 7
      GuangZuan/miniprogram/mHome/pages/msg/msglist/msglist.less
  20. 4 2
      GuangZuan/miniprogram/mHome/pages/msg/msglist/msglist.wxml
  21. 0 2
      GuangZuan/miniprogram/mHome/pages/search/search.json
  22. 37 44
      GuangZuan/miniprogram/mHome/pages/search/search.less
  23. 1 1
      GuangZuan/miniprogram/mHome/pages/search/search.ts
  24. 3 9
      GuangZuan/miniprogram/mHome/pages/search/search.wxml
  25. 4 0
      GuangZuan/miniprogram/mMine/pages/listingdetail/listingdetail.json
  26. 1 0
      GuangZuan/miniprogram/mMine/pages/listingdetail/listingdetail.less
  27. 66 0
      GuangZuan/miniprogram/mMine/pages/listingdetail/listingdetail.ts
  28. 1 0
      GuangZuan/miniprogram/mMine/pages/listingdetail/listingdetail.wxml
  29. 55 1
      GuangZuan/miniprogram/mMine/pages/myorders/myorders.less
  30. 64 1
      GuangZuan/miniprogram/mMine/pages/myorders/myorders.ts
  31. 32 1
      GuangZuan/miniprogram/mMine/pages/myorders/myorders.wxml
  32. 1 2
      GuangZuan/miniprogram/mMine/pages/settings/settings.json
  33. 4 13
      GuangZuan/miniprogram/mMine/pages/settings/settings.ts
  34. 0 2
      GuangZuan/miniprogram/mTrade/pages/listing/listing.json
  35. 67 34
      GuangZuan/miniprogram/mTrade/pages/listing/listing.less
  36. 44 11
      GuangZuan/miniprogram/mTrade/pages/listing/listing.wxml
  37. 1 2
      GuangZuan/miniprogram/pages/circle/circle.json
  38. 1 29
      GuangZuan/miniprogram/pages/circle/circle.less
  39. 11 3
      GuangZuan/miniprogram/pages/circle/circle.ts
  40. 5 8
      GuangZuan/miniprogram/pages/circle/circle.wxml
  41. 2 1
      GuangZuan/miniprogram/pages/home/home.json
  42. 34 51
      GuangZuan/miniprogram/pages/home/home.less
  43. 9 1
      GuangZuan/miniprogram/pages/home/home.ts
  44. 11 14
      GuangZuan/miniprogram/pages/home/home.wxml
  45. 4 1
      GuangZuan/miniprogram/pages/mine/mine.less
  46. 4 2
      GuangZuan/miniprogram/pages/mine/mine.wxml
  47. 1 2
      GuangZuan/miniprogram/pages/trade/trade.json
  48. 40 9
      GuangZuan/miniprogram/pages/trade/trade.less
  49. 42 28
      GuangZuan/miniprogram/pages/trade/trade.ts
  50. 21 6
      GuangZuan/miniprogram/pages/trade/trade.wxml

+ 19 - 8
GuangZuan/miniprogram/app.json

@@ -10,15 +10,21 @@
   "preloadRule": {
     "pages/mine/mine": {
       "network": "all",
-      "packages": ["mMine"]
+      "packages": [
+        "mMine"
+      ]
     },
     "pages/trade/trade": {
       "network": "all",
-      "packages": ["mTrade"]
+      "packages": [
+        "mTrade"
+      ]
     },
     "pages/home/home": {
       "network": "all",
-      "packages": ["mHome"]
+      "packages": [
+        "mHome"
+      ]
     }
   },
   "subPackages": [
@@ -28,13 +34,14 @@
       "pages": [
         "pages/bond/bond",
         "pages/inspection/inspection",
-        "pages/goldPrice/goldPrice",
+        "pages/goldprice/goldprice",
         "pages/exchangeRate/exchangeRate",
         "pages/calculator/calculator",
         "pages/search/search",
         "pages/msg/msglist/msglist",
         "pages/msg/msgdetail/msgdetail",
-        "pages/news/news"
+        "pages/news/news",
+        "pages/goodsdetail/goodsdetail"
       ]
     },
     {
@@ -51,9 +58,10 @@
         "pages/myreports/myreports",
         "pages/ordersearch/ordersearch",
         "pages/spotlisting/spotlisting",
-        "pages/bank/bank"
+        "pages/bank/bank",
+        "pages/listingdetail/listingdetail"
       ]
-    }, 
+    },
     {
       "root": "mTrade",
       "name": "mTrade",
@@ -71,7 +79,10 @@
     "van-nav-bar": "@vant/weapp/nav-bar/index",
     "van-field": "@vant/weapp/field/index",
     "van-config-provider": "@vant/weapp/config-provider/index",
-    "van-icon": "@vant/weapp/icon/index"
+    "van-icon": "@vant/weapp/icon/index",
+    "van-skeleton": "@vant/weapp/skeleton/index",
+    "van-tab": "@vant/weapp/tab/index",
+    "van-tabs": "@vant/weapp/tabs/index"
   },
   "window": {
     "backgroundTextStyle": "dark",

+ 1 - 10
GuangZuan/miniprogram/app.less

@@ -1,10 +1 @@
-/**app.wxss**/
-.container {
-  height: 100%;
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  justify-content: space-between;
-  padding: 200rpx 0;
-  box-sizing: border-box;
-} 
+/**app.wxss**/

+ 1 - 1
GuangZuan/miniprogram/app.ts

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

+ 1 - 0
GuangZuan/miniprogram/common/common.less

@@ -0,0 +1 @@
+@import '@vant/weapp/common/index.wxss';

+ 0 - 3
GuangZuan/miniprogram/common/common.wxss

@@ -1,3 +0,0 @@
-Page {
-  margin: 20px;
-}

+ 4 - 0
GuangZuan/miniprogram/components/news-item/news-item.json

@@ -0,0 +1,4 @@
+{
+  "component": true,
+  "usingComponents": {}
+}

+ 31 - 0
GuangZuan/miniprogram/components/news-item/news-item.less

@@ -0,0 +1,31 @@
+/* components/news-item/news-item.wxss */
+
+.new-lists-item {
+  display: flex;
+  border-bottom: 1px solid #f0f0f0;
+  height: 120px;
+  align-content: center;
+  align-items: center;
+
+  image {
+    height: 80px;
+    margin-left: 10px;
+    border-radius: 10px;
+  }
+
+  .new-lists-item-left {
+    display: grid;
+
+    text:nth-child(1) {
+      width: 100%;
+      font-size: 16px;
+      color: #333;
+    }
+    
+    text:nth-child(2) {
+      font-size: 13px;
+      color: #666;
+      margin-top: 10px;
+    }
+  }
+}

+ 23 - 0
GuangZuan/miniprogram/components/news-item/news-item.ts

@@ -0,0 +1,23 @@
+// components/news-item/news-item.ts
+Component({
+  /**
+   * 组件的属性列表
+   */
+  properties: {
+
+  },
+
+  /**
+   * 组件的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 组件的方法列表
+   */
+  methods: {
+
+  }
+})

+ 8 - 0
GuangZuan/miniprogram/components/news-item/news-item.wxml

@@ -0,0 +1,8 @@
+<!--components/news-item/news-item.wxml-->
+<view class="new-lists-item" bindtap="goToNews">
+  <view class="new-lists-item-left">
+    <text>培育钻品牌有了新玩法</text>
+    <text>培育钻品牌有了新玩法上游技术升级和下游消费者教育走向成熟,两到三年的快速增长后走向成熟。输入框。该组件是原生组件,使用时请注意相关限制</text>
+  </view>
+  <image src="https://img.yzcdn.cn/vant/cat.jpeg"></image>
+</view>

+ 4 - 6
GuangZuan/miniprogram/components/num-range/num-range.less

@@ -10,13 +10,11 @@
 
 .left, .right {
   justify-content: space-between;
-  padding: 0px 0px;
   border: 1px solid #ccc;
   align-items: center;
   align-content: center;
   height: 100%;
-  border-radius: 10px;
-  padding: 0px 0px 0px 10px;
+  border-radius: 20px;
 }
 
 .left text, .right text {
@@ -24,8 +22,8 @@
   width: 40px;
   height: 100%;
   padding-right: 10px;
-  background-color: rosybrown;
-  border-top-right-radius: 10px;
-  border-bottom-right-radius: 10px;
+  background-color: blueviolet;
+  border-top-right-radius: 17.5px;
+  border-bottom-right-radius: 17.5px;
   color: white;
 }

+ 23 - 18
GuangZuan/miniprogram/mHome/pages/calculator/calculator.less

@@ -4,6 +4,7 @@
   display: flex;
   flex-direction: row;
   width: 100%;
+  align-items: flex-start;
 }
 
 .shape {
@@ -18,13 +19,13 @@
   text-align: center;
   border-bottom: 1px solid #ccc;
   border-right: 1px solid #ccc;
-  height: 100px;
-}
+  height: 90px;
 
-.shape-item text {
-  margin-top: 5px;
-  font-size: 28rpx;
-  color: #333;
+  text {
+    margin-top: 5px;
+    font-size: 22rpx;
+    color: #333;
+  }
 }
 
 .color, .neatness {
@@ -38,22 +39,26 @@
   flex-direction: row;
   width: 58%;
   height: 370px;
-}
 
-.calculator view {
-  width: 50%;
-  height: 100px;
-  display: grid;
-  align-content: center;
-  border-bottom: 1px solid #ddd;
-  justify-content: start;
-}
+  view {
+    width: 50%;
+    height: 100px;
+    display: grid;
+    align-content: center;
+    border-bottom: 1px solid #ddd;
+    justify-content: start;
 
-.calculator view text {
-  margin: 10px;
-  color: #333;
+    text {
+      margin: 10px;
+      color: #333;
+    }
+  }
 }
 
+
+
+
+
 input {
   margin: 0px 0px 0px 10px;
   background-color: white;

+ 1 - 1
GuangZuan/miniprogram/mHome/pages/calculator/calculator.wxml

@@ -4,7 +4,7 @@
   <!--  形状  -->
   <scroll-view scroll-y class="shape">
     <view class="shape-item" wx:for="{{shapes}}" wx:key="id" wx:for-index="idx" wx:for-item="itm">
-      <image src="https://img.yzcdn.cn/vant/cat.jpeg" style="width: 50px; height: 50px;"></image>
+      <image src="https://img.yzcdn.cn/vant/cat.jpeg" style="width: 40px; height: 40px;"></image>
       <text>{{itm.name}}</text>
     </view>
   </scroll-view>

+ 61 - 52
GuangZuan/miniprogram/mHome/pages/exchangeRate/exchangeRate.less

@@ -3,18 +3,18 @@
 .base-currency {
   display: grid;
   width: 100%;
-}
 
-.base-currency .title {
-  display: flex;
-  justify-content: space-between;
-  background-color: #f0f0f0;
-}
+  .title {
+    display: flex;
+    justify-content: space-between;
+    background-color: #f0f0f0;
 
-.base-currency .title text {
-  font-size: 10px;
-  color: #666;
-  padding: 10px 10px;
+    text {
+      font-size: 10px;
+      color: #666;
+      padding: 10px 10px;
+    }
+  }
 }
 
 .base-rate {
@@ -25,42 +25,48 @@
   width: 95%;
   padding-left: 10px;
   margin-top: 5px;
-}
 
-.base-rate text {
-  width: 80px;
-  font-size: 16px;
-  color: #333;
-  text-align: left;
-  padding-left: 10px;
-  margin-bottom: 10px;
+  text {
+    width: 80px;
+    font-size: 16px;
+    color: #333;
+    text-align: left;
+    padding-left: 10px;
+    margin-bottom: 10px;
+  }
 }
 
+
+
 .input-rate {
   display: grid;
   width: 100%;
-}
 
-.input-rate text {
-  font-size: 10px;
-  color: #666;
-  text-align: right;
-  width: 95%;
-  margin-top: 10px;
+  text {
+    font-size: 10px;
+    color: #666;
+    text-align: right;
+    width: 95%;
+    margin-top: 10px;
+  }
 }
 
+
+
 .ex-currency .title {
   display: flex;
   justify-content: space-between;
   background-color: #f0f0f0;
-}
 
-.ex-currency .title text {
-  font-size: 10px;
-  color: #666;
-  padding: 10px 10px;
+  text {
+    font-size: 10px;
+    color: #666;
+    padding: 10px 10px;
+  }
 }
 
+
+
 .ex-rate {
   display: flex;
   justify-content: space-between;
@@ -69,34 +75,37 @@
   width: 95%;
   padding-left: 10px;
   margin-top: 5px;
-}
 
-.ex-rate text {
-  width: 60px;
-  font-size: 16px;
-  color: #333;
-  text-align: left;
-  padding-left: 10px;
-  margin-bottom: 10px;
+  text {
+    width: 60px;
+    font-size: 16px;
+    color: #333;
+    text-align: left;
+    padding-left: 10px;
+    margin-bottom: 10px;
+  }
 }
 
 .ex-result-rate {
   display: grid;
   width: 100%;
-}
 
-.ex-result-rate text:nth-child(1) {
-  font-size: 16px;
-  color: #333;
-  text-align: right;
-  width: 95%;
-  margin-top: 10px;
+  text:nth-child(1) {
+    font-size: 16px;
+    color: #333;
+    text-align: right;
+    width: 95%;
+    margin-top: 10px;
+  }
+
+  text:nth-child(2) {
+    font-size: 10px;
+    color: #666;
+    text-align: right;
+    width: 95%;
+    margin-top: 10px;
+  }
 }
 
-.ex-result-rate text:nth-child(2) {
-  font-size: 10px;
-  color: #666;
-  text-align: right;
-  width: 95%;
-  margin-top: 10px;
-}
+
+

+ 24 - 25
GuangZuan/miniprogram/mHome/pages/goldPrice/goldPrice.less

@@ -4,34 +4,33 @@
   display: flex;
   flex-direction: column;
   align-items: center;
-}
 
-.title {
-  font-size: 20px;
-  color: #333;
-  margin: 20px;
-}
+  .title {
+    font-size: 20px;
+    color: #333;
+    margin: 20px;
+  }
 
-.table_header {
-  border-bottom: 1px solid #f0f0f0;
+  .scroll-view {
+    width: 90%;
+    border-radius: 20px;
+    height: 700px;
+  
+    .table_header, .table_content {
+      height: 44px;
+      display: flex;
+      border-bottom: 1px solid #f0f0f0;  
+      align-items: center;
+  }
+  
+    text {
+      font-size: 26rpx;
+      color: #333;
+      width: 25%;
+      text-align: center;
+    }
+  }
 }
 
-.scroll-view {
-  width: 90%;
-  border-radius: 20px;
-  height: 700px;
-}
 
-.table_header, .table_content {
-  height: 44px;
-  display: flex;
-  border-bottom: 1px solid #f0f0f0;  
-  align-items: center;
-}
 
-.scroll-view text {
-  font-size: 26rpx;
-  color: #333;
-  width: 25%;
-  text-align: center;
-}

+ 4 - 0
GuangZuan/miniprogram/mHome/pages/goodsdetail/goodsdetail.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "商品信息"
+}

+ 1 - 0
GuangZuan/miniprogram/mHome/pages/goodsdetail/goodsdetail.less

@@ -0,0 +1 @@
+/* mHome/pages/goodsdetail/goodsdetail.wxss */

+ 66 - 0
GuangZuan/miniprogram/mHome/pages/goodsdetail/goodsdetail.ts

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

+ 1 - 0
GuangZuan/miniprogram/mHome/pages/goodsdetail/goodsdetail.wxml

@@ -0,0 +1 @@
+<!--mHome/pages/goodsdetail/goodsdetail.wxml-->

+ 28 - 7
GuangZuan/miniprogram/mHome/pages/msg/msglist/msglist.less

@@ -4,15 +4,36 @@
   display: flex;
   flex-direction: row;
   justify-content: space-between;
-}
 
-.msg_title {
-  font-size: 28rpx;
-  color: #333333;
+  .msg_title {
+    font-size: 28rpx;
+    color: #333333;
+  }
+
+  .msg_date {
+    font-size: 22rpx;
+    color: #999999;
+  }
 }
 
-.msg_date {
-  font-size: 22rpx;
-  color: #999999;
+.content {
+  width: 100%;
+  text-align: left;
+  /// 不允许换行
+  // white-space: nowrap;
+  /// 溢出部分隐藏
+  overflow: hidden;
+  /// 文本移除后 使用...替换
+  text-overflow: ellipsis;
+  -webkit-line-clamp: 2;
+  /* 设置或检索伸缩盒对象的子元素的排列方式 */
+  max-height: 50px;
+  /* 设置或检索伸缩盒对象的子元素的排列方式 */
+  display: -webkit-box;
+  /* 设置或检索伸缩盒对象的子元素的排列方式 */
+  -webkit-box-orient: vertical;
 }
 
+
+
+

+ 4 - 2
GuangZuan/miniprogram/mHome/pages/msg/msglist/msglist.wxml

@@ -1,11 +1,13 @@
 <!--pages/msg/msglist/msglist.wxml-->
 
 <van-cell-group>
-  <van-cell wx:for="{{msgs}}" wx:key="id" wx:for-index="idx" wx:for-item="itm" bind:click="goToMsgDetail">
+  <van-cell custom-class="msg-item" wx:for="{{msgs}}" wx:key="id" wx:for-index="idx" wx:for-item="itm" bind:click="goToMsgDetail">
     <view solt="title" class="view_top_content">
       <text class="msg_title">{{itm.title}}</text>
       <text class="msg_date">{{itm.date}}</text>
     </view>
-    <text class="content" solt="label" class="van-multi-ellipsis--l2">{{itm.content}}</text>
+    <view class="content">
+      <text>{{itm.content}}</text>
+    </view>
   </van-cell>
 </van-cell-group>

+ 0 - 2
GuangZuan/miniprogram/mHome/pages/search/search.json

@@ -1,7 +1,5 @@
 {
   "usingComponents": {
-    "van-tab": "@vant/weapp/tab/index",
-    "van-tabs": "@vant/weapp/tabs/index",
     "van-cell": "@vant/weapp/cell/index",
     "van-cell-group": "@vant/weapp/cell-group/index",
     "van-radio": "@vant/weapp/radio/index",

+ 37 - 44
GuangZuan/miniprogram/mHome/pages/search/search.less

@@ -17,32 +17,32 @@
   border-bottom: 1px solid #f0f0f0;
   align-items: center;
   margin: 0px 10px;
-}
-
-.cell-view text {
-  width: 90px;
-  text-align: left;
-  color: #333;
-  font-size: 26rpx;
-}
 
-.cell-view view {
-  display: flex;
-  flex-direction: row;
-  flex-wrap: wrap;
-  width: 100%;
-}
-
-.cell-view view button {
-  margin: 5px;
-  height: 36px;
-  color: #333;
-  width: 21.3%;
-}
-
-.cell-view button {
-  color: #000;
-  font-size: 24rpx;
+  text {
+    width: 90px;
+    text-align: left;
+    color: #333;
+    font-size: 26rpx;
+  }
+
+  view {
+    display: flex;
+    flex-direction: row;
+    flex-wrap: wrap;
+    width: 100%;
+
+    button {
+      margin: 5px;
+      height: 36px;
+      color: #333;
+      width: 21.3%;
+    }
+  }
+
+  button {
+    color: #000;
+    font-size: 24rpx;
+  }
 }
 
 .totalweight view, .weight view, .ctweight view {
@@ -62,31 +62,24 @@
   height: 60px;
 }
 
-.totalweight-range {
-  display: flex;
-  flex-direction: row;
-  flex-wrap: nowrap;
-  height: 100%;
-}
-
 .buttom_view {
   display: flex;
   flex-direction: row;
   justify-content: space-between;
   margin-top: 20px;
-}
-
-.buttom_view button {
-  width: 45%;
-  color: white;
-}
-
-.buttom_view button:nth-child(1) {
-  background-color: red;
-}
 
-.buttom_view button:nth-child(2) {
-  background-color: purple;
+  button {
+    width: 45%;
+    color: white;
+  }
+
+  button:nth-child(1) {
+    background-color: red;
+  }
+  
+  button:nth-child(2) {
+    background-color: purple;
+  }
 }
 
 num-range {

+ 1 - 1
GuangZuan/miniprogram/mHome/pages/search/search.ts

@@ -108,7 +108,7 @@ Page({
   },
 
   /// 单选框
-  onChange(e) {
+  onChange(e: any) {
     console.log(e)
     switch (e.target.id) {
       case 'shape':   /// 形状

+ 3 - 9
GuangZuan/miniprogram/mHome/pages/search/search.wxml

@@ -84,7 +84,7 @@
   <view class="cell-view warehouse"> 
     <text>仓库</text>
     <view class="warehouse-content">
-      <button style="width: 200px;">---全部---</button>
+      <button style="width: 95%;">---全部---</button>
     </view>
   </view>
 
@@ -92,7 +92,7 @@
    <view class="cell-view currency"> 
     <text>货币</text>
     <view class="currency-radio">
-      <van-radio-group value="{{ currency }}" bind:change="onChange">
+      <van-radio-group value="{{ currency }}" direction="horizontal" bind:change="onChange">
         <van-radio name="RMB">人民币</van-radio>
         <van-radio name="DOLLAR">美元</van-radio>
       </van-radio-group>
@@ -110,9 +110,7 @@
   <!-- 总重量 -->
   <view class="cell-view totalweight" wx:if="{{(active === 0) || (active === 2)}}"> 
     <text>总重量</text>
-    <view class="totalweight-range">
-      <num-range></num-range>
-    </view>
+    <num-range></num-range>
   </view>
 
   <!-- 单颗重量 -->
@@ -150,7 +148,3 @@
 
 
 
-
-
-
-

+ 4 - 0
GuangZuan/miniprogram/mMine/pages/listingdetail/listingdetail.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "挂牌信息"
+}

+ 1 - 0
GuangZuan/miniprogram/mMine/pages/listingdetail/listingdetail.less

@@ -0,0 +1 @@
+/* mMine/pages/listingdetail/listingdetail.wxss */

+ 66 - 0
GuangZuan/miniprogram/mMine/pages/listingdetail/listingdetail.ts

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

+ 1 - 0
GuangZuan/miniprogram/mMine/pages/listingdetail/listingdetail.wxml

@@ -0,0 +1 @@
+<!--mMine/pages/listingdetail/listingdetail.wxml-->

+ 55 - 1
GuangZuan/miniprogram/mMine/pages/myorders/myorders.less

@@ -1 +1,55 @@
-/* mMine/pages/myorders/myorders.wxss */
+/* mMine/pages/myorders/myorders.wxss */
+
+.title-view {
+  background-color: #f0f0f0;
+}
+
+.title-view, .order-list-item-row {
+  padding: 12px 0px;
+  display: flex;
+  justify-content: space-around;
+  align-items: center;
+  border-bottom: 1px solid #f0f0f0;
+}
+
+.order-list-item {
+  display: grid;
+}
+
+.order-list-item-btn {
+  padding: 7.5px 0px;
+  display: flex;
+  justify-content: end;
+  width: 190px;
+  position: relative;
+  right: -235px;
+  height: 30px;
+
+  button {
+    font-size: 12px;
+    color: white;
+    width: 80px;
+  }
+
+  .goods-detail {
+    background-color: rebeccapurple;
+  }
+
+  .listing-detail {
+    background-color: yellowgreen;
+  }
+}
+
+.title-view text {
+  font-size: 12px;
+  color: #666;
+  text-align: center;
+  border-right: 1px solid #f0f0f0;
+}
+
+.order-list-item text {
+  font-size: 14px;
+  color: #333;
+  text-align: center;
+  border-right: 1px solid #f0f0f0;
+}

+ 64 - 1
GuangZuan/miniprogram/mMine/pages/myorders/myorders.ts

@@ -5,14 +5,77 @@ Page({
    * 页面的初始数据
    */
   data: {
+    /// 列头
+    tabs: [{id: 1, name: '我的出售'}, 
+           {id: 1, name: '我的求购'}, 
+           {id: 3, name: '我的摘牌'}],
+    /// 是否空数据
+    isEmpty: false,
+    /// 选中行数
+    selectRow: -1,
+    /// 列表总宽度
+    totalWidth: 0,
+    /// 列表宽度
+    widths: [60, 60, 80, 110, 80, 80, 80],
+    /// 列头
+    titles: ['状态', '挂牌方', '商品分类/编号', '委托量', '委托价', '成交数量'],
+    /// 内容
+    values: [['圆形', 'E-J', 'FL-VS1', '¥21002.00', '10.04', '0.51']],
+    
+  },
+
+  /**
+   * tabbar点击事件
+   */
+  onTabChange(e: any) {
+    console.log(e)
+  },
+
+  /**
+   * 点击每行触发事件
+   */
+  onListItemClick(e: any) {
+    this.setData({
+      selectRow: this.data.selectRow == e.currentTarget.id ? -1 : e.currentTarget.id
+    })
+    console.log(this.data.selectRow)
+  },
 
+  /**
+   * 按钮点击响应事件
+   */
+  onButtonPressed(e: any){
+    console.log(e)
+    switch (e.currentTarget.id) {
+      case "goods-detail":    /// 商品详情
+        wx.navigateTo({
+          url: '/mHome/pages/goodsdetail/goodsdetail'
+        })
+        break;
+      case "listing-detail":  /// 商品详情
+        wx.navigateTo({
+          url: '/mMine/pages/listingdetail/listingdetail'
+        })
+        break;
+      default:
+        break;
+    }
   },
 
   /**
    * 生命周期函数--监听页面加载
    */
   onLoad() {
-
+    /// 计算总高度
+    let num = 0.0
+    this.data.widths.forEach(function(v) {
+      num += v
+    })
+
+    this.setData({
+      /// 设置总高度
+      totalWidth: num
+    })
   },
 
   /**

+ 32 - 1
GuangZuan/miniprogram/mMine/pages/myorders/myorders.wxml

@@ -1,3 +1,34 @@
 <!--pages/mine/myorders/myorders.wxml-->
 
-<van-empty class="custom-image" description="无数据"/>
+<!-- tabs -->
+<view class="tab-view">
+  <van-tabs sticky animated bind:change="onTabChange">
+    <van-tab wx:for="{{tabs}}" wx:for-item="itm" wx:key="id" id="{{itm.id}}" active="{{itm.id}}" title="{{itm.name}}"/>
+  </van-tabs>  
+</view>
+
+<scroll-view class="scroll-view" scroll-x enable-flex>
+  <!-- 列头 -->
+  <view class="title-view" style="width: {{totalWidth}}px;">
+    <text wx:for="{{titles}}" wx:for-index="idx" wx:for-item="itm" wx:key="idx" id="idx" style="width: {{widths[idx]}}px;">{{itm}}</text>
+  </view>
+
+  <!-- 数据内容 -->
+  <view class="order-list">
+    <view class="order-list-item" wx:for="{{values}}" wx:for-item="lists" wx:key="lists" id="{{index}}" bindtap="onListItemClick">
+      <!-- 数据体 -->
+      <view class="order-list-item-row" style="width: {{totalWidth}}px;">
+        <text wx:for="{{lists}}" wx:for-index="idx" wx:for-item="itm" wx:key="itm" style="width: {{widths[idx]}}px;">{{itm}}</text>
+      </view>
+      <!-- 按钮 -->
+      <view class="order-list-item-btn" wx:if="{{selectRow != -1 && selectRow == index}}">
+        <!-- 商品详情 -->
+        <button class="goods-detail" id="goods-detail" bindtap="onButtonPressed">商品详情</button>
+        <!-- 挂牌详情 -->
+        <button class="listing-detail" id="listing-detail" bindtap="onButtonPressed">挂牌详情</button>
+      </view>
+    </view>
+  </view>
+</scroll-view>
+
+<van-empty wx:if="{{isEmpty}}" class="custom-image" description="无数据"/>

+ 1 - 2
GuangZuan/miniprogram/mMine/pages/settings/settings.json

@@ -1,8 +1,7 @@
 {
   "usingComponents": {
     "van-cell": "@vant/weapp/cell/index",
-    "van-cell-group": "@vant/weapp/cell-group/index",
-    "van-dialog": "@vant/weapp/dialog/index"
+    "van-cell-group": "@vant/weapp/cell-group/index"
   },
   "navigationBarTitleText": "系统设置"
 }

+ 4 - 13
GuangZuan/miniprogram/mMine/pages/settings/settings.ts

@@ -1,7 +1,5 @@
 // moduleMine/pages/settings/settings.ts
 
-import Dialog from '@vant/weapp/dialog/dialog';
-
 Page({
 
   /**
@@ -15,17 +13,10 @@ Page({
    * 系统登出响应
    */
   onLoginOut() {
-    Dialog.confirm({
-      title: '提示',
-      message: '确定要退出系统吗?',
-    }).then(() => {
-        // on confirm
-        wx.reLaunch({
-          url: '/pages/login/login'
-        })
-      }).catch(() => {
-        // on cancel
-      });
+    // on confirm
+    wx.reLaunch({
+      url: '/pages/login/login'
+    })
   },
 
   /**

+ 0 - 2
GuangZuan/miniprogram/mTrade/pages/listing/listing.json

@@ -1,7 +1,5 @@
 {
   "usingComponents": {
-    "van-tab": "@vant/weapp/tab/index",
-    "van-tabs": "@vant/weapp/tabs/index",
     "van-cell": "@vant/weapp/cell/index",
     "van-cell-group": "@vant/weapp/cell-group/index",
     "num-range": "/components/num-range/num-range"

+ 67 - 34
GuangZuan/miniprogram/mTrade/pages/listing/listing.less

@@ -5,32 +5,32 @@
   border-bottom: 1px solid #f0f0f0;
   align-items: center;
   margin: 0px 10px 0px 15px;
-}
 
-.cell-view text {
-  width: 90px;
-  text-align: left;
-  color: #333;
-  font-size: 26rpx;
-}
+  text {
+    width: 90px;
+    text-align: left;
+    color: #333;
+    font-size: 26rpx;
+  }
 
-.cell-view view {
-  display: flex;
-  flex-wrap: wrap;
-  width: 100%;
-}
+  view {
+    display: flex;
+    flex-wrap: wrap;
+    width: 100%;
 
-.cell-view view button {
-  margin: 5px;
-  height: 36px;
-  color: #333;
-  width: 21.3%;
-}
+    button {
+      margin: 5px;
+      height: 36px;
+      color: #333;
+      width: 21.3%;
+    }
+  }
 
-.cell-view button {
-  color: #000;
-  font-size: 24rpx;
-  border-radius: 5px;
+  button {
+    color: #000;
+    font-size: 24rpx;
+    border-radius: 5px;
+  }
 }
 
 .shape, .color {
@@ -41,13 +41,45 @@
   height: 100px;
 }
 
-.qiegong, .duicheng, .polishing, .yingguang, .tradeaccount, .weight, .price {
+.qiegong, .duicheng, .polishing, .yingguang, .tradeaccount, .weight, .price, .huoqi, .amunt, .margin, .kanai {
   height: 60px;
 }
 
-.weight view, .price view {
+.huoqi-left, .huoqi-right {
+  width: 100%;
+  height: 100%;
+}
+
+.huoqi-left {
+  text {
+    width: 90px;
+  }
+}
+
+.huoqi-right {
+  text {
+    width: 40px;
+  }
+  input{
+    font-size: 14px;
+    color: #333;
+  }
+}
+
+.huoqi view {
+  display: flex;
+  flex-direction: row;
   flex-wrap: nowrap;
-  text-align: center;
+  justify-content: start;
+  align-items: center;
+  align-content: center;
+}
+
+.weight, .price {
+  view {
+    flex-wrap: nowrap;
+    text-align: center;
+  }
 }
 
 .submit-view {
@@ -56,22 +88,23 @@
   justify-content: space-around;
   align-items: center;
   margin-top: 20px;
-}
 
-.submit-view button {
-  width: 45%;
-  font-size: 28rpx;
-  color: #fff;
-  padding: 10rpx;
-}
+  button {
+    width: 45%;
+    font-size: 28rpx;
+    color: #fff;
+    padding: 10rpx;
+  }
 
-.submit-view button:nth-child(1) {
+
+button:nth-child(1) {
   background-color: red;
 }
 
-.submit-view button:nth-child(2) {
+button:nth-child(2) {
   background-color: green;
 }
+}
 
 num-range {
   width: 100%;

+ 44 - 11
GuangZuan/miniprogram/mTrade/pages/listing/listing.wxml

@@ -1,17 +1,19 @@
 <!--pages/trade/listing/listing.wxml-->
 
 <!-- TabBar选项 -->
-<van-tabs animated>
-  <van-tab title="买挂牌"></van-tab>
-  <van-tab title="卖挂牌"></van-tab>
-</van-tabs>
+<view style="position: sticky; top:0; z-index: 999;">
+  <van-tabs animated>
+    <van-tab title="买挂牌"></van-tab>
+    <van-tab title="卖挂牌"></van-tab>
+  </van-tabs>
+</view>
 
 <view class="container"> 
   <!-- 交易账户 -->
   <view class="cell-view tradeaccount"> 
     <text>交易账户</text>
     <view class="tradeaccount-content">
-      <button style="width: 200px;">-----------</button>
+      <button style="width: 95%;">-----------</button>
     </view>
   </view>
 
@@ -83,12 +85,43 @@
     </view>
   </view>  
 
-  <!-- 选项内容视图 -->
-  <van-cell-group>
-    <van-cell title="货期:"></van-cell>
-    <van-cell title="挂牌金额:0.00"></van-cell>
-    <van-cell title="履约保证金:0.00     可用资金:0.00"></van-cell>
-  </van-cell-group>
+  <!-- 咖奶 -->
+  <view class="cell-view kanai"> 
+    <text>咖奶</text>
+    <view class="kanai-content">
+      <button style="width: 50%;">不咖不奶</button>
+    </view>
+  </view>
+
+  <!-- 货期 -->
+  <view class="cell-view huoqi"> 
+    <view class="huoqi-left">
+      <text>货期</text>
+      <input placeholder="请输入货期"></input>
+    </view>
+    <!-- 证书 -->
+    <view class="huoqi-right">
+      <text>证书</text>
+      <input placeholder="请输入证书编号"></input>
+    </view>
+  </view> 
+
+  <!-- 货期 -->
+  <view class="cell-view amunt"> 
+    <text>挂牌金额</text>
+    <text>0.00</text>
+  </view>
+
+  <view class="cell-view margin"> 
+    <view class="margin-left">
+      <text>履约保证金</text>
+      <text>0.00</text>
+    </view>
+    <view class="margin-right">
+      <text>可用资金</text>
+      <text>0.00</text>
+    </view>
+  </view>
 </view>
 
 <!-- 提交按钮视图 -->

+ 1 - 2
GuangZuan/miniprogram/pages/circle/circle.json

@@ -1,8 +1,7 @@
 {
   "usingComponents": {
     "van-search": "@vant/weapp/search/index",
-    "van-tab": "@vant/weapp/tab/index",
-    "van-tabs": "@vant/weapp/tabs/index"
+    "news-item": "/components/news-item/news-item"
   },
   "navigationBarTitleText": "钻石圈"
 }

+ 1 - 29
GuangZuan/miniprogram/pages/circle/circle.less

@@ -6,37 +6,9 @@ van-search .search {
 
 .news-lists {
   display: grid;
-  padding: 10px;
+  padding: 0px 10px;
 }
 
-.new-lists-item {
-  padding-top: 10px;
-  display: flex;
-  align-items: center;
-  height: 100px;
-  border-bottom: 1px solid #f0f0f0;
-}
-
-.new-lists-item image {
-  height: 80px;
-  margin-left: 10px;
-}
-
-.new-lists-item-left {
-  display: grid;
-}
 
-.new-lists-item-left text {
-  padding-bottom: 10px;
-}
 
-.new-lists-item-left text:nth-child(1) {
-  width: 100%;
-  font-size: 14px;
-  color: #333;
-}
 
-.new-lists-item-left text:nth-child(2) {
-  font-size: 12px;
-  color: #666;
-}

+ 11 - 3
GuangZuan/miniprogram/pages/circle/circle.ts

@@ -14,7 +14,15 @@ Page({
     /// tabs
     tabs: ['收藏', '首页', '快讯', '精华', '评论', '公告'],
     /// 新闻资讯内容
-    news: [[], [], [], [], [], [], [], [], []]
+    news: [{id: 1, title: '培育钻品牌有了新玩法', content: '培育钻品牌有了新玩法上游技术升级和下游消费者教育走向成熟,两到三年的快速增长后走向成熟。输入框。该组件是原生组件,使用时请注意相关限制', img: 'https://img.yzcdn.cn/vant/cat.jpeg'}, 
+           {id: 2, title: '培育钻品牌有了新玩法', content: '培育钻品牌有了新玩法上游技术升级和下游消费者教育走向成熟,两到三年的快速增长后走向成熟。输入框。该组件是原生组件,使用时请注意相关限制', img: 'https://img.yzcdn.cn/vant/cat.jpeg'}, 
+           {id: 3, title: '培育钻品牌有了新玩法', content: '培育钻品牌有了新玩法上游技术升级和下游消费者教育走向成熟,两到三年的快速增长后走向成熟。输入框。该组件是原生组件,使用时请注意相关限制', img: 'https://img.yzcdn.cn/vant/cat.jpeg'}, 
+           {id: 4, title: '培育钻品牌有了新玩法', content: '培育钻品牌有了新玩法上游技术升级和下游消费者教育走向成熟,两到三年的快速增长后走向成熟。输入框。该组件是原生组件,使用时请注意相关限制', img: 'https://img.yzcdn.cn/vant/cat.jpeg'}, 
+           {id: 5, title: '培育钻品牌有了新玩法', content: '培育钻品牌有了新玩法上游技术升级和下游消费者教育走向成熟,两到三年的快速增长后走向成熟。输入框。该组件是原生组件,使用时请注意相关限制', img: 'https://img.yzcdn.cn/vant/cat.jpeg'}, 
+           {id: 6, title: '培育钻品牌有了新玩法', content: '培育钻品牌有了新玩法上游技术升级和下游消费者教育走向成熟,两到三年的快速增长后走向成熟。输入框。该组件是原生组件,使用时请注意相关限制', img: 'https://img.yzcdn.cn/vant/cat.jpeg'}, 
+           {id: 7, title: '培育钻品牌有了新玩法', content: '培育钻品牌有了新玩法上游技术升级和下游消费者教育走向成熟,两到三年的快速增长后走向成熟。输入框。该组件是原生组件,使用时请注意相关限制', img: 'https://img.yzcdn.cn/vant/cat.jpeg'}, 
+           {id: 8, title: '培育钻品牌有了新玩法', content: '培育钻品牌有了新玩法上游技术升级和下游消费者教育走向成熟,两到三年的快速增长后走向成熟。输入框。该组件是原生组件,使用时请注意相关限制', img: 'https://img.yzcdn.cn/vant/cat.jpeg'}, 
+           {id: 9, title: '培育钻品牌有了新玩法', content: '培育钻品牌有了新玩法上游技术升级和下游消费者教育走向成熟,两到三年的快速增长后走向成熟。输入框。该组件是原生组件,使用时请注意相关限制', img: 'https://img.yzcdn.cn/vant/cat.jpeg'}]
   },
 
   /**
@@ -29,7 +37,7 @@ Page({
   /**
    * 监听输入框值变化
    */
-  onChange(e) {
+  onChange(e: any) {
     console.log(e.detail)
   },
 
@@ -43,7 +51,7 @@ Page({
   /**
    * 点击搜索
    */
-  onSearch(e) {
+  onSearch(e: any) {
     console.log(e)
   },
 

+ 5 - 8
GuangZuan/miniprogram/pages/circle/circle.wxml

@@ -1,21 +1,18 @@
 <!--pages/circle/circle.wxml-->
+
 <view class="top-view" style="position: sticky; top: 0; z-index: 999;">
+  <!-- 搜索框 -->
   <van-search value="{{ value }}" shape="round" placeholder="请输入搜索关键词" background="#4fc08d" use-action-slot bind:change="onChange" bind:search="onSearch">
     <view class="search" slot="action" bind:tap="onClick">搜索</view>
   </van-search>
 
+  <!-- tabs -->
   <van-tabs animated>
-    <van-tab wx:for="{{tabs}}" title="{{item}}"></van-tab>
+    <van-tab wx:for="{{tabs}}" wx:key="id" title="{{item}}"></van-tab>
   </van-tabs>
 </view>
 
 <!-- 新闻视图 -->
 <view class="news-lists">
-  <view class="new-lists-item" wx:for="{{news}}" wx:for-item="itm" wx:for-index="idx" bindtap="goToNews">
-    <view class="new-lists-item-left">
-      <text>培育钻品牌有了新玩法</text>
-      <text>培育钻品牌有了新玩法上游技术升级和下游消费者教育走向成熟,两到三年的快速增长后走向成熟。输入框。该组件是原生组件,使用时请注意相关限</text>
-    </view>
-    <image src="https://img.yzcdn.cn/vant/cat.jpeg" mode="scaleToFill"></image>
-  </view>
+  <news-item class="new-lists-item" wx:for="{{news}}" wx:key="id" wx:for-item="itm" wx:for-index="idx" bindtap="goToNews"></news-item>
 </view>

+ 2 - 1
GuangZuan/miniprogram/pages/home/home.json

@@ -2,7 +2,8 @@
   "usingComponents": {
     "van-notice-bar": "@vant/weapp/notice-bar/index",
     "van-search": "@vant/weapp/search/index",
-    "van-nav-bar": "@vant/weapp/nav-bar/index"
+    "van-nav-bar": "@vant/weapp/nav-bar/index",
+    "news-item": "/components/news-item/news-item"
   },
   "navigationBarTitleText": "首页"
 }

+ 34 - 51
GuangZuan/miniprogram/pages/home/home.less

@@ -1,4 +1,4 @@
-/* pages/home/home.wxss */
+/* pages/home/home.less */
 
 .nav-bar {
   background-color: red;
@@ -34,7 +34,6 @@
   }
 }
 
-
 .menus {
   display: flex;
   flex-direction: row;
@@ -81,72 +80,56 @@
   .goldprice, .exchangerate {
     width: 40px;
     height: 80px;
-    font-size: 26rpx;
-    color: #666;
+    font-size: 14px;
+    color: #444;
     text-align: center;
   }
-  
-  .search-view {
-    display: flex;
-    align-items: center;
-    align-content: center;
-  
-    van-search {
-      width: 90%;
-    }
+}
 
-    .calculator {
-      width: 20px;
-      font-size: 26rpx;
-      color: #666;
-      text-align: center;
-    }
+.search-view {
+  display: flex;
+  align-items: center;
+  align-content: center;
+
+  van-search {
+    width: 95%;
   }
 }
 
 .news-lists {
   display: grid;
   padding: 10px;
+  align-items: center;
+  align-content: center;
 
-  view text {
+  .title {
     font-size: 18px;
-    padding-bottom: 10px;
     color: blue;
-  }
-
-  .new-lists-item {
-    padding-top: 20px;
-    display: flex;
-    border-bottom: 1px solid #f0f0f0;
-
-    image {
-      height: 80px;
-      margin-left: 10px;
-      border-radius: 5px;
-    }
-
-    .new-lists-item-left {
-      display: grid;
-
-      text:nth-child(1) {
-        width: 100%;
-        font-size: 14px;
-        color: #333;
-      }
-      
-      text:nth-child(2) {
-        font-size: 12px;
-        color: #666;
-      }
-    }
+    margin: 5px 0px;
   }
 }
 
+.goldprice, .exchangerate, .calculator {
+  width: 25px;
+  background-color: #f0f0f0;
+  text-align: center;
+  vertical-align: middle;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  align-content: center;
+  font-size: 14px;
+  padding: 5px;
+  color: #444;
+}
 
+.goldprice {
+  height: 60px;
+}
 
-
-
-
+.exchangerate, .calculator {
+  height: 100px;
+}
 
 
 

+ 9 - 1
GuangZuan/miniprogram/pages/home/home.ts

@@ -24,7 +24,15 @@ Page({
                  {id: 2, title: '钻石总数', value: 20200}, 
                  {id: 3, title: '已注册会员', value: 200}],
     /// 新闻资讯内容
-    news: [[], [], [], [], [], [], [], [], []]
+    news: [{id: 1, title: '培育钻品牌有了新玩法', content: '培育钻品牌有了新玩法上游技术升级和下游消费者教育走向成熟,两到三年的快速增长后走向成熟。输入框。该组件是原生组件,使用时请注意相关限制', img: 'https://img.yzcdn.cn/vant/cat.jpeg'}, 
+           {id: 2, title: '培育钻品牌有了新玩法', content: '培育钻品牌有了新玩法上游技术升级和下游消费者教育走向成熟,两到三年的快速增长后走向成熟。输入框。该组件是原生组件,使用时请注意相关限制', img: 'https://img.yzcdn.cn/vant/cat.jpeg'}, 
+           {id: 3, title: '培育钻品牌有了新玩法', content: '培育钻品牌有了新玩法上游技术升级和下游消费者教育走向成熟,两到三年的快速增长后走向成熟。输入框。该组件是原生组件,使用时请注意相关限制', img: 'https://img.yzcdn.cn/vant/cat.jpeg'}, 
+           {id: 4, title: '培育钻品牌有了新玩法', content: '培育钻品牌有了新玩法上游技术升级和下游消费者教育走向成熟,两到三年的快速增长后走向成熟。输入框。该组件是原生组件,使用时请注意相关限制', img: 'https://img.yzcdn.cn/vant/cat.jpeg'}, 
+           {id: 5, title: '培育钻品牌有了新玩法', content: '培育钻品牌有了新玩法上游技术升级和下游消费者教育走向成熟,两到三年的快速增长后走向成熟。输入框。该组件是原生组件,使用时请注意相关限制', img: 'https://img.yzcdn.cn/vant/cat.jpeg'}, 
+           {id: 6, title: '培育钻品牌有了新玩法', content: '培育钻品牌有了新玩法上游技术升级和下游消费者教育走向成熟,两到三年的快速增长后走向成熟。输入框。该组件是原生组件,使用时请注意相关限制', img: 'https://img.yzcdn.cn/vant/cat.jpeg'}, 
+           {id: 7, title: '培育钻品牌有了新玩法', content: '培育钻品牌有了新玩法上游技术升级和下游消费者教育走向成熟,两到三年的快速增长后走向成熟。输入框。该组件是原生组件,使用时请注意相关限制', img: 'https://img.yzcdn.cn/vant/cat.jpeg'}, 
+           {id: 8, title: '培育钻品牌有了新玩法', content: '培育钻品牌有了新玩法上游技术升级和下游消费者教育走向成熟,两到三年的快速增长后走向成熟。输入框。该组件是原生组件,使用时请注意相关限制', img: 'https://img.yzcdn.cn/vant/cat.jpeg'}, 
+           {id: 9, title: '培育钻品牌有了新玩法', content: '培育钻品牌有了新玩法上游技术升级和下游消费者教育走向成熟,两到三年的快速增长后走向成熟。输入框。该组件是原生组件,使用时请注意相关限制', img: 'https://img.yzcdn.cn/vant/cat.jpeg'}]
   },
 
   /**

+ 11 - 14
GuangZuan/miniprogram/pages/home/home.wxml

@@ -1,5 +1,4 @@
 <!--pages/home/home.wxml-->
-
 <scroll-view style="position: absolute; height: {{windowHeight-safeBottom-50}}px;" scroll-y>
   <!-- banner轮播图 -->
   <swiper class="banner" indicator-active-color="white" indicator-dots autoplay interval="5000" circular>
@@ -11,7 +10,7 @@
   </swiper>
 
   <!-- 通知栏 -->
-  <van-notice-bar left-icon="volume-o" bind:click="goToMsg" color="#333" background="#f3f3f3" text="在代码阅读过程中人们说脏话的频率是衡量代码质量的唯一标准。" scrollable></van-notice-bar>
+  <van-notice-bar left-icon="volume-o" mode="link" bind:click="goToMsg" color="#333" background="#f3f3f3" text="在代码阅读过程中人们说脏话的频率是衡量代码质量的唯一标准。" scrollable></van-notice-bar>
 
   <!-- 统计 -->
   <view class="statistics">
@@ -23,7 +22,6 @@
 
   <!-- 功能菜单 -->
   <view class="menus">
-    <navigator class="goldprice" url="/mHome/pages/goldPrice/goldPrice">金价</navigator>
     <view class="menu-item" wx:for="{{menus}}" wx:key="id" wx:for-index="idx" wx:for-item="itm">
       <!-- 钻石菜单项 -->
       <navigator class="menus-item1" url="{{itm[0].path}}">
@@ -33,30 +31,29 @@
       <!-- 功能菜单项 -->
       <navigator class="menus-item2" url="{{itm[1].path}}">{{itm[1].title}}</navigator>
     </view>
-    <navigator class="exchangerate" url="/mHome/pages/exchangeRate/exchangeRate">今日汇率</navigator>
+    
   </view>
 
   <!-- 搜索视图 -->
   <view class="search-view" style="display: flex; justify-content: space-around;">
     <van-search label="GIA" value="{{ value }}" shape="round" placeholder="搜索GIA证书" bind:change="onChange" bind:search="onSearch">
     </van-search>  
-    <navigator class="calculator" url="/mHome/pages/calculator/calculator">计算器</navigator>
+    
   </view> 
 
   <!-- 新闻视图 -->
   <view class="news-lists">
-    <view><text>资讯</text></view>
-    <view class="new-lists-item" wx:for="{{news}}" wx:for-item="itm" wx:for-index="idx" bindtap="goToNews">
-      <view class="new-lists-item-left">
-        <text>培育钻品牌有了新玩法</text>
-        <text>培育钻品牌有了新玩法上游技术升级和下游消费者教育走向成熟,两到三年的快速增长后走向成熟。输入框。该组件是原生组件,使用时请注意相关限制</text>
-      </view>
-      <image src="https://img.yzcdn.cn/vant/cat.jpeg"></image>
-    </view>
+    <text class="title">资讯</text>
+    <news-item class="new-lists-item" wx:for="{{news}}" wx:key="id" wx:for-item="itm" wx:for-index="idx" bindtap="goToNews"></news-item>
   </view>
 </scroll-view>
 
-
+<!-- 金价  -->
+<navigator class="goldprice" style="position: absolute; top: 42%;" url="/mHome/pages/goldprice/goldprice">金价</navigator>
+<!-- 今日汇率  -->
+<navigator class="exchangerate" style="position: absolute; top: 42%; right: 5px;" url="/mHome/pages/exchangeRate/exchangeRate">今日汇率</navigator>
+<!-- 计算器  -->
+<navigator class="calculator" style="position: absolute; bottom: 100px; right: 5px;" url="/mHome/pages/calculator/calculator">计算器</navigator>
 
 
 

+ 4 - 1
GuangZuan/miniprogram/pages/mine/mine.less

@@ -19,7 +19,10 @@
   }
 }
 
-
+.cell-title {
+  color: #333;
+  font-size: 14px;
+}
 
 
 

+ 4 - 2
GuangZuan/miniprogram/pages/mine/mine.wxml

@@ -9,12 +9,14 @@
 
 <!-- 功能菜单项 -->
 <van-grid column-num="4">
-  <van-grid-item wx:for="{{menulists}}" wx:key="id" wx:for-index="idx" wx:for-item="itm" id="{{itm.id}}" icon="{{itm.img}}" text="{{itm.title}}" link-type="navigateTo" url="{{itm.path}}" />
+  <van-grid-item wx:for="{{menulists}}" wx:key="id" wx:for-index="idx" wx:for-item="itm" id="{{itm.id}}" icon="{{itm.img}}" link-type="navigateTo" url="{{itm.path}}">
+    <text slot="text" style="font-size: 13px;">{{itm.title}}</text>
+  </van-grid-item>
 </van-grid>
 
 <!-- 列表菜单项 -->
 <van-cell-group>
-  <van-cell is-link wx:for="{{tablelists}}" use-label-slot clickable wx:key="id" wx:for-index="idx" wx:for-item="itm" id="{{itm.id}}" title="{{itm.title}}" link-type="navigateTo" url="{{itm.path}}">
+  <van-cell clickable title-class="cell-title" center is-link border wx:for="{{tablelists}}" use-label-slot clickable wx:key="id" wx:for-index="idx" wx:for-item="itm" id="{{itm.id}}" title="{{itm.title}}" link-type="navigateTo" url="{{itm.path}}">
   </van-cell>
 </van-cell-group>
 

+ 1 - 2
GuangZuan/miniprogram/pages/trade/trade.json

@@ -1,7 +1,6 @@
 {
   "usingComponents": {
-    "van-tab": "@vant/weapp/tab/index",
-    "van-tabs": "@vant/weapp/tabs/index"
+    
   },
   "navigationBarTitleText": "钻石交易"
 }

+ 40 - 9
GuangZuan/miniprogram/pages/trade/trade.less

@@ -8,29 +8,60 @@
 
 .title-view {
   background-color: #f0f0f0;
+  height: 35px;
 }
 
-.title-view, .list-item {
-  padding: 12px 0px;
+.list-item {
+  display: grid;
+}
+
+.title-view, .list-item-row {
   display: flex;
-  justify-content: space-around;
+  justify-content: space-between;
   align-items: center;
-  width: 140%;
-  border-bottom: 1px solid #f0f0f0;
 }
 
 .title-view text {
   font-size: 12px;
   color: #666;
-  width: 100%;
   text-align: center;
-  border-right: 1px solid #f0f0f0;
 }
 
-.list-item text {
+.list-item-row {
+  height: 45px;
+  border-bottom: 1px solid #f0f0f0;
+}
+
+.list-item-row text {
   font-size: 14px;
   color: #333;
-  width: 100%;
   text-align: center;
   border-right: 1px solid #f0f0f0;
 }
+
+.list-item-btn {
+  padding: 10px 0px;
+  display: flex;
+  width: 280px;
+  position: relative;
+  right: -145px;
+  height: 30px;
+
+  button {
+    font-size: 12px;
+    color: white;
+    width: 80px;
+  }
+
+  .buyinto {
+    background-color: rebeccapurple;
+  }
+   
+  .detail {
+    background-color: yellowgreen;
+  }
+
+  .favitore {
+    background-color: blueviolet;
+  }
+}

+ 42 - 28
GuangZuan/miniprogram/pages/trade/trade.ts

@@ -13,31 +13,16 @@ Page({
            {id: 5, name: '彩钻'}],
     /// tab索引
     active: 0,
+    /// 选中行数
+    selectRow: -1,
     /// 列头
     titles: ['形状', '颜色', '净度', '总价', '总重量', '单颗均重', '单价'],
+    /// 列表总宽度
+    totalWidth: 0,
+    /// 列表宽度
+    widths: [60, 60, 80, 110, 80, 80, 80],
     /// 内容
-    values: [['圆形', 'E-J', 'FL-VS1', '¥21002.00', '10.04', '0.51', '¥202.00'],
-             ['心型', 'G-K', 'IF-VS1', '¥31004.56', '20.00', '0.40', '¥100.000'],
-             ['圆形', 'E-J', 'FL-VS1', '¥21002.00', '10.04', '0.51', '¥202.00'],
-             ['心型', 'G-K', 'IF-VS1', '¥31004.56', '20.00', '0.40', '¥100.000'],
-             ['圆形', 'E-J', 'FL-VS1', '¥21002.00', '10.04', '0.51', '¥202.00'],
-             ['心型', 'G-K', 'IF-VS1', '¥31004.56', '20.00', '0.40', '¥100.000'],
-             ['圆形', 'E-J', 'FL-VS1', '¥21002.00', '10.04', '0.51', '¥202.00'],
-             ['心型', 'G-K', 'IF-VS1', '¥31004.56', '20.00', '0.40', '¥100.000'],
-             ['圆形', 'E-J', 'FL-VS1', '¥21002.00', '10.04', '0.51', '¥202.00'],
-             ['心型', 'G-K', 'IF-VS1', '¥31004.56', '20.00', '0.40', '¥100.000'],
-             ['圆形', 'E-J', 'FL-VS1', '¥21002.00', '10.04', '0.51', '¥202.00'],
-             ['心型', 'G-K', 'IF-VS1', '¥31004.56', '20.00', '0.40', '¥100.000'],
-             ['圆形', 'E-J', 'FL-VS1', '¥21002.00', '10.04', '0.51', '¥202.00'],
-             ['心型', 'G-K', 'IF-VS1', '¥31004.56', '20.00', '0.40', '¥100.000'],
-             ['圆形', 'E-J', 'FL-VS1', '¥21002.00', '10.04', '0.51', '¥202.00'],
-             ['心型', 'G-K', 'IF-VS1', '¥31004.56', '20.00', '0.40', '¥100.000'],
-             ['圆形', 'E-J', 'FL-VS1', '¥21002.00', '10.04', '0.51', '¥202.00'],
-             ['心型', 'G-K', 'IF-VS1', '¥31004.56', '20.00', '0.40', '¥100.000'],
-             ['圆形', 'E-J', 'FL-VS1', '¥21002.00', '10.04', '0.51', '¥202.00'],
-             ['心型', 'G-K', 'IF-VS1', '¥31004.56', '20.00', '0.40', '¥100.000'],
-             ['圆形', 'E-J', 'FL-VS1', '¥21002.00', '10.04', '0.51', '¥202.00'],
-             ['心型', 'G-K', 'IF-VS1', '¥31004.56', '20.00', '0.40', '¥100.000']]
+    values: [['圆形', 'E-J', 'FL-VS1', '¥21002.00', '10.04', '0.51', '¥202.00']]
   },
 
   /**
@@ -50,26 +35,55 @@ Page({
   },
 
   /**
-   * 列表项点击跳转到挂牌页面
+   * 按钮点击响应事件
    */
-  onListItemClick() {
-    wx.navigateTo({
-      url: '/mTrade/pages/listing/listing'
+  onButtonPressed(e: any){
+    console.log(e)
+    switch (e.currentTarget.id) {
+      case "buyinto":    /// 买入
+        wx.navigateTo({
+          url: '/mTrade/pages/listing/listing'
+        })
+        break;
+      case "detail":  /// 商品详情
+        wx.navigateTo({
+          url: '/mHome/pages/goodsdetail/goodsdetail'
+        })
+        break;
+      default:
+        break;
+    }
+  },
+
+  /// 每行点击响应事件
+  onListItemClick(e: any) {
+    this.setData({
+      selectRow: this.data.selectRow == e.currentTarget.id ? -1 : e.currentTarget.id
     })
+    console.log(this.data.selectRow)
   },
 
   /**
    * 生命周期函数--监听页面加载
    */
   onLoad() {
+    /// 计算总高度
+    let num = 0.0
+    this.data.widths.forEach(function(v) {
+      num += v
+    })
 
+    this.setData({
+      /// 设置总高度
+      totalWidth: num
+    })
   },
 
   /**
    * 生命周期函数--监听页面初次渲染完成
    */
   onReady() {
-
+    
   },
 
   /**
@@ -90,7 +104,7 @@ Page({
    * 生命周期函数--监听页面卸载
    */
   onUnload() {
-
+     
   },
 
   /**

+ 21 - 6
GuangZuan/miniprogram/pages/trade/trade.wxml

@@ -7,13 +7,28 @@
   </van-tabs>  
 </view>
 
-<scroll-view class="scroll-view" scroll-x enable-flex>
-  <view class="title-view">
-    <text wx:for="{{titles}}" wx:for-index="idx" wx:for-item="itm" wx:key="idx" id="idx">{{itm}}</text>
+<scroll-view class="scroll-view" scroll-x  enable-flex>
+
+  <!-- 列头 -->
+  <view class="title-view" style="width: {{totalWidth}}px;">
+    <text wx:for="{{titles}}" wx:for-index="idx" wx:for-item="itm" wx:key="idx" id="idx" style="width: {{widths[idx]}}px;">{{itm}}</text>
   </view>
-  <view class="list">
-    <view class="list-item" wx:for="{{values}}" wx:for-index="idx" wx:for-item="lists" wx:key="idx" id="idx" bindtap="onListItemClick">
-      <text wx:for="{{lists}}" wx:for-index="idx" wx:for-item="itm" wx:key="idx">{{itm}}</text>
+  <!-- 数据内容 -->
+  <view class="list" style="width: {{totalWidth}}px;">
+    <view class="list-item" wx:for="{{values}}" wx:for-item="lists" wx:key="index" id="{{index}}" bindtap="onListItemClick">
+      <!-- 数据体 -->
+      <view class="list-item-row" >
+        <text wx:for="{{lists}}" wx:for-index="idx" wx:for-item="itm" wx:key="idx" style="width: {{widths[idx]}}px;">{{itm}}</text>
+      </view>
+      <!-- 按钮 -->
+      <view class="list-item-btn" wx:if="{{selectRow != -1 && selectRow == index}}">
+        <!-- 买入 -->
+        <button class="buyinto" id="buyinto" bindtap="onButtonPressed">买入</button>
+        <!-- 收藏 -->
+        <button class="favitore" id="favitore" bindtap="onButtonPressed">收藏</button>
+        <!-- 详情 -->
+        <button class="detail" id="detail" bindtap="onButtonPressed">详情</button>
+      </view>
     </view>
   </view>
 </scroll-view>