【代码优化】商城:拼团装修重构
parent
fdca229a77
commit
735dc8c373
|
@ -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
|
||||||
|
|
|
@ -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">
|
||||||
|
|
|
@ -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,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue