This commit is contained in:
曹辉 2022-11-09 10:57:02 +08:00
parent 824230893e
commit e19b25ec9b
13 changed files with 290 additions and 472 deletions

View File

@ -2,23 +2,21 @@ import request from "../request.js"
export function userPassWord(data) { export function userPassWord(data) {
return request({ return request({
url: `/nurseApp/PersonLogin/userPassWord`, url: `/nurseApp/personLogin/userPassWord`,
method: 'POST', method: 'POST',
data, data,
}) })
} }
export function updateHeadAvatarHead(userId,File) { export function updateHeadAvatarHead(userId, File) {
return request({ return request({
url: `/nurseApp/PersonLogin/updateHeadAvatarHead?userId=${userId}&File=${File}`, url: `/nurseApp/personLogin/updateHeadAvatarHead?userId=${userId}&File=${File}`,
method: 'POST', method: 'POST',
data, data,
}) })
} }
export function nursePerson(phonenumber,password) { export function nursePerson(phonenumber, password) {
return request({ return request({
url: `/nurseApp/PersonLogin/nursePerson?phonenumber=${phonenumber}&password=${password}`, url: `/nurseApp/personLogin/nursePerson?phonenumber=${phonenumber}&password=${password}`,
method: 'GET' method: 'GET'
}) })
} }

View File

@ -1,10 +1,9 @@
import request from "./request.js" import request from "./request.js"
export function selectMission(nursePersonId,orderStatus,pageNum,pageSize) { export function selectMission(nursePersonId, orderStatus, pageNum, pageSize,nurseItemName) {
return request({ return request({
url: `/nurseApp/personLogin/selectMission?nursePersonId=${nursePersonId}&orderStatus=${orderStatus}&pageNum=${pageNum}&pageSize=${pageSize}`, url: `/nurseApp/personLogin/selectMission?nursePersonId=${nursePersonId}&orderStatus=${orderStatus}&pageNum=${pageNum}&pageSize=${pageSize}&nurseItemName=${nurseItemName}`,
method: 'GET' method: 'GET'
}) })
} }

View File

@ -1,4 +1,4 @@
var baseurl = "http://192.168.16.30:8081"; var baseurl = "http://192.168.16.30:8080";
// var baseurl = "http://192.168.16.48:8081"; // var baseurl = "http://192.168.16.49:8080";
// var baseurl = "http://192.168.16.76:8080"; // var baseurl = "http://192.168.16.76:8080";
export default baseurl export default baseurl

View File

@ -2,7 +2,7 @@ import request from "../request.js"
export function updatePassword(phonenumber, password,) { export function updatePassword(phonenumber, password,) {
return request({ return request({
url: `/nurseApp/PersonLogin/updatePassword?phonenumber=${phonenumber}&password=${password}`, url: `/nurseApp/personLogin/updatePassword?phonenumber=${phonenumber}&password=${password}`,
method: 'POST' method: 'POST'
}) })
} }

View File

@ -3,7 +3,7 @@ import request from "../request.js"
//密码 //密码
export function appLogin(phonenumber, password) { export function appLogin(phonenumber, password) {
return request({ return request({
url: `/nurseApp/PersonLogin/appLogin?phonenumber=${phonenumber}&password=${password}`, url: `/nurseApp/personLogin/appLogin?phonenumber=${phonenumber}&password=${password}`,
method: 'POST' method: 'POST'
}) })
} }

View File

@ -1,7 +1,7 @@
import request from "../request.js" import request from "../request.js"
export function nursePerson(phonenumber,password) { export function nursePerson(phonenumber,password) {
return request({ return request({
url: `/nurseApp/PersonLogin/nursePerson?phonenumber=${phonenumber}&password=${password}`, url: `/nurseApp/personLogin/nursePerson?phonenumber=${phonenumber}&password=${password}`,
method: 'GET' method: 'GET'
}) })
} }

View File

