zhengkaixin 1 year ago
parent
commit
340d54576f

+ 1 - 1
.env.dev.js

@@ -16,7 +16,7 @@ const UNI_APP = {
 	openId:"zkxtest23",//zkx
 	openId:"zkxtest23",//zkx
 	
 	
 	openId:"oK9Wr54VbEh3xvWYmD_zT5NbH4AY",//zkx
 	openId:"oK9Wr54VbEh3xvWYmD_zT5NbH4AY",//zkx
-	openId:"oK9Wr59rru-i3bm7dtTtxnkR-i4s",//杨所
+	//openId:"oK9Wr59rru-i3bm7dtTtxnkR-i4s",//杨所
 	//openId:"oK9Wr56vX9nP_B56_Pyigg5n5Ce8",//
 	//openId:"oK9Wr56vX9nP_B56_Pyigg5n5Ce8",//
 	//openId:"oK9Wr5_2USr1yP4MRew9KbJA0-ng",//老板
 	//openId:"oK9Wr5_2USr1yP4MRew9KbJA0-ng",//老板
 	//openId:"oK9Wr5-ViXQMUP2cjiW3bGIABj1Q",
 	//openId:"oK9Wr5-ViXQMUP2cjiW3bGIABj1Q",

+ 10 - 0
apis/friends.js

@@ -28,3 +28,13 @@ export function submitPicc(data) {
 		url: '/mobile/carInsuranceReg/fillApplication'
 		url: '/mobile/carInsuranceReg/fillApplication'
 	})
 	})
 }
 }
+
+export function submitEventRegistration(data) {
+	 
+	return requestWhite({
+		method: 'post',
+		data:data ,
+		url: '/mobile/eventRegistration/add'
+	})
+}
+

BIN
assets/img/piccShare/5.png


+ 25 - 3
main.js

@@ -260,9 +260,31 @@ Vue.mixin({
 			})
 			})
 		},
 		},
 		gotoUrl2(url) {
 		gotoUrl2(url) {
-			uni.navigateTo({
-				url:  url
-			})
+			
+			var mod =  {}
+			mod.clickUrl = url
+			
+			 if (mod.clickUrl == null) {
+			
+			} else if (mod.clickUrl.indexOf('http') == 0) {
+			
+				window.location = mod.clickUrl  ;
+			}  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 
+				})
+			} else if (mod.clickUrl == '#' || mod.clickUrl == '') {
+			
+			} else {
+				uni.navigateTo({
+					url: mod.clickUrl 
+				})
+			}
 		}
 		}
 	}
 	}
 })
 })

+ 8 - 0
pages.json

@@ -936,6 +936,14 @@
         		"navigationBarTitleText" : "",
         		"navigationBarTitleText" : "",
         		"enablePullDownRefresh" : false
         		"enablePullDownRefresh" : false
         	}
         	}
