Browse Source

commit-m 修复测试问题

zhengjinyi 4 years ago
parent
commit
9bd3f9ca07

+ 1 - 1
common/css/common.scss

@@ -306,7 +306,7 @@ button::after{
 }
 .uni-badge-error {
 	color: #fff;
-	background-color: #dd524d;
+	background-color: #fc464c;
 }
 /* 加入购物模态层*/
 	@keyframes showPopup {

+ 12 - 6
components/cm-custom/cm-drag.vue

@@ -13,7 +13,7 @@
 			<text v-if="cartNum > 0" class="uni-badge uni-badge-error uni-small uni-badge--small icon-num">
 				{{cartNum >= 100 ? '99+' : cartNum}}
 			</text>
-			<image src='https://static.caimei365.com/app/wisa/img/icon/cart.png' mode="widthFix"></image>
+			<text class="iconfont icon-gouwuche-mianxing"></text>
 		</view>
 	</view>
 </template>
@@ -37,6 +37,7 @@
 		},
 		data() {
 			return {
+				StaticUrl:this.$Static,
 				top:300,
 				left:150,
 				width: 0,
@@ -49,6 +50,9 @@
 				edge: 10,
 			}
 		},
+		created() {
+			console.log(this.cartNum)
+		},
 		mounted() {
 			const sys = uni.getSystemInfoSync();
 			this.windowWidth = sys.windowWidth;
@@ -121,7 +125,7 @@
 		width: 92rpx;
 		height: 92rpx;
 		border-radius: 50%;
-		background: rgba(182,118,47, 0.2);
+		background: rgba(0,0,0, 0.2);
 		position: fixed;
 		right: 24rpx;
 		bottom: 28%;
@@ -130,11 +134,13 @@
 		justify-content: center;
 		cursor: pointer;
 		z-index: 20;
-		image {
-			width: 58rpx;
-			height: 58rpx;
+		line-height: 92rpx;
+		text-align: center;
+		.icon-gouwuche-mianxing {
+			font-size: 56rpx;
+			color: #ff457b;
 		}
-		text {
+		.uni-badge {
 			font-size: 28rpx;
 			position: absolute;
 			top: -10rpx;

+ 0 - 1
components/cm-module/productDetails/cm-activipopu.vue

@@ -85,7 +85,6 @@
 		box-sizing: border-box;
 		.ladder-main{
 			width: 100%;
-			min-height: 240rpx;
 			border: 1px solid $color-system;
 			border-radius: 10rpx;
 			.ladder-item{

+ 6 - 5
components/cm-module/productDetails/cm-price-activity.vue

@@ -8,7 +8,7 @@
 				<text class="txt big">{{ showIndexOfMoney }} </text>
 				<text class="txt sm">{{ smallMoney }} </text>
 			</view>
-			<view class="floor-item-act" v-if="product.activeStatus == 1">
+			<view class="floor-item-act" v-if="product.activeStatus == 1 && product.ladderList.length>0">
 				<text class="tag tag-01">促销</text>
 				<view class="tag tag-02" @click.stop="clickPopupShow()">活动价</view>
 			</view>
@@ -20,7 +20,7 @@
 					<view class="tui-scrollview-box">
 						<view class="ladder-main clearfix">
 							<view class="ladder-item">
-								<view class="ladder-item-td">起订量</view>
+								<view class="ladder-item-td">购买数</view>
 								<view class="ladder-item-td">价格</view>
 							</view>
 							<view
@@ -178,8 +178,10 @@ export default {
 			console.log('this.smallMoney',this.smallMoney)
 		},
 		clickPopupShow(type) {
-			this.popupShow = true
-			this.promotionType = type
+			if(this.product.ladderList.length>0){
+				this.popupShow = true
+				this.promotionType = type
+			}
 		},
 		hidePopup() {
 			this.popupShow = false
@@ -226,7 +228,6 @@ export default {
 	box-sizing: border-box;
 	.ladder-main {
 		width: 100%;
-		min-height: 240rpx;
 		border: 1px solid rgba(225, 86, 22, 0.3);
 		border-radius: 10rpx;
 		.ladder-item {

+ 5 - 4
components/cm-module/productDetails/cm-price.vue

@@ -19,7 +19,7 @@
 					<view class="tui-scrollview-box">
 						<view class="ladder-main clearfix">
 							<view class="ladder-item">
-								<view class="ladder-item-td">起订量</view>
+								<view class="ladder-item-td">购买数</view>
 								<view class="ladder-item-td">价格</view>
 							</view>
 							<view
@@ -177,8 +177,10 @@ export default {
 			console.log('this.smallMoney',this.smallMoney)
 		},
 		clickPopupShow(type) {
-			this.popupShow = true
-			this.promotionType = type
+			if(this.product.ladderList.length>0){
+				this.popupShow = true
+				this.promotionType = type
+			}
 		},
 		hidePopup() {
 			this.popupShow = false
@@ -225,7 +227,6 @@ export default {
 	box-sizing: border-box;
 	.ladder-main {
 		width: 100%;
-		min-height: 240rpx;
 		border: 1px solid rgba(225, 86, 22, 0.3);
 		border-radius: 10rpx;
 		.ladder-item {

+ 4 - 2
pages/goods/cart.vue

@@ -216,8 +216,10 @@
 				})	
 			},
 			clickPopupShow(pros,type){
-				this.popupShow = true;
-				this.handlerPros = pros;
+				if(pros.ladderList.length>0){
+					this.popupShow = true;
+					this.handlerPros = pros;
+				}
 			},
 			setScrollHeight() {
 				// 窗口高度-footer高度

+ 4 - 2
pages/tabBar/cart/index.vue

@@ -204,8 +204,10 @@
 				})	
 			},
 			clickPopupShow(pros,type){
-				this.popupShow = true;
-				this.handlerPros = pros;
+				if(pros.ladderList.length>0){
+					this.popupShow = true;
+					this.handlerPros = pros;
+				}
 			},
 			setScrollHeight() {
 				// 窗口高度-footer高度

+ 25 - 1
pages/user/activity/activity.vue

@@ -26,17 +26,31 @@
 				</view>
 			</view>
 		</view>
+		<!-- 可拖动悬浮按钮 -->
+		<cm-drag :cartNum="cartNum" 
+				 :isDock="true"
+				 :existTabBar="true" 
+				 @btnClick="btnClick" 
+				 @btnTouchstart="btnTouchstart" 
+				 @btnTouchend="btnTouchend">
+		</cm-drag>
 	</view>
 </template>
 
 <script>
 	import wxLogin from "@/services/wxLogin.js"
 	import { mapState,mapMutations} from 'vuex';
+	import cmDrag from '@/components/cm-custom/cm-drag.vue'
+	
 	export default{
+		components:{
+			cmDrag
+		},
 		data(){
 			return{
 				StaticUrl:this.$Static,
 				activityBanner:`${this.$Static}banner.png`,
+				cartNum: 0,
 				listQuery:{
 					activityId:0,
 					userId:0,
@@ -115,11 +129,20 @@
 				)
 				.then(response => {
 					this.$store.commit('updateAllNum',response.data)
-					this.skeletonShow = false;
+					this.cartNum = response.data
 				})
 				.catch(error =>{
 					console.log('查询购物车数量错误信息',error)
 				})
+			},
+			btnClick() {
+				this.$emit('goCartPage')
+			},
+			btnTouchstart() {
+				// console.log('btnTouchstart');
+			},
+			btnTouchend() {
+				// console.log('btnTouchend');
 			}
 		},
 		onPullDownRefresh() {//下拉刷新
@@ -136,6 +159,7 @@
 			wxLogin.wxLoginQuick()
 			this.$api.getStorage().then((resolve) => {
 				this.UserId = resolve.userId ? resolve.userId : '';	
+				this.GetCartNumber()
 			})
 		},
 		onShareAppMessage(res){//分享转发

+ 6 - 6
pages/user/order/order-payment.vue

@@ -326,8 +326,8 @@
 			margin: 0 auto;
 			.pay-content{
 				width: 100%;
-				height: 220rpx;
-				background: url(https://static.caimei365.com/app/wisa/img/icon/pay_bg.png) no-repeat;
+				height: 280rpx;
+				background: url(https://static.caimei365.com/app/mini-hehe/icon/icon-user-bg@2x.png) no-repeat;
 				background-size: cover;
 				float: left;
 				box-sizing: border-box;
@@ -335,11 +335,11 @@
 				border-bottom: 10px solid #F7F7F7;
 				.pay-p{
 					font-size: $font-size-26;
-					color: #fff3e2;
-					line-height: 36rpx;
+					color: #FFFFFF;
+					line-height: 66rpx;
 				}
 				.pay-money{
-					color: #ff9723;
+					color: #FFFFFF;
 					line-height: 100rpx;
 					font-weight: bold;
 					.pay-sm{
@@ -591,7 +591,7 @@
 							display: block;
 							width: 6rpx;
 							height: 22rpx;
-							background-color: #c4761f;
+							background-color: #FF457B;
 							border-radius: 3rpx;
 							position: absolute;
 							left: 0;