فهرست منبع

充电结束弹框

zhengkaixin 1 ماه پیش
والد
کامیت
2042285d1e

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

@@ -2,8 +2,8 @@ const UNI_APP = {
 	ProjectName :"优电联盟",
 	BASE_URL: 'https://youdian.hbjp.com.cn/charging-station-server/',
 	//
-	//BASE_URL: 'http://charging.xiaoxinda.com/charging-station-test/',
-	BASE_URL: 'https://youdian-test.hbjp.com.cn/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/' ,
 	//PARK_URL: 'http://192.168.11.120:8082/charging-parking/' ,
@@ -22,8 +22,8 @@ const UNI_APP = {
 	wechatUrl:"/youdian",
 
 	openId:"oSruR6YkhP7QDroLnZGxWis43Kn0",//zkx
-	openId:"oSruR6dsG6wrbiQCwyftfgnp5690",//sz
-	//openId:"oSruR6dZcmSM4ATuweZ5fjHGQsiA",//ys
+	//openId:"oSruR6dsG6wrbiQCwyftfgnp5690",//sz
+	openId:"oSruR6dZcmSM4ATuweZ5fjHGQsiA",//ys
 	//openId:"oSruR6RWLdQp-HGmcQgXEy2tNUmw",//家桩
 	//openId:"oSruR6fYa0yzdMsDinzNOlePTotk",//zq
 	//openId:"oSruR6RXae3ZNpux_YN8o6U0xMhA",

+ 17 - 7
main.js

@@ -188,8 +188,9 @@ Vue.mixin({
 			let vConsole = new Vconsole()
 		}
 		this.projectName = process.car.ProjectName;
-		this.branchParameter=process.car.branchParameter;
 		
+		//this.branchParameter=process.car.branchParameter;
+		console.log(process.car.branchParameter)
 		var ProjectName=process.car.ProjectName;
 		if(process.car.NODE_ENV=='dev'||process.car.NODE_ENV=='test'){
 			  ProjectName+='('+process.car.NODE_ENV+')';				 
@@ -242,10 +243,12 @@ Vue.mixin({
 			return false 
 		},
 		branchParameterBl(val){
+			
 			if(val=="ud"||val=="youdian"){
-				return this.branchParameter=="youdian"
+				
+				return process.car.branchParameter=="youdian"
 			}
-			return this.branchParameter=="51team"
+			return process.car.branchParameter=="51team"
 		},
 		setValidity(periodOfValidity){
 			if(periodOfValidity<=365){
@@ -330,10 +333,17 @@ Vue.mixin({
 			}
 			return val
 		},
-		gotoUrl(url) {
-			uni.navigateTo({
-				url: "/" + url
-			})
+		gotoUrl(url,bl) {
+			if(bl){
+				uni.redirectTo({
+					url: "/" + url
+				})
+			}else{
+				uni.navigateTo({
+					url: "/" + url
+				})
+			}
+			
 		},
 		gotoUrl2(url) {
 			

+ 220 - 2
pages/searchPile/chargeProcess/dcCharging.vue

@@ -714,6 +714,49 @@
 			</view>
 		</view>
 		<uMessage ref="uMessage" :stationId="chargingGun.stationId" :deviceNo="chargingGun.deviceNo" :channelNo="chargingGun.channelNo"   ></uMessage>
+		<view class="slogan-5 " v-show="bannerListTop.length"
+			@click="showTop=true,getBannerInfoTopBl=true">
+		
+			<u-icon :class="{
+							imageshake :true
+						 }" size="45" name="gift"></u-icon>
+		
+		</view>
+		<u-modal v-model="showTop" v-if="getBannerInfoTopBl" class="showOss showOssK" :show-title="false"
+			:show-confirm-button="false">
+			<view class="slot-content">
+				<swiper class="swiper" circular :indicator-dots="true" :autoplay="true" :interval="2500"
+					:duration="500">
+		
+					
+		
+					<swiper-item class="swiperitem" v-for="(item,i) in bannerListTop" :key="i">
+		
+		
+		
+						<u-image width="500" height="500" bgColor="#ff000000"
+							style="margin: auto;min-height: 250px;" mode="widthFix" @click="clickBannerTopI(i)"
+							:src="item.picUrl">
+							<view slot="loading" style="height: 200px;">
+								<u-loading mode="flower" size="186">
+		
+								</u-loading>
+		
+							</view>
+		
+						</u-image>
+		
+					</swiper-item>
+				</swiper>
+		
+		
+				<u-image width="36px" style="margin: auto; margin-top: 10px;" mode="widthFix" @click="showTop=false"
+					src="@/assets/img/if-close-line-circled.png"></u-image>
+		
+			</view>
+		</u-modal>
+		
+		
 		
 	</view>
 </template>
@@ -735,10 +778,13 @@
 
 	import lottery from '@/components/lottery/index.vue';
 
+
 	import {
 		newDate,
 		secondsDistance,
 		hourDistanceArr,
+		currentTimeStamp,
+		parseUnixTime,
 		daysDistance,minuteConversion
 	} from '@/utils'
 	export default {
@@ -756,6 +802,7 @@
 				bannerListJNT: [],
 				bannerListJNTend: [],
 				bannerListYXJ: [],
+				bannerListTop:[],
 				tabList: [
 					{
 						name: '软件使用',
@@ -861,8 +908,14 @@
 							img: '', // 展示图片
 							color: "#fff" ,// 轮盘区域底色
 							
-						}
+						},
+						
 				],
+			
+				getBannerInfoTopBl:true,
+				showTop:false,
+				showTopImg:"",
+				showTopIndex: 0,
 			}
 		},
 		onLoad(op) {
@@ -890,7 +943,9 @@
 			if (consumerPhone) {
 				this.consumerPhone = consumerPhone
 			}
-
+			
+			
+			
 			this.getBannerInfo("JNT-charging", "bannerListJNT");
 			this.getBannerInfo("JNT-charging-end", "bannerListJNTend");
 			this.getBannerInfo("YXJ-charging-end", "bannerListYXJ");
@@ -949,11 +1004,62 @@
 			}
 		},
 		methods: {
+			getBannerInfoTop(code) {
+				if(!this.carhelp.getOpenId()){
+					return
+				}
+				var nowtime = parseUnixTime(currentTimeStamp(), '{y}-{m}-{d}')
+				
+				var time = this.carhelp.get("bannerListTop");
+				if ((time && nowtime == time)) {
+					this.getBannerInfoTopBl = false;
+				}
+				//特殊活动不考虑
+				//this.getBannerInfoTopBl = true;
+				// uni.showLoading({
+				// 	title: "加载中",
+				// 	mask: true,
+				// })
+				
+				newsApi.getBannerInfo(code).then((res) => {
+				
+				
+					this.bannerListTop = res.data;
+				
+				
+					if (this.bannerListTop.length) {
+						this.showTop = true;
+						this.showTopImg = this.bannerListTop[0].picUrl;
+						this.showTopIndex = 0;
+				
+					}
+					this.carhelp.set("bannerListTop", nowtime);
+					//this.test()
+					var userInfo = this.carhelp.getPersonInfo();
+				
+					if (userInfo && userInfo.id) {
+						//this.getf5surprised()
+					} else {}
+				
+				
+				
+					//uni.hideLoading()
+					//document.getElementsByClassName("uni-swiper-wrapper")[0].parentNode.style="background-color: rgb(255, 255, 255); height: 120px;"
+				}).catch(error => {
+					uni.showToast({
+				
+						title: error,
+						icon: "none"
+					})
+				})
+			},
 			uMessageShow(){
 				if(this.chargingRecord.updateBy=='cfyxz'){
 					this.$refs.uMessage.bShow()
 				}
 				
+				this.getBannerInfoTop("charge-end-top");
+				
 			},
 			getWinnerFn() {
 				// 自定义抽奖结果 ,返回值为 options 奖品列表下标,若返回 -1,则会进行随机抽奖
@@ -1072,6 +1178,57 @@
 
 				this.myChart.setOption(option);
 
+			},
+			clickBannerTopI(i) {
+				var mod = this.bannerListTop[i];
+				//this.showTop = false;
+				this.clickBanner(0, true, mod)
+			},
+			clickBannerTop() {
+				var mod = this.bannerListTop[this.showTopIndex];
+				this.showTop = false;
+				this.clickBanner(0, true, mod)
+			},
+			clickBanner(index, bl, modout) {
+				var uurl = "";
+				var mod = {}
+				if (modout) {
+					mod = modout;
+				}else{
+					mod =this.bannerList[index]
+				}
+				mod.clickUrl = mod.linkUrl
+				
+				if (mod.linkPicUrl && !bl) {
+				
+					this.showOss = true;
+					this.showOssImg = mod.linkPicUrl;
+					this.showOssIndex = index;
+				
+				} else if (mod.clickUrl == null) {
+				
+				} else if (mod.clickUrl.indexOf('http') == 0) {
+				
+					window.location = mod.clickUrl + uurl;
+				} else if (mod.clickUrl.slice(-5) == 'login' && this.userId) {
+				
+				} else if (mod.clickUrl.indexOf('#/') == 0) {
+					if (mod.clickUrl.indexOf("?") == -1) {
+						mod.clickUrl += '?';
+					}
+					var url = mod.clickUrl.split("#")[1]
+					//window.location = mod.clickUrl;
+					uni.navigateTo({
+						url: url + uurl
+					})
+				} else if (mod.clickUrl == '#' || mod.clickUrl == '') {
+				
+				} else {
+					uni.navigateTo({
+						url: mod.clickUrl + uurl
+					})
+				}
+			
 			},
 			getBannerInfo(code, list) {
 
@@ -2544,4 +2701,65 @@
 			background-color:unset;
 		}
 	}
+	
+	.slogan-5 {
+		z-index: 2;
+		margin-top: 10px;
+		display: flex;
+		justify-content: center;
+		/* text-decoration: underline; */
+	
+	
+		text-align: center;
+		position: fixed;
+		/* top: 40px; */
+		bottom: 180px;
+		right: 20px;
+		height: 80rpx;
+		width: 80rpx;
+		line-height: 20px;
+		font-size: 16px;
+		background: linear-gradient(95deg, #FF9800, #FF5722);
+		box-shadow: 0 4rpx 24rpx 0 #FF5722;
+		//padding-top: 8px;
+		color: #fff;
+		border-radius: 25px;
+	
+	}
+	
+	.swiper {
+		height: 700rpx;
+	
+		.swiperitem {
+			height: 700rpx;
+		}
+	}
+	.showOssK {
+	
+		::v-deep .u-model,
+		::v-deep .u-mode-center-box {
+			background-color: transparent;
+		}
+	}
+	@keyframes shake {
+		0% {
+			transform: rotate(0deg);
+		}
+	
+		25% {
+			transform: rotate(8deg);
+		}
+	
+		50% {
+			transform: rotate(0deg);
+		}
+	
+		75% {
+			transform: rotate(-8deg);
+		}
+	
+		100% {
+			transform: rotate(0deg);
+		}
+	}
 </style>

+ 3 - 0
pages/searchPile/stationAndPile/charging/chargingPileDetails.vue

@@ -1,5 +1,6 @@
 <template>
 	<view>
+		<!-- chargingPileDetails -->
 		<u-popup v-model="carTempBl" @open="carTempBlInit" :closeable="true" mode="bottom">
 			<view style="margin-top: 18px;">
 				<view style="font-size: 48rpx;">临时车牌:{{form.carNum}}</view>
@@ -1057,8 +1058,10 @@
 				if (carDetText) {
 					this.carDetText = carDetText
 				}
+				
 				if( this.branchParameterBl('ud')){
 					//this.getf5surprised()
+					
 					this.getBannerInfoTop("home-top2");	
 				}
 				try{

+ 1 - 0
pages/searchPile/stationAndPile/charging/chargingPileDetailsFamily.vue

@@ -1,5 +1,6 @@
 <template>
 	<view>
+		<!-- chargingPileDetailsFamily -->
 		<u-popup v-model="carTempBl" @open="carTempBlInit" :closeable="true" mode="bottom">
 			<view style="margin-top: 18px;">
 				<view style="font-size: 48rpx;">临时车牌:{{form.carNum}}</view>

+ 11 - 1
pages/searchPile/stationAndPile/stationDetails.vue

@@ -256,7 +256,7 @@
 
 					<!-- 充电枪详情 -->
 					<view class="gun-details">
-						<view class="item" v-for="(item,index) in stationDetailDevices" v-show="getShow(item)"
+						<view class="item" v-for="(item,index) in stationDetailDevices" v-show="getShow(item)" @click="test(item)"
 							:key="index">
 							<view v-if="item.deviceAddressShow==1" class="deviceAddressShow deviceAddressShow1">
 
@@ -1395,6 +1395,16 @@
 				})
 				////('book'+JSON.stringify(item))
 			},
+			test(item) {
+				if (process.env.NODE_ENV === "development") {
+					uni.navigateTo({
+						url: '/pages/searchPile/stationAndPile/chargingPileDetails?isback=1&id=' + item.gunNo,
+					})
+				
+				}
+				
+				////('book'+JSON.stringify(item))
+			},
 			book(item, bl) {
 				if (bl) {
 

+ 1 - 1
pages/store/commodityDetails.vue

@@ -347,7 +347,7 @@
 			itemChosenBtn(it,item){
 				var sz=this.ckMallProductOptionList[item.id]
 				var ck=sz.indexOf(it.value)
-				//debugger
+				
 				if(ck>-1){
 					var bl=false
 					//已选中, 要取消

+ 8 - 6
pages/temporary/activity20250501.vue

@@ -1,7 +1,7 @@
 <template>
 	<view>
 
-		<ujp-navbar title="充值送折扣卡" :isBack="!(source==1)" bkUrl="/pages/index/index"></ujp-navbar>
+		<ujp-navbar title="充值送折扣卡" :isBack="!(source==1)" ></ujp-navbar>
 
 		<view class="back1">
 			<view class="blur-overlay">
@@ -43,7 +43,7 @@
 
 
 				</view>
-				<view class="bottom" @click="gotoUrl('pages/user/finance/recharge')" >
+				<view class="bottom" @click="gotoUrl('pages/user/finance/recharge',1)" >
 					前往充值
 				</view>
 			</view>
@@ -94,17 +94,19 @@
 	export default {
 		data() {
 			return {
-				source: 0, //活动来源
+				source: 1, //活动来源 1公众号 ,2充电开始 ,3充电结束- 99系统内
 				activityNo: "1", //活动编号
 				moneyList: [],
 			};
 		},
 		onLoad(op) {
-
-			if (op.source) {
+			if(op.source){
 				this.source = op.source;
-				this.saveSource()
+			}
+			if(this.source!=99){
+				this.saveSource()
 			}
+			
 			this.init();
 		},
 		onReady() {

+ 1 - 1
pages/user/finance/recharge.vue

@@ -26,7 +26,7 @@
 					<p  style="   font-size: 14px;" v-show="selectItem.amountRemark">
 						充值满
 						<span style="color: red;">{{selectItem.amountDesc}}</span>立送服务费<span style="color: red;">{{selectItem.amountRemarkNum}}折半年卡</span>1张(<span style="color: red;">有效期180天,不限充电度数</span>)1<span v-if="selectItem.amountRemarkSf">和{{selectItem.amountRemarkSf}}身份</span>,活动所充金额仅用于支付本平台充电费用(含电费和服务费),不可转赠、提现、退款,
-						<span style="color: #ff8600;margin-left: 16px;" @click="gotoUrl('pages/temporary/activity20250501')">点击查看活动详情</span>
+						<span style="color: #ff8600;margin-left: 16px;" @click="gotoUrl('pages/temporary/activity20250501?source=99',1)">点击查看活动详情</span>
 					</p>
 				
 			</view>