diff --git a/packageA/my/person-detail.vue b/packageA/my/person-detail.vue
index 79a5716..0a1da48 100644
--- a/packageA/my/person-detail.vue
+++ b/packageA/my/person-detail.vue
@@ -17,9 +17,10 @@
昵称设置
-
-
+
+
+ {{niName}}
@@ -61,8 +62,8 @@
- 退出账号
- 保存
+ 退出账号
+
-
+
@@ -257,6 +258,11 @@
url: '/packageB/card/index'
})
},
+ toName(){
+ uni.navigateTo({
+ url: '/packageB/names/index'
+ })
+ },
getSfInfo() {
uni.$u.http.get('/api/school.real_name/info').then(res => {
console.log(res);
@@ -283,9 +289,20 @@
// birthday: this.birthday,
// realname: this.realname,
// gender: this.gender == '男' ? '1' : '0',
- update_fields: ['nickname', 'birthday', 'realname', 'gender', 'work', 'avatar']
+ update_fields: [
+ 'nickname',
+ // 'birthday',
+ // 'realname',
+ // 'gender',
+ // 'work',
+ 'avatar'
+ ]
}).then(res => {
if (res.code == 1) {
+ uni.setStorageSync('userInfo', {
+ ...uni.getStorageSync('userInfo'),
+ avatar: avatar
+ });
this.getDetail()
this.$refs.uToast.show({
type: 'success',
@@ -402,6 +419,7 @@
that.avatar = group.data.fullurl
console.log(group.data)
console.log(that.avata)
+ that.submit();
}
});
}
diff --git a/packageB/names/index.vue b/packageB/names/index.vue
new file mode 100644
index 0000000..2e3f631
--- /dev/null
+++ b/packageB/names/index.vue
@@ -0,0 +1,111 @@
+
+
+
+
+
+
+
+
+
+ 保存
+
+
+
+
+
+
diff --git a/pages.json b/pages.json
index f4ef68a..8e3a9db 100644
--- a/pages.json
+++ b/pages.json
@@ -78,7 +78,8 @@
}
],
- "subPackages": [{
+ "subPackages": [
+ {
"root": "packageA",
"pages": [{
"path": "afterSales/index",
@@ -309,7 +310,13 @@
},
{
"root": "packageB",
- "pages": [{
+ "pages": [
+ {
+ "path": "names/index",
+ "style": {
+ "navigationBarTitleText": "昵称修改"
+ }
+ },{
"path": "wallet/index",
"style": {
"navigationBarTitleText": "我的钱包"
diff --git a/pages/my/index.vue b/pages/my/index.vue
index f6995e4..6cdcc20 100644
--- a/pages/my/index.vue
+++ b/pages/my/index.vue
@@ -5,9 +5,9 @@
class="con-center flex flex-start flex-column">