Quellcode durchsuchen

返回上一级

lmc vor 2 Jahren
Ursprung
Commit
e47f27317b
1 geänderte Dateien mit 11 neuen und 4 gelöschten Zeilen
  1. 11 4
      src/views/userInfo.vue

+ 11 - 4
src/views/userInfo.vue

@@ -1,19 +1,23 @@
 <template>
   <van-nav-bar :title="title">
     <template #left>
-      <van-icon :name="require('@/assets/arrow-left.svg')" size="24" />
+      <van-icon
+        :name="require('@/assets/arrow-left.svg')"
+        size="24"
+        @click="backPath"
+      />
     </template>
   </van-nav-bar>
   <div class="page_info">
     <div class="info_user">
-      <template v-if="source == 'password'">
+      <template v-if="source == 'account'">
         <van-cell-group>
           <van-cell title="账号名称" :value="dataForm.username" />
           <van-cell title="手机号码" :value="dataForm.tel" />
           <van-cell title="账号密码" :value="dataForm.password" />
         </van-cell-group>
       </template>
-      <template v-if="source == 'account'">
+      <template v-if="source == 'password'">
         <van-form input-align="right" @submit="onSubmit">
           <van-cell-group>
             <van-field
@@ -59,7 +63,7 @@
         </van-form>
       </template>
     </div>
-    <template v-if="source == 'password'">
+    <template v-if="source == 'account'">
       <van-button
         style="margin-top: 40px; border-radius: 0"
         block
@@ -120,6 +124,9 @@ export default {
       }, 2000);
     },
     loginOut() {},
+    backPath() {
+      this.$router.back();
+    },
   },
 };
 </script>