|
@@ -42,6 +42,7 @@ export default defineComponent({
|
|
|
textBookInfo: {} as any, // 教材
|
|
|
repaireInfo: {} as any, // 乐器保养
|
|
|
vipInfo: {} as any, // 团练宝
|
|
|
+ depositInfo: {} as any, // 订金
|
|
|
paymentOrderDetails: [] as any, // 购买状态
|
|
|
orderInfo: {
|
|
|
needPrice: 0,
|
|
@@ -54,7 +55,10 @@ export default defineComponent({
|
|
|
selectGoodsInfo: {} as any,
|
|
|
dialogStatus: false,
|
|
|
dialogMessage: '',
|
|
|
- dialogConfig: {} as any
|
|
|
+ dialogConfig: {} as any,
|
|
|
+
|
|
|
+ isDeposit: false, // 判断是否有订金
|
|
|
+ isVip: false // 是否有会员
|
|
|
})
|
|
|
|
|
|
// 获取支付渠道
|
|
@@ -112,15 +116,31 @@ export default defineComponent({
|
|
|
state.repaireInfo = { ...item }
|
|
|
} else if (item.goodsType === 'VIP') {
|
|
|
state.vipInfo = { ...item }
|
|
|
+ state.isVip = true
|
|
|
+ } else if (item.goodsType === 'DEPOSIT') {
|
|
|
+ // 判断是否有订金 - 如果有订金则不显示vip
|
|
|
+ state.isDeposit = true
|
|
|
+ // 查询是否有VIP的数据
|
|
|
+ const tempVipInfo = details.find((item: any) => item.goodsType === 'VIP')
|
|
|
+ if (tempVipInfo) {
|
|
|
+ item.originalPrice = tempVipInfo.currentPrice
|
|
|
+ state.depositInfo = { ...item }
|
|
|
+ }
|
|
|
}
|
|
|
state.details = details
|
|
|
|
|
|
- // 默认选中所有的
|
|
|
+ // 只有教材默认选中 -
|
|
|
if (!state.paymentOrderDetails.includes(item.goodsType) && item.goodsType == 'TEXTBOOK') {
|
|
|
state.check.push(item.goodsId)
|
|
|
}
|
|
|
})
|
|
|
|
|
|
+ /**
|
|
|
+ * 1 - 检查是否有订金商品 有则VIP不显示
|
|
|
+ * 2 - 是否购买订金 如果购买VIP显示,扣减金额
|
|
|
+ * 3 -
|
|
|
+ */
|
|
|
+
|
|
|
calcPrice()
|
|
|
} catch {
|
|
|
//
|
|
@@ -133,7 +153,6 @@ export default defineComponent({
|
|
|
}
|
|
|
|
|
|
// 初始化金额
|
|
|
-
|
|
|
const calcPrice = () => {
|
|
|
const details = state.details
|
|
|
const tempPrice = {
|
|
@@ -174,18 +193,6 @@ export default defineComponent({
|
|
|
console.error(countUpRef.needPrice.error)
|
|
|
}
|
|
|
}
|
|
|
- // if (countUpRef.originalPrice) {
|
|
|
- // countUpRef.originalPrice.update(state.orderInfo.originalPrice)
|
|
|
- // } else {
|
|
|
- // countUpRef.originalPrice = new CountUp('originalPrice', state.orderInfo.originalPrice, {
|
|
|
- // decimalPlaces: 2
|
|
|
- // })
|
|
|
- // if (!countUpRef.originalPrice.error) {
|
|
|
- // countUpRef.originalPrice.start()
|
|
|
- // } else {
|
|
|
- // console.error(countUpRef.originalPrice.error)
|
|
|
- // }
|
|
|
- // }
|
|
|
})
|
|
|
}
|
|
|
|
|
@@ -239,13 +246,6 @@ export default defineComponent({
|
|
|
})
|
|
|
}
|
|
|
|
|
|
- // console.log({
|
|
|
- // bizId: route.query.id, // 乐团编号
|
|
|
- // orderType: 'ORCHESTRA',
|
|
|
- // paymentCashAmount: state.orderInfo.needPrice || 0,
|
|
|
- // paymentCouponAmount: 0,
|
|
|
- // goodsInfos: params
|
|
|
- // })
|
|
|
// 创建订单
|
|
|
const { data } = await request.post('/api-student/userPaymentOrder/executeOrder', {
|
|
|
hideLoading: false,
|
|
@@ -310,189 +310,272 @@ export default defineComponent({
|
|
|
}}
|
|
|
>
|
|
|
{/* 判断是否买了乐器学习系统 */}
|
|
|
- {!state.paymentOrderDetails.includes('VIP') && (
|
|
|
- <>
|
|
|
- {/* <div class={styles.applyTitle}>乐团学习系统</div> */}
|
|
|
- <CellGroup
|
|
|
- inset
|
|
|
- class={[styles.mlr13, styles.sectionCell]}
|
|
|
- onClick={() => onSelect(state.vipInfo.goodsId)}
|
|
|
- >
|
|
|
- <Cell border={false}>
|
|
|
- {{
|
|
|
- icon: () => (
|
|
|
- <Checkbox
|
|
|
- name={state.vipInfo.goodsId}
|
|
|
- class={styles.checkbox}
|
|
|
- ref={(el: any) => (state.checkboxRefs[state.vipInfo.goodsId] = el)}
|
|
|
- onClick={(e: Event) => {
|
|
|
+ {!state.paymentOrderDetails.includes('VIP') && !state.isDeposit && (
|
|
|
+ <CellGroup
|
|
|
+ inset
|
|
|
+ class={[styles.mlr13, styles.sectionCell]}
|
|
|
+ onClick={() => onSelect(state.vipInfo.goodsId)}
|
|
|
+ >
|
|
|
+ <Cell border={false}>
|
|
|
+ {{
|
|
|
+ icon: () => (
|
|
|
+ <Checkbox
|
|
|
+ name={state.vipInfo.goodsId}
|
|
|
+ class={styles.checkbox}
|
|
|
+ ref={(el: any) => (state.checkboxRefs[state.vipInfo.goodsId] = el)}
|
|
|
+ onClick={(e: Event) => {
|
|
|
+ e.stopPropagation()
|
|
|
+ }}
|
|
|
+ v-slots={{
|
|
|
+ icon: (props: any) => (
|
|
|
+ <Icon
|
|
|
+ class={styles.iconChecked}
|
|
|
+ name={props.checked ? radioCheck : radioDefault}
|
|
|
+ />
|
|
|
+ )
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ ),
|
|
|
+ title: () => (
|
|
|
+ <div class={styles.section}>
|
|
|
+ <Image
|
|
|
+ class={styles.img}
|
|
|
+ src={state.vipInfo.goodsUrl}
|
|
|
+ onClick={(e: any) => {
|
|
|
e.stopPropagation()
|
|
|
+ state.memberBaoStatus = true
|
|
|
}}
|
|
|
- v-slots={{
|
|
|
- icon: (props: any) => (
|
|
|
- <Icon
|
|
|
- class={styles.iconChecked}
|
|
|
- name={props.checked ? radioCheck : radioDefault}
|
|
|
- />
|
|
|
- )
|
|
|
+ />
|
|
|
+ <div class={styles.sectionContent}>
|
|
|
+ <h2
|
|
|
+ onClick={(e: any) => {
|
|
|
+ e.stopPropagation()
|
|
|
+ state.memberBaoStatus = true
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ {state.vipInfo.goodsName}
|
|
|
+ </h2>
|
|
|
+ <Tag
|
|
|
+ color="linear-gradient(135deg, #FF8C4A 0%, #FF531C 100%)"
|
|
|
+ textColor="#fff"
|
|
|
+ class={styles.brandName}
|
|
|
+ >
|
|
|
+ 6个月
|
|
|
+ </Tag>
|
|
|
+ <p class={[styles.model, 'van-multi-ellipsis--l2']}>
|
|
|
+ {state.vipInfo.description}
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ )
|
|
|
+ }}
|
|
|
+ </Cell>
|
|
|
+ <Cell>
|
|
|
+ {{
|
|
|
+ title: () => (
|
|
|
+ <div class={styles.extra}>
|
|
|
+ <div class={styles.sectionPrice}>
|
|
|
+ <p class={styles.price}>
|
|
|
+ 团购价:
|
|
|
+ <span class={styles.numFont}>
|
|
|
+ <span class={styles.numPrefix}>¥</span>
|
|
|
+ {moneyFormat(state.vipInfo.currentPrice)}
|
|
|
+ </span>
|
|
|
+ </p>
|
|
|
+ <p class={styles.originPrice}>
|
|
|
+ 原价:
|
|
|
+ <del class={styles.numFont}>
|
|
|
+ ¥ {moneyFormat(state.vipInfo.originalPrice)}
|
|
|
+ </del>
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ )
|
|
|
+ }}
|
|
|
+ </Cell>
|
|
|
+ </CellGroup>
|
|
|
+ )}
|
|
|
+
|
|
|
+ {/* 定金 */}
|
|
|
+ {!state.paymentOrderDetails.includes('DEPOSIT') && state.isVip && (
|
|
|
+ <CellGroup
|
|
|
+ inset
|
|
|
+ class={[styles.mlr13, styles.sectionCell]}
|
|
|
+ onClick={() => onSelect(state.depositInfo.goodsId)}
|
|
|
+ >
|
|
|
+ <Cell border={false}>
|
|
|
+ {{
|
|
|
+ icon: () => (
|
|
|
+ <Checkbox
|
|
|
+ name={state.depositInfo.goodsId}
|
|
|
+ class={styles.checkbox}
|
|
|
+ ref={(el: any) => (state.checkboxRefs[state.depositInfo.goodsId] = el)}
|
|
|
+ onClick={(e: Event) => {
|
|
|
+ e.stopPropagation()
|
|
|
+ }}
|
|
|
+ v-slots={{
|
|
|
+ icon: (props: any) => (
|
|
|
+ <Icon
|
|
|
+ class={styles.iconChecked}
|
|
|
+ name={props.checked ? radioCheck : radioDefault}
|
|
|
+ />
|
|
|
+ )
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ ),
|
|
|
+ title: () => (
|
|
|
+ <div class={styles.section}>
|
|
|
+ <Image
|
|
|
+ class={styles.img}
|
|
|
+ src={state.depositInfo.goodsUrl}
|
|
|
+ onClick={(e: any) => {
|
|
|
+ e.stopPropagation()
|
|
|
+ state.memberBaoStatus = true
|
|
|
}}
|
|
|
/>
|
|
|
- ),
|
|
|
- title: () => (
|
|
|
- <div class={styles.section}>
|
|
|
- <Image
|
|
|
- class={styles.img}
|
|
|
- src={state.vipInfo.goodsUrl}
|
|
|
+ <div class={styles.sectionContent}>
|
|
|
+ <h2
|
|
|
onClick={(e: any) => {
|
|
|
e.stopPropagation()
|
|
|
state.memberBaoStatus = true
|
|
|
}}
|
|
|
- />
|
|
|
- <div class={styles.sectionContent}>
|
|
|
- <h2
|
|
|
- onClick={(e: any) => {
|
|
|
- e.stopPropagation()
|
|
|
- state.memberBaoStatus = true
|
|
|
- }}
|
|
|
- >
|
|
|
- {state.vipInfo.goodsName}
|
|
|
- </h2>
|
|
|
- <Tag
|
|
|
- color="linear-gradient(135deg, #FF8C4A 0%, #FF531C 100%)"
|
|
|
- textColor="#fff"
|
|
|
- class={styles.brandName}
|
|
|
- >
|
|
|
- 6个月
|
|
|
- </Tag>
|
|
|
- <p class={[styles.model, 'van-multi-ellipsis--l2']}>
|
|
|
- {state.vipInfo.description}
|
|
|
- </p>
|
|
|
- </div>
|
|
|
+ >
|
|
|
+ {state.depositInfo.goodsName}
|
|
|
+ </h2>
|
|
|
+ <Tag
|
|
|
+ color="linear-gradient(135deg, #FF8C4A 0%, #FF531C 100%)"
|
|
|
+ textColor="#fff"
|
|
|
+ class={styles.brandName}
|
|
|
+ >
|
|
|
+ 6个月
|
|
|
+ </Tag>
|
|
|
+ <p class={[styles.model, 'van-multi-ellipsis--l2']}>
|
|
|
+ {state.depositInfo.description}
|
|
|
+ </p>
|
|
|
</div>
|
|
|
- )
|
|
|
- }}
|
|
|
- </Cell>
|
|
|
- <Cell>
|
|
|
- {{
|
|
|
- title: () => (
|
|
|
- <div class={styles.extra}>
|
|
|
- <div class={styles.sectionPrice}>
|
|
|
- <p class={styles.price}>
|
|
|
- 团购价:
|
|
|
- <span class={styles.numFont}>
|
|
|
- <span class={styles.numPrefix}>¥</span>
|
|
|
- {moneyFormat(state.vipInfo.currentPrice)}
|
|
|
- </span>
|
|
|
- </p>
|
|
|
- <p class={styles.originPrice}>
|
|
|
- 原价:
|
|
|
- <del class={styles.numFont}>
|
|
|
- ¥ {moneyFormat(state.vipInfo.originalPrice)}
|
|
|
- </del>
|
|
|
- </p>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
+ )
|
|
|
+ }}
|
|
|
+ </Cell>
|
|
|
+ <Cell>
|
|
|
+ {{
|
|
|
+ title: () => (
|
|
|
+ <div class={styles.extra}>
|
|
|
+ <div class={styles.sectionPrice}>
|
|
|
+ <p class={styles.price}>
|
|
|
+ 定金:
|
|
|
+ <span class={styles.numFont}>
|
|
|
+ <span class={styles.numPrefix}>¥</span>
|
|
|
+ {moneyFormat(state.depositInfo.currentPrice)}
|
|
|
+ </span>
|
|
|
+ </p>
|
|
|
+ <p class={styles.originPrice}>
|
|
|
+ 团购价:
|
|
|
+ <span class={styles.numFont}>
|
|
|
+ ¥ {moneyFormat(state.depositInfo.originalPrice)}
|
|
|
+ </span>
|
|
|
+ </p>
|
|
|
</div>
|
|
|
- )
|
|
|
- }}
|
|
|
- </Cell>
|
|
|
- </CellGroup>
|
|
|
- </>
|
|
|
+ </div>
|
|
|
+ )
|
|
|
+ }}
|
|
|
+ </Cell>
|
|
|
+ </CellGroup>
|
|
|
)}
|
|
|
+
|
|
|
{/* 判断是否已经购买乐器 */}
|
|
|
{!state.paymentOrderDetails.includes('INSTRUMENTS') && (
|
|
|
- <>
|
|
|
- {/* <div class={styles.applyTitle}>乐器</div> */}
|
|
|
- <CellGroup
|
|
|
- inset
|
|
|
- class={[styles.mlr13, styles.sectionCell]}
|
|
|
- onClick={() => onSelect(state.goodsInfo.goodsId)}
|
|
|
- >
|
|
|
- <Cell border={false}>
|
|
|
- {{
|
|
|
- icon: () => (
|
|
|
- <Checkbox
|
|
|
- name={state.goodsInfo.goodsId}
|
|
|
- class={styles.checkbox}
|
|
|
- ref={(el: any) => (state.checkboxRefs[state.goodsInfo.goodsId] = el)}
|
|
|
- onClick={(e: Event) => {
|
|
|
+ <CellGroup
|
|
|
+ inset
|
|
|
+ class={[styles.mlr13, styles.sectionCell]}
|
|
|
+ onClick={() => onSelect(state.goodsInfo.goodsId)}
|
|
|
+ >
|
|
|
+ <Cell border={false}>
|
|
|
+ {{
|
|
|
+ icon: () => (
|
|
|
+ <Checkbox
|
|
|
+ name={state.goodsInfo.goodsId}
|
|
|
+ class={styles.checkbox}
|
|
|
+ ref={(el: any) => (state.checkboxRefs[state.goodsInfo.goodsId] = el)}
|
|
|
+ onClick={(e: Event) => {
|
|
|
+ e.stopPropagation()
|
|
|
+ }}
|
|
|
+ v-slots={{
|
|
|
+ icon: (props: any) => (
|
|
|
+ <Icon
|
|
|
+ class={styles.iconChecked}
|
|
|
+ name={props.checked ? radioCheck : radioDefault}
|
|
|
+ />
|
|
|
+ )
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ ),
|
|
|
+ title: () => (
|
|
|
+ <div class={styles.section}>
|
|
|
+ <Image
|
|
|
+ class={styles.img}
|
|
|
+ src={state.goodsInfo.goodsUrl}
|
|
|
+ onClick={(e: any) => {
|
|
|
e.stopPropagation()
|
|
|
- }}
|
|
|
- v-slots={{
|
|
|
- icon: (props: any) => (
|
|
|
- <Icon
|
|
|
- class={styles.iconChecked}
|
|
|
- name={props.checked ? radioCheck : radioDefault}
|
|
|
- />
|
|
|
- )
|
|
|
+ state.selectGoodsId = state.goodsInfo.goodsId
|
|
|
+ state.currentPrice = state.goodsInfo.currentPrice
|
|
|
+ state.selectGoodsInfo = {
|
|
|
+ showFree: true,
|
|
|
+ originalPrice: state.repaireInfo.originalPrice
|
|
|
+ }
|
|
|
+ state.goodsStatus = true
|
|
|
}}
|
|
|
/>
|
|
|
- ),
|
|
|
- title: () => (
|
|
|
- <div class={styles.section}>
|
|
|
- <Image
|
|
|
- class={styles.img}
|
|
|
- src={state.goodsInfo.goodsUrl}
|
|
|
+ <div class={styles.sectionContent}>
|
|
|
+ <h2
|
|
|
onClick={(e: any) => {
|
|
|
e.stopPropagation()
|
|
|
state.selectGoodsId = state.goodsInfo.goodsId
|
|
|
state.currentPrice = state.goodsInfo.currentPrice
|
|
|
- state.selectGoodsInfo = {
|
|
|
- showFree: true,
|
|
|
- originalPrice: state.repaireInfo.originalPrice
|
|
|
- }
|
|
|
state.goodsStatus = true
|
|
|
}}
|
|
|
- />
|
|
|
- <div class={styles.sectionContent}>
|
|
|
- <h2
|
|
|
- onClick={(e: any) => {
|
|
|
- e.stopPropagation()
|
|
|
- state.selectGoodsId = state.goodsInfo.goodsId
|
|
|
- state.currentPrice = state.goodsInfo.currentPrice
|
|
|
- state.goodsStatus = true
|
|
|
- }}
|
|
|
- >
|
|
|
- {state.goodsInfo.goodsName}
|
|
|
- </h2>
|
|
|
- <Tag
|
|
|
- color="linear-gradient(135deg, #FF8C4A 0%, #FF531C 100%)"
|
|
|
- textColor="#fff"
|
|
|
- class={styles.brandName}
|
|
|
- >
|
|
|
- {state.goodsInfo.brandName}
|
|
|
- </Tag>
|
|
|
- <p class={[styles.model, 'van-multi-ellipsis--l2']}>
|
|
|
- {state.goodsInfo.description}
|
|
|
- </p>
|
|
|
- </div>
|
|
|
+ >
|
|
|
+ {state.goodsInfo.goodsName}
|
|
|
+ </h2>
|
|
|
+ <Tag
|
|
|
+ color="linear-gradient(135deg, #FF8C4A 0%, #FF531C 100%)"
|
|
|
+ textColor="#fff"
|
|
|
+ class={styles.brandName}
|
|
|
+ >
|
|
|
+ {state.goodsInfo.brandName}
|
|
|
+ </Tag>
|
|
|
+ <p class={[styles.model, 'van-multi-ellipsis--l2']}>
|
|
|
+ {state.goodsInfo.description}
|
|
|
+ </p>
|
|
|
</div>
|
|
|
- )
|
|
|
- }}
|
|
|
- </Cell>
|
|
|
- <Cell border={false}>
|
|
|
- {{
|
|
|
- title: () => (
|
|
|
- <div class={styles.extra}>
|
|
|
- <div class={styles.sectionPrice}>
|
|
|
- <p class={styles.price}>
|
|
|
- 团购价:
|
|
|
- <span class={styles.numFont}>
|
|
|
- <span class={styles.numPrefix}>¥ </span>
|
|
|
- {moneyFormat(state.goodsInfo.currentPrice)}
|
|
|
- </span>
|
|
|
- </p>
|
|
|
- <p class={styles.originPrice}>
|
|
|
- 原价:
|
|
|
- <del class={styles.numFont}>
|
|
|
- ¥ {moneyFormat(state.goodsInfo.originalPrice)}
|
|
|
- </del>
|
|
|
- </p>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
+ )
|
|
|
+ }}
|
|
|
+ </Cell>
|
|
|
+ <Cell border={false}>
|
|
|
+ {{
|
|
|
+ title: () => (
|
|
|
+ <div class={styles.extra}>
|
|
|
+ <div class={styles.sectionPrice}>
|
|
|
+ <p class={styles.price}>
|
|
|
+ 团购价:
|
|
|
+ <span class={styles.numFont}>
|
|
|
+ <span class={styles.numPrefix}>¥ </span>
|
|
|
+ {moneyFormat(state.goodsInfo.currentPrice)}
|
|
|
+ </span>
|
|
|
+ </p>
|
|
|
+ <p class={styles.originPrice}>
|
|
|
+ 原价:
|
|
|
+ <del class={styles.numFont}>
|
|
|
+ ¥ {moneyFormat(state.goodsInfo.originalPrice)}
|
|
|
+ </del>
|
|
|
+ </p>
|
|
|
</div>
|
|
|
- )
|
|
|
- }}
|
|
|
- </Cell>
|
|
|
- {/* <Cell center class={styles.gives}>
|
|
|
+ </div>
|
|
|
+ )
|
|
|
+ }}
|
|
|
+ </Cell>
|
|
|
+ {/* <Cell center class={styles.gives}>
|
|
|
{{
|
|
|
title: () => (
|
|
|
<div class={styles.sectionTips}>
|
|
@@ -502,48 +585,55 @@ export default defineComponent({
|
|
|
)
|
|
|
}}
|
|
|
</Cell> */}
|
|
|
- </CellGroup>
|
|
|
- </>
|
|
|
+ </CellGroup>
|
|
|
)}
|
|
|
|
|
|
{/* 判断是否已经购买教材 */}
|
|
|
{!state.paymentOrderDetails.includes('TEXTBOOK') && (
|
|
|
- <>
|
|
|
- {/* <div class={styles.applyTitle}>教材</div> */}
|
|
|
- <CellGroup
|
|
|
- inset
|
|
|
- class={[styles.mlr13, styles.sectionCell]}
|
|
|
- onClick={() => {
|
|
|
- return
|
|
|
- // onSelect(state.textBookInfo.goodsId)
|
|
|
- }}
|
|
|
- >
|
|
|
- <Cell border={false}>
|
|
|
- {{
|
|
|
- icon: () => (
|
|
|
- <Checkbox
|
|
|
- name={state.textBookInfo.goodsId}
|
|
|
- disabled
|
|
|
- class={styles.checkbox}
|
|
|
- ref={(el: any) => (state.checkboxRefs[state.textBookInfo.goodsId] = el)}
|
|
|
- onClick={(e: Event) => {
|
|
|
+ <CellGroup
|
|
|
+ inset
|
|
|
+ class={[styles.mlr13, styles.sectionCell]}
|
|
|
+ onClick={() => {
|
|
|
+ return
|
|
|
+ // onSelect(state.textBookInfo.goodsId)
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <Cell border={false}>
|
|
|
+ {{
|
|
|
+ icon: () => (
|
|
|
+ <Checkbox
|
|
|
+ name={state.textBookInfo.goodsId}
|
|
|
+ disabled
|
|
|
+ class={styles.checkbox}
|
|
|
+ ref={(el: any) => (state.checkboxRefs[state.textBookInfo.goodsId] = el)}
|
|
|
+ onClick={(e: Event) => {
|
|
|
+ e.stopPropagation()
|
|
|
+ }}
|
|
|
+ v-slots={{
|
|
|
+ icon: (props: any) => (
|
|
|
+ <Icon
|
|
|
+ class={styles.iconChecked}
|
|
|
+ name={props.checked ? radioCheck : radioDefault}
|
|
|
+ />
|
|
|
+ )
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ ),
|
|
|
+ title: () => (
|
|
|
+ <div class={styles.section}>
|
|
|
+ <Image
|
|
|
+ class={styles.img}
|
|
|
+ src={state.textBookInfo.goodsUrl}
|
|
|
+ onClick={(e: any) => {
|
|
|
e.stopPropagation()
|
|
|
- }}
|
|
|
- v-slots={{
|
|
|
- icon: (props: any) => (
|
|
|
- <Icon
|
|
|
- class={styles.iconChecked}
|
|
|
- name={props.checked ? radioCheck : radioDefault}
|
|
|
- />
|
|
|
- )
|
|
|
+ state.selectGoodsId = state.textBookInfo.goodsId
|
|
|
+ state.currentPrice = state.textBookInfo.currentPrice
|
|
|
+ state.selectGoodsInfo = {}
|
|
|
+ state.goodsStatus = true
|
|
|
}}
|
|
|
/>
|
|
|
- ),
|
|
|
- title: () => (
|
|
|
- <div class={styles.section}>
|
|
|
- <Image
|
|
|
- class={styles.img}
|
|
|
- src={state.textBookInfo.goodsUrl}
|
|
|
+ <div class={styles.sectionContent}>
|
|
|
+ <h2
|
|
|
onClick={(e: any) => {
|
|
|
e.stopPropagation()
|
|
|
state.selectGoodsId = state.textBookInfo.goodsId
|
|
@@ -551,69 +641,58 @@ export default defineComponent({
|
|
|
state.selectGoodsInfo = {}
|
|
|
state.goodsStatus = true
|
|
|
}}
|
|
|
- />
|
|
|
- <div class={styles.sectionContent}>
|
|
|
- <h2
|
|
|
- onClick={(e: any) => {
|
|
|
- e.stopPropagation()
|
|
|
- state.selectGoodsId = state.textBookInfo.goodsId
|
|
|
- state.currentPrice = state.textBookInfo.currentPrice
|
|
|
- state.selectGoodsInfo = {}
|
|
|
- state.goodsStatus = true
|
|
|
- }}
|
|
|
- >
|
|
|
- {state.textBookInfo.goodsName}
|
|
|
- </h2>
|
|
|
- <Tag
|
|
|
- color="linear-gradient(135deg, #FF8C4A 0%, #FF531C 100%)"
|
|
|
- textColor="#fff"
|
|
|
- class={styles.brandName}
|
|
|
- >
|
|
|
- {state.textBookInfo.brandName}
|
|
|
- </Tag>
|
|
|
- <p class={[styles.model, 'van-multi-ellipsis--l2']}>
|
|
|
- {state.textBookInfo.description}
|
|
|
- </p>
|
|
|
- </div>
|
|
|
+ >
|
|
|
+ {state.textBookInfo.goodsName}
|
|
|
+ </h2>
|
|
|
+ <Tag
|
|
|
+ color="linear-gradient(135deg, #FF8C4A 0%, #FF531C 100%)"
|
|
|
+ textColor="#fff"
|
|
|
+ class={styles.brandName}
|
|
|
+ >
|
|
|
+ {state.textBookInfo.brandName}
|
|
|
+ </Tag>
|
|
|
+ <p class={[styles.model, 'van-multi-ellipsis--l2']}>
|
|
|
+ {state.textBookInfo.description}
|
|
|
+ </p>
|
|
|
</div>
|
|
|
- )
|
|
|
- }}
|
|
|
- </Cell>
|
|
|
- <Cell>
|
|
|
- {{
|
|
|
- title: () => (
|
|
|
- <div class={styles.extra}>
|
|
|
- <div class={styles.sectionPrice}>
|
|
|
- <p class={styles.price}>
|
|
|
- 团购价:
|
|
|
- <span
|
|
|
- class={[
|
|
|
- state.textBookInfo.currentPrice > 0 ? styles.numFont : styles.free
|
|
|
- ]}
|
|
|
- >
|
|
|
- {state.textBookInfo.currentPrice > 0 ? (
|
|
|
- <>
|
|
|
- <span class={styles.numPrefix}>¥ </span>
|
|
|
- {moneyFormat(state.textBookInfo.currentPrice)}
|
|
|
- </>
|
|
|
- ) : (
|
|
|
- '免费'
|
|
|
- )}
|
|
|
- </span>
|
|
|
- </p>
|
|
|
- <p class={styles.originPrice}>
|
|
|
- 原价:
|
|
|
- <del class={styles.numFont}>
|
|
|
- ¥ {moneyFormat(state.textBookInfo.originalPrice)}
|
|
|
- </del>
|
|
|
- </p>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
+ )
|
|
|
+ }}
|
|
|
+ </Cell>
|
|
|
+ <Cell>
|
|
|
+ {{
|
|
|
+ title: () => (
|
|
|
+ <div class={styles.extra}>
|
|
|
+ <div class={styles.sectionPrice}>
|
|
|
+ <p class={styles.price}>
|
|
|
+ 团购价:
|
|
|
+ <span
|
|
|
+ class={[
|
|
|
+ state.textBookInfo.currentPrice > 0 ? styles.numFont : styles.free
|
|
|
+ ]}
|
|
|
+ >
|
|
|
+ {state.textBookInfo.currentPrice > 0 ? (
|
|
|
+ <>
|
|
|
+ <span class={styles.numPrefix}>¥ </span>
|
|
|
+ {moneyFormat(state.textBookInfo.currentPrice)}
|
|
|
+ </>
|
|
|
+ ) : (
|
|
|
+ '免费'
|
|
|
+ )}
|
|
|
+ </span>
|
|
|
+ </p>
|
|
|
+ <p class={styles.originPrice}>
|
|
|
+ 原价:
|
|
|
+ <del class={styles.numFont}>
|
|
|
+ ¥ {moneyFormat(state.textBookInfo.originalPrice)}
|
|
|
+ </del>
|
|
|
+ </p>
|
|
|
</div>
|
|
|
- )
|
|
|
- }}
|
|
|
- </Cell>
|
|
|
- </CellGroup>
|
|
|
- </>
|
|
|
+ </div>
|
|
|
+ )
|
|
|
+ }}
|
|
|
+ </Cell>
|
|
|
+ </CellGroup>
|
|
|
)}
|
|
|
</CheckboxGroup>
|
|
|
<OSticky position="bottom" background="white">
|