满意度调用不能评分bug

main
yanzai 1 year ago
parent 356a5d0f06
commit c7cb365e39

@ -75,9 +75,9 @@ const getContent = (item) => {
return contentArr; return contentArr;
}; };
const checkItem = (val, index) => { const checkItem = (val, index,topicIndex) => {
console.log(val); console.log(val);
let items = topicList.value[topicIndex.value]; let items = topicList.value[topicIndex];
console.log(items); console.log(items);
if (items.type == 2) { if (items.type == 2) {
// //
@ -93,10 +93,10 @@ const checkItem = (val, index) => {
} else { } else {
// //
if (items.answer.includes(val.value)) { if (items.answer.includes(val.value)) {
items.answer = topicList.value[topicIndex.value].answer.filter( items.answer = topicList.value[topicIndex].answer.filter(
(item) => item != val.value (item) => item != val.value
); );
items.index = topicList.value[topicIndex.value].index.filter( items.index = topicList.value[topicIndex].index.filter(
(item) => item != index (item) => item != index
); );
items.more[index] = ""; // items.more[index] = ""; //
@ -107,6 +107,7 @@ const checkItem = (val, index) => {
items.isInputList[index] = val.isInput; items.isInputList[index] = val.isInput;
} }
} }
console.log(topicList.value); console.log(topicList.value);
}; };
@ -298,7 +299,7 @@ onShow(() => {
</view> </view>
<view class="px-30rpx box-border mt-40rpx" v-if="topicList.length"> <view class="px-30rpx box-border mt-40rpx" v-if="topicList.length">
<view <view
v-for="(i,topicIndex) in topicList" :key="k" v-for="(i,topicIndex) in topicList" :key="topicIndex"
class="bg-#fff mb-4 shadow-[0rpx_0rpx_10rpx_0rpx_rgba(0,0,0,0.04)] px-45rpx py40rpx box-border rounded-15rpx" class="bg-#fff mb-4 shadow-[0rpx_0rpx_10rpx_0rpx_rgba(0,0,0,0.04)] px-45rpx py40rpx box-border rounded-15rpx"
> >
<view class="text-#000000 text-30rpx" <view class="text-#000000 text-30rpx"
@ -315,7 +316,7 @@ onShow(() => {
<view v-for="(val, index) in getContent(topicList[topicIndex])" :key="index"> <view v-for="(val, index) in getContent(topicList[topicIndex])" :key="index">
<view <view
class="flex items-center mt-30rpx" class="flex items-center mt-30rpx"
@click="checkItem(val, index)" @click="checkItem(val, index,topicIndex)"
> >
<uni-icons <uni-icons
v-if="topicList[topicIndex]?.type == 2" v-if="topicList[topicIndex]?.type == 2"

Loading…
Cancel
Save