// 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){
          wx.clearStorageSync()
          wx.reLaunch({
            url: '/pages/login/login',
          })
        }
      }

    })

  },
  preview: function () {
    wx.previewImage({
      urls: ['http://dgt.dgtis.com/oneportal//fileServer/head_image/201911061454581573023298346.png'],
    })
  }
})