SilenceLeo 2 lat temu
rodzic
commit
842e9c84bd
2 zmienionych plików z 7 dodań i 1 usunięć
  1. 1 0
      src/pages/my/edit.vue
  2. 6 1
      src/pages/my/my.vue

+ 1 - 0
src/pages/my/edit.vue

@@ -53,6 +53,7 @@ export default {
   },
   },
   onLoad(data) {
   onLoad(data) {
     this.type = data.type || "";
     this.type = data.type || "";
+    this.text = data.text || "";
   },
   },
   async onShow() {
   async onShow() {
     this.userInfo = await login.getUserInfo();
     this.userInfo = await login.getUserInfo();

+ 6 - 1
src/pages/my/my.vue

@@ -13,7 +13,12 @@
           <image class="avatar" :src="userInfo.avatar" mode=""></image>
           <image class="avatar" :src="userInfo.avatar" mode=""></image>
         </button>
         </button>
         <view class="user-body">
         <view class="user-body">
-          <navigator class="user-name" url="/pages/my/edit?type=nickname">
+          <navigator
+            class="user-name"
+            :url="`/pages/my/edit?type=nickname&text=${
+              userInfo.nickname || ''
+            }`"
+          >
             {{ userInfo.nickname }}
             {{ userInfo.nickname }}
           </navigator>
           </navigator>
           <!-- <text class="user-id" @click="handleCopyId"
           <!-- <text class="user-id" @click="handleCopyId"