@ -2,7 +2,7 @@ import request from "../request.js"
export function nurseAppLoginSysUser(data) { export function nurseAppLoginSysUser(data) {
return request({ return request({
url: `/nurseApp/PersonLogin/nurseAppLoginSysUser`, url: `/nurseApp/personLogin/nurseAppLoginSysUser`,
method: 'POST', method: 'POST',
data, data,
}) })
@ -10,7 +10,7 @@ export function nurseAppLoginSysUser(data) {
export function personNurseStationLists(pageNum,pageSize) { export function personNurseStationLists(pageNum,pageSize) {
return request({ return request({
url: `/nurseApp/PersonLogin/personNurseStationLists?pageNum=${pageNum}&pageSize=${pageSize}`, url: `/nurseApp/personLogin/personNurseStationLists?pageNum=${pageNum}&pageSize=${pageSize}`,
method: 'get' method: 'get'
}) })
} }

View File

@ -3,7 +3,7 @@
<view class="centercontent"> <view class="centercontent">
<view class="Commodity" @tap="uploadImag()"> <view class="Commodity" @tap="uploadImag()">
头像 头像
<image class="picture" :src="baseurl+appPersonallist.avatar" mode=""></image> <image class="picture" :src="appPersonallist.avatar" mode=""></image>
<image class="pictureA" src="../../static/jiantou.png" mode=""></image> <image class="pictureA" src="../../static/jiantou.png" mode=""></image>
</view> </view>
<view class="content"> <view class="content">
@ -16,30 +16,33 @@
<view class="name">电话 <view class="name">电话
<input type="text" placeholder="请输入" v-model="appPersonallist.phonenumber" /> <input type="text" placeholder="请输入" v-model="appPersonallist.phonenumber" />
</view> </view>
<view class="nursetype name" style="border: none;" > <!-- <view class="nursetype name" style="border: none;" @tap='show=true'>
护理站:{{getNurseStationName(appPersonallist)}} 护理站:{{getNurseStationName(appPersonallist)}}
</view> </view> -->
</view>
<view class="finish" @tap="gofinish()">完成
</view> </view>
</view> </view>
<u-toast ref="uToast" /> <view class="finish" @tap="gofinish()">完成
</view>
<u-select v-model="show" mode="single-column" :list="NurseStationList" @confirm="confirm"></u-select>
<u-toast ref="uToast" />
</view> </view>
</template> </template>
<script> <script>
import {
personNurseStationLists
} from '@/api/register/index.js'
import { import {
userPassWord, userPassWord,
nursePerson nursePerson
} from '@/api/Modifyinformation/Modifyinformation.js'; } from '@/api/Modifyinformation/Modifyinformation.js';
import baseurl from '@/api/baseurl.js' import baseurl from '@/api/baseurl.js'
export default { export default {
data() { data() {
return { return {
show: false,
baseurl: '', //url baseurl: '', //url
NurseStationList: [], //list
appPersonallist: { appPersonallist: {
userId: '', userId: '',
userName: '', userName: '',
@ -48,33 +51,29 @@
avatar: '', avatar: '',
File: '', File: '',
}, },
} }
}, },
computed:{ computed: {
getNurseStationName() { getNurseStationName() {
return data => data?.nurseStationSysUserVOList?.[0]?.nurseStationName || '' return data => data?.nurseStationSysUserVOList?. [0]?.nurseStationName || ''
}, },
}, },
onLoad(options) { onLoad(options) {
this.info();
this.baseurl = baseurl; this.baseurl = baseurl;
const that = this const that = this
this.baseurl = baseurl; try {
uni.getStorage({ const value = uni.getStorageSync('phonenumber');
key: 'phonenumber', if (value) {
success: function(res) { that.phonenumber = value
that.phonenumber = res.data
console.log(that.phonenumber)
} }
}); } catch (e) {}
uni.getStorage({ try {
key: 'password', const value = uni.getStorageSync('password');
success: function(res) { if (value) {
that.password = res.data that.password = value
console.log(that.password)
} }
}); } catch (e) {}
console.log(that.password, '-----', that.phonenumber)
this.myInfo() this.myInfo()
}, },
methods: { methods: {
@ -86,50 +85,59 @@
sizeType: ['original'], sizeType: ['original'],
sourceType: ['album'], sourceType: ['album'],
success(res) { success(res) {
//blob that.appPersonallist.avatar = res.tempFilePaths[0]
console.log(res) }
uni.uploadFile({ })
url: baseurl + '/nurseApp/PersonLogin/updateHeadAvatarHead', },
filePath: res.tempFilePaths[0], //file: (filePath) myInfo() {
name: 'file', nursePerson(this.phonenumber, this.password).then(res => {
formData: { // res.data.avatar = baseurl + res.data.avatar
'userId': '13', this.appPersonallist = res.data
}, })
timeout: 5000, },
success(res) { gofinish() {
console.log(JSON.parse(res.data)) var that = this
that.appPersonallist.avatar = JSON.parse(res.data).imgUrl uni.uploadFile({
url: baseurl + '/nurseApp/personLogin/updateHeadAvatarHead',
filePath: that.appPersonallist.avatar, //file: (filePath)
name: 'file',
formData: { //
'userId': that.appPersonallist.userId,
},
timeout: 5000,
success(res) {
that.appPersonallist.avatar = JSON.parse(res.data).imgUrl
userPassWord(that.appPersonallist).then(res => {
if (res.code == 200) {
that.$refs.uToast.show({
title: '修改成功',
type: 'success',
url: '/pages/personal/personal',
duration: '1500'
})
} else {
that.$refs.uToast.show({
title: res.msg,
type: 'error'
})
} }
}) })
} }
}) })
}, },
confirm(e) {
myInfo() { this.appPersonallist.nurseStationSysUserVOList[0].nurseStationId = e[0].value
nursePerson(this.phonenumber, this.password).then(res => { this.appPersonallist.nurseStationSysUserVOList[0].nurseStationName = e[0]['label']
console.log(res, 'resresres')
this.appPersonallist = res.data
console.log(this.appPersonallist)
})
}, },
gofinish() { //
// this.appPersonallist = JSON.stringify(this.appPersonallist) info() {
// console.log(this.appPersonallist, 'this.appPersonallist') personNurseStationLists(this.pageNum, this.pageSize).then(res => {
userPassWord(this.appPersonallist).then(res => { this.NurseStationList = res.rows.map((e) => {
if (res.code == 200) { return {
this.$refs.uToast.show({ value: e.id,
title: '修改成功', label: e.nurseStationName,
type: 'success',
url:'/pages/personal/personal',
duration: '1500'
})
} else {
console.log(res)
this.$refs.uToast.show({
title: res.msg,
type: 'error'
})
} }
})
}) })
}, },
}, },
@ -144,26 +152,27 @@
padding: 3%; padding: 3%;
font-size: 36rpx; font-size: 36rpx;
.finish {
width: 217rpx;
font-size: 32rpx;
color: #FFFFFF;
height: 68rpx;
line-height: 68rpx;
text-align: center;
position: absolute;
top: 70%;
left: 70%;
background: #4C7BC9;
border-radius: 26rpx;
}
.centercontent { .centercontent {
width: 99%; width: 99%;
height: 521rpx;
background: #FFFFFF; background: #FFFFFF;
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03); box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
border-radius: 20rpx; border-radius: 20rpx;
margin: 0 auto; 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 { .content {
line-height: 100rpx; line-height: 100rpx;
@ -181,6 +190,8 @@
} }
.nursetype { .nursetype {
height: 120rpx;
input { input {
margin-left: 25%; margin-left: 25%;
} }
@ -188,20 +199,26 @@
} }
.Commodity { .Commodity {
line-height: 110rpx; line-height: 130rpx;
margin-left: 5%; margin-left: 5%;
border-bottom: 1rpx solid #D8D4D4; border-bottom: 1rpx solid #D8D4D4;
position: relative;
.picture { .picture {
vertical-align: middle; position: absolute;
margin-left: 60%; right: 10%;
width: 103rpx; top: 50%;
height: 103rpx; transform: translateY(-50%);
width: 110rpx;
height: 110rpx;
border-radius: 50%; border-radius: 50%;
} }
.pictureA { .pictureA {
margin-left: 3%; position: absolute;
right: 2%;
top: 50%;
transform: translateY(-50%);
width: 18rpx; width: 18rpx;
height: 27rpx; height: 27rpx;
} }

View File

@ -3,6 +3,14 @@
color: #C3C1C1; color: #C3C1C1;
font-weight: 400; font-weight: 400;
.forget {
position: absolute;
top: 56%;
left: 70%;
color: #46ABD7;
}
.switch { .switch {
text-align: center; text-align: center;
height: 100rpx; height: 100rpx;
@ -22,7 +30,7 @@
font-size: 41rpx; font-size: 41rpx;
color: #FFFFFF; color: #FFFFFF;
position: absolute; position: absolute;
top: 57%; top: 60%;
left: 10%; left: 10%;
} }

View File

@ -19,7 +19,7 @@
<view class="loginbtn" @tap='pwdlogin'> <view class="loginbtn" @tap='pwdlogin'>
登录 登录
</view> </view>
<view class="loginbtn" style="top: 65%; color: #969394;background-color: #ffffff;" @tap='goregister'> <view class="loginbtn" style="top: 70%; color: #969394;background-color: #ffffff;" @tap='goregister'>
注册 注册
</view> </view>
<u-toast ref="uToast" /> <u-toast ref="uToast" />
@ -35,37 +35,38 @@
checked: false, checked: false,
phonenumber: '', phonenumber: '',
password: '', password: '',
userId:'', userId: '',
}; };
}, },
// //
onLoad(options) {},
onLoad(options) {
console.log(options)
},
methods: { methods: {
// //
pwdlogin() { pwdlogin() {
var that = this var that = this
appLogin(this.phonenumber, this.password).then(res => { appLogin(this.phonenumber, this.password).then(res => {
console.log(res) console.log(res)
if (res.code == 200) { if (res.code == 200) {
uni.setStorageSync("phonenumber", that.phonenumber)
uni.setStorageSync("password", that.password)
// uni.setStorage({
// key: 'phonenumber',
// data: that.phonenumber
// })
// uni.setStorage({
// key: 'password',
// data: that.password
// })
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '登录成功', title: '登录成功',
type: 'success', type: 'success',
url: '/pages/homepage/homepage',
duration: '1500' duration: '1500'
}) })
setTimeout(() => {
uni.setStorage({ uni.reLaunch({
key:'phonenumber', url: '/pages/homepage/homepage',
data:that.phonenumber })
}) }, 1500);
uni.setStorage({
key:'password',
data:that.password
})
} else { } else {
console.log(res) console.log(res)
this.$refs.uToast.show({ this.$refs.uToast.show({
@ -73,7 +74,7 @@
type: 'error' type: 'error'
}) })
} }
}) })
}, },
// //
@ -93,96 +94,5 @@
</script> </script>
<style lang="scss"> <style lang="scss">
.app { @import './login.scss';
font-family: DengXian;
color: #C3C1C1;
font-weight: 400;
height: 100vh;
.forget {
position: absolute;
top: 53%;
left: 70%;
color: #46ABD7;
}
.loginbtn {
width: 80%;
height: 100rpx;
text-align: center;
line-height: 100rpx;
background: #4C7BC9;
border-radius: 51rpx;
font-size: 41rpx;
color: #FFFFFF;
position: absolute;
top: 58%;
left: 10%;
}
// ::v-deep .u-checkbox {
// margin-top: 345%;
// margin-left: 50%;
// font-size: 32rpx;
// color: #BFBFBF;
// }
.loginphone {
background-color: #fff;
width: 80%;
height: 150rpx;
position: absolute;
left: 10%;
top: 23%;
input {
font-size: 45rpx;
color: #000000;
}
::v-deep .uni-input-placeholder {
padding-left: 40rpx;
font-size: 41rpx;
font-weight: 400;
color: #C3C1C1;
}
.phone {
padding-left: 40rpx;
height: 150rpx;
box-shadow: 0px 9px 31px 9px rgba(0, 0, 0, 0.03);
}
}
.logincode {
position: absolute;
left: 10%;
::v-deep .u-input {
border: 0;
}
::v-deep .u-input__input {
padding-left: 20rpx;
color: #000000;
font-size: 42rpx;
font-weight: 400;
height: 100%;
// line-height: 150rpx;
}
}
.title {
height: 50rpx;
font-size: 52rpx;
font-weight: bold;
color: #000000;
line-height: 44rpx;
position: absolute;
top: 13%;
left: 13%;
}
}
</style> </style>

