lll
liukangdong
2024-08-05 2da083225417ef7007842b84e7276242faeb0e35
wechat_jiaxuan/pages/sets/index.js
@@ -2,14 +2,17 @@
  wxLogOff,
  wxLoginCustomer
} from '../../api/index'
import { eventBus } from '../../utils/eventBus'
import {
  eventBus
} from '../../utils/eventBus'
Page({
  /**
   * 页面的初始数据
   */
  data: {
    show: false
    show: false,
    showLogout: false
  },
  /**
@@ -32,9 +35,18 @@
    let that = this
    wxLogOff().then(res => {
      wx.clearStorage()
      wx.showToast({
        title: '注销成功',
      })
      that.setData({
        showLogout: true
      })
    })
  },
  appClose() {
      wx.login({
        timeout: 5000,
        success(res) {
      success: (res) => {
          if (res.code) {
            //发起网络请求
            wxLoginCustomer({
@@ -44,8 +56,8 @@
              if (res && res.data.token) {
                wx.setStorageSync('sessionKey', res.data.sessionKey)
                wx.setStorageSync('token', res.data.token)
                wx.showToast({
                  title: '注销成功',
              this.setData({
                showLogout: false
                })
                setTimeout(() => {
                  eventBus.emit("reloadHome")
@@ -69,7 +81,6 @@
            url: '/pages/index/index',
          })
        }
      })
    })
  },
  changeDeal(e) {