wkyy hace 1 año
padre
commit
c2ac99395b

+ 4 - 4
config/.env.dev.js

@@ -1,8 +1,8 @@
 const UNI_APP = {  
 	ProjectName :"51充电联盟",
-	BASE_URL: 'http://47.98.231.198:9090/qsng-server/',
+	// BASE_URL: 'http://47.98.231.198:9090/qsng-server/',
 	// BASE_URL: 'http://114.55.55.123/qsng-server/',
-	// BASE_URL: 'http://192.168.33.220:8086/education-training-server/', //颜
+	BASE_URL: 'http://192.168.33.220:8086/education-training-server/', //颜
 	// BASE_URL: 'http://192.168.77.162:8086/education-training-server/',
 	//BASE_URL: 'https://charging.xiaoxinda.com/charging-station-test/',
 	//BASE_URL: 'http://192.168.77.162:8080/charging-station/' ,
@@ -12,8 +12,8 @@ const UNI_APP = {
 
 	//openId:"oK9Wr57rAcNzihDN2PEdptprT0As", 
 	// openId:"oK9Wr54VbEh3xvWYmD_zT5NbH4AY",//zkx
-	openId:"123456",
-	// openId:"oK9Wr59rru-i3bm7dtTtxnkR-i4s",//杨所
+	// openId:"123456",
+	openId:"oK9Wr59rru-i3bm7dtTtxnkR-i4s",//杨所
 	//openId:"oK9Wr5zv8lvirni3txbxRkmpg8d0",//
 	
 	

+ 39 - 20
pages/parents/course/confirmOrder.vue

@@ -15,14 +15,14 @@
 					<view class="else">
 						<text>{{item.packageName}}班</text>
 						<text>{{item.courseAmount}}节课</text>
-						<text>x1</text>
+						<!-- <text>x1</text> -->
 					</view>
 					<view class="price">
 						<view class="price-left">
 							{{(item.unitPrice*item.courseAmount).toFixed(2)}}元
 						</view>
 						<view class="order-amount">
-							x1
+							<!-- x1 -->
 						</view>
 					</view>
 				</view>
@@ -115,30 +115,30 @@
 			</view>
 			<view class="pay-radio">
 				<view class="icon">
-				<img src="../../../assets/img/riFill-wechat-pay-fill@1x.png" alt="">
+					<img src="../../../assets/img/riFill-wechat-pay-fill@1x.png" alt="">
 				</view>
 				<view class="text">
 					微信支付
 				</view>
 				<view class="radio-box">
-					<label class="radio">
-						<radio value="" /><text></text>
+					<label class="radio" @click="radioClick('weixin')">
+						<radio value="" :checked="payName == 'weixin'" /><text></text>
 					</label>
 				</view>
 			</view>
-			<view class="pay-radio">
+			<!-- <view class="pay-radio">
 				<view class="icon">
-				<img src="../../../assets/img/yunPay.png" alt="">
+					<img src="../../../assets/img/yunPay.png" alt="">
 				</view>
 				<view class="text">
 					云闪付
 				</view>
 				<view class="radio-box">
-					<label class="radio">
-						<radio value="" /><text></text>
+					<label class="radio" @click="radioClick('yushanfu')">
+						<radio value="" :checked="payName == 'yushanfu'" /><text></text>
 					</label>
 				</view>
-			</view>
+			</view> -->
 		</view>
 		<!-- 确认订单 -->
 		<view class="confirm">
@@ -192,7 +192,8 @@
 				entryFee: 0,
 				weFee: 0,
 				submitForm: {},
-				id: ''
+				id: '',
+				payName: ''
 			}
 		},
 		onLoad(op) {
@@ -208,9 +209,21 @@
 			this.getStudentList();
 		},
 		methods: {
+			radioClick(value) {
+				this.payName = value;
+			},
 			topayResult() {
 				this.submitForm.amount = 0.01;
-				this.wxpy();
+				if(this.payName == 'weixin') {
+					this.wxpy();
+				} else if (this.payName == 'yushanfu') {
+
+				} else {
+					uni.showToast({
+						title: '请选择支付方式',
+						icon: "none"
+					})
+				}
 			},
 			wxpy() {
 				uni.showLoading({
@@ -490,35 +503,41 @@
 		padding: 40rpx 32rpx;
 		border-radius: 8px;
 		margin: 24rpx;
+
 		.headline {
 			color: rgba(51, 51, 51, 1);
 			font-size: 32rpx;
 			margin-bottom: 32rpx;
 			font-weight: bold;
 		}
-		
-		.pay-radio{
+
+		.pay-radio {
 			display: flex;
 			align-items: center;
 			margin-top: 28rpx;
-			.icon{
-				img{
+
+			.icon {
+				img {
 					width: 48rpx;
 					height: 48rpx;
 					vertical-align: middle;
 				}
 			}
-			.text{
+
+			.text {
 				margin-left: 8rpx;
 			}
-			.radio-box{
+
+			.radio-box {
 				margin-left: auto;
 			}
-			/deep/.uni-radio-input{
+
+			/deep/.uni-radio-input {
 				width: 40rpx;
 				height: 40rpx;
 			}
-			/deep/.uni-radio-input-checked{
+
+			/deep/.uni-radio-input-checked {
 				background-color: #0DBAC7 !important;
 			}
 		}

+ 12 - 0
pages/parents/course/courseDetails.vue

@@ -352,6 +352,12 @@
 			chosePackage(item,index) {
 				this.activePackage = index;
 				this.packageDetail = item;
+				if(this.packageDetail.unitPrice == null) {
+					this.packageDetail.unitPrice = 0;
+				}
+				if(this.packageDetail.waterElectricityAmount == null) {
+					this.packageDetail.waterElectricityAmount = 0;
+				}
 			},
 			choseStudent(item,index) {
 				this.activeStudent = index;
@@ -391,6 +397,12 @@
 					this.coursePackageList = res.data.coursePackageList;
 					if(this.coursePackageList.length !=  0) {
 						this.packageDetail = this.coursePackageList[0];
+						if(this.packageDetail.unitPrice == null) {
+							this.packageDetail.unitPrice = 0;
+						}
+						if(this.packageDetail.waterElectricityAmount == null) {
+							this.packageDetail.waterElectricityAmount = 0;
+						}
 					}
 					this.tclassList = res.data.tclassList;
 					

+ 2 - 1
pages/parents/course/paymentDetail.vue

@@ -7,7 +7,8 @@
 		<!-- 课程信息 -->
 		<view class="class-infos">
 			<view class="picture">
-				<img src="../../../assets/img/picture1.png" alt="">
+				<img v-if="detail.posterUrl != null" :src="detail.posterUrl" alt="">
+				<img v-else src="../../../assets/img/picture1.png" alt="">
 			</view>
 			<view class="infos">
 				<view class="title">

+ 3 - 2
pages/parents/course/paymentRecords.vue

@@ -36,7 +36,8 @@
 				</view>
 				<view class="infos">
 					<view class="picture">
-						<img src="../../../assets/img/picture1.png" alt="">
+						<img v-if="item.posterUrl != null" :src="item.posterUrl" alt="">
+						<img v-else src="../../../assets/img/picture1.png" alt="">
 					</view>
 					<view class="course">
 						<view class="name">
@@ -53,7 +54,7 @@
 
 					</view>
 					<view class="price">
-						{{item.realPay}}
+						{{item.shouldPay}}
 					</view>
 				</view>
 			</view>

+ 1 - 1
pages/parents/course/shoppingCar.vue

@@ -26,7 +26,7 @@
 						{{item.courseName}}
 					</view>
 					<view class="amount" v-if="edit==false">
-						x1
+						<!-- x1 -->
 					</view>
 				</view>
 				<!-- 课程标签 -->