Merge pull request 'lh' (#50) from lh into master
Reviewed-on: http://git.feashow.cn/odjbin/city-store-transfer/pulls/50
This commit is contained in:
@@ -17,7 +17,9 @@
|
||||
"delay" : 0
|
||||
},
|
||||
/* 模块配置 */
|
||||
"modules": {},
|
||||
"modules" : {
|
||||
"OAuth" : {}
|
||||
},
|
||||
/* 应用发布信息 */
|
||||
"distribute" : {
|
||||
/* android打包配置 */
|
||||
@@ -43,7 +45,14 @@
|
||||
/* ios打包配置 */
|
||||
"ios" : {},
|
||||
/* SDK配置 */
|
||||
"sdkConfigs": {}
|
||||
"sdkConfigs" : {
|
||||
"oauth" : {
|
||||
"weixin" : {
|
||||
"appid" : "wxda178d12ae834c45",
|
||||
"UniversalLinks" : ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
/* 快应用特有相关 */
|
||||
|
||||
@@ -163,6 +163,15 @@
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}
|
||||
,{
|
||||
"path" : "pages/my/edit/edit",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "修改个人信息",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}
|
||||
],
|
||||
"tabBar": {
|
||||
"color": "#CCCCCC",
|
||||
|
||||
66
pages/my/edit/edit.vue
Normal file
66
pages/my/edit/edit.vue
Normal file
@@ -0,0 +1,66 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="avatar">
|
||||
<u-avatar @click="changeAvatar()" :src="avatar"></u-avatar>
|
||||
</view>
|
||||
<view class="name-edit">
|
||||
<text>用户名:</text>
|
||||
<u-input border="surround" v-model="username"></u-input>
|
||||
</view>
|
||||
<view class="send">
|
||||
<u-button @click="editInfo" color="linear-gradient(to right, #E86262, #CC3333)">提交</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
username:'',
|
||||
avatar:''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
changeAvatar(){
|
||||
// uni.uploadFile()
|
||||
console.log(111);
|
||||
},
|
||||
editInfo(){
|
||||
this.$api.editPersonInfo({
|
||||
nickname:this.$data.nickname,
|
||||
avatar:this.$data.avatar,
|
||||
Headers:wx.getStorageSync('token')
|
||||
}).then(res => {
|
||||
console.log(res);
|
||||
})
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
let that = this
|
||||
this.$data.username = wx.getStorageSync('nickname')
|
||||
this.$data.avatar = wx.getStorageSync('avatar')
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.avatar{
|
||||
width: 100%;
|
||||
height: 200rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.name-edit{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
.send{
|
||||
width: 50%;
|
||||
transform: translateX(50%) translateY(50%);
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -7,7 +7,8 @@
|
||||
<u-avatar :src="src"></u-avatar>
|
||||
</view>
|
||||
<view class="username">{{username}}</view>
|
||||
<view class="account">账号:{{account}}</view>
|
||||
<view class="account">账号:{{account}} <u-icon name="edit-pen" class="edit-icon" size="20" @click="toEdit"></u-icon></view>
|
||||
|
||||
</view>
|
||||
<view class="publish">
|
||||
<u-cell-group>
|
||||
@@ -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() {
|
||||
@@ -82,6 +85,11 @@
|
||||
uni.navigateTo({
|
||||
url: '/pages/Partnerships/Partnerships'
|
||||
})
|
||||
},
|
||||
toEdit(){
|
||||
uni.navigateTo({
|
||||
url:'/pages/my/edit/edit'
|
||||
})
|
||||
}
|
||||
//---------页面调用接口示例------------
|
||||
// getInfo() {
|
||||
@@ -124,6 +132,10 @@
|
||||
.account {
|
||||
font-size: 15px;
|
||||
font-weight: 1rpx;
|
||||
display: flex;
|
||||
}
|
||||
.edit-icon{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -202,6 +202,12 @@ const apiService = {
|
||||
return new Promise((resolve, reject) => {
|
||||
resolve(service.get(url))
|
||||
})
|
||||
},
|
||||
editPersonInfo(data){
|
||||
const url = `/center/userupdate`
|
||||
return new Promise((resolve,reject) => {
|
||||
resolve(service.post(url,data))
|
||||
})
|
||||
}
|
||||
}
|
||||
export {
|
||||
|
||||
Reference in New Issue
Block a user