upimg.vue 745 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <template>
  2. <view>
  3. <CustomCamera ref="CustomCamera" :coverImageType="type" @back="back" @getImage="getImage" />
  4. </view>
  5. </template>
  6. <script>
  7. // #ifdef APP-PLUS
  8. import CustomCamera from "@/components/CustomCamera/APP/index.nvue"
  9. // #endif
  10. // #ifdef MP-WEIXIN
  11. import CustomCamera from "@/components/CustomCamera/WeChat/index.vue"
  12. // #endif
  13. export default {
  14. data() {
  15. return {
  16. type: 'side'
  17. }
  18. },
  19. components: {
  20. CustomCamera
  21. },
  22. onLoad(opt) {
  23. this.type = opt.type
  24. },
  25. methods: {
  26. back() {
  27. uni.navigateBack()
  28. },
  29. getImage(res) {
  30. this.$api.prePage().upimgg(res,this.type == 'side'?'sfzf':'sfzz');
  31. setTimeout(()=> {
  32. uni.navigateBack()
  33. })
  34. // console.log(res)
  35. }
  36. }
  37. }
  38. </script>