liuYb 6 年之前
父节点
当前提交
46bf34d708
共有 1 个文件被更改,包括 55 次插入65 次删除
  1. 55 65
      pages/index/index.vue

+ 55 - 65
pages/index/index.vue

@@ -123,7 +123,7 @@
 			</div>
 		</div>
  -->
-		<uni-popup :show="welcome" :type="type" :custom="true" :mask-click="false" @change="change">
+		<uni-popup :show="welcome" :type="type" :custom="true" :mask-click="false">
 			<view class="uni-tip-wel">
 				<image src="../../static/home_ic_college@2x.png" mode="widthFix" style="width: 300upx;height: 300upx;margin: 40upx auto 0;"></image>
 				<view class="uni-tip-wel-content"> 欢迎来到山东志愿帮~</view>
@@ -133,7 +133,7 @@
 			</view>
 		</uni-popup>
 
-		<uni-popup :show="show" :type="type" :custom="true" :mask-click="false" @change="change">
+		<!-- <uni-popup :show="show" :type="type" :custom="true" :mask-click="false" @change="change">
 			<view class="uni-tip">
 				<view class="uni-tip-title">微信授权</view>
 				<view class="uni-tip-image">
@@ -153,32 +153,32 @@
 					<view class="uni-tip-button" @tap="cancel('tip'),changeGrade()">允许</view>
 				</view>
 			</view>
-		</uni-popup>
+		</uni-popup> -->
 
-		<uni-popup :show="grade" ref="get-grade" :type="type" :custom="true" :mask-click="false" @change="change">
+		<uni-popup :show="grade" ref="get-grade" :type="type" :custom="true" :mask-click="false">
 			<view class="get-grade">
 				<view class="get-grade-title">输入分数,获取适合你的学校、专业和志愿预测</view>
 				<view class="get-grade-content1">
 					<view class="i-picker-two">
-						<picker @change="change" :index="value" :range="wenliArr">
+						<picker @change="change" :range="wenliArr">
 							<view>{{ wenliArr[index] }}</view>
 						</picker>
 						<image src="../../static/pop_arrow_nor(4).png" mode="widthFix"></image>
 					</view>
 					
-					<picker class='i-picker-two' mode="" @tap="Choosecity()">
+					<picker class='i-picker-two' mode="">
 						<view>{{regionTxt}}</view>
 						<image src="../../static/pop_arrow_nor(4).png" mode="widthFix"></image>
 					</picker>
 				</view>
 				<view class="get-grade-content2">
-					<input type="number"  :value="pwdd" placeholder="输入预估分数"   @click='switchKeyboard(3)' />
-					<input type="number"  :value="pwddd" placeholder="输入位次(选填" @click='switchKeyboard(6)' />
+					<input type="number"   placeholder="输入预估分数"   />
+					<input type="number"   placeholder="输入位次(选填" />
 					
-					<tui-keyboard :show="show" @close="closeKeyboard" @click="keyboardClick">
+					<!-- <tui-keyboard :show="show" @close="closeKeyboard" @click="keyboardClick">
 						<view class="tui-digital-box">
 						</view>
-					</tui-keyboard>
+					</tui-keyboard> -->
 				</view>
 				<view class="uni-get-grade-button" @tap="changeGrade()">
 					<view class="get-grade-button">立即获取</view>
@@ -186,7 +186,7 @@
 			</view>
 		</uni-popup>
 
-		<uni-popup :show="wenli" :type="type" :custom="true" :mask-click="false">
+	<!-- 	<uni-popup :show="wenli" :type="type" :custom="true" :mask-click="false">
 			<view class="getwenli">
 				<view class="wenlitext">
 					<scroll-view scroll-y @tap="fenwenli(),Choosewenli()" v-for="(item,index) in wenliArr" :data-index="index" :key="index">
@@ -194,9 +194,9 @@
 					</scroll-view>
 				</view>
 			</view>
-		</uni-popup>
+		</uni-popup> -->
 
-		<uni-popup :show="citychoose" ref="city" :type="type" :custom="true" :mask-click="false" @change="change">
+		<!-- <uni-popup :show="citychoose" ref="city" :type="type" :custom="true" :mask-click="false" @change="change">
 			<view class="region-box">
 				<view class="region-txt" :class="[index == regionArr.length - 3 || index 
 						== regionArr.length - 2 || index 
@@ -206,7 +206,7 @@
 					<text @tap="Choosecity()"> {{ item }}</text>
 				</view>
 			</view>
-		</uni-popup>
+		</uni-popup> -->
 	</view>
 </template>
 
