data.vue
4.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
<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>