project init

This commit is contained in:
zxy
2024-02-02 10:24:54 +08:00
commit 21a84c3035
253 changed files with 25212 additions and 0 deletions

View File

@@ -0,0 +1,67 @@
<template>
<login-template :title="titleText" hide-bottom>
<jl-input type="text" v-model="password" placeholder="设置长度6至20位的密码" @confirm="reg" showPassword clearable></jl-input>
<view class="btn" v-if='loading'>处理中...</view>
<view class="btn" v-else-if='password' @click="reg">确认</view>
<view class="btn nocheck" v-else>确认</view>
</login-template>
</template>
<script>
import {
reg,
forgetPW
} from '@/api/reg.js'
import jlInput from '@/components/jl-input/main.vue'
import loginTemplate from './template.vue'
import {
password
} from '@/untils/validate.js'
import md5 from 'js-md5'
export default {
components: {
jlInput,
loginTemplate
},
data() {
return {
loading: false,
titleText: '',
password: '',
}
},
onLoad() {
uni.$emit('passwordGetTitle', (title) => {
this.titleText = title
})
},
methods: {
reg() {
if (password(this.password)) {
uni.showToast({
title: '请设置长度6至20位的密码',
icon: 'none'
});
} else {
uni.$emit('setPassword', {
password: md5(this.password),
cb: () => {
this.loading = false
}
})
}
}
}
}
</script>
<style>
@import "./css";
.inPlaSmall {
font-family: PingFangSC-Regular;
font-size: 19rpx;
color: #d8d8d8;
}
</style>