仓库地址修改
This commit is contained in:
@@ -1,54 +0,0 @@
|
||||
const app = getApp()
|
||||
Page({
|
||||
data: {
|
||||
spinShow: false,
|
||||
info: {}
|
||||
},
|
||||
|
||||
onLoad: function(options) {
|
||||
this.loadUserInfo()
|
||||
},
|
||||
loadUserInfo() {
|
||||
let _this = this
|
||||
_this.setData({
|
||||
spinShow: true
|
||||
});
|
||||
app.formPost('/api/wx/student/user/current', null).then(res => {
|
||||
if (res.code == 1) {
|
||||
_this.setData({
|
||||
info: res.response
|
||||
});
|
||||
}
|
||||
_this.setData({
|
||||
spinShow: false
|
||||
});
|
||||
}).catch(e => {
|
||||
_this.setData({
|
||||
spinShow: false
|
||||
});
|
||||
app.message(e, 'error')
|
||||
})
|
||||
},
|
||||
logOut() {
|
||||
let _this = this
|
||||
_this.setData({
|
||||
spinShow: true
|
||||
});
|
||||
app.formPost('/api/wx/student/auth/unBind', null).then(res => {
|
||||
if (res.code == 1) {
|
||||
wx.setStorageSync('token', '')
|
||||
wx.reLaunch({
|
||||
url: '/pages/user/bind/index',
|
||||
});
|
||||
}
|
||||
_this.setData({
|
||||
spinShow: false
|
||||
});
|
||||
}).catch(e => {
|
||||
_this.setData({
|
||||
spinShow: false
|
||||
});
|
||||
app.message(e, 'error')
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"i-cell-group": "/component/iView/cell-group/index",
|
||||
"i-cell": "/component/iView/cell/index",
|
||||
"i-icon": "/component/iView/icon/index",
|
||||
"i-message": "/component/iView/message/index",
|
||||
"i-spin": "/component/iView/spin/index"
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
<view class="userinfo">
|
||||
<block>
|
||||
<image class="userinfo-avatar" src="{{info.imagePath}}"></image>
|
||||
<text class="userinfo-nickname">{{info.userName}}</text>
|
||||
</block>
|
||||
</view>
|
||||
<view>
|
||||
<i-cell-group i-class="my-group-margin">
|
||||
<i-cell title="个人资料" is-link url="/pages/my/info/index">
|
||||
<i-icon type="mine_fill" slot="icon" size="20" />
|
||||
</i-cell>
|
||||
<i-cell title="个人动态" is-link url="/pages/my/log/index">
|
||||
<i-icon type="collection_fill" slot="icon" size="20" />
|
||||
</i-cell>
|
||||
<i-cell title="消息" is-link url="/pages/my/message/list/index">
|
||||
<i-icon type="message_fill" slot="icon" size="20" />
|
||||
</i-cell>
|
||||
</i-cell-group>
|
||||
</view>
|
||||
|
||||
<view>
|
||||
<i-cell-group i-class="my-group-margin">
|
||||
<i-cell title="设置" is-link url="/pages/dashboard/index">
|
||||
<i-icon type="setup_fill" slot="icon" size="20" />
|
||||
</i-cell>
|
||||
<i-cell title="反馈" is-link url="/pages/dashboard/index">
|
||||
<i-icon type="praise_fill" slot="icon" size="20" />
|
||||
</i-cell>
|
||||
<i-cell title="关于" is-link url="/pages/dashboard/index">
|
||||
<i-icon type="prompt_fill" slot="icon" size="20" />
|
||||
</i-cell>
|
||||
</i-cell-group>
|
||||
</view>
|
||||
|
||||
<view>
|
||||
<i-cell-group i-class="my-group-margin">
|
||||
<i-cell title="退出账号" bind:click="logOut">
|
||||
<i-icon type="flashlight_fill" slot="icon" size="20" />
|
||||
</i-cell>
|
||||
</i-cell-group>
|
||||
</view>
|
||||
|
||||
<view class="copyright">武汉思维跳跃科技有限公司 提供技术支持</view>
|
||||
|
||||
<i-spin size="large" fix wx:if="{{ spinShow }}"></i-spin>
|
||||
<i-message id="message" />
|
||||
@@ -1,32 +0,0 @@
|
||||
/**index.wxss**/
|
||||
|
||||
.userinfo {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
background: #598ce4;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
.userinfo-avatar {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
margin-left: 30px;
|
||||
}
|
||||
|
||||
.userinfo-nickname {
|
||||
color: white;
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
|
||||
.my-group-margin{
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.copyright{
|
||||
color: #8c8c8c;
|
||||
text-align: center;
|
||||
margin-top: 20px;
|
||||
font-size: 14px;
|
||||
}
|
||||
Reference in New Issue
Block a user