| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- import {
- imgServerUrl
- } from '../../config/config.js'
- import {
- showToast
- } from '../../utils/tips.js'
- Page({
- /**
- * 页面的初始数据
- */
- data: {
- imgServerUrl: imgServerUrl,
- },
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad: function(options) {
- },
- toclear() {
- wx.showModal({
- title: '清除缓存',
- content: '是否清除所有缓存内容',
- success(res) {
- if (res.confirm) {
- try {
- wx.clearStorage()
- wx.clearStorageSync()
- showToast('清除成功')
- } catch (e) {
- // Do something when catch error
- }
- } else if (res.cancel) {
- console.log('用户点击取消')
- }
- }
- })
- },
- toabout() {
- wx.navigateTo({
- url: '../about/index',
- })
- },
- login_out() {
- wx.showModal({
- title: '提示',
- content: '确定退出登录吗?',
- success: function(res) {
- if (res.confirm) {
- //清除登录缓存
- wx.removeStorageSync("user_id");
- wx.removeStorageSync("member_id");
- wx.removeStorageSync("user_token");
- } else if (res.cancel) {
- }
- }
- })
- }
- })
|