View File

@ -1,14 +1,17 @@
<template> <template>
<view class="app"> <view class="app">
<view class="user"> <view class="user">
<view class="img"> <view class="img" v-if="appPersonallist.avatar==''||!appPersonallist.avatar">
<image style="height: 110rpx;" src="../../static/person.png" mode=""></image>
</view>
<view class="img" v-else>
<image :src="baseurl+appPersonallist.avatar" mode=""></image> <image :src="baseurl+appPersonallist.avatar" mode=""></image>
</view> </view>
<view class="phone"> <!-- <view class="phone">
电话{{appPersonallist.phonenumber}} {{appPersonallist.phonenumber}}
</view> </view> -->
<view class="nickname">昵称 <view class="nickname">
{{appPersonallist.userName}} {{appPersonallist.userName}}
</view> </view>
<view class="modify" @tap='updatainfo()'> <view class="modify" @tap='updatainfo()'>
修改信息 修改信息
@ -58,40 +61,34 @@
return { return {
baseurl: '', //url baseurl: '', //url
phonenumber: '', phonenumber: '',
avatar:'', avatar: '',
password: '', password: '',
userId:'', userId: '',
appPersonallist: [], // appPersonallist: [], //
nurseStationSysUserVOList: [], nurseStationSysUserVOList: [],
} }
}, },
onLoad(options) { onLoad(options) {
this.baseurl = baseurl;
// let that = this
const that=this try {
this.baseurl = baseurl; const value = uni.getStorageSync('phonenumber');
uni.getStorage({ if (value) {
key: 'phonenumber', that.phonenumber = value
success: function(res) { }
that.phonenumber = res.data } catch (e) {}
console.log(that.phonenumber) try {
} const value = uni.getStorageSync('password');
}); if (value) {
uni.getStorage({ that.password = value
key: 'password', }
success: function(res) { } catch (e) {}
that.password = res.data this.myInfo()
console.log(that.password) },
}
});
console.log(that.password,'-----',that.phonenumber)
this.myInfo()
},
methods: { methods: {
myInfo() { myInfo() {
console.log(this.phonenumber)
nursePerson(this.phonenumber, this.password).then(res => { nursePerson(this.phonenumber, this.password).then(res => {
this.appPersonallist = res.data this.appPersonallist = res.data
}) })
@ -187,35 +184,35 @@
font-size: 32rpx; font-size: 32rpx;
position: absolute; position: absolute;
right: 3%; right: 3%;
top: 22%; top: 18%;
} }
.nickname { .nickname {
position: absolute; position: absolute;
top: 26%; top: 18%;
left: 30%; left: 28%;
} }
.phone { .phone {
position: absolute; position: absolute;
top: 13%; top: 13%;
left: 30%; left: 28%;
} }
.img { .img {
width: 150rpx; width: 120rpx;
height: 150rpx; height: 120rpx;
position: absolute; position: absolute;
top: 10%; top: 10%;
left: 8%; left: 5%;
image { image {
border-radius: 50%; border-radius: 50%;
width: 130rpx; width: 120rpx;
margin-left: 50%; margin-left: 50%;
margin-top: 50%; margin-top: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
height: 130rpx; height: 120rpx;
} }
} }
} }

