This commit is contained in:
曹辉 2023-03-02 11:22:01 +08:00
parent 6490547078
commit 1372c247d8
19 changed files with 1103 additions and 225 deletions

View File

@ -1,8 +1,8 @@
import request from "../request.js"
// 查询商品详细列表
export function goodsDetails(goodsInfoId){
export function goodsDetails(goodsInfoId, patientId) {
return request({
url: `/nurseApplet/nursingStationGoods/goodsDetails?goodsInfoId=${goodsInfoId}`,
url: `/nurseApplet/nursingStationGoods/goodsDetails?goodsInfoId=${goodsInfoId}&patientId=${patientId}`,
method: 'GET'
})
}

View File

@ -5,3 +5,12 @@ export function appPersonal(patientId) {
method: 'GET'
})
}
//邀请
export function inviteFriends(patientId) {
return request({
url: `/nurseApplet/patientInfo/inviteFriends?inviteId=${patientId}`,
method: 'post'
})
}

27
api/integral/index.js Normal file
View File

@ -0,0 +1,27 @@
import request from "../request.js"
//签到
export function signIn(patientId) {
return request({
url: `/nurseApplet/patientInfo/signIn?patientId=${patientId}&signInChannel=WECHAT_APPLET`,
method: 'post'
})
}
//积分
export function selectPatientSignIn(patientId) {
return request({
url: `/nurseApplet/patientInfo/selectPatientSignIn?patientId=${patientId}`,
method: 'get'
})
}
//可兑换商品
export function selectExchangeGoods(pageNum,pageSize) {
return request({
url: `/nurseApplet/patientInfo/selectExchangeGoods?pageNum=${pageNum}&pageSize=${pageSize}`,
method: 'get'
})
}

View File

@ -0,0 +1,10 @@
import request from "../request.js"
//新人优惠券
export function couponByUseStatus(patientId) {
return request({
url: `/nurseApplet/patientInfo/couponByUseStatus?patientId=${patientId}`,
method: 'get'
})
}

View File

