Bläddra i källkod

Merge branch 'v20' of http://192.168.31.240:3000/MTP2.0_New/MTP20_WEB_GLOBAL into v20

li.shaoyi 1 år sedan
förälder
incheckning
3d0759c443

+ 40 - 0
public/locales/en-US.json

@@ -8,6 +8,7 @@
         "placeholder": "Please enter",
         "loadingfailed": "Loading failed",
         "required": "Required",
+        "optional": "Optional",
         "logout": "Log out",
         "save": "Save",
         "tips": "Tips"
@@ -555,12 +556,51 @@
         }
     },
     "user": {
+        "login": {
+            "username": "UserName",
+            "password": "PassWord",
+            "login": "Login",
+            "forgetpassword": "Forget Password?",
+            "rulesyszc": "《 Privacy Policy 》",
+            "register": "Register",
+            "ruleszcxy": "《 User Registration Agreement 》",
+            "rulesyhkhfxgzs": "《 Notice of user account opening risk 》",
+            "checked": "I have read and agree",
+            "Pleaseenterausername": "Please enter a user name",
+            "Pleaseenterthepassword": "Please enter the password"
+        },
+        "register": {
+            "title": "User Register",
+            "mobile": "Mobile",
+            "vcode": "SMS Code",
+            "sendagain": "Send Again",
+            "getsmscode": "Get SMS Code",
+            "freeregister": "Register Free",
+            "logipwd": "Login Pwd",
+            "confirmpwd": "Confirm Pwd",
+            "registercode": "Register Code",
+            "checked": "I have read and agree",
+            "ruleszcxy": "《 User Registration Agreement 》",
+            "rulesfxgzs": "《 Risk Notification Letter 》",
+            "registersuccess": "Register success"
+        },
         "password": {
             "title": "Modify Password",
             "newpwd": "New Pwd",
             "confirmpwd": "Conform Pwd",
             "oldpwd": "Old Pwd"
         },
+        "forget": {
+            "title": "Reset Login Pwd",
+            "mobile": "Mobile",
+            "vcode": "SMS Code",
+            "sendagain": "Send Again",
+            "getsmscode": "Get SMS Code",
+            "newpwd": "New Pwd",
+            "confirmpwd": "Conform Pwd",
+            "resetpwd": "Reset Pwd",
+            "pleaseenter": "Please enter"
+        },
         "cancel": {
             "title": "Cancel Service",
             "confirmcancellation": "Confirm cancellation",

+ 40 - 0
public/locales/zh-CN.json

@@ -8,6 +8,7 @@
         "placeholder": "请输入",
         "loadingfailed": "加载失败",
         "required": "必填",
+        "optional": "选填",
         "logout": "退出登录",
         "save": "保存",
         "tips": "提示"
@@ -555,12 +556,51 @@
         }
     },
     "user": {
+        "login": {
+            "username": "用户名",
+            "password": "密码",
+            "login": "登录",
+            "forgetpassword": "忘记密码",
+            "rulesyszc": "《隐私政策》",
+            "register": "用户注册",
+            "ruleszcxy": "《用户注册协议》",
+            "rulesyhkhfxgzs": "《用户开户风险告知书》",
+            "checked": "我已阅读并同意",
+            "Pleaseenterausername": "请输入用户名",
+            "Pleaseenterthepassword": "请输入密码"
+        },
+        "register": {
+            "title": "用户注册",
+            "mobile": "手机号码",
+            "vcode": "短信验证码",
+            "sendagain": "重新发送",
+            "getsmscode": "获取验证码",
+            "freeregister": "免费注册",
+            "logipwd": "登录密码",
+            "confirmpwd": "登录密码",
+            "registercode": "注册编码",
+            "checked": "我已阅读并同意",
+            "ruleszcxy": "《用户注册协议》",
+            "rulesfxgzs": "《风险告知书》",
+            "registersuccess": "注册成功!"
+        },
         "password": {
             "title": "修改密码",
             "newpwd": "新密码",
             "confirmpwd": "确认密码",
             "oldpwd": "原密码"
         },
+        "forget": {
+            "title": "重置登录密码",
+            "mobile": "手机号码",
+            "vcode": "短信验证码",
+            "sendagain": "重新发送",
+            "getsmscode": "获取验证码",
+            "newpwd": "新密码",
+            "confirmpwd": "确认密码",
+            "resetpwd": "重置密码",
+            "pleaseenter": "请输入"
+        },
         "cancel": {
             "title": "注销服务",
             "confirmcancellation": "确认注销",

+ 11 - 11
src/packages/mobile/components/layouts/login/index.vue

@@ -8,10 +8,10 @@
     </div>
     <Form class="login-form" @submit="formSubmit">
       <CellGroup inset>
-        <Field v-model="formData.userName" name="account" label="用户名" label-align="top" size="large" placeholder="请输入用户名"
-          :rules="[{ required: true, message: '请输入用户名' }]" />
-        <Field v-model="formData.password" name="password" type="password" label="密码" label-align="top" size="large"
-          placeholder="请输入密码" :rules="[{ required: true, message: '请输入密码' }]" autocomplete="off" />
+        <Field v-model="formData.userName" name="account" :label="$t('user.login.username')" label-align="top" size="large" :placeholder="$t('user.login.Pleaseenterausername')"
+          :rules="[{ required: true, message: $t('user.login.Pleaseenterausername') }]" />
+        <Field v-model="formData.password" name="password" type="password" :label="$t('user.login.password')" label-align="top" size="large"
+          :placeholder="$t('user.login.Pleaseenterthepassword')" :rules="[{ required: true, message: $t('user.login.Pleaseenterthepassword') }]" autocomplete="off" />
         <Field>
           <template #input>
             <SliderVerify @statu="slide" style="max-width: 100%;margin: auto;" v-if="showSliderVerify" />
@@ -19,21 +19,21 @@
         </Field>
       </CellGroup>
       <div class="button-submit">
-        <Button type="primary" native-type="submit" round block>登录</Button>
+        <Button type="primary" native-type="submit" round block>{{ $t('user.login.login') }}</Button>
       </div>
     </Form>
     <div class="login-link">
-      <span @click="navigationTo('user-register')" v-if="globalStore.hasSystemModule('register')">用户注册</span>
-      <span @click="navigationTo('user-forget')">忘记密码</span>
+      <span @click="navigationTo('user-register')" v-if="globalStore.hasSystemModule('register')">{{ $t('user.login.register') }}</span>
+      <span @click="navigationTo('user-forget')">{{ $t('user.login.forgetpassword') }}</span>
     </div>
     <div class="login-footer">
       <div class="login-footer__trem">
-        <Checkbox shape="square" icon-size="16px" v-model="checked">我已阅读并同意</Checkbox>
-        <span @click="routerTo('rules-zcxy')">《用户注册协议》</span>
+        <Checkbox shape="square" icon-size="16px" v-model="checked">{{ $t('user.login.checked') }}</Checkbox>
+        <span @click="routerTo('rules-zcxy')">{{ $t('user.login.ruleszcxy') }}</span>
         <span>、</span>
-        <span @click="routerTo('rules-yhkhfxgzs')" v-if="showYhkhfxgzs">《用户开户风险告知书》</span>
+        <span @click="routerTo('rules-yhkhfxgzs')" v-if="showYhkhfxgzs">{{ $t('user.login.rulesyhkhfxgzs') }}</span>
         <span v-if="showYhkhfxgzs">、</span>
-        <span @click="routerTo('rules-yszc')">《隐私政策》</span>
+        <span @click="routerTo('rules-yszc')">{{ $t('user.login.rulesyszc') }}</span>
       </div>
       <div class="login-footer__version">
         <span>v1.0.{{ appVersion }}</span>

+ 9 - 9
src/packages/mobile/views/user/forget/Index.vue

@@ -1,30 +1,30 @@
 <template>
     <app-view class="g-form forget">
         <template #header>
-            <app-navbar title="重置登录密码" />
+            <app-navbar :title="$t('user.forget.title')" />
         </template>
         <Form ref="formRef" class="g-form__container" @submit="formSubmit">
             <CellGroup inset>
-                <Field v-model="formData.mobile" type="tel" name="mobile" label="手机号码" placeholder="请输入" autocomplete="off"
+                <Field v-model="formData.mobile" type="tel" name="mobile" :label="$t('user.forget.mobile')" :placeholder="$t('user.forget.pleaseenter')" autocomplete="off"
                     :rules="formRules.mobile" />
-                <Field v-model="formData.vcode" type="digit" name="vcode" label="短信验证码" placeholder="请输入" autocomplete="off"
+                <Field v-model="formData.vcode" type="digit" name="vcode" :label="$t('user.forget.vcode')" :placeholder="$t('user.forget.pleaseenter')" autocomplete="off"
                     :rules="formRules.vcode">
                     <template #button>
                         <Button size="small" type="danger" :disabled="isCountdown" @click="sendVerifyCode">
-                            <span v-if="isCountdown">重新发送({{ currentTime.seconds }})</span>
-                            <span v-else>获取验证码</span>
+                            <span v-if="isCountdown">{{ $t('user.forget.sendagain') }}({{ currentTime.seconds }})</span>
+                            <span v-else>{{ $t('user.forget.getsmscode') }}</span>
                         </Button>
                     </template>
                 </Field>
-                <Field v-model="formData.password" name="password" type="password" label="新密码" placeholder="请输入"
+                <Field v-model="formData.password" name="password" type="password" :label="$t('user.forget.newpwd')" :placeholder="$t('user.forget.pleaseenter')"
                     autocomplete="off" :rules="formRules.password" />
-                <Field v-model="formData.confirmpassword" name="confirmpassword" type="password" label="确认密码"
-                    placeholder="请输入" autocomplete="off" :rules="formRules.confirmpassword" />
+                <Field v-model="formData.confirmpassword" name="confirmpassword" type="password" :label="$t('user.forget.confirmpwd')"
+                :placeholder="$t('user.forget.pleaseenter')" autocomplete="off" :rules="formRules.confirmpassword" />
             </CellGroup>
         </Form>
         <template #footer>
             <div class="g-form__footer inset">
-                <Button type="danger" @click="formRef?.submit()" round block>重置密码</Button>
+                <Button type="danger" @click="formRef?.submit()" round block>{{ $t('user.forget.sendagain') }}</Button>
             </div>
         </template>
     </app-view>

+ 13 - 13
src/packages/mobile/views/user/register/Index.vue

@@ -1,28 +1,28 @@
 <template>
   <app-view class="g-form register">
     <template #header>
-      <app-navbar title="用户注册" />
+      <app-navbar :title="$t('user.register.title')" />
     </template>
     <Form ref="formRef" class="g-form__container register__form" @submit="formSubmit">
       <CellGroup inset>
-        <Field v-model="formData.mobilephone" type="tel" name="mobilephone" label="手机号码" placeholder="必填"
+        <Field v-model="formData.mobilephone" type="tel" name="mobilephone" :label="$t('user.register.mobile')" :placeholder="$t('common.required')"
           :rules="formRules.mobilephone" />
-        <Field v-model="formData.vcode" type="digit" name="vcode" label="短信验证码" placeholder="必填"
+        <Field v-model="formData.vcode" type="digit" name="vcode" :label="$t('user.register.vcode')" :placeholder="$t('common.required')"
           :rules="formRules.vcode">
           <template #button>
             <Button size="small" type="danger" :disabled="isCountdown" @click="sendVerifyCode">
-              <span v-if="isCountdown">重新发送({{ currentTime.seconds }})</span>
-              <span v-else>获取验证码</span>
+              <span v-if="isCountdown">{{ $t('user.register.sendagain') }}({{ currentTime.seconds }})</span>
+              <span v-else>{{ $t('user.register.getsmscode') }}</span>
             </Button>
           </template>
         </Field>
       </CellGroup>
       <CellGroup inset>
-        <Field v-model="formData.loginpwd" name="loginpwd" type="password" label="登录密码" placeholder="必填"
+        <Field v-model="formData.loginpwd" name="loginpwd" type="password" :label="$t('user.register.logipwd')" :placeholder="$t('common.required')"
           :rules="formRules.loginpwd" />
-        <Field v-model="confirmpassword" name="confirmpassword" type="password" label="确认密码" placeholder="必填"
+        <Field v-model="confirmpassword" name="confirmpassword" type="password" :label="$t('user.register.confirmpwd')" :placeholder="$t('common.required')"
           :rules="formRules.confirmpassword" />
-        <Field v-model="formData.refernum" name="refernum" label="注册编码" :placeholder="registrationCodeRule ? '必填' : '选填'"
+        <Field v-model="formData.refernum" name="refernum" :label="$t('user.register.registercode')" :placeholder="registrationCodeRule ? $t('common.required') : $t('common.optional')"
           :rules="formRules.refernum" v-if="registrationCodeRule > -1">
           <!-- <template #button>
             <app-qrcode-scan @success="onScanSuccess">
@@ -35,9 +35,9 @@
         <Cell>
           <template #title>
             <div style="display: flex;align-items: center;font-size: 12px;">
-              <Checkbox shape="square" icon-size="16px" v-model="checked">我已阅读并同意</Checkbox>
-              <span @click="routerTo('rules-zcxy')" style="color:#E92020">《用户注册协议》</span>
-              <span @click="routerTo('rules-yhkhfxgzs')" style="color:#E92020">《风险告知书》</span>
+              <Checkbox shape="square" icon-size="16px" v-model="checked">{{ $t('user.register.checked') }}</Checkbox>
+              <span @click="routerTo('rules-zcxy')" style="color:#E92020">{{ $t('user.register.ruleszcxy') }}</span>
+              <span @click="routerTo('rules-yhkhfxgzs')" style="color:#E92020">{{ $t('user.register.rulesfxgzs') }}</span>
             </div>
           </template>
         </Cell>
@@ -45,9 +45,9 @@
     </Form>
     <template #footer>
       <div class="g-form__footer inset">
-        <Button type="danger" @click="formRef?.submit" round block>免费注册</Button>
+        <Button type="danger" @click="formRef?.submit" round block>{{ $t('user.register.freeregister') }}</Button>
       </div>
-      <app-reward :show="showReward" :value="redEnvelope" title="注册成功!" @click="router.back()" />
+      <app-reward :show="showReward" :value="redEnvelope" :title="$t('user.register.registersuccess')" @click="router.back()" />
     </template>
   </app-view>
 </template>