lhl 2 éve
szülő
commit
51e93479da

+ 28 - 2
api/index.js

@@ -35,10 +35,36 @@ export function loadIndexs(data) {
 }
 
 //获取活动列表
-export function getAtionList(data) {
+export function getActionList(data) {
 	return request({
-		url: '/api/',
+		url: '/api/partake/out',
 		method: 'get',
 		data
 	});
 }
+
+//获取活动详情
+export function getActionDetail(data,id) {
+	return request({
+		url: '/api/partake/out/' + id,
+		method: 'get',
+		data
+	});
+}
+
+// 参加活动
+export function addAction(data) {
+	return request({
+		url: '/api/partake/participate_in',
+		method: 'post',
+		data
+	});
+}
+
+export function getAddList(data) {
+	return request({
+		url: '/api/partake/partake',
+		method: 'get',
+		data
+	});
+}

+ 12 - 0
pages.json

@@ -20,6 +20,18 @@
 				"navigationBarTitleText": "活动列表"
 			}
 		},
+		{
+			"path": "pages/index/actionDetail",
+			"style": {
+				"navigationBarTitleText": "活动详情"
+			}
+		},
+		{
+			"path": "pages/index/addList",
+			"style": {
+				"navigationBarTitleText": "参与记录"
+			}
+		},
 		{
 			"path": "pages/public/register",
 			"style": {

+ 196 - 32
pages/index/actionDetail.vue

@@ -1,17 +1,50 @@
 <template>
 	<view class="content">
-		<view class="" style="height: 1rpx;"></view>
-		<empty v-if="loaded === true && list.length === 0"></empty>
-		<view class="action-wrap" v-for="item in list">
-			<image src="" mode=""></image>
+		<image v-if="detail.pics" :src="detail.pics.split(',')[1]" mode="widthFix" class="top-img"></image>
+		<view class="add-if">
+			<view class="jj">
+				<view class="if-tit">
+					购买7万元宏根蒂品牌红酒成为
+				</view>
+				<view class="if-level">
+					品牌经纪人
+				</view>
+				<view class="if-status">
+					{{userInfo.level > 0 ?'您已满足参与条件': '您未满足参与条件'}}
+				</view>
+				<view class="add-btn" :class="{'cant': userInfo.level == 0}" @click="add()">
+					立即参与
+				</view>
+			</view>
+		</view>
+		<view class="add-recoed flex">
+			<view class="add-left">
+				<image src="../../static/icon/time.png" mode="widthFix"></image>参与记录
+			</view>
+			<view class="add-left add-right" @click="goDetail()">
+				查看详情<image src="../../static/icon/write-go.png" mode="widthFix"></image>
+			</view>
+		</view>
+		<view class="jj-wrap">
+			<view class="jj-tit">
+				活动说明
+			</view>
+			<view class="jj" v-html="detail.content"></view>
+		</view>
+		<view class="" style="height: 60rpx;">
+			
 		</view>
-		<uni-load-more :status="loadingType"></uni-load-more>
 	</view>
 </template>
 
 <script>
 	import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
 	import empty from '@/components/empty';
+	import {
+		getActionDetail,
+		addAction
+	} from '@/api/index.js'
+	import { getUser } from '@/api/user.js'
 	export default {
 		components: {
 			uniLoadMore,
@@ -19,44 +52,51 @@
 		},
 		data() {
 			return {
-				page: 1,
-				limit: 10,
-				loadingType: 'more',
-				loaded: false,
-				list: []
+				userInfo: {
+					
+				},
+				detail: {}
 			}
 		},
 		onLoad(opt) {
-	
+			this.id = opt.id
+			this.getUser()
+			
 		},
 		onShow() {
-
+			
 		},
 		onReachBottom() {
 
 		},
 		onReady() {
-			
+
 		},
 		methods: {
-			getList() {
+			goDetail() {
+				uni.navigateTo({
+					url: '/pages/index/addList'
+				})
+			},
+			getUser() {
+				getUser().then(res => {
+					this.userInfo = res.data
+					this.getActionDetail()
+				})
+			},
+			getActionDetail() {
 				let that = this
-				if(that.loadingType == 'loading' || that.loadingType == 'noMore') {
-					return
-				}
-				getActionList({
-					page: that.page,
-					limit: that.limit
+				getActionDetail({
+					
+				},that.id).then(res => {
+					that.detail = res.data
+				})
+			},
+			add() {
+				addAction({
+					out_id: this.id
 				}).then(res => {
-					let list = res.data.list
-					that.list = that.list.concat(list)
-					that.page++
-					if(list.length == that.limit) {
-						that.loadingType = 'more'
-					}else {
-						that.loadingType = 'noMore'
-					}
-					that.loaded = true
+				
 				})
 			}
 		}
@@ -64,15 +104,139 @@
 </script>
 
 <style lang="scss">
+	page {
+		height: auto;
+		min-height: 100%;
+		background-color: #fdd717;
+	}
+	.add-if {
+		width: 693rpx;
+		margin: 20rpx auto;
+		border: 3rpx solid #FED888;
+		background: linear-gradient(0deg, #FF9805, #FFB606);
+		border-radius: 20rpx;
+		padding: 20rpx;
+		.if-tit {
+			font-size: 43rpx;
+			font-weight: bold;
+			text-align: center;
+			color: #6B4216;
+		}
+		.if-level {
+			width: 274rpx;
+			height: 76rpx;
+			border: 2rpx solid #6B4216;
+			border-radius: 14rpx;
+			text-align: center;
+			line-height: 76rpx;
+			font-size: 37rpx;
+			font-weight: bold;
+			color: #6B4216;
+			margin:40rpx auto 30rpx;
+		}
+		.if-status {
+			font-size: 26rpx;
+			font-weight: 500;
+			color: #666666;
+			text-align: center;
+		}
+		.add-btn {
+			width: 366rpx;
+			height: 80rpx;
+			background: linear-gradient(0deg, #FFB605, #FFD778);
+			border-radius: 40rpx;
+			line-height: 80rpx;
+			font-size: 36rpx;
+			font-weight: 500;
+			color: #6B4216;
+			text-align: center;
+			margin: 30rpx auto 20rpx;
+		}
+	}
+	.add-recoed {
+		width: 693rpx;
+		height: 104rpx;
+		border: 3rpx solid #FED888;
+		background: linear-gradient(0deg, #FF9805, #FFB606);
+		border-radius: 35rpx;
+		margin: 20rpx auto;
+		padding: 0 32rpx;
+		.add-left {
+			display: flex;
+			align-items: center;
+			image {
+				width: 38rpx;
+				margin: 0 15rpx 0 0;
+			}
+			font-size: 36rpx;
+			font-weight: bold;
+			color: #FFFFFF;
+		}
+		.add-right {
+			font-size: 30rpx;
+			font-weight: 500;
+			color: #FFFFFF;
+			image {
+				width: 15rpx;
+				margin: 0 0 0 15rpx;
+			}
+		}
+	}
 	.action-wrap {
 		width: 704rpx;
 		height: 330rpx;
-		margin:20rpx auto;
+		margin: 20rpx auto;
+
 		image {
-			
+
 			width: 704rpx;
 			height: 330rpx;
 			border-radius: 20rpx;
 		}
 	}
-</style>
+	.jj-wrap {
+		width: 693rpx;
+		// height: 100rpx;
+		padding: 49rpx 0 29rpx;
+		border: 3rpx solid #FED888;
+		background: linear-gradient(0deg, #FF9805, #FFB606);
+		border-radius: 35rpx;
+		margin: auto;
+		.jj-tit {
+			margin-bottom: 20rpx;
+			font-size: 44rpx;
+			font-weight: bold;
+			color: #FFFFFF;
+			text-align: center;
+			position: relative;
+			&::before {
+				content: '';
+				position: absolute;
+				bottom: 0;
+				left: 0;
+				right: 0;
+				margin: auto;
+				width: 418rpx;
+				height: 13rpx;
+				background: linear-gradient(0deg, #FFCA4E, #F3F4AB);
+				border-radius: 6rpx;
+			}
+		}
+		
+	}
+	.jj {
+		background-color: #fff;
+		width: 653rpx;
+		margin: auto;
+		border-radius: 20rpx;
+		border: 3px solid #FCE791;
+		padding: 20rpx;
+	}
+	.top-img {
+		width: 750rpx;
+	}
+	.cant {
+		background: #D3D3D3 !important;
+		color: #fff !important;
+	}
+</style>

+ 9 - 4
pages/index/actionList.vue

@@ -2,8 +2,8 @@
 	<view class="content">
 		<view class="" style="height: 1rpx;"></view>
 		<empty v-if="loaded === true && list.length === 0"></empty>
-		<view class="action-wrap" v-for="item in list" >
-			<image src="" mode=""></image>
+		<view class="action-wrap" v-for="item in list" @click="goAction(item)">
+			<image :src="item.pics.split(',')[0]" mode=""></image>
 		</view>
 		<uni-load-more :status="loadingType"></uni-load-more>
 	</view>
@@ -31,7 +31,7 @@
 	
 		},
 		onShow() {
-			// this.getList()
+			this.getList()
 		},
 		onReachBottom() {
 
@@ -40,6 +40,11 @@
 			
 		},
 		methods: {
+			goAction(item) {
+				uni.navigateTo({
+					url:'/pages/index/actionDetail?id=' + item.id
+				})
+			},
 			getList() {
 				let that = this
 				if(that.loadingType == 'loading' || that.loadingType == 'noMore') {
@@ -49,7 +54,7 @@
 					page: that.page,
 					limit: that.limit
 				}).then(res => {
-					let list = res.data.list
+					let list = res.data
 					that.list = that.list.concat(list)
 					that.page++
 					if(list.length == that.limit) {

+ 171 - 0
pages/index/addList.vue

@@ -0,0 +1,171 @@
+<template>
+	<view class="content">
+		<view class="" style="height: 1rpx;"></view>
+		<empty v-if="loaded === true && list.length === 0"></empty>
+		<view v-for="(item, index) in list" :key="index" class="order-item flex">
+			<view class="title-box flex_item">
+				<view class="title-avatar">
+					<image src="../../static/icon/jl-na.png"></image>
+				</view>
+				<view class="list-tpl">
+					<view class="title">
+						<view class="title-name clamp">{{ item.name }}</view>
+					</view>
+					<view class="time">
+						<text>{{item.create_time}}</text>
+					</view>
+				</view>
+				<view class="list-right">
+					<view class="je">
+						金额:{{item.money || '0'}}
+					</view>
+					<view class="">
+						{{item.status == 0?'进行中': (item.status == 1?'待核销':(item.status == 2?'已核销':'失败'))}}
+					</view>
+				</view>
+			</view>
+		</view>
+		<uni-load-more :status="loadingType"></uni-load-more>
+	</view>
+</template>
+
+<script>
+	import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
+	import empty from '@/components/empty';
+	import {getActionList,getAddList} from '@/api/index.js'
+	
+	export default {
+		components: {
+			uniLoadMore,
+			empty
+		},
+		data() {
+			return {
+				page: 1,
+				limit: 10,
+				loadingType: 'more',
+				loaded: false,
+				list: []
+			}
+		},
+		onLoad(opt) {
+	
+		},
+		onShow() {
+			this.getList()
+		},
+		onReachBottom() {
+
+		},
+		onReady() {
+			
+		},
+		methods: {
+			getList() {
+				let that = this
+				getAddList({
+					page: that.page,
+					limit: that.limit
+				}).then(res => {
+					that.list = res.data
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+.order-item {
+		padding: 20rpx 30rpx;
+		line-height: 1.5;
+		background-color: #fff;
+
+		.title-box {
+			width: 100%;
+
+			.title-avatar {
+				flex-shrink: 0;
+				width: 54rpx;
+				height: 54rpx;
+				margin-right: 25rpx;
+				border-radius: 100%;
+
+				image {
+					width: 100%;
+					height: 100%;
+					border-radius: 100%;
+				}
+			}
+			.list-right {
+				text-align: right;
+				flex-shrink: 0;
+				font-size: 22rpx;
+				font-weight: 400;
+				color: #999999;
+				.je {
+					font-size: 28rpx;
+					font-weight: bold;
+					color: #FF4C4C;
+				}
+			}
+			.list-tpl {
+				// width: 85%;
+				flex-grow: 1;
+
+				.title {
+					display: flex;
+					justify-content: flex-start;
+					font-size: $font-lg;
+					color: $font-color-base;
+					overflow: hidden; //超出的文本隐藏
+					text-overflow: ellipsis; //溢出用省略号显示
+					white-space: nowrap;
+					line-height: 1;
+					text-align: center;
+
+					.title-name {
+						max-width: 40%;
+					}
+
+					.dl {
+						margin-left: 10rpx;
+						width: 93rpx;
+						height: 32rpx;
+						border-radius: 16rpx;
+
+						image {
+							width: 93rpx;
+							height: 32rpx;
+							border-radius: 16rpx;
+						}
+					}
+
+					.class {
+						display: inline-block;
+						margin-left: 10rpx;
+						padding: 6rpx;
+						text-align: center;
+						border: 1px solid #2e58ff;
+						border-radius: 16rpx;
+						font-size: 20rpx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #2e58ff;
+					}
+				}
+
+				.time {
+					font-size: $font-lg;
+					color: $font-color-light;
+				}
+			}
+		}
+
+		.money {
+			width: 50%;
+			text-align: right;
+			color: #db1935;
+			font-size: $font-lg;
+		}
+	}
+</style>

+ 0 - 1
pages/user/team.vue

@@ -48,7 +48,6 @@
 			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
 				<scroll-view class="list-scroll-content" :style="{ height: maxheight }" scroll-y>
 					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
-
 					<view v-for="(item, index) in tabItem.orderList" :key="index" class="order-item flex">
 						<view class="title-box flex_item">
 							<view class="title-avatar">

BIN
static/icon/jl-na.png


BIN
static/icon/time.png


BIN
static/icon/write-go.png


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
unpackage/dist/dev/app-plus/app-config-service.js


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 6 - 0
unpackage/dist/dev/app-plus/app-service.js


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 229 - 1
unpackage/dist/dev/app-plus/app-view.js


BIN
unpackage/dist/dev/app-plus/static/icon/jl-na.png


BIN
unpackage/dist/dev/app-plus/static/icon/time.png


BIN
unpackage/dist/dev/app-plus/static/icon/write-go.png


Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott