123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171 |
- // pages/my/index.js
- const app = getApp()
- Page({
- /**
- * 页面的初始数据
- */
- data: {
- nvabarData: {
- showCapsule: 1, //是否显示左上角图标,消息中心 1表示显示 0表示不显示
- showBack: 0, //返回
- title: '我的', //导航栏 中间的标题
- // 此页面 页面内容距最顶部的距离
- height: app.globalData.height * 2 + 20,
- },
- active: 4,
- icon: {
- normal: '/pages/images/home.png',
- active: '/pages/images/home_fill.png',
- bankNormal: '/pages/images/duijie.png',
- bankActive: '/pages/images/duijie_fill.png',
- marketNormal: '/pages/images/recharge.png',
- marketActive: '/pages/images/recharge_fill.png',
- policyNormal: '/pages/images/news_hot.png',
- policyActive: '/pages/images/news_hot_fill.png',
- myNormal: '/pages/images/people.png',
- myActive: '/pages/images/people_fill.png',
- myicon1:'/pages/images/my_icon1.png',
- myicon2:'/pages/images/my_icon2.png',
- myicon3:'/pages/images/my_icon3.png',
- myicon4:'/pages/images/my_icon4.png'
- },
- },
- // 切换菜单
- onChange(event) {
- this.setData({
- active: event.detail
- });
- if (event.detail == 0) {
- wx.redirectTo({
- url: '/pages/home/index'
- })
- } else if (event.detail == 1) {
- wx.redirectTo({
- url: '/pages/bank/index'
- })
- } else if (event.detail == 2) {
- wx.redirectTo({
- url: '/pages/market/index'
- })
- } else if (event.detail == 3) {
- wx.redirectTo({
- url: '/pages/policy/index'
- })
- } else if (event.detail == 4) {
- wx.redirectTo({
- url: '/pages/my/index'
- })
- }
- },
- // 企业认证
- onattestation: function () {
- wx.navigateTo({
- url: '/pages/attestation/index'
- })
- },
- onAboutMe: function () {
- wx.navigateTo({
- url: '/pages/aboutme/index'
- })
- },
- // 我的融资
- myFinanceBtn: function () {
- wx.navigateTo({
- url: '/pages/myFinance/index'
- })
- },
- //贷款产品
- myloanprojuct: function () {
- wx.navigateTo({
- url: '/pages/myloanprojuct/index'
- })
- },
- // 密码修改
- onUpdatePass: function () {
- wx.navigateTo({
- url: '/pages/updatePassword/index'
- })
- },
- // 退出登录
- onGoout: function () {
- wx.removeStorage({
- key: 'user',
- success: function (res) {
- wx.showToast({
- title: '退出成功',
- icon: 'none',
- duration: 1500
- })
- },
- })
- wx.clearStorage()
- wx.navigateTo({
- url: '/pages/login/index'
- })
- },
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad: function (options) {
- if (wx.getStorageSync('user') == "") {
- wx.redirectTo({
- url: '/pages/login/index'
- })
- } else {
- // wx.redirectTo({
- // url: '/pages/my/index'
- // })
- }
- },
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady: function () {
- },
- /**
- * 生命周期函数--监听页面显示
- */
- onShow: function () {
- },
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide: function () {
- },
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload: function () {
- },
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh: function () {
- },
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom: function () {
- },
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage: function () {
- }
- })
|