Showing
10 changed files
with
221 additions
and
3 deletions
| @@ -297,6 +297,21 @@ export class HttpUrlUtils { | @@ -297,6 +297,21 @@ export class HttpUrlUtils { | ||
| 297 | */ | 297 | */ |
| 298 | static readonly ATTENTION_BATCH_DATA_PATH: string = "/api/rmrb-interact/interact/zh/c/attention/batch"; | 298 | static readonly ATTENTION_BATCH_DATA_PATH: string = "/api/rmrb-interact/interact/zh/c/attention/batch"; |
| 299 | 299 | ||
| 300 | + /** | ||
| 301 | + * 获取oss 配置 | ||
| 302 | + */ | ||
| 303 | + static readonly OSS_PARAMS_PATH: string = "/api/rmrb-bff-display-zh/content/zh/c/oss/configs"; | ||
| 304 | + | ||
| 305 | + /** | ||
| 306 | + * 获取上传OSS token | ||
| 307 | + */ | ||
| 308 | + static readonly STS_TOKEN_PATH: string = "/api/rmrb-bff-display-zh/content/zh/c/oss/stsToken"; | ||
| 309 | + | ||
| 310 | + /** | ||
| 311 | + * 获取意见反馈类型 | ||
| 312 | + */ | ||
| 313 | + static readonly FEEDBACK_TYPE_PATH: string = "/api/rmrb-interact/interact/c/user/optionClassify/list"; | ||
| 314 | + | ||
| 300 | 315 | ||
| 301 | static getHost(): string { | 316 | static getHost(): string { |
| 302 | return HostManager.getHost(); | 317 | return HostManager.getHost(); |
| @@ -168,4 +168,6 @@ export { GoldenPositionExtraBean } from './src/main/ets/bean/content/GoldenPosit | @@ -168,4 +168,6 @@ export { GoldenPositionExtraBean } from './src/main/ets/bean/content/GoldenPosit | ||
| 168 | export { ClassBean } from './src/main/ets/bean/content/ClassBean'; | 168 | export { ClassBean } from './src/main/ets/bean/content/ClassBean'; |
| 169 | export { CreatorsBean } from './src/main/ets/bean/content/CreatorsBean'; | 169 | export { CreatorsBean } from './src/main/ets/bean/content/CreatorsBean'; |
| 170 | 170 | ||
| 171 | -export { MasterDetailRes } from './src/main/ets/bean/user/MasterDetailRes'; | ||
| 171 | +export { MasterDetailRes } from './src/main/ets/bean/user/MasterDetailRes'; | ||
| 172 | + | ||
| 173 | +export { FeedbackTypeBean } from './src/main/ets/bean/detail/FeedbackTypeBean'; |
| @@ -57,6 +57,8 @@ export { AudioDetailComponent } from "./src/main/ets/components/AudioDetailCompo | @@ -57,6 +57,8 @@ export { AudioDetailComponent } from "./src/main/ets/components/AudioDetailCompo | ||
| 57 | 57 | ||
| 58 | export { DynamicDetailComponent } from "./src/main/ets/components/DynamicDetailComponent" | 58 | export { DynamicDetailComponent } from "./src/main/ets/components/DynamicDetailComponent" |
| 59 | 59 | ||
| 60 | +export { FeedBackActivity } from "./src/main/ets/components/FeedBackActivity" | ||
| 61 | + | ||
| 60 | export { AudioSuspensionModel } from "./src/main/ets/viewmodel/AudioSuspensionModel" | 62 | export { AudioSuspensionModel } from "./src/main/ets/viewmodel/AudioSuspensionModel" |
| 61 | 63 | ||
| 62 | export { BroadcastPageComponent } from "./src/main/ets/components/broadcast/BroadcastPageComponent" | 64 | export { BroadcastPageComponent } from "./src/main/ets/components/broadcast/BroadcastPageComponent" |
| 1 | +import { FeedbackTypeBean } from 'wdBean/Index'; | ||
| 2 | +import { NetworkUtil } from 'wdKit/Index'; | ||
| 3 | +import { MultiPictureDetailViewModel } from '../viewmodel/MultiPictureDetailViewModel'; | ||
| 4 | +import { CustomTitleUI } from './reusable/CustomTitleUI' | ||
| 5 | +import { ArrayList } from '@kit.ArkTS'; | ||
| 6 | + | ||
| 7 | +const TAG = 'FeedBackActivity' | ||
| 8 | +// 意见反馈页面 | ||
| 9 | +@Component | ||
| 10 | +export struct FeedBackActivity { | ||
| 11 | + //UI | ||
| 12 | + scroller: Scroller = new Scroller(); | ||
| 13 | + | ||
| 14 | + @State isNetConnected: boolean = true | ||
| 15 | + | ||
| 16 | + @State feedbackTypeBeans: FeedbackTypeBean[] = [] as FeedbackTypeBean[] | ||
| 17 | + | ||
| 18 | + async aboutToAppear() { | ||
| 19 | + await this.getContentDetailData() | ||
| 20 | + } | ||
| 21 | + | ||
| 22 | + build() { | ||
| 23 | + Column() { | ||
| 24 | + //标题栏目 | ||
| 25 | + CustomTitleUI({ titleName: "意见反馈" }) | ||
| 26 | + Stack({ alignContent: Alignment.Bottom }) { | ||
| 27 | + Scroll(this.scroller) { | ||
| 28 | + Column() { | ||
| 29 | + Text('请选择问题类型') | ||
| 30 | + .fontColor($r('app.color.color_222222')) | ||
| 31 | + .fontSize($r('app.float.font_size_16')) | ||
| 32 | + .fontWeight(FontWeight.Bold) | ||
| 33 | + .margin({ left: $r('app.float.vp_15'), top: $r('app.float.vp_14') }) | ||
| 34 | + GridRow({ | ||
| 35 | + gutter: { x: 2, y: 2 } | ||
| 36 | + }) { | ||
| 37 | + ForEach(this.feedbackTypeBeans, (item: FeedbackTypeBean, index: number) => { | ||
| 38 | + GridCol({ | ||
| 39 | + span: 12 | ||
| 40 | + }) { | ||
| 41 | + Row(){ | ||
| 42 | + Toggle({ type: ToggleType.Checkbox, isOn: false }) | ||
| 43 | + Text(item.classifyName) | ||
| 44 | + .fontColor($r('app.color.color_222222')) | ||
| 45 | + .fontSize($r('app.float.font_size_14')) | ||
| 46 | + .fontWeight(FontWeight.Bold) | ||
| 47 | + .margin({ left: $r('app.float.vp_4') }) | ||
| 48 | + } | ||
| 49 | + .width(115) | ||
| 50 | + .height(22) | ||
| 51 | + .backgroundColor($r('app.color.color_fff')) | ||
| 52 | + } | ||
| 53 | + }) | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + Blank() | ||
| 57 | + .height(0.5) | ||
| 58 | + .margin({ left: $r('app.float.vp_16'), top: $r('app.float.vp_12'), right: $r('app.float.vp_16') }) | ||
| 59 | + .backgroundColor($r('app.color.color_EDEDED')) | ||
| 60 | + Text('描述您的问题') | ||
| 61 | + .fontColor($r('app.color.color_222222')) | ||
| 62 | + .fontSize($r('app.float.font_size_16')) | ||
| 63 | + .fontWeight(FontWeight.Bold) | ||
| 64 | + .margin({ left: $r('app.float.vp_16'), top: $r('app.float.vp_12') }) | ||
| 65 | + Stack() { | ||
| 66 | + TextInput({ placeholder: '您的宝贵意见是我们前行的动力' }) { | ||
| 67 | + | ||
| 68 | + } | ||
| 69 | + | ||
| 70 | + GridRow({ | ||
| 71 | + gutter: { x: 2, y: 2 } | ||
| 72 | + }) { | ||
| 73 | + ForEach(this.feedbackTypeBeans, (item: FeedbackTypeBean, index: number) => { | ||
| 74 | + GridCol({ | ||
| 75 | + span: 12 | ||
| 76 | + }) { | ||
| 77 | + } | ||
| 78 | + }) | ||
| 79 | + } | ||
| 80 | + | ||
| 81 | + Text('0/500') | ||
| 82 | + } | ||
| 83 | + .height(200) | ||
| 84 | + .width('100%') | ||
| 85 | + .margin({ left: $r('app.float.vp_16'), top: $r('app.float.vp_12'), right: $r('app.float.vp_16') }) | ||
| 86 | + .backgroundColor($r('app.color.color_F5F5F5')) | ||
| 87 | + .borderRadius(4) | ||
| 88 | + | ||
| 89 | + Text('期待您留下联系方式,我们将提供更好的服务') | ||
| 90 | + .fontColor($r('app.color.color_222222')) | ||
| 91 | + .fontSize($r('app.float.font_size_14')) | ||
| 92 | + .fontWeight(FontWeight.Bold) | ||
| 93 | + .margin({ left: $r('app.float.vp_16'), top: $r('app.float.margin_24') }) | ||
| 94 | + Row() { | ||
| 95 | + Text('电话或者邮箱') | ||
| 96 | + .fontColor($r('app.color.color_222222')) | ||
| 97 | + .fontSize($r('app.float.font_size_14')) | ||
| 98 | + .fontWeight(FontWeight.Bold) | ||
| 99 | + .margin({ left: $r('app.float.vp_12') }) | ||
| 100 | + TextInput({ placeholder: '请输入电话或者邮箱' }) { | ||
| 101 | + | ||
| 102 | + } | ||
| 103 | + } | ||
| 104 | + .height(44) | ||
| 105 | + .margin({ left: $r('app.float.vp_16'), top: $r('app.float.vp_12'), top: $r('app.float.margin_16') }) | ||
| 106 | + .backgroundColor($r('app.color.color_F5F5F5')) | ||
| 107 | + .borderRadius(4) | ||
| 108 | + } | ||
| 109 | + } | ||
| 110 | + | ||
| 111 | + Text($r('app.string.submit')) | ||
| 112 | + .height(44) | ||
| 113 | + .fontColor($r('app.color.color_9E9E9E_40')) | ||
| 114 | + .fontSize($r('app.float.font_size_18')) | ||
| 115 | + .margin({ left: $r('app.float.vp_16'), top: $r('app.float.vp_16'), top: $r('app.float.vp_15') }) | ||
| 116 | + .backgroundColor($r('app.color.color_ED2800_99')) | ||
| 117 | + .borderRadius(4) | ||
| 118 | + } | ||
| 119 | + } | ||
| 120 | + } | ||
| 121 | + /** | ||
| 122 | + * 请求接口数据 | ||
| 123 | + * */ | ||
| 124 | + private async getContentDetailData() { | ||
| 125 | + this.isNetConnected = NetworkUtil.isNetConnected() | ||
| 126 | + try { | ||
| 127 | + this.feedbackTypeBeans = await MultiPictureDetailViewModel.getFeedbackTypeList() | ||
| 128 | + | ||
| 129 | + } catch (exception) { | ||
| 130 | + console.log('请求失败',JSON.stringify(exception)) | ||
| 131 | + } | ||
| 132 | + } | ||
| 133 | +} |
| @@ -23,9 +23,11 @@ import { | @@ -23,9 +23,11 @@ import { | ||
| 23 | postExecuteLikeParams, | 23 | postExecuteLikeParams, |
| 24 | postInteractAccentionOperateParams, | 24 | postInteractAccentionOperateParams, |
| 25 | postRecommendListParams, | 25 | postRecommendListParams, |
| 26 | - GoldenPositionExtraBean | 26 | + GoldenPositionExtraBean, |
| 27 | + FeedbackTypeBean | ||
| 27 | } from 'wdBean'; | 28 | } from 'wdBean'; |
| 28 | import { PageUIReqBean } from '../components/page/bean/PageUIReqBean'; | 29 | import { PageUIReqBean } from '../components/page/bean/PageUIReqBean'; |
| 30 | +import { ArrayList } from '@kit.ArkTS'; | ||
| 29 | 31 | ||
| 30 | const TAG = 'HttpRequest'; | 32 | const TAG = 'HttpRequest'; |
| 31 | 33 | ||
| @@ -462,4 +464,10 @@ export class PageRepository { | @@ -462,4 +464,10 @@ export class PageRepository { | ||
| 462 | Logger.info(TAG, "postThemeList url = " + url + JSON.stringify(params)) | 464 | Logger.info(TAG, "postThemeList url = " + url + JSON.stringify(params)) |
| 463 | return WDHttp.post<ResponseDTO<LiveReviewDTO>>(url, params) | 465 | return WDHttp.post<ResponseDTO<LiveReviewDTO>>(url, params) |
| 464 | }; | 466 | }; |
| 467 | + | ||
| 468 | + static getFeedbackTypeList() { | ||
| 469 | + let url = HttpUrlUtils.getHost() + HttpUrlUtils.FEEDBACK_TYPE_PATH; | ||
| 470 | + url = url + "?dictCode=" + "CN_OPINION_TYPE"; | ||
| 471 | + return WDHttp.get<ResponseDTO<FeedbackTypeBean[]>>(url) | ||
| 472 | + }; | ||
| 465 | } | 473 | } |
| @@ -6,9 +6,11 @@ import { ContentDetailDTO, | @@ -6,9 +6,11 @@ import { ContentDetailDTO, | ||
| 6 | postBatchAttentionStatusParams, | 6 | postBatchAttentionStatusParams, |
| 7 | postBatchAttentionStatusResult, | 7 | postBatchAttentionStatusResult, |
| 8 | postInteractBrowsOperateParams, | 8 | postInteractBrowsOperateParams, |
| 9 | - InteractDataDTO | 9 | + InteractDataDTO, |
| 10 | + FeedbackTypeBean | ||
| 10 | } from 'wdBean'; | 11 | } from 'wdBean'; |
| 11 | import { PageRepository } from '../repository/PageRepository'; | 12 | import { PageRepository } from '../repository/PageRepository'; |
| 13 | +import { ArrayList } from '@kit.ArkTS'; | ||
| 12 | 14 | ||
| 13 | const TAG = 'MultiPictureDetailViewModel'; | 15 | const TAG = 'MultiPictureDetailViewModel'; |
| 14 | 16 | ||
| @@ -131,4 +133,27 @@ export class MultiPictureDetailViewModel { | @@ -131,4 +133,27 @@ export class MultiPictureDetailViewModel { | ||
| 131 | }) | 133 | }) |
| 132 | } | 134 | } |
| 133 | 135 | ||
| 136 | + | ||
| 137 | + static async getFeedbackTypeList(): Promise<FeedbackTypeBean[]> { | ||
| 138 | + return new Promise<FeedbackTypeBean[]>((success, error) => { | ||
| 139 | + Logger.info(TAG, `fetchDetailData start`); | ||
| 140 | + PageRepository.getFeedbackTypeList().then((resDTO: ResponseDTO<FeedbackTypeBean[]>) => { | ||
| 141 | + if (!resDTO || !resDTO.data) { | ||
| 142 | + Logger.error(TAG, 'fetchDetailData is empty'); | ||
| 143 | + error('resDTO is empty'); | ||
| 144 | + return | ||
| 145 | + } | ||
| 146 | + if (resDTO.code != 0) { | ||
| 147 | + Logger.error(TAG, `fetchDetailData then code:${resDTO.code}, message:${resDTO.message}`); | ||
| 148 | + error('resDTO Response Code is failure'); | ||
| 149 | + return | ||
| 150 | + } | ||
| 151 | + Logger.info(TAG, "fetchDetailData then,navResDTO.timestamp:" + resDTO.timestamp); | ||
| 152 | + success(resDTO.data); | ||
| 153 | + }).catch((err: Error) => { | ||
| 154 | + Logger.error(TAG, `fetchDetailData catch, error.name : ${err.name}, error.message:${err.message}`); | ||
| 155 | + error(err); | ||
| 156 | + }) | ||
| 157 | + }) | ||
| 158 | + } | ||
| 134 | } | 159 | } |
| @@ -160,5 +160,15 @@ | @@ -160,5 +160,15 @@ | ||
| 160 | "name": "res_color_general_000000_30", | 160 | "name": "res_color_general_000000_30", |
| 161 | "value": "#4D000000" | 161 | "value": "#4D000000" |
| 162 | } | 162 | } |
| 163 | + , | ||
| 164 | + { | ||
| 165 | + "name": "color_9E9E9E_40", | ||
| 166 | + "value": "#40FFFFFF" | ||
| 167 | + } | ||
| 168 | + , | ||
| 169 | + { | ||
| 170 | + "name": "color_ED2800_99", | ||
| 171 | + "value": "#99ED2800" | ||
| 172 | + } | ||
| 163 | ] | 173 | ] |
| 164 | } | 174 | } |
| @@ -241,6 +241,10 @@ | @@ -241,6 +241,10 @@ | ||
| 241 | "value": "12vp" | 241 | "value": "12vp" |
| 242 | }, | 242 | }, |
| 243 | { | 243 | { |
| 244 | + "name": "vp_4", | ||
| 245 | + "value": "4vp" | ||
| 246 | + }, | ||
| 247 | + { | ||
| 244 | "name": "vp_8", | 248 | "name": "vp_8", |
| 245 | "value": "8vp" | 249 | "value": "8vp" |
| 246 | }, | 250 | }, |
| @@ -281,6 +285,10 @@ | @@ -281,6 +285,10 @@ | ||
| 281 | "value": "14vp" | 285 | "value": "14vp" |
| 282 | }, | 286 | }, |
| 283 | { | 287 | { |
| 288 | + "name": "vp_15", | ||
| 289 | + "value": "15vp" | ||
| 290 | + }, | ||
| 291 | + { | ||
| 284 | "name": "vp_18", | 292 | "name": "vp_18", |
| 285 | "value": "18vp" | 293 | "value": "18vp" |
| 286 | }, | 294 | }, |
-
Please register or login to post a comment