| 
					
				 | 
			
			
				@@ -1,6 +1,5 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import store from '@/store/index.js' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import wx from 'weixin-js-sdk' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import { getConfigInfo, wxConfig } from '@/common/utils/util' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 // 不含icon提示框 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 export const toast = str => { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -224,40 +223,36 @@ export const copy = val => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 export const openLocation = (options = {}) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   if (!options) return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   const { lat, lng, name, address } = options 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  wxConfig(undefined, undefined, wx => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    wx.openLocation({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      latitude: Number(lat), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      longitude: Number(lng), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      name, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      address, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      success: () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        console.log('success') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  wx.openLocation({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    latitude: Number(lat), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    longitude: Number(lng), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    name, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    address, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    success: () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      console.log('success') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 // 获取当前定位 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 export const getLocation = async function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   return new Promise((resolve, reject) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    wxConfig(undefined, undefined, wx => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      wx.getLocation({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        type: 'gcj02', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        isHighAccuracy: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        geocode: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        success: res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          resolve(res) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        fail: err => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          resolve({}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          // reject('获取当前定位失败') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          // modal({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          //   title: '提示', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          //   content: '获取当前定位失败', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          //   showCancel: false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          // }).then(() => {}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    wx.getLocation({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      type: 'gcj02', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      isHighAccuracy: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      geocode: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      success: res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        resolve(res) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      fail: err => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        resolve({}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // reject('获取当前定位失败') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // modal({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //   title: '提示', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //   content: '获取当前定位失败', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //   showCancel: false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // }).then(() => {}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 |