zhengjinyi 3 роки тому
батько
коміт
883f31b1bd

+ 12 - 7
App.vue

@@ -79,13 +79,9 @@
 				}
 			})
 			this.refresh()
-			if(uni.getStorageSync('isActivityStatus')){
-				const  lockTime = uni.getStorageSync('lockTime')
-				const  eTime = this.diffTime(lockTime)
-				this.$store.dispatch('setActivityFn',eTime)
-			}else{
-				this.$store.dispatch('setActivityFn',true)
-			}
+		},
+		computed: {
+			...mapState(['hasLogin'])
 		},
 		methods:{
 			...mapMutations(['login','logout','isWxAuthorize']),
@@ -107,6 +103,15 @@
 					this.logout(error.data)
 					uni.setStorageSync('unionId',error.data.unionId)
 					this.$store.commit('updateStatus',error.data)
+					if(!this.hasLogin){
+						if(uni.getStorageSync('isActivitySwitch')){
+							const  lockTime = uni.getStorageSync('lockTime')
+							const  eTime = this.diffTime(lockTime)
+							this.$store.dispatch('setActivityFn',eTime)
+						}else{
+							this.$store.dispatch('setActivityFn',true)
+						}
+					}
 				})
 			},		
 			refresh(){

+ 6 - 6
components/cm-module/activity/activity_01.vue → components/cm-module/activity/activity.vue

@@ -1,7 +1,7 @@
 <template>
 	<view>
 		<view class="tui-alert-class tui-alert-box" :class="[show?'tui-alert-show':'tui-alert-hide']"  @touchmove.stop.prevent="discard">
-			<image src="http://static.caimei365.com/app/meibohui/app/activity-pop.png" mode="" @click.stop="handleClick"></image>
+			<image src="https://static.caimei365.com/app/img/icon/icon-coupon-alert@2x.png" mode="" @click.stop="handleClick"></image>
 			<text class="iconfont icon-2guanbi" @click.stop="handleClickCancel"></text>
 		</view>
 	</view> 
@@ -72,9 +72,9 @@
 		background: rgba(0,0,0,.2);
 		z-index: 99999;
 		image{
-			width: 729rpx;
-			height: 560rpx;
-			margin-top: 130rpx;
+			width: 580rpx;
+			height: 802rpx;
+			margin-top: 100rpx;
 		}
 	}
 	.tui-alert-show {
@@ -95,8 +95,8 @@
 		text-align: center;
 		color: #FFFFFF;
 		position: absolute;
-		top: 30%;
-		left: 69%;
+		top: 25%;
+		right: 4%;
 		font-size: 52rpx;
 	}
 	.tui-alert-mask-show {

+ 421 - 0
components/cm-module/creatOrder/coupon.vue

@@ -0,0 +1,421 @@
+<template name="coupon">
+	<view class="coupon-template">
+		<view class="coupon-title" @tap.stop="showPopup">
+			<text class="text">优惠券:</text>
+			<text class="iconfont icon-xiayibu"></text>
+		</view>
+		<!-- 优惠券 -->
+		<tui-bottom-popup :radius="true" :show="popupShow" @close="hidePopup">
+			<view class="tui-popup-box clearfix">
+				<view class="title">
+					<view class="title-l">优惠券</view>
+					<view class="title-r" @click="showExchangePopup">兑换优惠券</view>
+				</view>
+				<div class="tui-popup-main coupon">
+					<scroll-view class="tui-popup-scroll"  scroll-y="true">
+						<view v-for="(coupon,index) in dataList" :key="index" :id="coupon.id" class="coupon-list"  @click.stop="checkedCoupon(coupon,index)">
+							<view class="list-cell-le">
+								<view class="coupon-maxMoney">
+									<text class="small">¥</text>
+									{{ coupon.maxMoney }}
+								</view>
+								<view class="coupon-minMoney">
+									满{{ coupon.minMoney }}可用
+								</view>
+							</view>
+							<view class="list-cell-ri">
+								<view class="list-cell-top">
+									<view class="list-cell-type">
+										<view class="list-cell-tags">
+											<text class="tags">{{ coupon.couponType | TypeFormat }}</text>
+										</view>
+										<view class="list-cell-texts">
+											<text v-if="coupon.useType == 1">{{ coupon.useType | TypeFormatText }}</text>
+											<text v-if="coupon.useType == 2">{{ coupon.useType | TypeFormatText }}</text>
+											<text v-if="coupon.useType == 3">{{ coupon.useType | TypeFormatText }}{{ coupon.couponText }}的商品</text>
+										</view>
+									</view>
+									<view class="list-cell-btn">
+										<view class="list-cell-checkbox">
+											<view class="checkbox iconfont"											 
+												  :class="[coupon.ischecked ?'icon-yixuanze':'icon-weixuanze']"
+											>
+											</view>
+										</view>
+									</view>
+								</view>
+								<view class="list-cell-time">{{ coupon.couponTime }}</view>
+							</view>
+						</view>
+					</scroll-view>
+				</div>
+				<view class="tui-right-flex tui-popup-btn" :style="{ paddingBottom :isIphoneX ? '68rpx' : '0rpx' }">
+					<view class="tui-flex-1">
+						<view class="tui-button" @click="hidePopup">确定</view>
+					</view>
+				</view>
+			</view>	
+		</tui-bottom-popup>	
+	</view>
+</template>
+
+<script>
+	export default{
+		name:"coupon",
+		props:{
+			
+		},
+		data() {
+			return{
+				popupShow:false,
+				isIphoneX:this.$store.state.isIphoneX,
+				checkedIndex:null,
+				dataList:[
+					{
+						maxMoney:5000,
+						minMoney:1000,
+						couponType:1,
+						couponTime:'2021.06.28~2021.07.28',
+						couponText:'华熙生物技术有限公司',
+						useType:1,
+						couponBtnType:0,
+						ischecked:false
+					},
+					{
+						maxMoney:2000,
+						minMoney:200,
+						couponType:2,
+						couponTime:'2021.06.28~2021.07.28',
+						couponText:'华熙生物技术有限公司',
+						useType:2,
+						couponBtnType:0,
+						ischecked:false
+					},
+					{
+						maxMoney:4000,
+						minMoney:800,
+						couponType:3,
+						couponTime:'2021.06.28~2021.07.28',
+						couponText:'华熙生物技术有限公司',
+						useType:3,
+						couponBtnType:0,
+						ischecked:false
+					},
+					{
+						maxMoney:6000,
+						minMoney:1000,
+						couponType:4,
+						couponTime:'2021.06.28~2021.07.28',
+						couponText:'华熙生物技术有限公司',
+						useType:1,
+						couponBtnType:0,
+						ischecked:false
+					},
+					{
+						maxMoney:6000,
+						minMoney:1000,
+						couponType:5,
+						couponTime:'2021.06.28~2021.07.28',
+						couponText:'华熙生物技术有限公司',
+						useType:2,
+						couponBtnType:0,
+						ischecked:false
+					}
+				],
+			}
+		},
+		filters:{
+			NumFormat(value) {//处理金额
+				return Number(value).toFixed(2);
+			},
+		    totalprice(val,count){//单件商品的价格 × 数量
+		        return (val * count).toFixed(2)
+		    },
+			TypeFormat:function(value) {
+				switch (value) {
+					case 1:
+						return  '活动券';
+						break;
+					case 2:
+						return  '品类券';
+						break;
+					case 3:
+						return  '店铺券';
+						break;
+					case 4:
+						return  '专享券';
+						break;
+					case 5:
+						return  '新用户券';
+						break;
+				}
+			},
+			TypeFormatText:function(value) {
+				switch (value) {
+					case 1:
+						return  '全商城商品通用';
+						break;
+					case 2:
+						return  '仅限购买仪器类商品';
+						break;
+					case 3:
+						return  '仅可购买店铺';
+						break;
+				}
+			}
+		},	
+		created(){
+			
+		},
+		computed: {
+
+		},
+		methods:{
+			checkedCoupon(coupon,idx){// 选择优惠券
+				this.checkedIndex = idx;
+				this.dataList.forEach((el,index) => {
+					if(this.checkedIndex == index){
+						el.ischecked = !el.ischecked;
+					}else{
+						el.ischecked = false
+					}
+				})
+				console.log('this.dataList===>',this.dataList)
+			},
+			showExchangePopup(){
+				this.popupShow = false
+				this.$parent.isExchangePopup = true
+			},
+			showPopup(){
+				this.popupShow = true
+			},
+			hidePopup(){
+				this.popupShow = false
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.coupon-template{
+		width: 100%;
+		height: auto;
+		background: #FFFFFF;
+		float: left;
+		margin-top: 24rpx;
+		.coupon-title{
+			width: 702rpx;
+			padding: 0 24rpx;
+			height: 88rpx;
+			line-height: 88rpx;
+			position: relative;
+			.text{
+				font-size: $font-size-28;
+				color: $text-color;
+			}
+			.iconfont{
+				width: 50rpx;
+				height: 88rpx;
+				line-height: 88rpx;
+				color: #999999;
+				display: block;
+				position: absolute;
+				right: 0;
+				top: 0;
+			}
+		}
+	}	
+	.tui-popup-box {
+		position: relative;
+		box-sizing: border-box;
+		min-height: 220rpx;
+		padding:24rpx 24rpx 0 24rpx;
+		.title{
+			font-size: $font-size-34;
+			color: $text-color;
+			line-height: 88rpx;
+			text-align: center;
+			float: left;
+			width: 100%;
+			height: 88rpx;
+			display: flex;
+			box-sizing: border-box;
+			padding: 0 24rpx;
+			.title-l{
+				flex: 1;
+				text-align: left;
+			}
+			.title-r{
+				flex: 1;
+				text-align: right;
+				color: #f94b4b;
+			}
+		}
+		.tui-popup-main{
+			width: 100%;
+			float: left;
+			padding-top: 10rpx;
+			.tui-popup-scroll{
+				width: 100%;
+				height: 500rpx;
+				.coupon-list{
+					width: 100%;
+					height: 200rpx;
+					margin-bottom: 24rpx;
+					box-sizing: border-box;
+					background: url(https://static.caimei365.com/app/img/icon/icon-coupon-uesb@2x.png);
+					background-size: cover;
+					.list-cell-le{
+						width: 224rpx;
+						height: 100%;
+						box-sizing: border-box;
+						padding: 37rpx 0;
+						float: left;
+						.coupon-maxMoney{
+							width: 100%;
+							height: 78rpx;
+							line-height: 78rpx;
+							font-size: 56rpx;
+							color: #FFFFFF;
+							text-align: center;
+							.small{
+								font-size: $font-size-24;
+							}
+						}
+						.coupon-minMoney{
+							width: 100%;
+							height: 33rpx;
+							line-height: 33rpx;
+							font-size: $font-size-24;
+							color: #FFFFFF;
+							text-align: center;
+						}
+					}
+					.list-cell-ri{
+						width: 478rpx;
+						height: 100%;
+						box-sizing: border-box;
+						padding: 20rpx 24rpx 0 24rpx;
+						float: right;
+						.list-cell-top{
+							width: 100%;
+							height: 121rpx;
+							float: left;
+							border-bottom: 1px solid #e1e1e1;
+							.list-cell-type{
+								width: 286rpx;
+								height: 100%;
+								float: left;
+								.list-cell-tags{
+									width: 100%;
+									height: 32rpx;
+									margin-bottom: 7rpx;
+									.tags{
+										display: inline-block;
+										padding: 0 10rpx;
+										height: 32rpx;
+										line-height: 32rpx;
+										background-color: #ffdcce;
+										color: #f94b4b;
+										font-size: $font-size-20;
+										border-radius: 8rpx;
+										text-align: center;
+										float: left;
+									}
+								}
+								.list-cell-texts{
+									width: 100%;
+									height: auto;
+									line-height:35rpx;
+									text-overflow:ellipsis;
+									display: -webkit-box;
+									word-break: break-all;
+									-webkit-box-orient: vertical;
+									-webkit-line-clamp: 2;
+									overflow: hidden;
+									font-size: 26rpx;
+									color: #333333;
+								}
+							}
+							.list-cell-btn{
+								width: 128rpx;
+								height: 100%;
+								float: right;
+								.list-cell-checkbox{
+									width: 100%;
+									height: 50%;
+									.checkbox{
+										width: 40rpx;
+										line-height: 60rpx;
+										float: right;
+										box-sizing: border-box;
+										text-align: center;
+										text-decoration: none;
+										-webkit-tap-highlight-color: transparent;
+										overflow: hidden;
+										color: #f94b4b;
+									}
+								}
+							}
+						}
+						.list-cell-time{
+							width: 100%;
+							height: 58rpx;
+							line-height: 58rpx;
+							text-align: left;
+							font-size: $font-size-20;
+							color: #999999;
+						}
+					}
+				}
+			}	
+			.tui-popup-coupon{
+				width: 100%;
+				height: 500rpx;
+				box-sizing: border-box;
+				padding:30rpx 20rpx;
+				.tui-popup-h1{
+					width: 100%;
+					height: 66rpx;
+					display: flex;
+					align-items: center;
+					.tui-popup-text{
+						flex: 1;
+						height: 66rpx;
+						line-height: 66rpx;
+						font-size: $font-size-30;
+						color: #333333;
+						&.red{
+							color: #f94b4b;
+						}
+						&.bold{
+							font-weight: bold;
+						}
+						&.left{
+							text-align: left;
+						}
+						&.right{
+							text-align: right;
+						}
+					}
+				}
+			}
+		}
+		.tui-popup-btn {
+			width: 100%;
+			height: auto;
+			float: left;
+			margin-top: 24rpx;
+			.tui-button{
+				width: 100%;
+				height: 88rpx;
+				background: $btn-confirm;
+				line-height: 88rpx;
+				text-align: center;
+				color: #FFFFFF;
+				font-size: $font-size-28;
+				border-radius: 44rpx;
+			}
+		}
+	}		
+</style>

+ 193 - 0
components/cm-module/creatOrder/exchangeCoupon.vue

@@ -0,0 +1,193 @@
+<template name="alert">
+	<view class="alert spec" :class="specClass">
+		<!-- 运费弹窗说明 -->
+		<view class="coupon-popup">
+			<view class="content">
+				<view class="title">
+					<text>兑换优惠券</text>
+					<text class="iconfont icon-iconfontguanbi" @click.stop="hidePopup"></text>
+				</view>
+				<view class="text-content">
+					<view class="coupon-input">
+						<input class="input" type="text" v-model="params.couponCode" maxlength="16"  placeholder="请输入16位兑换码"/>
+					</view>
+					<view class="coupon-main">
+						<view class="coupon-button" @click="exchangeConfirm">立即兑换</view>
+						<view class="coupon-text">
+							<view class="coupon-h1">注意事项:</view>
+							<view class="coupon-h2">1. 兑换码获取:可通过采美线下发放或者销售顾问</view>
+							<view class="coupon-h2 indet">线上发放获得优惠券兑换码,兑换码由16位数字</view>
+							<view class="coupon-h2 indet">和字母组成。</view>
+							<view class="coupon-h2">2. 兑换码使用:在当前页面输入兑换码即可兑换相</view>
+							<view class="coupon-h2 indet">应优惠券一个兑换码只能兑换一张优惠券,</view>
+							<view class="coupon-h2 indet">不可重复使用。</view>
+							<view class="coupon-h2">3. 输入兑换码时请区分字母大小写。</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default{
+		name:'alert',
+		props:{},
+		data() {
+			return{
+				params:{
+					couponCode:'',
+				},
+			}
+		},
+		created() {
+			
+		},
+		onLoad(){
+			
+		},
+		methods:{
+			exchangeConfirm(){
+				if( this.params.couponCode == ''){
+					this.$util.msg('请输入位兑换码',2000)
+					return
+				}
+			},
+			hidePopup(){
+				this.$parent.isExchangePopup = false
+			},
+		},
+		onShow(){
+	
+		}
+	}
+</script>
+
+<style lang="scss">
+	/*弹窗*/
+	.model-warp.none{
+		display: none;
+	}
+	.model-warp.show{
+		display: block;
+	}
+	.coupon-popup{
+		width: 100%;
+		height: 100%;
+		background: rgba(0,0,0,.5);
+		position: fixed;
+		top: 0;
+		left: 0;
+		z-index: 8888;
+		transition: all 0.4s;
+		&.none{
+			display: none;			
+		}
+		&.show{
+			display: block;
+		}
+		.content{
+			width: 580rpx;
+			height: 700rpx;
+			position: absolute;
+			background: $bg-color;
+			left: 0;
+			right: 0;
+			bottom: 0;
+			top: 0;
+			margin: auto;
+			padding: 20rpx 25rpx;
+			border-radius: 12rpx;
+			.title{
+				width: 100%;
+				height: 68rpx;
+				line-height: 68rpx;
+				font-size: $font-size-28;
+				color: $text-color;
+				text-align: center;
+				margin-bottom: 32rpx;
+				position: relative;
+				font-weight: bold;
+				.icon-iconfontguanbi{
+					width: 68rpx;
+					height: 68rpx;
+					text-align: center;
+					line-height: 68rpx;
+					position: absolute;
+					right: 0;
+					top: 0;
+					font-size: $font-size-36;
+					color: #999999;
+				}
+			}
+			.text-content{
+				width: 100%;
+				height: auto;
+				.coupon-input{
+					width: 100%;
+					height: auto;
+					margin-bottom: 48rpx;
+					.input{
+						width: 100%;
+						height: 66rpx;
+						box-sizing: border-box;
+						border: 1px solid #e2e2e2;
+						line-height: 66rpx;
+						padding: 0 20rpx;
+						font-size: $font-size-26;
+						color: #b2b2b2;
+						border-radius: 2rpx;
+					}
+				}
+				.coupon-main{
+					width: 100%;
+					height: auto;
+					box-sizing: border-box;
+					.coupon-button{
+						width: 520rpx;
+						height: 84rpx;
+						margin: 0 auto;
+						border-radius: 50rpx;
+						line-height: 84rpx;
+						text-align: center;
+						background: $btn-confirm;
+						color: #FFFFFF;
+						font-size: $font-size-30;
+					}
+					.coupon-text{
+						width: 100%;
+						box-sizing: border-box;
+						padding: 0 20rpx;
+						margin-top: 40rpx;
+						line-height: 44rpx;
+						text-align: justify;
+						font-size: $font-size-24;
+						.coupon-h1{
+							color: #333333;
+						}
+						.coupon-h2{
+							color: #999999;
+							&.indet{
+								text-indent: 28rpx;
+							}
+						}
+					}
+				}
+			}
+			.btn{
+				width: 100%;
+				height: 88rpx;
+				float: left;
+				background: $btn-confirm;
+				line-height: 88rpx;
+				font-size: $font-size-28;
+				text-align: center;
+				color: #FFFFFF;
+				border-radius: 0;
+				padding: 0;
+				margin-top: 2rpx;
+			}
+		}
+	}
+</style>

+ 0 - 135
components/cm-module/modelAlert/cancelAlert.vue

@@ -1,135 +0,0 @@
-<template name="alert">
-	<view class="alert spec">
-		<view class="model-warp">
-			<view class="model-alert">
-				<view class="model-content">
-					<view class="sm"><text>{{cenceAlertText}}</text></view>
-				</view>
-				<view class="alert-btn">
-					<view class="btn btn-cancel" @click="hideConfirm">放弃</view>
-					<view class="btn btn-confirm" @click="btnConfirm()">确定取消</view>
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	export default{
-		name:'alert',
-		props:['isCenceModal','cenceAlertText'],
-		data() {
-			return{
-
-			}
-		},
-		created() {
-			
-		},
-		onLoad(){
-			
-		},
-		methods:{
-			hideConfirm(){
-				this.$parent.isCenceModal = false
-			},
-			//点击事件
-			btnConfirm(){
-				this.$emit('cenceConfirm')
-			}
-		},
-		onShow(){
-	
-		}
-	}
-</script>
-
-<style lang="scss">
-	/*弹窗*/
-	 .model-warp.none{
-		 display: none;
-	 }
-	 .model-warp.show{
-		 display: block;
-	 }
-	 .model-warp{
-		width: 100%;
-		height: 100%;
-		background: rgba(0,0,0,.5);
-		position: fixed;
-		top: 0;
-		left: 0;
-		z-index: 8888;
-		transition: all 0.4s;
-		&.none{
-			display: none;			
-		}
-		&.show{
-			display: block;
-		}
-		.model-alert{
-			width: 518rpx;
-			height: 316rpx;
-			position: absolute;
-			background: $bg-color;
-			left: 0;
-			right: 0;
-			bottom: 0;
-			top: 0;
-			margin: auto;
-			.alert-content{
-				width: 466rpx;
-				height: 152rpx;
-				padding: 40rpx 26rpx;					
-				.t-h1,.t-p{
-					font-size: $font-size-28;
-					line-height: 40rpx;
-					color: #333333;
-					text-align:justify;
-					padding: 10rpx;
-				}
-				.t-h1{
-					border-bottom: 1px solid $border-color;
-				}
-			}
-			.model-content{
-				width: 466rpx;
-				height: 152rpx;
-				padding: 40rpx 26rpx;	
-				display: flex;
-				flex-direction: column;
-				align-items: center;
-				.sm{
-					display: flex;
-					flex: 1;
-					line-height: 152rpx;
-					flex-direction: column;
-					align-items: center;
-					text-align: center;
-					font-size: $font-size-28;
-					color: #333333;
-				}
-			}
-			.alert-btn{
-				width: 100%;
-				height: 88rpx;
-				display: flex;
-				.btn{
-					flex: 1;
-					line-height: 88rpx;
-					font-size: $font-size-28;
-					text-align: center;
-					color: #FFFFFF;
-					border-radius: 0;
-					padding: 0;
-					&.btn-cancel{
-						background: $btn-cancel;
-					}
-					&.btn-confirm{
-						background: $btn-confirm;
-					}
-				}
-			}
-		}
-	}
-</style>

+ 1 - 1
components/cm-module/modelAlert/freightAlert.vue

@@ -137,4 +137,4 @@
 		}
 	}
 	
-</style>
+</style>

+ 0 - 262
components/keyboard/keyboard.vue

@@ -1,262 +0,0 @@
-<template>		
-	<view class='keyboard' @click.stop='_handleKeyPress'>
-	    <view class='key-row'>
-	        <view class='key-cell cell_b' data-num='7'>7</view>
-	        <view class='key-cell cell_b' data-num='8'>8</view>
-	        <view class='key-cell cell_b' data-num='9'>9</view>
-			<view class='key-cell cell_b ac' data-num='-1'></view>
-	    </view>
-	    <view class='key-row'>
-	        <view class='key-cell cell_b' data-num='4'>4</view>
-	        <view class='key-cell cell_b' data-num='5'>5</view>
-	        <view class='key-cell cell_b' data-num='6'>6</view>
-	        <view class='key-cell cell_b' data-num='-1'></view>
-	    </view>
-	    <view class='key-row'>
-	        <view class='key-cell cell_b' data-num='1'>1</view>
-	        <view class='key-cell cell_b' data-num='2'>2</view>
-	        <view class='key-cell cell_b' data-num='3'>3</view>
-	        <view class='key-cell cell_b' data-num='-1'></view>
-	    </view>
-		<view class="key-zero-and-point">
-		<view class="a cell_b zero"  data-num='0'>0</view>
-		<view class="a cell_b point"  data-num='.'>.</view>
-		 </view>
-		 
-		<view  @touchstart="touchstart" @touchend="touchend" data-num='D' class="key-confirm2">
-			<text data-num='D'>删除</text>
-		</view>
-		
-	    <view class='key-confirm' :style="{'background':btnColor}" data-num='S'>
-			<view data-num='S' class="">
-				<view data-num='S' class="title">{{title}}</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	export default{
-		name:"keyBoard",
-		props:{
-			title:{
-				default:'完成',
-				type:String
-			},
-			btnColor:{
-				default:'green',
-			}
-		},
-		data(){
-			return {
-				money:'',
-				Cdel:'',
-				Time:''
-			}
-		},
-		watch:{
-			money(val){
-				this.$emit('update:money',val);			
-			}
-		},
-		methods : {
-			touchstart(){
-				 this.Time=setInterval(()=>{
-					if(this.money==''){
-						clearInterval();
-					}
-					this.money = this.money.substring(0,this.money.length - 1);
-				},200)
-			},
-			touchend(){
-				clearInterval(this.Time);
-			},
-			//处理按键
-			_handleKeyPress(e) {
-				let num = e.target.dataset.num;
-				//不同按键处理逻辑
-				// -1 代表无效按键,直接返回
-				if (num == -1) return false;
-				switch (String(num)) {
-					//小数点
-					case '.':
-						this._handleDecimalPoint();
-						break;
-					//删除键
-					case 'D':
-						this.$parent.payAmount = ''
-						this._handleDeleteKey();
-						break;
-					//清空键
-					case 'C':
-						this._handleClearKey();
-						break;
-					//确认键
-					case 'S':
-						this._handleConfirmKey();
-						break;
-					default:
-						this._handleNumberKey(num);
-						break;
-				}
-			},
-			//处理小数点函数
-			_handleDecimalPoint() {
-				//如果包含小数点,直接返回
-				if (this.money.indexOf('.') > -1) return false;
-				//如果小数点是第一位,补0
-				if (!this.money.length)
-					this.money = '0.';
-				//如果不是,添加一个小数点
-				else
-					this.money = this.money + '.';
-			},
-			//处理删除键
-			_handleDeleteKey() {
-				let S = this.money;
-				//如果没有输入,直接返回
-				if (!S.length) return false;
-				//否则删除最后一个
-				this.money = S.substring(0, S.length - 1);
-			},
-			
-			//处理清空键
-			_handleClearKey() {
-			
-				this.money = '';
-			},
-			
-			//处理数字
-			_handleNumberKey(num) {
-				if(this.money.length==10){
-					return
-				}
-				let S = this.money;
-				//如果有小数点且小数点位数不小于2
-				if ( S.indexOf('.') > -1 && S.substring(S.indexOf('.') + 1).length < 2)
-					this.money = S + num;
-				//没有小数点
-				if (!(S.indexOf('.') > -1)) {
-					//如果第一位是0,只能输入小数点
-					if (num == 0 && S.length == 0)
-						this.money = '0.';
-					else {
-						if (S.length && Number(S.charAt(0)) === 0) return;
-						this.money = S + num;
-					}
-				}
-			},
-			
-			//提交
-			_handleConfirmKey() {	
-				let S = this.money;
-				//未输入
-				if (!S.length||S==0){
-					S = this.$parent.payAmount
-					//  uni.showToast({
-					// 	title: '请输入支付金额',
-					// 	icon:'none',
-					// 	duration: 1000
-					//  });
-					// return false;
-				}else{
-					//将 8. 这种转换成 8.00
-					if (S.indexOf('.') > -1 && S.indexOf('.') == (S.length - 1))
-						S = Number(S.substring(0, S.length - 1)).toFixed(2);
-					//保留两位
-					S = Number(S).toFixed(2);
-				}
-				this.$emit('confirmEvent',S);    //提交参数
-			}
-		}
-	}
-</script>
-
-<style lang="less" scoped>
-	.cell_b{
-		border-right: 1px solid #d5d5d6;
-		border-bottom: 1px solid #d5d5d6;
-	}
-    .key-container {
-        width: 100%;
-        display: flex; 
-        flex-direction: column;
-    }
-    .keyboard {
-		flex: 1;
-        position: fixed;
-        bottom: 0;
-        left: 0;
-        height: 600rpx;
-        width: 100%;
-		background: #FFFFFF;
-		border-top: 1px solid #d5d5d6;
-    }
-    .keyboard .key-row {
-        display: flex;
-        display: -webkit-flex;
-        position: relative;
-        height: 150rpx;
-        line-height: 150rpx;
-    }
- 
-    .keyboard .key-cell {
-        flex: 1;
-        -webkit-box-flex: 1;
-		font-size: 60upx;
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		&.ac{
-			border-bottom:none;
-		}
-    }
-  
-    .keyboard .key-confirm {
-        position: absolute;
-        text-align: center;
-        height: 300rpx;
-        width: 25%;
-        line-height: 300rpx;
-		color: #FFFFFF;
-        z-index: 5;
-        right: 0;
-        bottom: 0;
-		display:flex;
-		justify-content: center;
-		align-items: center;
-    }
-	
-	.keyboard .key-confirm2 {
-	    position: absolute;
-	    height: 300rpx;
-	    width: 25%;
-	    line-height: 300rpx;
-	    z-index: 9999;
-	    right: 0;
-		top: 0;
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		background: #EBEBEB;
-	}
-	.key-zero-and-point{
-		 display: flex;height: 150rpx;justify-content: center;align-items: center;width:75%;font-size: 60upx;
-		 .zero{
-			  display: flex;justify-content: center;align-items: center;width: 67.66%;font-size: 60upx;text-align: center;height: 100%;
-		 }
-		 .point{
-			  display: flex;justify-content: center;align-items: center;width: 33.33%;font-size: 60upx;text-align: center;height: 100%;
-		 }
-	}
-	.key-cell:active{
-		color: white;  
-		background: black;  //黑色
-		opacity: 0.1;    //这里重要,就是通过这个透明度来设置
-	}
-	.a:active,.key-confirm2:active{
-		color: white;
-		background: black;  //黑色
-		opacity: 0.1;    //这里重要,就是通过这个透明度来设置
-	}
-</style>

+ 0 - 202
components/share.vue

@@ -1,202 +0,0 @@
-<template>
-	<view v-if="show" class="mask" @click="toggleMask" @touchmove.stop.prevent="stopPrevent"
-		:style="{backgroundColor: backgroundColor}"
-	>
-		<view 
-			class="mask-content"
-			@click.stop.prevent="stopPrevent"
-			:style="[{
-				height: config.height, 
-				transform: transform
-			}]"
-		>
-			<scroll-view class="view-content" scroll-y>
-				<view class="share-header">
-					分享到
-				</view>
-				<view class="share-list">
-					<view 
-						v-for="(item, index) in shareList" :key="index"
-						class="share-item" 
-						@click="shareToFriend(item.text)"
-					>
-						<image :src="item.icon" mode=""></image>
-						<text>{{item.text}}</text>
-					</view>
-				</view>
-			</scroll-view>
-			<view class="bottom b-t" @click="toggleMask">取消</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				transform: 'translateY(50vh)',
-				timer: 0,
-				backgroundColor: 'rgba(0,0,0,0)',
-				show: false,
-				config: {},
-			};
-		},
-		props:{
-			contentHeight:{
-				type: Number,
-				default: 0
-			},
-			//是否是tabbar页面
-			hasTabbar:{
-				type: Boolean,
-				default: false
-			},
-			shareList:{
-				type: Array,
-				default: function(){
-					return [];
-				}
-			}
-		},
-		created() {
-			const height = uni.upx2px(this.contentHeight) + 'px';
-			this.config = {
-				height: height,
-				transform: `translateY(${height})`,
-				backgroundColor: 'rgba(0,0,0,.4)',
-			}
-			this.transform = this.config.transform;
-		},
-		methods:{
-			toggleMask(){
-				//防止高频点击
-				if(this.timer == 1){
-					return;
-				}
-				this.timer = 1;
-				setTimeout(()=>{
-					this.timer = 0;
-				}, 500)
-				
-				if(this.show){
-					this.transform = this.config.transform;
-					this.backgroundColor = 'rgba(0,0,0,0)';
-					setTimeout(()=>{
-						this.show = false;
-						this.hasTabbar && uni.showTabBar();
-					}, 200)
-					return;
-				}
-				
-				this.show = true;
-				//等待mask重绘完成执行
-				if(this.hasTabbar){
-					uni.hideTabBar({
-						success: () => {
-							setTimeout(()=>{
-								this.backgroundColor = this.config.backgroundColor;
-								this.transform = 'translateY(0px)';
-							}, 10)
-						}
-					});
-				}else{
-					setTimeout(()=>{
-						this.backgroundColor = this.config.backgroundColor;
-						this.transform = 'translateY(0px)';
-					}, 10)
-				}
-			},
-			//防止冒泡和滚动穿透
-			stopPrevent(){},
-			//分享操作
-			shareToFriend(type){
-				this.$api.msg(`分享给${type}`);
-				this.toggleMask();
-			},
-		}
-	}
-</script>
-
-<style lang='scss'>
-	.mask{
-		position:fixed;
-		left: 0;
-		top: 0;
-		right: 0;
-		bottom: 0;
-		display:flex;
-		justify-content: center;
-		align-items: flex-end;
-		z-index: 998;
-		transition: .3s;
-		.bottom{
-			position:absolute;
-			left: 0;
-			bottom: 0;
-			display:flex;
-			justify-content: center;
-			align-items: center;
-			width: 100%;
-			height: 90upx;
-			background: #fff;
-			z-index: 9;
-			font-size: $font-base + 2upx;
-			color: $font-color-dark;
-		}
-	}
-	
-	.mask-content{
-		width: 100%;
-		height: 580upx;
-		transition: .3s;
-		background: #fff;
-		&.has-bottom{
-			padding-bottom: 90upx;
-		}
-		.view-content{
-			height: 100%;
-		}
-	}
-	.share-header{
-		height: 110upx;
-		font-size: $font-base+2upx;
-		color: font-color-dark;
-		display:flex;
-		align-items:center;
-		justify-content: center;
-		padding-top: 10upx;
-		&:before, &:after{
-			content: '';
-			width: 240upx;
-			heighg: 0;
-			border-top: 1px solid $border-color-base;
-			transform: scaleY(.5);
-			margin-right: 30upx;
-		}
-		 &:after{
-			 margin-left: 30upx;
-			 margin-right: 0;
-		 }
-	}
-	.share-list{
-		display:flex;
-		flex-wrap: wrap;
-	}
-	.share-item{
-		min-width: 33.33%;
-		display:flex;
-		flex-direction: column;
-		justify-content: center;
-		align-items: center;
-		height: 180upx;
-		image{
-			width: 80upx;
-			height: 80upx;
-			margin-bottom: 16upx;
-		}
-		text{
-			font-size: $font-base;
-			color: $font-color-base;
-		}
-	}
-</style>

