12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <template>
- <view class="share-btn-box" :style="{padding:padding}">
- <view class="share-btn" @click.stop="onShare">
- <text class="share-icon iconfont_yige"></text>
- <text>分享活动</text>
- </view>
- <sharePoster ref="sharePosterRef" :code-url="codeurl" :posterUrl="sharePoster" />
- </view>
- </template>
- <script>
- import CONFIG from "@/config/global.config.js"
- export default {
- props: {
- padding: {
- type: String,
- default: '20rpx 0'
- },
- sharePoster: {
- type: String,
- default: ""
- },
- taskId: {
- type: Number,
- default: ""
- }
- },
- data() {
- return {
- codeurl: null,
- }
- },
- methods: {
- onShare() {
- this.codeurl = `${CONFIG.hostUrl}?URLType=Task&taskId=${this.taskId}`
- this.$refs.sharePosterRef.open();
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- .share-btn-box {
- width: 100%;
- .share-btn {
- display: inline-flex;
- align-items: center;
- font-size: 24rpx;
- font-weight: Light;
- color: #808080;
- line-height: 1;
- .share-icon {
- font-size: 40rpx;
- color: #3eb8d0;
- margin-right: 15rpx;
- }
- }
- }
- </style>
|