guhongwei 2 years ago
parent
commit
b7182580bc
5 changed files with 195 additions and 195 deletions
  1. 31 0
      common/amap-wx.130.js
  2. 142 145
      manifest.json
  3. 3 0
      pages/home/index.vue
  4. 1 11
      pages/index/index.vue
  5. 18 39
      pagesMy/address/add.vue

File diff suppressed because it is too large
+ 31 - 0
common/amap-wx.130.js


+ 142 - 145
manifest.json

@@ -1,147 +1,144 @@
 {
 {
-	"name": "点到网",
-	"appid": "__UNI__F7FD5DB",
-	"description": "",
-	"versionName": "1.0.0",
-	"versionCode": "100",
-	"transformPx": false,
-	/* 5+App特有相关 */
-	"app-plus": {
-		"usingComponents": true,
-		"nvueStyleCompiler": "uni-app",
-		"compilerVersion": 3,
-		"splashscreen": {
-			"alwaysShowBeforeRender": true,
-			"waiting": true,
-			"autoclose": true,
-			"delay": 0
-		},
-		/* 模块配置 */
-		"modules": {
-			"Geolocation": {},
-			"OAuth": {},
-			"Maps": {}
-		},
-		/* 应用发布信息 */
-		"distribute": {
-			/* android打包配置 */
-			"android": {
-				"permissions": [
-					"<uses-feature android:name=\"android.hardware.camera\"/>",
-					"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
-					"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
-					"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
-					"<uses-permission android:name=\"android.permission.CAMERA\"/>",
-					"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
-					"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
-					"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
-					"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
-					"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
-					"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
-					"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
-					"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
-					"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
-					"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
-					"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
-				]
-			},
-			/* ios打包配置 */
-			"ios": {
-				"dSYMs": false
-			},
-			/* SDK配置 */
-			"sdkConfigs": {
-				"ad": {},
-				"geolocation": {
-					"amap": {
-						"__platform__": ["ios", "android"],
-						"appkey_ios": "",
-						"appkey_android": "82a18bf70282fb4b62ecec98b49be335"
-					}
-				},
-				"oauth": {
-					"weixin": {
-						"appid": "wx8cdd28824dfcdf19",
-						"UniversalLinks": ""
-					}
-				},
-				"maps": {}
-			},
-			"icons": {
-				"android": {
-					"hdpi": "unpackage/res/icons/72x72.png",
-					"xhdpi": "unpackage/res/icons/96x96.png",
-					"xxhdpi": "unpackage/res/icons/144x144.png",
-					"xxxhdpi": "unpackage/res/icons/192x192.png"
-				},
-				"ios": {
-					"appstore": "unpackage/res/icons/1024x1024.png",
-					"ipad": {
-						"app": "unpackage/res/icons/76x76.png",
-						"app@2x": "unpackage/res/icons/152x152.png",
-						"notification": "unpackage/res/icons/20x20.png",
-						"notification@2x": "unpackage/res/icons/40x40.png",
-						"proapp@2x": "unpackage/res/icons/167x167.png",
-						"settings": "unpackage/res/icons/29x29.png",
-						"settings@2x": "unpackage/res/icons/58x58.png",
-						"spotlight": "unpackage/res/icons/40x40.png",
-						"spotlight@2x": "unpackage/res/icons/80x80.png"
-					},
-					"iphone": {
-						"app@2x": "unpackage/res/icons/120x120.png",
-						"app@3x": "unpackage/res/icons/180x180.png",
-						"notification@2x": "unpackage/res/icons/40x40.png",
-						"notification@3x": "unpackage/res/icons/60x60.png",
-						"settings@2x": "unpackage/res/icons/58x58.png",
-						"settings@3x": "unpackage/res/icons/87x87.png",
-						"spotlight@2x": "unpackage/res/icons/80x80.png",
-						"spotlight@3x": "unpackage/res/icons/120x120.png"
-					}
-				}
-			}
-		}
-	},
-	/* 快应用特有相关 */
-	"quickapp": {},
-	/* 小程序特有相关 */
-	"mp-weixin": {
-		"appid": "wx8cdd28824dfcdf19",
-		"setting": {
-			"urlCheck": true,
-			"postcss": true,
-			"minified": true
-		},
-		"usingComponents": true,
-		"optimization": {
-			"subPackages": true
-		},
-		"permission": {
-			"scope.userLocation": {
-				"desc": "定位当前位置,选在收获地址"
-			}
-		},
-		"requiredPrivateInfos": [
-			"chooseAddress"
-		],
-		"plugins": {
-			"chooseLocation": {
-				"version": "1.0.9",
-				"provider": "wx76a9a06e5b4e693e"
-			}
-		}
-
-	},
-	"mp-alipay": {
-		"usingComponents": true
-	},
-	"mp-baidu": {
-		"usingComponents": true
-	},
-	"mp-toutiao": {
-		"usingComponents": true
-	},
-	"uniStatistics": {
-		"enable": false
-	},
-	"vueVersion": "2"
+    "name" : "点到网",
+    "appid" : "__UNI__F7FD5DB",
+    "description" : "",
+    "versionName" : "1.0.0",
+    "versionCode" : "100",
+    "transformPx" : false,
+    /* 5+App特有相关 */
+    "app-plus" : {
+        "usingComponents" : true,
+        "nvueStyleCompiler" : "uni-app",
+        "compilerVersion" : 3,
+        "splashscreen" : {
+            "alwaysShowBeforeRender" : true,
+            "waiting" : true,
+            "autoclose" : true,
+            "delay" : 0
+        },
+        /* 模块配置 */
+        "modules" : {
+            "OAuth" : {},
+            "Maps" : {},
+            "Geolocation" : {}
+        },
+        /* 应用发布信息 */
+        "distribute" : {
+            /* android打包配置 */
+            "android" : {
+                "permissions" : [
+                    "<uses-feature android:name=\"android.hardware.camera\"/>",
+                    "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.CAMERA\"/>",
+                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
+                    "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
+                    "<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
+                    "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
+                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
+                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
+                ]
+            },
+            /* ios打包配置 */
+            "ios" : {
+                "dSYMs" : false
+            },
+            /* SDK配置 */
+            "sdkConfigs" : {
+                "ad" : {},
+                "geolocation" : {
+                    "amap" : {
+                        "__platform__" : [ "ios", "android" ],
+                        "appkey_ios" : "",
+                        "appkey_android" : ""
+                    }
+                },
+                "oauth" : {
+                    "weixin" : {
+                        "appid" : "wx8cdd28824dfcdf19",
+                        "UniversalLinks" : ""
+                    }
+                },
+                "maps" : {}
+            },
+            "icons" : {
+                "android" : {
+                    "hdpi" : "unpackage/res/icons/72x72.png",
+                    "xhdpi" : "unpackage/res/icons/96x96.png",
+                    "xxhdpi" : "unpackage/res/icons/144x144.png",
+                    "xxxhdpi" : "unpackage/res/icons/192x192.png"
+                },
+                "ios" : {
+                    "appstore" : "unpackage/res/icons/1024x1024.png",
+                    "ipad" : {
+                        "app" : "unpackage/res/icons/76x76.png",
+                        "app@2x" : "unpackage/res/icons/152x152.png",
+                        "notification" : "unpackage/res/icons/20x20.png",
+                        "notification@2x" : "unpackage/res/icons/40x40.png",
+                        "proapp@2x" : "unpackage/res/icons/167x167.png",
+                        "settings" : "unpackage/res/icons/29x29.png",
+                        "settings@2x" : "unpackage/res/icons/58x58.png",
+                        "spotlight" : "unpackage/res/icons/40x40.png",
+                        "spotlight@2x" : "unpackage/res/icons/80x80.png"
+                    },
+                    "iphone" : {
+                        "app@2x" : "unpackage/res/icons/120x120.png",
+                        "app@3x" : "unpackage/res/icons/180x180.png",
+                        "notification@2x" : "unpackage/res/icons/40x40.png",
+                        "notification@3x" : "unpackage/res/icons/60x60.png",
+                        "settings@2x" : "unpackage/res/icons/58x58.png",
+                        "settings@3x" : "unpackage/res/icons/87x87.png",
+                        "spotlight@2x" : "unpackage/res/icons/80x80.png",
+                        "spotlight@3x" : "unpackage/res/icons/120x120.png"
+                    }
+                }
+            }
+        }
+    },
+    /* 快应用特有相关 */
+    "quickapp" : {},
+    /* 小程序特有相关 */
+    "mp-weixin" : {
+        "appid" : "wx8cdd28824dfcdf19",
+        "setting" : {
+            "urlCheck" : true,
+            "postcss" : true,
+            "minified" : true
+        },
+        "usingComponents" : true,
+        "optimization" : {
+            "subPackages" : true
+        },
+        "permission" : {
+            "scope.userLocation" : {
+                "desc" : "定位当前位置,选在收获地址"
+            }
+        },
+        "requiredPrivateInfos" : [ "chooseAddress", "chooseLocation", "getLocation" ],
+        "plugins" : {
+            "chooseLocation" : {
+                "version" : "1.0.9",
+                "provider" : "wx76a9a06e5b4e693e"
+            }
+        }
+    },
+    "mp-alipay" : {
+        "usingComponents" : true
+    },
+    "mp-baidu" : {
+        "usingComponents" : true
+    },
+    "mp-toutiao" : {
+        "usingComponents" : true
+    },
+    "uniStatistics" : {
+        "enable" : false
+    },
+    "vueVersion" : "2"
 }
 }

