mirror of
https://gitee.com/wot-design-uni/wot-design-uni.git
synced 2025-12-06 17:18:40 +08:00
docs: ✏️ 演示demo小程序支持分享
This commit is contained in:
parent
1d0b11b256
commit
583acc2fa9
@ -105,7 +105,7 @@ onMounted(() => {
|
|||||||
})
|
})
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
// 微信广告
|
// 微信广告
|
||||||
if (uni.createInterstitialAd && showWxAd3.value && props.useWxAd) {
|
if (uni.createInterstitialAd && showWxAd3.value && props.useWxAd && !isFree.value) {
|
||||||
interstitialAd = uni.createInterstitialAd({ adUnitId: 'adunit-fc8522e2b1185c89' })
|
interstitialAd = uni.createInterstitialAd({ adUnitId: 'adunit-fc8522e2b1185c89' })
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
interstitialAd && interstitialAd.show()
|
interstitialAd && interstitialAd.show()
|
||||||
|
|||||||
BIN
src/pages/images/share.png
Normal file
BIN
src/pages/images/share.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 86 KiB |
@ -39,6 +39,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import packageConfig from '../../../package.json'
|
import packageConfig from '../../../package.json'
|
||||||
|
import { onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app'
|
||||||
|
|
||||||
const imgModules: any = import.meta.glob('../images/*.png', { eager: true })
|
const imgModules: any = import.meta.glob('../images/*.png', { eager: true })
|
||||||
|
|
||||||
@ -402,6 +403,22 @@ function kindToggle(id: string) {
|
|||||||
}
|
}
|
||||||
list.value = listValue
|
list.value = listValue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onShareAppMessage(() => {
|
||||||
|
return {
|
||||||
|
title: '一个基于Vue3+TS的uni-app组件库,提供70+高质量组件,支持暗黑模式、国际化和自定义主题。',
|
||||||
|
path: '/pages/index/Index',
|
||||||
|
imageUrl: imgModules['../images/share.png'].default
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
onShareTimeline(() => {
|
||||||
|
return {
|
||||||
|
title: '一个基于Vue3+TS的uni-app组件库,提供70+高质量组件,支持暗黑模式、国际化和自定义主题。',
|
||||||
|
path: '/pages/index/Index',
|
||||||
|
imageUrl: imgModules['../images/share.png'].default
|
||||||
|
}
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
@ -15,7 +15,7 @@
|
|||||||
import { useRewardAd } from '@/store/useRewardAd'
|
import { useRewardAd } from '@/store/useRewardAd'
|
||||||
import { pause } from '@/uni_modules/wot-design-uni/components/common/util'
|
import { pause } from '@/uni_modules/wot-design-uni/components/common/util'
|
||||||
import { onMounted } from 'vue'
|
import { onMounted } from 'vue'
|
||||||
const { createRewardVideoAd, showRewardAd, isFree } = useRewardAd()
|
const { createRewardVideoAd, showRewardAd } = useRewardAd()
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await pause()
|
await pause()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user