+ 0 - 200
components/uni-number-box.vue

@@ -1,200 +0,0 @@
-<template>
-	<view class="uni-numbox">
-		<view class="uni-numbox-minus" 
-			@click="_calcValue('subtract')"
-		>
-			<text class="iconfont icon-jianhao" :class="minDisabled?'uni-numbox-disabled': ''" ></text>
-		</view>
-		<input 
-			class="uni-numbox-value" 
-			type="number" 
-			:disabled="disabled"
-			:value="inputValue" 
-			
-			@blur="_onBlur"
-		>
-		<view 
-			class="uni-numbox-plus" 
-			@click="_calcValue('add')"
-		>
-			<text class="iconfont icon-jiahao" :class="maxDisabled?'uni-numbox-disabled': ''" ></text>
-		</view>
-	</view>
-</template>
-<script>
-	export default {
-		name: 'uni-number-box',
-		props: {
-			isMax: {
-				type: Boolean,
-				default: false
-			},
-			isMin: {
-				type: Boolean,
-				default: false
-			},
-			index: {
-				type: Number,
-				default: 0
-			},
-			value: {
-				type: Number,
-				default: 0
-			},
-			min: {
-				type: Number,
-				default: -Infinity
-			},
-			max: {
-				type: Number,
-				default: Infinity
-			},
-			step: {
-				type: Number,
-				default: 1
-			},
-			disabled: {
-				type: Boolean,
-				default: false
-			}
-		},
-		data() {
-			return {
-				inputValue: this.value,
-				minDisabled: false,
-				maxDisabled: false
-			}
-		},
-		created(){
-			this.maxDisabled = this.isMax;
-			this.minDisabled = this.isMin;
-			console.log(this.value);
-		},
-		computed: {
-
-		},
-		watch: {
-			inputValue(number) {
-				const data = {
-					number: number,
-					index: this.index
-				}
-				this.$emit('eventChange', data);
-			}
-		},
-		methods: {
-			_calcValue(type) {
-				const scale = this._getDecimalScale();
-				let value = this.inputValue * scale;
-				let newValue = 0;
-				let step = this.step * scale;
-				
-				if(type === 'subtract'){
-					newValue = value - step;
-					if (newValue <= this.min){
-						this.minDisabled = true;
-					}
-					if(newValue < this.min){
-						newValue = this.min
-					}
-					if(newValue < this.max && this.maxDisabled === true){
-						this.maxDisabled = false;
-					}
-				}else if(type === 'add'){
-					newValue = value + step;
-					if (newValue >= this.max){
-						this.maxDisabled = true;
-					}
-					if(newValue > this.max){
-						newValue = this.max
-					}
-					if(newValue > this.min && this.minDisabled === true){
-						this.minDisabled = false;
-					}
-				}
-				if(newValue === value){
-					return;
-				}
-				this.inputValue = newValue / scale;
-			},
-			_getDecimalScale() {
-				let scale = 1;
-				// 浮点型
-				if (~~this.step !== this.step) {
-					scale = Math.pow(10, (this.step + '').split('.')[1].length);
-				}
-				return scale;
-			},
-			_onBlur(event) {
-				let value = event.detail.value;
-				if (!value) {
-					this.inputValue = 0;
-					return
-				}
-				value = +value;
-				if (value > this.max) {
-					value = this.max;
-				} else if (value < this.min) {
-					value = this.min
-				}
-
-				this.inputValue = value
-			}
-		}
-	}
-</script>
-<style>
-	.uni-numbox {
-		position:absolute;
-		left: 30upx;
-		bottom: 0;
-		display: flex;
-		justify-content: flex-start;
-		align-items: center;
-		width:230upx;
-		height: 44upx;
-		background:#FFFFFF;
-	}
-
-	.uni-numbox-minus,
-	.uni-numbox-plus {
-		margin: 0;
-		background-color: #FFFFFF;
-		width: 70upx;
-		height: 100%;
-		line-height: 44upx;
-		text-align: center;
-		position: relative;
-	}
-	.uni-numbox-minus .iconfont,
-	.uni-numbox-plus .iconfont{
-		font-size: 36upx;
-		color: #555;
-	}
-
-	.uni-numbox-minus {
-		border-right: none;
-		border-top-left-radius: 6upx;
-		border-bottom-left-radius: 6upx;
-	}
-
-	.uni-numbox-plus {
-		border-left: none;
-		border-top-right-radius: 6upx;
-		border-bottom-right-radius: 6upx;
-	}
-
-	.uni-numbox-value {
-		position: relative;
-		background-color: #f5f5f5;
-		width: 90upx;
-		height: 50upx;
-		text-align: center;
-		padding: 0;
-		font-size: 30upx;
-	}
-
-	.uni-numbox-disabled.iconfont {
-		color: #d6d6d6;
-	}
-</style>

