一半
This commit is contained in:
		
							parent
							
								
									9a53bca281
								
							
						
					
					
						commit
						7dd0d87e46
					
				
							
								
								
									
										11
									
								
								app.wxss
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								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 */
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,10 @@
 | 
			
		||||
Component({
 | 
			
		||||
    properties: {},
 | 
			
		||||
    properties: {
 | 
			
		||||
        num:String,
 | 
			
		||||
        cprice:String,
 | 
			
		||||
        freight:String,
 | 
			
		||||
        goods:Array
 | 
			
		||||
    },
 | 
			
		||||
    data: {},
 | 
			
		||||
    methods: {
 | 
			
		||||
        todetail() {
 | 
			
		||||
 | 
			
		||||
@ -1,9 +1,9 @@
 | 
			
		||||
<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">
 | 
			
		||||
                    共计1件商品  合计: 
 | 
			
		||||
                    <text>¥29.80</text> 
 | 
			
		||||
                    (含运费¥0.00)
 | 
			
		||||
                    共计{{num}}件商品  合计: 
 | 
			
		||||
                    <text>¥{{cprice}}</text> 
 | 
			
		||||
                    (含运费¥{{freight}})
 | 
			
		||||
                </view>
 | 
			
		||||
                <view class="operation">
 | 
			
		||||
                    <view class="button">评价</view>
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,10 @@
 | 
			
		||||
Component({
 | 
			
		||||
    properties: {
 | 
			
		||||
        title:String,
 | 
			
		||||
        spec:String,
 | 
			
		||||
        price:String,
 | 
			
		||||
        num:String,
 | 
			
		||||
        image:String
 | 
			
		||||
    },
 | 
			
		||||
    data: {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
@ -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;
 | 
			
		||||
 | 
			
		||||
@ -1,14 +1,14 @@
 | 
			
		||||
<view class="message">
 | 
			
		||||
                    <image class="image"></image>
 | 
			
		||||
                    <image class="image" src="{{image}}"></image>
 | 
			
		||||
                    <view class="introduce">
 | 
			
		||||
                        <view class="title">001|德国双心药房版 胶原蛋白美容口服液养颜</view>
 | 
			
		||||
                        <view class="title towline">{{title}}</view>
 | 
			
		||||
                        <view class="count">
 | 
			
		||||
                            <view>30只</view>
 | 
			
		||||
                            <view>1.0356kg</view>
 | 
			
		||||
                            <view>{{spec}}</view>
 | 
			
		||||
                            <!-- <view>1.0356kg</view> -->
 | 
			
		||||
                        </view>
 | 
			
		||||
                    </view>
 | 
			
		||||
                    <view class="parameter">
 | 
			
		||||
                        <view class="price">¥29.80</view>
 | 
			
		||||
                        <view class="num">x2</view>
 | 
			
		||||
                        <view class="price">¥{{price}}</view>
 | 
			
		||||
                        <view class="num">x{{num}}</view>
 | 
			
		||||
                    </view>
 | 
			
		||||
                </view>
 | 
			
		||||
@ -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}
 | 
			
		||||
 | 
			
		||||
@ -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()
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
})
 | 
			
		||||
@ -1,9 +1,13 @@
 | 
			
		||||
<van-tabs class="tab" swipe-threshold="5">
 | 
			
		||||
        <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 title="代发货"></van-tab>
 | 
			
		||||
        <van-tab title="待收货"> </van-tab>
 | 
			
		||||
        <van-tab title="已完成"> </van-tab>
 | 
			
		||||
        <van-tab title="售后"> </van-tab>
 | 
			
		||||
        <van-tab title="代发货">
 | 
			
		||||
        <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="待收货"> 
 | 
			
		||||
        <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>
 | 
			
		||||
@ -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: {
 | 
			
		||||
 | 
			
		||||
@ -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
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user