【类 型】:factor
【原 因】: 【过 程】:从商铺信息里面 取默认运费 打包费字段 作为订单的运费 和 打包费 【影 响】: # 类型 包含: # feat:新功能(feature) # fix:修补bug # docs:文档(documentation) # style: 格式(不影响代码运行的变动) # refactor:重构(即不是新增功能,也不是修改bug的代码变动) # test:增加测试 # chore:构建过程或辅助工具的变动
This commit is contained in:
parent
1f0eb22adc
commit
134e9cbe6e
@ -25,7 +25,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="flex m-t-12 p-l-24 p-r-24 fz28 msb">
|
<view class="flex m-t-12 p-l-24 p-r-24 fz28 msb">
|
||||||
<view>送达时间</view>
|
<view>送达时间</view>
|
||||||
<view>预估30分钟之后送达</view>
|
<view>预估{{estimated}}分钟之后送达</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 订单详情 -->
|
<!-- 订单详情 -->
|
||||||
@ -56,15 +56,15 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="flex msb fz28 m-b-12">
|
<view class="flex msb fz28 m-b-12">
|
||||||
<view>外送费</view>
|
<view>外送费</view>
|
||||||
<view>¥5.00</view>
|
<view>¥{{transportPrice | formatPrice}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex msb fz28 m-b-24 p-b-24 borderBDas">
|
<view class="flex msb fz28 m-b-24 p-b-24 borderBDas">
|
||||||
<view>打包服务费</view>
|
<view>打包服务费</view>
|
||||||
<view>¥2.00</view>
|
<view>¥{{packPrice | formatPrice}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex mr mac">
|
<view class="flex mr mac">
|
||||||
<view class="fcb fz24">合计</view>
|
<view class="fcb fz24">合计</view>
|
||||||
<view class="m-l-12 fz36 fb">¥{{total | formatPrice}}</view>
|
<view class="m-l-12 fz36 fb">¥{{fullPrice | formatPrice}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 客户备注 -->
|
<!-- 客户备注 -->
|
||||||
@ -81,7 +81,7 @@
|
|||||||
合计
|
合计
|
||||||
</view>
|
</view>
|
||||||
<view class="flex column m-r-12">
|
<view class="flex column m-r-12">
|
||||||
<view class="fb fz36">¥{{total | formatPrice}}</view>
|
<view class="fb fz36">¥{{fullPrice | formatPrice}}</view>
|
||||||
<view class="fz24">共{{totalCount}}件</view>
|
<view class="fz24">共{{totalCount}}件</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="fz32 flex column mac mc fci rad8 m-r-24" style="width:220rpx;height:100rpx;"
|
<view class="fz32 flex column mac mc fci rad8 m-r-24" style="width:220rpx;height:100rpx;"
|
||||||
@ -117,6 +117,10 @@
|
|||||||
shopCon() {
|
shopCon() {
|
||||||
return this.$store.state.shopCon
|
return this.$store.state.shopCon
|
||||||
},
|
},
|
||||||
|
//预估送达时间
|
||||||
|
estimated() {
|
||||||
|
return 30
|
||||||
|
},
|
||||||
//购物车列表
|
//购物车列表
|
||||||
cartList() {
|
cartList() {
|
||||||
return this.$store.state.cartList
|
return this.$store.state.cartList
|
||||||
@ -125,6 +129,14 @@
|
|||||||
total() {
|
total() {
|
||||||
return this.totalPrice(this.$store.state.cartList)
|
return this.totalPrice(this.$store.state.cartList)
|
||||||
},
|
},
|
||||||
|
//外送费
|
||||||
|
transportPrice() {
|
||||||
|
return Number(this.$store.state.shopCon.default_transport_price)
|
||||||
|
},
|
||||||
|
//打包服务费
|
||||||
|
packPrice() {
|
||||||
|
return Number(this.$store.state.shopCon.default_pack_price)
|
||||||
|
},
|
||||||
//购物车货品总数 ps:sku的总数 即单品总数
|
//购物车货品总数 ps:sku的总数 即单品总数
|
||||||
totalCount() {
|
totalCount() {
|
||||||
let total = 0
|
let total = 0
|
||||||
@ -135,6 +147,10 @@
|
|||||||
}
|
}
|
||||||
return total
|
return total
|
||||||
},
|
},
|
||||||
|
//所有总价包括 商品总价 打包费 等总和
|
||||||
|
fullPrice() {
|
||||||
|
return this.total + this.transportPrice + this.packPrice
|
||||||
|
},
|
||||||
//用户信息
|
//用户信息
|
||||||
userInfo() {
|
userInfo() {
|
||||||
return this.$store.state.userInfo
|
return this.$store.state.userInfo
|
||||||
@ -153,7 +169,9 @@
|
|||||||
uni.$u.http.post('/Api/Check/checkout', {
|
uni.$u.http.post('/Api/Check/checkout', {
|
||||||
cartList: JSON.stringify(this.cartList), //购物车列表
|
cartList: JSON.stringify(this.cartList), //购物车列表
|
||||||
shop_id: this.$store.state.shop_id, //商铺id
|
shop_id: this.$store.state.shop_id, //商铺id
|
||||||
total: this.total, //总价格
|
total: this.total, //商品总价格
|
||||||
|
transport_price: this.transportPrice, //运费
|
||||||
|
pack_price: this.packPrice, //打包费
|
||||||
site_id: this.$store.state.site_id, //站点id
|
site_id: this.$store.state.site_id, //站点id
|
||||||
remark: this.remark //客户订单备注
|
remark: this.remark //客户订单备注
|
||||||
}, {
|
}, {
|
||||||
|
@ -6,6 +6,8 @@
|
|||||||
<u-icon name="arrow-left" color="#fff" size="19"></u-icon>
|
<u-icon name="arrow-left" color="#fff" size="19"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
</u-navbar>
|
</u-navbar>
|
||||||
|
<!-- 价格 -->
|
||||||
|
<view></view>
|
||||||
<button @click="pay" type="primary" style="margin-top:200rpx;">确认支付</button>
|
<button @click="pay" type="primary" style="margin-top:200rpx;">确认支付</button>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@ -19,6 +21,9 @@
|
|||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
this.order_sn = options.order_sn; // 从提交订单页面传递过来的订单号
|
this.order_sn = options.order_sn; // 从提交订单页面传递过来的订单号
|
||||||
|
},
|
||||||
|
computed(){
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 支付方法
|
// 支付方法
|
||||||
|
Loading…
Reference in New Issue
Block a user