Browse Source

feat: 忘记密码和用户协议

windyeasy 1 month ago
parent
commit
9d222f0112
4 changed files with 64 additions and 4 deletions
  1. 1 1
      pages.config.ts
  2. 1 1
      src/pages.json
  3. 6 1
      src/pages/agreement/index.vue
  4. 56 1
      src/pages/forget-password/index.vue

+ 1 - 1
pages.config.ts

@@ -4,7 +4,7 @@ export default defineUniPages({
   globalStyle: {
     navigationStyle: 'default',
     navigationBarTitleText: 'hospital-mobile',
-    navigationBarBackgroundColor: '#f8f8f8',
+    navigationBarBackgroundColor: '#ffffff',
     navigationBarTextStyle: 'black',
     backgroundColor: '#FFFFFF',
   },

+ 1 - 1
src/pages.json

@@ -2,7 +2,7 @@
   "globalStyle": {
     "navigationStyle": "default",
     "navigationBarTitleText": "hospital-mobile",
-    "navigationBarBackgroundColor": "#f8f8f8",
+    "navigationBarBackgroundColor": "#ffffff",
     "navigationBarTextStyle": "black",
     "backgroundColor": "#FFFFFF"
   },

+ 6 - 1
src/pages/agreement/index.vue

@@ -9,11 +9,16 @@
 </route>
 
 <template>
-  <view class="agreement">用户协议</view>
+  <view class="agreement">
+    <uv-parse :content="content"></uv-parse>
+  </view>
 </template>
 
 <script lang="ts" setup>
 //
+const content = ref<any>(`
+ <h1>用户协议</h1>
+`)
 </script>
 
 <style lang="scss" scoped>

+ 56 - 1
src/pages/forget-password/index.vue

@@ -9,11 +9,66 @@
 </route>
 
 <template>
-  <view class="forget-password">忘记密码</view>
+  <view class="forget-password mt-6 px-4">
+    <uv-form
+      ref="formRef"
+      labelPosition="left"
+      labelWidth="0"
+      :model="account"
+      :rules="accountRules"
+    >
+      <uv-form-item prop="name">
+        <PhoneFront />
+        <uv-input v-model="account.name" placeholder="11位手机号" size="large"></uv-input>
+      </uv-form-item>
+      <uv-form-item prop="code">
+        <uv-input v-model="account.code" placeholder="输入验证码" size="large"></uv-input>
+        <count-down />
+      </uv-form-item>
+      <uv-form-item prop="password">
+        <uv-input
+          placeholder="请输入密码"
+          prefixIcon="lock"
+          size="large"
+          prefixIconStyle="font-size: 22px;color: #909399"
+        ></uv-input>
+      </uv-form-item>
+      <uv-form-item prop="rePassword">
+        <uv-input
+          placeholder="请再次输入密码"
+          prefixIcon="lock"
+          size="large"
+          prefixIconStyle="font-size: 22px;color: #909399"
+        ></uv-input>
+      </uv-form-item>
+    </uv-form>
+    <uv-button mt15 type="primary" text="登 录" w-full></uv-button>
+  </view>
 </template>
 
 <script lang="ts" setup>
+import CountDown from '@/components/count-down.vue'
+import PhoneFront from '@/components/phone-front.vue'
 //
+const formRef = ref<any>()
+const account = reactive({
+  name: '',
+  code: '',
+  password: '',
+  rePassword: '',
+})
+const accountRules = {
+  name: [
+    { required: true, type: 'string', message: '请输入正确手机号', trigger: ['blur', 'change'] },
+  ],
+  code: [{ required: true, type: 'string', message: '请输入验证码', trigger: ['blur', 'change'] }],
+  password: [
+    { required: true, type: 'string', message: '请输入密码', trigger: ['blur', 'change'] },
+  ],
+  rePassword: [
+    { required: true, type: 'string', message: '请输入确定密码', trigger: ['blur', 'change'] },
+  ],
+}
 </script>
 
 <style lang="scss" scoped>