<script>
	export default {
		onLaunch: function() {

			let that = this
			this.gain()
		},
		onShow: function() {},
		onHide: function() {
			console.log('App Hide');
		},
		methods: {
			gain() {
				// const token = uni.getStorageSync("token");
				// if (!token) return
				this.API.getplie1({
					pageNum: 1,
					pageSize: 80000
				}).then(response => {
					console.log(response, '界桩')
					let box1 = []
					// for (let index = 0; index < response.rows.length; index++) {

					// 	const newlist = response.rows[index];

					// 	let c1 = '四川省眉山市仁寿县' + newlist.boundaryName

					// 	box1.push(c1)
					// }
					for (let i = 0; i < response.rows.length; i++) {
						const newlist = response.rows[i];
						if (i == 0) {
							let c1 = '四川省眉山市仁寿县' + newlist.boundaryName
							box1.push(c1)
						} else {
							let ontrue = false
							for (let q = 0; q < box1.length; q++) {
								if (box1[q] == '四川省眉山市仁寿县' + newlist.boundaryName) {
									ontrue = true
									break
								}
							}
							if (ontrue) {

							} else {
								let c1 = '四川省眉山市仁寿县' + newlist.boundaryName
								box1.push(c1)
							}

						}
					}
					this.globalData.list1 = box1
					console.log('行政', this.globalData.list1)
				})
			}

		},
		globalData: {
			list1: []
		}
	};
</script>

<style lang="scss">
	@import "uview-ui/index.scss";
	/*每个页面公共css */
	@import 'colorui/main.css';

	uni-page-body,
	html,
	body {
		height: 100%;
	}

	body {
		-webkit-text-size-adjust: none;
	}

	/* 超出一行省略号 */
	.one-omit {
		white-space: nowrap;
		/*规定段落中的文本不进行换行*/
		overflow: hidden;
		/*内容会被修剪，并且其余内容是不可见的。*/
		text-overflow: ellipsis;
		/*显示省略号来代表被修剪的文本*/
	}

	.two-omit {
		display: -webkit-box;
		-webkit-line-clamp: 2;
		overflow: hidden;
		text-overflow: ellipsis;
		-webkit-box-orient: vertical;
	}

	img {
		width: 100%;
	}

	/* uni-app中的条件判断语句 */
	/* #ifdef APP-PLUS  || H5 */
	uni-swiper .uni-swiper-dot {
		width: 60rpx;
		height: 6rpx;
		position: relative;
		bottom: 15rpx;
		background-color: #000;
		border-radius: 0;
	}

	uni-swiper .uni-swiper-dot-active {
		width: 60rpx;
		height: 6rpx;
		background-color: #fff;
	}

	uni-swiper .uni-swiper-dots-horizontal .uni-swiper-dot {
		margin-right: 0;
	}

	/* #endif */

	/* #ifdef MP-WEIXIN */
	wx-swiper .wx-swiper-dot {
		width: 60rpx;
		height: 6rpx;
		position: relative;
		bottom: 15rpx;
		border-radius: 0;
		background-color: #000;
	}

	wx-swiper .wx-swiper-dot-active {
		width: 60rpx;
		height: 6rpx;
		background-color: #fff;
	}

	wx-swiper .wx-swiper-dots-horizontal .wx-swiper-dot {
		margin-right: 0;
	}

	/* #endif */
</style>