+ 3 - 0
pages/home/index.vue

@@ -78,6 +78,9 @@
 				topItem: ''
 				topItem: ''
 			};
 			};
 		},
 		},
+		onLoad: function() {
+			const that = this;
+		},
 		onShow: function() {
 		onShow: function() {
 			const that = this;
 			const that = this;
 			that.search();
 			that.search();

+ 1 - 11
pages/index/index.vue

@@ -10,7 +10,7 @@
 				<button size="mini" @click="toCommon('pages/my/index')">我的1</button>
 				<button size="mini" @click="toCommon('pages/my/index')">我的1</button>
 			</view>
 			</view>
 			<view class="two">
 			<view class="two">
-				<button @click="toChange">地址选择</button>
+				<!-- <button @click="toChange">地址选择</button> -->
 			</view>
 			</view>
 		</view>
 		</view>
 
 
@@ -53,16 +53,6 @@
 					}
 					}
 				});
 				});
 			},
 			},
-			// toChange() {
-			// 	uni.chooseLocation({
-			// 		success: function(res) {
-			// 			console.log(res);
-			// 		},
-			// 		fail: function(err) {
-			// 			console.log(err);
-			// 		}
-			// 	})
-			// }
 		}
 		}
 	}
 	}
 </script>
 </script>

+ 18 - 39
pagesMy/address/add.vue

