【类 型】:factor

【原  因】:
【过  程】:从商铺信息里面 取默认运费 打包费字段  作为订单的运费 和 打包费
【影  响】:

# 类型 包含:
# feat:新功能(feature)
# fix:修补bug
# docs:文档(documentation)
# style: 格式(不影响代码运行的变动)
# refactor:重构(即不是新增功能,也不是修改bug的代码变动)
# test:增加测试
# chore:构建过程或辅助工具的变动
This commit is contained in:
sszdot 2024-12-12 16:59:03 +08:00
parent 1f0eb22adc
commit 134e9cbe6e
2 changed files with 29 additions and 6 deletions

View File

@ -25,7 +25,7 @@
</view>
<view class="flex m-t-12 p-l-24 p-r-24 fz28 msb">
<view>送达时间</view>
<view>预估30分钟之后送达</view>
<view>预估{{estimated}}分钟之后送达</view>
</view>
</view>
<!-- 订单详情 -->
@ -56,15 +56,15 @@
</view>
<view class="flex msb fz28 m-b-12">
<view>外送费</view>
<view>¥5.00</view>
<view>¥{{transportPrice | formatPrice}}</view>
</view>
<view class="flex msb fz28 m-b-24 p-b-24 borderBDas">
<view>打包服务费</view>
<view>¥2.00</view>
<view>¥{{packPrice | formatPrice}}</view>
</view>
<view class="flex mr mac">
<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>
<!-- 客户备注 -->
@ -81,7 +81,7 @@
合计
</view>
<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>
<view class="fz32 flex column mac mc fci rad8 m-r-24" style="width:220rpx;height:100rpx;"
@ -117,6 +117,10 @@
shopCon() {
return this.$store.state.shopCon
},
//
estimated() {
return 30
},
//
cartList() {
return this.$store.state.cartList
@ -125,6 +129,14 @@
total() {
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
totalCount() {
let total = 0
@ -135,6 +147,10 @@
}
return total
},
//
fullPrice() {
return this.total + this.transportPrice + this.packPrice
},
//
userInfo() {
return this.$store.state.userInfo
@ -153,7 +169,9 @@
uni.$u.http.post('/Api/Check/checkout', {
cartList: JSON.stringify(this.cartList), //
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
remark: this.remark //
}, {

View File

@ -6,6 +6,8 @@
<u-icon name="arrow-left" color="#fff" size="19"></u-icon>
</view>
</u-navbar>
<!-- 价格 -->
<view></view>
<button @click="pay" type="primary" style="margin-top:200rpx;">确认支付</button>
</view>
</template>
@ -19,6 +21,9 @@
},
onLoad(options) {
this.order_sn = options.order_sn; //
},
computed(){
},
methods: {
//