@ -4,20 +4,18 @@
},
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
{
"path": "pages/integral/integral",
"style": {
"navigationBarTitleText": "积分",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff"
}
},{
"path": "pages/startup/startup",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
}, {
"path": "pages/coupon/coupon",
"style": {
"navigationBarTitleText": "优惠卷",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff",
"onReachBottomDistance": 40, // px
"enablePullDownRefresh": true //true
}
},{
"path": "pages/information/information",
"style": {
@ -25,6 +23,22 @@
"navigationBarBackgroundColor": "#ffffff", //
"enablePullDownRefresh": false
}
}, {
"path": "pages/CommodityDetails/CommodityDetails",
"style": {
"navigationBarTitleText": "商品详情",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff"
}
}, {
"path": "pages/coupon/coupon",
"style": {
"navigationBarTitleText": "优惠券",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff",
"onReachBottomDistance": 40, // px
"enablePullDownRefresh": true //true
}
}, {
"path": "pages/Personal/Personal",
"style": {
@ -33,13 +47,6 @@
"navigationBarBackgroundColor": "#ffffff",
"navigationStyle": "custom"
}
}, {
"path": "pages/integral/integral",
"style": {
"navigationBarTitleText": "积分",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff"
}
}, {
"path": "pages/modify/modify",
"style": {
@ -249,14 +256,6 @@
"enablePullDownRefresh": true //true
}
},
{
"path": "pages/CommodityDetails/CommodityDetails",
"style": {
"navigationBarTitleText": "商品详情",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff"
}
},
{
"path": "pages/nursestation/nursestation",
"style": {

View File

@ -12,7 +12,7 @@
{{goodsPrice}}
</view>
</view>
<view class="choice common" @tap="buyshow=true">
<view class="choice common" @tap="buyshowtrue">
<view class="selected">
已选
</view>
@ -21,14 +21,14 @@
</view>
<image src="../../static/huijiantou.png" mode=""></image>
</view>
<view class="Discount common">
<view class="Discount common" @tap="goodsDetailslist.couponList.length>0?couponshow=true:''">
<view class="selected">
优惠
</view>
<!-- <view class="content">
购买最多可获得3积分
<view class="content" v-if="coupon">
已选择 {{coupon.couponTitle}}
</view>
<image src="../../static/huijiantou.png" mode=""></image> -->
<image src="../../static/huijiantou.png" mode="" v-if="goodsDetailslist.couponList.length>0"></image>
</view>
<view class="service common">
<view class="selected">
@ -51,7 +51,7 @@
<!-- <image v-for="(item,index) in info" :src="item.image" mode=""></image> -->
</view>
<view class="Purchasecolumn">
<view class="buy" @tap="buyshow=true">
<view class="buy" @tap="buyshowtrue">
立即购买
</view>
</view>
@ -69,8 +69,16 @@
<view class="title" v-else>
暂无
</view>
<view class="price">
{{updata.goodsPrice}}
<view class="prices">
<span class="price">
{{totalPrice}}
</span>
<span class="Paidinprice" v-if='Paidinprice'>
实付价
<span class="" style='font-size:28rpx;'>
{{Paidinprice}}
</span>
</span>
</view>
<view class="goodsStock" v-show="goodshow">
库存数量:{{updata.goodsStock}}
@ -124,10 +132,21 @@
数量
</view>
<view class="number">
<u-number-box :min="1" :max="updata.goodsStock" v-model="updata.goodsCount">
<u-number-box :min="1" :max="updata.goodsStock" v-model="updata.goodsCount"
@change='numberchange'>
</u-number-box>
</view>
</view>
<view class="bottomcontent topcontent"
@tap="goodsDetailslist.couponList.length>0?couponshow=true:''">
<view class="header">
优惠卷
</view>
<view class="coupon" v-if='coupon' style="color: #D43953;">
已选择 {{coupon.couponTitle}}
</view>
<u-icon class='img' name="arrow-right" color="black" size="28"></u-icon>
</view>
<view class="" style="height: 230rpx;">
<view class="bottomcontent topcontent" style="padding-bottom: 0;">
<view class="header">
@ -161,9 +180,80 @@
</view>
</view>
</u-mask>
<u-mask :show="couponshow" class='mask' @click="couponshow = false">
<view class="couponmask" @click.stop=''>
<view class="titles">
选择优惠卷
</view>
<scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y" @scrolltoupper="upper"
@scrolltolower="lower" @scroll="scroll" style="background-color: #fff;height: 700rpx;">
<view class="item" v-for="(item,dindex) in couponListtrue" :key="dindex">
<view class="top">
<view class="title">
<span class="text">
</span>
<span class="price">
{{item.couponPrice}}
</span>
</view>
<view class="what">
{{item.couponTitle}}
</view>
<view class="texts">
<span style='padding: 0 5rpx;'>{{item.couponConsumePrice}}</span>
可用
</view>
<view class="time">
有效期至{{item.expirationEndTime}}
</view>
<view class="btn" v-if="item.couponId==couponId" @tap='tapcoupon(item)'
style="border: none;">
取消使用
</view>
<view class="btn" v-else @tap='tapcoupon(item)'>
使用
</view>
</view>
<view class="bottom" v-if="item.useStatus=='NOT_USED'">
领取来源{{item.receiveSource =='NEW_PEOPLE_WELFARE'?'新人福利':''}}
</view>
</view>
<view class="item" v-for="(item,uindex) in couponListfalse" :key="uindex">
<view class="top" style="background: #EFECEC;color: #4B4B4B;">
<view class="title">
<span class="text">
</span>
<span class="price">
{{item.couponPrice}}
</span>
</view>
<view class="what" style="background: #DADADA;">
{{item.couponTitle}}
</view>
<view class="texts">
<span style='padding: 0 5rpx;'>{{item.couponConsumePrice}}</span>
可用
</view>
<view class="time">
有效期至{{item.expirationEndTime}}
</view>
<view class="btn2">
不满足
</view>
</view>
<view class="bottom" v-if="item.useStatus=='NOT_USED'">
领取来源{{item.receiveSource =='NEW_PEOPLE_WELFARE'?'新人福利':''}}
</view>
</view>
</scroll-view>
</view>
</u-mask>
</view>
</template>
<script>
import {
goodsDetails
@ -188,13 +278,21 @@
image: null, //
usershow: false, //
goodsPrice: '', //
goodsDetailslist: [], //list
totalPrice: 0.00, //
Paidinprice: null, //
couponId: null, //使id
coupon: null,
goodsDetailslist: {
couponList: [],
}, //list
goodDetailsLists: [], //
goodshow: true, //
buyshow: false, //
couponshow: false, //
info: [], //list
goodsAttributeId: null, //id
updata: { //
couponList: [],
goodsPrice: 0.00,
goodsName: "",
goodsAttributeName: '',
@ -210,13 +308,15 @@
discountPrice: 0.00, //
buySource: '', // 'NURSE_STATIONSHOPPING_MALL'
orderChannel: 'WECHAT_APPLET', // AppMOBILE_APPWECHAT_APPLETALI_PAY_APPLET'
receiver: "", //
receiver: null, //
receiveAddress: "", //
phone: '', //
attributeDetailsId: '', //id
goodsAttributeId: '',
goodsAttributeDetailsId: '',
},
couponListtrue: [],
couponListfalse: [],
scrollTop: 0,
old: {
scrollTop: 0
@ -224,7 +324,41 @@
userid: null,
};
},
watch: { //
totalPrice() {
this.couponListtrue = []
this.couponListfalse = []
this.goodsDetailslist.couponList.forEach(e => {
if (this.totalPrice >= e.couponConsumePrice) {
this.couponListtrue.push(e)
} else {
this.couponListfalse.push(e)
}
})
},
},
methods: {
//使
tapcoupon(item) {
if (this.couponId == item.couponId) {
this.couponId = null
this.Paidinprice = null
this.coupon = null
} else {
this.couponId = item.couponId
this.Paidinprice = (this.totalPrice - item.couponPrice).toFixed(2)
this.coupon = item
}
this.couponshow = false
},
//
numberchange(e) {
this.totalPrice = (this.updata.goodsPrice * this.updata.goodsCount).toFixed(2)
},
buyshowtrue() {
this.buyshow = true
this.totalPrice = (this.updata.goodsPrice * this.updata.goodsCount).toFixed(2)
},
upper: function(e) {},
lower: function(e) {},
scroll: function(e) {
@ -293,7 +427,9 @@
res) {
that.goodsDetailsinfo(
that
.goodsInfoId
.goodsInfoId,
that.updata
.patientId
)
that.$refs
.uToast
@ -307,7 +443,9 @@
fail: function(err) {
that.goodsDetailsinfo(
that
.goodsInfoId
.goodsInfoId,
that.updata
.patientId
)
that.$refs
.uToast
@ -405,13 +543,33 @@
this.updata.goodsStock = item.goodsStock
this.updata.goodsAttributeId = item.goodsAttributeId
this.updata.goodsAttributeDetailsId = item.attributeDetailsId
this.totalPrice = (this.updata.goodsPrice * this.updata.goodsCount).toFixed(2)
this.couponListtrue = []
this.couponListfalse = []
this.goodsDetailslist.couponList.forEach(e => {
if (this.totalPrice >= e.couponConsumePrice) {
this.couponListtrue.push(e)
} else {
this.couponListfalse.push(e)
}
if (this.couponId == e.couponId) {
if (this.totalPrice >= e.couponConsumePrice) {
this.Paidinprice = (this.totalPrice - e.couponPrice).toFixed(2)
this.coupon = e
} else {
this.Paidinprice = null
this.couponId = null
this.coupon = null
}
}
})
}
},
//
goodsDetailsinfo(goodsInfoId) {
goodsDetailsinfo(goodsInfoId, value) {
let that = this
this.info = []
goodsDetails(goodsInfoId).then(res => {
goodsDetails(goodsInfoId, value).then(res => {
uni.removeStorageSync('Refresh');
if (res.data.goodsRemark) {
res.data.goodsRemark = res.data.goodsRemark.replace(/\<img/gi,
@ -439,9 +597,22 @@
this.goodDetailsLists = res.data.goodAttributeDetailsLists
this.goodshow = true
}
if (!res.data.couponList) {
res.data.couponList = []
}
this.couponListtrue = []
this.couponListfalse = []
this.goodsDetailslist = res.data
this.goodsDetailslist.couponList.forEach(e => {
if (this.totalPrice >= e.couponConsumePrice) {
this.couponListtrue.push(e)
} else {
this.couponListfalse.push(e)
}
})
this.updata.goodsName = this.goodsDetailslist.goodsName
this.updata.nurseStationId = this.goodsDetailslist.nurseStationId
this.updata.goodsUnit = res.data.goodsUnit
if (this.goodDetailsLists.length == 1) {
this.goodDetailsLists[0].isActive = true
this.updata.img = this.goodDetailsLists[0].attributePitureUrl
@ -465,6 +636,7 @@
this.updata.img = list.attributePitureUrl
this.updata.goodsAttributeName = list.attributeDetailsName
this.updata.goodsPrice = list.goodsPrice
this.totalPrice = list.goodsPrice
this.updata.attributeDetailsId = list.attributeDetailsId
this.updata.goodsStock = list.goodsStock
this.updata.img = list.attributePitureUrl
@ -485,9 +657,26 @@
url: `/pages/modifyAddress/modifyAddress?updata=${JSON.stringify(this.updata)}`
})
} else {
const value = uni.getStorageSync('openid');
const value2 = uni.getStorageSync('patientId');
if (value && value2) {
uni.navigateTo({
url: '/pages/information/information'
})
} else {
this.$refs.uToast.show({
title: '未登录,请先登录',
type: 'error'
})
if (this.timer) {
clearTimeout(this.timer)
}
this.timer = setTimeout(e => {
uni.navigateTo({
url: '/pages/login/login'
})
}, 1500)
}
}
},
//
@ -518,9 +707,11 @@
this.goodsAttributeId = options.goodsAttributeId
this.updata.buySource = options.buySource
this.goodsInfoId = options.goodsInfoId
// this.goodsInfoId = 49
const value = uni.getStorageSync('patientId');
if (value) {
that.updata.patientId = value
// that.updata.patientId = 92
that.goodsList()
} else {}
},
@ -528,28 +719,35 @@
var that = this
this.baseurl = baseurl
this.usershow = false
this.goodsDetailsinfo(this.goodsInfoId)
goodPatientInfo(this.updata.patientId).then(res => {
var user = res.data.filter(e => e.id == this.userid)
const value = uni.getStorageSync('patientId');
if (value) {
that.goodsDetailsinfo(that.goodsInfoId, value)
goodPatientInfo(value).then(res => {
if (res.code == 200) {
var user = res.data.filter(e => e.id == that.userid)
if (user.length >= 1) {
// user[0].address = user[0].provinceName + user[0].cityName + user[0].regionName + user[0]
// .streetName + user[0].receiveAddress
this.updata.receiver = user[0].receiveName
this.updata.receiveAddress = user[0].areaName + user[0].receiveAddress
this.updata.phone = user[0].receivePhone
this.userid = user[0].id
that.updata.receiver = user[0].receiveName
that.updata.receiveAddress = user[0].areaName + user[0].receiveAddress
that.updata.phone = user[0].receivePhone
that.userid = user[0].id
} else {
// res.data.forEach(e => {
// e.address = e.provinceName + e.cityName + e.regionName + e.streetName + e
// .receiveAddress
// })
this.updata.receiver = res.data[0].receiveName
that.updata.receiver = res.data[0].receiveName
// this.updata.receiveAddress = res.data[0].address
this.updata.receiveAddress = res.data[0].areaName + res.data[0].receiveAddress
this.updata.phone = res.data[0].receivePhone
this.userid = res.data[0].id
that.updata.receiveAddress = res.data[0].areaName + res.data[0].receiveAddress
that.updata.phone = res.data[0].receivePhone
that.userid = res.data[0].id
}
}
})
} else {
that.goodsDetailsinfo(this.goodsInfoId, '')
}
let useritem = null
uni.$on('updata', function(data) {
that.updata = JSON.parse(data.updata)

View File

@ -5,6 +5,113 @@
background-color: #F4F5F7;
}
.mask {
.couponmask{
z-index: 999;
height: 800rpx;
position: fixed;
bottom: 0;
width: 100%;
background: #FFFFFF;
border-radius: 30rpx;
.titles{
width: 100%;
height: 40rpx;
font-size: 42rpx;
margin: 20rpx auto;
text-align: center;
}
.item {
width: 94%;
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 {
width: 100%;
height: 180rpx;
background: #FDE9E8;
position: relative;
color: #F44B2F;
border-radius: 10rpx 10rpx 0 0;
.what {
// width: 120rpx;
padding: 0 10rpx;
height: 40rpx;
background: #FED1D2;
border-radius: 16rpx;
font-size: 20rpx;
line-height: 40rpx;
text-align: center;
position: absolute;
top: 120rpx;
left: 20rpx;
}
.btn2{
width: 130rpx;
height: 180rpx;
background: #DFDEDE;
position: absolute;
top: 0;
right: 0;
text-align: center;
line-height: 180rpx;
}
.btn {
width: 98rpx;
height: 50rpx;
border: 2rpx solid #F44B2F;
border-radius: 24rpx;
font-size: 24rpx;
position: absolute;
top: 70rpx;
right: 20rpx;
text-align: center;
line-height: 49rpx;
}
.time {
font-size: 24rpx;
position: absolute;
top: 120rpx;
left: 200rpx;
}
.texts {
font-size: 32rpx;
font-weight: 800;
position: absolute;
top: 44rpx;
left: 200rpx;
}
.title {
position: absolute;
top: 30rpx;
left: 10rpx;
.price {
font-size: 54rpx;
font-weight: 700;
}
.text {
font-weight: 600;
font-size: 34rpx;
}
}
}
}
}
.information {
width: 70%;
height: 400rpx;
@ -59,6 +166,7 @@
border-radius: 30rpx 30rpx 0px 0px;
font-size: 36rpx;
padding-bottom: 20rpx;
z-index: 10;
.bodys {
background-color: #FFFFFF;
width: 96%;
@ -122,21 +230,31 @@
.goodsStock{
font-size: 24rpx;
position: absolute;
top: 73%;
left: 75%;
top: 75%;
right: 10rpx;
}
.prices{
position: absolute;
top: 70%;
left: 35%;
.Paidinprice{
margin-left: 10rpx;
color: #fff;
border-radius: 20rpx;
display: inline-block;
padding: 0 10rpx;
background-color:#D43953 ;
font-size:20rpx;
}
.price {
color: #D43953;
position: absolute;
top: 70%;
left: 37%;
}
}
.title {
font-size: 36rpx;
position: absolute;
top: 3%;
left: 38%;
left: 35%;
font-weight: 600;
width: 58%;
// height: 85rpx;
@ -179,6 +297,14 @@
padding: 35rpx 0;
background-color: #FFFFFF;
border-radius: 15rpx;
.coupon{
display: inline-block;
font-size: 30rpx;
position: absolute;
top: 50%;
right: 70rpx;
transform: translateY(-50%);
}
.chat {
height: 130rpx;
position: relative;
@ -199,6 +325,12 @@
height: 55rpx;
}
}
.img{
position: absolute;
top: 50%;
right: 20rpx;
transform: translateY(-50%);
}
.header {
font-size: 32rpx;
display: inline-block;

View File

@ -34,14 +34,15 @@
<image src="../../static/jifen.png" mode=""></image>
<view class="text">
积分
<span style='padding:0 5rpx'> {{appPersonallist.integral}}</span>
<span style='padding:0 5rpx' v-if="appPersonallist.integral>=0"> {{appPersonallist.integral}}</span>
</view>
</view>
<view class="item" @tap="gocoupon">
<image src="../../static/yhj.png" mode=""></image>
<view class="text">
优惠卷
<span style='padding:0 5rpx'> {{appPersonallist.patientCouponCount}}</span>
优惠券
<span style='padding:0 5rpx' v-if="appPersonallist.patientCouponCount>=0">
{{appPersonallist.patientCouponCount}}</span>
</view>
</view>
</view>
@ -116,7 +117,7 @@
</template>
<script>
import {
appPersonal
appPersonal,
} from '@/api/Personal/Personal.js';
import {
existPatientInfo
@ -149,6 +150,8 @@
methods: {
remove() {
let that = this
const value = uni.getStorageSync('patientId');
if (value) {
uni.showModal({
title: '提示',
content: '确认要退出此账号吗',
@ -173,6 +176,13 @@
}
}
});
} else {
that.$refs.uToast.show({
title: '您未登录',
type: 'error',
duration: '1000'
})
}
},
removes() {
this.appPersonallist = null
@ -285,7 +295,7 @@
const value2 = uni.getStorageSync('patientId');
if (value && value2) {
uni.navigateTo({
url: '/pages/integral/integral'
url: `/pages/integral/integral?integral=${this.appPersonallist.integral}`
})
} else {
this.gologin();

View File

@ -74,18 +74,10 @@
},
onShow() {
var that = this
try {
const value = uni.getStorageSync('openid');
const value3 = uni.getStorageSync('Refresh');
if (value) {} else {
uni.navigateTo({
url: '/pages/login/login'
})
}
if (value3) {
that.goodsListinfo();
}
} catch (e) {}
},
onLoad(options) { //
if (options.title) {

View File

@ -3,7 +3,7 @@
<view class="tabs">
<view class="tab-item">
<view class="title">
</view>
<view class="text">
{{total}}
@ -40,7 +40,7 @@
</span>
</view>
<view class="what" :style="item.useStatus!='NOT_USED'?'background: #DADADA;;':''">
商品优惠卷
{{item.couponTitle}}
</view>
<view class="texts">
{{item.couponConsumePrice}}可用
@ -56,8 +56,10 @@
{{item.useStatus=='NOT_USED'?'使用':''}}
</view>
</view>
<view class="bottom" v-if="item.useStatus=='NOT_USED'">
<view class="bottom" v-if="item.useStatus=='NOT_USED'||item.useStatus=='RECEIVE'">
领取来源{{item.receiveSource =='NEW_PEOPLE_WELFARE'?'新人福利':''}}
{{item.receiveSource =='EVENT_GIFT'?'活动赠送':''}}
{{item.receiveSource =='CONSUME_REBATE'?'消费返券':''}}
</view>
</view>
</view>
@ -77,7 +79,7 @@
couponlist: null,
total: 0,
couponstatus: '', //
patientId: 71,
patientId: null,
};
},
onLoad() {
@ -112,7 +114,7 @@
},
},
onReachBottom() { //
if (this.goodsList.length >= this.total) {} else {
if (this.couponlist.length >= this.total) {} else {
this.pageNum++;
selectCoupon(this.pageNum, this.pageSize, this.patientId, this.couponstatus).then(res => {
res.rows.forEach(e => {
@ -168,7 +170,7 @@
border-radius: 10rpx 10rpx 0 0;
.what {
width: 120rpx;
padding: 0 10rpx;
height: 40rpx;
background: #FED1D2;
border-radius: 16rpx;
@ -177,7 +179,7 @@
text-align: center;
position: absolute;
top: 120rpx;
left: 40rpx;
left: 20rpx;
}
.btngq {
@ -199,7 +201,7 @@
font-size: 24rpx;
position: absolute;
top: 70rpx;
right: 40rpx;
right: 20rpx;
text-align: center;
line-height: 49rpx;
}
@ -212,7 +214,7 @@
}
.texts {
font-size: 34rpx;
font-size: 32rpx;
font-weight: 800;
position: absolute;
top: 44rpx;
@ -222,10 +224,10 @@
.title {
position: absolute;
top: 30rpx;
left: 50rpx;
left: 10rpx;
.price {
font-size: 60rpx;
font-size: 54rpx;
font-weight: 700;
}
@ -236,7 +238,6 @@
}
}
}
}
.statuss {

View File

@ -33,14 +33,18 @@
methods: {
//
godiseasemanagement() {
const phone = uni.getStorageSync('phone');
if (phone) {
uni.navigateToMiniProgram({
appId: 'wxa690d053c34ceebd',
path: '/pages/index/index',
extraData: {
'from': 'qy'
'from': 'qy',
'phone': phone
},
success(res) {}
})
}
},
//
gogeriatricdisease() {

View File

@ -69,8 +69,8 @@
.radio {
display: inline-block;
width: 35rpx;
height: 35rpx;
width: 50rpx;
height: 50rpx;
border-radius: 70%;
border: 2rpx solid #178ffb;
position: absolute;
@ -156,6 +156,29 @@
border-radius: 20rpx;
padding-bottom: 5rpx;
box-shadow: 0px 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
.disease {
width: 100%;
margin: 0 auto;
padding: 0 6% 0 3%;
line-height: 80rpx;
border-bottom: 1rpx solid #D8D4D4;
position: relative;
.title {
font-size: 30rpx;
display: block;
line-height: 120rpx;
}
.pictureA {
width: 18rpx;
height: 27rpx;
position: absolute;
right: 30rpx;
top: 50%;
transform: translateY(-50%);
}
}
}
@ -167,6 +190,11 @@
line-height: 120rpx;
border-bottom: 1rpx solid #D8D4D4;
position: relative;
::v-deep .u-radio__label{
width: 150rpx !important;
height: 120rpx !important;
line-height: 120rpx;
}
::v-deep .u-radio-group{
position: absolute;
top:50%;
@ -174,7 +202,9 @@
left:170rpx;
}
::v-deep .u-radio{
padding-left: 10rpx;
width: 150rpx !important;
height: 120rpx !important;
}
.address {
position: absolute;

View File

@ -9,8 +9,9 @@
</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">
<u-radio-group v-model="query.sex" size='44'>
<u-radio @change='sexchange' v-for="(item, index) in sexlist" :key="index" :name="item.name"
:disabled="item.disabled">
{{item.name}}
</u-radio>
</u-radio-group>
@ -50,9 +51,16 @@
</m-city>
</view>
<view class="info">
<view class="service">
<view class="disease" style="border: none;" @tap="godisease">
<view class="title" style="">基础疾病:</view>
<image class="pictureA" src="../../static/huijiantou.png" mode=""></image>
<view style="padding-right: 10rpx;display: inline-block;" v-for="(item,index) in query.diseaseInfoList">
{{item.diseaseName}}
</view>
</view>
<!-- <view class="service">
<view class="title">
所属服务
基础疾病
</view>
<view class="Multiplechoice">
<view :class="query.nurseTypeIdList.find(e => e == item.id)?'choices':'choice'"
@ -65,7 +73,7 @@
{{item.nurseTypeName}}
</view>
</view>
</view>
</view> -->
</view>
<view class="radio-content">
<view class="radio-right" @tap="changeRadio">
@ -169,6 +177,7 @@
},
timer: null,
addresslength: null,
patientDiseaseInfoList: [], //
};
},
methods: {
@ -189,6 +198,7 @@
} else {
information(that.query).then(res => {
if (res.code == 200) {
uni.removeStorageSync('invitationPatientId');
that.$refs.uToast.show({
title: '完善信息成功',
type: 'success',
@ -331,12 +341,10 @@
//
onLoad() {
let that = this
try {
const value = uni.getStorageSync('patientId');
if (value) {
that.query.patientId = value
}
} catch (e) {}
this.areaInfo()
this.getNurseTypeInfo();
},
@ -347,7 +355,7 @@
const invitationPatientId = uni.getStorageSync('invitationPatientId')
if (invitationPatientId) {
that.query.source = 'FRIEND_INVITATION'
that.query.invitationPatientId = invitationPatientId
that.query.invitationPatientId = Number(invitationPatientId)
} else {
that.query.source = 'REGISTER_YOURSELF'
that.query.invitationPatientId = null

View File

@ -6,16 +6,16 @@
积分余额
</view>
<view class="righttext">
<image src="../../static/jfgz.png" mode=""></image>
<!-- <image src="../../static/jfgz.png" mode=""></image>
<view class="">
积分规则
</view>
</view> -->
</view>
<view class="title">
1000
{{integral}}
</view>
<view class="centertext">
20积分将于2022.01.01过期
<!-- 20积分将于2022.01.01过期 -->
</view>
<view class="bottombutton" @tap='gainshow=true'>
获取积分
@ -25,13 +25,18 @@
积分兑换
</view>
<view class="items">
<view class="item">
<image src="../../static/kefu.png" mode=""></image>
<view class="item" v-for="(item,index) in goodslist" :key="index">
<image :src="item.goodsPictureUrl" mode=""></image>
<view class="title">
维生素1盒
{{item.goodsName}}
</view>
<view class="text">
{{item.attributeDetailsName}}
</view>
<view class="jifen">
需使用1000积分兑换
需使用
<span style='padding: 0 5rpx;'> {{item.integralExchangeSill}}</span>
积分兑换
</view>
<view class="btn">
立即兑换
@ -47,45 +52,161 @@
<view class="item">
<image src="../../static/qiandao.png" mode=""></image>
<view class="titletext">
累计签到24天
累计签到
<span style='padding: 0 5rpx;'> {{list.totalSignInDays}}</span>
(当前签到
<span style='padding: 0 5rpx;'> {{list.patientSignInCount}}</span>)
</view>
<view class="text">
+30积分
<span style='padding: 0 5rpx;'> {{list.signInCount}}</span>积分
</view>
<view class="btn">
<view class="btn" @tap='signIninfo' v-if='list.todaySignInCount==0'>
签到
</view>
<view class="btn" v-if='list.todaySignInCount==1'>
已签到
</view>
</view>
<view class="item" style="background-color: #F44B2F;">
<image src="../../static/yaoqing.png" mode=""></image>
<view class="titletext">
每邀请1位好友
每邀请
<span style='padding: 0 5rpx;'> 1</span>
位好友
</view>
<view class="text">
20积分
<span style='padding: 0 5rpx;'> {{list.inviteFriends}}</span>积分
</view>
<view class="btn" style="color: #F44B2F;">
<view class="btn" style="color: #F44B2F;" @tap="yaoqingshowtrue">
去完成
</view>
</view>
</view>
</view>
</u-mask>
<u-mask :show="yaoqingshow" @tap="yaoqingshowfalse">
<view class="masks" @click.stop="">
<r-canvas ref="rCanvas"></r-canvas>
</view>
</u-mask>
<u-toast ref="uToast" />
</view>
</template>
<script>
import {
signIn,
selectPatientSignIn,
selectExchangeGoods
} from '@/api/integral/index.js'
import {
inviteFriends
} from '@/api/Personal/Personal.js';
import baseurl from '../../api/baseurl';
export default {
data() {
return {
integral: 0,
gainshow: false,
yaoqingshow: false,
patientId: null,
list: null,
inviteimg: null,
pageNum: 1,
pageSize: 10,
goodstotal: 0,
goodslist: null,
};
},
methods: {},
onReady() {
},
onLoad(options) {
this.integral = options.integral
var that = this
this.selectExchangeGoodsinfo();
const value = uni.getStorageSync('patientId');
if (value) {
that.patientId = value
that.selectPatientSignInifo();
inviteFriends(value).then(res => {
that.inviteimg = res.msg
})
}
},
methods: {
yaoqingshowfalse() {},
//
selectExchangeGoodsinfo() {
selectExchangeGoods(this.pageNum, this.pageSize).then(res => {
res.rows.forEach(e => {
e.goodsPictureUrl = baseurl + e.goodsPictureUrl
})
this.goodslist = res.rows
this.goodstotal = res.total
})
},
//
selectPatientSignInifo() {
selectPatientSignIn(this.patientId).then(res => {
this.list = res.data
})
},
//
signIninfo() {
signIn(this.patientId).then(res => {
if (res.code == 200) {
this.$refs.uToast.show({
title: '今日签到成功',
type: 'success',
duration: '1000',
})
this.selectPatientSignInifo();
}
})
},
},
onReachBottom() { //
if (this.goodslist.length >= this.goodstotal) {} else {
this.pageNum++;
selectExchangeGoods(this.pageNum, this.pageSize).then(res => {
res.rows.forEach(e => {
e.goodsPictureUrl = baseurl + e.goodsPictureUrl
this.goodslist.push(e)
})
})
}
},
onPullDownRefresh() { //
this.pageNum = 1;
this.selectExchangeGoodsinfo();
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
},
}
</script>
<style lang="scss">
.app {
.masks {
margin: 50rpx auto 0;
height: 1100rpx;
width: 620rpx;
::v-deep .r-canvas {
height: 1100rpx !important;
width: 620rpx !important;
margin: 0 auto;
}
::v-deep .r-canvas-component {
height: 1100rpx !important;
width: 620rpx !important;
margin: 0 auto;
}
}
.mask {
position: fixed;
bottom: 0;
@ -96,7 +217,8 @@
.maskitems {
color: #fff;
width: 90%;
margin:60rpx auto 0;
margin: 60rpx auto 0;
.item {
background: #557BC2;
width: 100%;
@ -158,11 +280,20 @@
height: 220rpx;
position: relative;
.text {
font-size: 24rpx;
position: absolute;
left: 220rpx;
top: 90rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis
}
.btn {
position: absolute;
right: 40rpx;
top: 50%;
transform: translateY(-50%);
top: 140rpx;
width: 139rpx;
height: 44rpx;
background: #557BC2;
@ -183,11 +314,15 @@
}
.title {
width: 460rpx;
font-size: 34rpx;
font-weight: 600;
position: absolute;
left: 220rpx;
top: 60rpx;
top: 25rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis
}
image {
@ -237,8 +372,8 @@
.title {
position: absolute;
left: 50%;
font-size: 60rpx;
top: 70rpx;
font-size: 70rpx;
top: 90rpx;
transform: translateX(-50%);
}

View File

@ -1,83 +1,399 @@
<template>
<view class="app">
<view class="concent">
<view class="background">
<image src="/static/logo.png" mode=""></image>
<view class="detailed">
敬请期待
<view class="tabs">
<view class="tab-item">
<view class="title">
</view>
<view class="text">
{{total}}
</view>
</view>
</view>
<view class="content">
<view class="statuss">
<!-- <view class="statusitem" @tap="changingcoupon('RECEIVE')"
:style="couponstatus=='RECEIVE'?'color: #F44B2F;':''">
未领取
</view>
<span> |</span>
<view class="statusitem" @tap="changingcoupon('NOT_USED')"
:style="couponstatus=='NOT_USED'?'color: #F44B2F;':''">
未使用
</view>
<span> |</span>
<view class="statusitem" @tap="changingcoupon('USED')"
:style="couponstatus=='USED'?'color: #F44B2F;':''">
已使用
</view>
<span> |</span>
<view class="statusitem" @tap="changingcoupon('EXPIRED')"
:style="couponstatus=='EXPIRED'?'color: #F44B2F;':''">
已过期
</view> -->
</view>
<view class="rollup">
<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'&&item.useStatus!='RECEIVE'?'background: #EFECEC;color: #4B4B4B;':''">
<view class="title">
<span class="text">
</span>
<span class="price">
{{item.couponPrice}}
</span>
</view>
<view class="what"
:style="item.useStatus!='NOT_USED'&&item.useStatus!='RECEIVE'?'background: #DADADA;;':''">
{{item.couponTitle}}
</view>
<view class="texts">
{{item.couponConsumePrice}}可用
</view>
<view class="time" v-if="item.useStatus!='RECEIVE'">
有效期至{{item.expirationEndTime}}
</view>
<view class="btn" v-if="item.useStatus=='RECEIVE'" @tap='logininfo'>
{{item.useStatus=='RECEIVE'?'领取':''}}
</view>
<view class="btngq" v-if="item.useStatus!='NOT_USED'&&item.useStatus!='RECEIVE'">
{{item.useStatus=='EXPIRED'?'已过期':''}}
{{item.useStatus=='USED'?'已使用':''}}
</view>
<view class="btn" v-if="item.useStatus=='NOT_USED'">
{{item.useStatus=='NOT_USED'?'使用':''}}
</view>
</view>
<view class="bottom" v-if="item.useStatus=='NOT_USED'||item.useStatus=='RECEIVE'">
领取来源{{item.receiveSource =='NEW_PEOPLE_WELFARE'?'新人福利':''}}
{{item.receiveSource =='EVENT_GIFT'?'活动赠送':''}}
{{item.receiveSource =='CONSUME_REBATE'?'消费返券':''}}
</view>
</view>
</view>
</view>
<u-mask :show="usershow" class='mask'>
<view class="information">
<image src="../../static/information.png" mode=""></image>
<view class="title">
请完善个人信息
</view>
<view class="cancel" @tap='usershow=false'>
取消
</view>
<view class="determine" @tap='goinformation'>
去完善
</view>
</view>
</u-mask>
<u-toast ref="uToast" />
</view>
</template>
<script>
import {
couponByUseStatus
} from '@/api/materialbenefits/index.js'
import {
AppIdentification
} from '@/api/AppIdentification/index.js'
export default {
data() {
return {
usershow: false,
pageNum: 1,
pageSize: 10,
couponlist: null,
total: 0,
couponstatus: '', //
patientId: null,
};
},
//1.
onShareAppMessage(res) {
let pages = getCurrentPages();
let url = pages[pages.length - 1].$page.fullPath
return {
title: '泉医到家',
path: url,
onShow() {
this.pageNum = 1
var that = this
const value = uni.getStorageSync('patientId');
if (value) {
that.patientId = value
that.getlist();
} else {
that.patientId = ''
that.getlist();
}
},
//2.
onShareTimeline(res) {
let pages = getCurrentPages();
let url = pages[pages.length - 1].$page.fullPath
return {
title: '泉医到家',
path: url,
methods: {
logininfo() {
var that = this
const value = uni.getStorageSync('patientId');
const value2 = uni.getStorageSync('openid');
if (value && value2) {
AppIdentification(value).then(res => {
if (res.code == 200) {
if (res.data.loginFlag) {} else {
this.usershow = true
}
} else {
that.$refs.uToast.show({
title: '请先登录',
type: 'error',
duration: '2000',
url: '/pages/login/login'
})
}
})
} else {
that.$refs.uToast.show({
title: '请先登录',
type: 'error',
duration: '2000',
url: '/pages/login/login'
})
}
},
getlist() {
couponByUseStatus(this.patientId).then(res => {
this.couponlist = res.rows
this.total = res.total
})
},
changingcoupon(item) {
if (this.couponstatus == item) {
this.couponstatus = ''
} else {
this.couponstatus = item
}
this.getlist();
},
//
goinformation() {
this.usershow = false
uni.navigateTo({
url: '/pages/information/information'
})
},
},
onReachBottom() { //
if (this.couponlist.length >= this.total) {} else {
this.pageNum++;
couponByUseStatus(this.patientId).then(res => {
res.rows.forEach(e => {
this.couponlist.push(e)
})
})
}
},
onPullDownRefresh() { //
this.pageNum = 1;
this.getlist();
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
},
}
</script>
<style lang="scss">
.app {
padding-top: 10rpx;
font-size: 34rpx;
padding: 0;
.concent {
width: 701rpx;
height: 440rpx;
background: #4C7BC9;
box-shadow: 0px 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
border-radius: 20rpx;
margin: 5% auto 20px;
.background {
position: relative;
width: 657rpx;
.mask {
.information {
width: 70%;
height: 400rpx;
margin: 50% auto;
background: #FFFFFF;
border-radius: 25rpx;
background-color: white;
margin: 0 auto;
top: 50%;
transform: translateY(-50%);
border-radius: 30rpx;
text-align: center;
color: #FFFFFF;
position: relative;
.determine,
.cancel {
width: 200rpx;
height: 70rpx;
border-radius: 26rpx;
font-size: 34rpx;
line-height: 70rpx;
position: absolute;
top: 74%;
}
.determine {
background: #4C7BC9;
right: 36rpx;
}
.cancel {
background: #C5BFBF;
left: 36rpx;
}
.title {
font-size: 42rpx;
margin-top: 40rpx;
color: #000000;
}
image {
width: 178rpx;
height: 160rpx;
background: #FFFFFF;
border-radius: 25px;
margin-left: 68%;
margin-top: 0;
width: 100rpx;
height: 100rpx;
margin: 10% 0 0 0;
}
}
}
.content {
width: 96%;
margin: 20rpx auto 0;
background-color: #fff;
padding-bottom: 100rpx;
.rollup {
border-radius: 5rpx;
.item {
width: 94%;
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 {
width: 100%;
height: 180rpx;
background: #FDE9E8;
position: relative;
color: #F44B2F;
border-radius: 10rpx 10rpx 0 0;
.what {
padding: 0 10rpx;
height: 40rpx;
background: #FED1D2;
border-radius: 16rpx;
font-size: 20rpx;
line-height: 40rpx;
text-align: center;
position: absolute;
top: 120rpx;
left: 20rpx;
}
.btngq {
width: 109rpx;
height: 180rpx;
background: #DFDEDE;
position: absolute;
top: 0;
right: 0;
text-align: center;
line-height: 180rpx;
}
.btn {
width: 98rpx;
height: 50rpx;
border: 2rpx solid #F44B2F;
border-radius: 24rpx;
font-size: 24rpx;
position: absolute;
top: 70rpx;
right: 20rpx;
text-align: center;
line-height: 49rpx;
}
.time {
font-size: 24rpx;
position: absolute;
top: 120rpx;
left: 200rpx;
}
.texts {
font-size: 32rpx;
font-weight: 800;
position: absolute;
top: 44rpx;
left: 200rpx;
}
.title {
position: absolute;
top: 30rpx;
left: 10rpx;
.price {
font-size: 54rpx;
font-weight: 700;
}
.text {
font-weight: 600;
font-size: 34rpx;
}
}
}
}
}
.detailed {
padding: 0 20rpx;
line-height: 56rpx;
.statuss {
padding-top: 25rpx;
span {
color: #c1c1c1;
font-size: 18rpx;
line-height: 60rpx;
}
.statusitem {
text-align: center;
padding: 0 40rpx;
display: inline-block;
height: 60rpx;
font-size: 30rpx;
color: #969394;
line-height: 60rpx;
}
}
}
.tabs {
width: 100%;
.tab-item {
margin: 20rpx 0 0 24rpx;
text-align: center;
width: 20%;
.text {
width: 70%;
margin-left: 15%;
height: 30rpx;
background: #F44B2F;
border-radius: 9rpx;
color: #fff;
font-size: 24rpx;
line-height: 30rpx;
}
.title {
font-size: 40rpx;
font-family: Source Han Sans CN;
font-weight: 500;
color: #F44B2F;
line-height: 59rpx;
}
}
}
}
</style>

View File

@ -80,8 +80,8 @@
.radio {
display: inline-block;
width: 40rpx;
height: 40rpx;
width: 50rpx;
height: 50rpx;
border-radius: 70%;
border: 2rpx solid #178ffb;
position: absolute;

View File

@ -12,8 +12,8 @@
</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">
<u-radio-group v-model="appPersonallist.sex" size='44' >
<u-radio @change='sexchange' v-for="(item, index) in sexlist" :key="index" :name="item.name" :disabled="item.disabled">
{{item.name}}
</u-radio>
</u-radio-group>
@ -53,7 +53,7 @@
</view>
</view>
<view class="disease" style="border: none;" @tap="godisease">
<view class="title" style="">疾病类型:</view>
<view class="title" style="">基础疾病:</view>
<image class="pictureA" src="../../static/huijiantou.png" mode=""></image>
<view style="padding-right: 10rpx;display: inline-block;"
v-for="(item,index) in patientDiseaseInfoList">

View File

@ -33,6 +33,13 @@
path: url,
}
},
onLoad(query) {
// scene 使 decodeURIComponent scene
const scene = decodeURIComponent(query.scene)
if (scene >= 0) {
uni.setStorageSync("invitationPatientId", scene)
}
},
onShow() {
var that = this
createMobileToken().then(res => {

BIN
static/yaoqinghaoyou.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB