data.vue 4.61 KB
<template>
	<view class="page">
		<view class="listBox">
			<web-view src="http://deyanggaoxin.fengshiyun.com/admin.html#/loginApp"></web-view>
		</view>
		<!-- 单行文本弹出层 http://192.168.0.134:3000/#/quicklogin?admin=1-->	
	</view>
</template>

<script>
	export default {
		data() {
			return {
				OrderType: 0,
				nvConfig: {
					title: "填写基本信息",
					bgColor: "#ffffff",
					color: "#000000",
					fixedAssist: {
						hide: true,
					},
				},
				// // 单行文本名字
				// dan_name: '',
				// // 多行文本名字
				// duo_name: '',
				// // radio输入数据存放
				// radio_name: '',
				// radio_select: '',
				// // 下拉框
				// select_name: '',
				// select_select: '',
				// // 添加在页面的表单元素
				// forms: []
				
				
				// 存放用户账号和密码
				userInfo:{
					account:'',
					password:''
				}
			};
		},
		computed: {

		},
		// onPageScroll(e) {
		// 	this.$refs.nv.pageScroll(e)
		// },
		computed: {
			pageTop() {
				return parseInt(88 * uni.getSystemInfoSync().windowWidth / 750) + uni.getSystemInfoSync().statusBarHeight
			}
		},
		onLoad(params) {
			this.getUser()
			this.OrderType = params.type;
		},
		onBackPress(options) {
			// if (options.from === 'navigateBack') {
			// 	return false;
			// }
			// 这里使用重定向比较好,不信可以自己多试几种,其余跳转方法在文章底部哦
			uni.redirectTo({ 
				url: '/pages/datain/datain'
			})
			return false;
		},
		methods: {
			// 获取用户信息
			getUser(){
				if (uni.getStorageSync('user')) {
					this.userCode = uni.getStorageSync('user').data.user.userInfo
					this.userInfo = this.userCode.userAccount
					this.userInfo = '123456'
					console.log("用户的code", this.userCode)
				} else {
					uni.showToast({
						title: '请登录',
						icon: 'none'
					})
					setTimeout(() => {
						uni.reLaunch({
							url: '/pages/login/index'
						})
					})
				}
			},
			// // 添加单行文本
			// show_dan() {
			// 	let that = this
			// 	this.$refs.popup_dan.open()
			// },
			// // 添加单行文本表单元素
			// dan_push() {
			// 	let that = this
			// 	that.forms.push({
			// 		type: 'text',
			// 		name: that.dan_name,
			// 		value: ''
			// 	})
			// 	this.$refs.popup_dan.close()
			// },
			// // 添加多行文本
			// show_duo() {
			// 	let that = this
			// 	this.$refs.popup_duo.open()
			// },
			// // 添加多行文本表单元素
			// duo_push() {
			// 	let that = this
			// 	that.forms.push({
			// 		type: 'textarea',
			// 		name: that.duo_name,
			// 		value: ''
			// 	})
			// 	this.$refs.popup_duo.close()
			// },

			// // 单选按钮
			// // 显示单选按钮弹出层
			// show_radio() {
			// 	this.$refs.popup_radio.open()
			// },
			// radioChange: function(evt) {
			// 	let that = this

			// 	for (let i = 0; i < this.radio_select.length; i++) {
			// 		if (this.radio_select[i] === evt.detail) {
			// 			this.current = i;
			// 			break;
			// 		}
			// 	}
			// },
			// tranField(i, it) {
			// 	let that = this
			// 	console.log(that.forms[i])
			// 	that.forms[i].value = it
			// },
			// // 
			// radio_push() {
			// 	let that = this
			// 	that.radio_select = that.radio_select.split(',')
			// 	console.log(that.radio_select)
			// 	that.forms.push({
			// 		type: 'radio',
			// 		name: that.radio_name,
			// 		radios: that.radio_select,
			// 		value: ''
			// 	})
			// 	this.$refs.popup_radio.close()
			// },

			// // 下拉框方法
			// show_select() {
			// 	this.$refs.popup_select.open()
			// },
			// // 下拉框选中值
			// bindPickerChange(e) {
			// 	console.log('picker发送选择改变,携带值为', e.detail.value)
			// 	this.index = e.detail.value
			// },
			// select_push() {
			// 	let that = this
			// 	that.select_select = that.select_select.split(',')
			// 	that.select_select = that.select_select.map(it =>{
			// 		return {
			// 			text:it,
			// 			value:it,
			// 			disable:false
			// 		}
			// 	})
			// 	console.log(that.select_select)
			// 	that.forms.push({
			// 		type: 'select',
			// 		name: that.select_name,
			// 		index: 0,
			// 		select: that.select_select,
			// 		value: ''
			// 	})
			// 	this.$refs.popup_select.close()
			// },
			// change(e) {
			// 	console.log("e:", e);
				
			// },
			// // 删除表单字段
			// removeField(index) {
			// 	this.forms.splice(index, 1);
			// },
			// // 提交
			// submitForm() {
			// 	console.log(this.forms)
			// },
			// funeralreportmove() {
			// 	uni.navigateTo({
			// 		url: '/pages/funeralreportmove/funeralreportmove',
			// 	})
			// },
		}
	}
</script>

<style scoped lang="scss">
	@import 'data.scss';
</style>