diff --git a/src/project/fd/AppAnswer/answerAdd.vue b/src/project/fd/AppAnswer/answerAdd.vue index 2635abfb..e847429f 100644 --- a/src/project/fd/AppAnswer/answerAdd.vue +++ b/src/project/fd/AppAnswer/answerAdd.vue @@ -1,17 +1,17 @@ @@ -22,16 +22,43 @@ export default { appName: "进行回答", data() { return { - value: '', form: { - url: [] - } + qid: '', + content: '', + files: [] + }, + flag: false, + } }, methods: { - + submit() { + if(this.flag) return + + if(!this.form.content) { + return this.$u.toast('请输入回答内容') + } + this.flag = true + this.$http.post(`/app/applearningquestion/addOrUpdateAnswer`, { + ...this.form + }).then(res=> { + if(res?.code==0) { + this.$u.toast('提交成功!') + setTimeout(()=> { + uni.navigateBack() + }, 500) + } + }) + } + }, + onLoad(o) { + if(o.qid) { + this.form.qid = o?.qid + } + if(o.data) { + this.form = JSON.parse(o?.data) + } }, - onShow() {}, } diff --git a/src/project/fd/AppAnswer/answerDetail.vue b/src/project/fd/AppAnswer/answerDetail.vue index 8d16ec2a..0df2558d 100644 --- a/src/project/fd/AppAnswer/answerDetail.vue +++ b/src/project/fd/AppAnswer/answerDetail.vue @@ -2,28 +2,24 @@
- +
-

-
产品部
+

{{ info.createUserName }}

+
{{ info.createUserDeptName }}
-
12-30 12:23:54
+
{{ info.createTime }}
- 极目新闻消息,据韩国《中央日报》报道,当地时间1月3日,韩国在对来自中国的入境者实施高强度防疫措施两天后, - 该国疾病预防控制中心运营的新冠信息管理系统出现错误,无法将中国入境者的信息传递给各地政府。 - 韩国仁川国际机场对中国游客进行检测(来源:韩联社) -据韩国疾病控制与预防中心和首尔市政府称,从3日上午开始,新冠信息管理系统出现错误,因此,本应传达给全国市、县、区公共卫生部门的中国入境者信息无法送达。 -有卫生部门人士表示:“疾病预防控制中心表示,下午2点左右系统将修复并恢复运行,但截止下午2时30分,还是没有恢复。” + {{ info.content }} +
+
+
- - -
-
删除
-
修改
+
删除
+
修改
@@ -33,14 +29,24 @@ export default { name: "answerDetail", appName: "Ta的回答", data() { - + return { + info: {}, + } }, methods: { + editBtn() { + uni.navigateTo({ + url: './answerAdd?data=' + JSON.stringify(this.info) + }) + }, deleteBtn(id) { this.$confirm('确定要删除该回答吗?').then(()=> { - this.$http.post(`/app/applearningquestion/deleteAnswer?id=${id}`,null, { - params: { - + this.$http.post(`/app/applearningquestion/deleteAnswer?id=${id}`).then(res=> { + if(res?.code == 0) { + this.$u.toast('删除成功!') + setTimeout(()=> { + uni.navigateBack() + }, 500) } }) }) @@ -52,7 +58,9 @@ export default { }) }, }, - onShow() {}, + onLoad(o) { + this.info = JSON.parse(o.data) + }, } @@ -91,6 +99,15 @@ export default { margin-top: 24px; } + .picture { + margin-top: 24px; + img { + width: 220px; + height: 220px; + margin-right: 8px; + } + } + .btn_box { position: fixed; bottom: 0; @@ -100,6 +117,8 @@ export default { padding: 16px 32px; box-sizing: border-box; display: flex; + background: #f3f5f7; + z-index: 9; div { flex: 1; border-radius: 44px; diff --git a/src/project/fd/AppAnswer/answerList.vue b/src/project/fd/AppAnswer/answerList.vue index a943e636..41c07321 100644 --- a/src/project/fd/AppAnswer/answerList.vue +++ b/src/project/fd/AppAnswer/answerList.vue @@ -1,70 +1,94 @@ @@ -122,7 +146,7 @@ export default { background: #FFF; padding: 0 24px 24px 24px; box-sizing: border-box; - border-bottom: 2px solid #E4E5E6; + .card_content { height: 100%; @@ -135,6 +159,10 @@ export default { } } + .card_radius { + border-radius: 0 0 16px 16px; + } + .card_btn { background: #FFF; height: 88px; @@ -142,6 +170,7 @@ export default { display: flex; align-items: center; border-radius: 0 0 16px 16px; + border-top: 2px solid #E4E5E6; div { flex: 1; text-align: center; diff --git a/src/project/fd/AppAnswer/component/List.vue b/src/project/fd/AppAnswer/component/List.vue index 9260d276..09f6a593 100644 --- a/src/project/fd/AppAnswer/component/List.vue +++ b/src/project/fd/AppAnswer/component/List.vue @@ -21,7 +21,7 @@
修改问题 - 去回答 + 去回答