mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 18:03:27 +08:00
uniapp【适配】:支付宝
This commit is contained in:
@@ -97,7 +97,7 @@
|
||||
// #endif
|
||||
|
||||
// #ifdef MP-ALIPAY
|
||||
const login : Response<any> = await queryAliPayAppAuthTokenBYCode({ code, });
|
||||
const login : Response<any> = await queryAliPayAppAuthTokenBYCode({id:code});
|
||||
// #endif
|
||||
|
||||
if (login.status) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<uv-navbar :bgColor="props.bgColor" :height="menuButtonHeight+'px'" :placeholder="props.placeholder">
|
||||
<!-- #ifndef MP-ALIPAY -->
|
||||
<template #left>
|
||||
<view class="page-back">
|
||||
<image v-if="props.isBack" @click="hanlderBack" class="back"
|
||||
@@ -8,6 +9,7 @@
|
||||
:style="{ 'color': props.titleColor }">{{ props.title }}</text>
|
||||
</view>
|
||||
</template>
|
||||
<!-- #endif -->
|
||||
<template v-if="props.mode === 'center'" #center>
|
||||
<view class="title" :style="{ 'color': props.titleColor }">{{ props.title }}</view>
|
||||
</template>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<!-- #ifndef MP-ALIPAY -->
|
||||
<coreshop-navbar :isBack="false" mode="left" title="购物车"> </coreshop-navbar>
|
||||
|
||||
<!-- #endif -->
|
||||
<view class="content-box p-25 page-bg">
|
||||
<view class="cart-box" v-if="state.cartList.length > 0">
|
||||
<view class="all-select" :style="{ 'top': `${statusBarHeight}px` }">
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<coreshop-page :isBack="false" bgColor="rgba(0,0,0,0)" :isShowStatusBarHeight="false" showLoginModalDom>
|
||||
<view class="layout-classify-page">
|
||||
<!-- #ifndef MP-ALIPAY -->
|
||||
<uv-navbar bgColor="#EEF3F7" :height="menuButtonHeight+'px'">
|
||||
<template #left>
|
||||
<view class="search-box">
|
||||
@@ -15,7 +16,7 @@
|
||||
</view>
|
||||
</template>
|
||||
</uv-navbar>
|
||||
|
||||
<!-- #endif -->
|
||||
<view class="content-box" :style="{'height': `${state.height}px` }">
|
||||
<classifyOne v-if="shopConfigStore.config.cateStyle == GoodsListEnum.one" :data="state.categoriesList">
|
||||
</classifyOne>
|
||||
@@ -36,7 +37,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onMounted, reactive, nextTick } from 'vue';
|
||||
import { onMounted, reactive, nextTick, watchEffect } from 'vue';
|
||||
import { onHide } from '@dcloudio/uni-app';
|
||||
import { useShopConfigStore } from '@/core/store';
|
||||
import { queryAllCategories } from '@/core/api';
|
||||
@@ -69,10 +70,10 @@
|
||||
|
||||
onMounted(async () => {
|
||||
getAllCategories();
|
||||
nextTick(() => {
|
||||
// 屏幕总高度 - 顶部高度 - 底部安全高度 - 底部tabBar的默认高度50(如果修改了配置高度这里也要同步修改)
|
||||
state.height = systemInfo.value.screenHeight - statusBarHeight.value - systemInfo.value.safeAreaInsets?.bottom - 50;
|
||||
})
|
||||
})
|
||||
|
||||
watchEffect(() => {
|
||||
state.height = systemInfo.value.screenHeight - statusBarHeight.value - systemInfo.value.safeAreaInsets?.bottom - 50;
|
||||
})
|
||||
|
||||
onHide(() => {
|
||||
|
||||
@@ -5,13 +5,15 @@
|
||||
<uv-navbar :title="shopConfigStore.config?.shopName"
|
||||
:bg-color="state.isScrollTop ? handleStaticResources('/static/images/home-bg.jpg') : 'rgba(0,0,0,0)'"
|
||||
imgMode="aspectFill" :titleStyle="{'color':'#fff','font-size':'32rpx'}">
|
||||
<!-- #ifndef MP-ALIPAY -->
|
||||
<template #left>
|
||||
<uv-icon name="search" size="22" color="#fff" @click="handleSearch"></uv-icon>
|
||||
</template>
|
||||
<!-- #endif -->
|
||||
</uv-navbar>
|
||||
|
||||
<view class="content-box p-25">
|
||||
<CustomPage ref="homePage" :coreshopData="state.coreshopData"></CustomPage>
|
||||
<CustomPage :coreshopData="state.coreshopData"></CustomPage>
|
||||
</view>
|
||||
|
||||
<!-- 备案信息 -->
|
||||
@@ -31,16 +33,13 @@
|
||||
import CustomPage from '@/pages/components/custom-page/index.vue';
|
||||
import HomeAdpop from '@/pages/components/custom-page/components/home-adpop/home-adpop.vue';
|
||||
import { handleStaticResources, handleRouteNavigateTo, getShareUrl, getDefaultShareData } from '@/core/utils';
|
||||
import { useSystemInfo, useLoadingFn } from '@/core/hooks';
|
||||
import { useLoadingFn } from '@/core/hooks';
|
||||
import { UserToken, onHomePageShow, shareUrl } from '@/core/consts';
|
||||
import { useUserInfoStore, useShopConfigStore } from '@/core/store';
|
||||
import { ShareClientEnum, ShareModelEnum, ShareEnum } from '@/core/enum';
|
||||
|
||||
/** 获取项目配置 */
|
||||
const shopConfigStore = useShopConfigStore();
|
||||
|
||||
/** 获取自定义导航栏高度 */
|
||||
const { statusBarHeight } = useSystemInfo();
|
||||
const shopConfigStore = useShopConfigStore();
|
||||
|
||||
/** 获取 用户数据 */
|
||||
const userInfoStore = useUserInfoStore();
|
||||
|
||||
Reference in New Issue
Block a user