修复:开发测试问题修改
This commit is contained in:
@@ -7,8 +7,8 @@ export const ENV = process.env.NODE_ENV || 'development';
|
|||||||
*/
|
*/
|
||||||
const BASE_URL_MAP = {
|
const BASE_URL_MAP = {
|
||||||
development: {
|
development: {
|
||||||
MAIN: 'http://192.168.110.100:9300/pb/', // 张川川
|
// MAIN: 'http://192.168.110.100:9300/pb/', // 张川川
|
||||||
// MAIN: 'https://global.nuttyreading.com/', // 线上
|
MAIN: 'https://global.nuttyreading.com/', // 线上
|
||||||
// PAYMENT: 'https://dev-pay.example.com', // 暂时用不到
|
// PAYMENT: 'https://dev-pay.example.com', // 暂时用不到
|
||||||
// CDN: 'https://cdn-dev.example.com', // 暂时用不到
|
// CDN: 'https://cdn-dev.example.com', // 暂时用不到
|
||||||
},
|
},
|
||||||
|
|||||||
49
components/book/BookPrice.vue
Normal file
49
components/book/BookPrice.vue
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
<template>
|
||||||
|
<view class="book-price-container">
|
||||||
|
<view v-if="data.isBuy" class="book-flag">已购买</view>
|
||||||
|
<view v-else-if="data.isVip == '0'" class="book-flag">免费</view>
|
||||||
|
<view v-else-if="userHasVip && data.isVip == '1'" class="book-price">VIP免费</view>
|
||||||
|
<view v-else class="book-price">{{ item.minPrice }} {{ $t('global.coin') }}</view>
|
||||||
|
<view>
|
||||||
|
<text v-if="data.readCount" class="book-flag">{{ `${data.readCount}${$t('bookHome.readingCount')}` }}</text>
|
||||||
|
<text v-else-if="data.buyCount" class="book-flag">{{ `${data.buyCount}${$t('bookHome.purchased')}` }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { computed } from 'vue'
|
||||||
|
import type { IBook } from '@/types/book'
|
||||||
|
import { useUserStore } from '@/stores/user'
|
||||||
|
|
||||||
|
const userStore = useUserStore()
|
||||||
|
|
||||||
|
// 检查用户是否为VIP
|
||||||
|
const userHasVip = computed(() => userStore.userInfo?.userEbookVip?.length > 0)
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
data: {
|
||||||
|
type: Object as () => IBook,
|
||||||
|
default: () => ({})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.book-price-container {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.book-price {
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #ff4703;
|
||||||
|
}
|
||||||
|
|
||||||
|
.book-flag {
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -14,13 +14,13 @@
|
|||||||
<text v-else>
|
<text v-else>
|
||||||
课程有效期截止到:{{ catalogue.endTime }}
|
课程有效期截止到:{{ catalogue.endTime }}
|
||||||
</text>
|
</text>
|
||||||
<wd-button
|
<!-- <wd-button
|
||||||
v-if="catalogue.startTime"
|
v-if="catalogue.startTime"
|
||||||
size="small"
|
size="small"
|
||||||
@click="handleRenew"
|
@click="handleRenew"
|
||||||
>
|
>
|
||||||
续费
|
续费
|
||||||
</wd-button>
|
</wd-button> -->
|
||||||
</template>
|
</template>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -62,7 +62,7 @@
|
|||||||
<!-- 积分输入 -->
|
<!-- 积分输入 -->
|
||||||
<view v-if="allowPointPay && userInfo?.jf > 0" class="points-input-section">
|
<view v-if="allowPointPay && userInfo?.jf > 0" class="points-input-section">
|
||||||
<text class="points-label">
|
<text class="points-label">
|
||||||
{{ $t('order.maxPoints', { max: pointsUsableMax }) }}
|
{{ $t('order.maxPoints').replace('max', pointsUsableMax) }}
|
||||||
</text>
|
</text>
|
||||||
<view class="points-input-box">
|
<view class="points-input-box">
|
||||||
<input
|
<input
|
||||||
@@ -136,16 +136,16 @@ const userStore = useUserStore()
|
|||||||
interface Props {
|
interface Props {
|
||||||
goodsList: IGoods[],
|
goodsList: IGoods[],
|
||||||
userInfo: object,
|
userInfo: object,
|
||||||
allowPointPay: boolean,
|
allowPointPay?: boolean,
|
||||||
orderType: string,
|
orderType?: string,
|
||||||
backStep: number // 购买完成后返回几层页面
|
backStep?: number // 购买完成后返回几层页面
|
||||||
}
|
}
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
goodsList: () => [],
|
goodsList: () => [],
|
||||||
userInfo: () => ({}),
|
userInfo: () => ({}),
|
||||||
allowPointPay: () => false,
|
allowPointPay: true,
|
||||||
orderType: () => '',
|
orderType: 'order',
|
||||||
backStep: () => 1
|
backStep: 1
|
||||||
})
|
})
|
||||||
|
|
||||||
// 订单备注
|
// 订单备注
|
||||||
|
|||||||
@@ -33,6 +33,8 @@ const productImg = computed(() => {
|
|||||||
return props.data?.images || ''
|
return props.data?.images || ''
|
||||||
case 'vip':
|
case 'vip':
|
||||||
return '/static/vip.png'
|
return '/static/vip.png'
|
||||||
|
case 'abroadVip':
|
||||||
|
return '/static/vip.png'
|
||||||
case 'point':
|
case 'point':
|
||||||
return '/static/jifen.png'
|
return '/static/jifen.png'
|
||||||
default:
|
default:
|
||||||
@@ -47,6 +49,8 @@ const title = computed(() => {
|
|||||||
return props.data?.name || ''
|
return props.data?.name || ''
|
||||||
case 'vip':
|
case 'vip':
|
||||||
return props.data?.title + '<text style="color: #ff4703; font-weight: bold;">(' + props.data?.year + '年)</text>' || ''
|
return props.data?.title + '<text style="color: #ff4703; font-weight: bold;">(' + props.data?.year + '年)</text>' || ''
|
||||||
|
case 'abroadVip':
|
||||||
|
return '电子书VIP' + props.data?.title + '<text style="color: #ff4703; font-weight: bold;">(' + props.data?.days + '天)</text>' || ''
|
||||||
case 'point':
|
case 'point':
|
||||||
return ''
|
return ''
|
||||||
default:
|
default:
|
||||||
@@ -61,6 +65,8 @@ const price = computed(() => {
|
|||||||
return props.data?.abroadPrice || 0
|
return props.data?.abroadPrice || 0
|
||||||
case 'vip':
|
case 'vip':
|
||||||
return props.data?.fee || 0
|
return props.data?.fee || 0
|
||||||
|
case 'abroadVip':
|
||||||
|
return props.data?.money || 0
|
||||||
case 'point':
|
case 'point':
|
||||||
return ''
|
return ''
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -298,7 +298,9 @@
|
|||||||
"listen": {
|
"listen": {
|
||||||
"title": "Audio Book",
|
"title": "Audio Book",
|
||||||
"speed": "Playback Speed",
|
"speed": "Playback Speed",
|
||||||
"chapterList": "Chapter List"
|
"chapterList": "Chapter List",
|
||||||
|
"isLast": "Last Chapter",
|
||||||
|
"isFirst": "First Chapter"
|
||||||
},
|
},
|
||||||
"workOrder": {
|
"workOrder": {
|
||||||
"submit_success": "Submitted successfully"
|
"submit_success": "Submitted successfully"
|
||||||
@@ -443,7 +445,7 @@
|
|||||||
"notUseCoupon": "Don't use coupon",
|
"notUseCoupon": "Don't use coupon",
|
||||||
"reselect": "Reselect",
|
"reselect": "Reselect",
|
||||||
"selected": "Confirm",
|
"selected": "Confirm",
|
||||||
"maxPoints": "Available Points ({max} pts)",
|
"maxPoints": "Available Points (max pts)",
|
||||||
"pointsPlaceholder": "Enter points",
|
"pointsPlaceholder": "Enter points",
|
||||||
"allPoints": "Total Points",
|
"allPoints": "Total Points",
|
||||||
"insufficientBalance": "Insufficient virtual coin balance",
|
"insufficientBalance": "Insufficient virtual coin balance",
|
||||||
|
|||||||
@@ -298,7 +298,9 @@
|
|||||||
"listen": {
|
"listen": {
|
||||||
"title": "听书",
|
"title": "听书",
|
||||||
"speed": "播放速度",
|
"speed": "播放速度",
|
||||||
"chapterList": "章节列表"
|
"chapterList": "章节列表",
|
||||||
|
"isLast": "已到最后一章",
|
||||||
|
"isFirst": "已到第一章"
|
||||||
},
|
},
|
||||||
"workOrder": {
|
"workOrder": {
|
||||||
"submit_success": "提交成功"
|
"submit_success": "提交成功"
|
||||||
@@ -443,7 +445,7 @@
|
|||||||
"notUseCoupon": "不使用优惠券",
|
"notUseCoupon": "不使用优惠券",
|
||||||
"reselect": "重新选择",
|
"reselect": "重新选择",
|
||||||
"selected": "选好了",
|
"selected": "选好了",
|
||||||
"maxPoints": "可用积分({max}分)",
|
"maxPoints": "可用积分(max分)",
|
||||||
"pointsPlaceholder": "请输入积分",
|
"pointsPlaceholder": "请输入积分",
|
||||||
"allPoints": "全部积分",
|
"allPoints": "全部积分",
|
||||||
"insufficientBalance": "天医币余额不足",
|
"insufficientBalance": "天医币余额不足",
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
|
"pages": [
|
||||||
{
|
{
|
||||||
"path": "pages/course/index",
|
"path": "pages/course/index",
|
||||||
"style": {
|
"style": {
|
||||||
|
|||||||
@@ -114,31 +114,6 @@
|
|||||||
@confirm="handlePurchase"
|
@confirm="handlePurchase"
|
||||||
@close="closePurchasePopup"
|
@close="closePurchasePopup"
|
||||||
/>
|
/>
|
||||||
<!-- <wd-popup v-model="purchaseVisible" position="bottom">
|
|
||||||
<view class="purchase-popup">
|
|
||||||
<view class="book-info-mini">
|
|
||||||
<image :src="bookInfo.images" mode="aspectFill" />
|
|
||||||
<view class="info">
|
|
||||||
<text class="name">{{ bookInfo.name }}</text>
|
|
||||||
<text v-if="bookInfo.priceData" class="price">
|
|
||||||
$ {{ bookInfo.priceData.dictValue }} NZD
|
|
||||||
</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="spec-section">
|
|
||||||
<text class="spec-title">{{ $t('bookDetails.list') }}</text>
|
|
||||||
<view class="spec-item active">
|
|
||||||
<text>{{ bookInfo.name }}</text>
|
|
||||||
<text v-if="bookInfo.priceData" class="spec-price">
|
|
||||||
${{ bookInfo.priceData.dictValue }} NZD
|
|
||||||
</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<wd-button type="primary" block @click="handlePurchase">
|
|
||||||
{{ $t('bookDetails.buy') }}
|
|
||||||
</wd-button>
|
|
||||||
</view>
|
|
||||||
</wd-popup> -->
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -162,10 +162,7 @@
|
|||||||
>
|
>
|
||||||
<image :src="item.images" />
|
<image :src="item.images" />
|
||||||
<text class="book-text">{{ item.name }}</text>
|
<text class="book-text">{{ item.name }}</text>
|
||||||
<text class="book-price">{{ item.minPrice }} {{ t('global.coin') }}</text>
|
<BookPrice :data="item" class="book-price-container" />
|
||||||
<text v-if="formatStats(item)" class="book-flag">{{
|
|
||||||
formatStats(item)
|
|
||||||
}}</text>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<text v-else class="zanwu" style="padding: 100rpx 0">{{ $t('global.dataNull') }}</text>
|
<text v-else class="zanwu" style="padding: 100rpx 0">{{ $t('global.dataNull') }}</text>
|
||||||
@@ -177,9 +174,9 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted } from 'vue'
|
import { ref, onMounted } from 'vue'
|
||||||
import { onShow } from '@dcloudio/uni-app'
|
import { onShow } from '@dcloudio/uni-app'
|
||||||
import { useI18n } from 'vue-i18n'
|
|
||||||
import { homeApi } from '@/api/modules/book_home'
|
import { homeApi } from '@/api/modules/book_home'
|
||||||
import { getNotchHeight } from '@/utils/system'
|
import { getNotchHeight } from '@/utils/system'
|
||||||
|
import BookPrice from '@/components/book/BookPrice.vue'
|
||||||
import type {
|
import type {
|
||||||
IBook,
|
IBook,
|
||||||
IBookWithStats,
|
IBookWithStats,
|
||||||
@@ -187,8 +184,6 @@ import type {
|
|||||||
IVipInfo
|
IVipInfo
|
||||||
} from '@/types/book'
|
} from '@/types/book'
|
||||||
|
|
||||||
const { t } = useI18n()
|
|
||||||
|
|
||||||
// 状态定义
|
// 状态定义
|
||||||
const showMyBooks = ref(false)
|
const showMyBooks = ref(false)
|
||||||
const showActivity = ref(false)
|
const showActivity = ref(false)
|
||||||
@@ -320,43 +315,6 @@ const getBooksByLabel = async (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 格式化价格
|
|
||||||
*/
|
|
||||||
const formatPrice = (book: IBookWithStats): string => {
|
|
||||||
// 已购买不显示价格
|
|
||||||
if (book.isBuy) return ''
|
|
||||||
|
|
||||||
// VIP用户且图书为VIP专享
|
|
||||||
if (vipInfo.value?.id && book.isVip === '2') {
|
|
||||||
const price = book.sysDictData?.dictValue
|
|
||||||
return price ? `$ ${price} NZD` : ''
|
|
||||||
}
|
|
||||||
|
|
||||||
// 普通用户
|
|
||||||
if (!vipInfo.value?.id) {
|
|
||||||
const price = book.sysDictData?.dictValue
|
|
||||||
return price ? `$ ${price} NZD` : ''
|
|
||||||
}
|
|
||||||
|
|
||||||
return ''
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 格式化统计信息
|
|
||||||
*/
|
|
||||||
const formatStats = (book: IBookWithStats): string => {
|
|
||||||
if (book.readCount && book.readCount > 0) {
|
|
||||||
return `${book.readCount}${t('bookHome.readingCount')}`
|
|
||||||
}
|
|
||||||
|
|
||||||
if (book.buyCount && book.buyCount > 0) {
|
|
||||||
return `${book.buyCount}${t('bookHome.purchased')}`
|
|
||||||
}
|
|
||||||
|
|
||||||
return ''
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 处理搜索点击
|
* 处理搜索点击
|
||||||
*/
|
*/
|
||||||
@@ -388,8 +346,8 @@ const handleBookClick = (bookId: number) => {
|
|||||||
* 处理更多按钮点击
|
* 处理更多按钮点击
|
||||||
*/
|
*/
|
||||||
const handleMoreClick = () => {
|
const handleMoreClick = () => {
|
||||||
uni.switchTab({
|
uni.navigateTo({
|
||||||
url: '/pages/book/index'
|
url: '/pages/user/myBook/index'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -779,21 +737,9 @@ onShow(() => {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.book-price {
|
.book-price-container {
|
||||||
position: absolute;
|
width: 80%;
|
||||||
font-size: 28rpx;
|
margin: 15rpx auto 0;
|
||||||
color: #ff4703;
|
|
||||||
left: 30rpx;
|
|
||||||
bottom: 20rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.book-flag {
|
|
||||||
display: block;
|
|
||||||
font-size: 26rpx;
|
|
||||||
color: #999;
|
|
||||||
position: absolute;
|
|
||||||
right: 6%;
|
|
||||||
bottom: 20rpx;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -381,7 +381,7 @@ async function prevChapter() {
|
|||||||
playChapter(chapterList.value[currentChapterIndex.value])
|
playChapter(chapterList.value[currentChapterIndex.value])
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: t('listen.earlier'),
|
title: t('listen.isFirst'),
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -412,7 +412,7 @@ async function nextChapter() {
|
|||||||
playChapter(chapterList.value[currentChapterIndex.value])
|
playChapter(chapterList.value[currentChapterIndex.value])
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: t('listen.behind'),
|
title: t('listen.isLast'),
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -606,7 +606,7 @@ function changeReadMode(mode: 'scroll' | 'page') {
|
|||||||
const bookLanguages = ref([])
|
const bookLanguages = ref([])
|
||||||
const currentLanguage = ref('')
|
const currentLanguage = ref('')
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
currentLanguage.value = uni.getStorageSync('currentBookLanguage') || ''
|
currentLanguage.value = uni.getStorageSync('currentBookLanguage') || '中文'
|
||||||
console.log('currentLanguage', currentLanguage.value)
|
console.log('currentLanguage', currentLanguage.value)
|
||||||
})
|
})
|
||||||
const getBookLanguages = async () => {
|
const getBookLanguages = async () => {
|
||||||
|
|||||||
@@ -130,6 +130,15 @@
|
|||||||
<text>
|
<text>
|
||||||
本课程一经购买,暂不支持退款,敬请谅解。
|
本课程一经购买,暂不支持退款,敬请谅解。
|
||||||
</text>
|
</text>
|
||||||
|
<view style="color: red; font-weight: bold"> 注: </view>
|
||||||
|
<view>
|
||||||
|
1.手机、pad、电脑均为可登陆电子设备,均有唯一标识码,一个用户名仅允许在一个手机或一个ipad或一个电脑登陆,请根据您的使用习惯自行选择。<br />
|
||||||
|
2.如若申请变更登陆设备请联系客服,<br />
|
||||||
|
客服电话:13110039505;022-24142321<br />
|
||||||
|
客服微信号:yilujiankangkefu<br />
|
||||||
|
3.如因违反上述使用规定...概不退款,本公司保留追究用户相关法律责任的权利。<br />
|
||||||
|
4.点击“同意”按钮即表示您同意遵守以上条款。
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="protocol-actions">
|
<view class="protocol-actions">
|
||||||
<wd-button type="info" plain @click="showProtocol = false">不同意</wd-button>
|
<wd-button type="info" plain @click="showProtocol = false">不同意</wd-button>
|
||||||
@@ -156,7 +165,7 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed } from 'vue'
|
import { ref, computed } from 'vue'
|
||||||
import { onLoad, onPageScroll, onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app'
|
import { onLoad, onPageScroll, onPullDownRefresh, onReachBottom, onShow } from '@dcloudio/uni-app'
|
||||||
import { useCourseStore } from '@/stores/course'
|
import { useCourseStore } from '@/stores/course'
|
||||||
import { useUserStore } from '@/stores/user'
|
import { useUserStore } from '@/stores/user'
|
||||||
import { courseApi } from '@/api/modules/course'
|
import { courseApi } from '@/api/modules/course'
|
||||||
@@ -252,6 +261,12 @@ const vipTip = computed(() => {
|
|||||||
*/
|
*/
|
||||||
onLoad(async (options: any) => {
|
onLoad(async (options: any) => {
|
||||||
courseId.value = parseInt(options.id)
|
courseId.value = parseInt(options.id)
|
||||||
|
})
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面显示
|
||||||
|
*/
|
||||||
|
onShow(async () => {
|
||||||
await loadPageData()
|
await loadPageData()
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -809,7 +824,7 @@ onReachBottom(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.protocol-content {
|
.protocol-content {
|
||||||
max-height: 500rpx;
|
max-height: 60vh;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
line-height: 1.8;
|
line-height: 1.8;
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
<view
|
<view
|
||||||
class="fourBox"
|
class="fourBox"
|
||||||
style="padding: 0; padding-bottom: 8rpx"
|
style="padding: 0; padding-bottom: 8rpx"
|
||||||
v-if="sbuMedicalTagsList && sbuMedicalTagsList.length > 0"
|
v-if="sbuMedicalTagsList?.length > 0"
|
||||||
>
|
>
|
||||||
<view
|
<view
|
||||||
class="childrenBox fourIcon flexbox"
|
class="childrenBox fourIcon flexbox"
|
||||||
@@ -257,6 +257,7 @@ const handleFirstLevelClick = (item: string) => {
|
|||||||
* 获取课程分类数据
|
* 获取课程分类数据
|
||||||
*/
|
*/
|
||||||
const getMedicalTags = async () => {
|
const getMedicalTags = async () => {
|
||||||
|
sbuMedicalTagsList.value = []
|
||||||
const res = await courseSubjectClassificationApi.getCourseMedicalTree()
|
const res = await courseSubjectClassificationApi.getCourseMedicalTree()
|
||||||
if (res && res.code === 0) {
|
if (res && res.code === 0) {
|
||||||
if (res.labels && res.labels.length > 0) {
|
if (res.labels && res.labels.length > 0) {
|
||||||
@@ -268,8 +269,6 @@ const getMedicalTags = async () => {
|
|||||||
// 非终极分类,显示子分类
|
// 非终极分类,显示子分类
|
||||||
if (selectedTag.children && selectedTag.children.length > 0) {
|
if (selectedTag.children && selectedTag.children.length > 0) {
|
||||||
sbuMedicalTagsList.value = selectedTag.children
|
sbuMedicalTagsList.value = selectedTag.children
|
||||||
} else {
|
|
||||||
sbuMedicalTagsList.value = []
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view class="container">
|
|
||||||
<view class="title bg-[transparent] text-center text-[#000]">这是一个等待开发的首页</view>
|
|
||||||
<view class="title bg-[blue] text-center text-[#fff]">这是一个等待开发的首页</view>
|
|
||||||
<view class="description bg-[red]">首页的内容是在线课程</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
.title {
|
|
||||||
font-size: 16px;
|
|
||||||
font-weight: bold;
|
|
||||||
margin-bottom: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.description {
|
|
||||||
font-size: 14px;
|
|
||||||
opacity: 0.6;
|
|
||||||
margin-bottom: 15px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
<nav-bar :title="$t('order.confirmTitle')" />
|
<nav-bar :title="$t('order.confirmTitle')" />
|
||||||
|
|
||||||
<!-- 确认订单组件 -->
|
<!-- 确认订单组件 -->
|
||||||
<Confirm :goodsList="goodsList" :userInfo="userInfo">
|
<Confirm :goodsList="goodsList" :userInfo="userInfo" :orderType="orderType">
|
||||||
<template #goodsList>
|
<template #goodsList>
|
||||||
<!-- 商品列表内容 -->
|
<!-- 商品列表内容 -->
|
||||||
<view
|
<view
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from 'vue'
|
import { ref, computed } from 'vue'
|
||||||
import { onLoad } from '@dcloudio/uni-app'
|
import { onLoad } from '@dcloudio/uni-app'
|
||||||
import { orderApi } from '@/api/modules/order'
|
import { orderApi } from '@/api/modules/order'
|
||||||
import type { IOrderGoods } from '@/types/order'
|
import type { IOrderGoods } from '@/types/order'
|
||||||
@@ -79,6 +79,14 @@ const getGoodsList = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 复读
|
||||||
|
const isRelearn = ref<boolean>(false)
|
||||||
|
|
||||||
|
// 订单类型
|
||||||
|
const orderType = computed(() => {
|
||||||
|
return isRelearn.value ? 'relearn' : 'order'
|
||||||
|
})
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 页面加载
|
* 页面加载
|
||||||
*/
|
*/
|
||||||
@@ -90,6 +98,7 @@ onLoad(async (options: any) => {
|
|||||||
|
|
||||||
// 根据商品ID获取商品详细信息
|
// 根据商品ID获取商品详细信息
|
||||||
goodsIds.value = options.goods || ''
|
goodsIds.value = options.goods || ''
|
||||||
|
isRelearn.value = options.isRelearn == '1'
|
||||||
getGoodsList()
|
getGoodsList()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('解析商品数据失败:', error)
|
console.error('解析商品数据失败:', error)
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
<ProductInfo v-if="order.orderType === 'order'" :data="order.productList" :type="order.orderType" />
|
<ProductInfo v-if="order.orderType === 'order'" :data="order.productList" :type="order.orderType" />
|
||||||
<ProductInfo v-if="order.orderType === 'abroadBook'" :data="order.bookEntity" :type="order.orderType" />
|
<ProductInfo v-if="order.orderType === 'abroadBook'" :data="order.bookEntity" :type="order.orderType" />
|
||||||
<ProductInfo v-if="order.orderType === 'vip'" :data="order.vipBuyConfigEntity" :type="order.orderType" />
|
<ProductInfo v-if="order.orderType === 'vip'" :data="order.vipBuyConfigEntity" :type="order.orderType" />
|
||||||
|
<ProductInfo v-if="order.orderType === 'abroadVip'" :data="order.ebookvipBuyConfig" :type="order.orderType" />
|
||||||
<!-- 三种订单类型商品信息 end -->
|
<!-- 三种订单类型商品信息 end -->
|
||||||
<view class="order-item-total-price">实付款:{{ order.orderMoney }} {{ t('global.coin') }}</view>
|
<view class="order-item-total-price">实付款:{{ order.orderMoney }} {{ t('global.coin') }}</view>
|
||||||
|
|
||||||
|
|||||||
@@ -73,15 +73,6 @@ const getVipList = async () => {
|
|||||||
vipList.value = res.lableList || []
|
vipList.value = res.lableList || []
|
||||||
}
|
}
|
||||||
|
|
||||||
// 选择套餐
|
|
||||||
const selectPackage = (vip: any) => {
|
|
||||||
// 这里可以添加跳转到订单确认页面的逻辑
|
|
||||||
uni.showToast({
|
|
||||||
title: `已选择: ${vip.title}`,
|
|
||||||
icon: 'none'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 处理购买
|
// 处理购买
|
||||||
const handlePurchase = (vip: any) => {
|
const handlePurchase = (vip: any) => {
|
||||||
const selectedGoods = {
|
const selectedGoods = {
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
"Courier New", monospace;
|
"Courier New", monospace;
|
||||||
--color-red-500: oklch(63.7% 0.237 25.331);
|
--color-red-500: oklch(63.7% 0.237 25.331);
|
||||||
--spacing: 0.25rem;
|
--spacing: 0.25rem;
|
||||||
|
--font-weight-bold: 700;
|
||||||
--ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
|
--ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
|
||||||
--default-transition-duration: 150ms;
|
--default-transition-duration: 150ms;
|
||||||
--default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
--default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
||||||
@@ -204,9 +205,18 @@
|
|||||||
max-width: 96rem;
|
max-width: 96rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.mr-1 {
|
||||||
|
margin-right: calc(var(--spacing) * 1);
|
||||||
|
}
|
||||||
|
.ml-1 {
|
||||||
|
margin-left: calc(var(--spacing) * 1);
|
||||||
|
}
|
||||||
.ml-1\! {
|
.ml-1\! {
|
||||||
margin-left: calc(var(--spacing) * 1) !important;
|
margin-left: calc(var(--spacing) * 1) !important;
|
||||||
}
|
}
|
||||||
|
.ml-2 {
|
||||||
|
margin-left: calc(var(--spacing) * 2);
|
||||||
|
}
|
||||||
.ml-2\.5\! {
|
.ml-2\.5\! {
|
||||||
margin-left: calc(var(--spacing) * 2.5) !important;
|
margin-left: calc(var(--spacing) * 2.5) !important;
|
||||||
}
|
}
|
||||||
@@ -243,6 +253,9 @@
|
|||||||
.flex-shrink {
|
.flex-shrink {
|
||||||
flex-shrink: 1;
|
flex-shrink: 1;
|
||||||
}
|
}
|
||||||
|
.border-collapse {
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
.transform {
|
.transform {
|
||||||
transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);
|
transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);
|
||||||
}
|
}
|
||||||
@@ -271,6 +284,9 @@
|
|||||||
.pt-10 {
|
.pt-10 {
|
||||||
padding-top: calc(var(--spacing) * 10);
|
padding-top: calc(var(--spacing) * 10);
|
||||||
}
|
}
|
||||||
|
.pb-0 {
|
||||||
|
padding-bottom: calc(var(--spacing) * 0);
|
||||||
|
}
|
||||||
.pb-0\! {
|
.pb-0\! {
|
||||||
padding-bottom: calc(var(--spacing) * 0) !important;
|
padding-bottom: calc(var(--spacing) * 0) !important;
|
||||||
}
|
}
|
||||||
@@ -280,6 +296,10 @@
|
|||||||
.text-right {
|
.text-right {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
.font-bold {
|
||||||
|
--tw-font-weight: var(--font-weight-bold);
|
||||||
|
font-weight: var(--font-weight-bold);
|
||||||
|
}
|
||||||
.text-\[\#000\] {
|
.text-\[\#000\] {
|
||||||
color: #000;
|
color: #000;
|
||||||
}
|
}
|
||||||
@@ -302,6 +322,9 @@
|
|||||||
--tw-ordinal: ordinal;
|
--tw-ordinal: ordinal;
|
||||||
font-variant-numeric: var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,);
|
font-variant-numeric: var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,);
|
||||||
}
|
}
|
||||||
|
.underline {
|
||||||
|
text-decoration-line: underline;
|
||||||
|
}
|
||||||
.ring {
|
.ring {
|
||||||
--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
|
--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
|
||||||
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
||||||
@@ -371,6 +394,10 @@
|
|||||||
inherits: false;
|
inherits: false;
|
||||||
initial-value: solid;
|
initial-value: solid;
|
||||||
}
|
}
|
||||||
|
@property --tw-font-weight {
|
||||||
|
syntax: "*";
|
||||||
|
inherits: false;
|
||||||
|
}
|
||||||
@property --tw-ordinal {
|
@property --tw-ordinal {
|
||||||
syntax: "*";
|
syntax: "*";
|
||||||
inherits: false;
|
inherits: false;
|
||||||
@@ -563,6 +590,7 @@
|
|||||||
--tw-skew-x: initial;
|
--tw-skew-x: initial;
|
||||||
--tw-skew-y: initial;
|
--tw-skew-y: initial;
|
||||||
--tw-border-style: solid;
|
--tw-border-style: solid;
|
||||||
|
--tw-font-weight: initial;
|
||||||
--tw-ordinal: initial;
|
--tw-ordinal: initial;
|
||||||
--tw-slashed-zero: initial;
|
--tw-slashed-zero: initial;
|
||||||
--tw-numeric-figure: initial;
|
--tw-numeric-figure: initial;
|
||||||
|
|||||||
Reference in New Issue
Block a user