liyubing

feat:1)新闻tab页面顶导接口加入首次授权参数firstLocation,只在第一次使用地理信息时使用,后面不用了

... ... @@ -38,6 +38,7 @@ export class SpConstants{
static LOCATION_PROVINCE_NAME = "location_province_name" //定位,省份名称
static LOCATION_DISTRICT_CODE = "location_district_code" //定位,区县,返回9位,如:合肥-瑶海区-310115114
static LOCATION_PERMISSION_REFUSE = "location_permission_refuse" //定位
static LOCATION_FIRST_POSITION = 'location_first_position'// 定位后顶导首次使用地理信息
//启动页数据存储key
static APP_LAUNCH_PAGE_DATA_MODEL = 'app_launch_page_data_model'
... ...
import { HttpUrlUtils, HttpUtils, ResponseDTO, WDHttp } from 'wdNetwork';
import { DateTimeUtils, Logger, StringUtils, EmitterUtils, EmitterEventId } from 'wdKit';
import { DateTimeUtils, EmitterEventId, EmitterUtils, Logger, SPHelper, StringUtils } from 'wdKit';
import {
batchLikeAndCollectResult,
... ... @@ -7,8 +7,11 @@ import {
ContentDetailDTO,
ContentDTO,
contentListParams,
FeedbackTypeBean,
GoldenPositionExtraBean,
InteractDataDTO,
LiveReviewDTO,
LiveRoomDataBean,
MorningEveningPaperDTO,
NavigationBodyDTO,
NavigationDetailDTO,
... ... @@ -22,13 +25,10 @@ import {
postExecuteCollectRecordParams,
postExecuteLikeParams,
postInteractAccentionOperateParams,
postRecommendListParams,
GoldenPositionExtraBean,
FeedbackTypeBean,
LiveRoomDataBean
postRecommendListParams
} from 'wdBean';
import { PageUIReqBean } from '../components/page/bean/PageUIReqBean';
import { ArrayList } from '@kit.ArkTS';
import { SpConstants } from 'wdConstant/Index';
const TAG = 'HttpRequest';
... ... @@ -243,6 +243,14 @@ export class PageRepository {
url = url + "&districtCode=" + HttpUtils.getDistrictCode()
+ "&provinceCode=" + provinceCode
+ "&cityCode=" + HttpUtils.getCityCode()
let per=SPHelper.default.getSync(SpConstants.LOCATION_FIRST_POSITION,true)
if(per){
//检测首次获取地理信息
url = url+'&firstLocation=1'
SPHelper.default.save(SpConstants.LOCATION_FIRST_POSITION,false)
}
}
if (myChannelIds) {
url = url + `&channelIds=${myChannelIds}`
... ...