Merge remote-tracking branch 'origin/dev' into dev
# Conflicts: # pages/Aftersalesdetails/Aftersalesdetails.vue
This commit is contained in:
commit
0666c1c2f0
@ -0,0 +1,7 @@
|
|||||||
|
import request from "../request.js"
|
||||||
|
export function appServiceOrder(id,pageSize,pageNum) {
|
||||||
|
return request({
|
||||||
|
url: `/nurseApp/login/appServiceOrder?pageSize=${pageSize}&pageNum=${pageNum}&patientId=${id}`,
|
||||||
|
method: 'GET'
|
||||||
|
})
|
||||||
|
}
|
||||||
28
api/ServiceDetails/ServiceDetails.js
Normal file
28
api/ServiceDetails/ServiceDetails.js
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
import request from "../request.js"
|
||||||
|
|
||||||
|
export function getOrderPatientInfo(orderNo) {
|
||||||
|
return request({
|
||||||
|
url: `/nurseApp/login/getOrderPatientInfo?orderNo=${orderNo}`,
|
||||||
|
method: 'GET'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function getAppStationItemInfo(stationId,stationItemId,stationItemPriceId) {
|
||||||
|
return request({
|
||||||
|
url: `/nurseApp/login/getAppStationItemInfo?stationId=${stationId}&stationItemId=${stationItemId}&stationItemPriceId=${stationItemPriceId}`,
|
||||||
|
method: 'GET'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function introductionList(nurseStationId) {
|
||||||
|
return request({
|
||||||
|
url: `/nurseApplet/nearbyNursingStation/introductionList?nurseStationId=${nurseStationId}`,
|
||||||
|
method: 'GET'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function cancellationOrder(appointmentOrderId) {
|
||||||
|
return request({
|
||||||
|
url: `/nurseApp/login/cancellationOrder?appointmentOrderId=${appointmentOrderId}`,
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
8
api/cancelorder/cancelorder.js
Normal file
8
api/cancelorder/cancelorder.js
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
import request from "../request.js"
|
||||||
|
|
||||||
|
export function cancellationOrder(appointmentOrderId,cancelAppointmentReason) {
|
||||||
|
return request({
|
||||||
|
url: `/nurseApp/login/cancellationOrder?appointmentOrderId=${appointmentOrderId}&cancelAppointmentReason=${cancelAppointmentReason}`,
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
8
api/forgotPassword/forgotPassword.js
Normal file
8
api/forgotPassword/forgotPassword.js
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
import request from "../request.js"
|
||||||
|
|
||||||
|
export function ForgotPassword(phone, password,verification) {
|
||||||
|
return request({
|
||||||
|
url: `/nurseApp/login/appForgotPassword?phone=${phone}&password=${password}&verification=${verification}`,
|
||||||
|
method: 'POST'
|
||||||
|
})
|
||||||
|
}
|
||||||
17
api/modify/modify.js
Normal file
17
api/modify/modify.js
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
import request from "../request.js"
|
||||||
|
|
||||||
|
// 修改信息
|
||||||
|
export function updateInformation(data){
|
||||||
|
return request({
|
||||||
|
url: '/nurseApp/login/updateInformation',
|
||||||
|
method: 'POST',
|
||||||
|
data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function appPersonal(patientId) {
|
||||||
|
return request({
|
||||||
|
url: `/nurseApp/login/appPersonal?patientId=${patientId}`,
|
||||||
|
method: 'GET'
|
||||||
|
})
|
||||||
|
}
|
||||||
7
api/user/user.js
Normal file
7
api/user/user.js
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import request from "../request.js"
|
||||||
|
export function appPersonal(patientId) {
|
||||||
|
return request({
|
||||||
|
url: `/nurseApp/login/appPersonal?patientId=${patientId}`,
|
||||||
|
method: 'GET'
|
||||||
|
})
|
||||||
|
}
|
||||||
@ -83,7 +83,7 @@
|
|||||||
padding: 3%;
|
padding: 3%;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
|
|
||||||
//按钮修改申请和撤销申请
|
//按钮修改申请和撤销申请
|
||||||
.evaluate {
|
.evaluate {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@ -2,42 +2,22 @@
|
|||||||
<view class="app">
|
<view class="app">
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="name">
|
<view class="name">
|
||||||
2022-10-11 15:44
|
{{list.createTime}}
|
||||||
<span>待服务</span>
|
<span>{{list.orderStatus=='WAIT_PAY'?'待付款':''}}
|
||||||
|
{{list.orderStatus=='WAIT_DISPATCH'?'待派单':''}}
|
||||||
|
{{list.orderStatus=='NOT_FINISH'?'未完成':''}}
|
||||||
|
{{list.orderStatus=='COMPLETE'?'服务完成':''}}</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="details">
|
<view class="details">
|
||||||
<view class="detailslist">
|
<view class="detailslist">
|
||||||
<image src="/static/fuwutu.png" mode=""></image>
|
<image src="/static/fuwutu.png" mode=""></image>
|
||||||
<view class="model">
|
<view class="model">
|
||||||
<view class="top">
|
<view class="top">
|
||||||
<span>换药</span>
|
<span>{{list.nurseItemName}}</span>
|
||||||
<span>¥50.0</span>
|
<span>¥{{list.totalPrice}}</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="bottom">
|
<view class="bottom">
|
||||||
<span>服务时长:1小时</span>
|
<span>服务时长:{{list.itemServeDurationUnit}}</span>
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="submit" @tap="gofinished" >
|
|
||||||
确认完成
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="content">
|
|
||||||
<view class="name">
|
|
||||||
2022-10-11 15:44
|
|
||||||
<span>完成</span>
|
|
||||||
</view>
|
|
||||||
<view class="details">
|
|
||||||
<view class="detailslist">
|
|
||||||
<image src="/static/fuwutu.png" mode=""></image>
|
|
||||||
<view class="model">
|
|
||||||
<view class="top">
|
|
||||||
<span>换药</span>
|
|
||||||
<span>¥50.0</span>
|
|
||||||
</view>
|
|
||||||
<view class="bottom">
|
|
||||||
<span>服务时长:1小时</span>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -46,22 +26,37 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import baseurl from '@/api/baseurl.js'
|
||||||
|
import {
|
||||||
|
appServiceOrder
|
||||||
|
} from '@/api/Nursingstationserviceorder/Nursingstationserviceorder.js'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
patientId: 46,
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
list: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.getinfo()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getinfo() {
|
||||||
|
appServiceOrder(this.patientId, this.pageNum, this.pageSize).then(res => {
|
||||||
|
// console.log(res)
|
||||||
|
this.list = res.rows[0];
|
||||||
|
console.log(this.list)
|
||||||
|
})
|
||||||
|
},
|
||||||
gofinished() {
|
gofinished() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/Service Details/Service Details'
|
url: '/pages/ServiceDetails/ServiceDetails'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,10 +9,10 @@
|
|||||||
<image src="/static/fuwutu.png" mode=""></image>
|
<image src="/static/fuwutu.png" mode=""></image>
|
||||||
<view class="model">
|
<view class="model">
|
||||||
<view class="top">
|
<view class="top">
|
||||||
<span>济南护理万家有限公司</span>
|
<span>{{nursestationlist.nurseStationName}}</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="bottom">
|
<view class="bottom">
|
||||||
<span>济南市历下区和平路47号诚基中心 6号楼-118 </span>
|
<span>{{nursestationlist.address}}</span>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -22,8 +22,9 @@
|
|||||||
联系我们
|
联系我们
|
||||||
</view>
|
</view>
|
||||||
<view class="Navigation">
|
<view class="Navigation">
|
||||||
<image src="/static/daohang.png" mode="">导航</image>
|
<image src="/static/daoh.png" mode="">导航</image>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -31,26 +32,26 @@
|
|||||||
<view class="name">
|
<view class="name">
|
||||||
服务项目
|
服务项目
|
||||||
</view>
|
</view>
|
||||||
<view class="drug">·换药 </view>
|
<view class="drug">·{{orderlist.nurseItemName}} </view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="content" style="height: 390rpx;line-height: 60rpx;padding:3% ;">服务信息
|
<view class="content" style="height: 390rpx;line-height: 60rpx;padding:3% ;">服务信息
|
||||||
<view class="contacts">·联系人:某某某</view>
|
<view class="contacts">·联系人:{{list.patientName}}</view>
|
||||||
<view class="contacts">·电话:1888888888</view>
|
<view class="contacts">·电话:{{list.phone}}</view>
|
||||||
<view class="contacts">·地址:某某省某某市某区</view>
|
<view class="contacts">·地址:{{list.serviceAddress}}</view>
|
||||||
<view class="contacts">·时间:10月10号</view>
|
<view class="contacts">·时间:{{list.serviceDate}}</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="Package">套餐信息:
|
<view class="Package">套餐信息:
|
||||||
<span>¥50.0</span>
|
<span>¥{{orderlist.nurseItemPrice}}</span>
|
||||||
<view class="detail">
|
<view class="detail">
|
||||||
·气管切开置管护理
|
·{{orderlist.nurseItemName}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="Consumablespackage">耗材包详情:
|
<view class="Consumablespackage" v-if='orderlist.itemConsumableList'>耗材包详情:
|
||||||
<span>¥50.0</span>
|
<span>¥{{orderlist.itemConsumableList[0].consumablePrice}}</span>
|
||||||
<view class="detail">
|
<view class="detail" >
|
||||||
·一次性换药包X1,一次性注射器X1
|
·{{orderlist.itemConsumableList[0].consumableDetail}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="remarks">
|
<view class="remarks">
|
||||||
@ -58,21 +59,68 @@
|
|||||||
<input placeholder="">
|
<input placeholder="">
|
||||||
</view>
|
</view>
|
||||||
<view class="evaluate">
|
<view class="evaluate">
|
||||||
<view class="cancelorder">取消订单</view>
|
<view class="cancelorder" @tap="cancelorderment()">取消订单</view>
|
||||||
<view class="cancelorder " style="background: #4C7BC9;">评价</view>
|
<view class="cancelorder " style="background: #4C7BC9;">评价</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import baseurl from '@/api/baseurl.js'
|
||||||
|
import {
|
||||||
|
getOrderPatientInfo,
|
||||||
|
getAppStationItemInfo,
|
||||||
|
introductionList,
|
||||||
|
cancellationOrder
|
||||||
|
} from '@/api/ServiceDetails/ServiceDetails.js'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
// patientId: 46,
|
||||||
|
list:[],
|
||||||
|
orderlist:[],//获取耗材包详情
|
||||||
|
nursestationlist:[],// 护理站信息列表
|
||||||
|
stationId:3,
|
||||||
|
stationItemId:3,
|
||||||
|
stationItemPriceId:4,
|
||||||
|
nurseStationId:2,
|
||||||
|
orderNo:'00001511774895025200',
|
||||||
|
appointmentOrderId:16,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.getinfo()
|
||||||
|
this.getPatientInfo()
|
||||||
|
this.getlist()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getinfo() {
|
||||||
|
getOrderPatientInfo(this.orderNo).then(res => {
|
||||||
|
console.log(res)
|
||||||
|
this.list = res.data;
|
||||||
|
// console.log(this.list)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 护理站信息列表
|
||||||
|
getlist() {
|
||||||
|
introductionList(this.nurseStationId).then(res => {
|
||||||
|
this.nursestationlist = res[0];
|
||||||
|
console.log(this.nursestationlist)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//获取耗材包详情
|
||||||
|
getPatientInfo(stationId, stationItemId, stationItemPriceId) {
|
||||||
|
getAppStationItemInfo(this.stationId, this.stationItemId, this.stationItemPriceId).then(res => {
|
||||||
|
this.orderlist = res.data
|
||||||
|
console.log(this.orderlist)
|
||||||
|
//被护理人信
|
||||||
|
})
|
||||||
|
},
|
||||||
|
cancelorderment(){
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/cancelorder/cancelorder?nurseItemPrice=${this.orderlist.nurseItemPrice}`
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@ -83,6 +131,7 @@
|
|||||||
padding: 2%;
|
padding: 2%;
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
padding-top: 10rpx;
|
padding-top: 10rpx;
|
||||||
|
|
||||||
// 服务商家
|
// 服务商家
|
||||||
.detail {
|
.detail {
|
||||||
margin-top: 3%;
|
margin-top: 3%;
|
||||||
@ -93,6 +142,7 @@
|
|||||||
margin-left: 10%;
|
margin-left: 10%;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.name {
|
.name {
|
||||||
width: 95%;
|
width: 95%;
|
||||||
height: 90rpx;
|
height: 90rpx;
|
||||||
@ -102,7 +152,8 @@
|
|||||||
border-bottom: 1rpx solid #D8D4D4;
|
border-bottom: 1rpx solid #D8D4D4;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
//按钮取消订单和评价
|
|
||||||
|
//按钮取消订单和评价
|
||||||
.evaluate {
|
.evaluate {
|
||||||
display: flex;
|
display: flex;
|
||||||
float: right;
|
float: right;
|
||||||
@ -138,6 +189,7 @@
|
|||||||
margin-left: 15%;
|
margin-left: 15%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 耗材包 */
|
/* 耗材包 */
|
||||||
.Consumablespackage {
|
.Consumablespackage {
|
||||||
width: 94%;
|
width: 94%;
|
||||||
@ -180,7 +232,8 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//服务项目和服务商家
|
|
||||||
|
//服务项目和服务商家
|
||||||
.content {
|
.content {
|
||||||
width: 95%;
|
width: 95%;
|
||||||
height: 336rpx;
|
height: 336rpx;
|
||||||
@ -209,11 +262,10 @@
|
|||||||
|
|
||||||
.details {
|
.details {
|
||||||
height: 250rpx;
|
height: 250rpx;
|
||||||
|
|
||||||
.call {
|
.call {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-top: -5%;
|
margin-top: -7%;
|
||||||
|
margin-left: 3%;
|
||||||
.Navigation {
|
.Navigation {
|
||||||
width: 103rpx;
|
width: 103rpx;
|
||||||
height: 48rpx;
|
height: 48rpx;
|
||||||
@ -224,7 +276,6 @@
|
|||||||
line-height: 48rpx;
|
line-height: 48rpx;
|
||||||
margin-left: 3%;
|
margin-left: 3%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
image {
|
image {
|
||||||
width: 24rpx;
|
width: 24rpx;
|
||||||
height: 24rpx;
|
height: 24rpx;
|
||||||
|
|||||||
113
pages/cancelorder/cancelorder.vue
Normal file
113
pages/cancelorder/cancelorder.vue
Normal file
@ -0,0 +1,113 @@
|
|||||||
|
<template>
|
||||||
|
<view class="app">
|
||||||
|
<view class="content">退款金额
|
||||||
|
<span>¥{{orderlist.nurseItemPrice}}</span>
|
||||||
|
</view>
|
||||||
|
<view class="reason">
|
||||||
|
<view class="ability">退款原因</view>
|
||||||
|
<input type="text" placeholder="请输入退款原因" v-model="cancelAppointmentReason">
|
||||||
|
</view>
|
||||||
|
<view class="ConfirmCancel" @tap="gocancel()">确认取消
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<u-toast ref="uToast" />
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import baseurl from '@/api/baseurl.js'
|
||||||
|
import {
|
||||||
|
cancellationOrder
|
||||||
|
} from '@/api/cancelorder/cancelorder.js'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
orderlist: [],
|
||||||
|
appointmentOrderId: 14,
|
||||||
|
cancelAppointmentReason: '',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(options) {
|
||||||
|
console.log(options)
|
||||||
|
this.orderlist.nurseItemPrice = options.nurseItemPrice
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
gocancel() {
|
||||||
|
cancellationOrder(this.appointmentOrderId, this.cancelAppointmentReason).then(res => {
|
||||||
|
if (res.code == 500) {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: res.msg,
|
||||||
|
type: 'error',
|
||||||
|
})
|
||||||
|
} else if (res.code == 200) {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: '取消成功',
|
||||||
|
type: 'success',
|
||||||
|
toast: 1000
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.app {
|
||||||
|
background-color: #F4F5F7;
|
||||||
|
width: 100%;
|
||||||
|
height: 100vh;
|
||||||
|
color: #000000;
|
||||||
|
|
||||||
|
.ConfirmCancel {
|
||||||
|
width: 217rpx;
|
||||||
|
height: 68rpx;
|
||||||
|
background: #4C7BC9;
|
||||||
|
border-radius: 26rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
line-height: 68rpx;
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 65%;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reason {
|
||||||
|
width: 95%;
|
||||||
|
height: 342rpx;
|
||||||
|
background: #FFFFFF;
|
||||||
|
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
|
||||||
|
border-radius: 20rpx;
|
||||||
|
margin: 10px auto;
|
||||||
|
padding: 2%;
|
||||||
|
font-size: 30rpx;
|
||||||
|
|
||||||
|
.ability {
|
||||||
|
width: 100%;
|
||||||
|
height: 60rpx;
|
||||||
|
border-bottom: 1rpx solid #D8D4D4;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
width: 95%;
|
||||||
|
height: 96rpx;
|
||||||
|
background: #FFFFFF;
|
||||||
|
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
|
||||||
|
border-radius: 20rpx;
|
||||||
|
margin: 0 auto;
|
||||||
|
line-height: 70rpx;
|
||||||
|
padding: 2%;
|
||||||
|
font-size: 30rpx;
|
||||||
|
|
||||||
|
span {
|
||||||
|
float: right;
|
||||||
|
font-size: 38rpx;
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
</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;
|
color: #C3C1C1;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
height:100vh;
|
height:100vh;
|
||||||
|
.forget{
|
||||||
|
position: absolute;
|
||||||
|
top: 67%;
|
||||||
|
left: 10%;
|
||||||
|
color: #46ABD7;
|
||||||
|
}
|
||||||
.switch {
|
.switch {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
@ -29,7 +35,7 @@
|
|||||||
.loginphone {
|
.loginphone {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
width: 80%;
|
width: 80%;
|
||||||
height: 162rpx;
|
height: 150rpx;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 10%;
|
left: 10%;
|
||||||
top: 23%;
|
top: 23%;
|
||||||
@ -48,7 +54,7 @@
|
|||||||
|
|
||||||
.phone {
|
.phone {
|
||||||
padding-left: 40rpx;
|
padding-left: 40rpx;
|
||||||
height: 100%;
|
height: 150rpx;
|
||||||
box-shadow: 0px 9px 31px 9px rgba(0, 0, 0, 0.03);
|
box-shadow: 0px 9px 31px 9px rgba(0, 0, 0, 0.03);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -56,8 +62,9 @@
|
|||||||
.logincode {
|
.logincode {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 10%;
|
left: 10%;
|
||||||
|
::v-deep .u-input{
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
|
||||||
::v-deep .u-input__input {
|
::v-deep .u-input__input {
|
||||||
padding-left: 20rpx;
|
padding-left: 20rpx;
|
||||||
@ -78,4 +85,5 @@
|
|||||||
top: 13%;
|
top: 13%;
|
||||||
left: 13%;
|
left: 13%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -6,14 +6,26 @@
|
|||||||
<view class="loginphone">
|
<view class="loginphone">
|
||||||
<input class="phone" type="text" placeholder="手机号码" maxlength="11" v-model="phone" />
|
<input class="phone" type="text" placeholder="手机号码" maxlength="11" v-model="phone" />
|
||||||
</view>
|
</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"
|
<u-input class='code phone' placeholder="密码" maxlength="10" v-model="password" type="password"
|
||||||
:border="true" :password-icon="true" />
|
:border="true" :password-icon="true" />
|
||||||
</view>
|
</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>
|
||||||
<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>
|
</view>
|
||||||
<u-toast ref="uToast" />
|
<u-toast ref="uToast" />
|
||||||
@ -21,36 +33,40 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
appLoginpwd
|
appLoginpwd,
|
||||||
|
appLoginvfn
|
||||||
} from '../../api/login/index.js'
|
} from '../../api/login/index.js'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
phone: '13645678906',
|
phone: '13645678906',
|
||||||
password: '123456',
|
password: '123456',
|
||||||
|
verification: '111111',
|
||||||
|
getCodeText: '获取验证码', //获取验证码的文字
|
||||||
|
getCodeBtnColor: "#4C7BC9", //获取验证码的color
|
||||||
|
getCodeisWaiting: false, //判断是否在倒计时中
|
||||||
|
switchs: false, //切换验证码 密码登录
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
//获取到传值
|
//获取到传值
|
||||||
onLoad(options) {},
|
onLoad(options) {
|
||||||
|
this.switchs = options.switchs
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//密码登录
|
//验证码登录
|
||||||
pwdlogin() {
|
verificationlogin() {
|
||||||
appLoginpwd(this.phone, this.password).then(res => {
|
appLoginvfn(this.phone, this.verification).then(res => {
|
||||||
|
console.log(res)
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
if (res.data.registerFlag == false) {
|
if (res.data.registerFlag == false) {
|
||||||
uni.setStorage({
|
|
||||||
key: 'patientId',
|
|
||||||
data: res.data.patientId,
|
|
||||||
success: function() {
|
|
||||||
console.log('patientId保存成功');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
title: res.data.message,
|
title: res.data.message,
|
||||||
type: 'success',
|
type: 'success',
|
||||||
|
url: '',
|
||||||
duration: '1500'
|
duration: '1500'
|
||||||
})
|
})
|
||||||
setTimeout(() => {
|
setInterval(() => {
|
||||||
|
//TODO
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: '/pages/homepage/homepage',
|
url: '/pages/homepage/homepage',
|
||||||
})
|
})
|
||||||
@ -62,6 +78,39 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
} else {
|
} 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({
|
this.$refs.uToast.show({
|
||||||
title: res.msg,
|
title: res.msg,
|
||||||
type: 'error'
|
type: 'error'
|
||||||
@ -75,14 +124,135 @@
|
|||||||
url: '/pages/register/register'
|
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>
|
</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="centercontent">
|
||||||
<view class="Commodity">
|
<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>
|
<image class="pictureA" src="../../static/jiantou.png" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="name">昵称:
|
<view class="name">昵称:
|
||||||
<input type="text" placeholder="请填写" />
|
<input type="text" placeholder="请输入" />
|
||||||
</view>
|
</view>
|
||||||
<view class="name">姓名:
|
<view class="name">姓名:
|
||||||
<input type="text" placeholder="请填写" />
|
<input type="text" placeholder="请输入" v-model="appPersonallist.patientName" />
|
||||||
</view>
|
</view>
|
||||||
<view class="name">电话:
|
<view class="name">电话:
|
||||||
<input type="text" placeholder="请填写" />
|
<input type="text" placeholder="请输入" v-model="appPersonallist.phone" />
|
||||||
</view>
|
</view>
|
||||||
<view class="name">地址:
|
<view class="name">地址:
|
||||||
<input type="text" placeholder="请填写" />
|
<input type="text" placeholder="请输入" v-model="appPersonallist.address" />
|
||||||
</view>
|
</view>
|
||||||
<view class="nursetype name">疾病类型:
|
<view class="nursetype name" style="border: none;" @tap="godisease">
|
||||||
<input type="text" placeholder="请填写" />
|
疾病类型:
|
||||||
|
<span class="" style="padding-left: 25rpx;text-overflow: ellipsis;"
|
||||||
|
v-for="(item,index) in patientDiseaseInfoList">
|
||||||
|
{{item.diseaseName}}
|
||||||
|
</span>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="finish">完成
|
<view class="finish" @tap="submit()">完成
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import {
|
||||||
|
updateInformation,
|
||||||
|
} from '@/api/modify/modify.js';
|
||||||
|
import baseurl from '@/api/baseurl.js'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
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>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.app {
|
@import "./modify.scss"
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
</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>
|
<image src="../../static/users.png" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="phone">
|
<view class="phone">
|
||||||
188****8888
|
电话:{{appPersonallist.phone}}
|
||||||
</view>
|
</view>
|
||||||
<view class="nickname">
|
<view class="nickname">
|
||||||
点此设置昵称
|
点此设置昵称
|
||||||
</view>
|
</view>
|
||||||
<view class="modify">
|
<view class="modify" @tap='updatainfo()'>
|
||||||
修改信息
|
修改信息
|
||||||
<u-icon name="arrow-right" color="#ffffff" size="32"></u-icon>
|
<u-icon name="arrow-right" color="#ffffff" size="32"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="information">
|
<view class="information">
|
||||||
<view class="item">
|
<view class="item">
|
||||||
姓名:
|
姓名:{{appPersonallist.patientName}}
|
||||||
</view>
|
</view>
|
||||||
<view class="item">
|
<view class="item">
|
||||||
电话:
|
电话:{{appPersonallist.phone}}
|
||||||
</view>
|
</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>
|
||||||
<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>
|
</view>
|
||||||
<view class="External" style="margin: 200rpx auto 0;">
|
<view class="External" style="margin: 200rpx auto 0;">
|
||||||
@ -34,7 +41,7 @@
|
|||||||
积分:
|
积分:
|
||||||
</view>
|
</view>
|
||||||
<view class="righttext">
|
<view class="righttext">
|
||||||
100分
|
{{appPersonallist.integral}}
|
||||||
</view>
|
</view>
|
||||||
<image src="../../static/jiantou.png" mode=""></image>
|
<image src="../../static/jiantou.png" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
@ -58,118 +65,39 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import {
|
||||||
|
appPersonal,
|
||||||
|
} from '@/api/user/user.js';
|
||||||
|
import baseurl from '@/api/baseurl.js'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
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>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.app {
|
@import "./user.scss";
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
BIN
static/daoh.png
Normal file
BIN
static/daoh.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 520 B |
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