@@ -9,7 +9,7 @@
 					<uni-forms-item label="联系电话" name="phone">
 					<uni-forms-item label="联系电话" name="phone">
 						<uni-easyinput type="number" v-model="form.phone" placeholder="请输入联系电话" />
 						<uni-easyinput type="number" v-model="form.phone" placeholder="请输入联系电话" />
 					</uni-forms-item>
 					</uni-forms-item>
-					<uni-forms-item label="地图选点" v-if="is_wx==true">
+					<uni-forms-item label="地图选点">
 						<button type="default" size="mini" class="toLoacl" @click="toLocaltion()">地图选点</button>
 						<button type="default" size="mini" class="toLoacl" @click="toLocaltion()">地图选点</button>
 					</uni-forms-item>
 					</uni-forms-item>
 					<uni-forms-item label="所在省份" name="province">
 					<uni-forms-item label="所在省份" name="province">
@@ -46,7 +46,6 @@
 	export default {
 	export default {
 		data() {
 		data() {
 			return {
 			return {
-				is_wx: true,
 				user: {},
 				user: {},
 				id: '',
 				id: '',
 				form: {},
 				form: {},
@@ -141,13 +140,8 @@
 		},
 		},
 		onShow: function() {
 		onShow: function() {
 			const that = this;
 			const that = this;
-			that.searchplatform();
-			that.searchLocal();
-		},
-		onUnload: function() {
-			const chooseLocation = requirePlugin('chooseLocation');
-			chooseLocation.setLocation(null);
 		},
 		},
+		onUnload: function() {},
 		methods: {
 		methods: {
 			// 监听用户是否登录
 			// 监听用户是否登录
 			watchLogin() {
 			watchLogin() {
@@ -181,22 +175,21 @@
 			// 定位
 			// 定位
 			toLocaltion() {
 			toLocaltion() {
 				const that = this;
 				const that = this;
-				const key = that.$config.txlocalKey;
-				const referer = that.$config.txlocalReferer;
-				uni.navigateTo({
-					url: `plugin://chooseLocation/index?key=${key}&referer=${referer}`
-				});
-			},
-			searchLocal() {
-				const that = this;
-				const chooseLocation = requirePlugin('chooseLocation');
-				const location = chooseLocation.getLocation();
-				if (location) {
-					that.$set(that.form, `province`, location.province || '');
-					that.$set(that.form, `city`, location.city || '');
-					that.$set(that.form, `area`, location.district || '');
-					that.$set(that.form, `address`, location.address || '');
-				}
+				uni.chooseLocation({
+					success: function(res) {
+						if (res) {
+							that.$set(that.form, `address`, res.address || '')
+						}
+					},
+					fail: function(err) {
+						console.log(err);
+					}
+				})
+				// const key = that.$config.txlocalKey;
+				// const referer = that.$config.txlocalReferer;
+				// uni.navigateTo({
+				// 	url: `plugin://chooseLocation/index?key=${key}&referer=${referer}`
+				// });
 			},
 			},
 			// 选择省份
 			// 选择省份
 			proChange(e) {
 			proChange(e) {
@@ -254,20 +247,6 @@
 					}
 					}
 				})
 				})
 			},
 			},
-			// 查询平台
-			searchplatform() {
-				const that = this;
-				uni.getStorage({
-					key: 'system',
-					success: function(res) {
-						if (res.data.uniPlatform == 'mp-weixin') {
-							that.$set(that, `is_wx`, true)
-						} else {
-							that.$set(that, `is_wx`, false)
-						}
-					}
-				})
-			}
 		}
 		}
 	}
 	}
 </script>
 </script>
@@ -303,4 +282,4 @@
 			}
 			}
 		}
 		}
 	}
 	}
-</style>
+</style>