+        },
+        {
+        	"path" : "pages/user/newYear2024",
+        	"style" : 
+        	{
+        		"navigationBarTitleText" : "",
+        		"enablePullDownRefresh" : false
+        	}
         }
         }
     ],
     ],
 	"globalStyle": {
 	"globalStyle": {

+ 3 - 2
pages/index/index.vue

@@ -414,7 +414,8 @@
 				@click="gotoUrl2(itemJNT.linkUrl)" :key="i+'_'+index" style="
 				@click="gotoUrl2(itemJNT.linkUrl)" :key="i+'_'+index" style="
 					text-align: center;
 					text-align: center;
 					padding: 4px 16px;
 					padding: 4px 16px;
-					margin-top: 8px; " v-if="(stationList.length<=2&&stationList.length-1==i)||(stationList.length>2&&i==1)">
+					margin-top: 8px; "  v-show="index==0"
+					v-if="(stationList.length<=2&&stationList.length-1==i)||(stationList.length>2&&i==1)">
 					<image :src="itemJNT.picUrl" style="height: 204rpx;width: 100%;" ></image>
 					<image :src="itemJNT.picUrl" style="height: 204rpx;width: 100%;" ></image>
 				</view>
 				</view>
 			</template>
 			</template>
@@ -575,7 +576,7 @@
 	
 	
 		
 		
 		<view class="piccBanner"  v-for="(itemJNT,index ) in bannerListJNT"
 		<view class="piccBanner"  v-for="(itemJNT,index ) in bannerListJNT"
-		  :key="'a_'+index"
+		  :key="'a_'+index" v-show="index==0"
 		 v-if="stationList.length == 0 && chargeList.length == 0"
 		 v-if="stationList.length == 0 && chargeList.length == 0"
 		 	@click="gotoUrl2(itemJNT.linkUrl)" style="
 		 	@click="gotoUrl2(itemJNT.linkUrl)" style="
 			text-align: center;
 			text-align: center;

+ 1 - 1
pages/record/details.vue

@@ -130,7 +130,7 @@
 			</view>
 			</view>
 		</view>
 		</view>
 		<view class="piccBanner"
 		<view class="piccBanner"
-		v-for="(itemJNT,index ) in bannerListJNT"
+		v-for="(itemJNT,index ) in bannerListJNT" v-show="index==0"
 		@click="gotoUrl2(itemJNT.linkUrl)" :key="index" 
 		@click="gotoUrl2(itemJNT.linkUrl)" :key="index" 
 		  style="
 		  style="
 			text-align: center;
 			text-align: center;

+ 1 - 1
pages/searchPile/chargeProcess/dcCharging.vue

@@ -539,7 +539,7 @@
 				 
 				 
 				 <view class="piccBanner"
 				 <view class="piccBanner"
 				 v-for="(itemJNT,index ) in bannerListJNT"
 				 v-for="(itemJNT,index ) in bannerListJNT"
-				 @click="gotoUrl2(itemJNT.linkUrl)" :key="index" 
+				 @click="gotoUrl2(itemJNT.linkUrl)" v-show="index==0" :key="index" 
 				   style="
 				   style="
 				 	text-align: center;
 				 	text-align: center;
 				 	padding: 0px 16px;">
 				 	padding: 0px 16px;">

+ 701 - 0
pages/user/newYear2024.vue

@@ -0,0 +1,701 @@
+<template>
+	<view class="all">
+		<u-mask :show="show" @click="show = false">
+			<u-image width="100%" height="500px" :mode="'widthFix'" src="/static/img/guide_point2.png"></u-image>
+
+		</u-mask>
+
+		<ujp-navbar title="凭话费领年卡活动"  :startGz="false"  :isBack="back" ></ujp-navbar>
+		<view class="InviteFriends" :class="{
+			opacityClass:show
+		}">
+		<view class="text imgHead">
+					<view class="imgHead1">
+						<img   style="width: 125px;" src="@/assets/img/piccShare/1.png"></img>
+						
+						
+					</view>
+					<view class="imgHead2">
+						<img  style="width: 252px;height: 40px;" src="@/assets/img/piccShare/5.png"></img>
+					</view>
+				</view>
+			<view class="main">
+				
+				<view class="suited">
+					<p class="title">活动对象 :</p>
+					<view class="content">
+						不限
+						
+					</view>
+				 
+					
+					<p class="title">活动说明 :</p>
+					<view class="content">
+						
+						
+						庆元旦,迎新年,用户凭手机号,免费领取<span style="color: rgb(12 11 11);font-weight: bold;">51充电联盟年卡</span>一张,最低可享<span style="color: #ec4f27;font-weight: bold;">两年免充电服务费</span>,最高可享万元礼包,老带新还能有额外红包大礼!
+						
+					</view>
+					<view class="bottomView" v-if="false">
+						<u-button class="button" shape="circle" @click="show=true" >分享活动
+						<u-icon name="share"></u-icon>
+						</u-button>
+					</view>
+				</view>
+
+				<view class="application-form ">
+				
+					<view class="tel">
+						<p><span style="color: red;">*</span>填写手机号</p>
+						<u-input v-model="subForm.phone" :customStyle="placeholderStyle" 
+							:placeholderStyle="placeholderStyle" placeholder="请填写手机号"></u-input>
+					</view>
+					
+					
+				<view class="bottomView">
+					
+						<u-button class="button"  type="warning" @click="submit">我要领卡</u-button>
+				</view>
+			</view>
+	</view>
+		</view>
+		<u-modal v-model="show1" @confirm="gotoGz" cancel-text="暂不关注" confirm-text="前往关注" :show-cancel-button="false"
+			confirm-color="#53b56b" ref="uModal2" :asyncClose="true">
+			<view style="padding: 15px;">请先关注<span style=" color:  #53b56b;">{{projectName}}</span>公众号,然后进行填报</view>
+		</u-modal>
+		
+		<u-mask :show="carTempBl" >
+		<ucarkeyboard  v-if="carTempBl" :tips="subForm.carNum" style="z-index: 9999;position: fixed !important;"  ref="uKeyboard" mode="car"
+			@confirm="carTempBl=false" @cancel="carTempBl=false" :showTips="true"
+			:mask-close-able="false" @change="valChange" @backspace="backspace"></ucarkeyboard>
+		
+		</u-mask>
+		
+	</view>
+</template>
+
+<script>
+	import wx from 'weixin-js-sdk'
+	 
+	import {
+		convertCanvasToImage,
+		substrMb
+	} from '@/utils'
+	import {
+		checkPhone
+	} from '@/utils'
+	
+ 	import * as API from '@/apis/friends.js'
+	import * as WxJsApi from '@/utils/wxJsApi.js'
+	import * as API_weixin from '@/apis/weixin.js'
+
+	import ucarkeyboard from '@/components/Ucarkeyboard.vue'
+
+
+	export default {
+		components: {
+			ucarkeyboard
+		},
+		data() {
+			return {
+				isLogin:false,
+				carAuthImg:"",
+				id: "",
+				carTempBl:false,
+				code: "",
+				show: false,
+			 
+				uid: "",
+			 
+				show1: false,
+				show2: false,
+				projectName: "",
+				name: "",
+				 
+				back: false,
+				 
+				subForm: {
+					realName:"",
+					phone: "",
+					carNum:"",
+					licenseFileUrl: "",
+					openId:"",
+					shareUserId: ""
+				},
+
+				
+				placeholderStyle: {
+					'font-size': '16px',
+					
+					'padding': '4px 8px',
+					},
+				shareUserId:"",
+				userInfo:null,
+				carNum:'',
+				carLicense:false,
+
+			}
+		},
+		onLoad(op) {
+			if(op.back){
+				this.back=false
+			}
+			this.projectName = process.car.ProjectName;
+			
+			if(op.sid){
+				
+					this.shareUserId = op.sid
+					this.carhelp.set("picc_shareUserId_1230",{
+						sid:op.sid,
+						time:new Date().getTime()
+					});
+			}else{
+				var obj=this.carhelp.get("picc_shareUserId_1230")
+				if(obj){
+					var time1 =new Date().getTime()
+					var time2 =obj.time;
+					if(time1-time2<1000*60*5){
+						this.shareUserId = obj.sid;
+					}
+					
+				}
+			}
+			//console.log(this.shareUserId )
+			if(this.shareUserId ){
+				uni.showToast({
+					title:"来自好友的分享"
+				})
+			}
+		
+			this.get_wx_config();
+
+		},
+		onReady() {
+		
+			var info = this.carhelp.getPersonInfo();
+		
+			if(info.id&&info.phone){
+				//this.isLogin=true
+				this.userInfo=info;
+				this.subForm.phone=info.phone;
+				
+			}
+		},
+		onShow() {
+
+			this.checkSubscribe()
+
+		},
+		methods: {
+			
+			
+			checkSubscribe() {
+				API_weixin.checkSubscribe({
+					openId: this.carhelp.getOpenId()
+				}).then((res) => {
+			
+					if (res.data == "0") {
+						this.show1 = true
+						
+					} else {
+						//this.init();
+						this.show1 = false;
+						this.show2 = true;
+			
+			
+						//this.carhelp.setGzDate() 
+			
+					}
+			
+					//setGzDate
+				}).catch(error => {
+					uni.showToast({
+						title: error
+					})
+				})
+			
+			},
+			gotoGz() {
+				this.carhelp.setGzDate()
+			//	this.gotoGzShow = false;
+				var url = "https://mp.weixin.qq.com/s/mCHz1nNvg0xAICiBeIyKRQ";
+				window.location.href = url
+			
+			},
+			submit(){
+				this.subForm.openId=this.carhelp.getOpenId();
+				this.subForm.shareUserId=this.shareUserId;
+				this.subForm.event=1;
+				
+				if(!this.subForm.phone){
+					uni.showToast({
+						title:"请填写手机号"
+					})
+					return
+				}
+				var checkPhoneResult = checkPhone(this.subForm.phone);
+							
+				if (checkPhoneResult !== true) {
+					uni.showToast({
+						title: checkPhoneResult,
+					})
+					return;
+				}
+				
+				
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})		
+				API.submitEventRegistration(this.subForm).then((res) => {
+					uni.hideLoading()
+					
+					if(res.result){
+						
+						uni.showModal({
+							//showCancel:false,
+						
+							title:"提示",
+							content:"提交成功!",
+							cancelText:"继续填写",
+							confirmText:"前往主页",
+							
+							success:(me)=> {
+								this.carAuthImg="";
+								this.subForm={
+									phone: "",
+								}
+								if(me.confirm){
+									uni.reLaunch({
+										url:"/"
+									})
+								}
+							
+							}
+						})
+					}
+					
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
+			
+		
+			//获取微信jssdk配置信息
+			get_wx_config() {
+				//("get_wx_configget_wx_configget_wx_configget_wx_config")
+				var _this = this
+				API_weixin.getConfig().then(response => {
+					var wxconfig = response.data.wxConfig;
+
+					wx.config({
+						debug: false, // 开启调试模式,
+						appId: wxconfig.appId, // 必填,企业号的唯一标识,此处填写企业号corpid
+						timestamp: wxconfig.timestamp, // 必填,生成签名的时间戳
+						nonceStr: wxconfig.nonceStr, // 必填,生成签名的随机串
+						signature: wxconfig.signature, // 必填,签名,见附录1
+						jsApiList: ['updateAppMessageShareData',
+						'updateTimelineShareData','onMenuShareTimeline', 'onMenuShareAppMessage', 'onMenuShareQQ', 'onMenuShareQZone'], // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
+
+					});
+					_this.wxShare()
+					wx.error(function(res) {
+						//('微信api配置出错');
+					});
+				}).catch(error => {
+
+					//(error);
+				})
+
+			},
+			//微信分享自定义
+			wxShare() {
+				var img =
+					"http://oss.xiaoxinda.com/charging/chargingconfigure/2022/6/6/ec228c56-487a-4ae1-ac6f-37284060fbba/hongbao.jpg"
+				// img="https://yktwechat.xiaoxinda.com/config/xxd2021.jpg"		
+				// if (indexLogo) {
+				// 	this.indexLogo = indexLogo;
+				// }
+				var info = this.carhelp.getPersonInfo()
+				//var img=require("@/static/img/aboutus.png")
+				////(this.nowItem);
+				var ProjectName = process.car.ProjectName; //info.nickName+
+				var nickName = info.nickName ? info.nickName : '好友';
+				var title = nickName + "邀请你参加'凭话费领年卡活动'"
+				//"["+ProjectName+"]"+'和好友一起领5元红包'
+				var desc = ProjectName
+				let joinUrl = window.location.href.split("/team51/")[0] + "/team51/#/pages/user/newYear2024?back=1"
+				//this.joinUrl=joinUrl;
+				if(info.id){
+					joinUrl+="&sid=" + info.id;
+				}
+				var _this=this;
+				wx.ready(function() {
+					
+					wx.onMenuShareAppMessage({
+						title: title,
+						desc: desc,
+						link: joinUrl,
+						imgUrl: img,
+						success: function() {
+							// 设置成功
+							_this.$emit("wxShare",null);
+						}
+					})
+					wx.onMenuShareTimeline({
+						title: title,
+						desc: desc,
+						link: joinUrl,
+						imgUrl: img,
+						success: function() {
+							// 设置成功
+							_this.$emit("wxShare",null);
+						}
+					})
+					wx.updateAppMessageShareData({
+						title: title,
+						desc: desc,
+						link: joinUrl,
+						imgUrl: img,
+						success: function() {
+							//("updateAppMessageShareData")
+							// 设置成功
+							_this.$emit("wxShare", null);
+						}
+					})
+					wx.updateTimelineShareData({
+						title: title,
+						desc: desc,
+						link: joinUrl,
+						imgUrl: img,
+						success: function() {
+							//("updateTimelineShareData")
+							// 设置成功
+							_this.$emit("wxShare", null);
+						}
+					})
+					console.log("readyreadyreadyreadyready")
+				});
+			}
+		}
+	}
+</script>
+<style>
+	page {
+		    background: #c9382c;
+	}
+</style>
+<style lang="scss" scoped>
+	@import "@/_theme.scss";
+
+	.all {
+		@include themeify {
+			font-size: themed('font-size1');
+		}
+	}
+	.imgHead{
+		padding-top: 72rpx;
+		    display: flex;
+		    flex-direction: column;
+		    align-items: center;
+		
+		.imgHead1{
+			img{
+				height: 24px;
+			}
+			
+			    display: flex;
+			    justify-content: center;
+		}
+		.imgHead2{
+			
+			    display: flex;
+			img{
+				width: 100%;
+				height: 40px;
+			}
+			    margin-top: 16px;
+		}
+	}
+
+	.main {
+		
+		padding: 22rpx 56rpx 170rpx;
+		
+		.text {
+			color: rgba(255, 255, 255, 100);
+
+			@include themeify {
+				font-size: themed('font-size4');
+			}
+
+			/*		   font-size: 18px;*/
+			text-align: justify;
+			text-indent: 36px;
+
+
+		}
+
+		.suited {
+			background-color: #fff;
+			//background: linear-gradient(180deg, rgba(189,255,224,1) 0%,rgba(255,255,255,1) 14%);
+			background: linear-gradient(180deg, rgba(255,224,223,1) 0%,rgba(255,255,255,1) 14%);
+			margin-top: 24px;
+			padding: 24px;
+			border-radius: 16px;
+
+			.title {
+				/*height: 18px;*/
+				color: rgba(16, 16, 16, 100);
+
+				
+
+				font-size: 18px;
+				font-weight: 600;
+			}
+
+			.content {
+				margin: 16rpx 0;
+				//font-weight: 550;
+				color: rgba(102, 102, 102, 1);
+				line-height: 20px;
+				font-size: 14px;
+				p{
+					margin: 8rpx 0;
+				}
+			}
+		}
+
+
+		.application-form {
+			background-color: #fff;
+			border-radius: 16px;
+			margin-top: 24px;
+			padding: 24px;
+
+			.u-input {
+				border-radius: 50px;
+				background-color: rgba(232, 236, 234, 100);
+				margin-top: 12px;
+
+			}
+
+			/deep/.uni-input-input {
+				margin: 20px;
+			}
+
+			/deep/.u-input__right-icon {
+				margin-right: 10px;
+			}
+
+			p {
+					font-size:18px;
+				@include themeify {
+				
+					line-height: themed('font-size4');
+					height: themed('font-size4');
+				}
+
+				/*		  				  height: 18px;
+							  line-height: 18px;*/
+				color: rgba(16, 16, 16, 100);
+				/*		  				  font-size: 18px;*/
+			}
+
+			.tel,
+			.place,
+			.type,
+			.want {
+				//margin-top: 24px;
+			}
+
+			.textarea {
+				width: 72.2vw;
+				height: 140px;
+				border-radius: 22px;
+				background-color: rgba(232, 236, 234, 100);
+				margin-top: 12px;
+				overflow-y: scroll;
+
+				@include themeify {
+					font-size: themed('font-size2');
+					line-height: themed('font-size2');
+				}
+
+				.uni-textarea-placeholder {
+					padding: 12px 20px;
+
+					@include themeify {
+						font-size: themed('font-size2');
+						line-height: themed('font-size2');
+					}
+				}
+
+				/deep/.uni-textarea-textarea {
+					width: 90%;
+					padding: 10px 20px;
+
+				}
+
+				/deep/.u-input__right-icon {
+					display: none;
+				}
+			}
+		}
+
+		.type {
+			.checkbox {
+				margin-top: 12px;
+
+				/deep/.u-checkbox {
+					width: 50% !important;
+					margin-top: 4px;
+				}
+			}
+
+		}
+
+		.want {
+			/deep/.u-checkbox {
+				margin-top: 8px;
+			}
+		}
+
+		.hint {
+			margin-top: 12px;
+
+			@include themeify {
+				font-size: themed('font-size2');
+				line-height: themed('font-size5');
+			}
+
+			/*
+			font-size: 14px;
+			line-height: 20px;
+			*/
+			text-align: center;
+
+			.tel-num {
+				color: #9FC7FF;
+			}
+		}
+
+		/deep/.u-btn {
+			border-radius: 50px;
+			margin-top: 24px;
+		}
+	}
+
+	.InviteFriends {
+		//background-image: linear-gradient(0deg, #a2e9c9, #01b963);
+		background: #c9382c;
+
+	}
+
+	
+
+	.opacityClass {
+		opacity: 0.2;
+	}
+	// 底部
+	.bottomView {
+			border-radius: 50px;
+		color:rgba(0, 185, 98, 100);
+		// width: 100%;
+		// height: 64px;
+		// text-align: center;
+		// background-color: #fff;
+		.button{
+			//width: 90%;
+			border-radius: 50px;
+			// background-color: #fff;
+			color:#fff;
+			font-size: 16px;
+			background: linear-gradient(90deg, rgba(255,98,0,1) 0%,rgba(255,150,0,1) 100%);
+			//border: 1px solid rgba(0, 163, 86, 1);
+		}
+		// 	button::after {
+		// 		border: rgba(0, 185, 98, 100);
+		// 	}
+	}
+	
+	.carAuth{
+		border-radius: 12px;
+		background-color: rgba(255, 255, 255, 1);
+		border: 2px dashed rgba(187, 187, 187, 1);
+		//height: 400rpx;
+		width: 100%;
+		    overflow: hidden;
+			text-align: center;
+			.carAuthImg{
+				margin-top: 10px;
+				margin-bottom: 10px;
+				width: 510rpx;
+				height: 360rpx;
+			}
+			.carAuthIcon{
+				    position: absolute;
+				    background: #6e7175;
+				    width: 44px;
+				    height: 44px;
+					border-radius: 50px;
+				    /* left: 200px; */
+				    /* top: 200px; */
+				    margin: 160rpx 230rpx;
+				    z-index: 99;
+					    display: flex; 
+					    justify-content: center;
+	
+			}
+	}
+	
+	// .car-type{
+	// 	    display: flex;
+	// 	    flex-direction: row;
+	// 		margin: 0 40rpx;
+	// 		flex-wrap: wrap;
+	// }
+	.want{
+		.wantView{
+			display: flex;
+		}
+		button{
+			width: 45%;
+			color: rgba(51, 51, 51, 1);
+			background-color: rgba(232, 236, 234, 1);
+			
+		}
+		button::after {
+			border: none;
+		}
+		.wantBtn{
+			background-color: #fff;
+			border:2px solid #00B962;
+		}
+		.wanttpis{
+			    position: relative;
+			    top: -100rpx;
+			    left: 180rpx;
+			    z-index: 99;
+			    background: #00B962 ;
+				padding: 2px 3px;
+				font-size: 10px;
+				color:#fff;
+				border-radius: 4px;
+
+		}
+	}
+	.carTempBlInput{
+		    display: flex;
+		    align-items: center;
+		font-size: 16px;
+		min-height: 44px;
+		padding: 4px 16px;
+		border-radius:20px;
+		 background: #e9ecea ;
+		 color:#808080
+	}
+</style>