浏览代码

commit -m 采美豆

zhengjinyi 4 年之前
父节点
当前提交
032cc110aa
共有 5 个文件被更改,包括 155 次插入72 次删除
  1. 128 50
      components/cm-module/creatOrder/freight.vue
  2. 21 2
      pages/tabBar/user/user.vue
  3. 2 16
      pages/user/order/create-order.vue
  4. 2 2
      services/ajax.env.js
  5. 2 2
      services/config.env.js

+ 128 - 50
components/cm-module/creatOrder/freight.vue

@@ -2,12 +2,27 @@
 	<view class="freight-template" @click.stop="discard">
 		 <!-- 运费信息 -->
 		<view class="invoice-freight">
-			<view class="freight-left">运费<text class="tips" v-if="freightData.freePostFlag == 1">运费可选择到付哟~</text></view>
-			<view class="freight-right" >
-				<view class="freight-text">{{freightText}}</view>
-				<view class="select" v-if="freightData.freePostFlag == 1"  @click.stop="selectFreight">
-					<text class="select-text">{{orderPriceToFixed(freightMoney)}}</text>
-					<text class="iconfont icon-xiayibu"></text>
+			<view class="freight-main">
+				<view class="freight-left">运费<text class="tips" v-if="freightData.freePostFlag == 1">运费可选择到付哟~</text></view>
+				<view class="freight-right" >
+					<view class="freight-text">{{freightText}}</view>
+					<view class="select" v-if="freightData.freePostFlag == 1"  @click.stop="selectFreight">
+						<text class="select-text">{{orderPriceToFixed(freightMoney)}}</text>
+						<text class="iconfont icon-xiayibu"></text>
+					</view>
+				</view>
+			</view>
+			<view class="freight-bean" v-if="freePostFlag == 1">
+				<view class="bean-le">可用{{ freightMoney*100 }}采美豆抵用{{ freightMoney }}元运费</view>
+				<view class="bean-ri">
+					<view class="checkbox-box">
+						<button class="checkbox iconfont"
+								hover-class="btn-hover"
+								@click.stop="checkedBalabce"
+								:class="[ischecked ?'icon-yixuanze':'icon-weixuanze']"
+						>
+						</button>
+					</view>
 				</view>
 			</view>
 		</view>
@@ -30,6 +45,7 @@
 				isShowOption:false,
 				optionList:['到付'],
 				freePostFlag:'',
+				ischecked:false
 				
 			}
 		},
@@ -46,14 +62,17 @@
 					case 0:
 						this.freightText = '包邮'
 						this.freightData.freight  = 0
+						this.freePostFlag = res.freePostFlag
 						break
 					case 1:
 						this.freightText = ''
 						this.freightMoney = res.freight
+						this.freePostFlag = res.freePostFlag
 						this.optionList.unshift(this.orderPriceToFixed(this.freightMoney))
 						break
 					case -1:
 						this.freightText = '到付'
+						this.freePostFlag = res.freePostFlag
 						this.freightData.freight  = 0
 						break
 				}
@@ -80,6 +99,25 @@
 				    }
 				});
 			},
