diff --git a/pages.json b/pages.json index 0840704..db52186 100644 --- a/pages.json +++ b/pages.json @@ -163,7 +163,16 @@ "enablePullDownRefresh": false } } - ], + ,{ + "path" : "pages/my/edit/edit", + "style" : + { + "navigationBarTitleText": "修改个人信息", + "enablePullDownRefresh": false + } + + } + ], "tabBar": { "color": "#CCCCCC", "borderStyle": "white", diff --git a/pages/my/edit/edit.vue b/pages/my/edit/edit.vue new file mode 100644 index 0000000..91a2580 --- /dev/null +++ b/pages/my/edit/edit.vue @@ -0,0 +1,66 @@ + + + + + diff --git a/pages/my/my.vue b/pages/my/my.vue index 34a86c9..bbb5e5d 100644 --- a/pages/my/my.vue +++ b/pages/my/my.vue @@ -7,7 +7,8 @@ {{username}} - 账号:{{account}} + 账号:{{account}} + @@ -42,8 +43,8 @@ data() { return { src: 'https://cdn.uviewui.com/uview/album/2.jpg', - account: '123456', - username: '用户名', + account: '', + username: '', isLoad: true } }, @@ -53,6 +54,8 @@ return } this.isLoad = true + this.$data.account = wx.getStorageSync('account') + this.$data.username = wx.getStorageSync('nickname') }, methods: { reOnLoad() { @@ -83,7 +86,17 @@ url: '/pages/Partnerships/Partnerships' }) }, - + toEdit(){ + uni.navigateTo({ + url:'/pages/my/edit/edit' + }) + } + //---------页面调用接口示例------------ + // getInfo() { + // this.$api.getUserInfo().then(res => { + // console.log('userInfo', res); + // }) + // } } } @@ -119,6 +132,10 @@ .account { font-size: 15px; font-weight: 1rpx; + display: flex; + } + .edit-icon{ + } } diff --git a/service/request.js b/service/request.js index cfd617f..d6094e0 100644 --- a/service/request.js +++ b/service/request.js @@ -213,6 +213,12 @@ const apiService = { resolve(service.get(url)) >>>>>>> remotes/origin/master }) + }, + editPersonInfo(data){ + const url = `/center/userupdate` + return new Promise((resolve,reject) => { + resolve(service.post(url,data)) + }) } } export {