|
|
|
|
@ -46,18 +46,18 @@ |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script setup> |
|
|
|
|
import { ref, inject, computed, watch } from 'vue' |
|
|
|
|
import { ref, computed, watch } from 'vue' |
|
|
|
|
import { storeToRefs } from 'pinia' |
|
|
|
|
import { Icon, Swipe, SwipeItem, Popup } from 'vant' |
|
|
|
|
import { useAppStore } from '@/store/app.js' |
|
|
|
|
|
|
|
|
|
const props = defineProps({ |
|
|
|
|
businessHandleInfo: { type: Object, default: () => ({}) }, |
|
|
|
|
autoOpen: { type: Boolean, default: true }, |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
const store = inject('appStore', null) |
|
|
|
|
const userId = inject('userId', ref('')) |
|
|
|
|
const mescrollContent = inject('mescrollContent', ref(null)) |
|
|
|
|
const manualService = inject('manualService', ref('1')) |
|
|
|
|
const store = useAppStore() |
|
|
|
|
const { userId, mescrollContent, manualService, businessHandleInfo: storeBusinessHandleInfo } = storeToRefs(store) |
|
|
|
|
|
|
|
|
|
const Popupshow = ref(false) |
|
|
|
|
const isBtnsubmit = ref(true) |
|
|
|
|
@ -66,7 +66,7 @@ const hasAutoOpened = ref(false) |
|
|
|
|
const displayInfo = computed(() => { |
|
|
|
|
const fromProp = props.businessHandleInfo |
|
|
|
|
if (fromProp && Array.isArray(fromProp.contents) && fromProp.contents.length) return fromProp |
|
|
|
|
return store?.businessHandleInfo || {} |
|
|
|
|
return storeBusinessHandleInfo.value || {} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
function getIconUrl(icon) { |
|
|
|
|
@ -92,7 +92,7 @@ function richCallAnswer(item) { |
|
|
|
|
serialNumber, |
|
|
|
|
clickTime: new Date().getTime() |
|
|
|
|
} |
|
|
|
|
store?.dispatch?.('updateClickTime', mdParmas).catch(err => { |
|
|
|
|
Promise.resolve(store.updateClickTime?.(mdParmas)).catch(err => { |
|
|
|
|
console.error(err) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
@ -102,14 +102,15 @@ function richCallAnswer(item) { |
|
|
|
|
msgText: '&' + text + '&', |
|
|
|
|
intentId: '', |
|
|
|
|
msgSource: manualService.value, |
|
|
|
|
questionType: 6 |
|
|
|
|
realText: text, |
|
|
|
|
questionType: 6, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (isBtnsubmit.value) { |
|
|
|
|
isBtnsubmit.value = false |
|
|
|
|
Popupshow.value = false |
|
|
|
|
scrollTopBody() |
|
|
|
|
const sending = store?.sendingRobot?.(sendParmas) || store?.dispatch?.('sendingRobot', sendParmas) |
|
|
|
|
const sending = store.sendingRobot(sendParmas) |
|
|
|
|
Promise.resolve(sending).then(() => { |
|
|
|
|
isBtnsubmit.value = true |
|
|
|
|
}).catch(err => { |
|
|
|
|
|