提交 67739955 authored 作者: 劳广强's avatar 劳广强

fix: 修复 选择上报类型 第一次弹出举报说明弹窗

上级 bfd2b50a
...@@ -36,6 +36,9 @@ export default { ...@@ -36,6 +36,9 @@ export default {
list: [], list: [],
content: '', content: '',
showReport: false, showReport: false,
isFirstRecordType: 0,
isFirstRecordTypeId: 0,
}; };
}, },
...@@ -51,6 +54,10 @@ export default { ...@@ -51,6 +54,10 @@ export default {
this.fetchPhotoTaskTypeDetail(); this.fetchPhotoTaskTypeDetail();
}, },
onShow(options) {
this.isFirstRecordType = this.getIsFirstRecordType();
},
methods: { methods: {
async fetchPhotoTaskTypeData() { async fetchPhotoTaskTypeData() {
const { list } = await uni.$u.http.get('/api/app/phototasktype/list', { params: { parent_id: this.query.id } }); const { list } = await uni.$u.http.get('/api/app/phototasktype/list', { params: { parent_id: this.query.id } });
...@@ -68,10 +75,25 @@ export default { ...@@ -68,10 +75,25 @@ export default {
}, },
async onReportConfirm() { async onReportConfirm() {
if (!this.isFirstRecordType) {
this.showReport = false;
uni.$u.route({
url: 'pages/record-content/index',
params: {
parent_id: this.query.id,
detail_id: this.isFirstRecordTypeId,
},
});
}
this.showReport = false; this.showReport = false;
}, },
onListClick(item, index) { onListClick(item, index) {
if (!this.isFirstRecordType) {
this.isFirstRecordTypeId = item.id;
this.showReport = true;
return;
}
uni.$u.route({ uni.$u.route({
url: 'pages/record-content/index', url: 'pages/record-content/index',
params: { params: {
...@@ -80,6 +102,12 @@ export default { ...@@ -80,6 +102,12 @@ export default {
}, },
}); });
}, },
getIsFirstRecordType() {
const isFirstRecordType = uni.getStorageSync('isFirstRecordType');
if (!isFirstRecordType) uni.setStorageSync('isFirstRecordType', 1);
return isFirstRecordType;
},
}, },
}; };
</script> </script>
......
...@@ -53,6 +53,9 @@ export default { ...@@ -53,6 +53,9 @@ export default {
content: content:
'1.本平台仅接收荣县行政区域内的交通违法网上举报,且违法行为发生后30日内举报有效。 \n2.举报人不得在驾驶过程中或其他有碍交通安全的情况下进行举报。 \n3.举报人提供的照片和视频应当客观真实,并通过合法途径、合法方式取得。举报人应当如实描述违法行为发生时间、地点,违法机动车号牌、外观和具体违法行为,并能够与举报视频相互印证。缺乏上述要素的,公安交警部门依法不予以受理 \n4.对多次举报失实,恶意举报的举报人,经查证属实的,公安机关交通管理部门不再受理其举报。故意捏造违法事实陷害他人、以举报为手段敲诈勒索的,将按相关规定纳入公民社会征信体系。涉嫌违法犯罪的,依法追究法律责任。 \n5.不属于本平台接受范围的交通违法举报以及对交通执法管理的意见建议,可以联系属地公安交警部。 \n6.举报人在拍摄交通违法视频前,应当仔细阅读各类违法举报的拍摄要点及要求,拍摄的视频文件大小不超过50M。 \n7.如使用行车记录仪视频进行举报,切勿进行压缩、转码等操作,应剪辑行车记录仪设备存储卡内原始视频后上传,以确保上传视频清晰。', '1.本平台仅接收荣县行政区域内的交通违法网上举报,且违法行为发生后30日内举报有效。 \n2.举报人不得在驾驶过程中或其他有碍交通安全的情况下进行举报。 \n3.举报人提供的照片和视频应当客观真实,并通过合法途径、合法方式取得。举报人应当如实描述违法行为发生时间、地点,违法机动车号牌、外观和具体违法行为,并能够与举报视频相互印证。缺乏上述要素的,公安交警部门依法不予以受理 \n4.对多次举报失实,恶意举报的举报人,经查证属实的,公安机关交通管理部门不再受理其举报。故意捏造违法事实陷害他人、以举报为手段敲诈勒索的,将按相关规定纳入公民社会征信体系。涉嫌违法犯罪的,依法追究法律责任。 \n5.不属于本平台接受范围的交通违法举报以及对交通执法管理的意见建议,可以联系属地公安交警部。 \n6.举报人在拍摄交通违法视频前,应当仔细阅读各类违法举报的拍摄要点及要求,拍摄的视频文件大小不超过50M。 \n7.如使用行车记录仪视频进行举报,切勿进行压缩、转码等操作,应剪辑行车记录仪设备存储卡内原始视频后上传,以确保上传视频清晰。',
showReport: false, showReport: false,
isFirstRecord: 0,
isFirstRecordId: 0,
}; };
}, },
...@@ -67,6 +70,10 @@ export default { ...@@ -67,6 +70,10 @@ export default {
// this.fetchPhotoTaskTypeDetail(); // this.fetchPhotoTaskTypeDetail();
}, },
onShow(options) {
this.isFirstRecord = this.getIsFirstRecord();
},
methods: { methods: {
async fetchPhotoTaskTypeData() { async fetchPhotoTaskTypeData() {
const { list } = await uni.$u.http.get('/api/app/phototasktype/list', { params: { parent_id: 0 } }); const { list } = await uni.$u.http.get('/api/app/phototasktype/list', { params: { parent_id: 0 } });
...@@ -84,12 +91,27 @@ export default { ...@@ -84,12 +91,27 @@ export default {
}, },
async onReportConfirm() { async onReportConfirm() {
if (!this.isFirstRecord) {
this.showReport = false;
uni.$u.route({ url: 'pages/record-type/index', params: { id: this.isFirstRecordId } });
}
this.showReport = false; this.showReport = false;
}, },
onListClick(item, index) { onListClick(item, index) {
if (!this.isFirstRecord) {
this.isFirstRecordId = item.id;
this.showReport = true;
return;
}
uni.$u.route({ url: 'pages/record-type/index', params: { id: item.id } }); uni.$u.route({ url: 'pages/record-type/index', params: { id: item.id } });
}, },
getIsFirstRecord() {
const isFirstRecord = uni.getStorageSync('isFirstRecord');
if (!isFirstRecord) uni.setStorageSync('isFirstRecord', 1);
return isFirstRecord;
},
}, },
}; };
</script> </script>
......
...@@ -10,7 +10,7 @@ module.exports = (vm) => { ...@@ -10,7 +10,7 @@ module.exports = (vm) => {
(config) => { (config) => {
config.data = config.data || {}; config.data = config.data || {};
config.params.token = '1234qwer1234'; config.params.token = 'd957a00e9a9834b7fda7578f334cb67e';
return config; return config;
}, },
(config) => { (config) => {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论