View File

@ -1,19 +1,114 @@
.app { .app {
font-family: DengXian; height: 100vh;
color: #C3C1C1; padding: 20rpx 0;
font-weight: 400;
.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;
span {
margin-left: 3%;
}
.addition {
line-height: 100rpx;
font-size: 34rpx;
font-weight: 400;
margin-left: 3%;
}
.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;
}
}
}
.radio-content {
// padding-top: 50rpx;
margin: 50rpx auto;
height: 80rpx;
line-height: 11rpx;
font-size: 28rpx;
.agreement {
color: #878987;
margin-left: 25%;
}
.radio-right {
margin-left: 20%;
.radio-default {
border: 2rpx solid #0fbda6;
}
.radio {
width: 30rpx;
height: 30rpx;
border-radius: 70%;
border: 2rpx solid #178ffb;
margin: 6px 25px -20rpx -5rpx;
.radio-active {
width: 16rpx;
height: 16rpx;
border-radius: 50%;
background-color: #178ffb;
margin-left: 22%;
margin-top: 22%;
}
}
}
}
.switch { .switch {
text-align: center; text-align: center;
line-height: 60rpx; line-height: 60rpx;
color: #46ABD7; color: #46ABD7;
position: absolute; position: absolute;
top: 66%; top: 70%;
left: 10%;
} }
.loginbtn { .loginbtn {
width: 80%; width: 70%;
height: 100rpx; height: 100rpx;
text-align: center; text-align: center;
line-height: 100rpx; line-height: 100rpx;
@ -22,59 +117,8 @@
font-size: 41rpx; font-size: 41rpx;
color: #FFFFFF; color: #FFFFFF;
position: absolute; position: absolute;
top: 57%; top: 60%;
left: 10%; left: 15%;
} }
.loginphone {
background-color: #fff;
width: 80%;
height: 162rpx;
position: absolute;
left: 10%;
top: 23%;
input {
font-size: 40rpx;
color: #000000;
}
::v-deep .uni-input-placeholder {
padding-left: 40rpx;
font-size: 41rpx;
font-weight: 400;
color: #C3C1C1;
}
.phone {
padding-left: 40rpx;
height: 100%;
box-shadow: 0px 9px 31px 9px rgba(0, 0, 0, 0.03);
}
}
.logincode {
position: absolute;
left: 10%;
::v-deep .u-input__input {
padding-left: 20rpx;
color: #000000;
font-size: 41rpx;
font-weight: 400;
height: 100%;
}
}
.title {
height: 50rpx;
font-size: 52rpx;
font-weight: bold;
color: #000000;
line-height: 44rpx;
position: absolute;
top: 13%;
left: 13%;
}
} }

