Blame view

App.vue 4.45 KB
1f3f2378   起风了   我的第一次
1
  <script>

4325c47c   李宇   1
2
  	import service from '@/service/service.js'

1f3f2378   起风了   我的第一次
3
4
5
6
  	export default {

  		onLaunch: function() {

  

  			let that = this

4325c47c   李宇   1
7
8
9
10
  			// if(!service.getUser()){

  			// 	uni.navigateTo({

  			// 		url: "/pages/login/login"

  			// 	})

c9dfa49c   李宇   1
11
  			// 	return 

4325c47c   李宇   1
12
  			// }

c9dfa49c   李宇   1
13
  			this.gain()  

1f3f2378   起风了   我的第一次
14
15
16
17
18
19
20
21
22
  		},

  		onShow: function() {},

  		onHide: function() {

  			console.log('App Hide');

  		},

  		methods: {

  			gain() {

  				// const token = uni.getStorageSync("token");

  				// if (!token) return

c9dfa49c   李宇   1
23
24
25
26
27
28
29
  				// this.API.getplie1({

  				// 	pageNum: 1,

  				// 	pageSize: 80000

  				// }).then(response => {

  				// 	console.log(response, '界桩')

  				// 	let box1 = []

  				// 	// for (let index = 0; index < response.rows.length; index++) {

1f3f2378   起风了   我的第一次
30
  

c9dfa49c   李宇   1
31
  				// 	// 	const newlist = response.rows[index];

1f3f2378   起风了   我的第一次
32
  

c9dfa49c   李宇   1
33
  				// 	// 	let c1 = '四川省眉山市仁寿县' + newlist.boundaryName

1f3f2378   起风了   我的第一次
34
  

c9dfa49c   李宇   1
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
  				// 	// 	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) {

1f3f2378   起风了   我的第一次
51
  

c9dfa49c   李宇   1
52
53
54
55
  				// 			} else {

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

  				// 				box1.push(c1)

  				// 			}

1f3f2378   起风了   我的第一次
56
  

c9dfa49c   李宇   1
57
58
59
60
61
62
  				// 		}

  				// 	}

  				// 	this.globalData.list1 = box1

  				// 	console.log('行政', this.globalData.list1)

  				// }) 

  				this.globalData.list1  = ["四川省眉山市仁寿县慈航镇", "四川省眉山市仁寿县北斗镇", "四川省眉山市仁寿县龙正镇", "四川省眉山市仁寿县禾加镇", "四川省眉山市仁寿县宝飞镇", "四川省眉山市仁寿县文林街道", "四川省眉山市仁寿县宝马镇", "四川省眉山市仁寿县大化镇", "四川省眉山市仁寿县汪洋镇", "四川省眉山市仁寿县视高街道", "四川省眉山市仁寿县钟祥镇", "四川省眉山市仁寿县虞丞乡", "四川省眉山市仁寿县普宁街道", "四川省眉山市仁寿县富加镇", "四川省眉山市仁寿县曹家镇", "四川省眉山市仁寿县黑龙滩镇", "四川省眉山市仁寿县新店镇", "四川省眉山市仁寿县禄加镇", "四川省眉山市仁寿县始建镇", "四川省眉山市仁寿县青岗乡", "四川省眉山市仁寿县彰加镇", "四川省眉山市仁寿县文宫镇", "四川省眉山市仁寿县龙马镇", "四川省眉山市仁寿县高家镇", "四川省眉山市仁寿县板桥镇", "四川省眉山市仁寿县满井镇", "四川省眉山市仁寿县珠嘉镇", "四川省眉山市仁寿县藕塘镇", "四川省眉山市仁寿县方家镇", "四川省眉山市仁寿县谢安镇", "四川省眉山市仁寿县贵平镇", "四川省眉山市仁寿县怀仁街道"]

1f3f2378   起风了   我的第一次
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
  			}

  

  		},

  		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>