Browse Source

读者留言修改

master
xuhuajiao 1 month ago
parent
commit
cde8d4793a
  1. 8
      public/static/config.js
  2. 20
      src/views/weChatMiniProgram/feedback.vue

8
public/static/config.js

@ -1,10 +1,4 @@
window.g = {
AXIOS_TIMEOUT: 10000,
//ApiUrl: 'http://192.168.3.220:12010', // 江夏配置服务器地址,
ApiUrl: 'http://192.168.99.63:14000', // 配置服务器地址,
// ParentPage: { // 后续看需求配置
// CrossDomainProxyUrl: '/Home/CrossDomainProxy',
// BtnsApi: '/api/services/app/Authorization/GetBtns',
// OrgsApi: '/api/services/app/authorization/GetOrgsByUserId'
// },
ApiUrl: 'https://wechatapi.aiyxlib.com', // 配置服务器地址
}

20
src/views/weChatMiniProgram/feedback.vue

@ -84,13 +84,11 @@
<el-form v-if="!replyForm.reply" ref="replyForm" :model="replyForm" :rules="replyRules" size="small">
<el-form-item label="回复内容" prop="reply">
<el-input
v-model="replyForm.reply"
v-model="editReply"
type="textarea"
rows="5"
placeholder="请输入回复内容"
style="width: 762px;"
:readonly="!!replyForm.reply"
:style="{ backgroundColor: replyForm.reply ? '#f5f7fa' : '#fff' }"
/>
</el-form-item>
</el-form>
@ -180,6 +178,8 @@ export default {
id: null,
reply: ''
},
//
editReply: '',
replyRules: {
reply: [{ required: true, message: '请输入回复内容', trigger: 'blur' }]
},
@ -227,20 +227,23 @@ export default {
},
handleReply(row) {
this.replyForm = { ...row }
this.editReply = ''
this.replyVisible = true
},
onRowDblclick(row) {
this.replyForm = { ...row }
this.replyVisible = true
this.handleReply(row)
},
async submitReply() {
if (this.replyForm.reply) return
await this.$refs.replyForm.validate()
//
if (!this.editReply.trim()) {
this.$message.warning('请输入回复内容')
return
}
this.replyLoading = true
try {
const params = {
id: this.replyForm.id,
reply: this.replyForm.reply
reply: this.editReply
}
await FetchReplyReaderMessage(params)
this.$message.success('回复成功')
@ -259,6 +262,7 @@ export default {
if (this.$refs.replyForm) {
this.$refs.replyForm.clearValidate()
}
this.editReply = ''
this.replyVisible = false
})
}

Loading…
Cancel
Save