|
|
@@ -11,6 +11,11 @@
|
|
|
<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>
|
|
|
|
|
|
@@ -24,9 +29,12 @@
|
|
|
onShow
|
|
|
} from "@dcloudio/uni-app"
|
|
|
import * as shopHttp from "@/api/shop.js"
|
|
|
- import {getAppCp1Info} from "../../../api/shop";
|
|
|
+ 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()
|
|
|
@@ -37,8 +45,18 @@
|
|
|
imageUrl.value = res.data.image;
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
+ function handleShareError() {
|
|
|
+ toast('分享失败')
|
|
|
+ }
|
|
|
+
|
|
|
+ function handleShareSuccess() {
|
|
|
+ toast('分享成功')
|
|
|
+ }
|
|
|
|
|
|
- function fenxiang() {}
|
|
|
+ function fenxiang() {
|
|
|
+ sharePopup.value.open();
|
|
|
+ }
|
|
|
function handleStudy() {
|
|
|
uni.navigateTo({
|
|
|
url: '/pages/chanpinShop/cp1/dingdan'
|