|
|
@ -2,24 +2,12 @@ |
|
|
|
<view class="order-submission"> |
|
|
|
<view class="order-submission"> |
|
|
|
<view class="allAddress" :style="systemStore ? '' : 'padding-top: 0.2*100rpx'"> |
|
|
|
<view class="allAddress" :style="systemStore ? '' : 'padding-top: 0.2*100rpx'"> |
|
|
|
<view class="nav acea-row"> |
|
|
|
<view class="nav acea-row"> |
|
|
|
<view |
|
|
|
<view class="item font-color-red" :class="shipping_type === 0 ? 'on' : 'on2'" @click="addressType(0)" |
|
|
|
class="item font-color-red" |
|
|
|
v-if="systemStore"></view> |
|
|
|
:class="shipping_type === 0 ? 'on' : 'on2'" |
|
|
|
<view class="item font-color-red" :class="shipping_type === 1 ? 'on' : 'on2'" @click="addressType(1)" |
|
|
|
@click="addressType(0)" |
|
|
|
v-if="systemStore"></view> |
|
|
|
v-if="systemStore" |
|
|
|
</view> |
|
|
|
></view> |
|
|
|
<view class="address acea-row row-between-wrapper" v-if="shipping_type === 0" @click="addressTap"> |
|
|
|
<view |
|
|
|
|
|
|
|
class="item font-color-red" |
|
|
|
|
|
|
|
:class="shipping_type === 1 ? 'on' : 'on2'" |
|
|
|
|
|
|
|
@click="addressType(1)" |
|
|
|
|
|
|
|
v-if="systemStore" |
|
|
|
|
|
|
|
></view> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<view |
|
|
|
|
|
|
|
class="address acea-row row-between-wrapper" |
|
|
|
|
|
|
|
v-if="shipping_type === 0" |
|
|
|
|
|
|
|
@click="addressTap" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<view class="addressCon" v-if="addressInfo.realName"> |
|
|
|
<view class="addressCon" v-if="addressInfo.realName"> |
|
|
|
<view class="name"> |
|
|
|
<view class="name"> |
|
|
|
{{ addressInfo.realName }} |
|
|
|
{{ addressInfo.realName }} |
|
|
@ -35,11 +23,7 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="iconfont icon-jiantou"></view> |
|
|
|
<view class="iconfont icon-jiantou"></view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<div |
|
|
|
<div class="address acea-row row-between-wrapper" v-if="shipping_type === 1" @click="showStoreList"> |
|
|
|
class="address acea-row row-between-wrapper" |
|
|
|
|
|
|
|
v-if="shipping_type === 1" |
|
|
|
|
|
|
|
@click="showStoreList" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<div class="addressCon" v-if="storeItems"> |
|
|
|
<div class="addressCon" v-if="storeItems"> |
|
|
|
<div class="name"> |
|
|
|
<div class="name"> |
|
|
|
{{ storeItems.name }} |
|
|
|
{{ storeItems.name }} |
|
|
@ -69,10 +53,7 @@ |
|
|
|
<text class="iconfont icon-jiantou"></text> |
|
|
|
<text class="iconfont icon-jiantou"></text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view |
|
|
|
<view class="item acea-row row-between-wrapper" v-if="deduction === false && enableIntegral === true"> |
|
|
|
class="item acea-row row-between-wrapper" |
|
|
|
|
|
|
|
v-if="deduction === false && enableIntegral === true" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<view>积分抵扣</view> |
|
|
|
<view>积分抵扣</view> |
|
|
|
<view class="discount"> |
|
|
|
<view class="discount"> |
|
|
|
<view class="select-btn"> |
|
|
|
<view class="select-btn"> |
|
|
@ -124,33 +105,21 @@ |
|
|
|
<view class="item"> |
|
|
|
<view class="item"> |
|
|
|
<view>支付方式</view> |
|
|
|
<view>支付方式</view> |
|
|
|
<view class="list"> |
|
|
|
<view class="list"> |
|
|
|
<view |
|
|
|
<view class="payItem acea-row row-middle" :class="active === 'weixin' ? 'on' : ''" @click="payItem('weixin')" |
|
|
|
class="payItem acea-row row-middle" |
|
|
|
v-show="isWeixin"> |
|
|
|
:class="active === 'weixin' ? 'on' : ''" |
|
|
|
|
|
|
|
@click="payItem('weixin')" |
|
|
|
|
|
|
|
v-show="isWeixin" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<view class="name acea-row row-center-wrapper"> |
|
|
|
<view class="name acea-row row-center-wrapper"> |
|
|
|
<view class="iconfont icon-weixin2" :class="active === 'weixin' ? 'bounceIn' : ''"></view>微信支付 |
|
|
|
<view class="iconfont icon-weixin2" :class="active === 'weixin' ? 'bounceIn' : ''"></view>微信支付 |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="tip">微信快捷支付</view> |
|
|
|
<view class="tip">微信快捷支付</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view |
|
|
|
<view class="payItem acea-row row-middle" :class="active === 'weixin' ? 'on' : ''" @click="payItem('weixin')" |
|
|
|
class="payItem acea-row row-middle" |
|
|
|
v-show="!isWeixin"> |
|
|
|
:class="active === 'weixin' ? 'on' : ''" |
|
|
|
|
|
|
|
@click="payItem('weixin')" |
|
|
|
|
|
|
|
v-show="!isWeixin" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<view class="name acea-row row-center-wrapper"> |
|
|
|
<view class="name acea-row row-center-wrapper"> |
|
|
|
<view class="iconfont icon-weixin2" :class="active === 'weixin' ? 'bounceIn' : ''"></view>微信支付 |
|
|
|
<view class="iconfont icon-weixin2" :class="active === 'weixin' ? 'bounceIn' : ''"></view>微信支付 |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="tip">微信快捷支付</view> |
|
|
|
<view class="tip">微信快捷支付</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view |
|
|
|
<view class="payItem acea-row row-middle" :class="active === 'yue' ? 'on' : ''" @click="payItem('yue')"> |
|
|
|
class="payItem acea-row row-middle" |
|
|
|
|
|
|
|
:class="active === 'yue' ? 'on' : ''" |
|
|
|
|
|
|
|
@click="payItem('yue')" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<view class="name acea-row row-center-wrapper"> |
|
|
|
<view class="name acea-row row-center-wrapper"> |
|
|
|
<view class="iconfont icon-icon-test" :class="active === 'yue' ? 'bounceIn' : ''"></view>余额支付 |
|
|
|
<view class="iconfont icon-icon-test" :class="active === 'yue' ? 'bounceIn' : ''"></view>余额支付 |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -185,63 +154,50 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="settlement" @click="createOrder">立即结算</view> |
|
|
|
<view class="settlement" @click="createOrder">立即结算</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<CouponListWindow |
|
|
|
<CouponListWindow v-on:couponchange="changecoupon($event)" v-model="showCoupon" :price="orderPrice.totalPrice" |
|
|
|
v-on:couponchange="changecoupon($event)" |
|
|
|
:checked="usableCoupon.id" @checked="changeCoupon" :cartid="cartid"></CouponListWindow> |
|
|
|
v-model="showCoupon" |
|
|
|
<AddressWindow @checked="changeAddress" @redirect="addressRedirect" v-model="showAddress" :checked="addressInfo.id" |
|
|
|
:price="orderPrice.totalPrice" |
|
|
|
ref="mychild"></AddressWindow> |
|
|
|
:checked="usableCoupon.id" |
|
|
|
|
|
|
|
@checked="changeCoupon" |
|
|
|
|
|
|
|
:cartid="cartid" |
|
|
|
|
|
|
|
></CouponListWindow> |
|
|
|
|
|
|
|
<AddressWindow |
|
|
|
|
|
|
|
@checked="changeAddress" |
|
|
|
|
|
|
|
@redirect="addressRedirect" |
|
|
|
|
|
|
|
v-model="showAddress" |
|
|
|
|
|
|
|
:checked="addressInfo.id" |
|
|
|
|
|
|
|
ref="mychild" |
|
|
|
|
|
|
|
></AddressWindow> |
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<style scoped lang="less"> |
|
|
|
<style scoped lang="less"> |
|
|
|
.order-submission .wrapper .shipping select { |
|
|
|
.order-submission .wrapper .shipping select { |
|
|
|
color: #999; |
|
|
|
color: #999; |
|
|
|
padding-right: 0.15 * 100rpx; |
|
|
|
padding-right: 0.15 * 100rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.order-submission .wrapper .shipping .iconfont { |
|
|
|
.order-submission .wrapper .shipping .iconfont { |
|
|
|
font-size: 0.3 * 100rpx; |
|
|
|
font-size: 0.3 * 100rpx; |
|
|
|
color: #515151; |
|
|
|
color: #515151; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.order-submission .allAddress { |
|
|
|
.order-submission .allAddress { |
|
|
|
width: 100%; |
|
|
|
width: 100%; |
|
|
|
background-image: linear-gradient(to bottom, #eb3729 0%, #eb3729 100%); |
|
|
|
background-image: linear-gradient(to bottom, #eb3729 0%, #eb3729 100%); |
|
|
|
background-image: -webkit-linear-gradient( |
|
|
|
background-image: -webkit-linear-gradient(to bottom, |
|
|
|
to bottom, |
|
|
|
|
|
|
|
#eb3729 0%, |
|
|
|
#eb3729 0%, |
|
|
|
#eb3729 100% |
|
|
|
#eb3729 100%); |
|
|
|
); |
|
|
|
|
|
|
|
background-image: -moz-linear-gradient(to bottom, #eb3729 0%, #eb3729 100%); |
|
|
|
background-image: -moz-linear-gradient(to bottom, #eb3729 0%, #eb3729 100%); |
|
|
|
padding-top: 1 * 100rpx; |
|
|
|
padding-top: 1 * 100rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.order-submission .allAddress .nav { |
|
|
|
.order-submission .allAddress .nav { |
|
|
|
margin: 0 auto; |
|
|
|
margin: 0 auto; |
|
|
|
padding: 0 30rpx; |
|
|
|
padding: 0 30rpx; |
|
|
|
width: 100%; |
|
|
|
width: 100%; |
|
|
|
box-sizing: border-box; |
|
|
|
box-sizing: border-box; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.order-submission .allAddress .nav .item { |
|
|
|
.order-submission .allAddress .nav .item { |
|
|
|
flex: 1; |
|
|
|
flex: 1; |
|
|
|
position: relative; |
|
|
|
position: relative; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.order-submission .allAddress .nav .item.on { |
|
|
|
.order-submission .allAddress .nav .item.on { |
|
|
|
position: relative; |
|
|
|
position: relative; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.order-submission .allAddress .nav .item.on:before { |
|
|
|
.order-submission .allAddress .nav .item.on:before { |
|
|
|
position: absolute; |
|
|
|
position: absolute; |
|
|
|
bottom: 0; |
|
|
|
bottom: 0; |
|
|
|
content: "快递配送"; |
|
|
|
content: "快递配送"; |
|
|
@ -256,18 +212,18 @@ |
|
|
|
z-index: 9; |
|
|
|
z-index: 9; |
|
|
|
text-align: center; |
|
|
|
text-align: center; |
|
|
|
line-height: 0.14 * 100rpx; |
|
|
|
line-height: 0.14 * 100rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.order-submission .allAddress .nav .item:nth-of-type(2).on:before { |
|
|
|
.order-submission .allAddress .nav .item:nth-of-type(2).on:before { |
|
|
|
content: "到店自提"; |
|
|
|
content: "到店自提"; |
|
|
|
border-width: 0.4 * 100rpx; |
|
|
|
border-width: 0.4 * 100rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.order-submission .allAddress .nav .item.on2 { |
|
|
|
.order-submission .allAddress .nav .item.on2 { |
|
|
|
position: relative; |
|
|
|
position: relative; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.order-submission .allAddress .nav .item.on2:before { |
|
|
|
.order-submission .allAddress .nav .item.on2:before { |
|
|
|
position: absolute; |
|
|
|
position: absolute; |
|
|
|
bottom: 0; |
|
|
|
bottom: 0; |
|
|
|
content: "到店自提"; |
|
|
|
content: "到店自提"; |
|
|
@ -281,42 +237,56 @@ |
|
|
|
border-color: #d5e6e6; |
|
|
|
border-color: #d5e6e6; |
|
|
|
text-align: center; |
|
|
|
text-align: center; |
|
|
|
line-height: 0.14 * 100rpx; |
|
|
|
line-height: 0.14 * 100rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.order-submission .allAddress .nav .item:nth-of-type(1).on2:before { |
|
|
|
.order-submission .allAddress .nav .item:nth-of-type(1).on2:before { |
|
|
|
content: "快递配送"; |
|
|
|
content: "快递配送"; |
|
|
|
border-width: 0.4 * 100rpx; |
|
|
|
border-width: 0.4 * 100rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.order-submission .allAddress .address { |
|
|
|
.order-submission .allAddress .address { |
|
|
|
width: 6.91 * 100rpx; |
|
|
|
width: 6.91 * 100rpx; |
|
|
|
height: 1.5 * 100rpx; |
|
|
|
height: 1.5 * 100rpx; |
|
|
|
margin: 0 auto; |
|
|
|
margin: 0 auto; |
|
|
|
box-sizing: border-box; |
|
|
|
box-sizing: border-box; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.order-submission .allAddress .line { |
|
|
|
.order-submission .allAddress .line { |
|
|
|
width: 7.1 * 100rpx; |
|
|
|
width: 7.1 * 100rpx; |
|
|
|
margin: 0 auto; |
|
|
|
margin: 0 auto; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.order-submission .wrapper .item .discount input::placeholder { |
|
|
|
.order-submission .wrapper .item .discount input::placeholder { |
|
|
|
color: #ccc; |
|
|
|
color: #ccc; |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |
|
|
|
</style> |
|
|
|
<script> |
|
|
|
<script> |
|
|
|
import OrderGoods from "@/components/OrderGoods"; |
|
|
|
import OrderGoods from "@/components/OrderGoods"; |
|
|
|
import CouponListWindow from "@/components/CouponListWindow"; |
|
|
|
import CouponListWindow from "@/components/CouponListWindow"; |
|
|
|
import AddressWindow from "@/components/AddressWindow"; |
|
|
|
import AddressWindow from "@/components/AddressWindow"; |
|
|
|
import { postOrderConfirm, postOrderComputed, createOrder } from "@/api/order"; |
|
|
|
import { |
|
|
|
import { mapGetters } from "vuex"; |
|
|
|
postOrderConfirm, |
|
|
|
import { handleOrderPayResults } from "@/libs/order"; |
|
|
|
postOrderComputed, |
|
|
|
import { weappPay } from "@/libs/wechat"; |
|
|
|
createOrder |
|
|
|
import { isWeixin, handleErrorMessage } from "@/utils"; |
|
|
|
} from "@/api/order"; |
|
|
|
|
|
|
|
import { |
|
|
|
|
|
|
|
mapGetters |
|
|
|
|
|
|
|
} from "vuex"; |
|
|
|
|
|
|
|
import { |
|
|
|
|
|
|
|
handleOrderPayResults, |
|
|
|
|
|
|
|
subscribeMessage |
|
|
|
|
|
|
|
} from "@/libs/order"; |
|
|
|
|
|
|
|
import { |
|
|
|
|
|
|
|
weappPay |
|
|
|
|
|
|
|
} from "@/libs/wechat"; |
|
|
|
|
|
|
|
import { |
|
|
|
|
|
|
|
isWeixin, |
|
|
|
|
|
|
|
handleErrorMessage |
|
|
|
|
|
|
|
} from "@/utils"; |
|
|
|
|
|
|
|
|
|
|
|
const NAME = "OrderSubmission", |
|
|
|
const NAME = "OrderSubmission", |
|
|
|
_isWeixin = isWeixin(); |
|
|
|
_isWeixin = isWeixin(); |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
name: NAME, |
|
|
|
name: NAME, |
|
|
|
components: { |
|
|
|
components: { |
|
|
|
OrderGoods, |
|
|
|
OrderGoods, |
|
|
@ -546,6 +516,9 @@ export default { |
|
|
|
if (this.$deviceType == "app") { |
|
|
|
if (this.$deviceType == "app") { |
|
|
|
from.from = "app"; |
|
|
|
from.from = "app"; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// #ifdef MP-WEIXIN |
|
|
|
|
|
|
|
subscribeMessage() |
|
|
|
|
|
|
|
// #endif |
|
|
|
createOrder(this.orderGroupInfo.orderKey, { |
|
|
|
createOrder(this.orderGroupInfo.orderKey, { |
|
|
|
realName: this.contacts, |
|
|
|
realName: this.contacts, |
|
|
|
phone: this.contactsTel, |
|
|
|
phone: this.contactsTel, |
|
|
@ -565,12 +538,12 @@ export default { |
|
|
|
}) |
|
|
|
}) |
|
|
|
.then((res) => { |
|
|
|
.then((res) => { |
|
|
|
uni.hideLoading(); |
|
|
|
uni.hideLoading(); |
|
|
|
handleOrderPayResults.call(this, res.data, "create"); |
|
|
|
handleOrderPayResults.call(this, res.data, "create", this.active); |
|
|
|
}) |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
.catch((err) => { |
|
|
|
handleErrorMessage(err, "创建订单失败"); |
|
|
|
handleErrorMessage(err, "创建订单失败"); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}; |
|
|
|
}; |
|
|
|
</script> |
|
|
|
</script> |
|
|
|