|
|
@@ -83,8 +83,8 @@
|
|
|
<div>
|
|
|
<span>超过</span>
|
|
|
<span class="app-price">{{ `${orderShop.freight.first}公里` }}</span>
|
|
|
- <span>每增加1公里</span>
|
|
|
- <span class="app-price">{{ `+${orderShop.freight.add}元` }}</span>
|
|
|
+ <span>每增加1公里运费加</span>
|
|
|
+ <span class="app-price">{{ `${orderShop.freight.add}元` }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</alert-module>
|
|
|
@@ -105,6 +105,7 @@ import { calcDistance } from "@/utils/common";
|
|
|
import { getShopUser } from "@/utils/auth";
|
|
|
import { getOrderShop } from "@/utils/config";
|
|
|
import { createOrder } from "@/api/order";
|
|
|
+import { getUserDistance } from "@/api/express";
|
|
|
export default {
|
|
|
name: "order-buy",
|
|
|
components: {
|
|
|
@@ -151,8 +152,7 @@ export default {
|
|
|
goodsNum: 1
|
|
|
};
|
|
|
},
|
|
|
- mounted() {
|
|
|
- },
|
|
|
+ mounted() {},
|
|
|
computed: {
|
|
|
...mapGetters({ orderShop: "getOrderShop" }),
|
|
|
...mapGetters({ shopUser: "getShopUser" }),
|
|
|
@@ -242,12 +242,9 @@ export default {
|
|
|
},
|
|
|
// 选择地址
|
|
|
changeAddress(e) {
|
|
|
- // 计算距离价格
|
|
|
- this.freightPrice = calcDistance(
|
|
|
- this.orderShop.shop,
|
|
|
- this.$refs.appDelivery.region,
|
|
|
- this.orderShop.freight
|
|
|
- );
|
|
|
+ // 计算客户距离和运费
|
|
|
+ //this.$refs.appDelivery.region.location
|
|
|
+ getUserDistance({lat:1,lng:20}).then(res => {});
|
|
|
},
|
|
|
// 表单验证
|
|
|
formSubmit(e) {
|
|
|
@@ -360,4 +357,4 @@ export default {
|
|
|
margin: 10px 0;
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|