k.zhang 3 年 前
コミット
ddfeef6904

+ 2 - 2
app.js

@@ -32,7 +32,7 @@ App({
   globalData: {
     userInfo: null,
     //url:"http://127.0.0.1:8081"
-    url:"http://www.tao1024.com:8081"
-    //url:"https://www.shisanmiao.com"
+    //url:"http://www.tao1024.com:8081"
+    url:"https://www.shisanmiao.com"
   }
 })

+ 1 - 1
pages/boutique/outique.js

@@ -123,7 +123,7 @@ Page({
         console.error( '网络请求失败' ); 
         return; 
        } 
-       if (res.data.data.type == "false"){
+       if (res.data.data.type == "true"){
           wx.redirectTo({
             url: '../search/search'
           })

+ 136 - 5
pages/friends-list/friends-list.js

@@ -1,18 +1,67 @@
 // pages/friends-list/friends-list.js
+const app = getApp()
+const link = app.globalData.url
 Page({
 
   /**
    * 页面的初始数据
    */
   data: {
-
+    page:1,
+    pageSize:10,
+    openId:"",
+    status:0,
+    goodsList:[],
+    count:0
   },
 
   /**
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
-
+    var that = this
+    that.page = 1
+    that.pageSize = 18
+    that.openId = wx.getStorageSync('openId')
+    that.status = 1
+
+    that.setData({
+      lType:"loading"
+    })
+
+    wx.request( { 
+      url: link + "/v1/user/list", 
+      header: { 
+       "Content-Type": "application/json"
+      }, 
+      method: "POST",
+      data:  { openId: that.openId,pageIndex:that.page,pageSize: that.pageSize,status:that.status}, 
+      complete: function( res ) { 
+       console.log(res)
+       if( res == null || res.data == null ) { 
+        console.error( '网络请求失败' ); 
+        return; 
+       } 
+       console.log(res.data.data.rows)
+       //that.count = res.data.data.count
+       if (res.data.data.count == 0){
+        that.count = res.data.data.count
+        that.setData({
+          goodsList: res.data.data.rows,
+          lType:"end"
+        })
+       } else{
+         console.log('==============')
+        that.count = res.data.data.count
+        that.data.goodsList = res.data.data.rows
+        that.setData({
+          goodsList: that.data.goodsList,
+          lType:"false"
+        })
+       }
+ 
+      } 
+     }) 
   },
 
   /**
@@ -22,6 +71,52 @@ Page({
 
   },
 
+
+  changeTabs: function (e){
+    var that = this
+    console.log(e)
+    if (e.detail.activeKey == '2'){
+      that.status = 2
+    } else {
+      that.status = 1
+    }
+    
+    that.setData({
+      lType:"loading"
+    })
+    wx.request( { 
+      url: link + "/v1/user/list", 
+      header: { 
+       "Content-Type": "application/json"
+      }, 
+      method: "POST",
+      data:  { openId: that.openId,pageIndex:that.page,pageSize: that.pageSize,status:that.status}, 
+      complete: function( res ) { 
+       console.log(res)
+       if( res == null || res.data == null ) { 
+        console.error( '网络请求失败' ); 
+        return; 
+       } 
+       console.log(res.data.data.rows)
+       //that.count = res.data.data.count
+       if (res.data.data.count == 0){
+        that.setData({
+          goodsList: res.data.data.rows,
+          lType:"end"
+        })
+       } else{
+       
+        that.data.goodsList = res.data.data.rows
+        that.setData({
+          goodsList: that.data.goodsList,
+          lType:"false"
+        })
+       }
+      
+      } 
+     }) 
+  },
+
   /**
    * 生命周期函数--监听页面显示
    */
@@ -50,12 +145,48 @@ Page({
 
   },
 
-  /**
+    /**
    * 页面上拉触底事件的处理函数
    */
   onReachBottom: function () {
-
-  },
+    //获取数据
+     var  that = this; 
+  
+     if (that.page * that.pageSize >= that.count ){
+      //提示页码到了
+    that.setData({
+      lType:"end"
+    })
+    return
+  }
+  
+    that.page +=1
+    wx.request( { 
+     url: link + "/v1/user/list", 
+     header: { 
+      "Content-Type": "application/json"
+     }, 
+     method: "POST",
+     data:  { openId: that.openId,pageIndex:that.page,pageSize: that.pageSize,status:that.status}, 
+     complete: function( res ) { 
+      wx.hideLoading();
+      console.log(res)
+      
+      for (var i = 0; i < res.data.data.rows.length; i++) {
+        that.data.goodsList.push( res.data.data.rows[i]);
+      }
+      
+     that.setData({
+      goodsList: that.data.goodsList,
+    })
+  
+      if( res == null || res.data == null ) { 
+       console.error( '网络请求失败' ); 
+       return; 
+      } 
+     } 
+    }) 
+    },
 
   /**
    * 用户点击右上角分享

+ 18 - 1
pages/friends-list/friends-list.json

@@ -1,3 +1,20 @@
 {
-  "usingComponents": {}
+  "usingComponents": {
+    "l-search-bar": "/dist/search-bar/index",
+    "l-icon":"/dist/icon/index",
+    "content-title": "/components/content-title/index",
+    "content-card": "/components/content-card/index",
+    "l-tabs": "/dist/tabs/index",
+    "l-combined-tabs": "/dist/combined-tabs/index",
+    "l-tabpanel": "/dist/tabpanel/index",
+    "l-button":"/dist/button/index",
+    "l-segment":"/dist/segment/index",
+    "l-segment-item":"/dist/segment-item/index",
+    "l-card":"/dist/card/index",
+    "l-tag":"/dist/tag/index",
+    "l-price":"/dist/price/index",
+    "l-notice":"/dist/notice-bar/index",
+    "l-loadmore": "/dist/loadmore/index"
+  },
+  "navigationBarTitleText": "我的好友"
 }

+ 42 - 1
pages/friends-list/friends-list.wxml

@@ -1,2 +1,43 @@
 <!--pages/friends-list/friends-list.wxml-->
-<text>pages/friends-list/friends-list.wxml</text>
+<l-tabs l-class-header-line="header-line" bind:linchange="changeTabs" scrollable>
+        <l-tabpanel tab="好友" key="1" slot="1">
+        </l-tabpanel>
+        <l-tabpanel tab="朋友" key="2" slot="2">
+        </l-tabpanel>
+      </l-tabs>
+
+<view wx:for="{{goodsList}}" wx:key="msg">
+  <l-card  type="primary" l-img-class="right-card" position="left" image="{{item.avatarUrl}}"
+  bindtap="goodsDetail"  data-sign="{{item.goods_sign}}" data-searchId="{{item.search_id}}"   full="true" >
+
+    <view class="super-long-test">会员昵称:
+      <!-- <image class="empty-icon" src="/pages/image/dd.png" ></image> -->
+      {{item.nickName}}
+    </view>
+
+    <!-- <view class="containertag">
+      <l-tag plain="{{true}}" font-color="#d81e06" shape="circle" size="medium"  l-class="tag" class="describe" >佣金:{{item.amount}}</l-tag>
+      <l-tag plain="{{true}}" font-color="#d81e06" shape="circle" size="medium"  l-class="tag"  class="fanli">实付:{{(item.order.orderAmount)}}</l-tag>
+     
+    </view> -->
+   
+    <!-- <view class="price-v">
+     <text class="price">订单状态:{{item.order.orderStatusDesc}}</text> 
+    </view> -->
+  
+   <text class="contentcard">
+    会员编号:{{item.id}}
+   </text>
+   <!-- <text class="contentcard">
+    订单状态:{{item.orderStatusDesc}}
+   </text> -->
+   
+  <text class="contentcard">用户创建时间:{{item.createTime}}</text>
+  </l-card>
+</view>
+
+<l-loadmore show="{{true}}" end-text="我是有底线的~" type="{{lType}}">
+  <!-- <view slot="content">
+    我是有底线的~
+  </view> -->
+</l-loadmore>

+ 237 - 1
pages/friends-list/friends-list.wxss

@@ -1 +1,237 @@
-/* pages/friends-list/friends-list.wxss */
+/* pages/friends-list/friends-list.wxss */
+/* pages/order/order.wxss */
+.content-name {
+  font-size: 28rpx;
+  font-family: PingFangSC-Regular;
+  font-weight: 400;
+  color: rgba(69, 82, 107, 1);
+  line-height: 20px;
+  margin-left: 8px;
+}
+
+.icon-container{
+  display: flex;
+  flex-direction: row;
+  align-items: center
+}
+
+.city{
+  font-size: 28rpx;
+  color: #333;
+  margin-right: 10rpx;
+}
+
+.aa{
+  margin-top: 20rpx;
+}
+
+.bb{
+  width: 500rpx !important; 
+}
+
+
+.header{
+  position: fixed;
+  top: 0;
+  left: 0;
+}
+
+.content {
+  /* height: 400rpx; */
+  position: relative;
+}
+
+.tab-content {
+  min-height: 140rpx;
+  height: 100%;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  font-size: 28rpx;
+  color: rgba(140, 152, 174, 1);
+}
+
+.toggle-button {
+  position: absolute !important;
+  top: -80rpx;
+  right: 20rpx;
+  min-width: 72rpx !important;
+  padding: 0 !important;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  border-radius: 50% !important;
+  background: transparent !important;
+}
+
+.swipeable-header {
+  margin: 0 auto;
+  width: 327rpx !important;
+  border: 0 !important;
+}
+
+.swipeable-class-inactive {
+  border-width: 8rpx !important;
+}
+
+.swipeable-class-active {
+  font-weight: 900 !important;
+  font-size: 34rpx !important;
+  border-width: 6rpx !important;
+}
+
+.line-tabs {
+  background: rgba(90, 120, 158, 1) !important;
+}
+
+.tab-image {
+  width: 44rpx !important;
+  height: 44rpx !important;
+}
+
+.line-class {
+  width: 30rpx !important;
+}
+
+
+.card {
+  margin: 10rpx auto !important;
+}
+
+.right-card {
+  height: 150rpx !important;
+  width: 150rpx !important;
+  border-radius: 12rpx !important;
+}
+
+.card-dot {
+  width: 18rpx;
+  height: 18rpx;
+  border-radius: 50%;
+  border: 6rpx solid #3963bc;
+  margin-left: 26rpx;
+}
+
+.card-top {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  width: 750rpx;
+  height: 100rpx;
+}
+
+
+.contentcard-name {
+  font-size: 28rpx;
+  font-family: PingFangSC-Regular;
+  font-weight: 400;
+  color: rgba(69, 82, 107, 1);
+  line-height: 20px;
+  margin-left: 8px;
+}
+
+.contentcard {
+  margin:5rpx 0rpx 0rpx 0rpx;   
+  color: #666;
+  font-size: 25rpx;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  display: -webkit-box;
+  -webkit-box-orient: vertical;
+  -webkit-line-clamp: 5;
+}
+
+.avter-contentcard {
+  margin-top: 10rpx;
+  color: #333;
+  font-size: 26rpx;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  display: -webkit-box;
+  -webkit-box-orient: vertical;
+  -webkit-line-clamp: 5;
+}
+
+
+.super-long-test{
+  display: -webkit-box;
+ word-break: break-all;
+ text-overflow: ellipsis;
+ font-size: 30rpx;
+ overflow: hidden;
+ -webkit-box-orient: vertical;
+ -webkit-line-clamp:2;
+}
+
+
+.empty-icon{
+  width: 30rpx;
+  height: 30rpx;
+  background-color:rgb(252, 248, 248);
+}
+
+
+.containertag{
+  display: flex;
+  flex-direction: row;
+  align-items: flex-end;
+  flex-wrap: wrap;
+}
+
+.btn{
+  margin-bottom: 5rpx;
+}
+.describe{
+  color: #f4f4f5;
+    font-size: 28rpx;
+    
+}
+
+.fanli{
+  position: absolute;
+  right: 10rpx;
+  
+}
+
+.l-tag {
+  padding: 0 16rpx;
+ 
+  display: inline-flex;
+  align-items: center;
+  justify-content: center;
+  flex-direction: row;
+  color: #fff;
+  background-color: #3963bc;
+  margin-left: 15rpx;
+}
+.tag{
+  margin: 6rpx 15rpx 6rpx 0 !important;
+}
+.price-container{
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  margin-left: 10rpx;
+}
+
+
+.price{
+  color:#d81e06;
+  font-size: 30rpx;
+ 
+ 
+  position: absolute;
+  
+}
+.yprice{
+  position: absolute;
+  right: 30rpx;
+  color: #999;
+  font-size: 25rpx;
+  text-decoration:line-through;
+
+  
+}
+.price-v{
+  margin:5rpx 0rpx 10rpx 0rpx;   
+}

BIN
pages/image/my_fill1.png


+ 5 - 2
pages/search-details/earch-details.wxml

@@ -1,3 +1,6 @@
 <!--pages/search-details/earch-details.wxml-->
-<text>{{tex}}</text>
-<text>{{texx}}</text>
+<text class="ttt">{{tex}}</text>
+<view class="tt">
+  <text >{{texx}}</text>
+</view>
+

+ 15 - 1
pages/search-details/earch-details.wxss

@@ -1 +1,15 @@
-/* pages/search-details/earch-details.wxss */
+/* pages/search-details/earch-details.wxss */
+.ttt{
+font-size: 50rpx;
+color: rgba(4, 75, 14, 0.418);
+display:flex;
+align-items:center;
+justify-content:center;
+}
+
+.tt{
+  color: rgba(4, 58, 75, 0.418);
+  width:90%;
+  margin-left:5%;
+  padding:19rpx 0;
+}

+ 1 - 1
project.config.json

@@ -4,7 +4,7 @@
     "ignore": []
   },
   "setting": {
-    "urlCheck": false,
+    "urlCheck": true,
     "es6": true,
     "enhance": true,
     "postcss": true,