忘记密码 个人信息 登录
This commit is contained in:
parent
a32a71cec7
commit
9f4c2ea8c5
167
pages/Aftersalesdetails/Aftersalesdetails.vue
Normal file
167
pages/Aftersalesdetails/Aftersalesdetails.vue
Normal file
@ -0,0 +1,167 @@
|
||||
<template>
|
||||
<view class="app">
|
||||
<view class="elderly">
|
||||
<view class="wait">
|
||||
请等待商家处理
|
||||
</view>
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="name">
|
||||
退款信息
|
||||
</view>
|
||||
<view class="details">
|
||||
<view class="detailslist">
|
||||
<image src="../../static/shangpindingdan.png" mode=""></image>
|
||||
<view class="model">
|
||||
<view class="top">
|
||||
<span>酒精棉片 200片</span>
|
||||
<span>¥36.0</span>
|
||||
</view>
|
||||
<view class="bottom">
|
||||
<span class="box">型号:酒精棉片 8盒</span>
|
||||
<span class="box">×1</span>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info">
|
||||
<view>订单编号:1256585698545111</view>
|
||||
<view>申请金额:¥36.0</view>
|
||||
<view>退款原因:不想要了</view>
|
||||
<view>申请时间:2022-10-13 11:50</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="evaluate">
|
||||
<view class="cancelorder">修改申请</view>
|
||||
<view class="cancelorder " style="background: #4C7BC9;">撤销申请</view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.app {
|
||||
padding: 3%;
|
||||
height: 100vh;
|
||||
font-size: 36rpx;
|
||||
|
||||
//按钮修改申请和撤销申请
|
||||
.evaluate {
|
||||
display: flex;
|
||||
float: right;
|
||||
margin-top: 40%;
|
||||
font-size: 32rpx;
|
||||
|
||||
.cancelorder {
|
||||
margin-left: 1%;
|
||||
width: 216rpx;
|
||||
height: 68rpx;
|
||||
background: #E1AE3C;
|
||||
border-radius: 26rpx;
|
||||
text-align: center;
|
||||
color: #ffffff;
|
||||
line-height: 68rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 95%;
|
||||
height: 580rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0px 9px 31px 9px rgba(0, 0, 0, 0.03);
|
||||
border-radius: 20px;
|
||||
margin: 10px auto;
|
||||
|
||||
.name {
|
||||
width: 95%;
|
||||
height: 90rpx;
|
||||
font-size: 30rpx;
|
||||
color: #969394;
|
||||
line-height: 90rpx;
|
||||
border-bottom: 1rpx solid #D8D4D4;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.info {
|
||||
font-size: 32rpx;
|
||||
margin: 3%;
|
||||
color: #969394;
|
||||
line-height: 48rpx;
|
||||
}
|
||||
|
||||
.details {
|
||||
width: 95%;
|
||||
height: 40%;
|
||||
margin: 0 auto;
|
||||
border-bottom: 1rpx solid #D8D4D4;
|
||||
|
||||
.detailslist {
|
||||
display: flex;
|
||||
|
||||
image {
|
||||
width: 182rpx;
|
||||
height: 182rpx;
|
||||
margin: 20rpx 0 0 20rpx;
|
||||
}
|
||||
|
||||
.model {
|
||||
width: 70%;
|
||||
margin: 30rpx 0 0 20rpx;
|
||||
|
||||
span {
|
||||
font-size: 38rpx;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
span:nth-child(2) {
|
||||
color: #969394;
|
||||
float: right;
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
|
||||
.bottom {
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.box {
|
||||
font-size: 35rpx;
|
||||
color: #969394;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.elderly {
|
||||
width: 95%;
|
||||
height: 96rpx;
|
||||
line-height: 96rpx;
|
||||
color: #ffffff;
|
||||
margin: 0 auto;
|
||||
background: #4C7BC9;
|
||||
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
|
||||
border-radius: 20rpx;
|
||||
|
||||
.wait {
|
||||
margin-left: 3%;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
||||
74
pages/forgotPassword/forgotPassword.scss
Normal file
74
pages/forgotPassword/forgotPassword.scss
Normal file
@ -0,0 +1,74 @@
|
||||
.app {
|
||||
height: 100vh;
|
||||
padding: 20rpx 0;
|
||||
|
||||
.item {
|
||||
font-size: 34rpx;
|
||||
margin: 0 auto 20rpx;
|
||||
width: 94%;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
background-color: #fff;
|
||||
box-shadow: 0px 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
|
||||
border-radius: 20rpx;
|
||||
position: relative;
|
||||
|
||||
.lefttext {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
left: 3%;
|
||||
}
|
||||
|
||||
.righttext {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
left: 18%;
|
||||
height: 100rpx;
|
||||
}
|
||||
|
||||
.lefttext,
|
||||
.righttext {
|
||||
::v-deep .uni-input-input {
|
||||
font-size: 34rpx;
|
||||
}
|
||||
|
||||
::v-deep .uni-input-wrapper {
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
}
|
||||
|
||||
::v-deep .uni-input-placeholder {
|
||||
line-height: 100rpx;
|
||||
font-size: 34rpx;
|
||||
font-weight: 400;
|
||||
color: #C3C1C1;
|
||||
}
|
||||
}
|
||||
|
||||
.obtaincode {
|
||||
text-align: center;
|
||||
font-size: 36rpx;
|
||||
color: #4C7BC9;
|
||||
line-height: 100rpx;
|
||||
position: absolute;
|
||||
right: 5%;
|
||||
top: 0%;
|
||||
}
|
||||
}
|
||||
|
||||
.loginbtn {
|
||||
width: 80%;
|
||||
height: 100rpx;
|
||||
text-align: center;
|
||||
line-height: 100rpx;
|
||||
background: #4C7BC9;
|
||||
border-radius: 51rpx;
|
||||
font-size: 41rpx;
|
||||
color: #FFFFFF;
|
||||
position: absolute;
|
||||
top: 40%;
|
||||
left: 10%;
|
||||
}
|
||||
}
|
||||
123
pages/forgotPassword/forgotPassword.vue
Normal file
123
pages/forgotPassword/forgotPassword.vue
Normal file
@ -0,0 +1,123 @@
|
||||
<template>
|
||||
<view class="app">
|
||||
<view class="item">
|
||||
<view class="lefttext">
|
||||
输入新密码
|
||||
</view>
|
||||
<u-input class='righttext' style='left:30%' placeholder="请输入密码" maxlength="10" type="password"
|
||||
:border="false" :password-icon="true" v-model="newpassword" />
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="lefttext">
|
||||
重复新密码
|
||||
</view>
|
||||
<u-input class='righttext' style='left:30%' placeholder="请再次输入密码" maxlength="10" type="password"
|
||||
:border="false" :password-icon="true" v-model="password" />
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="lefttext">
|
||||
手机号
|
||||
</view>
|
||||
<input class="righttext" style='left:23%' type="text" placeholder="请输入" maxlength="11" v-model="phone"/>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="lefttext">
|
||||
验证码
|
||||
</view>
|
||||
<input class="righttext" style='left:23%' type="text" placeholder="" maxlength="6" v-model="verification" />
|
||||
<view class="obtaincode" :style="{'color':getCodeBtnColor}" @click.stop="getCode()">
|
||||
{{getCodeText}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="loginbtn" @tap='pwdlogin'>
|
||||
登录
|
||||
</view>
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
ForgotPassword
|
||||
} from '../../api/forgotPassword/forgotPassword.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
phone: '13678945620',
|
||||
verification: '111111',
|
||||
password: '',
|
||||
newpassword: '',
|
||||
getCodeText: '获取验证码', //获取验证码的文字
|
||||
getCodeBtnColor: "#4C7BC9", //获取验证码的color
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
pwdlogin() {
|
||||
ForgotPassword(this.phone, this.password, this.verification).then(res => {
|
||||
if (this.password !== this.newpassword) {
|
||||
this.$refs.uToast.show({
|
||||
title: '密码输入不一致,请重新输入',
|
||||
type: 'error',
|
||||
duration: '1500'
|
||||
})
|
||||
} else {
|
||||
this.$refs.uToast.show({
|
||||
title: '密码修改成功',
|
||||
type: 'success',
|
||||
url: '/pages/login/login',
|
||||
duration: '1500'
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
//点击获取验证码
|
||||
getCode() {
|
||||
uni.hideKeyboard() //隐藏已经显示的软键盘,如果软键盘没有显示则不做任何操作。
|
||||
if (this.getCodeisWaiting) { //是否在倒计时中
|
||||
return;
|
||||
}
|
||||
if (!(/^1(3|4|5|6|7|8|9)\d{9}$/.test(this.phone))) { //校验手机号码是否有误
|
||||
uni.showToast({
|
||||
title: '请填写正确手机号码',
|
||||
icon: "none"
|
||||
});
|
||||
return false;
|
||||
}
|
||||
this.getCodeText = "发送中..." //发送验证码
|
||||
this.getCodeisWaiting = true;
|
||||
this.getCodeBtnColor = "rgba(138,139,133,1)" //追加样式,修改颜色
|
||||
//示例用定时器模拟请求效果
|
||||
//setTimeout(()用于在指定的毫秒数后调用函数或计算表达式
|
||||
setTimeout(() => {
|
||||
uni.showToast({
|
||||
title: '验证码已发送',
|
||||
icon: "none"
|
||||
}); //弹出提示框
|
||||
// this.code = '1234'; //发送验证码,进行填入 示例默认1234,生产中请删除这一句。
|
||||
this.setTimer(); //调用定时器方法
|
||||
}, 1000)
|
||||
},
|
||||
//获取验证码的倒计时 setTimer: 需要每隔一段时间执行一件事的的时候就需要使用SetTimer函数
|
||||
setTimer() {
|
||||
let holdTime = 60; //定义变量并赋值
|
||||
this.getCodeText = "重新获取(60)"
|
||||
//setInterval()是一个实现定时调用的函数,可按照指定的周期(以毫秒计)来调用函数或计算表达式。
|
||||
//setInterval方法会不停地调用函数,直到 clearInterval被调用或窗口被关闭。
|
||||
this.Timer = setInterval(() => {
|
||||
if (holdTime <= 0) {
|
||||
this.getCodeisWaiting = false;
|
||||
this.getCodeBtnColor = "#4C7BC9";
|
||||
this.getCodeText = "获取验证码"
|
||||
clearInterval(this.Timer); //清除该函数
|
||||
return; //返回前面
|
||||
}
|
||||
this.getCodeText = "重新获取(" + holdTime + ")"
|
||||
holdTime--;
|
||||
}, 1000)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import "./forgotPassword.scss";
|
||||
</style>
|
||||
@ -3,6 +3,12 @@
|
||||
color: #C3C1C1;
|
||||
font-weight: 400;
|
||||
height:100vh;
|
||||
.forget{
|
||||
position: absolute;
|
||||
top: 67%;
|
||||
left: 10%;
|
||||
color: #46ABD7;
|
||||
}
|
||||
.switch {
|
||||
text-align: center;
|
||||
height: 100rpx;
|
||||
@ -29,7 +35,7 @@
|
||||
.loginphone {
|
||||
background-color: #fff;
|
||||
width: 80%;
|
||||
height: 162rpx;
|
||||
height: 150rpx;
|
||||
position: absolute;
|
||||
left: 10%;
|
||||
top: 23%;
|
||||
@ -48,7 +54,7 @@
|
||||
|
||||
.phone {
|
||||
padding-left: 40rpx;
|
||||
height: 100%;
|
||||
height: 150rpx;
|
||||
box-shadow: 0px 9px 31px 9px rgba(0, 0, 0, 0.03);
|
||||
}
|
||||
}
|
||||
@ -56,8 +62,9 @@
|
||||
.logincode {
|
||||
position: absolute;
|
||||
left: 10%;
|
||||
|
||||
|
||||
::v-deep .u-input{
|
||||
border: 0;
|
||||
}
|
||||
|
||||
::v-deep .u-input__input {
|
||||
padding-left: 20rpx;
|
||||
@ -79,3 +86,4 @@
|
||||
left: 13%;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -6,14 +6,26 @@
|
||||
<view class="loginphone">
|
||||
<input class="phone" type="text" placeholder="手机号码" maxlength="11" v-model="phone" />
|
||||
</view>
|
||||
<view class="logincode loginphone" style="top: 40%;">
|
||||
<view class="logincode loginphone" style="top: 40%;" v-if='switchs'>
|
||||
<u-input class='code phone' placeholder="密码" maxlength="10" v-model="password" type="password"
|
||||
:border="true" :password-icon="true" />
|
||||
</view>
|
||||
<view class="loginbtn" @tap='pwdlogin'>
|
||||
<view class="logincode loginphone" style="top: 40%;" v-else>
|
||||
<input class="code phone" type="text" placeholder="验证码" maxlength="6" v-model="verification" />
|
||||
<view class="obtaincode get-code" :style="{'color':getCodeBtnColor}" @click.stop="getCode()">
|
||||
{{getCodeText}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="loginbtn" @tap='pwdlogin' v-if='switchs'>
|
||||
登录
|
||||
</view>
|
||||
<view class="switch" @tap='goregister' style="left:55%">
|
||||
<view class="loginbtn" @tap='verificationlogin' v-else>
|
||||
登录
|
||||
</view>
|
||||
<view class="switch" @tap='switchs=!switchs'>
|
||||
{{switchs?'切换手机验证码登录':'切换密码登录'}}
|
||||
</view>
|
||||
<view class="switch" @tap='goregister' style="left:55%" v-if="switchs">
|
||||
没有账号,请先注册
|
||||
</view>
|
||||
<u-toast ref="uToast" />
|
||||
@ -21,36 +33,40 @@
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
appLoginpwd
|
||||
appLoginpwd,
|
||||
appLoginvfn
|
||||
} from '../../api/login/index.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
phone: '13645678913',
|
||||
password: '123456',
|
||||
verification: '111111',
|
||||
getCodeText: '获取验证码', //获取验证码的文字
|
||||
getCodeBtnColor: "#4C7BC9", //获取验证码的color
|
||||
getCodeisWaiting: false, //判断是否在倒计时中
|
||||
switchs: false, //切换验证码 密码登录
|
||||
};
|
||||
},
|
||||
//获取到传值
|
||||
onLoad(options) {},
|
||||
onLoad(options) {
|
||||
this.switchs = options.switchs
|
||||
},
|
||||
methods: {
|
||||
//密码登录
|
||||
pwdlogin() {
|
||||
appLoginpwd(this.phone, this.password).then(res => {
|
||||
//验证码登录
|
||||
verificationlogin() {
|
||||
appLoginvfn(this.phone, this.verification).then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 200) {
|
||||
if (res.data.registerFlag == false) {
|
||||
uni.setStorage({
|
||||
key: 'patientId',
|
||||
data: res.data.patientId,
|
||||
success: function() {
|
||||
console.log('patientId保存成功');
|
||||
}
|
||||
});
|
||||
this.$refs.uToast.show({
|
||||
title: res.data.message,
|
||||
type: 'success',
|
||||
url: '',
|
||||
duration: '1500'
|
||||
})
|
||||
setTimeout(() => {
|
||||
setInterval(() => {
|
||||
//TODO
|
||||
uni.switchTab({
|
||||
url: '/pages/homepage/homepage',
|
||||
})
|
||||
@ -62,6 +78,39 @@
|
||||
})
|
||||
}
|
||||
} else {
|
||||
console.log(res)
|
||||
this.$refs.uToast.show({
|
||||
title: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
//密码登录
|
||||
pwdlogin() {
|
||||
appLoginpwd(this.phone, this.password).then(res => {
|
||||
if (res.code == 200) {
|
||||
if (res.data.registerFlag == false) {
|
||||
this.$refs.uToast.show({
|
||||
title: res.data.message,
|
||||
type: 'success',
|
||||
url: '',
|
||||
duration: '1500'
|
||||
})
|
||||
setInterval(() => {
|
||||
//TODO
|
||||
uni.switchTab({
|
||||
url: '/pages/homepage/homepage',
|
||||
})
|
||||
}, 1500);
|
||||
} else {
|
||||
this.$refs.uToast.show({
|
||||
title: res.data.message,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
} else {
|
||||
console.log(res)
|
||||
this.$refs.uToast.show({
|
||||
title: res.msg,
|
||||
type: 'error'
|
||||
@ -75,14 +124,135 @@
|
||||
url: '/pages/register/register'
|
||||
})
|
||||
},
|
||||
//点击获取验证码
|
||||
getCode() {
|
||||
uni.hideKeyboard() //隐藏已经显示的软键盘,如果软键盘没有显示则不做任何操作。
|
||||
if (this.getCodeisWaiting) { //是否在倒计时中
|
||||
return;
|
||||
}
|
||||
if (!(/^1(3|4|5|6|7|8|9)\d{9}$/.test(this.phone))) { //校验手机号码是否有误
|
||||
uni.showToast({
|
||||
title: '请填写正确手机号码',
|
||||
icon: "none"
|
||||
});
|
||||
return false;
|
||||
}
|
||||
this.getCodeText = "发送中..." //发送验证码
|
||||
this.getCodeisWaiting = true;
|
||||
this.getCodeBtnColor = "rgba(138,139,133,1)" //追加样式,修改颜色
|
||||
//示例用定时器模拟请求效果
|
||||
//setTimeout(()用于在指定的毫秒数后调用函数或计算表达式
|
||||
setTimeout(() => {
|
||||
uni.showToast({
|
||||
title: '验证码已发送',
|
||||
icon: "none"
|
||||
}); //弹出提示框
|
||||
// this.code = '1234'; //发送验证码,进行填入 示例默认1234,生产中请删除这一句。
|
||||
this.setTimer(); //调用定时器方法
|
||||
}, 1000)
|
||||
},
|
||||
//获取验证码的倒计时 setTimer: 需要每隔一段时间执行一件事的的时候就需要使用SetTimer函数
|
||||
setTimer() {
|
||||
let holdTime = 60; //定义变量并赋值
|
||||
this.getCodeText = "重新获取(60)"
|
||||
//setInterval()是一个实现定时调用的函数,可按照指定的周期(以毫秒计)来调用函数或计算表达式。
|
||||
//setInterval方法会不停地调用函数,直到 clearInterval被调用或窗口被关闭。
|
||||
this.Timer = setInterval(() => {
|
||||
if (holdTime <= 0) {
|
||||
this.getCodeisWaiting = false;
|
||||
this.getCodeBtnColor = "#4C7BC9";
|
||||
this.getCodeText = "获取验证码"
|
||||
clearInterval(this.Timer); //清除该函数
|
||||
return; //返回前面
|
||||
}
|
||||
this.getCodeText = "重新获取(" + holdTime + ")"
|
||||
holdTime--;
|
||||
}, 1000)
|
||||
},
|
||||
doReg() {
|
||||
// uni.hideKeyboard() //隐藏已经显示的软键盘,如果软键盘没有显示则不做任何操作。
|
||||
// //模板示例部分验证规则
|
||||
// if (!(/^1(3|4|5|6|7|8|9)\d{9}$/.test(this.phoneNumber))) { //校验手机号码
|
||||
// uni.showToast({
|
||||
// title: '请填写正确手机号码',
|
||||
// icon: "none"
|
||||
// });
|
||||
// return false;
|
||||
// }
|
||||
// //示例验证码,实际使用中应为请求服务器比对验证码是否正确。
|
||||
// if (this.code != 1234) {
|
||||
// uni.showToast({
|
||||
// title: '验证码不正确',
|
||||
// icon: "none"
|
||||
// });
|
||||
// return false;
|
||||
// }
|
||||
// uni.showLoading({
|
||||
// title: '提交中...'
|
||||
// })
|
||||
// //模板示例把用户注册信息储存在本地,实际使用中请替换为上传服务器。
|
||||
// setTimeout(() => {
|
||||
// uni.getStorage({
|
||||
// key: 'UserList',
|
||||
// success: (res) => {
|
||||
// //增加记录,密码md5
|
||||
// res.data.push({
|
||||
// username: this.phoneNumber,
|
||||
// passwd: md5(this.passwd)
|
||||
// })
|
||||
// uni.setStorage({
|
||||
// key: 'UserList',
|
||||
// data: res.data,
|
||||
// success: function() {
|
||||
// uni.hideLoading()
|
||||
// uni.showToast({
|
||||
// title: '注册成功',
|
||||
// icon: "success"
|
||||
// });
|
||||
// setTimeout(function() {
|
||||
// uni.navigateBack();
|
||||
// }, 1000)
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// fail: (e) => {
|
||||
// uni.hideLoading()
|
||||
// console.log('error');
|
||||
// //新建UserList
|
||||
// uni.setStorage({
|
||||
// key: 'UserList',
|
||||
// data: [{
|
||||
// username: this.phoneNumber,
|
||||
// passwd: md5(this.passwd)
|
||||
// }],
|
||||
// success: function() {
|
||||
// uni.hideLoading()
|
||||
// uni.showToast({
|
||||
// title: '注册成功',
|
||||
// icon: "success"
|
||||
// });
|
||||
// setTimeout(function() {
|
||||
// uni.navigateBack();
|
||||
// }, 1000)
|
||||
// },
|
||||
// fail: function(e) {
|
||||
// console.log('set error:' + JSON.stringify(e));
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
// }, 1000)
|
||||
},
|
||||
toLogin() {
|
||||
// uni.hideKeyboard() //隐藏已经显示的软键盘,如果软键盘没有显示则不做任何操作。
|
||||
// uni.redirectTo({
|
||||
// url: 'login'
|
||||
// }); //跳转到登录页
|
||||
// uni.navigateBack(); //关闭当前页面,返回上一页面
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
toLogin() {
|
||||
// uni.hideKeyboard() //隐藏已经显示的软键盘,如果软键盘没有显示则不做任何操作。
|
||||
// uni.redirectTo({
|
||||
// url: 'login'
|
||||
// }); //跳转到登录页
|
||||
// uni.navigateBack(); //关闭当前页面,返回上一页面
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
77
pages/modify/modify.scss
Normal file
77
pages/modify/modify.scss
Normal file
@ -0,0 +1,77 @@
|
||||
.app {
|
||||
background-color: #F4F5F7;
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
color: #000000;
|
||||
padding: 3%;
|
||||
font-size: 36rpx;
|
||||
|
||||
.centercontent {
|
||||
width: 99%;
|
||||
height: 635rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
|
||||
border-radius: 20rpx;
|
||||
margin: 0 auto;
|
||||
|
||||
.finish {
|
||||
width: 217rpx;
|
||||
font-size: 32rpx;
|
||||
color: #FFFFFF;
|
||||
height: 68rpx;
|
||||
line-height: 68rpx;
|
||||
text-align: center;
|
||||
margin-top: 60%;
|
||||
margin-left: 70%;
|
||||
background: #4C7BC9;
|
||||
border-radius: 26rpx;
|
||||
}
|
||||
|
||||
.content {
|
||||
line-height: 100rpx;
|
||||
|
||||
.name {
|
||||
margin-left: 5%;
|
||||
height: 100rpx;
|
||||
border-bottom: 1rpx solid #D8D4D4;
|
||||
|
||||
input {
|
||||
font-size: 36rpx;
|
||||
margin-top: -11%;
|
||||
margin-left: 15%;
|
||||
}
|
||||
}
|
||||
|
||||
.nursetype {
|
||||
input {
|
||||
margin-left: 25%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.Commodity {
|
||||
line-height: 110rpx;
|
||||
margin-left: 5%;
|
||||
border-bottom: 1rpx solid #D8D4D4;
|
||||
|
||||
.picture {
|
||||
vertical-align: middle;
|
||||
margin-left: 60%;
|
||||
width: 103rpx;
|
||||
height: 103rpx;
|
||||
}
|
||||
|
||||
.pictureA {
|
||||
margin-left: 3%;
|
||||
width: 18rpx;
|
||||
height: 27rpx;
|
||||
}
|
||||
|
||||
.head {
|
||||
line-height: 140rpx;
|
||||
margin-left: 5%;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3,115 +3,104 @@
|
||||
<view class="centercontent">
|
||||
<view class="Commodity">
|
||||
头像
|
||||
<image class="picture" src="../../static/head portrait.png" mode=""></image>
|
||||
<image class="picture" src="../../static/head.png" mode=""></image>
|
||||
<image class="pictureA" src="../../static/jiantou.png" mode=""></image>
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="name">昵称:
|
||||
<input type="text" placeholder="请填写" />
|
||||
<input type="text" placeholder="请输入" />
|
||||
</view>
|
||||
<view class="name">姓名:
|
||||
<input type="text" placeholder="请填写" />
|
||||
<view class="name">姓名:
|
||||
<input type="text" placeholder="请输入" v-model="appPersonallist.patientName" />
|
||||
</view>
|
||||
<view class="name">电话:
|
||||
<input type="text" placeholder="请填写" />
|
||||
<input type="text" placeholder="请输入" v-model="appPersonallist.phone" />
|
||||
</view>
|
||||
<view class="name">地址:
|
||||
<input type="text" placeholder="请填写" />
|
||||
<input type="text" placeholder="请输入" v-model="appPersonallist.address" />
|
||||
</view>
|
||||
<view class="nursetype name">疾病类型:
|
||||
<input type="text" placeholder="请填写" />
|
||||
<view class="nursetype name" style="border: none;" @tap="godisease">
|
||||
疾病类型:
|
||||
<span class="" style="padding-left: 25rpx;text-overflow: ellipsis;"
|
||||
v-for="(item,index) in patientDiseaseInfoList">
|
||||
{{item.diseaseName}}
|
||||
</span>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="finish">完成
|
||||
<view class="finish" @tap="submit()">完成
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
updateInformation,
|
||||
} from '@/api/modify/modify.js';
|
||||
import baseurl from '@/api/baseurl.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
patientId: '',
|
||||
appPersonallist: {
|
||||
patientId: '',
|
||||
patientName: '',
|
||||
phone: '',
|
||||
address: '',
|
||||
cardNo: ' ',
|
||||
areaCode: '',
|
||||
headPictureUrl: '',
|
||||
|
||||
},
|
||||
patientDiseaseInfoList: [], //获取个人信息
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onLoad(options) {
|
||||
this.appPersonallist = JSON.parse(options.appPersonallist)
|
||||
this.patientDiseaseInfoList = this.appPersonallist.patientDiseaseInfoList
|
||||
this.patientDiseaseInfoList.forEach(e => {
|
||||
e.id = e.diseaseId
|
||||
})
|
||||
console.log(this.patientDiseaseInfoList)
|
||||
|
||||
},
|
||||
methods: {
|
||||
godisease() {
|
||||
uni.navigateTo({
|
||||
url: `/pages/disease/disease?diseaseInfoList=${JSON.stringify(this.patientDiseaseInfoList)}`,
|
||||
})
|
||||
},
|
||||
submit() {
|
||||
this.appPersonallist.patientDiseaseInfoList = this.patientDiseaseInfoList
|
||||
updateInformation(this.appPersonallist).then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: '修改成功',
|
||||
duration: 1500
|
||||
});
|
||||
that.show = false;
|
||||
setTimeout(e => {
|
||||
that.goodsList()
|
||||
}, 1500)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
//带参返回
|
||||
onShow() {
|
||||
let that = this
|
||||
uni.$on('disease', function(data) {
|
||||
that.patientDiseaseInfoList = JSON.parse(data.disease)
|
||||
that.patientDiseaseInfoList.forEach(e => {
|
||||
e.diseaseId = e.id
|
||||
})
|
||||
console.log(that.patientDiseaseInfoList)
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.app {
|
||||
background-color: #F4F5F7;
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
color: #000000;
|
||||
padding: 3%;
|
||||
font-size: 36rpx;
|
||||
|
||||
.centercontent {
|
||||
width: 99%;
|
||||
height: 635rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
|
||||
border-radius: 20rpx;
|
||||
margin: 0 auto;
|
||||
|
||||
.finish {
|
||||
width: 217rpx;
|
||||
font-size: 32rpx;
|
||||
color: #FFFFFF;
|
||||
height: 68rpx;
|
||||
line-height: 68rpx;
|
||||
text-align: center;
|
||||
margin-top: 60%;
|
||||
margin-left: 70%;
|
||||
background: #4C7BC9;
|
||||
border-radius: 26rpx;
|
||||
}
|
||||
|
||||
.content {
|
||||
line-height: 100rpx;
|
||||
.name {
|
||||
margin-left: 5%;
|
||||
height: 100rpx;
|
||||
border-bottom: 1rpx solid #D8D4D4;
|
||||
input {
|
||||
font-size: 36rpx;
|
||||
margin-top: -11%;
|
||||
margin-left: 15%;
|
||||
}
|
||||
}
|
||||
.nursetype {
|
||||
input {
|
||||
margin-left: 25%;
|
||||
}
|
||||
}
|
||||
}
|
||||
.Commodity {
|
||||
line-height: 110rpx;
|
||||
margin-left: 5%;
|
||||
border-bottom: 1rpx solid #D8D4D4;
|
||||
.picture {
|
||||
vertical-align: middle;
|
||||
margin-left: 60%;
|
||||
width: 103rpx;
|
||||
height: 103rpx;
|
||||
}
|
||||
.pictureA {
|
||||
margin-left: 3%;
|
||||
width: 18rpx;
|
||||
height: 27rpx;
|
||||
}
|
||||
.head {
|
||||
line-height: 140rpx;
|
||||
margin-left: 5%;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@import "./modify.scss"
|
||||
</style>
|
||||
|
||||
115
pages/user/user.scss
Normal file
115
pages/user/user.scss
Normal file
@ -0,0 +1,115 @@
|
||||
.app {
|
||||
padding: 0;
|
||||
font-size: 35rpx;
|
||||
height: 100vh;
|
||||
|
||||
.External {
|
||||
width: 94%;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
margin: 20rpx auto;
|
||||
padding-left: 5%;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0px 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
|
||||
border-radius: 20rpx;
|
||||
position: relative;
|
||||
|
||||
.righttext {
|
||||
position: absolute;
|
||||
right: 12%;
|
||||
top: 50%;
|
||||
color: #969394;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
image {
|
||||
width: 18rpx;
|
||||
height: 27rpx;
|
||||
position: absolute;
|
||||
right: 5%;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
.lefttext,
|
||||
.righttext {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
.information {
|
||||
width: 94%;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0px 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
|
||||
border-radius: 20rpx;
|
||||
position: absolute;
|
||||
top: 18%;
|
||||
left: 3%;
|
||||
color: #000000;
|
||||
padding-left: 5%;
|
||||
overflow: hidden;
|
||||
font-size: 35rpx;
|
||||
|
||||
.item {
|
||||
// height: 110rpx;
|
||||
line-height: 110rpx;
|
||||
border-bottom: 1rpx solid #D8D4D4;
|
||||
|
||||
.address {
|
||||
position: absolute;
|
||||
height: 80rpx;
|
||||
// font-size: 30rpx;
|
||||
line-height: 40rpx;
|
||||
display: inline-block;
|
||||
width: 80%;
|
||||
margin-left: 30rpx;
|
||||
margin-top: 33rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.user {
|
||||
width: 100%;
|
||||
height: 500rpx;
|
||||
background: #4C7BC9;
|
||||
position: relative;
|
||||
color: #FFFFFF;
|
||||
|
||||
.modify {
|
||||
font-size: 32rpx;
|
||||
position: absolute;
|
||||
right: 3%;
|
||||
top: 22%;
|
||||
}
|
||||
|
||||
.nickname {
|
||||
position: absolute;
|
||||
top: 26%;
|
||||
left: 33%;
|
||||
}
|
||||
|
||||
.phone {
|
||||
position: absolute;
|
||||
top: 13%;
|
||||
left: 33%;
|
||||
}
|
||||
|
||||
.img {
|
||||
width: 150rpx;
|
||||
height: 150rpx;
|
||||
border-radius: 50%;
|
||||
background: #F6F6F6;
|
||||
position: absolute;
|
||||
top: 10%;
|
||||
left: 8%;
|
||||
|
||||
image {
|
||||
width: 100rpx;
|
||||
margin-left: 50%;
|
||||
margin-top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
height: 100rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -5,28 +5,35 @@
|
||||
<image src="../../static/users.png" mode=""></image>
|
||||
</view>
|
||||
<view class="phone">
|
||||
188****8888
|
||||
电话:{{appPersonallist.phone}}
|
||||
</view>
|
||||
<view class="nickname">
|
||||
点此设置昵称
|
||||
</view>
|
||||
<view class="modify">
|
||||
<view class="modify" @tap='updatainfo()'>
|
||||
修改信息
|
||||
<u-icon name="arrow-right" color="#ffffff" size="32"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="information">
|
||||
<view class="item">
|
||||
姓名:
|
||||
姓名:{{appPersonallist.patientName}}
|
||||
</view>
|
||||
<view class="item">
|
||||
电话:
|
||||
电话:{{appPersonallist.phone}}
|
||||
</view>
|
||||
<view class="item">
|
||||
地址:
|
||||
<view class="item" style="height:100%">
|
||||
<view class="" style="display: inline-block;">
|
||||
地址:
|
||||
</view>
|
||||
<view class="address">
|
||||
{{appPersonallist.address}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
疾病类型:
|
||||
<view class="item" style="border:none;">
|
||||
疾病类型:<span style="padding-left: 25rpx;text-overflow: ellipsis;"
|
||||
v-for="(item,index) in appPersonallist.patientDiseaseInfoList"
|
||||
:key="index">{{item.diseaseName}}</span>
|
||||
</view>
|
||||
</view>
|
||||
<view class="External" style="margin: 200rpx auto 0;">
|
||||
@ -34,7 +41,7 @@
|
||||
积分:
|
||||
</view>
|
||||
<view class="righttext">
|
||||
100分
|
||||
{{appPersonallist.integral}}
|
||||
</view>
|
||||
<image src="../../static/jiantou.png" mode=""></image>
|
||||
</view>
|
||||
@ -58,118 +65,39 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
appPersonal,
|
||||
} from '@/api/user/user.js';
|
||||
import baseurl from '@/api/baseurl.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
patientId: 46,
|
||||
appPersonallist: [], //获取个人信息
|
||||
}
|
||||
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
//获取传值
|
||||
this.myInfo()
|
||||
},
|
||||
methods: {
|
||||
//获取个人信息
|
||||
myInfo() {
|
||||
appPersonal(this.patientId).then(res => {
|
||||
console.log(res)
|
||||
this.appPersonallist = res.data
|
||||
})
|
||||
},
|
||||
updatainfo() {
|
||||
console.log()
|
||||
uni.navigateTo({
|
||||
url: `/pages/modify/modify?appPersonallist=${JSON.stringify(this.appPersonallist)}`
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.app {
|
||||
padding: 0;
|
||||
font-size: 36rpx;
|
||||
height: 100vh;
|
||||
|
||||
.External {
|
||||
width: 94%;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
margin: 20rpx auto;
|
||||
padding-left: 5%;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0px 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
|
||||
border-radius: 20rpx;
|
||||
position: relative;
|
||||
|
||||
.righttext {
|
||||
position: absolute;
|
||||
right: 12%;
|
||||
top: 50%;
|
||||
color: #969394;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
image {
|
||||
width: 18rpx;
|
||||
height: 27rpx;
|
||||
position: absolute;
|
||||
right: 5%;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
.lefttext,
|
||||
.righttext {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
.information {
|
||||
width: 94%;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0px 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
|
||||
border-radius: 20rpx;
|
||||
position: absolute;
|
||||
top: 18%;
|
||||
left: 3%;
|
||||
color: #000000;
|
||||
padding-left: 5%;
|
||||
overflow: hidden;
|
||||
|
||||
.item {
|
||||
height: 110rpx;
|
||||
line-height: 110rpx;
|
||||
border-bottom: 1rpx solid #D8D4D4;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.user {
|
||||
width: 100%;
|
||||
height: 500rpx;
|
||||
background: #4C7BC9;
|
||||
position: relative;
|
||||
color: #FFFFFF;
|
||||
|
||||
.modify {
|
||||
font-size: 32rpx;
|
||||
position: absolute;
|
||||
right: 3%;
|
||||
top: 22%;
|
||||
}
|
||||
|
||||
.nickname {
|
||||
position: absolute;
|
||||
top: 26%;
|
||||
left: 33%;
|
||||
}
|
||||
|
||||
.phone {
|
||||
position: absolute;
|
||||
top: 13%;
|
||||
left: 33%;
|
||||
}
|
||||
|
||||
.img {
|
||||
width: 150rpx;
|
||||
height: 150rpx;
|
||||
border-radius: 50%;
|
||||
background: #F6F6F6;
|
||||
position: absolute;
|
||||
top: 10%;
|
||||
left: 8%;
|
||||
|
||||
image {
|
||||
width: 100rpx;
|
||||
margin-left: 50%;
|
||||
margin-top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
height: 100rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@import "./user.scss";
|
||||
</style>
|
||||
|
||||
BIN
static/head.png
Normal file
BIN
static/head.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.3 KiB |
Loading…
Reference in New Issue
Block a user