|
@@ -277,6 +277,7 @@
|
|
<view class="flex text-white flex-col items-center">
|
|
<view class="flex text-white flex-col items-center">
|
|
<text class="mt-90rpx text-36rpx font-700">{{ $t('production.rewards.ShareLink') }}</text>
|
|
<text class="mt-90rpx text-36rpx font-700">{{ $t('production.rewards.ShareLink') }}</text>
|
|
<view
|
|
<view
|
|
|
|
+ @click="shareUrl"
|
|
class="w-630rpx font-700 h-100rpx rounded-20rpx bg-primary flex items-center justify-center text-textc items-center mt-50rpx"
|
|
class="w-630rpx font-700 h-100rpx rounded-20rpx bg-primary flex items-center justify-center text-textc items-center mt-50rpx"
|
|
>
|
|
>
|
|
{{ $t('production.rewards.Share') }}
|
|
{{ $t('production.rewards.Share') }}
|
|
@@ -480,12 +481,21 @@
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
import tabbar from '@/components/TabBar/index.vue'
|
|
import tabbar from '@/components/TabBar/index.vue'
|
|
import Dialog from '@/components/common/Dialog/index.vue'
|
|
import Dialog from '@/components/common/Dialog/index.vue'
|
|
|
|
+import { shareToTelegram, TelegramLinkBuilder } from '@/utils/temlgram'
|
|
|
|
|
|
const receiveshow = ref(false)
|
|
const receiveshow = ref(false)
|
|
const lianjieShow = ref(false)
|
|
const lianjieShow = ref(false)
|
|
const abShow = ref(false)
|
|
const abShow = ref(false)
|
|
const lingquShow = ref(false)
|
|
const lingquShow = ref(false)
|
|
const errorModel = ref(false)
|
|
const errorModel = ref(false)
|
|
|
|
+
|
|
|
|
+const bot = new TelegramLinkBuilder(import.meta.env.VITE_TELEGRAM_BOOTNAME)
|
|
|
|
+const getSimpleLink = () => {
|
|
|
|
+ return bot.generateShareLink(`rp_${12345}`)
|
|
|
|
+}
|
|
|
|
+const shareUrl = () => {
|
|
|
|
+ shareToTelegram(getSimpleLink(), '')
|
|
|
|
+}
|
|
</script>
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
.custom-scroll-view {
|
|
.custom-scroll-view {
|