+ 8 - 8
pages/tabBar/cart/cart.vue

@@ -209,23 +209,23 @@
 					<view class="tui-popup-coupon">
 						<view class="tui-popup-h1">
 							<view class="tui-popup-text left">商品总额</view>
-							<view class="tui-popup-text right bold">¥450.00</view>
+							<view class="tui-popup-text right bold">¥4500.00</view>
 						</view>
 						<view class="tui-popup-h1">
 							<view class="tui-popup-text left">促销满减</view>
-							<view class="tui-popup-text right bold red">¥450.00</view>
+							<view class="tui-popup-text right bold red">¥500.00</view>
 						</view>
 						<view class="tui-popup-h1">
 							<view class="tui-popup-text left">优惠券</view>
-							<view class="tui-popup-text right bold red">¥450.00</view>
+							<view class="tui-popup-text right bold red">¥100.00</view>
 						</view>
 						<view class="tui-popup-h1">
-							<view class="tui-popup-text left">共减</view>
-							<view class="tui-popup-text right bold red">¥450.00</view>
+							<view class="tui-popup-text left bold">共减</view>
+							<view class="tui-popup-text right bold red">¥600.00</view>
 						</view>
 						<view class="tui-popup-h1">
-							<view class="tui-popup-text left">总计</view>
-							<view class="tui-popup-text right bold">¥450.00</view>
+							<view class="tui-popup-text left bold">总计</view>
+							<view class="tui-popup-text right bold">¥3900.00</view>
 						</view>
 					</view>
 				</div>
