panhui 4 лет назад
Родитель
Сommit
7433a7d5c8

+ 3 - 3
src/main/nine-space/src/router/index.js

@@ -87,9 +87,9 @@ const routes = [
     },
   },
   {
-    path: "/changePsd",
-    name: "changePsd",
-    component: () => import("../views/account/ChangePsd.vue"),
+    path: "/changePhone",
+    name: "changePhone",
+    component: () => import("../views/account/ChangePhone.vue"),
     meta: {
       title: "修改密码",
     },

+ 17 - 38
src/main/nine-space/src/views/account/ChangePsd.vue → src/main/nine-space/src/views/account/ChangePhone.vue

@@ -1,17 +1,18 @@
 <template>
   <div class="login">
     <div class="tabs">
-      <div class="tab active">设置新密码</div>
+      <div class="tab active">修改手机号</div>
+      <div class="text">修改手机号即同时修改登录账户名称</div>
     </div>
 
-    <van-form @submit="submit">
+    <van-form ref="form" @submit="submit">
       <van-field
         type="tel"
         name="用户名"
-        placeholder="请输入用户名"
+        placeholder="请输入手机号"
         v-model="form.phone"
         :maxlength="11"
-        :rules="[{ required: true, message: '请填写用户名' }]"
+        :rules="[{ required: true, message: '请输入手机号' }]"
       >
         <template #left-icon>
           <img
@@ -42,36 +43,6 @@
         </template>
       </van-field>
 
-      <van-field
-        type="password"
-        name="密码"
-        placeholder="请输入密码"
-        v-model="form.password"
-        :rules="[{ required: true, message: '请填写密码' }]"
-      >
-        <template #left-icon>
-          <img
-            :src="require('../../assets/svgs/login_icon_mima.svg')"
-            class="icon"
-          />
-        </template>
-      </van-field>
-
-      <van-field
-        type="password"
-        name="密码"
-        placeholder="请再次输入密码"
-        v-model="form.password2"
-        :rules="[{ required: true, message: '请再次填写密码' }]"
-      >
-        <template #left-icon>
-          <img
-            :src="require('../../assets/svgs/login_icon_mima.svg')"
-            class="icon"
-          />
-        </template>
-      </van-field>
-
       <div class="button">
         <van-button
           round
@@ -117,13 +88,14 @@ export default {
 
 <style lang="less" scoped>
 .login {
-  padding: 40px 50px 100px;
+  padding: 40px 16px 100px;
+}
+
+.van-form {
+  padding: 0 32px;
 }
 
 .tabs {
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
   .tab {
     font-size: 18px;
     color: #c8c9cc;
@@ -136,6 +108,13 @@ export default {
       line-height: 33px;
     }
   }
+
+  .text {
+    font-size: 12px;
+    color: #939599;
+    line-height: 22px;
+    margin-top: 4px;
+  }
 }
 
 .icon {

+ 2 - 2
src/main/nine-space/src/views/account/Security.vue

@@ -2,9 +2,9 @@
   <div class="page">
     <div class="title">账户与安全</div>
     <van-cell-group>
-      <van-cell title="修改登录密码" :to="{ path: '/changePsd' }" is-link />
+      <van-cell title="修改登录密码" :to="{ path: '/forget' }" is-link />
       <van-cell title="修改支付密码" is-link />
-      <van-cell title="修改手机号" is-link />
+      <van-cell title="修改手机号" :to="{ path: '/changePhone' }" is-link />
     </van-cell-group>
   </div>
 </template>