Bladeren bron

阅读用户协议

zhengkaixin 4 maanden geleden
bovenliggende
commit
7132cc1457
5 gewijzigde bestanden met toevoegingen van 95 en 17 verwijderingen
  1. 9 0
      apis/chargeProcess.js
  2. 2 2
      config/.env.dev.ud.js
  3. 8 1
      pages/record/details.vue
  4. 75 13
      pages/searchPile/chargeProcess/charge.vue
  5. 1 1
      utils/requestSon.js

+ 9 - 0
apis/chargeProcess.js

@@ -10,6 +10,15 @@ import request from '../utils/request.js';
  	})
  }
  
+ export function updateContractSignTime(data) {
+ 	return request({
+ 		method: 'post',
+ 		data: data,
+ 		url: '/mobile/regUser/updateContractSignTime'
+ 	})
+ }
+ 
+ 
  
  export function readyToTimingCharging(data) {
  	return request({

+ 2 - 2
config/.env.dev.ud.js

@@ -2,7 +2,7 @@ const UNI_APP = {
 	ProjectName :"优电联盟",
 	BASE_URL: 'https://youdian.hbjp.com.cn/charging-station-server/',
 	//
-	//BASE_URL: 'https://charging.xiaoxinda.com/charging-station-test/',
+	BASE_URL: 'http://charging.xiaoxinda.com/charging-station-test/',
 	//BASE_URL: 'https://youdian-test.hbjp.com.cn/charging-station-test/',
 	
 	//BASE_URL: 'http://192.168.77.162:8081/charging-station/' ,
@@ -25,7 +25,7 @@ const UNI_APP = {
 	//openId:"oSruR6dsG6wrbiQCwyftfgnp5690",//sz
 	//openId:"oSruR6dZcmSM4ATuweZ5fjHGQsiA",//ys
 	//openId:"oSruR6RWLdQp-HGmcQgXEy2tNUmw",//家桩
-	//openId:"oSruR6fYa0yzdMsDinzNOlePTotk",//zq
+	openId:"oSruR6fYa0yzdMsDinzNOlePTotk",//zq
 	//小鹏管家appid
 	//VUE_APP_WXAPPID:"wx7e70eb62a8459869",
 	branchParameter:"youdian",//team51,youdian

+ 8 - 1
pages/record/details.vue

@@ -64,7 +64,14 @@
 				</view>
 			</view>
 		</view>
-		
+		<view class="details" v-if="chargeDetail.updateBy=='cfyxz'">
+			<view class="details-title">
+				<h4 class="oldTextjp20px" oldstyle="font-size: 20px;">结束原因</h4>
+			</view>
+			<view class="oldTextjp18px" oldstyle="font-size: 18px;">
+				{{chargeDetail.remark}}
+				</view>
+		</view>
 		<view class="details">
 			<view class="details-title">
 				<h4 class="oldTextjp20px" oldstyle="font-size: 20px;">费用信息</h4>

+ 75 - 13
pages/searchPile/chargeProcess/charge.vue

@@ -300,7 +300,17 @@
 			</view>
 
 		</view>
-		<view class="botton">
+		<view class="botton">
+			<view style="    display: flex;
+    justify-content: center;">
+			<u-checkbox-group  >
+						<u-checkbox 
+						 
+							v-model="contractSignTime" 
+							
+						>我已阅读并同意</u-checkbox><span style="color: rgba(0, 185, 98, 1);"  @click="gotoUrl('pages/article/details?code=YHXY')">《优电联盟用户使用协议》</span>
+			</u-checkbox-group>
+				</view>	
 			<button class="bottonBtn" @click="submit">开始充电</button>
 
 		</view>
@@ -445,6 +455,17 @@
 
 			</view>
 		</template>
+		
+		<u-modal v-model="contractSignTimeBl"
+		 :show-confirm-button="true" :show-title="false" :show-cancel-button="true"
+		 cancel-text="放弃充电" confirm-text="同意并充电"  @confirm="contractSignTimeSubmit()"
+		 >
+			<view class="slot-content" style="padding:40rpx;    text-align: center;margin-top: 10rpx;">
+							我已阅读并同意<br/>
+							<span style="color: rgba(0, 185, 98, 1);"  @click="gotoUrl('pages/article/details?code=YHXY')">《优电联盟用户使用协议》</span>
+						</view>
+		</u-modal>
+
 		<quickRegistration v-if="personInfo.userType == '1'" @login="loginMethod"   :carNum="carNumber"  ></quickRegistration>
 	</view>
 </template>
@@ -485,7 +506,9 @@
 				show: false,
 				moneyActiveClass_n: "50",
 				moneyActiveClass: "-1",
-				moneyActiveClass_f: "-1",
+				moneyActiveClass_f: "-1",
+				contractSignTime:"",
+				contractSignTimeBl:false,
 				detail: {},
 				couponsuse: '',
 				showmodal: false,
@@ -1194,13 +1217,31 @@
 
 
 
-				}).catch(error => {
+				}).catch((error)=> {
+				
 					uni.hideLoading()
 					if (error == '用户账户余额不足!') {
 
-					} else {
-						uni.showToast({
-							title: error
+					} else {
+						
+						// uni.showToast({
+						// 	title: error
+						// })
+						uni.showModal({
+							title: "提示",
+							content: error,
+							//showCancel: false,
+							confirmText: "首页>找桩",
+							success: res1 => {
+								if (res1.confirm) {
+									//this.alerttipsCk()
+									uni.navigateTo({
+										url: '/pages/searchPile/searchPile'
+									})
+								} else if (res1.cancel) {
+									//('用户点击取消');
+								}
+							}
 						})
 					}
 
@@ -1235,7 +1276,7 @@
 						stationId: this.stationId
 					}).then((res2) => {
 						this.user = res2.data
-						
+						this.contractSignTime=res2.data.regUser.contractSignTime
 						if(this.user.chargingFunds){
 							this.chargingFundsBl=true;
 						}
@@ -1332,11 +1373,32 @@
 				}
 
 
+			},
+			contractSignTimeSubmit(){
+				this.contractSignTime=true;
+				this.submit()
+			},
+			updateContractSignTime(){
+				if(this.user&&this.user.regUser&&!this.user.regUser.contractSignTime){
+					API.updateContractSignTime({
+						openId:this.carhelp.getOpenId()
+					}).then((res) => {
+						
+					}).catch(error => {
+						uni.showToast({
+							title: error
+						})
+					})
+					
+				}
 			},
 			submit() {
-
-
-
+				
+				if(!this.contractSignTime){
+					this.contractSignTimeBl=true;
+					return
+				}
+				
 				if (!this.submitForm.channelNo) {
 					uni.showToast({
 						title: '请先选择充电通道'
@@ -1350,7 +1412,7 @@
 				} else {
 					this.submitInit()
 				}
-
+				this.updateContractSignTime()
 				this.confirm()
 
 
@@ -1504,7 +1566,7 @@
 
 	.recharge {
 		padding: 32rpx;
-		padding-bottom: 100px;
+		padding-bottom: 250rpx;
 
 		.title {
 			@include themeify {
@@ -1829,7 +1891,7 @@
 
 		button {
 
-			margin-left: 40rpx;
+			
 			display: flex;
 			align-items: center;
 			justify-content: center;

+ 1 - 1
utils/requestSon.js

@@ -53,7 +53,7 @@ const request = (options) => {
 			}
 			
 			if (res.data.code != 200) {
-				reject(res.data.message)
+				reject(res.data.message);
 			} else {
 				if(!res.data.result){