修改
This commit is contained in:
parent
abd241a267
commit
4ca1365325
9
api/coupon/index.js
Normal file
9
api/coupon/index.js
Normal file
@ -0,0 +1,9 @@
|
||||
import request from "../request.js"
|
||||
|
||||
|
||||
export function selectCoupon(pageNum, pageSize, patientId, couponstatus) {
|
||||
return request({
|
||||
url: `/nurseApplet/patientInfo/selectCoupon?pageNum=${pageNum}&pageSize=${pageSize}&patientId=${patientId}&useStatus=${couponstatus}`,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
@ -16,6 +16,9 @@ var request = function(config) {
|
||||
success(res) {
|
||||
if (res.data.code == 9999) {
|
||||
uni.removeStorageSync('token');
|
||||
uni.removeStorageSync('patientId');
|
||||
uni.removeStorageSync('openid');
|
||||
uni.removeStorageSync('phone');
|
||||
let pages = getCurrentPages();
|
||||
let path = pages[pages.length - 1].$page.fullPath
|
||||
if (path == '/pages/user/user') {
|
||||
|
||||
18
pages.json
18
pages.json
@ -14,7 +14,16 @@
|
||||
"style": {
|
||||
"navigationBarTitleText": "优惠卷",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#ffffff"
|
||||
"navigationBarBackgroundColor": "#ffffff",
|
||||
"onReachBottomDistance": 40, //距离底部多远时触发 单位为px
|
||||
"enablePullDownRefresh": true //设置参数为true
|
||||
}
|
||||
},{
|
||||
"path": "pages/information/information",
|
||||
"style": {
|
||||
"navigationBarTitleText": "完善个人信息",
|
||||
"navigationBarBackgroundColor": "#ffffff", //背景颜色
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}, {
|
||||
"path": "pages/Personal/Personal",
|
||||
@ -52,13 +61,6 @@
|
||||
"navigationBarBackgroundColor": "#ffffff", //背景颜色
|
||||
"enablePullDownRefresh": true //设置参数为true
|
||||
}
|
||||
}, {
|
||||
"path": "pages/information/information",
|
||||
"style": {
|
||||
"navigationBarTitleText": "完善个人信息",
|
||||
"navigationBarBackgroundColor": "#ffffff", //背景颜色
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/lookrate/lookrate",
|
||||
|
||||
@ -142,7 +142,17 @@
|
||||
padding-left: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.login{
|
||||
position: absolute;
|
||||
top: 220rpx;
|
||||
left: 35%;
|
||||
font-size: 36rpx;
|
||||
width: 180rpx;
|
||||
line-height: 70rpx;
|
||||
border:1rpx solid #fff;
|
||||
height: 70rpx;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
.nickname {
|
||||
position: absolute;
|
||||
top: 265rpx;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="app">
|
||||
<view class="user">
|
||||
<view class="user" v-if="appPersonallist">
|
||||
<image v-if="appPersonallist.headPictureUrl" class="img" :src="baseurl+appPersonallist.headPictureUrl"
|
||||
mode=""></image>
|
||||
<image class="img" v-else src="../../static/user.png" mode=""></image>
|
||||
@ -16,6 +16,13 @@
|
||||
<image src="../../static/xg.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="user" v-else>
|
||||
<image class="img" src="../../static/user.png" mode=""></image>
|
||||
<image class="bjimg" src="../../static/userbeijing.png" mode=""></image>
|
||||
<view class="login" @tap='gologin'>
|
||||
登录
|
||||
</view>
|
||||
</view>
|
||||
<view class="userinfo">
|
||||
<view class="item">
|
||||
<image src="../../static/jkda.png" mode=""></image>
|
||||
@ -96,14 +103,13 @@
|
||||
<view class="serviceorder">护理站服务订单</view>
|
||||
<image src="../../static/huijiantou.png" mode=""></image>
|
||||
</view>
|
||||
<view class="service" style="top:1100rpx">
|
||||
<view class="serviceorder">设置</view>
|
||||
<view class="service" style="top:1100rpx" @tap='remove'>
|
||||
<view class="serviceorder">退出账号</view>
|
||||
<image src="../../static/huijiantou.png" mode=""></image>
|
||||
</view>
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
appPersonal,
|
||||
@ -117,7 +123,7 @@
|
||||
data() {
|
||||
return {
|
||||
baseurl: '',
|
||||
appPersonallist: [], //获取个人信息
|
||||
appPersonallist: null, //获取个人信息
|
||||
timer: null,
|
||||
list: {},
|
||||
}
|
||||
@ -129,14 +135,14 @@
|
||||
const value = uni.getStorageSync('patientId');
|
||||
if (value) {
|
||||
orderCount(value).then(res => {
|
||||
this.list = res.data
|
||||
that.list = res.data
|
||||
})
|
||||
} else {
|
||||
that.appPersonallist = null
|
||||
that.$refs.uToast.show({
|
||||
title: '请登录',
|
||||
title: '请先登录',
|
||||
type: 'error',
|
||||
duration: '1000',
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
}
|
||||
},
|
||||
@ -152,7 +158,6 @@
|
||||
uni.removeStorageSync('patientId');
|
||||
uni.removeStorageSync('openid');
|
||||
uni.removeStorageSync('phone');
|
||||
uni.removeStorageSync('token');
|
||||
that.$refs.uToast.show({
|
||||
title: '退出账号成功',
|
||||
type: 'success',
|
||||
@ -162,16 +167,10 @@
|
||||
clearTimeout(that.timer)
|
||||
}
|
||||
that.timer = setTimeout(e => {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
uni.switchTab({
|
||||
url: '/pages/homepage/homepage'
|
||||
})
|
||||
}, 1000)
|
||||
} else if (res.cancel) {
|
||||
that.$refs.uToast.show({
|
||||
title: '退出账号失败',
|
||||
type: 'error',
|
||||
duration: '1000'
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -181,7 +180,6 @@
|
||||
uni.removeStorageSync('openid');
|
||||
uni.removeStorageSync('phone');
|
||||
uni.removeStorageSync('Refresh');
|
||||
uni.removeStorageSync('token');
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
@ -214,57 +212,117 @@
|
||||
}
|
||||
},
|
||||
updatainfo() {
|
||||
uni.navigateTo({
|
||||
url: `/pages/modify/modify`
|
||||
})
|
||||
const value = uni.getStorageSync('openid');
|
||||
const value2 = uni.getStorageSync('patientId');
|
||||
if (value && value2) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/modify/modify`
|
||||
})
|
||||
} else {
|
||||
this.gologin();
|
||||
}
|
||||
},
|
||||
//护理站服务订单
|
||||
gonursestation() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/Nursingstationserviceorder/Nursingstationserviceorder'
|
||||
})
|
||||
const value = uni.getStorageSync('openid');
|
||||
const value2 = uni.getStorageSync('patientId');
|
||||
if (value && value2) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/Nursingstationserviceorder/Nursingstationserviceorder'
|
||||
})
|
||||
} else {
|
||||
this.gologin();
|
||||
}
|
||||
},
|
||||
//待收货
|
||||
goreceive(item) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/CommodityOrder/CommodityOrder?orderStatus=${item}`
|
||||
})
|
||||
const value = uni.getStorageSync('openid');
|
||||
const value2 = uni.getStorageSync('patientId');
|
||||
if (value && value2) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/CommodityOrder/CommodityOrder?orderStatus=${item}`
|
||||
})
|
||||
} else {
|
||||
this.gologin();
|
||||
}
|
||||
},
|
||||
//全部订单
|
||||
goorder() {
|
||||
const value = uni.getStorageSync('openid');
|
||||
const value2 = uni.getStorageSync('patientId');
|
||||
if (value && value2) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/CommodityOrder/CommodityOrder'
|
||||
})
|
||||
} else {
|
||||
this.gologin();
|
||||
}
|
||||
},
|
||||
//去登陆
|
||||
gologin() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/CommodityOrder/CommodityOrder'
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
},
|
||||
//优惠卷
|
||||
gocoupon() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/coupon/coupon'
|
||||
})
|
||||
const value = uni.getStorageSync('openid');
|
||||
const value2 = uni.getStorageSync('patientId');
|
||||
if (value && value2) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/coupon/coupon'
|
||||
})
|
||||
} else {
|
||||
this.gologin();
|
||||
}
|
||||
},
|
||||
//积分页面
|
||||
gointegral() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/integral/integral'
|
||||
})
|
||||
const value = uni.getStorageSync('openid');
|
||||
const value2 = uni.getStorageSync('patientId');
|
||||
if (value && value2) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/integral/integral'
|
||||
})
|
||||
} else {
|
||||
this.gologin();
|
||||
}
|
||||
},
|
||||
//已完成
|
||||
goEVALUATED(item) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/CommodityOrder/CommodityOrder?orderStatus=${item}`
|
||||
})
|
||||
const value = uni.getStorageSync('openid');
|
||||
const value2 = uni.getStorageSync('patientId');
|
||||
if (value && value2) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/CommodityOrder/CommodityOrder?orderStatus=${item}`
|
||||
})
|
||||
} else {
|
||||
this.gologin();
|
||||
}
|
||||
},
|
||||
//待评价
|
||||
gocompleted(item) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/CommodityOrder/CommodityOrder?orderStatus=${item}`
|
||||
})
|
||||
const value = uni.getStorageSync('openid');
|
||||
const value2 = uni.getStorageSync('patientId');
|
||||
if (value && value2) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/CommodityOrder/CommodityOrder?orderStatus=${item}`
|
||||
})
|
||||
} else {
|
||||
this.gologin();
|
||||
}
|
||||
},
|
||||
//待付款
|
||||
gopaid(item) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/CommodityOrder/CommodityOrder?orderStatus=${item}`
|
||||
})
|
||||
const value = uni.getStorageSync('openid');
|
||||
const value2 = uni.getStorageSync('patientId');
|
||||
if (value && value2) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/CommodityOrder/CommodityOrder?orderStatus=${item}`
|
||||
})
|
||||
} else {
|
||||
this.gologin();
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@ -6,63 +6,128 @@
|
||||
卷
|
||||
</view>
|
||||
<view class="text">
|
||||
2张
|
||||
{{total}}张
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="statuss">
|
||||
<view class="statusitem">
|
||||
待领取
|
||||
<view class="statusitem" @tap="changingcoupon('NOT_USED')"
|
||||
:style="couponstatus=='NOT_USED'?'color: #F44B2F;':''">
|
||||
未使用
|
||||
</view>
|
||||
<span> |</span>
|
||||
<view class="statusitem">
|
||||
<view class="statusitem" @tap="changingcoupon('USED')"
|
||||
:style="couponstatus=='USED'?'color: #F44B2F;':''">
|
||||
已使用
|
||||
</view>
|
||||
<span> |</span>
|
||||
<view class="statusitem">
|
||||
<view class="statusitem" @tap="changingcoupon('EXPIRED')"
|
||||
:style="couponstatus=='EXPIRED'?'color: #F44B2F;':''">
|
||||
已过期
|
||||
</view>
|
||||
</view>
|
||||
<view class="rollup">
|
||||
<view class="item">
|
||||
<view class="top">
|
||||
<view class="item" v-for="(item,index) in couponlist" :key="index"
|
||||
:style="item.useStatus!='NOT_USED'?'height:180rpx':''">
|
||||
<view class="top" :style="item.useStatus!='NOT_USED'?'background: #EFECEC;color: #4B4B4B;':''">
|
||||
<view class="title">
|
||||
<span class="text">
|
||||
¥
|
||||
</span>
|
||||
<span class="price">
|
||||
6
|
||||
{{item.couponPrice}}
|
||||
</span>
|
||||
</view>
|
||||
<view class="what">
|
||||
<view class="what" :style="item.useStatus!='NOT_USED'?'background: #DADADA;;':''">
|
||||
商品优惠卷
|
||||
</view>
|
||||
<view class="texts">
|
||||
满60可用
|
||||
满{{item.couponConsumePrice}}可用
|
||||
</view>
|
||||
<view class="time">
|
||||
有效期至 2023.02.28 23:59
|
||||
有效期至{{item.expirationEndTime}}
|
||||
</view>
|
||||
<view class="btn">
|
||||
领取
|
||||
<view class="btngq" v-if="item.useStatus!='NOT_USED'">
|
||||
{{item.useStatus=='EXPIRED'?'已过期':''}}
|
||||
{{item.useStatus=='USED'?'已使用':''}}
|
||||
</view>
|
||||
<view class="btn" v-else>
|
||||
{{item.useStatus=='NOT_USED'?'使用':''}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom">
|
||||
领取来源:首页新人福利
|
||||
<view class="bottom" v-if="item.useStatus=='NOT_USED'">
|
||||
领取来源:{{item.receiveSource =='NEW_PEOPLE_WELFARE'?'新人福利':''}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
selectCoupon
|
||||
} from '@/api/coupon/index.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
couponlist: null,
|
||||
total: 0,
|
||||
couponstatus: '', //状态
|
||||
patientId: 71,
|
||||
};
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.pageNum = 1
|
||||
var that = this
|
||||
const value = uni.getStorageSync('patientId');
|
||||
if (value) {
|
||||
that.patientId = value
|
||||
that.getlist();
|
||||
} else {
|
||||
that.$refs.uToast.show({
|
||||
title: '请先登录',
|
||||
type: 'error',
|
||||
duration: '1000',
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getlist() {
|
||||
selectCoupon(this.pageNum, this.pageSize, this.patientId, this.couponstatus).then(res => {
|
||||
this.couponlist = res.rows
|
||||
this.total = res.total
|
||||
})
|
||||
},
|
||||
changingcoupon(item) {
|
||||
if (this.couponstatus == item) {
|
||||
this.couponstatus = ''
|
||||
} else {
|
||||
this.couponstatus = item
|
||||
}
|
||||
this.getlist();
|
||||
},
|
||||
},
|
||||
onReachBottom() { //下滑加载
|
||||
if (this.goodsList.length >= this.total) {} else {
|
||||
this.pageNum++;
|
||||
selectCoupon(this.pageNum, this.pageSize, this.patientId, this.couponstatus).then(res => {
|
||||
res.rows.forEach(e => {
|
||||
this.couponlist.push(e)
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() { //下拉刷新
|
||||
this.pageNum = 1;
|
||||
this.getlist();
|
||||
setTimeout(function() {
|
||||
uni.stopPullDownRefresh();
|
||||
}, 1000);
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -84,12 +149,14 @@
|
||||
height: 240rpx;
|
||||
margin: 20rpx auto 0;
|
||||
border: 1rpx solid #f4f5f7;
|
||||
border-radius: 10rpx;
|
||||
|
||||
.bottom {
|
||||
font-size: 22rpx;
|
||||
color: #969394;
|
||||
line-height: 60rpx;
|
||||
padding-left: 25rpx;
|
||||
border-radius: 0 0 10rpx 10rpx;
|
||||
}
|
||||
|
||||
.top {
|
||||
@ -98,6 +165,7 @@
|
||||
background: #FDE9E8;
|
||||
position: relative;
|
||||
color: #F44B2F;
|
||||
border-radius: 10rpx 10rpx 0 0;
|
||||
|
||||
.what {
|
||||
width: 120rpx;
|
||||
@ -112,6 +180,17 @@
|
||||
left: 40rpx;
|
||||
}
|
||||
|
||||
.btngq {
|
||||
width: 109rpx;
|
||||
height: 180rpx;
|
||||
background: #DFDEDE;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
text-align: center;
|
||||
line-height: 180rpx;
|
||||
}
|
||||
|
||||
.btn {
|
||||
width: 98rpx;
|
||||
height: 50rpx;
|
||||
|
||||
@ -167,6 +167,15 @@
|
||||
line-height: 120rpx;
|
||||
border-bottom: 1rpx solid #D8D4D4;
|
||||
position: relative;
|
||||
::v-deep .u-radio-group{
|
||||
position: absolute;
|
||||
top:50%;
|
||||
transform: translateY(-50%);
|
||||
left:170rpx;
|
||||
}
|
||||
::v-deep .u-radio{
|
||||
width: 150rpx !important;
|
||||
}
|
||||
.address {
|
||||
position: absolute;
|
||||
left:25%;
|
||||
|
||||
@ -4,27 +4,41 @@
|
||||
</view>
|
||||
<view class="userinfo info">
|
||||
<view class="item">
|
||||
<span>姓名:</span>
|
||||
<span>姓名:</span>
|
||||
<u-input :clearable='false' v-model="query.patientName" type="text" placeholder='请输入' maxlength='5' />
|
||||
</view>
|
||||
<view class="item">
|
||||
<span>性别:</span>
|
||||
<u-radio-group v-model="query.sex" size='38' @change='sexchange'>
|
||||
<u-radio v-for="(item, index) in sexlist" :key="index" :name="item.name" :disabled="item.disabled">
|
||||
{{item.name}}
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
<!-- <view class="item">
|
||||
<span>电话:</span>
|
||||
<u-input :clearable='false' v-model="query.phone" maxlength='11' type="text" placeholder='请输入' />
|
||||
</view> -->
|
||||
<view class="item" @tap='timeshow=true'>
|
||||
<span>出生日期:</span>
|
||||
<view class="address" style="">
|
||||
{{query.birthDate}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<span>身份证号:</span>
|
||||
<u-input :clearable='false' v-model="query.cardNo" type="text" placeholder='请输入' maxlength='18' />
|
||||
<span>身份证号:</span>
|
||||
<u-input :clearable='false' v-model="query.cardNo" type="text" placeholder='请输入身份证号' maxlength='18' />
|
||||
</view>
|
||||
<view class="item" @tap='showPicker'>
|
||||
<span>所属区域:</span>
|
||||
<span>所属区域:</span>
|
||||
<view class="address">{{address}}</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<span>详细地址:</span>
|
||||
<span>详细地址:</span>
|
||||
<u-input :clearable='false' v-model="query.address" type="text" placeholder='小区、单元、门牌号' />
|
||||
</view>
|
||||
<view class="item" @tap='getAddress()'>
|
||||
<span>所在位置:</span>
|
||||
<span>所在位置:</span>
|
||||
<view class="address" style="">
|
||||
{{query.locationName}}
|
||||
</view>
|
||||
@ -84,6 +98,8 @@
|
||||
</view>
|
||||
</view>
|
||||
</u-mask>
|
||||
<u-picker mode="time" v-model="timeshow" :params="params" @confirm='timechange' @canel='timeshow=false'>
|
||||
</u-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -105,6 +121,24 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
timeshow: false, //出生日期
|
||||
params: {
|
||||
year: true,
|
||||
month: true,
|
||||
day: true,
|
||||
hour: false,
|
||||
minute: false,
|
||||
second: false
|
||||
},
|
||||
sexlist: [{
|
||||
name: '男',
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
name: '女',
|
||||
disabled: false
|
||||
}
|
||||
],
|
||||
radio: 1,
|
||||
// chooseLocation: '', //地图选址
|
||||
arealist: [], //区街道list
|
||||
@ -130,6 +164,8 @@
|
||||
diseaseInfoList: [],
|
||||
patientId: '',
|
||||
locationName: '',
|
||||
sex: '',
|
||||
birthDate: '',
|
||||
},
|
||||
timer: null,
|
||||
addresslength: null,
|
||||
@ -189,6 +225,18 @@
|
||||
})
|
||||
}
|
||||
},
|
||||
//性别
|
||||
sexchange(e) {
|
||||
if (e == '男') {
|
||||
this.query.sex = 'MALE';
|
||||
} else if (e == '女') {
|
||||
this.query.sex = 'FEMALE';
|
||||
}
|
||||
},
|
||||
//选择出生日期
|
||||
timechange(e) {
|
||||
this.query.birthDate = e.year + '-' + e.month + '-' + e.day
|
||||
},
|
||||
//获取所在位置
|
||||
getAddress() {
|
||||
var that = this;
|
||||
@ -296,6 +344,14 @@
|
||||
// 从地图选点插件返回后,在页面的onShow生命周期函数中能够调用插件接口,取得选点结果对象
|
||||
onShow() {
|
||||
var that = this
|
||||
const invitationPatientId = uni.getStorageSync('invitationPatientId')
|
||||
if (invitationPatientId) {
|
||||
that.query.source = 'FRIEND_INVITATION'
|
||||
that.query.invitationPatientId = invitationPatientId
|
||||
} else {
|
||||
that.query.source = 'REGISTER_YOURSELF'
|
||||
that.query.invitationPatientId = null
|
||||
}
|
||||
// const chooseLocation = requirePlugin('chooseLocation');
|
||||
// const location = chooseLocation.getLocation(); // 如果点击确认选点按钮,则返回选点结果对象,否则返回null
|
||||
// if (location) {
|
||||
|
||||
@ -29,7 +29,6 @@
|
||||
onShow() {
|
||||
uni.removeStorageSync('openid');
|
||||
uni.removeStorageSync('patientId');
|
||||
uni.removeStorageSync('token');
|
||||
uni.removeStorageSync('phone');
|
||||
},
|
||||
//1.分享给朋友
|
||||
@ -86,7 +85,6 @@
|
||||
})
|
||||
}, 1500)
|
||||
} else {
|
||||
uni.removeStorageSync('token');
|
||||
this.$refs.uToast.show({
|
||||
title: '登录失败',
|
||||
type: 'error',
|
||||
|
||||
@ -80,8 +80,8 @@
|
||||
|
||||
.radio {
|
||||
display: inline-block;
|
||||
width: 35rpx;
|
||||
height: 35rpx;
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
border-radius: 70%;
|
||||
border: 2rpx solid #178ffb;
|
||||
position: absolute;
|
||||
@ -169,7 +169,15 @@
|
||||
border-bottom: 1rpx solid #D8D4D4;
|
||||
position: relative;
|
||||
font-size: 30rpx;
|
||||
|
||||
::v-deep .u-radio-group{
|
||||
position: absolute;
|
||||
top:50%;
|
||||
transform: translateY(-50%);
|
||||
left:170rpx;
|
||||
}
|
||||
::v-deep .u-radio{
|
||||
width: 150rpx !important;
|
||||
}
|
||||
.address {
|
||||
position: absolute;
|
||||
left: 25%;
|
||||
|
||||
@ -6,26 +6,40 @@
|
||||
<image class="picture" src="../../static/userl.png" mode="" v-else @tap='uploadImag'></image>
|
||||
</view>
|
||||
<view class="item">
|
||||
<span>姓名:</span>
|
||||
<span>姓名:</span>
|
||||
<u-input :clearable='false' v-model="appPersonallist.patientName" placeholder="请输入" type="text"
|
||||
maxlength='15' />
|
||||
</view>
|
||||
<view class="item">
|
||||
<span>性别:</span>
|
||||
<u-radio-group v-model="appPersonallist.sex" size='38' @change='sexchange'>
|
||||
<u-radio v-for="(item, index) in sexlist" :key="index" :name="item.name" :disabled="item.disabled">
|
||||
{{item.name}}
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
<!-- <view class="item">
|
||||
<span>电话:</span>
|
||||
<u-input :clearable='false' v-model="appPersonallist.phone" placeholder="请输入" maxlength='11'
|
||||
type="text" />
|
||||
</view> -->
|
||||
<view class="item" @tap='timeshow=true'>
|
||||
<span>出生日期:</span>
|
||||
<view class="address" style="">
|
||||
{{appPersonallist.birthDate}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<span>身份证号:</span>
|
||||
<u-input :clearable='false' v-model="appPersonallist.cardNo" placeholder="请输入" type="text"
|
||||
<span>身份证号:</span>
|
||||
<u-input :clearable='false' v-model="appPersonallist.cardNo" placeholder="请输入身份证号" type="text"
|
||||
maxlength='18' />
|
||||
</view>
|
||||
<view class="item" @tap='showPicker'>
|
||||
<span>所属区域:</span>
|
||||
<span>所属区域:</span>
|
||||
<view class="address">{{address}}</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<span>详细地址:</span>
|
||||
<span>详细地址:</span>
|
||||
<u-input :clearable='false' v-model="appPersonallist.address" type="text" maxlength='40'
|
||||
placeholder='小区、单元、门牌号' />
|
||||
</view>
|
||||
@ -82,9 +96,10 @@
|
||||
@funcValue="getpickerParentValue" pickerSize="4">
|
||||
</m-city>
|
||||
</view>
|
||||
<u-picker mode="time" v-model="timeshow" :params="params" @confirm='timechange' @canel='timeshow=false'>
|
||||
</u-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getRegionAndStreetInfo
|
||||
@ -108,6 +123,16 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
timeshow: false, //出生日期
|
||||
sexlist: [{
|
||||
name: '男',
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
name: '女',
|
||||
disabled: false
|
||||
}
|
||||
],
|
||||
list: [{
|
||||
id: "",
|
||||
localName: "请选择",
|
||||
@ -131,7 +156,9 @@
|
||||
nurseTypeIdList: [],
|
||||
diseaseInfoList: [],
|
||||
headPictureUrl: '',
|
||||
birthDate: '',
|
||||
locationName: '',
|
||||
sex: '',
|
||||
},
|
||||
patientDiseaseInfoList: [], //获取个人信息
|
||||
addresslength: null,
|
||||
@ -151,6 +178,11 @@
|
||||
if (that.appPersonallist.headPictureUrl) {
|
||||
that.img = baseurl + that.appPersonallist.headPictureUrl
|
||||
}
|
||||
if (that.appPersonallist.sex == 'MALE') {
|
||||
that.appPersonallist.sex = '男';
|
||||
} else if (that.appPersonallist.sex == 'FEMALE') {
|
||||
that.appPersonallist.sex = '女';
|
||||
}
|
||||
if (that.appPersonallist.areaName) {
|
||||
that.address = that.appPersonallist.areaName
|
||||
}
|
||||
@ -163,6 +195,18 @@
|
||||
} else {}
|
||||
},
|
||||
methods: {
|
||||
//性别
|
||||
sexchange(e) {
|
||||
if (e == '男') {
|
||||
this.appPersonallist.sex = 'MALE';
|
||||
} else if (e == '女') {
|
||||
this.appPersonallist.sex = 'FEMALE';
|
||||
}
|
||||
},
|
||||
//选择出生日期
|
||||
timechange(e) {
|
||||
this.query.birthDate = e.year + '-' + e.month + '-' + e.day
|
||||
},
|
||||
// 三级地址联动回调
|
||||
getpickerParentValue(e) {
|
||||
this.addresslength = e
|
||||
|
||||
@ -9,8 +9,8 @@
|
||||
|
||||
<script>
|
||||
import {
|
||||
existPatientInfo
|
||||
} from '@/api/startup/index.js'
|
||||
createMobileToken
|
||||
} from '@/api/login/index.js'
|
||||
export default {
|
||||
data() {
|
||||
return {};
|
||||
@ -34,6 +34,10 @@
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
var that = this
|
||||
createMobileToken().then(res => {
|
||||
uni.setStorageSync("token", res.data.token)
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.reLaunch({
|
||||
url: '/pages/homepage/homepage'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user