完成
This commit is contained in:
		
							parent
							
								
									7dd0d87e46
								
							
						
					
					
						commit
						92f0dd4c46
					
				@ -1,9 +1,11 @@
 | 
			
		||||
import bin from "../../../utils/bin"
 | 
			
		||||
Component({
 | 
			
		||||
    properties: {
 | 
			
		||||
        num: String,
 | 
			
		||||
        cprice: String,
 | 
			
		||||
        freight: String,
 | 
			
		||||
        goods:Array
 | 
			
		||||
        goods: Array,
 | 
			
		||||
        gid: String
 | 
			
		||||
    },
 | 
			
		||||
    data: {},
 | 
			
		||||
    methods: {
 | 
			
		||||
@ -11,6 +13,40 @@ Component({
 | 
			
		||||
            wx.navigateTo({
 | 
			
		||||
                url: "/pages/undetermined/undetermined"
 | 
			
		||||
            })
 | 
			
		||||
        },
 | 
			
		||||
        cancel() {
 | 
			
		||||
            bin.getuserid().then((id) => {
 | 
			
		||||
                bin.request({
 | 
			
		||||
                    url: "User/cancelOrder",
 | 
			
		||||
                    urldata: {
 | 
			
		||||
                        user_id: id,
 | 
			
		||||
                        order_id: this.data.gid
 | 
			
		||||
                    }
 | 
			
		||||
                }).then((res) => {
 | 
			
		||||
                    console.log(res)
 | 
			
		||||
                })
 | 
			
		||||
            })
 | 
			
		||||
 | 
			
		||||
        },
 | 
			
		||||
        pay(){
 | 
			
		||||
            bin.getuserid().then((id)=>{
 | 
			
		||||
                bin.request({
 | 
			
		||||
                    url:"Cart/getWXPayData",
 | 
			
		||||
                    urldata:{
 | 
			
		||||
                        user_id:id,
 | 
			
		||||
                        order_id:this.data.gid
 | 
			
		||||
                    }
 | 
			
		||||
                }).then((res)=>{
 | 
			
		||||
                    console.log(res)
 | 
			
		||||
                    wx.requestPayment({
 | 
			
		||||
                        timeStamp:res.data.result.wdata.timeStamp + "",
 | 
			
		||||
                        nonceStr:res.data.result.wdata.nonceStr,
 | 
			
		||||
                        package:res.data.result.wdata.package,
 | 
			
		||||
                        signType:"MD5",
 | 
			
		||||
                        paySign:res.data.result.wdata.sign
 | 
			
		||||
                    })
 | 
			
		||||
                })
 | 
			
		||||
            })
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
})
 | 
			
		||||
@ -1,14 +1,12 @@
 | 
			
		||||
<view class="commodity" bindtap="todetail">
 | 
			
		||||
                <message wx:for="{{goods}}" title="{{item.goods_name}}" spec="{{item.spec_key_name}}" price="{{item.goods_price}}" num="{{goods_num}}" image="{{item.image}}"></message>
 | 
			
		||||
    <message wx:for="{{goods}}" title="{{item.goods_name}}" spec="{{item.spec_key_name}}" price="{{item.goods_price}}" num="{{item.goods_num}}" image="{{item.image}}"></message>
 | 
			
		||||
    <view class="aggregate">
 | 
			
		||||
        共计{{num}}件商品  合计:
 | 
			
		||||
        <text>¥{{cprice}}</text>
 | 
			
		||||
        (含运费¥{{freight}})
 | 
			
		||||
    </view>
 | 
			
		||||
    <view class="operation">
 | 
			
		||||
                    <view class="button">评价</view>
 | 
			
		||||
 | 
			
		||||
                    <view class="button hlight">评价</view>
 | 
			
		||||
 | 
			
		||||
        <view class="button" catch:tap="cancel">取消订单</view>
 | 
			
		||||
        <view class="button hlight" catch:tap="pay">立即付款</view>
 | 
			
		||||
    </view>
 | 
			
		||||
</view>
 | 
			
		||||
@ -1,13 +1,17 @@
 | 
			
		||||
<van-tabs class="tab" swipe-threshold="5">
 | 
			
		||||
    <van-tab title="待付款">
 | 
			
		||||
            <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>
 | 
			
		||||
        <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}}" gid="{{item.order_id}}"></commodity>
 | 
			
		||||
    </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>
 | 
			
		||||
        <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>
 | 
			
		||||
        <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>
 | 
			
		||||
        <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>
 | 
			
		||||
        <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>
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user