setHomework.vue 446 B

123456789101112131415161718192021222324252627282930313233
  1. <template>
  2. <view class="center">
  3. <view class="buttom" @click="submit()">上传作业</view>
  4. </view>
  5. </template>
  6. <script>
  7. import { sethomework } from '@/api/homework.js'
  8. export default {
  9. data(){
  10. return{
  11. id: '',
  12. }
  13. },
  14. onLoad(option) {
  15. this.id = option.id
  16. },
  17. methods:{
  18. submit(){
  19. sethomework({
  20. timetable_id: this.id
  21. }).then(() =>{
  22. }).catch(err =>{
  23. console.log(err)
  24. })
  25. }
  26. }
  27. }
  28. </script>
  29. <style>
  30. </style>