当前位置:网站首页>Tiktok practice ~ search page ~ scan QR code

Tiktok practice ~ search page ~ scan QR code

2022-06-26 19:06:00 gblfy

 Insert picture description here

 Insert picture description here
 Insert picture description here

One 、 QR code scanning

uni.scanCode(OBJECT)

1. api

 Insert picture description here

The short video released by myself will have “ Save to album 、 Replication link 、 QR code 、 Become private

2. Front end source code
          //  Search scan 
			scan() {
    
				uni.scanCode({
    
					success: (e) => {
    
						// url Address 
						var result = e.result;
						var vlogId = JSON.parse(result).content;
						//  Jump to the page , Carry the search criteria over 
						uni.navigateTo({
    
							url: "../vlog/vlog?vlogId=" + vlogId
						})
					}
				})
			},

Go to jump to the short video details page

3. Realization principle
  • 1. In fact, generating short video QR code is the release of short video ID
  • 2. When wechat scanning, only the generated QR code will be displayed type and content Written content , Because there is no other operation on the text .
  • 3. Let's Tiktok app When you scan the QR code , I did the following things :
    • 3.1. The first thing is to parse the text messages behind the QR code just like wechat scanning
    • 3.2. Get short video publishing ID after , Calling the backend short video details api Interface
    • 3.3. After calling the interface , There are short video information to video processing for short video details ( It's just a preview of a short video ), The principle is the same as that of the search page .
Two 、、 Appreciation of works
2.1. Short video QR code

 Insert picture description here
 Insert picture description here

2.2. Wechat scanning

 Insert picture description here

2.3. Tiktok scanning

 Insert picture description here
 Insert picture description here

原网站

版权声明
本文为[gblfy]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/177/202206261849242095.html