index.vue 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <template>
  2. <view>
  3. <CustomCamera ref="CustomCamera" @takePhoto="takePhoto" @getImage="getImage" />
  4. </view>
  5. </template>
  6. <script>
  7. // #ifdef MP-WEIXIN
  8. import CustomCamera from "@/components/CustomCamera/WeChat/index.vue"
  9. // #endif
  10. export default {
  11. components: {
  12. CustomCamera
  13. },
  14. data() {
  15. return {
  16. coverImageType: 'side'
  17. }
  18. },
  19. onLoad(options) {
  20. this.coverImageType = options.coverImageType
  21. },
  22. onShareAppMessage(res) {
  23. return {
  24. title: "AI舌诊",
  25. }
  26. },
  27. //分享到朋友圈
  28. onShareTimeline(res) {
  29. return {
  30. title: "AI舌诊",
  31. }
  32. },
  33. methods: {
  34. back() {
  35. uni.switchTab({
  36. url:"/pages/index/index"
  37. })
  38. },
  39. takePhoto(){
  40. var url=uni.getStorageSync("tongueUrl")
  41. console.log(url)
  42. uni.navigateTo({
  43. url:"/pages_user/tongue/photoPreview?url="+url
  44. })
  45. },
  46. getImage(res) {
  47. var url=uni.getStorageSync("tongueUrl")
  48. console.log(url)
  49. uni.navigateTo({
  50. url:"/pages_user/tongue/photoPreview?url="+url
  51. })
  52. }
  53. }
  54. }
  55. </script>
  56. <style>
  57. </style>