Jelajahi Sumber

51两周年

zhengkaixin 1 tahun lalu
induk
melakukan
c2edcfddeb

+ 15 - 0
apis/user.js

@@ -65,6 +65,21 @@ export function exchangeGroupDetail (data) {
 }
 
 
+export function exchangeGroupDetail2 (data) {
+	 var data={
+		 group:data
+	 }
+	 // if (process.env.NODE_ENV === "development"&&process.car.BASE_URL=='https://charging.xiaoxinda.com/charging-station-test/') {
+		//   data.jumpFive=1
+	 // }
+	
+	return request({
+		method: 'post',
+		//header:{'Content-Type':'text/plain'},
+			data:data,
+		url: '/mobile/chargingCouponApi/exchangeGroupDetail'
+	})
+}
 export function deleteRegUserCar (data) {
 	 
 	return request({

TEMPAT SAMPAH
assets/img/anniversary/ticket_1.png


TEMPAT SAMPAH
assets/img/anniversary/ticket_2.png


TEMPAT SAMPAH
assets/img/anniversary/两周年bg.jpg


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

@@ -2,7 +2,7 @@ const UNI_APP = {
 	ProjectName :"51充电联盟",
 	BASE_URL: 'https://51team.xiaoxinda.com/charging-station-server/',
 	//
-	//BASE_URL: 'https://charging.xiaoxinda.com/charging-station-test/',
+	BASE_URL: 'https://charging.xiaoxinda.com/charging-station-test/',
 
 	//BASE_URL: 'http://192.168.77.162:8081/charging-station/' ,
 	//PARK_URL: 'http://192.168.11.120:8082/charging-parking/' ,
@@ -21,10 +21,10 @@ const UNI_APP = {
 	openId:"oK9Wr54VbEh3xvWYmD_zT5NbH4AY",//zkx
 	//openId:"oK9Wr59rru-i3bm7dtTtxnkR-i4s",//杨所
 	//openId:"oK9Wr56vX9nP_B56_Pyigg5n5Ce8",//
-	openId:"oK9Wr5_2USr1yP4MRew9KbJA0-ng",//老板
+	//openId:"oK9Wr5_2USr1yP4MRew9KbJA0-ng",//老板
 	//openId:"oK9Wr5-ViXQMUP2cjiW3bGIABj1Q",
 	//openId:"oK9Wr5wkU3OwWhQ7mRrLZ5MDZNHo",
-	//openId:"oK9Wr5xNbB1ep0ob9C_D-ycCRpgs",
+	//openId:"oK9Wr550ej6nHA5BuX_HJIPRMs_k",
 	//openId:"oK9Wr55J1J1eL6BqI2tW749NTxNU",//zq
 	//openId:"oK9Wr50iQUjEAam1s_RpHpXJS5xg",//月卡用户
 	//openId:"oK9Wr5zv8lvirni3txbxRkmpg8d0",//sz

+ 7 - 0
pages.json

@@ -922,6 +922,13 @@
         		
         		"enablePullDownRefresh" : false
         	}
+        },
+        {
+        	"path" : "pages/temporary/anniversary2024",
+        	"style" : 
+        	{
+        		"enablePullDownRefresh" : false
+        	}
         }
     ],
 	"globalStyle": {

+ 277 - 0
pages/temporary/anniversary2024.vue

@@ -0,0 +1,277 @@
+<template>
+	<view class="background">
+		<ujp-navbar title="51充电联盟两周年庆典" 
+			bkUrl="/pages/index/index"
+		></ujp-navbar>
+		<view class="backgroundHead" @click="scrollToBottom" >
+			<img style="width: 100%;" src="@/assets/img/anniversary/两周年bg.jpg"></img>
+		</view>
+		<view class="btn">
+			<view class="btnCard " :class="{
+				btnCard1:key,
+				btnCard2:!key
+			}" >
+				<view class="text1">
+					<view class="text11">服务费免单卷</view>
+					<view class="text12">有效期5月11日-17日,逾期作废</view>
+				</view>
+				<view class="text2" v-if="key" @click="exchangeBtn">
+					点击<br />
+					领取
+				</view>
+				<view class="text2" v-if="!key">
+					领取<br />
+					成功
+				</view>
+			</view>
+			<view class="option">
+				<u-button size="medium" type="error" @click="show=true">活动规则</u-button>
+				<u-button size="medium" type="error">我的优惠券</u-button>
+			</view>
+		</view>
+		<u-popup v-model="show" class="u-popup-class" border-radius="56" mode="center">
+			<view class="popupMain">
+				<view class="popup-content">
+					<view class="p-head">活动规则</view>
+					<view class="p-title">
+						活动对象:
+					</view>
+					<view class="p-value">
+						51充电联盟注册会员
+					</view>
+					<view class="p-title">
+						活动时间:
+					</view>
+					<view class="p-value">
+						2024年5月11日-17日
+					</view>
+					<view class="p-title">
+						活动范围:
+					</view>
+					<view class="p-value">
+						所有 51 充电联盟及优电联盟充电站
+					</view>
+					<view class="p-title">
+						活动内容:
+					</view>
+					<view class="p-value">
+						51充电联盟二周年之际,完成品牌升级并更名为“优电联盟”,“优电联盟”将一贯秉承“共建、共享、共赢”理念,为用户提供更优充电服务。
+						平台会员可领取一张“<span style="font-weight: bold;">服务费免单券</span>”,每个账号可领取一次,该券有效期为 5 月 11 日-17 日,共 7
+						天,超过有效期无法使用。
+					</view>
+					<view class="p-btn-view">
+						<view class="p-btn" @click="show=false">知道了</view>
+					</view>
+				</view>
+			</view>
+		</u-popup>
+	</view>
+</template>
+
+<script>
+	import * as userApi from '@/apis/user.js'
+
+	export default {
+		data() {
+			return {
+				show: false,
+				couponList:[],
+				key:"",
+			}
+		},
+		onReady() {
+			this.getf5surprised()
+		},
+		methods: {
+			   scrollToBottom() {  
+			      // 使用uni.pageScrollTo方法滚动到指定位置  
+			      uni.pageScrollTo({  
+			        scrollTop: 99999, // 设置一个足够大的值,确保滚动到最底部  
+			        duration: 300 // 滚动动画时长,单位ms  
+			      });  
+			    }  ,
+			exchangeBtn(){
+				if(!this.key){
+					return
+				}
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				userApi.exchange({
+					key: this.key
+				}).then((res) => {
+					uni.hideLoading();
+					this.getf5surprised()
+					uni.showModal({
+						showCancel:false,
+						title:"提示",
+						content:"领取成功"
+					})
+				}).catch(error => {
+					//this.showNt = false;
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
+			getf5surprised() {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				userApi.exchangeGroupDetail2("周年红包").then((res) => {
+					uni.hideLoading();
+					var data=res.data;
+					this.key=""
+					this.couponList=[]
+					if(data.length){
+						this.couponList = res.data[0].couponList;
+						
+						if(this.couponList&&this.couponList.length){
+							this.key=res.data[0].key;
+						}
+					}
+					
+
+
+				}).catch(error => {
+
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	page {
+		background-color: #eabe9a;
+	}
+
+	.btn {
+		padding: 40rpx;
+		top: -40rpx;
+		background-color: #eabe9a;
+		position: relative;
+		border-radius: 10px 10px 0px 0px;
+
+	}
+
+	.btnCard {
+		//padding: 40rpx;
+		background-size: 100% 100%;
+		display: flex;
+		justify-content: space-between;
+
+		.text1 {
+			padding: 40rpx;
+			width: 484rpx;
+			color: #7D2B00;
+
+			.text11 {
+				font-size: 40rpx;
+				font-weight: bold;
+			}
+
+			.text12 {
+				font-size: 28rpx;
+			}
+		}
+
+		.text2 {
+			font-size: 36rpx;
+			color: rgba(255, 255, 255, 1);
+			padding: 40rpx;
+			display: flex;
+			width: 188rpx;
+			align-items: center;
+			justify-content: center;
+		}
+	}
+
+	.btnCard1 {
+		background-image: url("@/assets/img/anniversary/ticket_1.png");
+	}
+
+	.btnCard2 {
+		background-image: url("@/assets/img/anniversary/ticket_2.png");
+	}
+
+	.option {
+		display: flex;
+		margin-top: 40rpx;
+		margin-bottom: 60rpx;
+		justify-content: space-between;
+
+		/deep/.u-btn {
+			width: 320rpx;
+			margin: 0;
+			border-color: #FE280F;
+			background-color: #FE280F;
+		}
+	}
+
+	.u-popup-class {
+		margin: 40rpx;
+
+	}
+
+	/deep/.uni-scroll-view {
+		border-radius: 40rpx;
+	}
+
+	/deep/.u-mode-center-box {
+		background: linear-gradient(180deg, rgba(255, 179, 147, 1) 0%, rgba(246, 234, 214, 1) 100%);
+
+
+		padding: 20rpx;
+	}
+
+	.popupMain {
+
+		.popup-content {
+			padding: 20rpx;
+			border-radius: 20px;
+			background-color: rgba(255, 255, 255, 1);
+
+			.p-head {
+				text-align: center;
+				color: rgba(100, 58, 28, 1);
+				font-size: 56rpx;
+				font-weight: bold;
+				margin: 16rpx;
+			}
+
+			.p-title {
+				font-weight: bold;
+				font-size: 32rpx;
+				margin-bottom: 12rpx;
+			}
+
+			.p-value {
+				font-size: 28rpx;
+				margin-bottom: 36rpx;
+			}
+
+			.p-btn-view {
+				.p-btn {
+					background: linear-gradient(180deg, rgba(253, 133, 93, 1) 0%, rgba(230, 68, 53, 1) 100%);
+					color: rgba(255, 255, 255, 1);
+					font-size: 40rpx;
+					width: 460rpx;
+					border-radius: 50px;
+					padding: 20rpx;
+					text-align: center;
+					margin: auto;
+
+				}
+			}
+
+		}
+	}
+</style>