当前位置:网站首页>Wechat applet exits the applet (navigator and api--wx.exitminiprogram)
Wechat applet exits the applet (navigator and api--wx.exitminiprogram)
2022-06-26 04:41:00 【Chu Junjun】
demand :
In the wechat applet , Click on “ Cancel ” To exit the applet , Return to the wechat chat interface
effect :

step :
Method 1 :
Use it directly uni-app The components of ——navigator, Modify the parameters open-type="exit" target="miniProgram" that will do
( immediate withdrawal , No other action is required )
<navigator open-type="exit" target="miniProgram" > Cancel </navigator> Method 2 :
Use wechat applet API--wx.exitMiniProgram
( For exit , Clear cache and other operations )
Set click event :
<view @click="exitApplet()"> Cancel </view>Set up api( stay success Function can be written to exit the applet , What to do )
// Exit applet
exitApplet() {
wx.exitMiniProgram({
success: function () {
postCancelLogin({unique_id:this.unique_id}).then((res => {
uni.removeStorageSync('iv'); // Clear cache
uni.removeStorageSync('encryptedData');
}))
}
})
}
边栏推荐
- Numpy random number
- Rsync common error messages (common errors on the window)
- Tp6 is easy to tread [original]
- Database design (3): database maintenance and optimization
- 2021-01-31
- PHP installation SSH2 extension
- BACK-OFF RESTARTING FAILED CONTAINER 的解决方法
- [H5 development] 03- take you hand in hand to improve H5 development - single submission vs batch submission with a common interface
- PHP small factory moves bricks for three years - interview series - my programming life
- Laravel uses phpword to generate word documents
猜你喜欢

1.12 learning summary
![Tp6 is easy to tread [original]](/img/e9/4b2fbd485387c5ed9e75bd0451a19c.jpg)
Tp6 is easy to tread [original]

MySQL index details

Physical design of database design (2)

Gateway can not connect to tcp://127.0.0.1: Connection refused

2022.1.24
![Fastadmin always prompts sqlstate[23000]: integrity constraint violation: 1052 column 'ID' in order clause is am](/img/71/ed3b2ca9e6d4afd2dae3c601b3a75b.jpg)
Fastadmin always prompts sqlstate[23000]: integrity constraint violation: 1052 column 'ID' in order clause is am

Thinkphp6 implements a simple lottery system

SixTool-多功能多合一代挂助手源码

How can the intelligent transformation path of manufacturing enterprises be broken due to talent shortage and high cost?
随机推荐
Gateway can not connect to tcp://127.0.0.1: Connection refused
1.17 learning summary
Comment enregistrer une image dans une applet Wechat
Oracle data pump table
Mysql8.0 configuring my SQL in INI file_ mode=NO_ AUTO_ CREATE_ User can start
Text horizontal alignment attribute text align and element vertical alignment attribute vertical align
Is education important or ability important in software testing
Introduction to markdown grammar
微信小程序保存图片的方法
排序查询
Multipass中文文档-远程使用Multipass
Solution to composer error could not find package
Oracle 數據泵導錶
SSH password free login, my server password free login to the other server, the other server password free login to your server
微信小程序保存圖片的方法
2022.2.15
1.20 learning summary
Install cenos in the virtual machine
Alipay failed to verify the signature (sandbox test indicates fishing risk?) [original]
Oracle 数据泵导表