detail.vue 2.03 KB
<template>
	<view>
		<!-- 机构会员 -->
		<view class="wBox">
			<!-- 成员 -->
			<view class="userlist">
				<view class="item" v-for="n in list">
					<view class="photobox">
						<view class="colorful">{{n.name?.slice(0,1)}}</view>
					</view>
					<view>
						<view class="name">{{n.name}}

							<text v-if="n.sex == 1">(女)</text>
							<text v-else>(男)</text>


						</view>
						<!-- 						<view class="date">{{n.ancestorNameList[0]}} {{ n.ancestorNameList[1] }}
							{{n.ancestorNameList[2]}}</view> -->
						<view class="date">
							注册时间 {{n.createTime }}
						</view>
					</view>
					<view class="nian">
						<text v-if="n.perType==1"> 个人</text>
						<text v-if="n.perType==2"> 教练</text>
						<text v-if="n.perType==3"> 考官</text>
						<text v-if="n.perType==4"> 裁判</text>
						<text v-if="n.perType==5">临时</text>
					</view>
				</view>
			</view>
				<view class="nodata" v-if="list.length==0">
					<image mode="aspectFit" src="/static/nodata.png"></image>
					<text>暂无会员</text>
				</view>
		</view>
	</view>
</template>

<script setup>
	import * as api from '@/common/api.js'
	import config from '@/config.js'
	import {
		ref,
		getCurrentInstance
	} from 'vue'
	import {
		onLoad
	} from '@dcloudio/uni-app'
	const {
		proxy
	} = getCurrentInstance()
	const app = getApp();
	const query = ref({
		sonDeptId: 1,
		perType: '1'
	})
	const list = ref([])
	const forms = ref({})
	const total = ref(0)
	const current = ref(0)
	const currentTabName = ref('道馆')
	const userType = ref('')
	const deptType = ref('')
	onLoad((option) => {
		query.value.sonDeptId = option.deptId
		getList()
	})

	function getList() {
		uni.showLoading({
			title:"加载中"
		})
		api.selectPageList(query.value).then(res => {
			uni.hideLoading()
			list.value = res.rows
			total.value = res.total
		})
	}
</script>

<style lang="scss" scoped>
	.nian {
		position: absolute;
		right: 20rpx;
		font-size: 26rpx;
		color: #999;
	}
</style>