| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125 |
- // pages/mine/mine.ts
- import Dialog from '@vant/weapp/dialog/dialog';
- Page({
- /**
- * 页面的初始数据
- */
- data: {
- // 功能菜单项
- menulists: [{id: 1, title: '我的库存', img: 'medal', path: '/mMine/pages/myinventorys/list/list'},
- {id: 2, title: "我的订单", img: 'invitation', path: '/mMine/pages/myorders/list/list'},
- {id: 3, title: '我的履约', img: 'underway', path: '/mMine/pages/myperformance/list/list'},
- {id: 4, title: '我的出境', img: 'hot', path: '/mHome/pages/inspection/list/list'},
- {id: 5, title: '我的保税', img: 'fire-o', path: '/mHome/pages/bond/list/list'}],
- // 列表菜单项
- tablelists: [{id: 1, title: '签约账户', path: '/mMine/pages/bank/bankh'},
- {id: 2, title: '收货地址', path: '/mMine/pages/address/list/list'},
- {id: 3, title: '发票信息', path: '/mMine/pages/invoice/list/list'},
- {id: 4, title: '账户安全', path: ''},
- {id: 5, title: '关于我们', path: '/mMine/pages/about/about/about'}],
- /// 微信头像
- avatarUrl: "",
- /// 微信昵称
- nickName: ""
- },
- /**
- * 进入系统设置
- */
- goToSettings() {
- wx.navigateTo({
- url: '/mMine/pages/settings/settings'
- })
- },
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad() {
- /// 获取微信头像
- let url = wx.getStorageSync('avatarUrl')
- if (url) {
- this.setData({
- avatarUrl: url
- })
- }
- },
- /**
- * 系统登出响应
- */
- onLoginOut() {
- Dialog.confirm({
- title: '提示',
- message: '确定要退出系统吗?',
- }).then(() => {
- /// 清楚所有的缓存数据
- wx.clearStorage()
- /// loding....
- wx.showLoading({
- title: '登出中....'
- })
- /// 登出
- setTimeout(function () {
- wx.hideLoading()
- // on confirm
- wx.reLaunch({ url: '/pages/login/login' })
- }, 2000)
- }).catch(() => {
- // on cancel
- });
- },
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady() {
-
- },
- /**
- * 生命周期函数--监听页面显示
- */
- onShow() {
- this.getTabBar().init()
- },
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide() {
- },
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload() {
- },
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh() {
- },
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom() {
- },
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage() {
- }
- })
|