|
@@ -1,43 +1,69 @@
|
|
|
<template>
|
|
|
<uni-popup ref="detailPopup" :animation="false" :is-mask-click="false"
|
|
|
- mask-background-color="rgba(51, 137, 217, 0.65);" style="z-index: 101;">
|
|
|
- <view class="mall-detail-dialog">
|
|
|
- <view class="detail-content-box">
|
|
|
- <icon class="cpmx-title"></icon>
|
|
|
- <icon class="dialog-close-btn" @click="detailCloseBtn"></icon>
|
|
|
- <view class="product-body-box">
|
|
|
- <!-- ↓需要换成从接口中取得 wgy -->
|
|
|
- <view class="detail-item-box">
|
|
|
- <img src="/static/images/my/about-icon.png" class="mall-image"/>
|
|
|
- <view class="content-body-box">
|
|
|
- <view class="content-name">
|
|
|
- <view class="name-text">数学暑假进阶L1</view>
|
|
|
- </view>
|
|
|
- <view class="content-text">适用于L1和学前,介绍介绍,适用于L1和学前,介绍介绍适用于L1和学前,介绍介绍</view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
+ mask-background-color="rgba(51, 137, 217, 0.65);" style="z-index: 101;">
|
|
|
+ <view class="mall-detail-dialog">
|
|
|
+ <view class="detail-content-box">
|
|
|
+ <icon class="cpmx-title"></icon>
|
|
|
+ <icon class="dialog-close-btn" @click="detailCloseBtn"></icon>
|
|
|
+ <view class="product-body-box">
|
|
|
+ <!-- ↓需要换成从接口中取得 wgy -->
|
|
|
+ <view class="detail-item-box" v-for="(item,index) in productList " :key="index">
|
|
|
+ <img :src="item.cover" class="mall-image" />
|
|
|
+ <view class="content-body-box">
|
|
|
+ <view class="content-name">
|
|
|
+ <view class="name-text">{{item.name}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="content-text">{{item.intro}}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</uni-popup>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
- import { ref } from 'vue';
|
|
|
+ import {
|
|
|
+ mallCardInfo
|
|
|
+ } from "@/api/productMall.js"
|
|
|
+ import {
|
|
|
+ toast,
|
|
|
+ debounce,
|
|
|
+ getUserIdentity
|
|
|
+ } from "@/utils/common";
|
|
|
+ import {
|
|
|
+ ref
|
|
|
+ } from 'vue';
|
|
|
const $emit = defineEmits(['payBtn'])
|
|
|
const detailPopup = ref(null); // 索引
|
|
|
+ let productList = ref([])
|
|
|
// 打开弹窗
|
|
|
- function detailShow() {
|
|
|
- detailPopup.value.open();
|
|
|
+ function detailShow(data) {
|
|
|
+
|
|
|
+ let req = {
|
|
|
+ id: data
|
|
|
+ }
|
|
|
+ mallCardInfo(req).then(res => {
|
|
|
+ console.log('res', res);
|
|
|
+ if (res.code == 0) {
|
|
|
+ productList.value = res.data
|
|
|
+ detailPopup.value.open();
|
|
|
+ } else {
|
|
|
+ toast('获取产品明细失败')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
}
|
|
|
// 开启提分之旅按钮
|
|
|
- function detailPayBtn(){
|
|
|
+ function detailPayBtn() {
|
|
|
$emit('payBtn')
|
|
|
}
|
|
|
- function detailCloseBtn(){
|
|
|
+
|
|
|
+ function detailCloseBtn() {
|
|
|
detailPopup.value.close();
|
|
|
}
|
|
|
defineExpose({
|
|
|
- detailShow
|
|
|
- })
|
|
|
+ detailShow
|
|
|
+ })
|
|
|
</script>
|