半完成
This commit is contained in:
parent
8e623028c4
commit
73d560e0c6
24
components/orderconfirm/input/input.js
Normal file
24
components/orderconfirm/input/input.js
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
// components/orderconfirm/orderyf/orderyf.js
|
||||||
|
Component({
|
||||||
|
/**
|
||||||
|
* 组件的属性列表
|
||||||
|
*/
|
||||||
|
properties: {
|
||||||
|
title:String,
|
||||||
|
placeholder:String
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组件的初始数据
|
||||||
|
*/
|
||||||
|
data: {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组件的方法列表
|
||||||
|
*/
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
4
components/orderconfirm/input/input.json
Normal file
4
components/orderconfirm/input/input.json
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"component": true,
|
||||||
|
"usingComponents": {}
|
||||||
|
}
|
21
components/orderconfirm/input/input.scss
Normal file
21
components/orderconfirm/input/input.scss
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
.orderyf {
|
||||||
|
width: 690rpx;
|
||||||
|
height: 96rpx;
|
||||||
|
line-height: 96rpx;
|
||||||
|
display: flex;
|
||||||
|
border-bottom: 2rpx solid #EAEAEA;
|
||||||
|
margin: 0 auto;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-size: 28rpx;
|
||||||
|
align-items: center;
|
||||||
|
.left {
|
||||||
|
margin-left: 31rpx
|
||||||
|
}
|
||||||
|
.right {
|
||||||
|
margin-right: 20rpx;
|
||||||
|
width: 450rpx;
|
||||||
|
height: 35rpx;
|
||||||
|
font-size: 25rpx;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
}
|
4
components/orderconfirm/input/input.wxml
Normal file
4
components/orderconfirm/input/input.wxml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<view class="orderyf">
|
||||||
|
<view class="left">{{title}}</view>
|
||||||
|
<input class="right" placeholder="{{placeholder}}"></input>
|
||||||
|
</view>
|
1
components/orderconfirm/input/input.wxss
Normal file
1
components/orderconfirm/input/input.wxss
Normal file
@ -0,0 +1 @@
|
|||||||
|
.orderyf{width:690rpx;height:96rpx;line-height:96rpx;display:flex;border-bottom:2rpx solid #EAEAEA;margin:0 auto;justify-content:space-between;font-size:28rpx;align-items:center}.orderyf .left{margin-left:31rpx}.orderyf .right{margin-right:20rpx;width:450rpx;height:35rpx;font-size:25rpx;text-align:right}
|
@ -23,11 +23,14 @@ Component({
|
|||||||
this.setData({
|
this.setData({
|
||||||
id:0
|
id:0
|
||||||
})
|
})
|
||||||
|
this.triggerEvent("tab",{id:0})
|
||||||
},
|
},
|
||||||
b(){
|
b(){
|
||||||
this.setData({
|
this.setData({
|
||||||
id:1
|
id:1
|
||||||
})
|
})
|
||||||
|
this.triggerEvent("tab",{id:1})
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
39
components/orderconfirm/time/time.js
Normal file
39
components/orderconfirm/time/time.js
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
// components/orderconfirm/orderyf/orderyf.js
|
||||||
|
Component({
|
||||||
|
/**
|
||||||
|
* 组件的属性列表
|
||||||
|
*/
|
||||||
|
properties: {
|
||||||
|
price: String
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组件的初始数据
|
||||||
|
*/
|
||||||
|
data: {
|
||||||
|
date: "",
|
||||||
|
start:""
|
||||||
|
},
|
||||||
|
created(){
|
||||||
|
this.setData({
|
||||||
|
date:this.getCurTime(),
|
||||||
|
start:this.getCurTime()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 组件的方法列表
|
||||||
|
*/
|
||||||
|
methods: {
|
||||||
|
bindDateChange: function (e) {
|
||||||
|
console.log('picker发送选择改变,携带值为', e.detail.value)
|
||||||
|
this.setData({
|
||||||
|
date: e.detail.value
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getCurTime() {
|
||||||
|
var date = new Date();
|
||||||
|
return date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
4
components/orderconfirm/time/time.json
Normal file
4
components/orderconfirm/time/time.json
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"component": true,
|
||||||
|
"usingComponents": {}
|
||||||
|
}
|
17
components/orderconfirm/time/time.scss
Normal file
17
components/orderconfirm/time/time.scss
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
.orderyf {
|
||||||
|
width: 690rpx;
|
||||||
|
height: 96rpx;
|
||||||
|
line-height: 96rpx;
|
||||||
|
display: flex;
|
||||||
|
border-bottom: 2rpx solid #EAEAEA;
|
||||||
|
margin: 0 auto;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-size: 28rpx;
|
||||||
|
.left {
|
||||||
|
margin-left: 31rpx
|
||||||
|
}
|
||||||
|
.right {
|
||||||
|
margin-right: 20rpx;
|
||||||
|
;
|
||||||
|
}
|
||||||
|
}
|
6
components/orderconfirm/time/time.wxml
Normal file
6
components/orderconfirm/time/time.wxml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<picker mode="date" value="{{date}}" bindchange="bindDateChange" start="{{start}}">
|
||||||
|
<view class="orderyf">
|
||||||
|
<view class="left">收货时间</view>
|
||||||
|
<view class="right">{{date == "" ? '请选择提货时间': date}}</view>
|
||||||
|
</view>
|
||||||
|
</picker>
|
18
components/orderconfirm/time/time.wxss
Normal file
18
components/orderconfirm/time/time.wxss
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
.orderyf {
|
||||||
|
width: 690rpx;
|
||||||
|
height: 96rpx;
|
||||||
|
line-height: 96rpx;
|
||||||
|
display: flex;
|
||||||
|
border-bottom: 2rpx solid #EAEAEA;
|
||||||
|
margin: 0 auto;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-size: 28rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.orderyf .left {
|
||||||
|
margin-left: 31rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.orderyf .right {
|
||||||
|
margin-right: 20rpx;
|
||||||
|
}
|
@ -6,7 +6,8 @@ Page({
|
|||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
list: {}
|
list: {},
|
||||||
|
fs:0
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -122,5 +123,11 @@ Page({
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
tab(a){
|
||||||
|
console.log(a.detail.id)
|
||||||
|
this.setData({
|
||||||
|
fs:a.detail.id
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
@ -7,6 +7,8 @@
|
|||||||
"chooseaddr": "/components/orderconfirm/orderchooseaddr/orderchooseaddr",
|
"chooseaddr": "/components/orderconfirm/orderchooseaddr/orderchooseaddr",
|
||||||
"orderyf": "/components/orderconfirm/orderyf/orderyf",
|
"orderyf": "/components/orderconfirm/orderyf/orderyf",
|
||||||
"agree": "/components/orderconfirm/orderagreement/orderagreement",
|
"agree": "/components/orderconfirm/orderagreement/orderagreement",
|
||||||
"bottom": "/components/orderconfirm/orderbottom/orderbottom"
|
"bottom": "/components/orderconfirm/orderbottom/orderbottom",
|
||||||
|
"inputs": "/components/orderconfirm/input/input",
|
||||||
|
"time":"/components/orderconfirm/time/time"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,9 +1,12 @@
|
|||||||
<view class="orderconfirm">
|
<view class="orderconfirm">
|
||||||
<shopinfo wx:for="{{list.cartList}}" title="{{item.goods_name}}" price="{{item.goods_price}}" spec="{{item.spec_key_name?item.spec_key_name:'默认规格'}}" img="{{item.image}}"></shopinfo>
|
<shopinfo wx:for="{{list.cartList}}" title="{{item.goods_name}}" price="{{item.goods_price}}" spec="{{item.spec_key_name?item.spec_key_name:'默认规格'}}" img="{{item.image}}"></shopinfo>
|
||||||
<!-- <shopinfo></shopinfo> -->
|
<!-- <shopinfo></shopinfo> -->
|
||||||
<chooseway></chooseway>
|
<chooseway bind:tab="tab"></chooseway>
|
||||||
<chooseaddr name="{{list.addressList.consignee}}" addr="{{list.addressList.province? list.addressList.province + list.addressList.city + list.addressList.address:''}}" number="{{list.addressList.zipcode}}" phone="{{list.addressList.mobile}}"></chooseaddr>
|
<chooseaddr wx:if="{{fs == 0}}" name="{{list.addressList.consignee}}" addr="{{list.addressList.province? list.addressList.province + list.addressList.city + list.addressList.address:''}}" number="{{list.addressList.zipcode}}" phone="{{list.addressList.mobile}}"></chooseaddr>
|
||||||
<orderyf price="{{list.express_price}}"></orderyf>
|
<orderyf wx:if="{{fs == 0}}" price="{{list.express_price}}"></orderyf>
|
||||||
|
<time wx:if="{{fs == 1}}"></time>
|
||||||
|
<inputs wx:if="{{fs == 1}}" title="提货姓名" placeholder="请输入姓名"></inputs>
|
||||||
|
<inputs wx:if="{{fs == 1}}" title="联系手机" placeholder="请输入手机号"></inputs>
|
||||||
<agree></agree>
|
<agree></agree>
|
||||||
<view class="bottom">
|
<view class="bottom">
|
||||||
<bottom price="{{list.totalPrice.total_fee}}" bind:sub="sub"></bottom>
|
<bottom price="{{list.totalPrice.total_fee}}" bind:sub="sub"></bottom>
|
||||||
|
Loading…
Reference in New Issue
Block a user