Bläddra i källkod

Merge branch 'master' of http://git.zthymaoyi.com/gdc/yiliangyiyun-app

zhongtianhaoyuan 3 år sedan
förälder
incheckning
40ee8e98a9

+ 2 - 3
main.js

@@ -174,8 +174,7 @@ const request = (_gp, _mt, data = {}, failCallback) => {
 }
 // 现app调用方式
 
-const doRequest = (method, url, data)=> {
-	console.log(method,url,data)
+const doRequest = (method, url, data,header)=> {
 	// let baseUrl = config.def().baseUrl
 	let baseUrl = config.def().baseUrlNew
         // 如果data为空
@@ -191,7 +190,7 @@ const doRequest = (method, url, data)=> {
                 data: arr[0],
                 // data:data
                 header: {
-                    'content-type': 'application/json'
+                    'content-type': 'application/json'//'application/x-www-form-urlencoded; charset=UTF-8',
                 },
                 success: function(result) {
                     // resolve调用后,即可传递到调用方使用then或者async+await同步方式进行处理逻辑

+ 161 - 33
pageA/product/detail.vue

@@ -193,12 +193,21 @@
 				</view>
 				</view>
 			</view>
+		<view v-if='status' class='shade'>
+			<view class='shade-content'>
+				<view class='shade-content-item'>
+					您的粮商身份正在审核中,请耐心等待认证状态可在<text>我的-身份认证</text>中查看
+				</view>
+				<image @click='status==false' style='width:30px;height:30px;margin-top:10px;' src='../../static/img/jiaoyi/guanbi-2@3x.png'></image>
+			</view>
+		</view>
 		<!-- 底部操作菜单 -->
 		<view class="page-bottom1">
 			<view>
-				<button type="primary" @click="contactUs">联系我们</button>
-				<button v-if="goods.pcFlag == 1" type="primary" class=" action-btn no-border add-cart-btn" >立即卖粮</button>
-				<button v-else type="primary" class=" action-btn no-border add-cart-btn" @click="tradeNow">立即发车</button>
+				<button type="primary" @click="contactUs">在线客服</button>
+				<button  @click="salegrain" v-if="goods.pcFlag == 1" type="primary" class=" action-btn no-border add-cart-btn" >立即卖粮</button>
+				<button v-else type="primary" class=" action-btn no-border add-cart-btn" 
+				@click="tradeNow">立即发车</button>
 			</view>
 		</view>
 	</view>
@@ -242,6 +251,7 @@
 					minSale: 0,
 					status:0
 				},
+				status:false,
 				share:{
 				   title: '',
 				   imageUrl:'https://taohaoliang.oss-cn-beijing.aliyuncs.com/shareLogo.png',
@@ -307,9 +317,8 @@
 				}
 				else{
 					uni.makePhoneCall({
-					 	
 					 	// 手机号
-					    phoneNumber: that.goods.sellerPhone, 
+					    phoneNumber: that.goods.buyerPhone, 
 					
 						// 成功回调
 						success: (res) => {
@@ -366,6 +375,80 @@
 					setTimeout(()=>{uni.navigateBack()},1000);
 				})
 			},
+			salegrain(){
+				console.log(this.userInfo)
+				if (!this.hasLogin) {
+					uni.showModal({
+						title: '登录提示',
+						content: '您尚未登录,是否立即登录?',
+						showCancel: true,
+						confirmText: '登录',
+						success: (e) => {
+							if (e.confirm) {
+								uni.navigateTo({
+									url: `/pageA/product/trade?id=${that.goods.id}&packing=${that.goods.packing}}&province=${that.goods.province}
+									&city=${that.goods.city}&area=${that.goods.area}&storeName=${that.goods.storeName}&seller=${that.goods.seller}
+									&companyId=${that.goods.companyId}&sellerPhone=${that.goods.sellerPhone}&minSale=${that.goods.minSale}
+									&exsitCount=${that.goods.total}&isFutures=${that.goods.isFutures}
+									&basis=${that.goods.basis}&basisSmall=${that.goods.basisSmall}&basisBig=${that.goods.basisBig}
+								&unloadingFee=${that.goods.unloadingFee}`
+								})
+							}
+						},
+						fail: () => {},
+						complete: () => {}
+					})
+				}
+				else{
+					this.$api.doRequest('get', '/identityAuthenticationInfo/getInfo',{commonId:this.userInfo.id}).then(res => {
+						if(res.data.code==200){
+							uni.navigateTo({
+								url: '/pages/public/login'
+							})
+						}else if(res.data.code==11016){
+							uni.showModal({
+								    title: '温馨提示',
+								    content: '您还未认证粮商身份, 下单前请先完善您的身份信息',
+								    confirmText: "去认证",
+									confirmColor: '#22C572',
+									success: function (res) {
+								        if (res.confirm) {
+											uni.navigateTo({//跳转页面
+												url:"../index/index"
+											})
+								        } else if (res.cancel) {
+								        }
+								    }
+								});
+						}else if(res.data.code==11017){
+							this.status=true
+						}
+					})
+					// uni.showModal({
+					// 	    title: '温馨提示',
+					// 	    content: '请在发车前认真核实买方身份,并在签订正规的交易合同后发起发车操作,是否继续发车?',
+					// 	    confirmText: "发车",
+					// 		confirmColor: '#22C572',
+					// 		success: function (res) {
+					// 	        if (res.confirm) {
+					// 				uni.navigateTo({//跳转页面
+					// 					url:"../index/index"
+					// 				})
+					// 	        } else if (res.cancel) {
+					// 	        }
+					// 	    }
+					// 	});
+					// const that = this
+					// uni.navigateTo({
+					// 	url: `/pageA/product/trade?id=${that.goods.id}&packing=${that.goods.packing}}&province=${that.goods.province}
+					// 	&city=${that.goods.city}&area=${that.goods.area}&storeName=${that.goods.storeName}&seller=${that.goods.seller}
+					// 	&companyId=${that.goods.companyId}&sellerPhone=${that.goods.sellerPhone}&minSale=${that.goods.minSale}
+					// 	&exsitCount=${that.goods.total}&isFutures=${that.goods.isFutures}
+					// 	&basis=${that.goods.basis}&basisSmall=${that.goods.basisSmall}&basisBig=${that.goods.basisBig}
+					// 	&unloadingFee=${that.goods.unloadingFee}`
+					// })
+				}
+			},
 			endSale(){
 				const that = this
 				uni.showLoading({
@@ -385,35 +468,56 @@
 					
 				})
 			},
+			navBack() {
+				uni.navigateBack();
+			},
 			tradeNow(){
-				if (!this.hasLogin) {
-					uni.showModal({
-						title: '登录提示',
-						content: '您尚未登录,是否立即登录?',
-						showCancel: true,
-						confirmText: '登录',
-						success: (e) => {
-							if (e.confirm) {
-								uni.navigateTo({
-									url: '/pages/public/login'
-								})
-							}
-						},
-						fail: () => {},
-						complete: () => {}
-					})
-				}
-				else{
-					const that = this
-					uni.navigateTo({
-						url: `/pageA/product/trade?id=${that.goods.id}&packing=${that.goods.packing}}&province=${that.goods.province}
-						&city=${that.goods.city}&area=${that.goods.area}&storeName=${that.goods.storeName}&seller=${that.goods.seller}
-						&companyId=${that.goods.companyId}&sellerPhone=${that.goods.sellerPhone}&minSale=${that.goods.minSale}
-						&exsitCount=${that.goods.total}&isFutures=${that.goods.isFutures}
-						&basis=${that.goods.basis}&basisSmall=${that.goods.basisSmall}&basisBig=${that.goods.basisBig}
-						&unloadingFee=${that.goods.unloadingFee}`
-					})
-				}
+				// this.$api.doRequest('get', '/identityAuthenticationInfo/getInfo',{commonId:options.id}).then(res => {
+				// 	uni.hideLoading()
+				// 	this.goods=res.data.data
+				// })
+				// if (!this.hasLogin) {
+				// 	uni.showModal({
+				// 		title: '登录提示',
+				// 		content: '您尚未登录,是否立即登录?',
+				// 		showCancel: true,
+				// 		confirmText: '登录',
+				// 		success: (e) => {
+				// 			if (e.confirm) {
+				// 				uni.navigateTo({
+				// 					url: '/pages/public/login'
+				// 				})
+				// 			}
+				// 		},
+				// 		fail: () => {},
+				// 		complete: () => {}
+				// 	})
+				// }
+				// else{
+				// 	uni.showModal({
+				// 		    title: '温馨提示',
+				// 		    content: '请在发车前认真核实买方身份,并在签订正规的交易合同后发起发车操作,是否继续发车?',
+				// 		    confirmText: "发车",
+				// 			confirmColor: '#22C572',
+				// 			success: function (res) {
+				// 		        if (res.confirm) {
+				// 					uni.navigateTo({//跳转页面
+				// 						url:"../index/index"
+				// 					})
+				// 		        } else if (res.cancel) {
+				// 		        }
+				// 		    }
+				// 		});
+				// 	const that = this
+				// 	uni.navigateTo({
+				// 		url: `/pageA/product/trade?id=${that.goods.id}&packing=${that.goods.packing}}&province=${that.goods.province}
+				// 		&city=${that.goods.city}&area=${that.goods.area}&storeName=${that.goods.storeName}&seller=${that.goods.seller}
+				// 		&companyId=${that.goods.companyId}&sellerPhone=${that.goods.sellerPhone}&minSale=${that.goods.minSale}
+				// 		&exsitCount=${that.goods.total}&isFutures=${that.goods.isFutures}
+				// 		&basis=${that.goods.basis}&basisSmall=${that.goods.basisSmall}&basisBig=${that.goods.basisBig}
+				// 		&unloadingFee=${that.goods.unloadingFee}`
+				// 	})
+				// }
 				
 			}
 		},
@@ -1042,4 +1146,28 @@
 		font-size: 40upx;
 		color: #fff;
 	}
+	.shade{
+		position:fixed;
+		top:0;
+		left:0;
+		width:100%;background:rgba(0,0,0,0.5);
+		height:100%;
+		z-index:999999;
+	}
+	.shade-content{
+		position:absolute;
+		top:50%;
+		left:50%;
+		transform: translateX(-50%) translateY(-50%);
+		z-index:999999;
+		text-align:center;
+	}
+	.shade-content-item{
+		background:#fff;
+		width: 277px;
+		text-align:center;
+		height:121px;
+		padding:35px 10px;
+		border-radius:15px;
+	}
 </style>

+ 82 - 0
pageA/product/trade.vue

@@ -1,6 +1,15 @@
 <template>
 	
 	<view class="container">
+		<view class="detail-desc">
+			<view class="c-list">
+				<view class="c-row">
+					<text class="tit">水分(%){{'<='}} </text>
+					<view class="con-list">
+						<text>{{goods.waterContent}}</text>
+					</view>
+				</view>
+				</view>
 		<view v-if="companyId!=2" class="cu-form-group">
 			<view class="title">卖方</view>
 			<view class="title">{{seller}}</view>
@@ -9,6 +18,7 @@
 			<view class="title">卖方电话</view>
 			<view class="title">{{sellerPhone}}</view>
 		</view>
+		</view>
 		<view class="cu-form-group">
 			<text class="tit">我的信息</text>
 			<view v-if='bankNameList.length>0'>
@@ -466,4 +476,76 @@
 	    text-align: right;
 	    padding-right: 20rpx;
 	}
+	/*  详情 */
+	.detail-desc {
+		background: #fff;
+		margin-top: 16upx;
+		margin:10px;
+		position:relative;
+		z-index:4;
+		border-radius:5px;
+		.d-header {
+			display: flex;
+			padding:10px;
+			font-size: $font-base + 2upx;
+			color: $font-color-dark;
+			position: relative;
+			border-bottom:1px solid #EEEEEE;
+			text {
+				padding: 0 20upx;
+				position: relative;
+				z-index: 1;
+			}
+		}
+	}
+	.c-list {
+		font-size: $font-sm + 2upx;
+		color: $font-color-base;
+		background: #fff;
+	
+		.c-row {
+			display: flex;
+			align-items: center;
+			padding: 20upx 30upx;
+			position: relative;
+		}
+	
+		.tit {
+			width: 220upx;
+		}
+	
+		.con {
+			flex: 1;
+			color: $font-color-dark;
+	
+			.selected-text {
+				margin-right: 10upx;
+			}
+		}
+	
+		.bz-list {
+			height: 40upx;
+			font-size: $font-sm+2upx;
+			color: $font-color-dark;
+	
+			text {
+				display: inline-block;
+				margin-right: 30upx;
+			}
+		}
+	
+		.con-list {
+			flex: 1;
+			display: flex;
+			flex-direction: column;
+			color: $font-color-dark;
+			line-height: 40upx;
+			text-align: right;
+			padding-right: 20upx;
+		}
+	
+		.red {
+			color: $uni-color-primary;
+		}
+	}
 </style>

+ 7 - 9
pages/business/business.vue

@@ -664,18 +664,16 @@ currentPage:this.currentPage,searchKeyWord:this.searchKeyWord,receivePrivate:thi
 	font-size:19px;
 	font-weight:700;
 }
