完善
This commit is contained in:
parent
5f652d6183
commit
67682de4c7
@ -4,8 +4,8 @@ Component({
|
|||||||
* 组件的属性列表
|
* 组件的属性列表
|
||||||
*/
|
*/
|
||||||
properties: {
|
properties: {
|
||||||
title:String,
|
title: String,
|
||||||
placeholder:String
|
placeholder: String
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -19,6 +19,8 @@ Component({
|
|||||||
* 组件的方法列表
|
* 组件的方法列表
|
||||||
*/
|
*/
|
||||||
methods: {
|
methods: {
|
||||||
|
input(a) {
|
||||||
|
this.triggerEvent("input",{value:a.detail.value})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<view class="orderyf">
|
<view class="orderyf">
|
||||||
<view class="left">{{title}}</view>
|
<view class="left">{{title}}</view>
|
||||||
<input class="right" placeholder="{{placeholder}}"></input>
|
<input class="right" bindinput="input" placeholder="{{placeholder}}"></input>
|
||||||
</view>
|
</view>
|
@ -29,6 +29,7 @@ Component({
|
|||||||
this.setData({
|
this.setData({
|
||||||
date: e.detail.value
|
date: e.detail.value
|
||||||
})
|
})
|
||||||
|
this.triggerEvent("input",{date:e.detail.value})
|
||||||
},
|
},
|
||||||
getCurTime() {
|
getCurTime() {
|
||||||
var date = new Date();
|
var date = new Date();
|
||||||
|
@ -6,7 +6,8 @@ Component({
|
|||||||
number:String,
|
number:String,
|
||||||
time:String,
|
time:String,
|
||||||
text:String,
|
text:String,
|
||||||
goods:Array
|
goods:Array,
|
||||||
|
ziti:String
|
||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
},
|
},
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="message">
|
<view class="message">
|
||||||
<text>配送方式</text>
|
<text>配送方式</text>
|
||||||
<text>快递 </text>
|
<text>{{ziti == 1?"自提":"快递"}} </text>
|
||||||
</view>
|
</view>
|
||||||
<view class="leave">
|
<view class="leave">
|
||||||
<text>备注:</text>
|
<text>备注:</text>
|
||||||
|
@ -7,7 +7,10 @@ Page({
|
|||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
list: {},
|
list: {},
|
||||||
fs:0
|
fs:0,
|
||||||
|
date:"",
|
||||||
|
phone:"",
|
||||||
|
name:""
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -78,56 +81,140 @@ Page({
|
|||||||
|
|
||||||
},
|
},
|
||||||
sub() {
|
sub() {
|
||||||
if (this.data.list.addressList == null) {
|
if (this.data.list.addressList == null && this.data.fs == 0) {
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: "请先添加地址",
|
title: "请先添加地址",
|
||||||
icon: "none"
|
icon: "none"
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
if ((!this.data.name || !this.data.phone || !this.data.date) && this.data.fs == 1) {
|
||||||
|
wx.showToast({
|
||||||
|
title: "请完善提货信息",
|
||||||
|
icon: "none"
|
||||||
|
})
|
||||||
console.log(123)
|
console.log(123)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
bin.getuserid().then((res) => {
|
if(this.data.fs == 0){
|
||||||
bin.request({
|
bin.getuserid().then((res) => {
|
||||||
url: "Cart/cart3",
|
bin.request({
|
||||||
urldata: {
|
url: "Cart/cart3",
|
||||||
act: "",
|
urldata: {
|
||||||
submit_order: "",
|
act: "",
|
||||||
user_id: res,
|
submit_order: "",
|
||||||
address_id: this.data.list.addressList.address_id,
|
user_id: res,
|
||||||
user_money: 0,
|
address_id: this.data.list.addressList.address_id,
|
||||||
pay_points: 0,
|
user_money: 0,
|
||||||
couponTypeSelect: 1,
|
pay_points: 0,
|
||||||
coupon_id: 0,
|
couponTypeSelect: 1,
|
||||||
pay_code: "weixin",
|
coupon_id: 0,
|
||||||
couponCode: ""
|
pay_code: "weixin",
|
||||||
}
|
couponCode: ""
|
||||||
}).then((r) => {
|
}
|
||||||
console.log(r)
|
}).then((r) => {
|
||||||
let { timeStamp, nonceStr, signType, sign } = r.data.data.wdata
|
console.log(r)
|
||||||
// timeStamp = timeStamp
|
let { timeStamp, nonceStr, signType, sign } = r.data.data.wdata
|
||||||
timeStamp = timeStamp.toString()
|
// timeStamp = timeStamp
|
||||||
console.log(timeStamp)
|
timeStamp = timeStamp.toString()
|
||||||
wx.requestPayment({
|
console.log(timeStamp)
|
||||||
timeStamp, nonceStr, package: r.data.data.wdata.package, signType, paySign: sign,
|
wx.requestPayment({
|
||||||
success(res) {
|
timeStamp, nonceStr, package: r.data.data.wdata.package, signType, paySign: sign,
|
||||||
console.log("成功")
|
success(res) {
|
||||||
wx.redirectTo({
|
console.log("成功")
|
||||||
url: "/pages/order/order?index=1"
|
wx.redirectTo({
|
||||||
})
|
url: "/pages/order/order?index=1"
|
||||||
},
|
})
|
||||||
fail(res) { console.log(res)
|
},
|
||||||
wx.redirectTo({
|
fail(res) { console.log(res)
|
||||||
url: "/pages/order/order?index=0"
|
wx.redirectTo({
|
||||||
})}
|
url: "/pages/order/order?index=0"
|
||||||
|
})}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
}else{
|
||||||
|
bin.getuserid().then((res) => {
|
||||||
|
bin.request({
|
||||||
|
url: "Cart/cart3",
|
||||||
|
urldata: {
|
||||||
|
act: "",
|
||||||
|
submit_order: "",
|
||||||
|
user_id: res,
|
||||||
|
user_money: 0,
|
||||||
|
pay_points: 0,
|
||||||
|
couponTypeSelect: 1,
|
||||||
|
coupon_id: 0,
|
||||||
|
pay_code: "weixin",
|
||||||
|
couponCode: "",
|
||||||
|
|
||||||
|
},
|
||||||
|
data:{
|
||||||
|
ziti_name:this.data.name,
|
||||||
|
ziti_phone:this.data.phone,
|
||||||
|
ziti_date:this.data.date,
|
||||||
|
delivery:"ziti"
|
||||||
|
}
|
||||||
|
}).then((r) => {
|
||||||
|
console.log(r)
|
||||||
|
let { timeStamp, nonceStr, signType, sign } = r.data.data.wdata
|
||||||
|
// timeStamp = timeStamp
|
||||||
|
timeStamp = timeStamp.toString()
|
||||||
|
console.log(timeStamp)
|
||||||
|
wx.requestPayment({
|
||||||
|
timeStamp, nonceStr, package: r.data.data.wdata.package, signType, paySign: sign,
|
||||||
|
success(res) {
|
||||||
|
console.log("成功")
|
||||||
|
wx.redirectTo({
|
||||||
|
url: "/pages/order/order?index=1"
|
||||||
|
})
|
||||||
|
},
|
||||||
|
fail(res) { console.log(res)
|
||||||
|
wx.redirectTo({
|
||||||
|
url: "/pages/order/order?index=0"
|
||||||
|
})}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
tab(a){
|
tab(a){
|
||||||
console.log(a.detail.id)
|
console.log(a.detail.id)
|
||||||
|
bin.getuserid().then((res) => {
|
||||||
|
bin.request({
|
||||||
|
url: "Cart/cart2",
|
||||||
|
urldata: {
|
||||||
|
user_id: res
|
||||||
|
},
|
||||||
|
data:{
|
||||||
|
delivery:a.detail.id == 1 ? "ziti" : "express"
|
||||||
|
}
|
||||||
|
}).then((res) => {
|
||||||
|
console.log(res)
|
||||||
|
this.setData({
|
||||||
|
list: res.data.result
|
||||||
|
})
|
||||||
|
this.setData({
|
||||||
|
fs:a.detail.id
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
date(a){
|
||||||
this.setData({
|
this.setData({
|
||||||
fs:a.detail.id
|
date:a.detail.date
|
||||||
|
})
|
||||||
|
},
|
||||||
|
name(a){
|
||||||
|
this.setData({
|
||||||
|
name:a.detail.value
|
||||||
|
})
|
||||||
|
},
|
||||||
|
phone(a){
|
||||||
|
this.setData({
|
||||||
|
phone:a.detail.value
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
@ -4,9 +4,9 @@
|
|||||||
<chooseway bind:tab="tab"></chooseway>
|
<chooseway bind:tab="tab"></chooseway>
|
||||||
<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>
|
<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 wx:if="{{fs == 0}}" price="{{list.express_price}}"></orderyf>
|
<orderyf wx:if="{{fs == 0}}" price="{{list.express_price}}"></orderyf>
|
||||||
<time wx:if="{{fs == 1}}"></time>
|
<time bind:input="date" wx:if="{{fs == 1}}"></time>
|
||||||
<inputs wx:if="{{fs == 1}}" title="提货姓名" placeholder="请输入姓名"></inputs>
|
<inputs bind:input="name" wx:if="{{fs == 1}}" title="提货姓名" placeholder="请输入姓名"></inputs>
|
||||||
<inputs wx:if="{{fs == 1}}" title="联系手机" placeholder="请输入手机号"></inputs>
|
<inputs bind:input="phone" 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>
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"navigationBarTitleText": "订单详情",
|
||||||
"usingComponents": {
|
"usingComponents": {
|
||||||
"content":"../components/particulars/content/index",
|
"content":"../components/particulars/content/index",
|
||||||
"orderchooseaddr":"../components/particulars/orderchooseaddr/index",
|
"orderchooseaddr":"../components/particulars/orderchooseaddr/index",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<view class="box">
|
<view class="box">
|
||||||
<orderchooseaddr name="{{list.consignee}}" addr="{{list.address}}" phone="{{list.mobile}}"></orderchooseaddr>
|
<orderchooseaddr name="{{list.consignee}}" addr="{{list.address}}" phone="{{list.mobile}}"></orderchooseaddr>
|
||||||
<content num="{{list.num}}" price="{{list.goods_price}}" cprice="{{list.integral_money}}" number="{{list.order_sn}}" time="{{list.add_time}}" goods="{{list.goods_list}}" text="{{list.user_note}}"></content>
|
<content ziti="{{list.is_ziti}}" num="{{list.num}}" price="{{list.goods_price}}" cprice="{{list.integral_money}}" number="{{list.order_sn}}" time="{{list.add_time}}" goods="{{list.goods_list}}" text="{{list.user_note}}"></content>
|
||||||
<submit></submit>
|
<submit></submit>
|
||||||
</view>
|
</view>
|
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"navigationBarTitleText": "订单详情",
|
||||||
"usingComponents": {
|
"usingComponents": {
|
||||||
"content":"../components/particulars/content/index",
|
"content":"../components/particulars/content/index",
|
||||||
"orderchooseaddr":"../components/particulars/orderchooseaddr/index"
|
"orderchooseaddr":"../components/particulars/orderchooseaddr/index"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<view class="box">
|
<view class="box">
|
||||||
<orderchooseaddr name="{{list.consignee}}" addr="{{list.address}}" phone="{{list.mobile}}"></orderchooseaddr>
|
<orderchooseaddr name="{{list.consignee}}" addr="{{list.address}}" phone="{{list.mobile}}"></orderchooseaddr>
|
||||||
<content num="{{list.num}}" price="{{list.goods_price}}" cprice="{{list.integral_money}}" number="{{list.order_sn}}" time="{{list.add_time}}" goods="{{list.goods_list}}" text="{{list.user_note}}"></content>
|
<content num="{{list.num}}" ziti="{{list.is_ziti}}" price="{{list.goods_price}}" cprice="{{list.integral_money}}" number="{{list.order_sn}}" time="{{list.add_time}}" goods="{{list.goods_list}}" text="{{list.user_note}}"></content>
|
||||||
</view>
|
</view>
|
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"navigationBarTitleText": "订单详情",
|
||||||
"usingComponents": {
|
"usingComponents": {
|
||||||
"content":"../components/particulars/content/index",
|
"content":"../components/particulars/content/index",
|
||||||
"orderchooseaddr":"../components/particulars/orderchooseaddr/index"
|
"orderchooseaddr":"../components/particulars/orderchooseaddr/index"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<view class="box">
|
<view class="box">
|
||||||
<orderchooseaddr name="{{list.consignee}}" addr="{{list.address}}" phone="{{list.mobile}}"></orderchooseaddr>
|
<orderchooseaddr name="{{list.consignee}}" addr="{{list.address}}" phone="{{list.mobile}}"></orderchooseaddr>
|
||||||
<content num="{{list.num}}" price="{{list.goods_price}}" cprice="{{list.integral_money}}" number="{{list.order_sn}}" time="{{list.add_time}}" goods="{{list.goods_list}}" text="{{list.user_note}}"></content>
|
<content ziti="{{list.is_ziti}}" num="{{list.num}}" price="{{list.goods_price}}" cprice="{{list.integral_money}}" number="{{list.order_sn}}" time="{{list.add_time}}" goods="{{list.goods_list}}" text="{{list.user_note}}"></content>
|
||||||
</view>
|
</view>
|
Loading…
Reference in New Issue
Block a user