瀏覽代碼

feat: update

SilenceLeo 2 年之前
父節點
當前提交
842e9c84bd
共有 2 個文件被更改,包括 7 次插入1 次删除
  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) {
     this.type = data.type || "";
+    this.text = data.text || "";
   },
   async onShow() {
     this.userInfo = await login.getUserInfo();

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

@@ -13,7 +13,12 @@
           <image class="avatar" :src="userInfo.avatar" mode=""></image>
         </button>
         <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 }}
           </navigator>
           <!-- <text class="user-id" @click="handleCopyId"