trade:新增是否自提的配置项

pull/3/head^2
YunaiV 2023-10-02 21:19:19 +08:00
parent d3c114325b
commit 7be4e398f3
3 changed files with 7 additions and 5 deletions

View File

@ -1,6 +1,6 @@
import request from "@/utils/request.js";
// 获得配送配置
// 获得交易配置
export function getTradeConfig() {
return request.get("app-api/trade/config/get");
}

View File

@ -25,7 +25,7 @@
<!-- #endif -->
</div>
<div class="store-distance" @click.stop="showMaoLocation(item)">
<span class="addressTxt" v-if="item.distance">{{ item.distance / 1000.0 }}</span>
<span class="addressTxt" v-if="item.distance">{{ item.distance.toFixed(2) }}</span>
<span class="addressTxt" v-else></span>
<span class="iconfont icon-youjian" />
</div>
@ -136,7 +136,7 @@
latitude: Number(e.latitude),
longitude: Number(e.longitude),
name: e.name,
address: `${e.address}-${e.detailedAddress}`,
address: `${e.areaName}-${e.detailAddress}`,
success: function() {
console.log('success');
}

View File

@ -159,6 +159,7 @@
<script>
import * as CouponApi from '@/api/promotion/coupon.js';
import * as OrderApi from '@/api/trade/order.js';
import * as ConfigApi from '@/api/trade/config.js';
import { openPaySubscribe } from '@/utils/SubscribeMessage.js';
import * as DeliveryApi from '@/api/trade/delivery.js';
import couponListWindow from '@/components/couponListWindow';
@ -168,6 +169,7 @@
import { toLogin } from '@/libs/login.js';
import { mapGetters } from "vuex";
import * as Util from '@/utils/util.js';
import {getTradeConfig} from "../../../api/trade/config";
export default {
components: {
couponListWindow,
@ -253,8 +255,8 @@
// address
this.addressId = options.addressId || 0;
//
DeliveryApi.getDeliveryConfig().then(res => {
this.store_self_mention = res.data.pickUpEnable && this.productType === 'normal';
ConfigApi.getTradeConfig().then(res => {
this.store_self_mention = res.data.deliveryPickUpEnabled && this.productType === 'normal';
})
},
/**