@@ -234,6 +234,7 @@
 			},
 		data() {
 			return {
+				value:"",
 				index: 0,
 				labelArray: [],
 				valueArr: [],
@@ -280,48 +281,47 @@
 			console.log('onload');
 			this.welcome = true;
 		},
-		mounted() {
-			console.log('mounted');
-			this.options.forEach(v => {
-						this.labelArray.push(v['label'])
-						this.valueArr.push(v['value'])
-					})
-			this.index = this.valueArr.findIndex(val => val === this.value)
-		},
+		// mounted() {
+		// 	console.log('mounted');
+		// 	this.options.forEach(v => {
+		// 				this.labelArray.push(v['label'])
+		// 				this.valueArr.push(v['value'])
+		// 			})
+		// 	this.index = this.valueArr.findIndex(val => val === this.value)
+		// },
 		methods: {
-			switchKeyboard(index) {
-				let length = index; //e.currentTarget.dataset.length;
-				let arr = ["", "", "", "", "", ""]
-				if (length == 3) {
-					arr = ["", "", ""]
-				}
-				this.pwdArr = arr;
-				this.temp = arr;
-				this.numberArr = [];
-				this.show = true
-			},
-			closeKeyboard: function() {
-				this.show = false;
-				this.numberArr = [];
-				this.pwdArr = this.temp;
-			},
-			getPwd: function() {
-				//判断并取出密码
-				if (this.numberArr.length === this.pwdArr.length) {
-					// uni.showLoading({
-					// 	title: '模拟提交...',
-					// 	mask: true
-					// })
-					setTimeout(() => {
-						let pwd = this.numberArr.join('')
-						this.closeKeyboard();
-						this.tui.toast("您输入的密码为:" + pwd);
-					}, 800);
-				}
-			},
+			// switchKeyboard(index) {
+			// 	let length = index; //e.currentTarget.dataset.length;
+			// 	let arr = ["", "", "", "", "", ""]
+			// 	if (length == 3) {
+			// 		arr = ["", "", ""]
+			// 	}
+			// 	this.pwdArr = arr;
+			// 	this.temp = arr;
+			// 	this.numberArr = [];
+			// 	this.show = true
+			// },
+			// closeKeyboard: function() {
+			// 	this.show = false;
+			// 	this.numberArr = [];
+			// 	this.pwdArr = this.temp;
+			// },
+			// getPwd: function() {
+			// 	//判断并取出密码
+			// 	if (this.numberArr.length === this.pwdArr.length) {
+			// 		// uni.showLoading({
+			// 		// 	title: '模拟提交...',
+			// 		// 	mask: true
+			// 		// })
+			// 		setTimeout(() => {
+			// 			let pwd = this.numberArr.join('')
+			// 			this.closeKeyboard();
+			// 			// this.tui.toast("您输入的密码为:" + pwd);
+			// 		}, 800);
+			// 	}
+			// },
 			keyboardClick: function(e) {
 				let numberArr = this.numberArr;
-				console.log(numberArr);
 				let pwdArr = this.pwdArr;
 				let index = e.index;
 				if (numberArr.length === pwdArr.length || index == undefined) {
@@ -350,11 +350,10 @@
 				this.pwdArr = pwdArr;
 				this.pwdd = this.numberArr.join('');
 				this.pwddd = this.numberArr.join('');
-				this.getPwd()
+				// this.getPwd()
 			},
 			showModal: function() {
 				// 显示遮罩层
-				// 创建动画实例
 				let animation = uni.createAnimation({
 					duration: 200,
 					timingFunction: 'linear',
@@ -370,8 +369,6 @@
 					}.bind(this),
 					200
 				);
-
-				console.log('showModal');
 			},
 			hideModal: function() {
 				this.showModalStatus = false;
@@ -381,15 +378,10 @@
 				this.regionTxt = this.regionArr[index];
 				this.tabIndex = index;
 				this.showModalStatus = false;
-				// this.tui.toast('您选择了:' + this.regionArr[index]);
 
 			},
 			fenwenli: function(event) {
-				console.log(event);
-				// const index = e.currentTarget.dataset.index;
-
 				this.wenliContent = this.wenliArr[index];
-				// console.log(this.wenliArr[index])
 			},
 			togglePopup(type, open) {
 				this.type = type;
@@ -409,14 +401,12 @@
 			change(e) {
 				console.log(e);
 				this.index=e.detail.value;
-				// this.$emit('input', this.valueArr[e.target.value]);
-				
 			},
 			changeGrade() {
 				this.grade = !this.grade;
 			},
 			opennext(){
-				this.show = !this.show;
+				// this.show = !this.show;
 				this.welcome = !this.welcome;
 			},
 			Choosecity() {