-	/* 销售信息 */
-	.introduce-section {
-		background: #fff;
-		padding: 0upx 30upx 20upx;
-		margin:10px;
-		border-radius:4px;
-
-		.guess-item {
+.introduce-section .guess-item{
+			border-radius:4px;
+			background: #fff;
+			padding: 0upx 30upx 20upx;
+			margin:10px;
 			padding-bottom: 20upx;
 			border-bottom: 1px solid #ccc;
 		}
-
+	/* 销售信息 */
+	.introduce-section{
 		.title-tip {
 			flex: 1;
 		}

+ 6 - 0
pages/public/login_account_number.vue

@@ -99,8 +99,14 @@
 				this.$api.doRequest('get','/commonUser/login',{phone:this.phone,password:this.password}).then(res => {
 					if(res.data.code==200){
 						uni.setStorageSync('userInfo', res.data.data)
+						this.$api.doRequest('post','/auth/api/loginEnhanced',{companyName: "易粮易运",
+password: "y123456",
+username: "13333333333"}).then(res => {
+							
+						})
 						that.$store.commit('login', res.data.data)
 						that.liangxinLogin()
+						
 						uni.switchTab({
 							url: '/pages/sale/information'
 						});

BIN
static/img/jiaoyi/guanbi-2.png


BIN
static/img/jiaoyi/guanbi-2@2x.png


BIN
static/img/jiaoyi/guanbi-2@3x.png