修复添加评论后跳转回列表

This commit is contained in:
田岩
2025-07-04 10:11:17 +08:00
parent 2106a6a705
commit 18b1bd6320
9 changed files with 46 additions and 22 deletions
+2 -3
View File
@@ -4,6 +4,5 @@
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
#Wed Jul 02 20:55:16 CST 2025
# sdk.dir=C\:\\Users\\ty\\AppData\\Local\\Android\\Sdk
sdk.dir=/data/jenkins/agent/workspace/tra-app-build-test/android-sdk
#Thu Jul 03 09:46:08 CST 2025
sdk.dir=C\:\\Users\\ty\\AppData\\Local\\Android\\Sdk
+7
View File
@@ -128,6 +128,13 @@ export const getYsxy = (data) => request({
data
})
//获取服务条款
export const getFutk = (data) => request({
url: '/traapp/dfAgtInfo/queryValidDfAgtTerm',
method: 'post',
data
})
// 获取验证码(作废)
export const getLoginAppCheckCode = (data) => request({
url: '/traapp/access/checkCode',
@@ -13,11 +13,9 @@
import {
ref,
reactive,
defineEmits,
onMounted,
computed,
watch,
watch
} from 'vue'
import common from '@/common/common'
@@ -106,7 +106,7 @@
import {
qryTraCrsBbsDataByCrsNum,
replyTraCrsBbsInfo,
qryChildTraCrsBbsInfo,
qryChildTraCrsBbsInfo
} from '@/api/courseDetail.js';
import common from '@/common/common.js'
const popup = ref(null)
@@ -160,8 +160,7 @@
common.hideLoading()
}
}
onMounted(() => {
const getData = () => {
qryTraCrsBbsDataByCrsNum({
crsNum: props.crsNum
}).then(({
@@ -169,6 +168,10 @@
}) => {
Object.assign(message_list, body)
})
}
defineExpose({getData})
onMounted(() => {
getData()
})
</script>
+8 -2
View File
@@ -37,7 +37,7 @@
<knowledge v-model="form"></knowledge>
</view>
<view class="evaluate" v-if="tabAct == 2">
<comment :crsNum="form.crsNum" :imgId="form.imgId"></comment>
<comment ref="commentRef" :crsNum="form.crsNum" :imgId="form.imgId"></comment>
</view>
</view>
@@ -64,7 +64,7 @@
ref
} from 'vue';
import {
onLoad
onLoad,onShow
} from '@dcloudio/uni-app';
import {
getCourseDetailApi
@@ -83,6 +83,7 @@
}, {
name: '评价'
}]);
const commentRef = ref(null);
const form = ref({});
const crsNum = ref('');
const tabAct = ref(0);
@@ -101,6 +102,11 @@
crsNum.value = params.crsNum;
getData();
});
onShow(() => {
if (common.getPageCache('GLOBAL_TRIGGER_UPDATE_REFRESH_KEY')) {
commentRef.value.getData();
}
});
</script>
<style lang="scss" scoped>
+12 -4
View File
@@ -26,7 +26,8 @@
<view class="slider-box">
<!-- <uv-slider step="1" activeColor="#0066FF" :blockSize="14" v-model="formData.bbsGrade"
:min="0" :max="10"></uv-slider> -->
<slider :min="0" :max="10" :value="formData.bbsGrade" :step="0.1" :show-value="true" :blockSize="14"></slider>
<slider :min="0" :max="10" :value="formData.bbsGrade" :step="0.1" :show-value="true"
:blockSize="14"></slider>
</view>
<!-- <view class="flex-jcsb">
<view class="font_pf fz-30 c-000">0</view>
@@ -41,7 +42,8 @@
提问</view>
</view>
<view class="input-textarea">
<uv-textarea v-model="formData.bbsContent" height="124" count :maxlength="TextareaInputLimitCharacter"
<uv-textarea v-model="formData.bbsContent" height="124" count
:maxlength="TextareaInputLimitCharacter"
:placeholder="formData.bbsTag == 'SUG'?'请输入你的建议...':'请输入你的问题...'"></uv-textarea>
</view>
</view>
@@ -57,7 +59,9 @@
reactive,
ref
} from 'vue';
import {TextareaInputLimitCharacter} from "@/enum.js"
import {
TextareaInputLimitCharacter
} from "@/enum.js"
import {
onLoad
} from '@dcloudio/uni-app';
@@ -84,7 +88,11 @@
}
publishCrsEvaluation(formData).then(res => {
common.msg('发表成功')
setTimeout(() => common.navigateBack(), 500)
setTimeout(() => {
common.navigateBack(1, () => {
common.setPageCache('GLOBAL_TRIGGER_UPDATE_REFRESH_KEY', true)
})
}, 500)
})
}
onLoad((params) => {
+5 -2
View File
@@ -13,14 +13,17 @@
} from '@dcloudio/uni-app'
import common from '@/common/common'
import {
getYsxy
getYsxy,
getFutk
} from '@/api/login.js'
const ysxi_text = ref('')
onLoad((e) => {
common.loading()
if (e.page == 1) {
ysxi_text.value = "服务条款"
getFutk().then(res => {
ysxi_text.value = res.body.agtContt
common.hideLoading()
});
} else {
getYsxy().then(res => {
ysxi_text.value = res.body.agtContt
+1 -1
View File
@@ -91,7 +91,7 @@
common.loading('更新头像中')
try{
const data = {
bizScen: 'S3010',
bizScen: 'S3007',
thumbnailFlag: true,
thumbImgSize:100
}