更新小程序仓库

This commit is contained in:
zoujiandong
2023-11-17 09:51:35 +08:00
parent 13f54a26df
commit 4506940c2d
936 changed files with 60022 additions and 0 deletions
+180
View File
@@ -0,0 +1,180 @@
// pages/my/my.js
import {getCenter} from "../../api/personCenter"
import {setBarData,throttle} from "../../utils/util"
import {coupon} from "../../api/personCenter"
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
patient_info:'',
opacity:0,
show_fuli:false,
img_host:'https://oss.prod.applets.igandanyiyuan.com/applet/patient/static'
},
getInfo(){
getCenter().then((data)=>{
this.setData({
patient_info:data,
show_fuli:data.coupon
})
//this.getcoupon()
})
},
goCenter:throttle(function(){
app.method.navigateTo({
url: '/pages/personCenter/personCenter',
})
}),
goAgreement:throttle(function(){
app.method.navigateTo({
url: '/pages/agreeList/agreeList',
})
}),
goWelfare:throttle(function(){
app.method.navigateTo({
url: '/pages/myWelfare/myWelfare',
})
}),
goMedinceRecord:throttle(function(){
app.method.navigateTo({
url: '/pages/medinceRecord/medinceRecord',
})
}),
goMyDoctor:throttle(function(){
app.method.navigateTo({
url: '/pages/myDoctor/myDoctor',
})
}),
goFamily:throttle(function(){
app.method.navigateTo({
url: '/pages/familyDoc/familyDoc',
})
}),
goAddress:throttle(function(){
app.method.navigateTo({
url: '/pages/address/address',
})
}),
goConsultOrder:throttle(function(){
app.method.navigateTo({
url: '/pages/consultOrder/consultOrder',
})
}),
goCheckOrder:throttle(function(){
app.method.navigateTo({
url: '/pages/checkOrder/checkOrder',
})
}),
goMyPrescript:throttle(function(){
app.method.navigateTo({
url: '/pages/myPrescript/myPrescript',
})
}),
goMedinceOrder:throttle(function(){
app.method.navigateTo({
url: '/pages/medinceOrder/medinceOrder',
})
}),
watchBack(){
let total=app.globalData.totalUnread;
setBarData(total);
},
getcoupon() {
coupon({
user_coupon_status:0
}).then(data => {
if(data.length>0){
this.setData({
show_fuli:true
})
}else{
this.setData({
show_fuli:false
})
}
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
wx.removeTabBarBadge({
index:1
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
onPageScroll: function(e) {
let opacity=0;
if(e.scrollTop/(86/10)>=1){
opacity=1
}else{
opacity=e.scrollTop/(86/10)
}
this.setData({
opacity:opacity
})
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.getInfo();
app.globalData.origion=0;
this.setData({
img_host:app.hostConfig().imghost
});
app.watch(this.watchBack.bind(this))//注册监听
if(!app.globalData.totalUnread && app.globalData.totalUnread!=0){
app.imLogin();
}else{
let total=app.globalData.totalUnread;
setBarData(total);
}
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
})
+4
View File
@@ -0,0 +1,4 @@
{
"usingComponents": {},
"navigationStyle":"custom"
}
+100
View File
@@ -0,0 +1,100 @@
<!--pages/my/my.wxml-->
<wxs src="../../filters/filter.wxs" module="filter"></wxs>
<view class="ui-navigatorbar" style="background-color:transparent;backdrop-filter:blur(0px)">
<view class="ui-title" style="opacity: {{1-opacity}};" >我的</view>
</view>
<view class="page">
<image src="../../assets/images/mybg.png" mode="widthFix" class="dcimg" lazy-load/>
<view class="contentWrap">
<view class="infobox" bindtap="goCenter">
<view class="headbox">
<image src="{{patient_info.avatar}}" class="head" wx:if="{{patient_info.avatar}}"></image>
<image src="{{img_host+'/patient_avatar.png'}}" class="head" wx:else></image>
<view class="namebox">
<view class="name">{{patient_info.user_name}}</view>
<!-- <view class="intro">
个人介绍
</view> -->
</view>
</view>
<view class="rightbox">
<text class="set">设置</text>
<image src="{{img_host+'/righticon.png'}}" class="righticon"></image>
</view>
</view>
<view class="viewcell" style="margin-top: -10rpx;">
<view class="title">我的订单</view>
<view class="iconbox">
<view class="iconcell" bindtap="goConsultOrder">
<image src="../../assets/images/wz_new.png" class="myicon"></image>
<view class="name">问诊</view>
<view class="bage" wx:if="{{patient_info.order_inquiry_count>0}}">{{filter.formatNumber(patient_info.order_inquiry_count)}}</view>
</view>
<view class="iconcell" bindtap="goMyPrescript">
<image src="../../assets/images/cf_new.png" class="myicon"></image>
<view class="name">处方</view>
<view class="bage" wx:if="{{patient_info.order_prescription_count>0}}">{{filter.formatNumber(patient_info.order_prescription_count)}}</view>
</view>
<view class="iconcell" bindtap="goMedinceOrder">
<image src="../../assets/images/yp_new.png" class="myicon"></image>
<view class="name">药品</view>
<view class="bage" wx:if="{{patient_info.order_product_count>0}}">{{filter.formatNumber(patient_info.order_product_count)}}</view>
</view>
<view class="iconcell" bindtap="goCheckOrder">
<image src="../../assets/images/check_new.png" class="myicon"></image>
<view class="name">检测</view>
<view class="bage" wx:if="{{patient_info.order_detection_count>0}}">{{filter.formatNumber(patient_info.order_detection_count)}}</view>
</view>
</view>
</view>
<view class="fuli" style="background: #FFF3F3;" wx:if="{{show_fuli}}" bindtap="goWelfare">
<view class="headbox">
<image src="{{img_host+'/fuli.png'}}" src="{{img_host+'/fuli.png'}}" class="fulicon"></image>
<view class="name">新人福利~立即查看</view>
</view>
<image src="{{img_host+'/righticon.png'}}" class="righticon"></image>
</view>
<view class="fuli" bindtap="goWelfare" wx:else style="background-image: linear-gradient(160deg,#fef5ee 15%,#fff 85%);">
<view class="headbox">
<image src="{{img_host+'/fuli.png'}}" class="fulicon"></image>
<view class="name">我的福利</view>
</view>
<image src="{{img_host+'/righticon.png'}}" class="righticon"></image>
</view>
<view class="viewcell service">
<view class="title">健康档案</view>
<view class="iconbox">
<view class="iconcell" bindtap="goMedinceRecord">
<image src="../../assets/images/record_new.png" class="myicon"></image>
<view class="name">用药记录</view>
</view>
<view class="iconcell" bindtap="goMyDoctor">
<image src="../../assets/images/doctor_new.png" class="myicon"></image>
<view class="name" bindtap="goMyDoctor">我的医生</view>
</view>
<view class="iconcell" bindtap="goFamily">
<image src="../../assets/images/edoc_new.png" class="myicon"></image>
<view class="name">家庭档案</view>
</view>
</view>
</view>
<view class="dcellcontent">
<view class="dcell" bindtap="goAddress">
<view class="decllbox">
<view class="name">收货地址</view>
<image src="{{img_host+'/righticon.png'}}" class="righticon"></image>
</view>
</view>
<view class="dcell" bindtap="goAgreement">
<view class="decllbox">
<view class="name">资质协议和患者知情同意书</view>
<image src="{{img_host+'/righticon.png'}}" class="righticon"></image>
</view>
</view>
</view>
</view>
</view>
+218
View File
@@ -0,0 +1,218 @@
.page {
background: #F2F2F2;
width: 100vw;
height: auto!important;
min-height:100vh;
padding-bottom: 20rpx;
/* overflow-y: scroll;
-webkit-overflow-scrolling: touch; */
}
.contentWrap {
/* position: absolute; */
position: relative;
z-index: 999;
margin: -320rpx 32rpx 0;
/* overflow-y: scroll;
-webkit-overflow-scrolling: touch;
left: 32rpx;
right: 32rpx; */
}
.dcimg{
width:750rpx;
}
.navtitle {
width: 100%;
display: flex;
justify-content: center;
font-size: 36rpx;
color: #fff;
}
.infobox {
width: 100%;
height: 176rpx;
border-radius: 10rpx;
filter: blur(0px);
}
.infobox {
display: flex;
box-sizing: border-box;
align-items: center;
justify-content: space-between;
}
.head {
border-radius: 50%;
width: 128rpx;
height: 128rpx;
}
.headbox {
display: flex;
align-items: center;
}
.headbox .name {
font-weight: 600;
color: #333333;
font-size: 34rpx;
}
.intro{
font-size: 30rpx;
font-weight: 400;
color: rgba(0,0,0,0.65);
}
.namebox{
min-height: 100rpx;
display: flex;
flex-direction: column;
justify-content:center;
margin-left: 20rpx;
}
.rightbox{
display: flex;
align-items: center;
}
.set{
margin-right: 20rpx;
font-size: 30rpx;
color: rgba(0,0,0,0.65);
}
.righticon {
width: 24rpx;
height: 48rpx;
}
.fuli {
width: 100%;
height: 108rpx;
border: 1px solid #EF4F20;
border-radius: 10rpx;
display: flex;
box-sizing: border-box;
align-items: center;
margin-top: 30rpx;
justify-content: space-between;
padding: 0 20rpx 0 20rpx;
}
.fuli .name {
font-size: 30rpx;
margin-left: 20rpx;
font-weight: normal;
}
.fulicon {
width: 48rpx;
height: 48rpx;
}
.viewcell {
margin-top: 30rpx;
width: 100%;
padding-bottom: 20rpx;
height: 256rpx;
overflow: hidden;
background: #FFFFFF;
border-radius: 10rpx;
}
.viewcell .title {
margin:32rpx 20rpx 0;
font-weight: 600;
color: #333333;
font-size: 36rpx;
}
.iconcell {
display: flex;
flex-direction: column;
justify-content: center;
position: relative;
}
.iconbox {
display: flex;
margin: 30rpx 52rpx 0;
justify-content: space-between;
}
.myicon {
width: 80rpx;
height: 80rpx;
margin:0 auto;
}
.iconbox .name {
margin-top: 10rpx;
text-align: center;
color: rgba(0,0,0,0.65);
font-size: 28rpx;
}
.service .iconbox{
width:430rpx;
}
.service .iconbox .name {
margin-top: 10rpx;
text-align: center;
color: rgba(0,0,0,0.65);
font-size: 28rpx;
}
.dcellcontent{
border-radius: 10rpx;
background: #FFFFFF;
}
.dcell {
width: 100%;
box-sizing: border-box;
margin-top: 30rpx;
padding: 0 37rpx 0 20rpx;
}
.decllbox{
height: 112rpx;
border-bottom: 1rpx solid rgba(0,0,0,0.12);
display: flex;
align-items: center;
justify-content: space-between;
}
.dcell:last-child{
margin-top: 0;
margin-bottom: 30rpx;
}
.dcell:last-child .decllbox{
border-bottom: none;
}
.service .myicon {
width: 64rpx;
height: 64rpx;
}
.bage {
position: absolute;
top: -20rpx;
right: 20rpx;
transform: translateX(100%);
min-width:17rpx;
padding:0 10rpx;
height: 36rpx;
display: flex;
align-items: center;
color: #fff;
justify-content: center;
border-radius: 30rpx;
font-size: 26rpx;
background: #EF4F20;
}