intro.vue 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <template>
  2. <view class="ezy-shop-info-page">
  3. <view class="icon-title-navBar-box">
  4. <view class="nav-bar-icon" @click="handleBack"></view>
  5. <text class="nav-bar-title">商品详情</text>
  6. </view>
  7. <view class="shop-info-body">
  8. <view class="img-content-box">
  9. <img :src="imageUrl" alt="" />
  10. </view>
  11. <view class="fx-btn-row">
  12. <view @click="fenxiang" class="fx-btn">
  13. <icon class="fx-icon"></icon>
  14. <view>分享</view>
  15. </view>
  16. <ezyActiveVue @click="handleStudy" class="ezy-btn-active bmxx-btn">立即报名学习</ezyActiveVue>
  17. </view>
  18. </view>
  19. <!-- 分享 -->
  20. <SharePopup ref="sharePopup" :type="2" title="商品详情" desc="商品详情"
  21. :image="imageUrl" currentPage="tupian"
  22. @success="handleShareSuccess" @error="handleShareError" />
  23. </view>
  24. </template>
  25. <script setup>
  26. import {
  27. reactive,
  28. ref
  29. } from "vue";
  30. import {
  31. onLoad,
  32. onShow
  33. } from "@dcloudio/uni-app"
  34. import * as shopHttp from "@/api/shop.js"
  35. import {getAppCp1Info} from "@/api/shop";
  36. import ezyActiveVue from "@/components/ezyActive/ezyActive.vue";
  37. import SharePopup from "@/components/sharePopUp/index.vue"
  38. import {toast} from "uview-plus";
  39. const imageUrl = ref(null);
  40. const sharePopup = ref(null);
  41. onLoad(() => {
  42. initPage()
  43. })
  44. function initPage() {
  45. shopHttp.getAppCp3Info().then(res => {
  46. imageUrl.value = res.data.image;
  47. })
  48. }
  49. function handleShareError() {
  50. toast('分享失败')
  51. }
  52. function handleShareSuccess() {
  53. toast('分享成功')
  54. }
  55. function fenxiang() {
  56. sharePopup.value.open();
  57. }
  58. function handleStudy() {
  59. uni.navigateTo({
  60. url: '/pages/chanpinShop/cp3/dingdan'
  61. })
  62. }
  63. function handleBack() {
  64. uni.navigateBack()
  65. }
  66. </script>
  67. <style>
  68. </style>