+			checkedBalabce(){//勾选使用余额
+				this.ischecked = !this.ischecked
+				if(this.userMoney > 0){
+					this.ischecked = !this.ischecked
+					if(this.ischecked){
+						this.balanceDeductionFlag =1
+						this.attributePallPrice()
+					}else{
+						if(this.hanldFreePostFlag == 1 || this.hanldFreePostFlag == '1'){
+							this.payAllPrice = this.allPrice+parseInt(this.freightData.freight)
+						}else{
+							this.payAllPrice = this.allPrice
+						}
+						this.balanceDeductionFlag = 2
+					}
+				}else{
+					return
+				}
+			},
 			orderPriceToFixed (value){
 				let price ='';
 				if(value == '到付'){
@@ -108,61 +146,101 @@
 		float: left;
 		margin-top: 24rpx;
 		.invoice-freight{
-			width: 702rpx;
-			padding: 0 24rpx;
-			height: 86rpx;
-			line-height: 86rpx;
-			font-size: $font-size-28;
-			color: $text-color;
-			background: #FFFFFF;
-			float: left;
-			font-weight: bold;
-			.freight-left{
+			width: 100%;
+			box-sizing: border-box;
+			padding: 10rpx 24rpx;
+			.freight-main{
+				width: 100%;
+				height: 78rpx;
+				line-height: 78rpx;
+				font-size: $font-size-28;
+				color: $text-color;
+				background: #FFFFFF;
 				float: left;
-				.tips{
-					font-size: $font-size-24;
-					color: $color-system;
-					font-weight: normal;
-					margin-left: 20rpx;
-				}
-				.icon-yunfeishuoming{
-					height: 100%;
-					padding:15rpx;
-					color: $color-system;
-					font-weight: normal;
-				}
-			}
-			.freight-right{
-				float: right;
-				color: #2A81FF;
-				position: relative;
-				.freight-text{
+				font-weight: bold;
+				.freight-left{
 					float: left;
+					.tips{
+						font-size: $font-size-24;
+						color: $color-system;
+						font-weight: normal;
+						margin-left: 20rpx;
+					}
+					.icon-yunfeishuoming{
+						height: 100%;
+						padding:15rpx;
+						color: $color-system;
+						font-weight: normal;
+					}
 				}
-				.select{
+				.freight-right{
 					float: right;
-					height: 60rpx;
-					padding: 0 20rpx;
-					margin-top: 14rpx;
-					line-height: 60rpx;
 					color: #2A81FF;
-					font-weight: normal;
 					position: relative;
-					.select-text{
-						display: inline-block;
+					.freight-text{
 						float: left;
-						margin-right: 30rpx;
 					}
-					.iconfont{
-						width: 60rpx;
+					.select{
+						float: right;
 						height: 60rpx;
+						padding: 0 20rpx;
+						margin-top: 14rpx;
 						line-height: 60rpx;
-						text-align: right;
-						position: absolute;
-						right: 0;
-						top: 0;
-						font-size: $font-size-28;
 						color: #2A81FF;
+						font-weight: normal;
+						position: relative;
+						.select-text{
+							display: inline-block;
+							float: left;
+							margin-right: 30rpx;
+						}
+						.iconfont{
+							width: 60rpx;
+							height: 60rpx;
+							line-height: 60rpx;
+							text-align: right;
+							position: absolute;
+							right: 0;
+							top: 0;
+							font-size: $font-size-28;
+							color: #2A81FF;
+						}
+					}
+				}
+			}
+			.freight-bean{
+				width: 100%;
+				height: 58rpx;
+				line-height: 58rpx;
+				float: left;
+				.bean-le{
+					float: left;
+					color: #666666;
+					font-size: $font-size-26;
+					font-weight: normal;
+				}
+				.bean-ri{
+					float: right;
+					display: flex;
+					align-items: center;
+					.checkbox-box{
+						display: flex;
+						width: 60rpx;
+						float: left;
+						height: 100%;
+						font-size: $font-size-26;
+						margin-top: 8rpx;
+						.checkbox{
+							width: 40rpx;
+							text-align: right;
+							box-sizing: border-box;
+							text-align: center;
+							text-decoration: none;
+							border-radius: 0;
+							-webkit-tap-highlight-color: transparent;
+							overflow: hidden;
+							color: $color-system;
+						}
 					}
 				}
 			}

+ 21 - 2
pages/tabBar/user/user.vue

@@ -128,7 +128,10 @@
 				<view class="list-cell-item" v-show="hasLogin">
 					<view class="list-cell" v-show="userIdentity == 4" @click="navigator(`/pages/login/apply?clubStatus=${clubStatus}`)" hover-class="cell-hover" :hover-stay-time="50">
 						<text class="cell-icon"><text class="iconfont icon-shengjihuiyuanjigou"></text></text>
-						<text class="cell-tit">升级会员机构</text>
+						<text class="cell-tit">
+							升级会员机构
+							<text class="cell-tips">采美豆</text>
+						</text>
 						<text class="cell-more">
 							<text class="txt">{{clubStatusText(clubStatus)}}</text>
 							<text class="iconfont icon-xiayibu"></text>
@@ -143,7 +146,10 @@
 				<view class="list-cell-item">
 					<view class="list-cell"  v-for="(item, index) in firstList" :key="index" @click="navigator(item.path)" hover-class="cell-hover" :hover-stay-time="50">
 						<text class="cell-icon"><text class="iconfont" :class="item.icon"></text></text>
-						<text class="cell-tit">{{item.name}}</text>
+						<text class="cell-tit">
+							{{item.name}}
+							<text class="cell-tips" v-if="index == 2 && isPerfect">采美豆</text>
+						</text>
 						<text class="cell-more iconfont icon-xiayibu"></text>
 					</view>
 				</view>
@@ -200,6 +206,7 @@
 				CustomBar:this.CustomBar,// 顶部导航栏高度
 				StatusBar: this.StatusBar,
 				beanType:1,
+				isPerfect:true,
 				isActivityBean:true,
 				isCmcustom:false,
 				isUpgradeAlert:false,
@@ -780,6 +787,18 @@
 			font-size: $font-size-28;
 			color: #666666;
 			margin-right:10rpx;
+			.cell-tips{
+				width: 74rpx;
+				height: 32rpx;
+				line-height: 32rpx;
+				padding: 0 7rpx;
+				border-radius: 16rpx;
+				background-color: #ffe6dc;
+				color: $color-system;
+				text-align: center;
+				font-size: $font-size-20;
+				margin-left: 8rpx;
+			}
 		}
 		.cell-tip{
 			font-size: $font-size-28;

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

@@ -31,7 +31,7 @@
 								hover-class="btn-hover"
 								v-if="userMoney!=0"
 								@click.stop="checkedBalabce"
-								:class="[ischecked ?'icon-gouxuanl':'icon-weigouxuan']"
+								:class="[ischecked ?'icon-yixuanze':'icon-weixuanze']"
 						>
 						</button>
 					</view>
@@ -383,26 +383,12 @@
 	.invoice-freight{
 		width: 702rpx;
 		padding: 0 24rpx;
-		height: 86rpx;
-		line-height: 86rpx;
+		height: auto;
 		font-size: $font-size-28;
 		color: $text-color;
 		background: #FFFFFF;
 		float: left;
 		font-weight: bold;
-		.freight-left{
-			float: left;
-			.icon-yunfeishuoming{
-				height: 100%;
-				padding: 0 15rpx;
-				color: $color-system;
-				font-weight: normal;
-			}
-		}
-		.freight-right{
-			float: right;
-			color: #2A81FF;
-		}
 	}
 	.invoice-balance{
 		width: 702rpx;

+ 2 - 2
services/ajax.env.js

@@ -5,8 +5,8 @@ if(process.env.NODE_ENV === 'development'){
 	// URL_CONFIG = 'http://192.168.2.67:8008'	 //裴裴联调地址
 	// URL_CONFIG = 'http://192.168.2.81:8008'
 	// URL_CONFIG = 'http://192.168.2.75:8008'	 //超超联调地址
-    URL_CONFIG = 'https://spi-b.caimei365.com'	 //采美测试地址
-	// URL_CONFIG = 'https://spi.caimei365.com'
+    // URL_CONFIG = 'https://spi-b.caimei365.com'	 //采美测试地址
+	URL_CONFIG = 'https://spi.caimei365.com'
 }else{
     // 生产环境
 	// URL_CONFIG = 'https://spi-b.caimei365.com'

+ 2 - 2
services/config.env.js

@@ -3,8 +3,8 @@ if(process.env.NODE_ENV === 'development'){
     // 开发环境
     // URL_CONFIG = 'http://192.168.2.75:18002'	 //超超联调地址
 	// URL_CONFIG = 'http://192.168.2.67:18002'	 //裴裴联调地址
-	URL_CONFIG = 'https://core-b.caimei365.com'
-	// URL_CONFIG = 'https://core.caimei365.com'
+	// URL_CONFIG = 'https://core-b.caimei365.com'
+	URL_CONFIG = 'https://core.caimei365.com'
 }else{
     // 生产环境
 	// URL_CONFIG = 'https://core-b.caimei365.com'