Ver Fonte

团队成员等静态页完成

htc há 1 dia atrás
pai
commit
e6307c78b0
4 ficheiros alterados com 319 adições e 1 exclusões
  1. 12 0
      pages.json
  2. 1 1
      pages/my.vue
  3. 175 0
      pagesMy/teamUser.vue
  4. 131 0
      pagesMy/teamUserDetail.vue

+ 12 - 0
pages.json

@@ -182,6 +182,18 @@
 					"style": {
 						"navigationStyle": "custom"
 					}
+				},
+				{
+					"path": "teamUser",
+					"style": {
+						"navigationStyle": "custom"
+					}
+				},
+				{
+					"path": "teamUserDetail",
+					"style": {
+						"navigationStyle": "custom"
+					}
 				}
 			]
 		}

+ 1 - 1
pages/my.vue

@@ -79,7 +79,7 @@
 					{
 						img:this.$imgBase+'my_teamusers.png',
 						title:'团队成员',
-						path:''
+						path:'/pagesMy/teamUser'
 					},
 					{
 						img:this.$imgBase+'my_friends.png',

+ 175 - 0
pagesMy/teamUser.vue

@@ -0,0 +1,175 @@
+<template>
+	<view class="default_page adffc" :style="{'min-height':h+'px', 'padding-top':mt+'px'}">
+		<cus-header title='团队成员'></cus-header>
+		<view class="add" @click="handleAdd">+ 添加</view>
+		<view class="list">
+			<u-swipe-action>
+				<u-swipe-action-item   v-for="(item, index) in list" :key="index"
+				  :options="options" @click="e=>deleteUser(item,e)" :ref="'swipeAction' + index" :threshold="5"
+				>
+					<view class="swipe-action u-border-top u-border-bottom">
+						<view class="swipe-action__content">
+							<view class="lbox adfac">
+								<template v-if="type">
+									<image class="lbox-select" v-if="item.select" :src="imgBase+'selected.png'"></image>
+									<image class="lbox-select" v-else :src="imgBase+'not_select.png'"></image>
+								</template>
+								<view class="lbox-info">
+									<view class="lbox-info-top adfac">
+										<text>{{'吴一可'}}</text>
+										<view class="type">{{'赞助人Sponsor'}}</view>
+									</view>
+									<view class="lbox-info-email">{{'123456789@qq.com'}}</view>
+								</view>
+								<view class="lbox-edit" @click="handleEdit(item)">
+									<u-icon name="edit-pen" size="42rpx" color="#B9B9B9"></u-icon>
+								</view>
+							</view>
+						</view>
+					</view>
+				</u-swipe-action-item>
+			</u-swipe-action>
+		</view>
+		<view class="btn" v-if="type">确定</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data(){
+			return {
+				type:'',
+				list:[1,1,1,1],
+				options: [
+					{
+						text: '删除',
+						icon: 'trash',
+						iconSize:'32rpx',
+						style: {
+							backgroundColor: '#f56c6c'
+						}
+					}
+				],
+			}
+		},
+		onLoad(options) {
+			this.type = options.type
+		},
+		methods:{
+			scrolltolower(){
+				
+			},
+			deleteUser(item,index){
+				this.list.forEach((d, i) => {
+					this.$refs['swipeAction' + i][0].closeHandler();
+				})
+			},
+			handleAdd(){
+				uni.navigateTo({
+					url:'/pagesMy/teamUserDetail'
+				})
+			},
+			handleEdit(item){
+				uni.navigateTo({
+					url:'/pagesMy/teamUserDetail?user='+encodeURIComponent(JSON.stringify(item))
+				})
+			},
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	::v-deep .u-swipe-action-item{
+		margin-top: 20rpx;
+	}
+	::v-deep .swipe-action{
+		border: none !important;
+	}
+	
+	.default_page{
+		padding: 0 24rpx;
+		box-sizing: border-box;
+		.add{
+			width: calc(100% - 52rpx);
+			height: 88rpx;
+			background: #FFFFFF;
+			border-radius: 44rpx;
+			border: 1rpx solid #33A7A7;
+			margin: 30rpx 26rpx 0;
+			font-family: PingFang-SC, PingFang-SC;
+			font-weight: bold;
+			font-size: 32rpx;
+			color: #009191;
+			line-height: 88rpx;
+			text-align: center;
+		}
+		
+		.list{
+			flex: 1;
+			overflow-y: auto;
+			margin-top: 20rpx;
+			.lbox{
+				background: #FFFFFF;
+				box-shadow: inset 0rpx -1rpx 0rpx 0rpx rgba(229,231,235,0.5);
+				border-radius: 24rpx;
+				padding: 36rpx 24rpx 40rpx;
+				margin-top: 20rpx;
+				&-select{
+					width: 36rpx;
+					height: 36rpx;
+					margin-right: 24rpx;
+				}
+				&-info{
+					flex: 1;
+					&-top{
+						text{
+							font-family: PingFang-SC, PingFang-SC;
+							font-weight: bold;
+							font-size: 32rpx;
+							color: #002846;
+							line-height: 32rpx;
+						}
+						.type{
+							background: rgba(173,120,166,0.1);
+							border-radius: 21rpx;
+							padding: 6rpx 16rpx;
+							font-family: PingFangSC, PingFang SC;
+							font-weight: 400;
+							font-size: 22rpx;
+							color: #AD78A6;
+							line-height: 30rpx;
+							margin-left: 20rpx;
+						}
+					}
+					&-email{
+						font-family: PingFangSC, PingFang SC;
+						font-weight: 400;
+						font-size: 28rpx;
+						color: #666666;
+						line-height: 28rpx;
+						margin-top: 30rpx;
+					}
+				}
+				&-edit{
+					width: 30rpx;
+					height: 30rpx;
+				}
+			}
+		}
+		
+		.btn{
+			width: calc(100% - 52rpx);
+			height: 88rpx;
+			background: linear-gradient( 90deg, #33A7A7 0%, #64BBBB 100%);
+			border-radius: 44rpx;
+			font-family: PingFang-SC, PingFang-SC;
+			font-weight: bold;
+			font-size: 32rpx;
+			color: #FFFFFF;
+			line-height: 88rpx;
+			text-align: center;
+			letter-spacing: 2rpx;
+			margin: 40rpx 26rpx 54rpx;
+		}
+	}
+</style>

+ 131 - 0
pagesMy/teamUserDetail.vue

@@ -0,0 +1,131 @@
+<template>
+	<view class="default_page" :style="{'min-height':h+'px', 'padding-top':mt+'px'}">
+		<cus-header :title='title'></cus-header>
+		<view class="form">
+			<view class="form-item adfacjb">
+				<view class="form-item-left">姓名</view>
+				<view class="form-item-right">
+					<u-input v-model="userInfo.name" placeholder="请输入被教练团队人员姓名" border="none" style="font-size: 28rpx;color: #B3BFC8;line-height: 28rpx;" inputAlign="right"></u-input>
+				</view>
+			</view>
+			<view class="form-item adfacjb">
+				<view class="form-item-left">手机号码</view>
+				<view class="form-item-right">
+					<u-input v-model="userInfo.phone" placeholder="请输入手机号码" border="none" style="font-size: 28rpx;color: #B3BFC8;line-height: 28rpx;" inputAlign="right"></u-input>
+				</view>
+			</view>
+			<view class="form-item adfacjb">
+				<view class="form-item-left">邮箱</view>
+				<view class="form-item-right">
+					<u-input v-model="userInfo.email" placeholder="请输入邮箱" border="none" style="font-size: 28rpx;color: #B3BFC8;line-height: 28rpx;" inputAlign="right"></u-input>
+				</view>
+			</view>
+		</view>
+		<view class="type adfacjb" @click="typeShow=true">
+			<view class="type-left">团队人员身份类型</view>
+			<view class="type-right adfac">
+				<text>{{typeText}}</text>
+				<image :src="imgBase+'my_arrow_right.png'"></image>
+			</view>
+		</view>
+		<view class="zt_btn">确定</view>
+		<u-picker :itemHeight="88" :immediateChange="true" :show="typeShow" :columns="typeData" title="成员身份类型"
+			@cancel="typeShow=false" @confirm="typeConfirm" keyName="name" ></u-picker>
+	</view>
+</template>
+
+<script>
+	export default {
+		data(){
+			return {
+				title:'团队成员',
+				userInfo:{
+					name:'',
+					phone:'',
+					email:'',
+					type:''
+				},
+				typeText:'请选择',
+				typeShow:false,
+				typeData:[[
+					{id:1,name:'团队Leader'},
+					{id:2,name:'团队成员Member'},
+					{id:3,name:'利益相关者Stakeholder'},
+					{id:4,name:'赞助人Sponsor'}
+				]],
+			}
+		},
+		onLoad(options) {
+			if(options.user){
+				this.userInfo = JSON.parse(decodeURIComponent(options.user))
+				this.title = '编辑成员'
+			} 
+		},
+		methods:{
+			typeConfirm(e){
+				this.typeShow = false;
+			}
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.default_page{
+		padding: 0 24rpx 54rpx;
+		box-sizing: border-box;
+		background: #F7F7F7;
+		
+		.form{
+			background: #FFFFFF;
+			border-radius: 24rpx 24rpx 0rpx 0rpx;
+			margin-top: 20rpx;
+			&-item{
+				box-shadow: inset 0rpx -1rpx 0rpx 0rpx #EFEFEF;
+				padding: 28rpx 24rpx;
+				&-left{
+					font-family: PingFangSC, PingFang SC;
+					font-weight: 400;
+					font-size: 30rpx;
+					color: #002846;
+					line-height: 42rpx;
+				}
+			}
+		}
+		
+		.type{
+			background: #FFFFFF;
+			box-shadow: inset 0rpx -1rpx 0rpx 0rpx rgba(229,231,235,0.5);
+			border-radius: 24rpx;
+			margin-top: 20rpx;
+			padding: 28rpx 24rpx;
+			&-left{
+				font-family: PingFangSC, PingFang SC;
+				font-weight: 400;
+				font-size: 30rpx;
+				color: #002846;
+				line-height: 42rpx;
+			}
+			&-right{
+				text{
+					font-family: PingFangSC, PingFang SC;
+					font-weight: 400;
+					font-size: 28rpx;
+					color: #B3BFC8;
+					line-height: 40rpx;
+				}
+				image{
+					width: 30rpx;
+					height: 30rpx;
+					box-sizing: border-box;
+				}
+			}
+		}
+		
+		.zt_btn{
+			width: calc(100% - 100rpx);
+			position: fixed;
+			left: 50rpx;
+			bottom: 54px;
+		}
+	}
+</style>