feat: 字段的调整和问卷跳转的处理
This commit is contained in:
@@ -2,16 +2,9 @@
|
||||
<view class="container">
|
||||
<ModuleTitle :title="recommendTheme.themeName" />
|
||||
<view class="container-scroll">
|
||||
<view
|
||||
v-for="(item, index) in recommendTheme.recommendPostsList"
|
||||
:key="index"
|
||||
>
|
||||
<view v-for="(item, index) in recommendTheme.recommendPostsList" :key="index">
|
||||
<view class="mk-card-item" @click="sendReply(item)">
|
||||
<image
|
||||
class="card-img"
|
||||
:src="item.coverPhoto"
|
||||
mode="widthFix"
|
||||
></image>
|
||||
<image class="card-img" :src="item.coverPhoto" mode="widthFix"></image>
|
||||
<text class="card-text">{{ item.topic }}</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -20,7 +13,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { SEND_MESSAGE_CONTENT_TEXT } from "@/constant/constant";
|
||||
import { SEND_MESSAGE_CONTENT_TEXT, SEND_MESSAGE_COMMAND_TYPE } from "@/constant/constant";
|
||||
import { defineProps } from "vue";
|
||||
import ModuleTitle from "@/components/ModuleTitle/index.vue";
|
||||
|
||||
@@ -32,7 +25,12 @@ const props = defineProps({
|
||||
});
|
||||
|
||||
const sendReply = (item) => {
|
||||
const topic = item.userInputContent || item.topic.replace(/^#/, "");
|
||||
if (item.userInputContentType && item.userInputContentType === '1') {
|
||||
const commonItem = { type: item.userInputContent, title: item.topic }
|
||||
uni.$emit(SEND_MESSAGE_COMMAND_TYPE, commonItem);
|
||||
return;
|
||||
}
|
||||
const topic = item.topic.replace(/^#/, "");
|
||||
uni.$emit(SEND_MESSAGE_CONTENT_TEXT, topic);
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user