This commit is contained in:
曹辉 2023-02-27 11:28:17 +08:00
parent abd241a267
commit 4ca1365325
12 changed files with 368 additions and 88 deletions

9
api/coupon/index.js Normal file
View 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',
})
}

View File

@ -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') {

View File

@ -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",

View File

@ -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;

View File

@ -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();
}
},
},
}

View File

@ -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;

View File

@ -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%;

View File

@ -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) {

View File

@ -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',

View File

@ -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%;

View File

@ -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

View File

@ -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'