@@ -1658,7 +1658,7 @@
 			width: 100%;
 			float: left;
 			&.coupon{
-				padding-bottom: 24rpx;
+				padding-bottom: 40rpx;
 			}
 			.tui-popup-scroll{
 				width: 100%;

+ 18 - 12
pages/tabBar/home/index.vue

@@ -21,7 +21,7 @@
 		<!-- 侧边 -->
 		<scroll-top :isScrollTop="isScrollTop" :bottom="50"></scroll-top>
 		<!-- 活动弹窗 -->
-		<!-- <activityAlert :show="isActivity" @click="handleClick" @cancel="handleCancelClick"></activityAlert> -->
+		<activityAlert :show="isActivity" @click="handleClick" @cancel="handleCancelClick"></activityAlert>
 		<!-- 采美豆提示弹窗 -->
 		<activityBean v-if="isActivityBean" :show="isActivityBean" :beansType="beansType" :beanNumber="beanNumber"  @cancel="handleBeanlClick"></activityBean>
 	</view>
@@ -37,7 +37,7 @@
 	import pageFloor from '@/components/cm-module/homeIndex/pageFloor.vue'
 	import pageSpecial from '@/components/cm-module/homeIndex/pageSpecial.vue'
 	import supplierList from '@/components/cm-module/homeIndex/supplierList.vue'
-	import activityAlert from '@/components/cm-module/activity/activity_01.vue'
+	import activityAlert from '@/components/cm-module/activity/activity.vue'
 	import activityBean from '@/components/cm-module/activity/activityBean.vue'
 	import { mapState,mapMutations} from 'vuex';
 	export default {
@@ -125,6 +125,11 @@
 					this.logout()
 					uni.setStorageSync('unionId',error.data.unionId)
 					this.$store.commit('updateStatus',error.data)
+					if(uni.getStorageSync('isActivitySwitch')){
+						this.$store.commit('setActivity',false)
+					}else{
+						this.$store.commit('setActivity',true)
+					}
 					this.getHomeInformation()
 				})
 			},		
