Merge branch 'dev' into 'master'

uniapp【新增】: 首页添加悬浮在线客服按钮

See merge request jianweie/coreshoppro!72
This commit is contained in:
花城
2024-11-06 13:44:17 +00:00
2 changed files with 30 additions and 2 deletions

View File

@@ -18,4 +18,19 @@
.content-box {
position: relative;
}
.kufu-button {
position: fixed;
right: 40rpx;
bottom: 100rpx;
width: 80rpx;
height: 80rpx;
background-color: #fff;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
box-shadow: 0 0 15rpx #ccc;
padding: 0;
z-index: 99;
}
}

View File

@@ -1,6 +1,6 @@
<template>
<coreshop-page :isBack="false" bgColor="rgba(0,0,0,0)" :isShowStatusBarHeight="false" showLoginModalDom needSkeleton :skeleton="skeleton"
:skeletonLoading="loading">
<coreshop-page :isBack="false" bgColor="rgba(0,0,0,0)" :isShowStatusBarHeight="false" showLoginModalDom needSkeleton
:skeleton="skeleton" :skeletonLoading="loading">
<view class="layout-home-page page-bg">
<image class="home-bg" :src="handleStaticResources('/static/images/home-bg.jpg')"></image>
<uv-navbar :title="shopConfigStore.config?.shopName"
@@ -22,6 +22,13 @@
<!-- 弹框广告 -->
<HomeAdpop></HomeAdpop>
<!-- #ifdef MP-WEIXIN -->
<button class="kufu-button" hover-class="none" open-type="contact" bindcontact="showChat"
:session-from="state.kufuData">
<uv-icon name="server-man" color="#d33123" :size="40"></uv-icon>
</button>
<!-- #endif -->
</view>
</coreshop-page>
</template>
@@ -55,11 +62,13 @@
isScrollTop : boolean;
showPage : boolean;
shareUrl : string;
kufuData : string;
}>({
coreshopData: [],
isScrollTop: false,
showPage: false,
shareUrl: "",
kufuData: ""
})
onShow(() => {
@@ -104,6 +113,10 @@
const userInfo : Response<UserInfoType> = await queryUserInfo();
if (userInfo.status) {
userInfoStore.setUserInfo(userInfo?.data);
state.kufuData = JSON.stringify({
nickName: userInfo?.data?.nickName,
tel: userInfo?.data?.mobile
})
}
}