index.vue 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. onShow() {
  23. this.$nextTick(()=>{
  24. this.$refs.CustomCamera.initShow()
  25. })
  26. },
  27. onShareAppMessage(res) {
  28. return {
  29. title: "AI舌诊",
  30. }
  31. },
  32. //分享到朋友圈
  33. onShareTimeline(res) {
  34. return {
  35. title: "AI舌诊",
  36. }
  37. },
  38. methods: {
  39. back() {
  40. uni.switchTab({
  41. url:"/pages/index/index"
  42. })
  43. },
  44. takePhoto(){
  45. var url=uni.getStorageSync("tongueUrl")
  46. console.log(url)
  47. uni.navigateTo({
  48. url:"/pages_user/tongue/photoPreview?url="+url
  49. })
  50. },
  51. getImage(res) {
  52. var url=uni.getStorageSync("tongueUrl")
  53. console.log(url)
  54. uni.navigateTo({
  55. url:"/pages_user/tongue/photoPreview?url="+url
  56. })
  57. }
  58. }
  59. }
  60. </script>
  61. <style>
  62. </style>