| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- <template>
- <view>
- <view class="icon-title-navBar-box">
- <view class="nav-bar-icon" @click="handleBack"></view>
- <text class="nav-bar-title">商品详情</text>
- </view>
- <view>
- <image :src="imageUrl" alt=""></image>
- </view>
- <view>
- <view @click="fenxiang">分享</view>
- <view @click="handleStudy">立即报名学习</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 SharePopup from "@/components/sharePopUp/index.vue"
- import {toast} from "uview-plus";
-
- const imageUrl = ref(null);
- const sharePopup = ref(null);
- onLoad(() => {
- initPage()
- })
- function initPage() {
- shopHttp.getAppCp1Info().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/cp1/dingdan'
- })
- }
-
- function handleBack() {
- uni.navigateBack()
- }
- </script>
- <style>
- </style>
|