|  | @@ -3,7 +3,14 @@
 | 
											
												
													
														|  |  		<!-- <view class="img-box"  @click="showImg()">
 |  |  		<!-- <view class="img-box"  @click="showImg()">
 | 
											
												
													
														|  |  			<image  :src="item.imgUrl"></image>
 |  |  			<image  :src="item.imgUrl"></image>
 | 
											
												
													
														|  |  		</view> -->
 |  |  		</view> -->
 | 
											
												
													
														|  | -		
 |  | 
 | 
											
												
													
														|  | 
 |  | +		<!-- 购买轮播列表 -->
 | 
											
												
													
														|  | 
 |  | +		 <view class="buy-lists" v-if="notics&¬ics.length>0" :style="{height: boxHeight+'px'}">
 | 
											
												
													
														|  | 
 |  | +			<view :class="{'buy-top': animate == true }" :style="{marginTop: animate == true ? `-${marginTop}px`:'0'}">
 | 
											
												
													
														|  | 
 |  | +				<view class="buy-list buy-txtbox" v-for="(item,index) in notics" :key="index">
 | 
											
												
													
														|  | 
 |  | +					<view class="buy-item"><text class="textOne buy-name" >{{item.fsUserName|| ''}}</text><text>{{item.timeTxt}} 已下单</text></view>
 | 
											
												
													
														|  | 
 |  | +				</view>
 | 
											
												
													
														|  | 
 |  | +			</view>
 | 
											
												
													
														|  | 
 |  | +		 </view>
 | 
											
												
													
														|  |  		<view class="cont-box">
 |  |  		<view class="cont-box">
 | 
											
												
													
														|  |  			<view class="goods-banner" @click="showImg()">
 |  |  			<view class="goods-banner" @click="showImg()">
 | 
											
												
													
														|  |  				<swiper
 |  |  				<swiper
 | 
											
										
											
												
													
														|  | @@ -175,7 +182,7 @@
 | 
											
												
													
														|  |  		</u-popup>
 |  |  		</u-popup>
 | 
											
												
													
														|  |  		<view class="message-box" v-if="orderCount>0">
 |  |  		<view class="message-box" v-if="orderCount>0">
 | 
											
												
													
														|  |  			<view class="left">
 |  |  			<view class="left">
 | 
											
												
													
														|  | -				<image src="/static/images/close24.png" mode="" @click="closeOrder()" ></image>
 |  | 
 | 
											
												
													
														|  | 
 |  | +				<image src="/static/images/close.png" mode="" @click="closeOrder()" ></image>
 | 
											
												
													
														|  |  				<view class="text ellipsis">您有{{count}}个待支付订单</view>
 |  |  				<view class="text ellipsis">您有{{count}}个待支付订单</view>
 | 
											
												
													
														|  |  			</view>
 |  |  			</view>
 | 
											
												
													
														|  |  			<view class="btn" @click="showOrder()">查看</view>
 |  |  			<view class="btn" @click="showOrder()">查看</view>
 | 
											
										
											
												
													
														|  | @@ -184,9 +191,10 @@
 | 
											
												
													
														|  |  </template>
 |  |  </template>
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  <script>
 |  |  <script>
 | 
											
												
													
														|  | 
 |  | +	import { caculateTimeago } from '@/pages/TUIKit/utils/date.ts';
 | 
											
												
													
														|  |  	import {create,getOrderCount} from '@/api/packageOrder.js'
 |  |  	import {create,getOrderCount} from '@/api/packageOrder.js'
 | 
											
												
													
														|  |  	import {bindCompanyUser} from '@/api/companyUser.js'
 |  |  	import {bindCompanyUser} from '@/api/companyUser.js'
 | 
											
												
													
														|  | -	import {getPackageById,getPackageDoctorList} from '@/api/package.js'
 |  | 
 | 
											
												
													
														|  | 
 |  | +	import {getPackageById,getPackageDoctorList,getNewOrderByPackageId} from '@/api/package.js'
 | 
											
												
													
														|  |  	export default {
 |  |  	export default {
 | 
											
												
													
														|  |  		data() {
 |  |  		data() {
 | 
											
												
													
														|  |  			return {
 |  |  			return {
 | 
											
										
											
												
													
														|  | @@ -209,7 +217,12 @@
 | 
											
												
													
														|  |  				doctorTotal:0,
 |  |  				doctorTotal:0,
 | 
											
												
													
														|  |  				companyUserId:null,
 |  |  				companyUserId:null,
 | 
											
												
													
														|  |  				companyId:null,
 |  |  				companyId:null,
 | 
											
												
													
														|  | -				choose: 0
 |  | 
 | 
											
												
													
														|  | 
 |  | +				choose: 0,
 | 
											
												
													
														|  | 
 |  | +				boxHeight: 94,
 | 
											
												
													
														|  | 
 |  | +				marginTop: 30,
 | 
											
												
													
														|  | 
 |  | +				animate:false,
 | 
											
												
													
														|  | 
 |  | +				timer:null,
 | 
											
												
													
														|  | 
 |  | +				notics:[],
 | 
											
												
													
														|  |  			};
 |  |  			};
 | 
											
												
													
														|  |  		},
 |  |  		},
 | 
											
												
													
														|  |  		onLoad(option) {
 |  |  		onLoad(option) {
 | 
											
										
											
												
													
														|  | @@ -222,6 +235,12 @@
 | 
											
												
													
														|  |  				this.companyUserId=option.companyUserId
 |  |  				this.companyUserId=option.companyUserId
 | 
											
												
													
														|  |  			}
 |  |  			}
 | 
											
												
													
														|  |  		},
 |  |  		},
 | 
											
												
													
														|  | 
 |  | +		onReady() {
 | 
											
												
													
														|  | 
 |  | +			this.getNewOrderByPackageId()
 | 
											
												
													
														|  | 
 |  | +		},
 | 
											
												
													
														|  | 
 |  | +		onUnload() {
 | 
											
												
													
														|  | 
 |  | +			if(this.timer) clearInterval(this.timer)
 | 
											
												
													
														|  | 
 |  | +		},
 | 
											
												
													
														|  |  		onShow() {
 |  |  		onShow() {
 | 
											
												
													
														|  |  			var that=this;
 |  |  			var that=this;
 | 
											
												
													
														|  |  			this.$isLogin().then(
 |  |  			this.$isLogin().then(
 | 
											
										
											
												
													
														|  | @@ -265,6 +284,47 @@
 | 
											
												
													
														|  |  			
 |  |  			
 | 
											
												
													
														|  |  		},
 |  |  		},
 | 
											
												
													
														|  |  		methods:{
 |  |  		methods:{
 | 
											
												
													
														|  | 
 |  | +			getNewOrderByPackageId() {
 | 
											
												
													
														|  | 
 |  | +				if(this.timer) clearInterval(this.timer)
 | 
											
												
													
														|  | 
 |  | +				getNewOrderByPackageId({packageId:this.packageId}).then(res=>{
 | 
											
												
													
														|  | 
 |  | +					if(res.code== 200) {
 | 
											
												
													
														|  | 
 |  | +						this.notics = res.data
 | 
											
												
													
														|  | 
 |  | +						if(res.data&&res.data.length > 0) {
 | 
											
												
													
														|  | 
 |  | +							this.notics = res.data.map(item=>({
 | 
											
												
													
														|  | 
 |  | +								...item,
 | 
											
												
													
														|  | 
 |  | +								timeTxt: caculateTimeago(new Date(item.payTime).getTime(),1)
 | 
											
												
													
														|  | 
 |  | +							}))
 | 
											
												
													
														|  | 
 |  | +							
 | 
											
												
													
														|  | 
 |  | +							this.getText()
 | 
											
												
													
														|  | 
 |  | +							this.timer = setInterval(this.scroll, 1400);
 | 
											
												
													
														|  | 
 |  | +						}
 | 
											
												
													
														|  | 
 |  | +					} else {
 | 
											
												
													
														|  | 
 |  | +						this.notics = []
 | 
											
												
													
														|  | 
 |  | +					}
 | 
											
												
													
														|  | 
 |  | +				})
 | 
											
												
													
														|  | 
 |  | +			},
 | 
											
												
													
														|  | 
 |  | +			scroll() {
 | 
											
												
													
														|  | 
 |  | +				this.animate = true;
 | 
											
												
													
														|  | 
 |  | +				setTimeout(() => {
 | 
											
												
													
														|  | 
 |  | +					this.notics.push(this.notics[0]);
 | 
											
												
													
														|  | 
 |  | +					this.notics.shift();
 | 
											
												
													
														|  | 
 |  | +					this.animate = false;
 | 
											
												
													
														|  | 
 |  | +				}, 1000);
 | 
											
												
													
														|  | 
 |  | +			},
 | 
											
												
													
														|  | 
 |  | +			getText() {
 | 
											
												
													
														|  | 
 |  | +				const query = uni.createSelectorQuery().in(this);
 | 
											
												
													
														|  | 
 |  | +				query
 | 
											
												
													
														|  | 
 |  | +				  .select(".buy-txtbox")
 | 
											
												
													
														|  | 
 |  | +				  .boundingClientRect((data) => {
 | 
											
												
													
														|  | 
 |  | +					this.marginTop = data.height + uni.upx2px(14)
 | 
											
												
													
														|  | 
 |  | +					if(this.notics.length>2) {
 | 
											
												
													
														|  | 
 |  | +						this.boxHeight = this.marginTop * 3 + uni.upx2px(8)
 | 
											
												
													
														|  | 
 |  | +					} else {
 | 
											
												
													
														|  | 
 |  | +						this.boxHeight = this.marginTop * this.notics.length + uni.upx2px(8)
 | 
											
												
													
														|  | 
 |  | +					}
 | 
											
												
													
														|  | 
 |  | +				  })
 | 
											
												
													
														|  | 
 |  | +				  .exec();
 | 
											
												
													
														|  | 
 |  | +			},
 | 
											
												
													
														|  |  			closeOrder(){
 |  |  			closeOrder(){
 | 
											
												
													
														|  |  				this.messageShow=false;
 |  |  				this.messageShow=false;
 | 
											
												
													
														|  |  			},
 |  |  			},
 | 
											
										
											
												
													
														|  | @@ -443,6 +503,50 @@
 | 
											
												
													
														|  |  	page{
 |  |  	page{
 | 
											
												
													
														|  |  		height: 100%;
 |  |  		height: 100%;
 | 
											
												
													
														|  |  	}
 |  |  	}
 | 
											
												
													
														|  | 
 |  | +	.textOne {
 | 
											
												
													
														|  | 
 |  | +		overflow: hidden;
 | 
											
												
													
														|  | 
 |  | +		white-space: nowrap;
 | 
											
												
													
														|  | 
 |  | +		text-overflow: ellipsis;
 | 
											
												
													
														|  | 
 |  | +	}
 | 
											
												
													
														|  | 
 |  | +	.buy-lists{
 | 
											
												
													
														|  | 
 |  | +		height: 188rpx;
 | 
											
												
													
														|  | 
 |  | +		background-color:transparent;
 | 
											
												
													
														|  | 
 |  | +		overflow: hidden;
 | 
											
												
													
														|  | 
 |  | +		width: 60%;
 | 
											
												
													
														|  | 
 |  | +		position: absolute;
 | 
											
												
													
														|  | 
 |  | +		z-index: 99;
 | 
											
												
													
														|  | 
 |  | +		top: 20vh;
 | 
											
												
													
														|  | 
 |  | +		left: 20rpx;
 | 
											
												
													
														|  | 
 |  | +	}
 | 
											
												
													
														|  | 
 |  | +	.buy-list{
 | 
											
												
													
														|  | 
 |  | +		height: 46rpx;
 | 
											
												
													
														|  | 
 |  | +		font-size: 26rpx;
 | 
											
												
													
														|  | 
 |  | +		margin-top: 14rpx;
 | 
											
												
													
														|  | 
 |  | +		overflow: hidden;
 | 
											
												
													
														|  | 
 |  | +		color: #fff;
 | 
											
												
													
														|  | 
 |  | +		.buy-item {
 | 
											
												
													
														|  | 
 |  | +			display: inline-flex;
 | 
											
												
													
														|  | 
 |  | +			align-items: center;
 | 
											
												
													
														|  | 
 |  | +			height: 100%;
 | 
											
												
													
														|  | 
 |  | +			overflow: hidden;
 | 
											
												
													
														|  | 
 |  | +			background-color: rgba(0, 0, 0, 0.35);
 | 
											
												
													
														|  | 
 |  | +			border-radius: 10rpx;
 | 
											
												
													
														|  | 
 |  | +			padding: 0 20rpx;
 | 
											
												
													
														|  | 
 |  | +			box-sizing: border-box;
 | 
											
												
													
														|  | 
 |  | +		}
 | 
											
												
													
														|  | 
 |  | +		.buy-name {
 | 
											
												
													
														|  | 
 |  | +			width: 50%;
 | 
											
												
													
														|  | 
 |  | +			margin-right: 10rpx;
 | 
											
												
													
														|  | 
 |  | +		}
 | 
											
												
													
														|  | 
 |  | +		text {
 | 
											
												
													
														|  | 
 |  | +			word-break: break-all;
 | 
											
												
													
														|  | 
 |  | +			white-space: nowrap;
 | 
											
												
													
														|  | 
 |  | +		}
 | 
											
												
													
														|  | 
 |  | +	}
 | 
											
												
													
														|  | 
 |  | +	.buy-top {
 | 
											
												
													
														|  | 
 |  | +	    transition: all 1.5s ease-in;
 | 
											
												
													
														|  | 
 |  | +	    margin-top: -60rpx;
 | 
											
												
													
														|  | 
 |  | +	  }
 | 
											
												
													
														|  |  	.content{
 |  |  	.content{
 | 
											
												
													
														|  |  		height: 100%;
 |  |  		height: 100%;
 | 
											
												
													
														|  |  		display: flex;
 |  |  		display: flex;
 |