Showing
2 changed files
with
15 additions
and
6 deletions
| @@ -38,6 +38,7 @@ export class SpConstants{ | @@ -38,6 +38,7 @@ export class SpConstants{ | ||
| 38 | static LOCATION_PROVINCE_NAME = "location_province_name" //定位,省份名称 | 38 | static LOCATION_PROVINCE_NAME = "location_province_name" //定位,省份名称 |
| 39 | static LOCATION_DISTRICT_CODE = "location_district_code" //定位,区县,返回9位,如:合肥-瑶海区-310115114 | 39 | static LOCATION_DISTRICT_CODE = "location_district_code" //定位,区县,返回9位,如:合肥-瑶海区-310115114 |
| 40 | static LOCATION_PERMISSION_REFUSE = "location_permission_refuse" //定位 | 40 | static LOCATION_PERMISSION_REFUSE = "location_permission_refuse" //定位 |
| 41 | + static LOCATION_FIRST_POSITION = 'location_first_position'// 定位后顶导首次使用地理信息 | ||
| 41 | 42 | ||
| 42 | //启动页数据存储key | 43 | //启动页数据存储key |
| 43 | static APP_LAUNCH_PAGE_DATA_MODEL = 'app_launch_page_data_model' | 44 | static APP_LAUNCH_PAGE_DATA_MODEL = 'app_launch_page_data_model' |
| 1 | import { HttpUrlUtils, HttpUtils, ResponseDTO, WDHttp } from 'wdNetwork'; | 1 | import { HttpUrlUtils, HttpUtils, ResponseDTO, WDHttp } from 'wdNetwork'; |
| 2 | -import { DateTimeUtils, Logger, StringUtils, EmitterUtils, EmitterEventId } from 'wdKit'; | 2 | +import { DateTimeUtils, EmitterEventId, EmitterUtils, Logger, SPHelper, StringUtils } from 'wdKit'; |
| 3 | 3 | ||
| 4 | import { | 4 | import { |
| 5 | batchLikeAndCollectResult, | 5 | batchLikeAndCollectResult, |
| @@ -7,8 +7,11 @@ import { | @@ -7,8 +7,11 @@ import { | ||
| 7 | ContentDetailDTO, | 7 | ContentDetailDTO, |
| 8 | ContentDTO, | 8 | ContentDTO, |
| 9 | contentListParams, | 9 | contentListParams, |
| 10 | + FeedbackTypeBean, | ||
| 11 | + GoldenPositionExtraBean, | ||
| 10 | InteractDataDTO, | 12 | InteractDataDTO, |
| 11 | LiveReviewDTO, | 13 | LiveReviewDTO, |
| 14 | + LiveRoomDataBean, | ||
| 12 | MorningEveningPaperDTO, | 15 | MorningEveningPaperDTO, |
| 13 | NavigationBodyDTO, | 16 | NavigationBodyDTO, |
| 14 | NavigationDetailDTO, | 17 | NavigationDetailDTO, |
| @@ -22,13 +25,10 @@ import { | @@ -22,13 +25,10 @@ import { | ||
| 22 | postExecuteCollectRecordParams, | 25 | postExecuteCollectRecordParams, |
| 23 | postExecuteLikeParams, | 26 | postExecuteLikeParams, |
| 24 | postInteractAccentionOperateParams, | 27 | postInteractAccentionOperateParams, |
| 25 | - postRecommendListParams, | ||
| 26 | - GoldenPositionExtraBean, | ||
| 27 | - FeedbackTypeBean, | ||
| 28 | - LiveRoomDataBean | 28 | + postRecommendListParams |
| 29 | } from 'wdBean'; | 29 | } from 'wdBean'; |
| 30 | import { PageUIReqBean } from '../components/page/bean/PageUIReqBean'; | 30 | import { PageUIReqBean } from '../components/page/bean/PageUIReqBean'; |
| 31 | -import { ArrayList } from '@kit.ArkTS'; | 31 | +import { SpConstants } from 'wdConstant/Index'; |
| 32 | 32 | ||
| 33 | const TAG = 'HttpRequest'; | 33 | const TAG = 'HttpRequest'; |
| 34 | 34 | ||
| @@ -243,6 +243,14 @@ export class PageRepository { | @@ -243,6 +243,14 @@ export class PageRepository { | ||
| 243 | url = url + "&districtCode=" + HttpUtils.getDistrictCode() | 243 | url = url + "&districtCode=" + HttpUtils.getDistrictCode() |
| 244 | + "&provinceCode=" + provinceCode | 244 | + "&provinceCode=" + provinceCode |
| 245 | + "&cityCode=" + HttpUtils.getCityCode() | 245 | + "&cityCode=" + HttpUtils.getCityCode() |
| 246 | + | ||
| 247 | + let per=SPHelper.default.getSync(SpConstants.LOCATION_FIRST_POSITION,true) | ||
| 248 | + if(per){ | ||
| 249 | + //检测首次获取地理信息 | ||
| 250 | + url = url+'&firstLocation=1' | ||
| 251 | + SPHelper.default.save(SpConstants.LOCATION_FIRST_POSITION,false) | ||
| 252 | + } | ||
| 253 | + | ||
| 246 | } | 254 | } |
| 247 | if (myChannelIds) { | 255 | if (myChannelIds) { |
| 248 | url = url + `&channelIds=${myChannelIds}` | 256 | url = url + `&channelIds=${myChannelIds}` |
-
Please register or login to post a comment