index.wxml 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. <!-- index.wxml -->
  2. <scroll-view class="scrollarea" id="scroll-view" scroll-y="{{popupShow ? false : true}}" type="list" bindscroll="onScrollView" bounces="{{ false }}" enhanced enable-passive="true" scroll-into-view="{{scrolIntoView}}" scroll-top="{{ scrollTop }}">
  3. <view class="container">
  4. <view class="slider-count">{{current + 1}}/{{imgList.length + 1}}</view>
  5. <swiper class="bannerSwiper" indicator-dots="{{false}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" bindchange="changeSwiper">
  6. <swiper-item>
  7. <view class="swiper-item swiper-video">
  8. <block wx:if="{{bannerImageloaded}}">
  9. <image class="bg" src="https://oss.dayaedu.com/ktyq/1738923944096.png"></image>
  10. <video style="height: {{videoHeight}};" object-fit="contain" bindplay="onBannerVideoPlay" picture-in-picture-mode="[]" id="bannerVideo" src="https://oss.dayaedu.com/ktyq/17337413498130cfedaf1.mp4"></video>
  11. </block>
  12. <block wx:if="{{ !bannerPlay }}">
  13. <image bindload="onBannerVideoLoad" src="https://oss.dayaedu.com/ktyq/1738923944096.png"></image>
  14. <image catch:tap="onBannerPlay" src="./images/icon-video.png" class="icon-video"></image>
  15. </block>
  16. </view>
  17. </swiper-item>
  18. <swiper-item wx:for="{{ imgList }}" wx:key="index">
  19. <view class="swiper-item ">
  20. <image src="{{ item }}" data-src="{{ item }}"></image>
  21. </view>
  22. </swiper-item>
  23. </swiper>
  24. <view id="scroll-header" class="scroll-header" style="opacity: {{opacity}}; pointer-events: {{opacity > 0 ? 'all' : 'none'}};">
  25. <navigation-bar back="{{false}}" title="商品详情"></navigation-bar>
  26. <view class="product-catagory">
  27. <view class="item {{ scrolIntoViewStr == 'type1' || !scrolIntoViewStr ? 'selected' : '' }}" bind:tap="onTapAnchor" data-type="type1">
  28. 产品介绍
  29. </view>
  30. <view class="item {{ scrolIntoViewStr == 'type3' ? 'selected' : '' }}" bind:tap="onTapAnchor" data-type="type3">
  31. 互通案例
  32. </view>
  33. <view class="item {{ scrolIntoViewStr == 'type2' ? 'selected' : '' }}" bind:tap="onTapAnchor" data-type="type2">
  34. 使用场景
  35. </view>
  36. </view>
  37. </view>
  38. <view class="goodsSection">
  39. <view class="title">
  40. <view class="before"></view>
  41. <view>商品详情</view>
  42. <view class="after"></view>
  43. </view>
  44. <view class="goodsIntro">
  45. <view class="images">
  46. <image id="type1" mode="widthFix" src="https://oss.dayaedu.com/ktyq/1739353790443.png" data-src="https://oss.dayaedu.com/ktyq/1739353790443.png"></image>
  47. <image mode="widthFix" src="https://oss.dayaedu.com/ktyq/1739353815962.png" data-src="https://oss.dayaedu.com/ktyq/1739353815962.png"></image>
  48. <image mode="widthFix" src="https://oss.dayaedu.com/ktyq/1739353843494.png" data-src="https://oss.dayaedu.com/ktyq/1739353843494.png"></image>
  49. <view id="type3" class="type2s title-section">
  50. <image src="./images/title1.png" class="title"></image>
  51. <view class="topSection">
  52. <view class="content1">
  53. 音乐数字AI已赢得超过100万名注册师生的喜爱与赞誉,成为学生乐器学习旅程中的得力伙伴,更是一路陪伴他们从初探音乐世界走向精通乐器。为学生带来极佳的学习体验。
  54. </view>
  55. <view class="titleVideoSection">
  56. <view class="video-section">
  57. <image mode="widthFix" bind:tap="onPreivewDetailImg2" src="https://oss.dayaedu.com/ktyq/03/1772461866051.png" data-src="https://oss.dayaedu.com/ktyq/03/1772461866051.png" />
  58. </view>
  59. </view>
  60. <view class="content2">实践知真章,合作学校仅用两节课便完成母亲节主题演奏</view>
  61. </view>
  62. <view class="titleSwiper">
  63. <swiper indicator-dots="{{false}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" bindchange="changeSwiperDetail">
  64. <swiper-item wx:for="{{ detailImgList }}" wx:key="index">
  65. <view class="swiper-item-detail">
  66. <image bind:tap="onPreivewDetailImg" src="{{ item.url }}" data-src="{{ item.url }}"></image>
  67. <view class="text">{{item.text}}</view>
  68. </view>
  69. </swiper-item>
  70. </swiper>
  71. <view class="title-dot">
  72. <view wx:for="{{ detailImgList }}" wx:key="index" class="title-dot--item {{ detailCurrent === index ? 'title-dot--item-active' : '' }}"></view>
  73. </view>
  74. </view>
  75. </view>
  76. <image id="type2" mode="widthFix" src="https://oss.dayaedu.com/ktyq/03/1772550951364.png" data-src="https://oss.dayaedu.com/ktyq/03/1772550951364.png"></image>
  77. </view>
  78. </view>
  79. </view>
  80. <view class="bottom-section">
  81. <view class="orders" bind:tap="onOrder">
  82. <image src="./images/icon-order.png" />
  83. <text>订单</text>
  84. </view>
  85. <view class="btnSection">
  86. <button bind:tap="onBuyShop" type="primary" disabled="{{ isOverSaled }}">立即购买</button>
  87. </view>
  88. </view>
  89. <!-- 购买弹窗 -->
  90. <view class="popup-section" wx:if="{{popupShow}}">
  91. <view class="popup-mask" bind:tap="onClose"></view>
  92. <view class="popup-container">
  93. <image catch:tap="onClose" src="./images/icon-close.png" class="iconClose"></image>
  94. <!-- 用户类型切换 -->
  95. <view class="user-type-tabs">
  96. <view class="tab-item {{ userTypes === 'student' ? 'active' : '' }}" bind:tap="onSwitchUserType" data-type="student">学生端</view>
  97. <view class="tab-item {{ userTypes === 'teacher' ? 'active' : '' }}" bind:tap="onSwitchUserType" data-type="teacher">老师端</view>
  98. </view>
  99. <!-- 商品信息卡片 -->
  100. <view class="product-info-card">
  101. <view class="product-badge">
  102. <text class="duration-text">{{ selected.typeName || '14天' }}</text>
  103. <text class="user-label">学生端</text>
  104. </view>
  105. <view class="product-detail">
  106. <view class="product-name">{{ selected.name || '老师端-器乐数字AI畅享卡' }}</view>
  107. <view class="price-line">
  108. <text class="price-tag">到手价</text>
  109. <text class="price-num">¥{{ selected.showSalePrice || '388.00' }}</text>
  110. </view>
  111. <view class="origin-line">
  112. <text class="origin-tag">日常价</text>
  113. <text class="origin-num">¥{{ selected.originalPrice || '2900.00' }}</text>
  114. <text class="divider">|</text>
  115. <text class="sold-count">已售10W+</text>
  116. </view>
  117. </view>
  118. </view>
  119. <!-- 选择期限 -->
  120. <view class="period-select-section">
  121. <view class="section-label">选择期限</view>
  122. <view class="period-options">
  123. <view wx:for="{{ periodList }}" wx:key="value" class="period-btn {{ selectedPeriod === item.value ? 'active' : '' }}" bind:tap="onSelectPeriod" data-value="{{ item.value }}">
  124. {{ item.label }}
  125. </view>
  126. </view>
  127. </view>
  128. <!-- 额外赠送 -->
  129. <view class="gift-section" wx:if="{{ showBonusGift }}">
  130. <text class="gift-desc">满1年额外赠送2个月</text>
  131. </view>
  132. <!-- 底部结算栏 -->
  133. <view class="settlement-bar">
  134. <view class="select-summary">
  135. <text class="summary-label">选中:</text>
  136. <text class="summary-content">{{ userTypes === 'teacher' ? '老师端' : '学生端' }}/{{ selected.typeName || '14天' }},</text>
  137. <text class="summary-save">已省¥{{ formatSelectGood.discountPrice || '2512.00' }}</text>
  138. </view>
  139. <button class="submit-btn" catch:tap="onSubmit">立即购买</button>
  140. </view>
  141. </view>
  142. </view>
  143. </view>
  144. <!-- 客服功能 -->
  145. <service wx:if="{{serviceShow}}"></service>
  146. </scroll-view>