Skip to content

Commit

Permalink
悟净A1添加天气信息
Browse files Browse the repository at this point in the history
  • Loading branch information
神奇海螺 committed Aug 12, 2019
1 parent 1ac63be commit 5ad2290
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ extension A1DeviceMainViewController{
locationManager.requestLocation(withReGeocode: true, completionBlock: { [weak self] (location: CLLocation?, reGeocode: AMapLocationReGeocode?, error: Error?) in
if let reGeocode = reGeocode {
let freeWeatherApi = URL(string: apiHost + "/api/v2/weather/index")!
freeWeatherApi.requestJSON(params: ["app_id":"10001","app_version":"1.1.6","astro":"1","gd_code":reGeocode.adcode ?? "","astro_type":"1","city_en":reGeocode.city ?? ""], callBack: { (json) in
freeWeatherApi.requestJSON(params: ["app_id":"10001","app_version":"1.1.6","astro":"1","gd_code":reGeocode.adcode ?? "440106","astro_type":"1","city_en":reGeocode.city ?? "广州市"], callBack: { (json) in
guard let weather = json["data"].dictionaryValue["weather"]?.dictionaryValue else {
return
}
Expand Down
6 changes: 3 additions & 3 deletions TC1-NG/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSLocationWhenInUseUsageDescription</key>
<string>请求地理位置信息,用于展示天气和空气质量信息</string>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
Expand All @@ -21,14 +19,16 @@
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>8</string>
<string>9</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>NSLocationWhenInUseUsageDescription</key>
<string>请求地理位置信息,用于展示天气和空气质量信息</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
Expand Down
Binary file modified preview/device-a1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5ad2290

Please sign in to comment.