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