<template>
	<mobile-frame>
		<view class="main">
			系统首页

			<uni-forms ref="form" :rules="rules" :model="form" label-width="auto">
				<uni-forms-item label="test" name="num">
					<uni-easyinput type="digit" v-model="form.num" @input="toInput" aceholder="请输入内容"></uni-easyinput>
				</uni-forms-item>
			</uni-forms>
		</view>
	</mobile-frame>
</template>

<script>
	export default {
		components: {},
		data() {
			return {
				form: {},
				rules: {}
			};
		},
		onLoad: function() {},
		onShow: function() {
			const that = this;
			that.search();
		},
		methods: {
			toInput(value) {
				if (value > 10) {
					uni.showToast({
						title: '可以'
					})
				} else {
					uni.showToast({
						title: '不可以'
					})
				}
			},
			search() {
				// 查询当前所在平台
				uni.getSystemInfo({
					success: async function(res) {
						uni.setStorage({
							key: 'system',
							data: res,
							success: function() {
								uni.redirectTo({
									// url: `/pages/home/index`
									// url: `/pagesMy/order/info`
								})
							}
						});
					}
				});
			},
		}
	}
</script>

<style lang="scss">
</style>
