<script lang="ts">
import { defineComponent,onMounted,onUpdated,onUnmounted, reactive, toRefs } from 'vue'
export default defineComponent({
setup() {
const state = reactive({
n: 1
})
const add = () => {
state.n++
}
onMounted(() => {
fetch('/ajax/movieOnInfoList?token=&optimus_uuid=F04A6B70984011EB89DA9FC9709563EEE1FC4395B1554473B6696781D0EF2CDC&optimus_risk_level=71&optimus_code=10')
.then(data=>data.json())
.then(res=>{console.log(res)})
.catch(error=>Promise.reject(error))
})
onUpdated(()=>{
console.log('数据修改')
})
return {
...toRefs(state),
add
}
},
})
</script>