|
|
@ -7,6 +7,16 @@
|
|
|
|
<text class="text2">{{modes || "请选择配送方式"}}</text>
|
|
|
|
<text class="text2">{{modes || "请选择配送方式"}}</text>
|
|
|
|
<image src="/static/images/home/right.png"></image>
|
|
|
|
<image src="/static/images/home/right.png"></image>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<view class="order_address" style="height: auto;margin-bottom: 8px;">
|
|
|
|
|
|
|
|
<view class="row">
|
|
|
|
|
|
|
|
<view class="nominal">联系人</view>
|
|
|
|
|
|
|
|
<view class="input"><input class="input-text" v-model="userInfo.realname" placeholder="请输入联系人姓名" type="text"></input></view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<view class="row">
|
|
|
|
|
|
|
|
<view class="nominal">电话号码</view>
|
|
|
|
|
|
|
|
<view class="input"><input class="input-text" v-model="userInfo.phone" placeholder="请输入联系人电话号码" type="number" maxlength="11"></input></view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
<!-- 收货地址 -->
|
|
|
|
<!-- 收货地址 -->
|
|
|
|
<view class="order_address" v-if="tapIndex == 0">
|
|
|
|
<view class="order_address" v-if="tapIndex == 0">
|
|
|
|
<image src="/static/images/home/bottom.png"></image>
|
|
|
|
<image src="/static/images/home/bottom.png"></image>
|
|
|
@ -152,7 +162,11 @@ export default {
|
|
|
|
condition: ['新人专享']
|
|
|
|
condition: ['新人专享']
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
],
|
|
|
|
themeObj: app.globalData.themeObj
|
|
|
|
themeObj: app.globalData.themeObj,
|
|
|
|
|
|
|
|
userInfo: {
|
|
|
|
|
|
|
|
realname: getUserInfo().realname,
|
|
|
|
|
|
|
|
phone: getUserInfo().phone
|
|
|
|
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
@ -239,16 +253,21 @@ export default {
|
|
|
|
this.$toast('请先选择地址')
|
|
|
|
this.$toast('请先选择地址')
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
const that = this
|
|
|
|
|
|
|
|
uni.showModal({
|
|
|
|
|
|
|
|
content: '确定联系人及联系电话无误?',
|
|
|
|
|
|
|
|
success: res => {
|
|
|
|
|
|
|
|
if (res.confirm) {
|
|
|
|
const cartList = getCart()
|
|
|
|
const cartList = getCart()
|
|
|
|
const goodsIds = this.goodsList.map(v => v.id)
|
|
|
|
const goodsIds = that.goodsList.map(v => v.id)
|
|
|
|
const newCartList = cartList.filter(v => !goodsIds.includes(v.id))
|
|
|
|
const newCartList = cartList.filter(v => !goodsIds.includes(v.id))
|
|
|
|
const userInfo = getUserInfo()
|
|
|
|
const userInfo = getUserInfo()
|
|
|
|
const params = {
|
|
|
|
const params = {
|
|
|
|
storeId: this.address.id,
|
|
|
|
storeId: that.address.id,
|
|
|
|
"recipient": userInfo.realname,
|
|
|
|
"recipient": that.userInfo.realname,
|
|
|
|
"addr": this.address.addr,
|
|
|
|
"addr": that.address.addr,
|
|
|
|
"mobile": userInfo.phone,
|
|
|
|
"mobile": that.userInfo.phone,
|
|
|
|
"orderDetailList": this.goodsList.map(v => {
|
|
|
|
"orderDetailList": that.goodsList.map(v => {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
goodsId: v.id,
|
|
|
|
goodsId: v.id,
|
|
|
|
goodsName: v.goodsName,
|
|
|
|
goodsName: v.goodsName,
|
|
|
@ -257,20 +276,20 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}),
|
|
|
|
}),
|
|
|
|
state: 6,
|
|
|
|
state: 6,
|
|
|
|
"remark": this.remark,
|
|
|
|
"remark": that.remark,
|
|
|
|
"totalAmount": this.sumprice,
|
|
|
|
"totalAmount": that.sumprice,
|
|
|
|
"userId": userInfo.id
|
|
|
|
"userId": userInfo.id
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (this.isConfirm) return
|
|
|
|
if (that.isConfirm) return
|
|
|
|
this.isConfirm = true
|
|
|
|
that.isConfirm = true
|
|
|
|
uni.showLoading({
|
|
|
|
uni.showLoading({
|
|
|
|
mask: true
|
|
|
|
mask: true
|
|
|
|
})
|
|
|
|
})
|
|
|
|
addOrder(params).then(res => {
|
|
|
|
addOrder(params).then(res => {
|
|
|
|
uni.hideLoading()
|
|
|
|
uni.hideLoading()
|
|
|
|
this.isConfirm = false
|
|
|
|
that.isConfirm = false
|
|
|
|
if (res.result) {
|
|
|
|
if (res.result) {
|
|
|
|
this.$toast('添加成功')
|
|
|
|
that.$toast('添加成功')
|
|
|
|
resetCart(newCartList)
|
|
|
|
resetCart(newCartList)
|
|
|
|
setTabBarBadge(newCartList.length)
|
|
|
|
setTabBarBadge(newCartList.length)
|
|
|
|
//提交订单
|
|
|
|
//提交订单
|
|
|
@ -280,6 +299,11 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else if (res.cancel) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
selectMode() {
|
|
|
|
selectMode() {
|
|
|
@ -368,6 +392,26 @@ page {
|
|
|
|
overflow: hidden;
|
|
|
|
overflow: hidden;
|
|
|
|
position: relative;
|
|
|
|
position: relative;
|
|
|
|
box-shadow: 0upx 0upx 10upx #ddd;
|
|
|
|
box-shadow: 0upx 0upx 10upx #ddd;
|
|
|
|
|
|
|
|
.row {
|
|
|
|
|
|
|
|
color: #999;
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
line-height: 60upx;
|
|
|
|
|
|
|
|
height: 60upx;
|
|
|
|
|
|
|
|
padding: 0 20upx;
|
|
|
|
|
|
|
|
font-size: 24upx;
|
|
|
|
|
|
|
|
.nominal {
|
|
|
|
|
|
|
|
width: 22%;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.input {
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
margin-left: 20px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.input-text {
|
|
|
|
|
|
|
|
color: #000;
|
|
|
|
|
|
|
|
font-size: 24upx;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order_address image {
|
|
|
|
.order_address image {
|
|
|
|