mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 17:53:25 +08:00
uniapp【修复】:修复同步导行栏高度
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<uv-navbar :bgColor="props.bgColor" placeholder :height="menuButtonHeight+'px'">
|
<uv-navbar :bgColor="props.bgColor" :height="menuButtonHeight+'px'" :placeholder="props.placeholder">
|
||||||
<template #left>
|
<template #left>
|
||||||
<view class="page-back">
|
<view class="page-back">
|
||||||
<image v-if="props.isBack" @click="hanlderBack" class="back"
|
<image v-if="props.isBack" @click="hanlderBack" class="back"
|
||||||
@@ -26,13 +26,15 @@
|
|||||||
mode : string,
|
mode : string,
|
||||||
title : string,
|
title : string,
|
||||||
handleCustomRouteJump : () => void | null,
|
handleCustomRouteJump : () => void | null,
|
||||||
|
placeholder:boolean;
|
||||||
}>(), {
|
}>(), {
|
||||||
isBack: true,
|
isBack: true,
|
||||||
bgColor: '#EEF3F7',
|
bgColor: '#eef2f6',
|
||||||
titleColor: '#000',
|
titleColor: '#000',
|
||||||
mode: 'center',
|
mode: 'center',
|
||||||
title: '',
|
title: '',
|
||||||
handleCustomRouteJump: null,
|
handleCustomRouteJump: null,
|
||||||
|
placeholder:true,
|
||||||
});
|
});
|
||||||
|
|
||||||
const hanlderBack = () => {
|
const hanlderBack = () => {
|
||||||
|
|||||||
@@ -1,23 +1,21 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="layout-page-box page-bg" :style="props.customStyle">
|
<view class="layout-page-box page-bg" :style="props.customStyle">
|
||||||
<coreshop-navbar :isBack="props.isBack" :bgColor="props.bgColor" :mode="props.mode" :title="props.title"
|
<coreshop-navbar :isBack="props.isBack" :bgColor="props.bgColor" :placeholder="props.placeholder"
|
||||||
:titleColor="props.titleColor" :handleCustomRouteJump="props.handleCustomRouteJump"></coreshop-navbar>
|
:mode="props.mode" :title="props.title" :titleColor="props.titleColor"
|
||||||
<view class="layout-page-content"
|
:handleCustomRouteJump="props.handleCustomRouteJump"></coreshop-navbar>
|
||||||
:style="{ ...props.contentStyle }">
|
<view class="layout-page-content" :style="{ ...props.contentStyle }">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</view>
|
</view>
|
||||||
<template v-if="props.showLoginModalDom">
|
<template v-if="props.showLoginModalDom">
|
||||||
<coreshop-login-modal :show="_useLoginStore.showLoginModalTogglePop"
|
<coreshop-login-modal :show="_useLoginStore.showLoginModalTogglePop"
|
||||||
@handleChangePopup="handleChangeLoginPopup" @getUserInfo="_useLoginStore.getUserInfo()"></coreshop-login-modal>
|
@handleChangePopup="handleChangeLoginPopup"
|
||||||
|
@getUserInfo="_useLoginStore.getUserInfo()"></coreshop-login-modal>
|
||||||
</template>
|
</template>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useSystemInfo } from '@/core/hooks';
|
|
||||||
import { useLoginStore } from '@/core/store';
|
import { useLoginStore } from '@/core/store';
|
||||||
|
|
||||||
// 获取自定义导航栏高度
|
|
||||||
const { statusBarHeight } = useSystemInfo();
|
|
||||||
const _useLoginStore = useLoginStore();
|
const _useLoginStore = useLoginStore();
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
@@ -31,9 +29,10 @@
|
|||||||
contentStyle : any;
|
contentStyle : any;
|
||||||
handleCustomRouteJump : () => void | null,
|
handleCustomRouteJump : () => void | null,
|
||||||
showLoginModalDom : boolean;
|
showLoginModalDom : boolean;
|
||||||
|
placeholder : boolean;
|
||||||
}>(), {
|
}>(), {
|
||||||
isBack: true,
|
isBack: true,
|
||||||
bgColor: '#EEF3F7',
|
bgColor: '#eef2f6',
|
||||||
titleColor: '#000',
|
titleColor: '#000',
|
||||||
mode: 'center',
|
mode: 'center',
|
||||||
title: '',
|
title: '',
|
||||||
@@ -41,7 +40,8 @@
|
|||||||
customStyle: {},
|
customStyle: {},
|
||||||
contentStyle: {},
|
contentStyle: {},
|
||||||
handleCustomRouteJump: null,
|
handleCustomRouteJump: null,
|
||||||
showLoginModalDom: false
|
showLoginModalDom: false,
|
||||||
|
placeholder: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
/** 打开获取关闭login弹框 */
|
/** 打开获取关闭login弹框 */
|
||||||
|
|||||||
@@ -26,11 +26,12 @@
|
|||||||
handleCustomRouteJump : () => void | null,
|
handleCustomRouteJump : () => void | null,
|
||||||
showLoginModalDom : boolean;
|
showLoginModalDom : boolean;
|
||||||
needSkeleton : boolean;
|
needSkeleton : boolean;
|
||||||
skeleton ?: Array<object>;
|
skeleton ?: Array<any>;
|
||||||
skeletonLoading : boolean;
|
skeletonLoading : boolean;
|
||||||
|
placeholder : boolean;
|
||||||
}>(), {
|
}>(), {
|
||||||
isBack: true,
|
isBack: true,
|
||||||
bgColor: '#D33123',
|
bgColor: '#eef2f6',
|
||||||
titleColor: '#000',
|
titleColor: '#000',
|
||||||
mode: 'center',
|
mode: 'center',
|
||||||
title: '',
|
title: '',
|
||||||
@@ -46,7 +47,8 @@
|
|||||||
gap: '20rpx',
|
gap: '20rpx',
|
||||||
style: ['width: 200rpx;marginBottom: 50rpx;', 'height: 100rpx;', 'width: 500rpx;'],
|
style: ['width: 200rpx;marginBottom: 50rpx;', 'height: 100rpx;', 'width: 500rpx;'],
|
||||||
}],
|
}],
|
||||||
skeletonLoading: false
|
skeletonLoading: false,
|
||||||
|
placeholder: true,
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="layout-classify-page">
|
<view class="layout-classify-page">
|
||||||
<uv-navbar bgColor="#fff">
|
<uv-navbar bgColor="#fff" :height="`${menuButtonHeight}px`">
|
||||||
<template #left>
|
<template #left>
|
||||||
<view class="search-box">
|
<view class="search-box">
|
||||||
<image @click="hanlderBack" class="back" :src="handleStaticResources('/static/images/back.png')">
|
<image @click="hanlderBack" class="back" :src="handleStaticResources('/static/images/back.png')">
|
||||||
@@ -143,7 +143,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 获取自定义导航栏高度
|
// 获取自定义导航栏高度
|
||||||
const { statusBarHeight } = useSystemInfo();
|
const { statusBarHeight ,menuButtonHeight} = useSystemInfo();
|
||||||
|
|
||||||
const state = reactive<{
|
const state = reactive<{
|
||||||
searchKey : string;
|
searchKey : string;
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
.layout-classify {
|
.layout-classify {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.big-classify {
|
.big-classify {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@@ -225,10 +225,9 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
nextTick(async () => {
|
nextTick(async () => {
|
||||||
state.bigClassifyH = ((await getDomInfo('.big-classify', instance.proxy)) as { height : number }).height;
|
state.bigClassifyH = ((await getDomInfo('.big-classify', instance.proxy)) as { height : number }).height;
|
||||||
|
|
||||||
setTimeout(async () => {
|
setTimeout(async () => {
|
||||||
state.rightTabH = ((await getDomInfo('.right-tab-box', instance.proxy)) as { height : number }).height;
|
state.rightTabH = ((await getDomInfo('.right-tab-box', instance.proxy)) as { height : number }).height;
|
||||||
}, 100)
|
}, 100)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
.classify-box {
|
.classify-box {
|
||||||
max-width: 750rpx;
|
max-width: 750rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
.classify-left {
|
.classify-left {
|
||||||
@@ -60,8 +60,13 @@
|
|||||||
width: 550rpx;
|
width: 550rpx;
|
||||||
padding: 20rpx 0;
|
padding: 20rpx 0;
|
||||||
}
|
}
|
||||||
|
.right-data-list{
|
||||||
|
position: relative;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
.scroll-view {
|
.scroll-view {
|
||||||
|
position: absolute;
|
||||||
|
height: 100%;
|
||||||
padding: 0 20rpx 0;
|
padding: 0 20rpx 0;
|
||||||
width: calc(100% - 40rpx);
|
width: calc(100% - 40rpx);
|
||||||
|
|
||||||
|
|||||||
@@ -13,43 +13,43 @@
|
|||||||
<view class="right-tab-box">
|
<view class="right-tab-box">
|
||||||
<coreshop-tabs :list="state.rightTabList" @hanldeClickTab="hanldeChangeRightTab"></coreshop-tabs>
|
<coreshop-tabs :list="state.rightTabList" @hanldeClickTab="hanldeChangeRightTab"></coreshop-tabs>
|
||||||
</view>
|
</view>
|
||||||
<scroll-view class="scroll-view" :style="{ 'height': `${props.height - 50}px` }" :scroll-y="true"
|
<view class="right-data-list">
|
||||||
@scrolltolower="handleScrolltolower">
|
<scroll-view class="scroll-view" :scroll-y="true" @scrolltolower="handleScrolltolower">
|
||||||
<view class="advert-box radius-15">
|
<view class="advert-box radius-15">
|
||||||
<coreshop-advert :code="advertPosition.goodsClassifyBanner"></coreshop-advert>
|
<coreshop-advert :code="advertPosition.goodsClassifyBanner"></coreshop-advert>
|
||||||
</view>
|
</view>
|
||||||
<view class="data-box" v-if="state.goodsList.length > 0">
|
<view class="data-box" v-if="state.goodsList.length > 0">
|
||||||
<view class="item-box" v-for="item in state.goodsList" :key="item.id">
|
<view class="item-box" v-for="item in state.goodsList" :key="item.id">
|
||||||
<coreshop-goods-card imgWidth="150rpx" imgHeight="150rpx"
|
<coreshop-goods-card imgWidth="150rpx" imgHeight="150rpx"
|
||||||
:goodsData="hanldeCombinationGoodsData(item)" @hanldeClickGoods="hanldeClickGoods">
|
:goodsData="hanldeCombinationGoodsData(item)" @hanldeClickGoods="hanldeClickGoods">
|
||||||
<template #goodPrice>
|
<template #goodPrice>
|
||||||
<view class="price-msg">
|
<view class="price-msg">
|
||||||
<view class="price-box">
|
<view class="price-box">
|
||||||
<view class="price">
|
<view class="price">
|
||||||
<text class="symbol">¥</text>
|
<text class="symbol">¥</text>
|
||||||
<text class="num">{{ item.price }}</text>
|
<text class="num">{{ item.price }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="underlin-price">¥{{ item.mktprice }}</view>
|
||||||
|
</view>
|
||||||
|
<view class="btn" @click="handleSelectSku(item.id)">
|
||||||
|
<image class="img" :src="handleStaticResources('/static/images/cart.png')">
|
||||||
|
</image>
|
||||||
</view>
|
</view>
|
||||||
<view class="underlin-price">¥{{ item.mktprice }}</view>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="btn" @click="handleSelectSku(item.id)">
|
</template>
|
||||||
<image class="img" :src="handleStaticResources('/static/images/cart.png')">
|
</coreshop-goods-card>
|
||||||
</image>
|
</view>
|
||||||
</view>
|
<view class="no-more">
|
||||||
</view>
|
<uv-divider :dashed="true"
|
||||||
</template>
|
:text="state.totalPages > state.page ? '下滑加载更多' : '没有更多了'"></uv-divider>
|
||||||
</coreshop-goods-card>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="no-more">
|
<view v-else>
|
||||||
<uv-divider :dashed="true"
|
<coreshop-empty></coreshop-empty>
|
||||||
:text="state.totalPages > state.page ? '下滑加载更多' : '没有更多了'"></uv-divider>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</scroll-view>
|
||||||
<view v-else>
|
</view>
|
||||||
<coreshop-empty></coreshop-empty>
|
|
||||||
</view>
|
|
||||||
</scroll-view>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="shopping-box">
|
<view class="shopping-box">
|
||||||
<view class="shopping-Bag">
|
<view class="shopping-Bag">
|
||||||
<view class="bag-box">
|
<view class="bag-box">
|
||||||
@@ -75,8 +75,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { reactive, ref, watch } from 'vue';
|
import { onMounted, reactive, ref, watch, nextTick } from 'vue';
|
||||||
import { onShow } from '@dcloudio/uni-app';
|
|
||||||
import { UserToken, advertPosition, onClassifyPageHide } from '@/core/consts';
|
import { UserToken, advertPosition, onClassifyPageHide } from '@/core/consts';
|
||||||
import { queryGoodsPageList, queryCartNumAndMoney, queryGoodsDetailByToken, queryGoodsDetail, queryAddCart } from '@/core/api';
|
import { queryGoodsPageList, queryCartNumAndMoney, queryGoodsDetailByToken, queryGoodsDetail, queryAddCart } from '@/core/api';
|
||||||
import type { CategoriesType, Response, GoodsListType, GoodsType } from '@/core/models';
|
import type { CategoriesType, Response, GoodsListType, GoodsType } from '@/core/models';
|
||||||
@@ -147,7 +146,7 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
onShow(() => {
|
onMounted(() => {
|
||||||
if (uni.getStorageSync(UserToken)) {
|
if (uni.getStorageSync(UserToken)) {
|
||||||
getCartNumAndMoney();
|
getCartNumAndMoney();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
max-width: 500rpx;
|
||||||
.page-name {
|
.page-name {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
margin-right: 20rpx;
|
margin-right: 20rpx;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<coreshop-page :isBack="false" bgColor="rgba(0,0,0,0)" :isShowStatusBarHeight="false" showLoginModalDom>
|
<coreshop-page :isBack="false" bgColor="rgba(0,0,0,0)" :isShowStatusBarHeight="false" showLoginModalDom>
|
||||||
<view class="layout-classify-page">
|
<view class="layout-classify-page">
|
||||||
<uv-navbar bgColor="#EEF3F7">
|
<uv-navbar bgColor="#EEF3F7" :height="menuButtonHeight+'px'">
|
||||||
<template #left>
|
<template #left>
|
||||||
<view class="search-box">
|
<view class="search-box">
|
||||||
<view class="page-name">分类</view>
|
<view class="page-name">分类</view>
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
const shopConfigStore : ShopConfigStoreType = useShopConfigStore();
|
const shopConfigStore : ShopConfigStoreType = useShopConfigStore();
|
||||||
|
|
||||||
// 获取自定义导航栏高度
|
// 获取自定义导航栏高度
|
||||||
const { statusBarHeight, systemInfo } = useSystemInfo();
|
const { statusBarHeight, systemInfo, menuButtonHeight } = useSystemInfo();
|
||||||
|
|
||||||
const state = reactive<{
|
const state = reactive<{
|
||||||
categoriesList : Array<CategoriesType>,
|
categoriesList : Array<CategoriesType>,
|
||||||
@@ -70,8 +70,8 @@
|
|||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
getAllCategories();
|
getAllCategories();
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
// 屏幕总高度 - 顶部tab栏高度 - 顶部安全高度 - 底部安全高度 - 底部tabBar的默认高度50(如果修改了配置高度这里也要同步修改)
|
// 屏幕总高度 - 顶部高度 - 底部安全高度 - 底部tabBar的默认高度50(如果修改了配置高度这里也要同步修改)
|
||||||
state.height = systemInfo.value.screenHeight - systemInfo.value.statusBarHeight - (systemInfo.value.system?.includes('iOS') ? 44 : 48) - systemInfo.value.safeAreaInsets?.bottom - 50;
|
state.height = systemInfo.value.screenHeight - statusBarHeight.value - systemInfo.value.safeAreaInsets?.bottom - 50;
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { handleShowToast, handleRouteNavigateTo } from '@/core/utils';
|
import { handleRouteNavigateTo } from '@/core/utils';
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
data : any,
|
data : any,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<coreshop-page bgColor="rgba(0,0,0,0)" :isShowStatusBarHeight="false" showLoginModalDom>
|
<coreshop-page bgColor="rgba(0,0,0,0)" :isShowStatusBarHeight="false" :placeholder="false" showLoginModalDom>
|
||||||
<view class=" goods-detail" :style="{ 'margin-top': `-${statusBarHeight}px` }">
|
<view class="goods-detail">
|
||||||
<!-- 商品详情 -->
|
<!-- 商品详情 -->
|
||||||
<GoodsDetail :goodsId="state.goodsDetailData?.id" :goodsDetailData="state.goodsDetailData"
|
<GoodsDetail :goodsId="state.goodsDetailData?.id" :goodsDetailData="state.goodsDetailData"
|
||||||
:swiperBanner="state.swiperBanner" :goodsDetailContent="state.goodsDetailContent"
|
:swiperBanner="state.swiperBanner" :goodsDetailContent="state.goodsDetailContent"
|
||||||
@@ -38,7 +38,6 @@
|
|||||||
import GoodsDetailSkuPopup from '@/pages/components/goods-detail/components/goods-detail-sku/goods-detail-sku.vue';
|
import GoodsDetailSkuPopup from '@/pages/components/goods-detail/components/goods-detail-sku/goods-detail-sku.vue';
|
||||||
import GoodsDetailRecommend from '@/pages/components/goods-detail/components/goods-detail-recommend/goods-detail-recommend.vue';
|
import GoodsDetailRecommend from '@/pages/components/goods-detail/components/goods-detail-recommend/goods-detail-recommend.vue';
|
||||||
import { useLoginStore } from '@/core/store';
|
import { useLoginStore } from '@/core/store';
|
||||||
import { useSystemInfo } from '@/core/hooks';
|
|
||||||
|
|
||||||
interface QueryParams {
|
interface QueryParams {
|
||||||
id : number;
|
id : number;
|
||||||
@@ -50,8 +49,6 @@
|
|||||||
/** 购物车store */
|
/** 购物车store */
|
||||||
const _useCartStore = useCartStore();
|
const _useCartStore = useCartStore();
|
||||||
|
|
||||||
const { statusBarHeight } = useSystemInfo();
|
|
||||||
|
|
||||||
const state = reactive<{
|
const state = reactive<{
|
||||||
goodsDetailData : any;
|
goodsDetailData : any;
|
||||||
swiperBanner : Array<string>;
|
swiperBanner : Array<string>;
|
||||||
@@ -124,15 +121,15 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 获取分享url */
|
/** 获取分享url */
|
||||||
state.shareUrl = await getShareUrl({
|
state.shareUrl = await getShareUrl({
|
||||||
client: ShareClientEnum.wxMiNiProgram,
|
client: ShareClientEnum.wxMiNiProgram,
|
||||||
url: shareUrl,
|
url: shareUrl,
|
||||||
type: ShareModelEnum.url,
|
type: ShareModelEnum.url,
|
||||||
page: ShareEnum.goods,
|
page: ShareEnum.goods,
|
||||||
params: { goodsId: goodsDetail.data.id, }
|
params: { goodsId: goodsDetail.data.id, }
|
||||||
})
|
})
|
||||||
|
|
||||||
/** 如果用户登录,获取购物车数量 */
|
/** 如果用户登录,获取购物车数量 */
|
||||||
if (uni.getStorageSync(UserToken)) {
|
if (uni.getStorageSync(UserToken)) {
|
||||||
getCartNum();
|
getCartNum();
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<coreshop-page :isBack="false" bgColor="rgba(0,0,0,0)" :isShowStatusBarHeight="false" showLoginModalDom>
|
<coreshop-page :isBack="false" bgColor="rgba(0,0,0,0)" :isShowStatusBarHeight="false" showLoginModalDom>
|
||||||
<view class="layout-home-page page-bg">
|
<view class="layout-home-page page-bg">
|
||||||
<image class="home-bg" :src="handleStaticResources('/static/images/home-bg.jpg')"></image>
|
<image class="home-bg" :src="handleStaticResources('/static/images/home-bg.jpg')"></image>
|
||||||
<uv-navbar :title="shopConfigStore.config?.shopName"
|
<uv-navbar :title="shopConfigStore.config?.shopName"
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
.member-head{
|
.member-head {
|
||||||
position: relative;
|
position: relative;
|
||||||
.memeber-bg{
|
.memeber-bg {
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 400rpx;
|
height: 600rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.head-box {
|
.head-box {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 0;
|
bottom: 12rpx;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
.user-info {
|
.user-info {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -82,9 +82,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.member-box {
|
.member-box {
|
||||||
.member-content {
|
.member-content {
|
||||||
width: 88%;
|
width: 88%;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<coreshop-page :title=" userInfoStore.userInfo?.nickName || ''" titleColor="#fff"
|
<coreshop-page :title="state.isScrollToTop ? '' :userInfoStore.userInfo?.nickName" :placeholder="false" titleColor="#fff"
|
||||||
mode="left" bgColor="#d33123" :isShowStatusBarHeight="false"
|
mode="left" bgColor="#d33123" :isShowStatusBarHeight="false"
|
||||||
:isBack="false" showLoginModalDom>
|
:isBack="false" showLoginModalDom>
|
||||||
<view class="layout-member-page">
|
<view class="layout-member-page">
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<coreshop-page bgColor="rgba(0,0,0,0)" :isShowStatusBarHeight="false" showLoginModalDom>
|
<coreshop-page bgColor="rgba(0,0,0,0)" :isShowStatusBarHeight="false" :placeholder="false" showLoginModalDom>
|
||||||
<view class="goods-detail" :style="{ 'margin-top': `-${statusBarHeight}px` }">
|
<view class="goods-detail">
|
||||||
<!-- 商品详情 -->
|
<!-- 商品详情 -->
|
||||||
<GoodsDetail :goodsId="state.goodsDetailData?.id" :goodsDetailData="state.goodsDetailData"
|
<GoodsDetail :goodsId="state.goodsDetailData?.id" :goodsDetailData="state.goodsDetailData"
|
||||||
:swiperBanner="state.swiperBanner" :spesDesc="state.spesDesc"
|
:swiperBanner="state.swiperBanner" :spesDesc="state.spesDesc"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<coreshop-page bgColor="rgba(0,0,0,0)" :isShowStatusBarHeight="false" showLoginModalDom>
|
<coreshop-page bgColor="rgba(0,0,0,0)" :isShowStatusBarHeight="false" :placeholder="false" showLoginModalDom>
|
||||||
<view class="goods-detail" :style="{ 'margin-top': `-${statusBarHeight}px` }">
|
<view class="goods-detail">
|
||||||
<!-- 商品详情 -->
|
<!-- 商品详情 -->
|
||||||
<GoodsDetail :goodsId="state.goodsDetailData?.id" :goodsDetailData="state.goodsDetailData"
|
<GoodsDetail :goodsId="state.goodsDetailData?.id" :goodsDetailData="state.goodsDetailData"
|
||||||
:swiperBanner="state.swiperBanner" :shareType="ShareEnum.pinTuan"
|
:swiperBanner="state.swiperBanner" :shareType="ShareEnum.pinTuan"
|
||||||
@@ -62,28 +62,28 @@
|
|||||||
|
|
||||||
<!-- 商品sku弹框 -->
|
<!-- 商品sku弹框 -->
|
||||||
<GoodsDetailSkuPopup :showSku="state.showSku" :goodsDetailData="state.goodsDetailData"
|
<GoodsDetailSkuPopup :showSku="state.showSku" :goodsDetailData="state.goodsDetailData"
|
||||||
:isShowAddCartBtn="false" :buyNowNowloading="loading" @handleChangePopup="handleChangePopup" @handleBuyNow="handleBuyNow"
|
:isShowAddCartBtn="false" :buyNowNowloading="loading" @handleChangePopup="handleChangePopup"
|
||||||
:btnBuyTitlt="state.btnBuyTitlt">
|
@handleBuyNow="handleBuyNow" :btnBuyTitlt="state.btnBuyTitlt">
|
||||||
</GoodsDetailSkuPopup>
|
</GoodsDetailSkuPopup>
|
||||||
</view>
|
</view>
|
||||||
</coreshop-page>
|
</coreshop-page>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
import { onLoad ,onShareAppMessage,onShareTimeline} from '@dcloudio/uni-app';
|
import { onLoad, onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app';
|
||||||
import { queryPinTuanGoodsDetail, queryCartNum, queryAddCart, queryOrderPinTuanTeamInfo } from '@/core/api';
|
import { queryPinTuanGoodsDetail, queryCartNum, queryAddCart, queryOrderPinTuanTeamInfo } from '@/core/api';
|
||||||
import type { Response } from '@/core/models';
|
import type { Response } from '@/core/models';
|
||||||
import { UserToken,shareUrl } from '@/core/consts'
|
import { UserToken, shareUrl } from '@/core/consts'
|
||||||
import { useCartStore, useLoginStore } from '@/core/store';
|
import { useCartStore, useLoginStore } from '@/core/store';
|
||||||
import { PaymentTypeEnum, ShareEnum,ShareClientEnum,ShareModelEnum } from '@/core/enum';
|
import { PaymentTypeEnum, ShareEnum, ShareClientEnum, ShareModelEnum } from '@/core/enum';
|
||||||
import { handleRouteNavigateTo, handleShowToast ,getShareUrl} from '@/core/utils';
|
import { handleRouteNavigateTo, handleShowToast, getShareUrl } from '@/core/utils';
|
||||||
import { deepClone } from '@/uni_modules/uv-ui-tools/libs/function/index.js';
|
import { deepClone } from '@/uni_modules/uv-ui-tools/libs/function/index.js';
|
||||||
|
|
||||||
import GoodsDetail from '@/pages/components/goods-detail/index.vue';
|
import GoodsDetail from '@/pages/components/goods-detail/index.vue';
|
||||||
import GoodsDetailRecommend from '@/pages/components/goods-detail/components/goods-detail-recommend/goods-detail-recommend.vue';
|
import GoodsDetailRecommend from '@/pages/components/goods-detail/components/goods-detail-recommend/goods-detail-recommend.vue';
|
||||||
import GoodsDetailSkuPopup from '@/pages/components/goods-detail/components/goods-detail-sku/goods-detail-sku.vue';
|
import GoodsDetailSkuPopup from '@/pages/components/goods-detail/components/goods-detail-sku/goods-detail-sku.vue';
|
||||||
import GoodsDetailBottomTabbar from '@/pages/components/goods-detail/components/goods-detail-bottom-tabbar/goods-detail-bottom-tabbar.vue';
|
import GoodsDetailBottomTabbar from '@/pages/components/goods-detail/components/goods-detail-bottom-tabbar/goods-detail-bottom-tabbar.vue';
|
||||||
import { useLoadingFn,useSystemInfo } from '@/core/hooks';
|
import { useLoadingFn, useSystemInfo } from '@/core/hooks';
|
||||||
|
|
||||||
interface QueryParams {
|
interface QueryParams {
|
||||||
id : number;
|
id : number;
|
||||||
@@ -95,7 +95,7 @@
|
|||||||
|
|
||||||
/** 获取购物车数据 */
|
/** 获取购物车数据 */
|
||||||
const cartStore = useCartStore();
|
const cartStore = useCartStore();
|
||||||
|
|
||||||
const { statusBarHeight } = useSystemInfo();
|
const { statusBarHeight } = useSystemInfo();
|
||||||
|
|
||||||
const state = reactive<{
|
const state = reactive<{
|
||||||
@@ -111,7 +111,7 @@
|
|||||||
isSingleBuy : boolean;
|
isSingleBuy : boolean;
|
||||||
btnBuyTitlt : string;
|
btnBuyTitlt : string;
|
||||||
teamInfo : any;
|
teamInfo : any;
|
||||||
shareUrl:string;
|
shareUrl : string;
|
||||||
}>({
|
}>({
|
||||||
id: 0,
|
id: 0,
|
||||||
goodsDetailData: {},
|
goodsDetailData: {},
|
||||||
@@ -125,7 +125,7 @@
|
|||||||
isSingleBuy: true,
|
isSingleBuy: true,
|
||||||
btnBuyTitlt: "发起拼团",
|
btnBuyTitlt: "发起拼团",
|
||||||
teamInfo: {},
|
teamInfo: {},
|
||||||
shareUrl:"",
|
shareUrl: "",
|
||||||
});
|
});
|
||||||
|
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
@@ -177,7 +177,7 @@
|
|||||||
if (uni.getStorageSync(UserToken)) {
|
if (uni.getStorageSync(UserToken)) {
|
||||||
getCartNum();
|
getCartNum();
|
||||||
}
|
}
|
||||||
|
|
||||||
state.shareUrl = await getShareUrl({
|
state.shareUrl = await getShareUrl({
|
||||||
client: ShareClientEnum.wxMiNiProgram,
|
client: ShareClientEnum.wxMiNiProgram,
|
||||||
url: shareUrl,
|
url: shareUrl,
|
||||||
@@ -283,7 +283,7 @@
|
|||||||
handleShowToast(addCart.msg);
|
handleShowToast(addCart.msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 分享 */
|
/** 分享 */
|
||||||
onShareAppMessage(() => {
|
onShareAppMessage(() => {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<coreshop-page bgColor="rgba(0,0,0,0)" :isShowStatusBarHeight="false" showLoginModalDom>
|
<coreshop-page bgColor="rgba(0,0,0,0)" :isShowStatusBarHeight="false" :placeholder="false" showLoginModalDom>
|
||||||
<view class="goods-detail" :style="{ 'margin-top': `-${statusBarHeight}px` }">
|
<view class="goods-detail">
|
||||||
<!-- 商品详情 -->
|
<!-- 商品详情 -->
|
||||||
<GoodsDetail :goodsId="state.goodsDetailData?.id" :goodsDetailData="state.goodsDetailData"
|
<GoodsDetail :goodsId="state.goodsDetailData?.id" :goodsDetailData="state.goodsDetailData"
|
||||||
:swiperBanner="state.swiperBanner" :spesDesc="state.spesDesc"
|
:swiperBanner="state.swiperBanner" :spesDesc="state.spesDesc"
|
||||||
@@ -83,7 +83,7 @@
|
|||||||
const _useLoginStore = useLoginStore();
|
const _useLoginStore = useLoginStore();
|
||||||
|
|
||||||
const cartStore = useCartStore();
|
const cartStore = useCartStore();
|
||||||
|
|
||||||
const { statusBarHeight } = useSystemInfo();
|
const { statusBarHeight } = useSystemInfo();
|
||||||
|
|
||||||
const state = reactive<{
|
const state = reactive<{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
z-index: 99;
|
||||||
.item {
|
.item {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 33.33%;
|
width: 33.33%;
|
||||||
|
|||||||
@@ -11,7 +11,6 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
z-index: 99;
|
|
||||||
.collection {
|
.collection {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@@ -10,8 +10,7 @@
|
|||||||
bottom: 0;
|
bottom: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
z-index: 99;
|
|
||||||
.collection,
|
.collection,
|
||||||
.delete {
|
.delete {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<coreshop-page bgColor="rgba(0,0,0,0)" :isShowStatusBarHeight="false" showLoginModalDom>
|
<coreshop-page bgColor="rgba(0,0,0,0)" :isShowStatusBarHeight="false" :placeholder="false" showLoginModalDom>
|
||||||
<view class="layout-goods-detail">
|
<view class="layout-goods-detail">
|
||||||
<GoodsDetail :goodsId="state.goodsDetailData?.id" :goodsDetailData="state.goodsDetailData"
|
<GoodsDetail :goodsId="state.goodsDetailData?.id" :goodsDetailData="state.goodsDetailData"
|
||||||
:swiperBanner="state.swiperBanner" :goodsDetailContent="state.goodsDetailContent"
|
:swiperBanner="state.swiperBanner" :goodsDetailContent="state.goodsDetailContent"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<coreshop-page title="门店列表" mode="left" bgColor="rgba(0,0,0,0)" :isShowStatusBarHeight="false">
|
<coreshop-page title="门店列表" mode="left" bgColor="rgba(0,0,0,0)" :placeholder="false" :isShowStatusBarHeight="false">
|
||||||
<view class="layout-store-box">
|
<view class="layout-store-box">
|
||||||
<view class="map-box">
|
<view class="map-box">
|
||||||
<map style="width: 100%;height: 100%;" id="map" :scale="11" :enable-3D="true" :show-compass="true"
|
<map style="width: 100%;height: 100%;" id="map" :scale="11" :enable-3D="true" :show-compass="true"
|
||||||
|
|||||||
Reference in New Issue
Block a user