d第一次提交

This commit is contained in:
dt_2916866708
2024-02-28 17:34:03 +08:00
commit 0689cf2677
1234 changed files with 144804 additions and 0 deletions

View File

@@ -0,0 +1,54 @@
.seting-body {
width: 100vw;
height: 100vh;
overflow: hidden;
padding: 15rpx;
box-sizing: border-box;
position: relative;
}
.seting-footer {
position: absolute;
bottom: env(safe-area-inset-bottom);
text-align: center;
width: 100vw;
.seting-footer-button {
// width: 464rpx;
// height: 80rpx;
// background: linear-gradient(35deg, #009b4d 0%, #acce22 100%);
// box-shadow: 0rpx 3rpx 2rpx 0rpx rgba(13, 13, 13, 0.0118);
// border-radius: 60rpx 60rpx 60rpx 60rpx;
// opacity: 1;
color: #ffffff;
font-size: 36rpx;
width: 464rpx;
height: 96rpx;
background: linear-gradient(270deg, #3B7CFF 0%, #719FFC 100%);
border-radius: 20rpx 20rpx 20rpx 20rpx;
opacity: 1;
}
}
.cell-container {
background-color: #ffffff;
width: 100%;
margin-bottom: 20rpx;
border-radius: 12rpx 12rpx 12rpx 12rpx;
box-shadow: 0rpx 2rpx 12rpx 0rpx rgba(132, 132, 132, 0.05);
// padding: 16rpx;
box-sizing: border-box;
.cell-item:last-child {
border: 0rpx;
}
.cell-item {
.cell-label {
font-size: 34rpx;
color: #333333;
}
.cell-value {
text-align: right;
color: #999999;
font-size: 34rpx;
}
border-bottom: solid 1rpx #f0f0f0;
padding: 26rpx;
}
}

View File

@@ -0,0 +1,159 @@
<!-- 修改密码 -->
<template>
<view class="setingAccount-body">
<view class="form-container">
<view class="form-item">
<view class="form-item-label">
请输入旧密码
</view>
<view class="form-item-content">
<uni-easyinput v-model="form.pwd" type="password" placeholder="请输入旧密码" />
</view>
</view>
<view class="form-item">
<view class="form-item-label">
请输入新密码
</view>
<view class="form-item-content">
<uni-easyinput v-model="form.pwd1" type="password" placeholder="请输入新密码" />
</view>
</view>
<view class="form-item">
<view class="form-item-label">
请再次输入新密码
</view>
<view class="form-item-content">
<uni-easyinput v-model="form.pwd2" type="password" placeholder="请再次确认密码" />
</view>
</view>
</view>
<view class="seting-footer flex jc">
<view @click="save" class="seting-footer-button flex ac jc">确定</view>
<!-- <button type="primary" @tap="save">保存</button> -->
</view>
</view>
</template>
<script>
import md5 from 'js-md5'
import userApi from "@/api/login.js"
export default {
data() {
return {
form: {}
}
},
methods: {
save(){
let that = this
if(!that.form.pwd){
uni.showToast({
title: '请输入旧密码',
icon: 'none'
});
return
}
if(!that.form.pwd1){
uni.showToast({
title: '请输入新密码',
icon: 'none'
});
return
}
if(!that.form.pwd2){
uni.showToast({
title: '请输入确认新密码',
icon: 'none'
});
return
}
if(that.form.pwd1!==that.form.pwd2){
uni.showToast({
title: '两次输入新密码不一致!',
icon: 'none'
});
return
}
let data = {
userCode:uni.getStorageSync('user').userCode,
encryptPsw:md5(this.form.pwd1),
pswNew:md5(this.form.pwd2),
pswType:'LOGIN_PSW'
}
userApi.updatePsw(data).then(res=>{
if(res.code===20000){
// uni.navigateBack()
uni.showToast({
title:'修改成功',
icon:'none',
success() {
setTimeout(()=>{
uni.reLaunch({
url:'/pages/login/index'
})
},2000)
}
})
}
})
}
}
}
</script>
<style lang="scss" scoped>
@import 'index.scss';
</style>
<style scoped>
.form-item{
margin-top: 20rpx;
}
.form-item-label{
font-size: 32rpx;
color: #000000;
}
::v-deep .uni-easyinput__content{
background-color: #FAFAFA !important;
font-size: 28rpx !important;
}
::v-deep .uni-easyinput__content-input{
height: 104rpx !important;
font-size: 28rpx !important;
border-radius: 10rpx 10rpx 10rpx 10rpx !important;
}
::v-deep .is-input-border{
border:0rpx !important;
}
.setingAccount-body{
width: 100vw;
height: 100vh;
box-sizing: border-box;
padding: 20rpx 15rpx;
background: #F1F2F7;
}
.form-item-content{
margin-top: 10rpx;
width: 100%;
height: 104rpx;
background: #FAFAFA;
border-radius: 10rpx 10rpx 10rpx 10rpx;
opacity: 1;
}
.form-container{
width: 100%;
/* height: 644rpx; */
background: #FFFFFF;
box-shadow: 0rpx 2rpx 12rpx 0rpx rgba(132,132,132,0.05);
border-radius: 12rpx 12rpx 12rpx 12rpx;
opacity: 1;
box-sizing: border-box;
padding: 30rpx 35rpx;
}
</style>