113 lines
		
	
	
		
			2.4 KiB
		
	
	
	
		
			Python
		
	
	
	
			
		
		
	
	
			113 lines
		
	
	
		
			2.4 KiB
		
	
	
	
		
			Python
		
	
	
	
<template>
 | 
						|
	<view class="wrap">
 | 
						|
		<u-swiper @change="change" :height="250" :list="swiper_list" :title="title" :effect3d="effect3d" :indicator-pos="indicatorPos"
 | 
						|
		 :mode="mode" :interval="3000" @click="click"></u-swiper>
 | 
						|
		<u-cell-group title-bg-color="rgb(243, 244, 246)" :title="item.groupName" v-for="(item, index) in list" :key="index">
 | 
						|
			<u-cell-item :titleStyle="{fontWeight: 500}" @click="openPage(item1.path)" :title="item1.title" v-for="(item1, index1) in item.list"
 | 
						|
			 :key="index1">
 | 
						|
				<image slot="icon" class="u-cell-icon" :src="getIcon(item1.icon)" mode="widthFix"></image>
 | 
						|
			</u-cell-item>
 | 
						|
		</u-cell-group>
 | 
						|
 | 
						|
	</view>
 | 
						|
</template>
 | 
						|
 | 
						|
<script>
 | 
						|
	export default {
 | 
						|
		data() {
 | 
						|
			return {
 | 
						|
				swiper_list: [{
 | 
						|
						image: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
 | 
						|
						title: '昨夜星辰昨夜风,画楼西畔桂堂东'
 | 
						|
					},
 | 
						|
					{
 | 
						|
						image: 'https://cdn.uviewui.com/uview/swiper/2.jpg',
 | 
						|
						title: '身无彩凤双飞翼,心有灵犀一点通'
 | 
						|
					},
 | 
						|
					{
 | 
						|
						image: 'https://cdn.uviewui.com/uview/swiper/3.jpg',
 | 
						|
						title: '谁念西风独自凉,萧萧黄叶闭疏窗,沉思往事立残阳'
 | 
						|
					}
 | 
						|
				],
 | 
						|
				title: false,
 | 
						|
				mode: 'round',
 | 
						|
				indicatorPos: 'bottomCenter',
 | 
						|
				effect3d: true,
 | 
						|
				test: '',
 | 
						|
				list: [{
 | 
						|
						groupName: '个人辐射信息',
 | 
						|
						list: [{
 | 
						|
							path: '/pages/example/components',
 | 
						|
							icon: 'color',
 | 
						|
							title: '个人培训记录',
 | 
						|
						},
 | 
						|
						{
 | 
						|
							path: '/pages/example/components',
 | 
						|
							icon: 'color',
 | 
						|
							title: '个人剂量检测',
 | 
						|
						}]
 | 
						|
					},
 | 
						|
					{
 | 
						|
						groupName: '单位辐射信息',
 | 
						|
						list: [{
 | 
						|
							path: '/pages/example/js',
 | 
						|
							icon: 'color',
 | 
						|
							title: '员工台账',
 | 
						|
						},
 | 
						|
						{
 | 
						|
							path: '/pages/example/components',
 | 
						|
							icon: 'color',
 | 
						|
							title: '放射源台账',
 | 
						|
						}]
 | 
						|
					}
 | 
						|
				]
 | 
						|
			}
 | 
						|
		},
 | 
						|
		computed: {
 | 
						|
			getIcon() {
 | 
						|
				return path => {
 | 
						|
					return 'https://cdn.uviewui.com/uview/example/' + path + '.png';
 | 
						|
				}
 | 
						|
			},
 | 
						|
		},
 | 
						|
		onLoad() {
 | 
						|
 | 
						|
		},
 | 
						|
		onShow() {
 | 
						|
			this.getUserInfo();
 | 
						|
		},
 | 
						|
		methods: {
 | 
						|
			getUserInfo() {
 | 
						|
				this.$u.api.getUserInfo().then(res => {
 | 
						|
					
 | 
						|
				}).catch(e=>{})
 | 
						|
			},
 | 
						|
			openPage(path) {
 | 
						|
				this.$u.route({
 | 
						|
					url: path
 | 
						|
				})
 | 
						|
			},
 | 
						|
			change() {
 | 
						|
 | 
						|
			},
 | 
						|
			click() {
 | 
						|
 | 
						|
			}
 | 
						|
		}
 | 
						|
	}
 | 
						|
</script>
 | 
						|
 | 
						|
<style>
 | 
						|
	page {
 | 
						|
		background-color: #ededed;
 | 
						|
	}
 | 
						|
</style>
 | 
						|
 | 
						|
<style lang="scss" scoped>
 | 
						|
	.u-cell-icon {
 | 
						|
		width: 36rpx;
 | 
						|
		height: 36rpx;
 | 
						|
		margin-right: 8rpx;
 | 
						|
	}
 | 
						|
</style>
 |