View File

@ -4,7 +4,7 @@
<view class="lefttext"> <view class="lefttext">
姓名 姓名
</view> </view>
<input class="righttext" type="text" placeholder="请输入" v-model="appPersonallist.nickName" maxlength="30"/> <input class="righttext" type="text" placeholder="请输入" v-model="appPersonallist.nickName" maxlength="30" />
</view> </view>
<view class="item"> <view class="item">
<view class="lefttext"> <view class="lefttext">
@ -30,7 +30,6 @@
<view class="item" @tap='show=true'> <view class="item" @tap='show=true'>
<span>护理站</span> <span>护理站</span>
<text class='addition'>{{nurseStationName}}</text> <text class='addition'>{{nurseStationName}}</text>
<u-select v-model="show" mode="single-column" :list="listinfo" @confirm="confirm"></u-select>
</view> </view>
<view class="radio-content" @tap="changeRadio"> <view class="radio-content" @tap="changeRadio">
<view class="radio-right"> <view class="radio-right">
@ -47,6 +46,7 @@
<view class="switch" style="right:5%" @tap='gologin'> <view class="switch" style="right:5%" @tap='gologin'>
已有账号,去登录 已有账号,去登录
</view> </view>
<u-select v-model="show" mode="single-column" :list="listinfo" @confirm="confirm"></u-select>
<u-toast ref="uToast" /> <u-toast ref="uToast" />
</view> </view>
</template> </template>
@ -54,20 +54,16 @@
import { import {
nurseAppLoginSysUser, nurseAppLoginSysUser,
personNurseStationLists personNurseStationLists
} from '../../api/register/index.js' } from '@/api/register/index.js'
export default { export default {
data() { data() {
return { return {
listinfo: [], listinfo: [],
show: false, show: false,
radio: 1, // radio: 1, //
nickName: '',
userId: 13,
userName: 123,
nurseStationName: '', nurseStationName: '',
pageSize: 999, pageSize: 999,
pageNum: 1, pageNum: 1,
total: 0,
appPersonallist: { appPersonallist: {
nickName: '', nickName: '',
newpassword: '', newpassword: '',
@ -75,40 +71,15 @@
password: '', password: '',
nurseStationIds: '', nurseStationIds: '',
} }
}; };
}, },
onLoad() { onLoad() {
this.info() this.info()
}, },
onReachBottom() { //
if (this.listinfo.length >= this.total) {} else {
this.pageNum++
personNurseStationLists(this.pageNum, this.pageSize).then(res => {
res.rows.forEach(e => {
this.list.push(e)
})
})
}
},
onPullDownRefresh() { //
this.pageNum = 1;
personNurseStationLists(this.PageNum, this.pageSize).then(res => {
this.listinfo = res.rows
this.total = res.total
})
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
},
methods: { methods: {
// //
info() { info() {
personNurseStationLists(this.pageNum, this.pageSize).then(res => { personNurseStationLists(this.pageNum, this.pageSize).then(res => {
console.log(res)
this.total = res.total
this.listinfo = res.rows.map((e) => { this.listinfo = res.rows.map((e) => {
return { return {
value: e.id, value: e.id,
@ -118,12 +89,9 @@
}) })
}, },
confirm(e) { confirm(e) {
console.log(e);
this.appPersonallist.nurseStationIds = e[0].value this.appPersonallist.nurseStationIds = e[0].value
this.nurseStationName = e[0]['label'] this.nurseStationName = e[0]['label']
console.log(e[0]['label'])
}, },
// //
getInfo() { getInfo() {
nurseAppLoginSysUser(this.appPersonallist).then(res => { nurseAppLoginSysUser(this.appPersonallist).then(res => {
@ -161,7 +129,6 @@
url: `/pages/login/login?phonenumber=${this.phonenumber}&password=${this.password}` url: `/pages/login/login?phonenumber=${this.phonenumber}&password=${this.password}`
}) })
}, },
changeRadio() { changeRadio() {
if (this.radio == 1) { if (this.radio == 1) {
this.radio = 2; this.radio = 2;
@ -174,127 +141,5 @@
</script> </script>
<style lang="scss"> <style lang="scss">
.app { @import './register.scss';
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;
span {
margin-left: 3%;
}
.addition {
line-height: 100rpx;
font-size: 34rpx;
font-weight: 400;
margin-left: 3%;
}
.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;
}
}
}
.radio-content {
padding-top: 50rpx;
height: 80rpx;
line-height: 11rpx;
font-size: 28rpx;
.agreement {
color: #878987;
margin-left: 25%;
}
.radio-right {
margin-left: 20%;
.radio-default {
border: 2rpx solid #0fbda6;
}
.radio {
width: 30rpx;
height: 30rpx;
border-radius: 70%;
border: 2rpx solid #178ffb;
margin: 6px 25px -20rpx -5rpx;
.radio-active {
width: 16rpx;
height: 16rpx;
border-radius: 50%;
background-color: #178ffb;
margin-left: 22%;
margin-top: 22%;
}
}
}
}
.switch {
text-align: center;
line-height: 60rpx;
color: #46ABD7;
position: absolute;
top: 70%;
}
.loginbtn {
width: 70%;
height: 100rpx;
text-align: center;
line-height: 100rpx;
background: #4C7BC9;
border-radius: 51rpx;
font-size: 41rpx;
color: #FFFFFF;
position: absolute;
top: 57%;
left: 15%;
}
}
</style> </style>