uniapp uses native applet plug-ins

        This article mainly describes the steps of using native plug-ins on uniapp

1. Before using the plug-in, log in to the WeChat public platform first. On the WeChat public platform, click Settings in the lower left corner == "Third Party Settings ==" Add Plug-in == "Enter the name of the plug-in ==" Click OK to submit the application == "Apply The plugin can be used after passing

first step

 

 2. Search for the plugin you need and click Add

 

 

1. In the manifest.json file of the uniapp project, scroll down to the bottom, find the source code view, and configure plugins in mp-weixin in the source code view. The hello-plugin can be a custom name.

 

 Don't worry about export, don't write it, just write the following two attributes

"mp-weixin":{
"plugins": {
			"hello-plugin": {
				"version": "使用的插件版本",
				"provider": "插件的appid"
			}
	}
}

plugin appid

 

2.1 In the plugin.json file of the plugin, you can see the name of the configured plugin page, and call it according to the plugin development document

 

   "index-one": "pages/index/index-one",

2.2: When you need to jump to the plug-in page, you can use navigateTo to jump to the applet plug-in,

plugin:// fixed wording, do not move

hello-plugin is the custom name in the source code view,

index-one is which page of the plug-in needs to be jumped to (),

navigateTo({
url:'plugin://hello-plugin/index-one'
})

In this way, the jump is successful. If you need to transfer parameters from uniapp to the plug-in for interaction, please read my other article

uniapp exports content to native plugins

This is the end of the article, I hope it will help you~

Guess you like

Origin blog.csdn.net/qq_44278289/article/details/127422459