| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <template>
- <view class="control-card">
- <button class="item" open-type="share" :loading="loading"> 发名片 </button>
- </view>
- </template>
- <script setup>
- const props = defineProps(['loading'])
- import {
- onShareAppMessage
- } from '@dcloudio/uni-app';
- import {
- useUserStore
- } from '@/store/modules/user.js'
- import {
- storeToRefs
- } from 'pinia'
- const userStore = useUserStore()
- const {
- cardInfo,
- cardImage,
- currentIndex
- } = storeToRefs(userStore)
- onShareAppMessage(() => {
- return {
- path: `pages/splash/splash?userId=${cardInfo.value.userId}¤tIndex=${currentIndex.value}`,
- userName: '小程序',
- imageUrl: cardImage.value
- };
- });
- </script>
- <style lang="scss" scoped>
- .control-card {
- background-color: #fff;
- border-radius: 0 0 24rpx 24rpx;
- position: relative;
- z-index: 1;
- bottom: 24rpx;
- display: flex;
- align-items: center;
- justify-content: space-around;
- padding: 48rpx 40rpx 24rpx;
- .item {
- display: flex;
- width: 100%;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- gap: 4rpx;
- background-color: #155DFC;
- font-size: 28rpx !important;
- border-radius: 40rpx;
- height: 80rpx;
- color: #fff;
- }
- }
- </style>
|