12345678910111213141516171819202122232425262728293031323334353637383940 |
- // pages/user/setting/index.js
- const {
- globalData: {
- util: {
- regeneratorRuntime,
- goHome,
- showTip,
- logout
- }
- }
- } = getApp()
- Page({
- data: {
- list: {
- title: '分享小程序',
- icon: 'fenxiang',
- url: '',
- },
- },
- logout() {
- wx.showModal({
- content: '确定退出登录?',
- success: async ({ confirm }) => {
- if (!confirm) return
- logout()
- await goHome()
- showTip('已退出')
- }
- })
- },
- preview: function () {
- wx.previewImage({
- urls: ['http://img.mp.itc.cn/upload/20160428/b52be3dc215d4ecd844bf922be46f278_th.jpg'],
- })
- }
- })
|