1
0

2 Commity 040bdb21b1 ... 9d222f0112

Autor SHA1 Správa Dátum
  windyeasy 9d222f0112 feat: 忘记密码和用户协议 2 mesiacov pred
  windyeasy 68adce56ea feat: 完成注册页面布局 2 mesiacov pred

+ 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/components/count-down.vue

@@ -18,7 +18,7 @@ const props = withDefaults(defineProps<IProps>(), {
 })
 const isDisabled = ref(false)
 const countDown = ref(60)
-const buttonText = ref('发送验证码')
+const buttonText = ref('获取验证码')
 
 const sendVerificationCode = () => {
   if (!regular.phone.test(props.phone)) {

+ 15 - 0
src/components/phone-front.vue

@@ -0,0 +1,15 @@
+<script lang="ts" setup></script>
+
+<template>
+  <view class="phone-front">+ 86</view>
+</template>
+
+<style lang="scss" scoped>
+.phone-front {
+  height: 24px;
+  padding: 6px 10px;
+  line-height: 24px;
+  border: 0.5px solid #ccc;
+  border-radius: 4px 0 0 4px;
+}
+</style>

+ 2 - 1
src/pages.json

@@ -2,7 +2,7 @@
   "globalStyle": {
     "navigationStyle": "default",
     "navigationBarTitleText": "hospital-mobile",
-    "navigationBarBackgroundColor": "#f8f8f8",
+    "navigationBarBackgroundColor": "#ffffff",
     "navigationBarTextStyle": "black",
     "backgroundColor": "#FFFFFF"
   },
@@ -87,6 +87,7 @@
       "type": "page",
       "layout": "default",
       "style": {
+        "navigationStyle": "custom",
         "navigationBarTitleText": "注册"
       }
     }

+ 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>

+ 1 - 1
src/pages/login/components/panel-account.vue

@@ -48,7 +48,7 @@ defineExpose({
       </uv-form-item>
       <uv-form-item prop="password">
         <uv-input
-          placeholder="请输入验证码"
+          placeholder="请输入码"
           prefixIcon="lock"
           size="large"
           prefixIconStyle="font-size: 22px;color: #909399"

+ 8 - 17
src/pages/login/components/panel-phone.vue

@@ -1,17 +1,16 @@
 <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: '',
-  password: '',
+  code: '',
 })
 const accountRules = {
   name: [
     { required: true, type: 'string', message: '请输入正确手机号', trigger: ['blur', 'change'] },
   ],
-  password: [
-    { required: true, type: 'string', message: '请输入验证码', trigger: ['blur', 'change'] },
-  ],
+  code: [{ required: true, type: 'string', message: '请输入验证码', trigger: ['blur', 'change'] }],
 }
 
 function loginAction(isKeep: boolean) {
@@ -42,23 +41,15 @@ defineExpose({
       :rules="accountRules"
     >
       <uv-form-item prop="name">
-        <view class="user-account-front">+ 86</view>
-        <uv-input placeholder="11位手机号" size="large"></uv-input>
+        <PhoneFront />
+        <uv-input v-model="account.name" placeholder="11位手机号" size="large"></uv-input>
       </uv-form-item>
-      <uv-form-item prop="password">
-        <uv-input placeholder="输入验证码" size="large"></uv-input>
+      <uv-form-item prop="code">
+        <uv-input v-model="account.code" placeholder="输入验证码" size="large"></uv-input>
         <count-down />
       </uv-form-item>
     </uv-form>
   </div>
 </template>
 
-<style lang="scss" scoped>
-.user-account-front {
-  height: 24px;
-  padding: 6px 10px;
-  line-height: 24px;
-  border: 0.5px solid #ccc;
-  border-radius: 4px 0 0 4px;
-}
-</style>
+<style lang="scss" scoped></style>

+ 75 - 0
src/pages/register/components/register-panel.vue

@@ -0,0 +1,75 @@
+<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'] },
+  ],
+}
+function toLoginPage() {
+  uni.navigateTo({
+    url: '/pages/login/index',
+  })
+}
+</script>
+
+<template>
+  <div class="register-panel">
+    <wd-tabs>
+      <wd-tab title="注册" name="register">
+        <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>
+      </wd-tab>
+    </wd-tabs>
+    <uv-button mt3 type="primary" text="注 册" w-full></uv-button>
+    <view class="text-area mt-10 text-center">
+      <uv-text type="primary" text="使用已有账户登录" align="center" @click="toLoginPage"></uv-text>
+    </view>
+  </div>
+</template>
+
+<style lang="scss" scoped></style>

+ 7 - 1
src/pages/register/index.vue

@@ -2,16 +2,22 @@
 {
   layout: 'default',
   style: {
+    navigationStyle: 'custom',
     navigationBarTitleText: '注册',
   },
 }
 </route>
 
 <template>
-  <view class="register">注册</view>
+  <view class="register px-4">
+    <head-logo />
+    <RegisterPanel />
+  </view>
 </template>
 
 <script lang="ts" setup>
+import HeadLogo from '@/components/head-logo.vue'
+import RegisterPanel from './components/register-panel.vue'
 //
 </script>