index.vue 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. uni.switchTab({url: '/pages_im/pages/conversation/conversationList/index' });
  39. },
  40. takePhoto(){
  41. var url=uni.getStorageSync("tongueUrl")
  42. console.log(url)
  43. uni.navigateTo({
  44. url:"/pages_user/tongue/photoPreview?url="+url
  45. })
  46. },
  47. getImage(res) {
  48. var url=uni.getStorageSync("tongueUrl")
  49. console.log(url)
  50. uni.navigateTo({
  51. url:"/pages_user/tongue/photoPreview?url="+url
  52. })
  53. }
  54. }
  55. }
  56. </script>
  57. <style>
  58. </style>