upload.js 496 B

1234567891011121314151617181920212223242526272829303132
  1. import * as WxJsApi from '@/utils/wxJsApi.js'
  2. export default {
  3. data() {
  4. return {
  5. imgBase64:'',
  6. step:1,
  7. }
  8. },
  9. methods: {
  10. uploadPic(){
  11. WxJsApi.chooseImage(9,true).then(res=>{
  12. var localId=res[0]
  13. uni.navigateTo({
  14. url:'/pages/buytickets/adjust?localId='+localId
  15. })
  16. })
  17. }
  18. },
  19. onReady() {
  20. this.$refs.common.showLoading()
  21. WxJsApi.getWxConfig(['chooseImage']).then(()=>{
  22. this.$refs.common.showLoading(false)
  23. });
  24. }
  25. }