【代码优化】商城:拼团装修重构

pull/95/MERGE
YunaiV 2024-09-06 21:02:59 +08:00
parent fdca229a77
commit 735dc8c373
4 changed files with 10 additions and 12 deletions

View File

@ -105,7 +105,6 @@
<detail-content-card class="detail-content-selector" :content="state.goodsInfo.description" /> <detail-content-card class="detail-content-selector" :content="state.goodsInfo.description" />
<!-- 商品tabbar --> <!-- 商品tabbar -->
<!-- TODO: 已售罄预热 判断 设计-->
<detail-tabbar v-model="state.goodsInfo"> <detail-tabbar v-model="state.goodsInfo">
<view class="buy-box ss-flex ss-col-center ss-p-r-20"> <view class="buy-box ss-flex ss-col-center ss-p-r-20">
<button <button

View File

@ -38,9 +38,9 @@
<!-- #endif --> <!-- #endif -->
</view> </view>
<view class="store-distance ss-flex ss-row-center" @tap.stop="showMaoLocation(item)"> <view class="store-distance ss-flex ss-row-center" @tap.stop="showMaoLocation(item)">
<text class="addressTxt" v-if="item.distance" <text class="addressTxt" v-if="item.distance">
>距离{{ item.distance.toFixed(2) }}千米</text 距离{{ item.distance.toFixed(2) }}千米
> </text>
<text class="addressTxt" v-else></text> <text class="addressTxt" v-else></text>
<view class="iconfont"> <view class="iconfont">
<view class="ss-rest-button"> <view class="ss-rest-button">

View File

@ -2,7 +2,6 @@ import request from '@/sheep/request';
// 拼团 API // 拼团 API
const CombinationApi = { const CombinationApi = {
// 获得拼团活动分页 // 获得拼团活动分页
getCombinationActivityPage: (params) => { getCombinationActivityPage: (params) => {
return request({ return request({
@ -23,13 +22,13 @@ const CombinationApi = {
}); });
}, },
// 获得拼团活动明细列表 // 获得拼团活动列表,基于活动编号数组
getCombinationActivityDetailList: (ids) => { getCombinationActivityListByIds: (ids) => {
return request({ return request({
url: '/promotion/combination-activity/list-by-ids', url: '/promotion/combination-activity/list-by-ids',
method: 'GET', method: 'GET',
params: { params: {
ids ids,
}, },
}); });
}, },
@ -50,9 +49,9 @@ const CombinationApi = {
// 获得我的拼团记录分页 // 获得我的拼团记录分页
getCombinationRecordPage: (params) => { getCombinationRecordPage: (params) => {
return request({ return request({
url: "/promotion/combination-record/page", url: '/promotion/combination-record/page',
method: 'GET', method: 'GET',
params params,
}); });
}, },

View File

@ -1,4 +1,4 @@
<!-- 装修商品组件商品卡片 --> <!-- 装修商品组件拼团商品卡片 -->
<template> <template>
<!-- 商品卡片 --> <!-- 商品卡片 -->
<view> <view>
@ -232,7 +232,7 @@
* @return {Promise<undefined>} 商品列表 * @return {Promise<undefined>} 商品列表
*/ */
async function getCombinationActivityDetailList(ids) { async function getCombinationActivityDetailList(ids) {
const { data } = await CombinationApi.getCombinationActivityDetailList(ids); const { data } = await CombinationApi.getCombinationActivityListByIds(ids);
return data; return data;
} }