| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- <template>
- <view class="control-card">
- <button class="item" open-type="share"> 发名片 </button>
- </view>
- </template>
- <script setup>
- import {
- onShareAppMessage
- } from '@dcloudio/uni-app';
- import {
- useUserStore
- } from '@/store/modules/user.js'
- import {
- storeToRefs
- } from 'pinia'
- const userStore = useUserStore()
- const {
- cardInfo,
- cardImage
- } = storeToRefs(userStore)
- onShareAppMessage(() => {
- return {
- userName: '小程序',
- path: 'pages/splash/splash?userId=' + cardInfo.value.userId,
- 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>
|