@@ -146,6 +151,7 @@
 				})
 			},
 			GetHomeFloorInfo(){//初始化首页楼层数据
+				this.isRequest = false;
 				this.CommonService.GetHomeDataInfo({userId:this.userID,soure:2}).then(response =>{
 					let data = response.data;
 					this.pageList = data.homePageFloor;
@@ -180,23 +186,23 @@
 			},
 			handleClick(data){
 				const pageId = 306
-				this.$api.navigateTo(`/h5/pages/activity/activity-topic?linkId=${pageId}`)
+				this.$api.navigateTo(`/pages/login/register`)
 				this.$store.commit('setActivity',data)
 				uni.setStorageSync('lockTime',Date.now())	
-				uni.setStorageSync('isActivityStatus',true)
+				uni.setStorageSync('isActivitySwitch',true)
 				// 友盟自定义事件
-				if(process.env.NODE_ENV != 'development'){
-					this.$uma.trackEvent('meibohui_click', {
-						Um_Key_PageName: '美博会',
-						Um_Key_PageCategory: '活动专题页面',
-						Um_Key_SourcePage: '首页',
-					})
-				}
+				// if(process.env.NODE_ENV != 'development'){
+				// 	this.$uma.trackEvent('meibohui_click', {
+				// 		Um_Key_PageName: '美博会',
+				// 		Um_Key_PageCategory: '活动专题页面',
+				// 		Um_Key_SourcePage: '首页',
+				// 	})
+				// }
 			},
 			handleCancelClick(data){
 				this.$store.commit('setActivity',data)
 				uni.setStorageSync('lockTime',Date.now())
-				uni.setStorageSync('isActivityStatus',true)	
+				uni.setStorageSync('isActivitySwitch',true)	
 			},
 			handleBeanlClick(){
 				this.isActivityBean = false

+ 8 - 2
pages/user/order/create-order.vue

@@ -10,6 +10,8 @@
 					  :invoiceDatas="invoiceData"
 					  @handleChoiceaInvoice="handleChoiceaInvoiceData">
 		</invoice-tent>
+		<coupon ref="coupon" v-if="isRequest"></coupon>
+		<exchangeCoupon v-if="isExchangePopup"></exchangeCoupon>
 		<!-- 运费 -->
 		<freight ref="freight"
 				 v-if="isFreight"
@@ -71,6 +73,8 @@
 	import choiceAddress from '@/components/cm-module/creatOrder/choiceAddress'
 	import goodsList from '@/components/cm-module/creatOrder/goodsList'
 	import invoiceTent from '@/components/cm-module/creatOrder/invoiceTent'
+	import coupon from '@/components/cm-module/creatOrder/coupon'
+	import exchangeCoupon from '@/components/cm-module/creatOrder/exchangeCoupon'
 	import freight from '@/components/cm-module/creatOrder/freight'
 	import freightAlert from '@/components/cm-module/modelAlert/freightAlert'
 
@@ -79,6 +83,8 @@
 			choiceAddress,
 			goodsList,
 			invoiceTent,
+			coupon,
+			exchangeCoupon,
 			freight,
 			freightAlert
 		},
@@ -107,6 +113,7 @@
 				isRequest:false,		  // 是否加载完成渲染子组件
 				isFreight:false,		  // 是否加载完成渲染子组件
 				isAddress:false,		  // 是否加载完成地址
+				isExchangePopup:false, // 控制兑换优惠券弹窗
 				isfreightTip:false,		  // 控制邮费弹窗
 				ischecked:false,	      // 是否勾选余额
 				hanldFreePostFlag:'',	  // 邮费状态
@@ -544,7 +551,6 @@
 		position: fixed;
 		left: 0;
 		bottom: 0;
-		z-index: 995;
 		display: flex;
 		align-items: center;
 		width: 100%;
@@ -553,7 +559,7 @@
 		justify-content: space-between;
 		font-size: $font-size-28;
 		background-color: #FFFFFF;
-		z-index: 998;
+		z-index: 990;
 		color: $text-color;
 		.footer-le{
 			width:570rpx;

+ 0 - 8
pages/user/order/order-pay.vue

@@ -76,19 +76,11 @@
 				</view>
 			</view>
 		</view>
-		<!-- 数字键盘 -->
-<!-- 	<keyboard v-if="showDigitKeyboard"
-				  @confirmEvent="confirmEvent"
-				  :money.sync="payAmount"
-				  btn-color='linear-gradient(135deg,rgba(242,143,49,1) 0%,rgba(225,86,22,1) 100%)'
-				  title="完成">
-		</keyboard> -->
 	</view>
 </template>
 
 <script>
 	import authorize from '@/common/config/authorize.js'
-	// import keyboard from "@/components/keyboard/keyboard.vue"
 	import thorui from "@/components/clipboard/clipboard.thorui.js"
 	export default{
 		components: {

+ 5 - 10
store/index.js

@@ -81,29 +81,24 @@ const store = new Vuex.Store({
 				})
 			}
 		},
-		setActivity(state,variable){
+		setActivity(state,variable){// 记录活动弹窗状态
 			state.isActivity = variable;
 		},
 		setChangeVar(state,variable){
-			//获取设备信息是否为IphoneX
 			state.isIphoneX = variable;
 		},
-		setIsIphone(state,variable){
-			//获取设备信息是否为IphoneX
+		setIsIphone(state,variable){// 记录设备信息是否为IphoneX
 			state.isIphone = variable;
 		},
-		setLoginType(state,variable){
-			//获取设备信息是否为IphoneX
+		setLoginType(state,variable){// 记录登录跳转类型
 			state.isLoginType = variable;
 			console.log(state.isLoginType);
 		},
-		setLoginProductId(state,variable){
-			//获取设备信息是否为IphoneX
+		setLoginProductId(state,variable){// 记录跳转商品ID
 			state.isLoginProductId = variable;
 			console.log(state.isLoginProductId);
 		},
-		setLoginOrderId(state,variable){
-			//获取设备信息是否为IphoneX
+		setLoginOrderId(state,variable){// 记录跳转订单ID
 			state.isLoginOrderId = variable;
 			console.log(state.isLoginOrderId);
 		}