| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- <template>
- <view class="ezy-shop-info-page">
- <view class="icon-title-navBar-box">
- <view class="nav-bar-icon" @click="handleBack"></view>
- <text class="nav-bar-title">商品详情</text>
- </view>
- <view class="shop-info-body">
- <view class="img-content-box">
- <img :src="imageUrl" alt="" />
- </view>
- <view class="fx-btn-row">
- <view @click="fenxiang" class="fx-btn">
- <icon class="fx-icon"></icon>
- <view>分享</view>
- </view>
- <ezyActiveVue @click="handleStudy" class="ezy-btn-active bmxx-btn">立即报名学习</ezyActiveVue>
- </view>
- </view>
-
- <!-- 分享 -->
- <SharePopup ref="sharePopup" :type="2" title="商品详情" desc="商品详情"
- :image="imageUrl" currentPage="tupian"
- @success="handleShareSuccess" @error="handleShareError" />
- </view>
- </template>
- <script setup>
- import {
- reactive,
- ref
- } from "vue";
- import {
- onLoad,
- onShow
- } from "@dcloudio/uni-app"
- import * as shopHttp from "@/api/shop.js"
- import {getAppCp1Info} from "@/api/shop";
- import ezyActiveVue from "@/components/ezyActive/ezyActive.vue";
- import SharePopup from "@/components/sharePopUp/index.vue"
- import {toast} from "uview-plus";
-
- const imageUrl = ref(null);
- const sharePopup = ref(null);
- onLoad(() => {
- initPage()
- })
- function initPage() {
- shopHttp.getAppCp2Info().then(res => {
- imageUrl.value = res.data.image;
- })
- }
- function handleShareError() {
- toast('分享失败')
- }
- function handleShareSuccess() {
- toast('分享成功')
- }
-
- function fenxiang() {
- sharePopup.value.open();
- }
- function handleStudy() {
- uni.navigateTo({
- url: '/pages/chanpinShop/cp2/dingdan'
- })
- }
-
- function handleBack() {
- uni.navigateBack()
- }
- </script>
- <style>
- </style>
|