Browse Source

前端gjy

gjy 3 years ago
parent
commit
2985103647
3 changed files with 90 additions and 3 deletions
  1. 2 3
      main.js
  2. 82 0
      pageA/product/trade.vue
  3. 6 0
      pages/public/login_account_number.vue

+ 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同步方式进行处理逻辑

+ 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>

+ 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'
 						});