k.zhang 4 anos atrás
pai
commit
e75bc91549

+ 2 - 1
app.js

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

+ 2 - 1
app.json

@@ -4,7 +4,8 @@
     "pages/index/index",
     "pages/logs/logs",
     "pages/details/details",
-    "pages/order/order"
+    "pages/order/order",
+    "pages/search-details/earch-details"
   ],
   "window": {
     "backgroundTextStyle": "light",

+ 6 - 0
pages/index/index.js

@@ -106,6 +106,12 @@ Page({
       wx.navigateTo({
         url:"/pages/order/order"
       })
+    } else if (e.detail.cell.text == "体现") {
+      wx.showToast({
+        title: "结算金额:0元",
+        icon: 'none'
+      });
+
     } else {
        wx.showToast({
         title: "功能开发中...",

+ 73 - 3
pages/order/order.js

@@ -1,11 +1,17 @@
 // pages/order/order.js
+const app = getApp()
+const link = app.globalData.url
 Page({
 
   /**
    * 页面的初始数据
    */
   data: {
-
+    page:1,
+    pageSize:10,
+    openId:"",
+    // count:0,
+    // pageIndex:""
   },
 
   /**
@@ -13,6 +19,35 @@ Page({
    */
   onLoad: function (options) {
     //获取产品
+    var  that = this; 
+    that.page = 1
+    that.pageSize = 18
+    that.openId = wx.getStorageSync('openId')
+
+    wx.request( { 
+      url: link + "/v1/user/order/list", 
+      header: { 
+       "Content-Type": "application/json"
+      }, 
+      method: "POST",
+      data:  { openId: that.openId,pageIndex:that.page,pageSize: that.pageSize}, 
+      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
+       that.setData({
+        goodsList: res.data.data.rows,
+      })
+      
+
+
+      } 
+     }) 
+
   },
 
   /**
@@ -53,8 +88,43 @@ Page({
   /**
    * 页面上拉触底事件的处理函数
    */
-  onReachBottom: function () {
-
+   onReachBottom: function () {
+  //获取数据
+   var  that = this; 
+   that.page +=1
+  wx.request( { 
+   url: link + "/v1/user/order/list", 
+   header: { 
+    "Content-Type": "application/json"
+   }, 
+   method: "POST",
+   data:  { openId: that.openId,pageIndex:that.page,pageSize: that.pageSize}, 
+   complete: function( res ) { 
+    wx.hideLoading();
+    console.log(res)
+    if (res.data.data.rows.length <= 0){
+            //提示页码到了
+          that.setData({
+            lType:"end"
+          })
+          return
+     
+    }
+    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,
+  })
+
+    console.log(res.data.data.goods_search_response)
+    if( res == null || res.data == null ) { 
+     console.error( '网络请求失败' ); 
+     return; 
+    } 
+   } 
+  }) 
   },
 
   /**

+ 18 - 1
pages/order/order.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": "订单"
 }

+ 15 - 8
pages/order/order.wxml

@@ -1,24 +1,31 @@
 <!--pages/order/order.wxml-->
 <view wx:for="{{goodsList}}" wx:key="msg">
-  <l-card  type="primary" l-img-class="right-card" position="left" image="{{item.goods_image_url}}"
+  <l-card  type="primary" l-img-class="right-card" position="left" image="{{item.goodsThumbnailUrl}}"
   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.goods_name}}
+      {{item.goodsName}}
     </view>
+
     <view class="containertag">
-      <l-tag plain="{{true}}" font-color="#d81e06" shape="circle" size="medium"  l-class="tag" class="describe" >{{item.coupon_discount/100}}元券</l-tag>
-      <l-tag plain="{{true}}" font-color="#d81e06" shape="circle" size="medium"  l-class="tag"  class="fanli">返利{{(item.promotion_rate/100)}}</l-tag>
+      <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.orderAmount)}}</l-tag>
      
     </view>
+   
     <view class="price-v">
-     <text class="price">劵后¥{{(item.min_group_price-item.coupon_discount)/100}}</text> <text class="yprice">原价{{item.min_group_price/100}}</text>  
+     <text class="price">订单状态:{{item.orderStatusDesc}}</text> 
     </view>
-    <text class="contentcard">
-    销量:{{item.sales_tip}}
+  
+   <text class="contentcard">
+    订单号:{{item.orderSn}}
    </text>
-      <text class="contentcard">店铺:{{item.mall_name}}</text>
+   <!-- <text class="contentcard">
+    订单状态:{{item.orderStatusDesc}}
+   </text> -->
+   
+  <text class="contentcard">创建时间:{{item.orderCreateTime}}</text>
   </l-card>
 </view>
 

+ 66 - 0
pages/search-details/earch-details.js

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

+ 4 - 0
pages/search-details/earch-details.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "笑话"
+}

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

@@ -0,0 +1,5 @@
+<!--pages/search-details/earch-details.wxml-->
+<text>非洲野猫的样子
+初中一生物老师的佳作,讲非洲草原上的生态,全班无人听讲。
+
+他大怒:“你们都看我呀!你们不看我怎么知道非洲野猫长什么样子啊!”</text>

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

@@ -0,0 +1 @@
+/* pages/search-details/earch-details.wxss */

+ 9 - 0
pages/search/search.js

@@ -60,6 +60,15 @@ Page({
 
   },
 
+  goodsDetail:function(e){
+   
+      wx.navigateTo({
+       url: `/pages/search-details/earch-details`,
+      
+      })
+  },
+
+
   /**
    * 页面上拉触底事件的处理函数
    */

+ 2 - 1
pages/search/search.json

@@ -6,5 +6,6 @@
     "content-card": "/components/content-card/index",
     "l-card":"/dist/card/index",
     "l-tag":"/dist/tag/index"
-  }
+  },
+  "navigationBarTitleText": "笑话"
 }

+ 7 - 7
pages/search/search.wxml

@@ -1,25 +1,25 @@
 <!--pages/search/search.wxml-->
-<l-search-bar l-container-class="aa" bg-color="#e5e7df" placeholder="搜索" show-cancel="{{false}}" bind:linconfirm="search"/>
+<!-- <l-search-bar l-container-class="aa" bg-color="#e5e7df" placeholder="搜索" show-cancel="{{false}}" bind:linconfirm="search"/> -->
 
 
 <l-card type="primary" full l-class="card" l-img-class="right-card" image-mode="aspectFill"  image="https://cdn.3n6.cn/yun.share.tour/2021-05-27/2029259/1622099734452029086.jpg"
-  title="做一个热爱生活的人!">
+  title="非洲野猫的样子" bindtap="goodsDetail">
   <view class="content">
-    大雄要死掉了,他对妻子说:我死之后你找一个男人我就在地下打一一个滚。说完就咽气了。某天...
+    初中一生物老师的佳作,讲非洲草原上的生态,全班无人听讲。
   </view>
 </l-card>
 
 
 <l-card type="primary" full l-class="card" l-img-class="right-card" image-mode="aspectFill" image="https://cdn.3n6.cn/yun.share.tour/2021-05-27/2029259/1622099734452029086.jpg"
-  title="做一个热爱生活的人!">
+  title="非洲野猫的样子" bindtap="goodsDetail">
   <view class="content">
-    大雄要死掉了,他对妻子说:我死之后你找一个男人我就在地下打一一个滚。说完就咽气了。某天...
+    初中一生物老师的佳作,讲非洲草原上的生态,全班无人听讲。
   </view>
 </l-card>
 
 <l-card type="primary" full l-class="card" l-img-class="right-card" image-mode="aspectFill" image="https://cdn.3n6.cn/yun.share.tour/2021-05-27/2029259/1622099734452029086.jpg"
-  title="做一个热爱生活的人!">
+  title="非洲野猫的样子" bindtap="goodsDetail">
   <view class="content">
-    大雄要死掉了,他对妻子说:我死之后你找一个男人我就在地下打一一个滚。说完就咽气了。某天...
+    初中一生物老师的佳作,讲非洲草原上的生态,全班无人听讲。
   </view>
 </l-card>

+ 2 - 2
pages/shouye/shouye.js

@@ -124,14 +124,14 @@ Page({
        "Content-Type": "application/json"
       }, 
       method: "POST",
-      data:  { version: "1.0.0" }, 
+      data:  { version: "1.0.2" }, 
       complete: function( res ) { 
        console.log(res)
        if( res == null || res.data == null ) { 
         console.error( '网络请求失败' ); 
         return; 
        } 
-       if (res.data.data.type == "true"){
+       if (res.data.data.type == "false"){
           // wx.reLanch({
           //   url: 'pages/search/search'
           // })

+ 3 - 4
project.config.json

@@ -4,7 +4,7 @@
     "ignore": []
   },
   "setting": {
-    "urlCheck": false,
+    "urlCheck": true,
     "es6": true,
     "enhance": true,
     "postcss": true,
@@ -30,12 +30,11 @@
       "outputPath": ""
     },
     "useIsolateContext": true,
-    "useCompilerModule": true,
-    "userConfirmedUseCompilerModuleSwitch": false,
     "userConfirmedBundleSwitch": false,
     "packNpmManually": false,
     "packNpmRelationList": [],
-    "minifyWXSS": true
+    "minifyWXSS": true,
+    "showES6CompileOption": false
   },
   "compileType": "miniprogram",
   "libVersion": "2.17.0",