Browse Source

fix: 兼容修复

dingyantao 7 months ago
parent
commit
141e1ecf0d

+ 4
- 4
App.vue View File

@@ -1,22 +1,22 @@
1 1
 <script>
2 2
 	export default {
3 3
 		onLaunch: function() {
4
-			console.log('App Launch')
4
+			// console.log('App Launch')
5 5
 			this.updateManager()
6 6
 		},
7 7
 		onShow: function() {
8
-			console.log('App Show')
8
+			// console.log('App Show')
9 9
 
10 10
 			
11 11
 		
12 12
 		},
13 13
 		onHide: function() {
14
-			console.log('App Hide')
14
+			// console.log('App Hide')
15 15
 		},
16 16
 		methods: {
17 17
 			
18 18
 			updateManager () {
19
-					console.log("update");
19
+					// console.log("update");
20 20
 				    const that = this;
21 21
 				    //region 如果有更新小程序的版本,就清除缓存
22 22
 				    if (wx.canIUse('getUpdateManager')) {

+ 48
- 48
assets/js/handBank.js View File

@@ -1,56 +1,56 @@
1 1
 let bankList = [
2
-	{name: "郑州银行", bank_type: 1},
3
-	{name: "邮储银行", bank_type: 2},
4
-	{name: "交通银行", bank_type: 3},
5
-	{name: "农业银行", bank_type: 4},
6
-	{name: "郑州农商银行", bank_type: 5},
7
-	{name: "工商银行", bank_type: 6},
8
-	{name: "中国银行", bank_type: 7},
9
-	{name: "中原银行", bank_type: 8},
10
-	{name: "建设银行", bank_type: 9},
11
-	{name: "新密农商银行", bank_type: 10},
2
+    { name: "郑州银行", bank_type: 1 },
3
+    { name: "邮储银行", bank_type: 2 },
4
+    { name: "交通银行", bank_type: 3 },
5
+    { name: "农业银行", bank_type: 4 },
6
+    { name: "郑州农商银行", bank_type: 5 },
7
+    { name: "工商银行", bank_type: 6 },
8
+    { name: "中国银行", bank_type: 7 },
9
+    { name: "中原银行", bank_type: 8 },
10
+    { name: "建设银行", bank_type: 9 },
11
+    { name: "新密农商银行", bank_type: 10 },
12 12
 ]
13 13
 
14 14
 
15
-export function GetBankName ( list ) {
16
-	let arr = []
17
-	if ( list && list.length ) {
18
-		list.forEach( el => {
19
-			let index = arr.findIndex( item => item.name == el.bank_name)
20
-			if ( index == -1 ) {
21
-				let obj = {
22
-					name: el.bank_name,
23
-					bank_type: arr.length + 1
24
-				}
25
-				arr.push( obj )
26
-			}
27
-		})
28
-	}
29
-	return arr
15
+export function GetBankName(list) {
16
+    let arr = []
17
+    if (list && list.length) {
18
+        list.forEach(el => {
19
+            let index = arr.findIndex(item => item.name == el.bank_name)
20
+            if (index == -1) {
21
+                let obj = {
22
+                    name: el.bank_name,
23
+                    bank_type: arr.length + 1
24
+                }
25
+                arr.push(obj)
26
+            }
27
+        })
28
+    }
29
+    return arr
30 30
 }
31 31
 
32 32
 //  给所有数据加上bank_type
33
-export function HanderBank( list ) {
34
-	let arr = []
35
-	console.log( list );
36
-	if ( list && list.length ) {
37
-		list.forEach( el => {
38
-			let index = bankList.findIndex( item => item.name == el.bank_name )
39
-			let obj = {
40
-				name: el.name,
41
-				address: el.address, 
42
-				phone: el.phone,
43
-				work_user_count:el.work_user_count,
44
-				start_time: el.start_time,
45
-				end_time: el.end_time,
46
-				bank_type: 0,
47
-				cate_id: 6,
48
-			}
49
-			if ( index > -1 ) {
50
-				obj.bank_type = bankList[index].bank_type
51
-			}
52
-			arr.push( obj )
53
-		})
54
-	}
55
-	return arr
33
+export function HanderBank(list) {
34
+    let arr = []
35
+        // console.log( list );
36
+    if (list && list.length) {
37
+        list.forEach(el => {
38
+            let index = bankList.findIndex(item => item.name == el.bank_name)
39
+            let obj = {
40
+                name: el.name,
41
+                address: el.address,
42
+                phone: el.phone,
43
+                work_user_count: el.work_user_count,
44
+                start_time: el.start_time,
45
+                end_time: el.end_time,
46
+                bank_type: 0,
47
+                cate_id: 6,
48
+            }
49
+            if (index > -1) {
50
+                obj.bank_type = bankList[index].bank_type
51
+            }
52
+            arr.push(obj)
53
+        })
54
+    }
55
+    return arr
56 56
 }

+ 30
- 29
assets/js/request.js View File

@@ -1,31 +1,32 @@
1 1
 import { doMain } from "../../config.js"
2
-let token = uni.getStorageSync("token")
3
-console.log("token", token)
4
-export async  function Request( url,params, method = 'POST'  ) {
5
-	const header = {
6
-			'Authorization': uni.getStorageSync("token")
7
-		}
8
-		console.log("header--", header)
9
-	let  res  = await uni.request({
10
-		method,
11
-		url:`${doMain}${url}`,
12
-		data:params,
13
-		// timeout:6000,
14
-		header: header
15
-	})
16
-	console.log( 'Request--', res )
17
-	let info = res[1]
18
-	if ( info.data.code == 401 || info.data.code == 403){
19
-		uni.removeStorageSync("token")
20
-		uni.clearStorageSync();
21
-		return uni.showToast({
22
-			title: "登录过期,请重新登录"
23
-		});
24
-	} else if (  info.data.code == 2 ) {
25
-		return uni.showModal({
26
-			title: "提示",
27
-			content: info.data.message
28
-		})
29
-	}
30
-	return info ? info : null
2
+// let token = uni.getStorageSync("token")
3
+// console.log("token", token)
4
+export async function Request(url, params, method = 'POST') {
5
+    const header = {
6
+            'Authorization': uni.getStorageSync("token")
7
+        }
8
+        // console.log("header--", header)
9
+    let res = await uni.request({
10
+            method,
11
+            url: `${doMain}${url}`,
12
+            data: params,
13
+            // timeout:6000,
14
+            header: header
15
+        })
16
+        // console.log( 'Request--', res )
17
+    let info = res[1]
18
+    if (info.data.code == 401 || info.data.code == 403) {
19
+        uni.removeStorageSync("token")
20
+        uni.clearStorageSync();
21
+        return uni.showToast({
22
+            title: "登录过期,请重新登录",
23
+            icon: "none"
24
+        });
25
+    } else if (info.data.code == 2) {
26
+        return uni.showModal({
27
+            title: "提示",
28
+            content: info.data.message
29
+        })
30
+    }
31
+    return info ? info : null
31 32
 }

+ 2
- 2
components/index/CustomBar.vue View File

@@ -59,14 +59,14 @@
59 59
 			getSystemInfo() {
60 60
 				this.avatar = uni.getStorageSync("avatar")
61 61
 				let data = uni.getMenuButtonBoundingClientRect()
62
-				console.log(data);
62
+				// console.log(data);
63 63
 				this.mBtnHeight = data.height
64 64
 				let info = uni.getSystemInfoSync()
65 65
 				// console.log( info );
66 66
 				this.isIos = info.system.indexOf('iOS') > -1;
67 67
 				// 获取胶囊按钮距离左边的距离
68 68
 				let offsetRight = info.screenWidth - data.right
69
-				console.log(offsetRight);
69
+				// console.log(offsetRight);
70 70
 				this.$store.commit("getMenuRight", offsetRight)
71 71
 				this.statusHeight = info.statusBarHeight
72 72
 				// console.log( this.statusHeight );

+ 2
- 2
components/index/mechanism.vue View File

@@ -141,7 +141,7 @@
141 141
 			 * @param {Object} 查看详情
142 142
 			 */
143 143
 			showDetail( item ) {
144
-				console.log("this.canClick", this.canClick)
144
+				// console.log("this.canClick", this.canClick)
145 145
 				if ( !this.canClick ) {
146 146
 					return false
147 147
 				}
@@ -165,7 +165,7 @@
165 165
 				if ( !this.canClick ) {
166 166
 					return false
167 167
 				} else {
168
-					console.log("item", item)
168
+					// console.log("item", item)
169 169
 					uni.navigateTo({
170 170
 						url:`/pages/index/MeCate?id=${ id }`
171 171
 					})

+ 22
- 23
pages/index/index.vue View File

@@ -27,7 +27,7 @@
27 27
 			<view v-if="cardCurVisible" class="select_box">
28 28
 				<view class="_select_id" v-if="treeData && treeData.length">
29 29
 					<!-- v-if="item.id != 7"    说明:暂时隐藏 分类ID 为7 的 医保中心  -->
30
-					<view @click="cardCur = index" :class="cardCur === index ? 'active': ''"
30
+					<view @click="cardCur = index" :key="index" :class="cardCur === index ? 'active': ''"
31 31
 						v-for="(item, index) of treeData" v-if="item.ID != 7" class="btn_item">
32 32
 						{{item.name}}
33 33
 					</view>
@@ -39,7 +39,7 @@
39 39
 			</view>
40 40
 			<view v-if="cardCurVisible2" class="select_box">
41 41
 				<view class="_select_id" v-if="areaList && areaList.length">
42
-					<view @click="cardCur2 = index" :class="cardCur2 === index ? 'active': ''"
42
+					<view @click="cardCur2 = index" :key="index" :class="cardCur2 === index ? 'active': ''"
43 43
 						v-for="(item, index) of areaList" class="btn_item">
44 44
 						{{item.area}}
45 45
 					</view>
@@ -70,7 +70,7 @@
70 70
 						:scroll-into-view="scrollIntoViewId" :style="{maxHeight: heit}" class="dt_scroll-box" v-if="List && List.length"
71 71
 						:scroll-with-animation="false" @scroll="handleScroll">
72 72
 						<view class="scroll-container">
73
-							<view :id="item.id" class="scroll-item" v-for="(item, index) in List"
73
+							<view :id="item.id" class="scroll-item" :key="index" v-for="(item, index) in List"
74 74
 								@click="cardSwiper(item, index)" :class="cardCur==index?'cur':''">
75 75
 								<Mechanism class="dt-drawer-comm" :item="item" :key="index" :showBtns="true"
76 76
 									:showY="true" :showType="1" :isDetails="false" :isShowWin="isShowWin"
@@ -286,7 +286,7 @@
286 286
 				return 20
287 287
 			},
288 288
 			disSCale() {
289
-				console.log(this.area);
289
+				// console.log(this.area);
290 290
 				if (this.area) {
291 291
 					return true
292 292
 				} else {
@@ -294,14 +294,14 @@
294 294
 				}
295 295
 			}, // 地图缩放
296 296
 			heit(){
297
-				console.log("(22 - Math.abs(this.paylodNum/100))", (22 - Math.abs(this.paylodNum/100)))
298
-				console.log("(90 - Math.abs(this.paylodNum/10) - (22 - Math.abs(this.paylodNum/100))) + '%';", (90 - Math.abs(this.paylodNum/10) - Math.abs(this.paylodNum/100)) + '%')
297
+				// console.log("(22 - Math.abs(this.paylodNum/100))", (22 - Math.abs(this.paylodNum/100)))
298
+				// console.log("(90 - Math.abs(this.paylodNum/10) - (22 - Math.abs(this.paylodNum/100))) + '%';", (90 - Math.abs(this.paylodNum/10) - Math.abs(this.paylodNum/100)) + '%')
299 299
 				return (90 - Math.abs(this.paylodNum/10) - Math.abs(this.paylodNum/100)) + '%';
300 300
 			}
301 301
 		},
302 302
 		onShow() {
303 303
 			this.getOrderInfo()
304
-			console.log('触发')
304
+			// console.log('触发')
305 305
 			this.GetUserDetails()
306 306
 		},
307 307
 		onReady() {
@@ -320,12 +320,11 @@
320 320
 		},
321 321
 		methods: {
322 322
 			emit_dragTop (paylod) {
323
-				console.log("paylod--", paylod)
323
+				// console.log("paylod--", paylod)
324 324
 				this.paylodNum = paylod
325
-				console.log('----sssss--', )
326 325
 			},
327 326
 			lowerBottom() {
328
-				console.log("this.hasMore---", this.hasMore)
327
+				// console.log("this.hasMore---", this.hasMore)
329 328
 				if (this.hasMore) {
330 329
 					this.getMoreList()
331 330
 				}
@@ -370,12 +369,12 @@
370 369
 			async GetUserDetails() {
371 370
 				const that = this
372 371
 				let res = await GetUserDetails()
373
-				console.log('GetUserDetails---', res);
372
+				// console.log('GetUserDetails---', res);
374 373
 				if (res.data.code == 1) {
375 374
 					that.userInfo.avatar = res.data.data.avatar
376 375
 					that.userInfo.nickname = res.data.data.nickname
377 376
 					that.userInfo.phone = res.data.data.user_name
378
-					console.log("res.data.data", res.data.data)
377
+					// console.log("res.data.data", res.data.data)
379 378
 				}
380 379
 			},
381 380
 
@@ -439,7 +438,7 @@
439 438
 
440 439
 			// 轮播变化
441 440
 			async cardSwiper(item, index) {
442
-				console.log('item, index', item, index);
441
+				// console.log('item, index', item, index);
443 442
 				this.cardCur = index
444 443
 				let maxIndex = this.marker.length - 1 // 我的poi所在的index
445 444
 				if (this.cardCur >= this.List.length - 1) {
@@ -526,7 +525,7 @@
526 525
 				// console.log( "chose ");
527 526
 				uni.chooseLocation({
528 527
 					success(e) {
529
-						console.log(e);
528
+						// console.log(e);
530 529
 						self.isChose = true
531 530
 						self.chosePosition = {
532 531
 							latitude: e.latitude,
@@ -558,15 +557,15 @@
558 557
 				this.marker.forEach((el, inx) => {
559 558
 					if (inx != total - 1) {
560 559
 						if (inx == index) {
561
-							console.log("inx----index", inx, index)
562
-							console.log("el--", el)
560
+							// console.log("inx----index", inx, index)
561
+							// console.log("el--", el)
563 562
 							this.latitude = el.a_latitude ? el.a_latitude : el.latitude
564 563
 							this.longitude = el.a_longitude ? el.a_longitude : el.longitude
565 564
 							this.changeIcon(el, 2)
566 565
 							el.title = el.name
567 566
 							el.label = {
568 567
 								// 是否显示二级标题
569
-								content: el.name,
568
+								// content: el.name,
570 569
 								color: "#007aff",
571 570
 								borderRadius: 20,
572 571
 								backgroundColor: "#FFFFFF",
@@ -695,7 +694,7 @@
695 694
 			},
696 695
 
697 696
 			searchHandle(keyword) {
698
-				console.log("1", keyword);
697
+				// console.log("1", keyword);
699 698
 				this.page = 1
700 699
 				this.getList(keyword)
701 700
 			},
@@ -704,7 +703,7 @@
704 703
 			 * @name 初始化地图api
705 704
 			 */
706 705
 			initMap() {
707
-				console.log("init map");
706
+				// console.log("init map");
708 707
 				if (!this.mapSdk) {
709 708
 					this.mapSdk = new QQMap({
710 709
 						key: 'PQ5BZ-KBN3W-OQGRC-R6OSF-ZM6RO-LIFAV'
@@ -773,7 +772,7 @@
773 772
 			 * @param {Object} 查看详情
774 773
 			 */
775 774
 			showDetail(id) {
776
-				console.log(id)
775
+				// console.log(id)
777 776
 				let openid = uni.getStorageSync("openId")
778 777
 				if (id && openid) {
779 778
 					uni.navigateTo({
@@ -823,8 +822,8 @@
823 822
 				}
824 823
 				this.markerList.push(mypoi)
825 824
 				this.markerList.splice(0, 0)
826
-				console.log("mypoi--", mypoi)
827
-				console.log("this.markerList--", this.markerList)
825
+				// console.log("mypoi--", mypoi)
826
+				// console.log("this.markerList--", this.markerList)
828 827
 			},
829 828
 
830 829
 			/**
@@ -917,7 +916,7 @@
917 916
 					el.end_time = el.end_time ? el.end_time : "17:00"
918 917
 					// wx - el.callout 支持
919 918
 					// zfb - el.label 支持
920
-					console.log('el', el)
919
+					// console.log('el', el)
921 920
 					el.label = {
922 921
 						// 是否显示二级标题
923 922
 						// content: el.name,

+ 16
- 16
uni_modules/ww-bottom-drawer/components/ww-bottom-drawerapp/ww-bottom-drawerapp.vue View File

@@ -96,7 +96,7 @@
96 96
 			isExpand(newVal, oldVal) {
97 97
 				console.log(this.dragTop)
98 98
 				if (newVal != this.isDrawerOpen) {
99
-					console.log("isExpand" + newVal)
99
+					// console.log("isExpand" + newVal)
100 100
 					this.$nextTick(() => {
101 101
 						this.toTop = newVal;
102 102
 						this.expand_end()
@@ -106,7 +106,7 @@
106 106
 
107 107
 			},
108 108
 			dragTop(newVal, oldVal) {
109
-				console.log("newVal, oldVal", newVal, oldVal)
109
+				// console.log("newVal, oldVal", newVal, oldVal)
110 110
 				this.$emit("emit_dragTop", newVal)
111 111
 			}
112 112
 		},
@@ -162,20 +162,20 @@
162 162
 		},
163 163
 		methods: {
164 164
 			initTop() {
165
-				console.log("listLength--1--", this.listLength)
165
+				// console.log("listLength--1--", this.listLength)
166 166
 
167 167
 				// #ifndef APP-NVUE
168 168
 				const query = uni.createSelectorQuery().in(this);
169 169
 				query
170 170
 					.select("#drag-content")
171 171
 					.boundingClientRect((data) => {
172
-						console.log("data", data)
172
+						// console.log("data", data)
173 173
 						this.contentHeight = data.height
174 174
 						this.transition = ""
175
-						console.log("this.proportionShow", this.proportionShow)
176
-						console.log("this.contentHeight", this.contentHeight)
175
+						// console.log("this.proportionShow", this.proportionShow)
176
+						// console.log("this.contentHeight", this.contentHeight)
177 177
 						this.dragTop = -Number(((1 - this.proportionShow) * this.contentHeight) - 90);
178
-						console.log("this.dragTop1", this.dragTop)
178
+						// console.log("this.dragTop1", this.dragTop)
179 179
 						this.callExpand(this.dragTop == 0)
180 180
 						if (this.listLength <= 1) {
181 181
 							this.dragTop = 0
@@ -190,8 +190,8 @@
190 190
 					this.transition = ""
191 191
 					this.dragTop = -Number(((1 - this.proportionShow) * this.contentHeight) - 90);
192 192
 					this.callExpand(this.dragTop == 0)
193
-					console.log("this.dragTop2", this.dragTop)
194
-					console.log(this.contentHeight)
193
+					// console.log("this.dragTop2", this.dragTop)
194
+					// console.log(this.contentHeight)
195 195
 					if (this.listLength <= 1) {
196 196
 						this.dragTop = 0
197 197
 					}
@@ -213,7 +213,7 @@
213 213
 			},
214 214
 			drag_start(event) {
215 215
 				this.$parent.canDrag = true
216
-				console.log("drag_start---", this.canDrag)
216
+				// console.log("drag_start---", this.canDrag)
217 217
 				if (!this.canDrag) {
218 218
 					return
219 219
 				}
@@ -231,7 +231,7 @@
231 231
 			},
232 232
 			drag_move(event) {
233 233
 				this.$parent.canDrag = true
234
-				console.log("drag_move---", this.canDrag)
234
+				// console.log("drag_move---", this.canDrag)
235 235
 				if (!this.canDrag) {
236 236
 					return
237 237
 				}
@@ -313,7 +313,7 @@
313 313
 			},
314 314
 
315 315
 			drag_end(event) {
316
-				console.log("drag_end---", this.canDrag)
316
+				// console.log("drag_end---", this.canDrag)
317 317
 				if (!this.canDrag) {
318 318
 					return
319 319
 				}
@@ -330,7 +330,7 @@
330 330
 					callback && callback();
331 331
 					return
332 332
 				}
333
-				console.log(from + " - " + to)
333
+				// console.log(from + " - " + to)
334 334
 				let time = this.transitionTime * 100;
335 335
 				// 定义定时器的间隔
336 336
 				var interval = 20;
@@ -339,7 +339,7 @@
339 339
 
340 340
 				// 定义步长
341 341
 				var step = (to - from) / allCount;
342
-				console.log(from + " - " + to + " step:" + step)
342
+				// console.log(from + " - " + to + " step:" + step)
343 343
 				// 定义计数器
344 344
 				var count = 0;
345 345
 
@@ -347,7 +347,7 @@
347 347
 				this.timer = setInterval(function() {
348 348
 					count++;
349 349
 					self.dragTop = from + step * count;
350
-					console.log(from + " - " + to + " count:" + count + "  dragTop:" + self.dragTop)
350
+					// console.log(from + " - " + to + " count:" + count + "  dragTop:" + self.dragTop)
351 351
 					// 判断是否执行完毕
352 352
 					if (count >= allCount) {
353 353
 						// 停表
@@ -362,7 +362,7 @@
362 362
 				// #ifdef APP-NVUE
363 363
 				dom.getComponentRect(this.$refs['drag-content'], (ret) => {
364 364
 					this.transition = `transition: bottom ${this.transitionTime}s;`
365
-					console.log(ret)
365
+					// console.log(ret)
366 366
 					if (this.transitionTime <= 0.3) { //nvue的动不生效,自行处理
367 367
 						this.contentHeight = ret.size.height
368 368
 						if (this.toTop) {

Loading…
Cancel
Save