diff --git a/pages.json b/pages.json
index 31eb97f..8e4147a 100644
--- a/pages.json
+++ b/pages.json
@@ -172,17 +172,17 @@
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
+ }, {
+ "path": "pages/my/edit/edit",
+ "style": {
+ "navigationBarTitleText": "修改个人信息",
+ "navigationBarTextStyle": "white",
+ "navigationBarBackgroundColor": "#339967",
+ "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
index f448e44..fa9a520 100644
--- a/pages/my/edit/edit.vue
+++ b/pages/my/edit/edit.vue
@@ -1,69 +1,146 @@
-
+
-
+
+
+
+
+
+
+
+
+ 提交
-
+
+
+ .u-button {
+ width: 644rpx !important;
+ height: 86rpx !important;
+ background: #0EBB5B;
+ border-radius: 20rpx !important;
+ }
+
\ No newline at end of file
diff --git a/pages/my/my.vue b/pages/my/my.vue
index bbb5e5d..81bd79b 100644
--- a/pages/my/my.vue
+++ b/pages/my/my.vue
@@ -7,8 +7,10 @@
{{username}}
- 账号:{{account}}
-
+ 账号:{{account}}
+
+
+
@@ -43,8 +45,8 @@
data() {
return {
src: 'https://cdn.uviewui.com/uview/album/2.jpg',
- account: '',
- username: '',
+ account: '123',
+ username: '用户名',
isLoad: true
}
},
@@ -54,8 +56,9 @@
return
}
this.isLoad = true
- this.$data.account = wx.getStorageSync('account')
- this.$data.username = wx.getStorageSync('nickname')
+ // this.$data.account = wx.getStorageSync('account')
+ // this.$data.username = wx.getStorageSync('nickname')
+ this.getInfo()
},
methods: {
reOnLoad() {
@@ -86,17 +89,22 @@
url: '/pages/Partnerships/Partnerships'
})
},
- toEdit(){
+ toEdit() {
uni.navigateTo({
- url:'/pages/my/edit/edit'
+ url: '/pages/my/edit/edit'
+ })
+ },
+ //---------页面调用接口示例------------
+ getInfo() {
+ this.$api.getUser().then(res => {
+ console.log('userInfo', res);
+ var data = res.data.data
+ if (data) {
+ this.src = uni.getStorageSync('img_url') + data.avatar
+ this.username = data.nickname
+ }
})
}
- //---------页面调用接口示例------------
- // getInfo() {
- // this.$api.getUserInfo().then(res => {
- // console.log('userInfo', res);
- // })
- // }
}
}
@@ -134,9 +142,8 @@
font-weight: 1rpx;
display: flex;
}
- .edit-icon{
-
- }
+
+ .edit-icon {}
}
\ No newline at end of file
diff --git a/service/request.js b/service/request.js
index a83e178..b1d58ab 100644
--- a/service/request.js
+++ b/service/request.js
@@ -130,7 +130,7 @@ const apiService = {
serverHost,
imgUrl: 'https://spsp.feashow.com/',
key: 'ZRKBZ-Q7FWL-GVZPK-MCRBU-4XFB5-ATBDB',
- uploadImgUrl: serverHost + `/upload/image/`,
+ uploadImgUrl: serverHost + '/upload/image/',
//登录接口
login(data) {
const url = '/login/mnpLogin'
@@ -211,27 +211,34 @@ const apiService = {
resolve(service.get(url))
})
},
+ //获取个人信息
+ getUser() {
+ const url = '/center/userinfo'
+ return new Promise((resolve, reject) => {
+ resolve(service.get(url))
+ })
+ },
//修改个人信息
- editPersonInfo(data){
+ editPersonInfo(data) {
const url = `center/userupdate`
- return new Promise((resolve,reject) => {
- resolve(service.putWithFormData(url,data))
+ return new Promise((resolve, reject) => {
+ resolve(service.post(url, data))
})
},
//获取我的匹配
- getMyMatch(){
+ getMyMatch() {
const url = `/center/match/`
- return new Promise((resolve,reject) => {
+ return new Promise((resolve, reject) => {
resolve(service.get(url))
})
},
//获取行业和业态
- getClassList(pid){
+ getClassList(pid) {
const url = `/home/classlist/?pid=${pid}`
- return new Promise((resolve,reject) => {
+ return new Promise((resolve, reject) => {
resolve(service.post(url))
})
- }
+ },
}
export {
apiService,