index.vue 2.51 KB
<template>
	<view>
		<u-navbar v-if="!takeStatus" :is-back="false" :title-size="26" title-color="#000" title="我的"></u-navbar>
		<view v-if="!takeStatus">
			<view class="u-flex user-box u-p-l-30 u-p-r-20 u-p-b-30">
				<view class="u-m-r-10">
					<u-avatar :src="pic" size="140"></u-avatar>
				</view>
				<view class="u-flex-1">
					<view class="u-font-18 u-p-b-20">uView ui</view>
					<view class="u-font-14 u-tips-color">微信号:helang_uView</view>
				</view>
			</view>
			
			<view class="u-m-t-20">
				<u-cell-group>
					<u-cell-item v-for="(item, index) in items" :title="item.title" :value="item.value" :key="index">
						<u-icon slot="icon" size="32" name="search"></u-icon>
					</u-cell-item>
				</u-cell-group>
			</view>
			
			<view class="u-m-t-20">
				<u-cell-group>
					<u-cell-item icon="setting" title="设置"></u-cell-item>
				</u-cell-group>
			</view>
			<view class="u-m-t-20" @click="take">
				<u-cell-group>
					<u-cell-item icon="setting" title="相机组件测试"></u-cell-item>
				</u-cell-group>
			</view>
		</view>
		<take-photo v-if="takeStatus" :currentItem="testData" @close="closeTake"></take-photo>
	</view>
</template>

<script>
	import takePhoto from '@/components/take/index.vue'
	export default {
		components: {
			'take-photo': takePhoto
		},
		data() {
			return {
				pic:'https://uviewui.com/common/logo.png',
				show:true,
				takeStatus: false,
				testData: {
					_id: '1', // 规格ID
					system_id: '2', // 系统ID
					brand_id: '3', // 品牌ID
					classify_id: '4', // 分类ID	
					images: [ // 拍照要求示意图
						'https://qn-static.banshouhui.com/live_mark.png',
						'https://qn-static.banshouhui.com/live_mark.png',
						'https://qn-static.banshouhui.com/live_mark.png'
					],
					main_point: [] // 要点
				}
			}
		},
		computed: {
			items() {
				return [
				{title: '我的钱包', value: '', icon: ''},
				 {title: '我的质保金', value: '', icon: ''},
				 {title: '我的合同', value: '', icon: ''},
				 {title: '我的证件', value: '', icon: ''},
				 {title: '我的收货地址', value: '', icon: ''},
				 {title: '我的仓库', value: '', icon: ''},
				 {title: '联系客服', value: '6666666', icon: ''}]
			}
		},
		onLoad() {
			
		},
		methods: {
			take() {
				uni.hideTabBar()
				this.takeStatus = true
			},
			closeTake(img) {
				console.log(img)
				this.takeStatus = false
			}
		}
	}
</script>

<style lang="scss" scoped>

</style>