index.tsx 551 B

123456789101112131415161718192021222324252627
  1. import Taro, { useLoad } from '@tarojs/taro'
  2. import React from 'react'
  3. import { View } from '@tarojs/components'
  4. import './index.less'
  5. const myPluginInterface = Taro.requirePlugin('myPlugin')
  6. const Index: React.FC = () => {
  7. useLoad(() => {
  8. })
  9. function openEmbeddedMiniProgram(appId, path) {
  10. Taro.openEmbeddedMiniProgram({
  11. appId,
  12. path,
  13. envVersion: 'trial'
  14. })
  15. }
  16. return (
  17. <View className='index'>
  18. <custom props={{ openEmbeddedMiniProgram, adpId: 'uh2321awe1' }}/>
  19. </View>
  20. )
  21. }
  22. export default Index