This commit is contained in:
pplokijuhyg 2019-12-23 16:53:54 +08:00
parent 9a53bca281
commit 7dd0d87e46
11 changed files with 135 additions and 21 deletions

View File

@ -10,6 +10,17 @@
* 2. Prevent adjustments of font size after orientation changes in iOS. * 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 { html {
line-height: 1; /* 1 */ line-height: 1; /* 1 */
-webkit-text-size-adjust: 100%; /* 2 */ -webkit-text-size-adjust: 100%; /* 2 */

View File

@ -1,5 +1,10 @@
Component({ Component({
properties: {}, properties: {
num:String,
cprice:String,
freight:String,
goods:Array
},
data: {}, data: {},
methods: { methods: {
todetail() { todetail() {

View File

@ -1,9 +1,9 @@
<view class="commodity" bindtap="todetail"> <view class="commodity" bindtap="todetail">
<message></message> <message wx:for="{{goods}}" title="{{item.goods_name}}" spec="{{item.spec_key_name}}" price="{{item.goods_price}}" num="{{goods_num}}" image="{{item.image}}"></message>
<view class="aggregate"> <view class="aggregate">
共计1件商品 合计: 共计{{num}}件商品 合计:
<text>¥29.80</text> <text>¥{{cprice}}</text>
(含运费¥0.00) (含运费¥{{freight}})
</view> </view>
<view class="operation"> <view class="operation">
<view class="button">评价</view> <view class="button">评价</view>

View File

@ -1,5 +1,10 @@
Component({ Component({
properties: { properties: {
title:String,
spec:String,
price:String,
num:String,
image:String
}, },
data: { data: {
}, },

View File

@ -1,3 +1,14 @@
.towline {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.message { .message {
padding: 35rpx; padding: 35rpx;
display: flex; display: flex;

View File

@ -1,14 +1,14 @@
<view class="message"> <view class="message">
<image class="image"></image> <image class="image" src="{{image}}"></image>
<view class="introduce"> <view class="introduce">
<view class="title">001|德国双心药房版 胶原蛋白美容口服液养颜</view> <view class="title towline">{{title}}</view>
<view class="count"> <view class="count">
<view>30只</view> <view>{{spec}}</view>
<view>1.0356kg</view> <!-- <view>1.0356kg</view> -->
</view> </view>
</view> </view>
<view class="parameter"> <view class="parameter">
<view class="price">¥29.80</view> <view class="price">¥{{price}}</view>
<view class="num">x2</view> <view class="num">x{{num}}</view>
</view> </view>
</view> </view>

View File

@ -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}

View File

@ -1,8 +1,86 @@
import bin from "../../../utils/bin"
Component({ Component({
properties: { properties: {
}, },
data: { data: {
}, },
methods: { 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()
} }
}) })

View File

@ -1,9 +1,13 @@
<van-tabs class="tab" swipe-threshold="5"> <van-tabs class="tab" swipe-threshold="5">
<van-tab title="待付款"> <van-tab title="待付款">
<commodity></commodity> <commodity wx:for="{{WAITPAY}}" wx:for-index="j" wx:key="{{j}}" num="{{item.goods_num}}" cprice="{{item.goods_price}}" freight="{{item.integral_money}}" goods="{{item.goods_list}}"> </commodity>
</van-tab> </van-tab>
<van-tab title="代发货"></van-tab> <van-tab title="代发货">
<van-tab title="待收货"> </van-tab> <commodity wx:for="{{WAITSEND}}" wx:for-index="j" wx:key="{{j}}" num="{{item.goods_num}}" cprice="{{item.goods_price}}" freight="{{item.integral_money}}" goods="{{item.goods_list}}"> </commodity></van-tab>
<van-tab title="已完成"> </van-tab> <van-tab title="待收货">
<van-tab title="售后"> </van-tab> <commodity wx:for="{{WAITRECEIVE}}" wx:for-index="j" wx:key="{{j}}" num="{{item.goods_num}}" cprice="{{item.goods_price}}" freight="{{item.integral_money}}" goods="{{item.goods_list}}"> </commodity></van-tab>
<van-tab title="已完成">
<commodity wx:for="{{FINISH}}" wx:for-index="j" wx:key="{{j}}" num="{{item.goods_num}}" cprice="{{item.goods_price}}" freight="{{item.integral_money}}" goods="{{item.goods_list}}"> </commodity> </van-tab>
<van-tab title="售后">
<commodity wx:for="{{AFTERSALE}}" wx:for-index="j" wx:key="{{j}}" num="{{item.goods_num}}" cprice="{{item.goods_price}}" freight="{{item.integral_money}}" goods="{{item.goods_list}}"> </commodity> </van-tab>
</van-tabs> </van-tabs>

View File

@ -13,7 +13,7 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
bin.getusetid().then((res) => { bin.getuserid().then((res) => {
bin.request({ bin.request({
url: "Cart/cart2", url: "Cart/cart2",
urldata: { urldata: {
@ -77,7 +77,7 @@ Page({
}, },
sub() { sub() {
bin.getusetid().then((res) => { bin.getuserid().then((res) => {
bin.request({ bin.request({
url: "Cart/cart3", url: "Cart/cart3",
urldata: { urldata: {

View File

@ -51,7 +51,7 @@ let request = function (obj){
}) })
}) })
} }
let getusetid = function(){ let getuserid = function(){
return new Promise((res,rej)=>{ return new Promise((res,rej)=>{
request({ request({
url:"User/validateOpenid" url:"User/validateOpenid"
@ -64,5 +64,5 @@ let getusetid = function(){
} }
module.exports = { module.exports = {
request,getusetid request,getuserid
} }