Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
张善主
2024-05-23 14:29:17 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
eee04cb12c1367b1e25884713c0175a75df90af8
eee04cb1
1 parent
02d87b0b
fix(17814):功能缺陷-【uat】意见反馈-点击提交按钮没有反应
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
41 additions
and
26 deletions
sight_harmony/features/wdBean/Index.ets
sight_harmony/features/wdBean/src/main/ets/bean/content/FeedBackParams.ets
sight_harmony/features/wdBean/src/main/ets/bean/detail/FeedbackTypeBean.ts
sight_harmony/features/wdComponent/src/main/ets/components/FeedBackActivity.ets
sight_harmony/features/wdComponent/src/main/ets/viewmodel/MultiPictureDetailViewModel.ets
sight_harmony/features/wdBean/Index.ets
View file @
eee04cb
...
...
@@ -175,3 +175,6 @@ export { ReserveItemBean } from './src/main/ets/bean/live/ReserveItemBean';
export { FeedbackTypeBean } from './src/main/ets/bean/detail/FeedbackTypeBean';
export { FeedBackParams } from './src/main/ets/bean/content/FeedBackParams';
...
...
sight_harmony/features/wdBean/src/main/ets/bean/content/FeedBackParams.ets
0 → 100644
View file @
eee04cb
export interface FeedBackParams {
content:string
classifyFlagIds:string
userContact:string
userName:string
appVersion:string
appDevice:string
}
\ No newline at end of file
...
...
sight_harmony/features/wdBean/src/main/ets/bean/detail/FeedbackTypeBean.ts
View file @
eee04cb
export
interface
FeedbackTypeBean
{
classifyName
:
string
;
id
:
number
;
is
s
elect
:
boolean
;
is
S
elect
:
boolean
;
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/FeedBackActivity.ets
View file @
eee04cb
import { FeedbackTypeBean, PhotoListBean } from 'wdBean/Index';
import {
FeedBackParams,
FeedbackTypeBean, PhotoListBean } from 'wdBean/Index';
import { AppUtils,
DeviceUtil,
FastClickUtil, Logger, NetworkUtil, StringUtils, ToastUtils, UserDataLocal } from 'wdKit/Index';
...
...
@@ -60,9 +60,9 @@ export struct FeedBackActivity {
GridCol({
}) {
Row(){
Toggle({ type: ToggleType.Checkbox, isOn: f
alse
})
Toggle({ type: ToggleType.Checkbox, isOn: f
eedbackTypeBean.isSelect
})
.onChange((select) => {
feedbackTypeBean.is
s
elect = select
feedbackTypeBean.is
S
elect = select
this.canSubmit = this.checkSubmit()
})
Text(feedbackTypeBean.classifyName)
...
...
@@ -325,8 +325,8 @@ export struct FeedBackActivity {
//问题类型必选
let selectType = ""
this.feedbackTypeBeans.forEach((value) => {
if(value.isselect){
selectType = selectType+","
if(value.isSelect){
selectType = selectType+value.id+","
}
})
if(!StringUtils.isEmpty(selectType)){
...
...
@@ -343,29 +343,31 @@ export struct FeedBackActivity {
}
try {
let map: HashMap<String,String> = {} as HashMap<String,String>
//反馈内容
map.set("content", this.contact);
//投诉类型 id
map.set("classifyFlagIds", selectType);
if(!StringUtils.isEmpty(this.email)){
let feedBackParams: FeedBackParams = {
//反馈内容
"content": this.contact,
//投诉类型 id
"classifyFlagIds": selectType,
//设备
"appVersion": "V" + AppUtils.getAppVersionName(),
"appDevice": "harmony" + DeviceUtil.getDisplayVersion() + " " + DeviceUtil.getProductModel()
} as FeedBackParams
//邮箱
map.set("userContact", this.email);
if(!StringUtils.isEmpty(this.email)){
feedBackParams.userContact = this.email
}
//用户名称
if (!StringUtils.isEmpty(UserDataLocal.getUserName())) {
map.set("userName", UserDataLocal.getUserName());
if(!StringUtils.isEmpty(UserDataLocal.getUserName())){
feedBackParams.userName = UserDataLocal.getUserName()
}
//设备
map.set("appVersion", "V" + AppUtils.getAppVersionName());
map.set("appDevice", "harmony" + DeviceUtil.getDisplayVersion() + " " + DeviceUtil.getProductModel());
// //投诉图片
// if (imageUrl.size() > 0) {
// String[] str = imageUrl.toArray(new String[imageUrl.size()]);
// map.set("imageUrls", str);
// }
await MultiPictureDetailViewModel.feedBackCommit(map)
await MultiPictureDetailViewModel.feedBackCommit(feedBackParams)
router.back();
} catch (exception) {
console.log('请求失败',JSON.stringify(exception))
}
...
...
sight_harmony/features/wdComponent/src/main/ets/viewmodel/MultiPictureDetailViewModel.ets
View file @
eee04cb
...
...
@@ -8,11 +8,12 @@ import { ContentDetailDTO,
postBatchAttentionStatusResult,
postInteractBrowsOperateParams,
InteractDataDTO,
FeedbackTypeBean
FeedbackTypeBean,
FeedBackParams
} from 'wdBean';
import { PageRepository } from '../repository/PageRepository';
import { ArrayList } from '@kit.ArkTS';
import { ToastUtils} from 'wdKit/Index';
const TAG = 'MultiPictureDetailViewModel';
export class MultiPictureDetailViewModel {
...
...
@@ -158,15 +159,16 @@ export class MultiPictureDetailViewModel {
})
}
static async feedBackCommit(params:HashMap<String,String>): Promise<ResponseDTO> {
return new Promise<ResponseDTO>((success, error) => {
static async feedBackCommit(params:FeedBackParams): Promise<object> {
return new Promise<object>((success, error) => {
Logger.info(TAG, `fetchDetailData start`);
WDHttp.post(HttpUrlUtils.getHost() + HttpUrlUtils.FEEDBACK_COMMIT_PATH,params).then((resDTO: ResponseDTO) => {
WDHttp.post(HttpUrlUtils.getHost() + HttpUrlUtils.FEEDBACK_COMMIT_PATH,params).then((resDTO: object) => {
success(resDTO);
ToastUtils.shortToast('反馈成功')
}).catch((err: Error) => {
Logger.error(TAG, `fetchDetailData catch, error.name : ${err.name}, error.message:${err.message}`);
error(err);
ToastUtils.shortToast('反馈失败')
})
})
}
...
...
Please
register
or
login
to post a comment