diff --git a/app.wxss b/app.wxss index 3906c42..8abb3a3 100644 --- a/app.wxss +++ b/app.wxss @@ -10,6 +10,17 @@ * 2. Prevent adjustments of font size after orientation changes in iOS. */ + .towline { + overflow: hidden; + + text-overflow: ellipsis; + + display: -webkit-box; + + -webkit-box-orient: vertical; + + -webkit-line-clamp: 2; +} html { line-height: 1; /* 1 */ -webkit-text-size-adjust: 100%; /* 2 */ diff --git a/components/order/commodity/index.js b/components/order/commodity/index.js index 6f82273..17e3ab3 100644 --- a/components/order/commodity/index.js +++ b/components/order/commodity/index.js @@ -1,5 +1,10 @@ Component({ - properties: {}, + properties: { + num:String, + cprice:String, + freight:String, + goods:Array + }, data: {}, methods: { todetail() { diff --git a/components/order/commodity/index.wxml b/components/order/commodity/index.wxml index 37ed100..31abf4e 100644 --- a/components/order/commodity/index.wxml +++ b/components/order/commodity/index.wxml @@ -1,9 +1,9 @@ - + - 共计1件商品 合计: - ¥29.80 - (含运费¥0.00) + 共计{{num}}件商品 合计: + ¥{{cprice}} + (含运费¥{{freight}}) 评价 diff --git a/components/order/message/index.js b/components/order/message/index.js index c0c906a..b5fee42 100644 --- a/components/order/message/index.js +++ b/components/order/message/index.js @@ -1,5 +1,10 @@ Component({ properties: { + title:String, + spec:String, + price:String, + num:String, + image:String }, data: { }, diff --git a/components/order/message/index.scss b/components/order/message/index.scss index 33478f7..3b9631d 100644 --- a/components/order/message/index.scss +++ b/components/order/message/index.scss @@ -1,3 +1,14 @@ +.towline { + overflow: hidden; + + text-overflow: ellipsis; + + display: -webkit-box; + + -webkit-box-orient: vertical; + + -webkit-line-clamp: 2; +} .message { padding: 35rpx; display: flex; diff --git a/components/order/message/index.wxml b/components/order/message/index.wxml index b8fe674..a1a7212 100644 --- a/components/order/message/index.wxml +++ b/components/order/message/index.wxml @@ -1,14 +1,14 @@ - + - 001|德国双心药房版 胶原蛋白美容口服液养颜 + {{title}} - 30只 - 1.0356kg + {{spec}} + - ¥29.80 - x2 + ¥{{price}} + x{{num}} \ No newline at end of file diff --git a/components/order/message/index.wxss b/components/order/message/index.wxss index 6221a43..6e194d5 100644 --- a/components/order/message/index.wxss +++ b/components/order/message/index.wxss @@ -1 +1 @@ -.message{padding:35rpx;display:flex;align-items:center;border-bottom:1rpx solid #F2F2F2}.message .image{width:141rpx;height:150rpx;background-color:#000;margin-left:34rpx}.message .introduce{margin-left:32rpx;height:120rpx;display:flex;flex-direction:column;justify-content:space-between;width:362rpx}.message .introduce .title{font-size:28rpx;color:#333}.message .introduce .count{font-size:24rpx;color:#999;display:flex}.message .introduce .count>view{margin-right:27rpx}.message .parameter{width:150rpx;height:120rpx;display:flex;flex-direction:column;justify-content:space-between;align-items:flex-end} +.towline{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.message{padding:35rpx;display:flex;align-items:center;border-bottom:1rpx solid #F2F2F2}.message .image{width:141rpx;height:150rpx;background-color:#000;margin-left:34rpx}.message .introduce{margin-left:32rpx;height:120rpx;display:flex;flex-direction:column;justify-content:space-between;width:362rpx}.message .introduce .title{font-size:28rpx;color:#333}.message .introduce .count{font-size:24rpx;color:#999;display:flex}.message .introduce .count>view{margin-right:27rpx}.message .parameter{width:150rpx;height:120rpx;display:flex;flex-direction:column;justify-content:space-between;align-items:flex-end} diff --git a/components/order/tab/index.js b/components/order/tab/index.js index c0c906a..6cf9191 100644 --- a/components/order/tab/index.js +++ b/components/order/tab/index.js @@ -1,8 +1,86 @@ +import bin from "../../../utils/bin" Component({ properties: { }, data: { }, methods: { + getorder(res){ + bin.request({ + url:"User/getOrderList", + urldata:{ + user_id:res, + type:"WAITPAY", + page:"0" + } + }).then((r)=>{ + console.log(r) + this.setData({ + WAITPAY:r.data.result + }) + }) + bin.request({ + url:"User/getOrderList", + urldata:{ + user_id:res, + type:"WAITSEND", + page:"0" + } + }).then((r)=>{ + console.log(r) + this.setData({ + WAITSEND:r.data.result + }) + }) + bin.request({ + url:"User/getOrderList", + urldata:{ + user_id:res, + type:"WAITRECEIVE", + page:"0" + } + }).then((r)=>{ + console.log(r) + this.setData({ + WAITRECEIVE:r.data.result + }) + }) + bin.request({ + url:"User/getOrderList", + urldata:{ + user_id:res, + type:"FINISH", + page:"0" + } + }).then((r)=>{ + console.log(r) + this.setData({ + FINISH:r.data.result + }) + }) + bin.request({ + url:"User/getOrderList", + urldata:{ + user_id:res, + type:"AFTERSALE", + page:"0" + } + }).then((r)=>{ + console.log(r) + this.setData({ + AFTERSALE:r.data.result + }) + }) + }, + getlist(){ + bin.getuserid().then((res)=>{ + this.getorder(res) + }) + } + + }, + ready(){ + this.getlist() } + }) \ No newline at end of file diff --git a/components/order/tab/index.wxml b/components/order/tab/index.wxml index 9d5d671..93dd0b1 100644 --- a/components/order/tab/index.wxml +++ b/components/order/tab/index.wxml @@ -1,9 +1,13 @@ - + - - - - + + + + + + + + \ No newline at end of file diff --git a/pages/orderconfirm/orderconfirm.js b/pages/orderconfirm/orderconfirm.js index fde7963..feb12ab 100644 --- a/pages/orderconfirm/orderconfirm.js +++ b/pages/orderconfirm/orderconfirm.js @@ -13,7 +13,7 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad: function (options) { - bin.getusetid().then((res) => { + bin.getuserid().then((res) => { bin.request({ url: "Cart/cart2", urldata: { @@ -77,7 +77,7 @@ Page({ }, sub() { - bin.getusetid().then((res) => { + bin.getuserid().then((res) => { bin.request({ url: "Cart/cart3", urldata: { diff --git a/utils/bin.js b/utils/bin.js index c94da10..54298dd 100644 --- a/utils/bin.js +++ b/utils/bin.js @@ -51,7 +51,7 @@ let request = function (obj){ }) }) } -let getusetid = function(){ +let getuserid = function(){ return new Promise((res,rej)=>{ request({ url:"User/validateOpenid" @@ -64,5 +64,5 @@ let getusetid = function(){ } module.exports = { - request,getusetid + request,getuserid } \ No newline at end of file