初始化
This commit is contained in:
81
pages/mycenter/index.js
Normal file
81
pages/mycenter/index.js
Normal file
@@ -0,0 +1,81 @@
|
||||
// pages/mycenter/index.js
|
||||
const app = getApp()
|
||||
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
userInfo: null,
|
||||
},
|
||||
//退出登录
|
||||
LoginOut(){
|
||||
wx.removeStorage({
|
||||
key: 'xiaoxi_token',
|
||||
success (res) {
|
||||
wx.reLaunch({
|
||||
url: "../login/login",
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
this.setData({
|
||||
userInfo: app.globalData.userinfo,
|
||||
autho: app.globalData.autho
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
||||
3
pages/mycenter/index.json
Normal file
3
pages/mycenter/index.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
33
pages/mycenter/index.wxml
Normal file
33
pages/mycenter/index.wxml
Normal file
@@ -0,0 +1,33 @@
|
||||
<!--pages/mycenter/index.wxml-->
|
||||
<cu-custom bgColor="bg-gradual-blue">
|
||||
<view slot="content">个人中心</view>
|
||||
</cu-custom>
|
||||
<view class="padding-sm bg-white radius shadow shadow-lg" >
|
||||
<!-- 用户头像系列 -->
|
||||
<view class="flex padding flex-wrap" style="width:100%">
|
||||
<view class="flex align-center justify-center text-center" style="width:100%">
|
||||
<view class="cu-avatar round xl" style="background-image:url({{userInfo.HeadImg}})"></view>
|
||||
</view>
|
||||
<view class="text-lg text-center padding-sm text-green" style="width:100%">{{userInfo.Uid}}</view>
|
||||
</view>
|
||||
<!-- 功能区域 -->
|
||||
<view class="padding-xl">
|
||||
<form>
|
||||
<view class="cu-form-group ">
|
||||
<view class="flex justify-between" style="width:100%">
|
||||
<view class="text-df">我的反馈</view>
|
||||
<view class="cu-capsule round">
|
||||
<view class='cu-tag bg-red light'>{{userInfo.error.length || 0}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group ">
|
||||
<view class="flex justify-between" bindtap="LoginOut" style="width:100%">
|
||||
<view class="text-df">退出登录</view>
|
||||
</view>
|
||||
</view>
|
||||
</form>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
0
pages/mycenter/index.wxss
Normal file
0
pages/mycenter/index.wxss
Normal file
Reference in New Issue
Block a user