index.wxml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. <swiper current="{{ currentIndex }}" indicator-dots="{{false}}" vertical="true" class="firstConainer" bindchange="onSwiperChange">
  2. <!-- || !showBuyer || !showGender || showArea || showSchool || showGradeClass || showClass -->
  3. <swiper-item>
  4. <view class="pageContainer firstPageContainer">
  5. <navigation-bar title="器乐数字AI工具" back="{{false}}"></navigation-bar>
  6. <swiper indicator-dots="{{false}}" class="fistSwiperSection" previous-margin="78rpx" next-margin="78rpx" bindchange="onFirstChange">
  7. <swiper-item wx:for="{{firstImgList}}" wx:key="index">
  8. <view class="swiper-item {{ firstCurrent == index ? 'current' : '' }} {{ isTablet ? 'tablet-item' : '' }}">
  9. <image mode="{{ isTablet ? 'heightFix' : 'widthFix' }}" data-src="{{ item }}" src="{{ item }}"></image>
  10. </view>
  11. </swiper-item>
  12. </swiper>
  13. <view class="pageDot">
  14. <view wx:for="{{firstImgList}}" wx:key="index" class="dot-item {{ firstCurrent == index ? 'current' : '' }}"></view>
  15. </view>
  16. <image src="./images/up-arrow.png" class="upArrow"></image>
  17. </view>
  18. </swiper-item>
  19. <swiper-item>
  20. <view class="pageContainer">
  21. <!--index.wxml-->
  22. <scroll-view class="scrollarea" bounces="false" scroll-y type="list">
  23. <view class="container">
  24. <!-- <view class="topShadow"></view> -->
  25. <view class="slider-count">{{current + 1}}/{{imgList.length}}</view>
  26. <swiper indicator-dots="{{false}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" bindchange="changeSwiper">
  27. <swiper-item wx:for="{{imgList}}" wx:key="index">
  28. <view class="swiper-item">
  29. <image bind:tap="onPreivewBannerImg" data-src="{{ item }}" src="{{ item }}"></image>
  30. </view>
  31. </swiper-item>
  32. </swiper>
  33. <view class="shop-section">
  34. <view class="showPrice">
  35. <view class="left">
  36. <view class="currentPrice">
  37. <text class="stuff">¥</text>
  38. <text class="priceZ">{{ smallGoods.integerPart || 0 }}</text>
  39. <text class="priceF">.{{ smallGoods.decimalPart || '00' }}</text>
  40. <text class="after">起</text>
  41. </view>
  42. <!-- <view class="originPrice"></view> -->
  43. </view>
  44. <view class="right">
  45. 已售1w+
  46. </view>
  47. </view>
  48. <view class="shopName">
  49. <!-- {{ selected.name }} -->
  50. 器乐数字AI工具会员卡
  51. </view>
  52. <view class="shopInfo">
  53. 一款专为音乐学习者、爱好者设计的音乐学习软件。通过先进的人工智能技术,为您提供全方位的乐理知识、日常练习和智能评分等功能,帮助您在音乐道路上更上一层楼。
  54. </view>
  55. <view class="shop-btn">
  56. <button bind:tap="onBuyShop" type="primary" disabled="{{ isOverSaled }}">立即享受专属权益</button>
  57. </view>
  58. <!-- <view class="btn-submit">立即享受专属权益</view> -->
  59. </view>
  60. <view class="goodsSection">
  61. <view class="goodsIntro">
  62. <view class="title">图文详情</view>
  63. <view class="images">
  64. <block wx:for="{{goodsImgList}}" wx:key="index">
  65. <!-- bind:tap="onPreivewGoodsImg" -->
  66. <image mode="widthFix" data-src="{{item}}" src="{{item}}"></image>
  67. </block>
  68. </view>
  69. </view>
  70. </view>
  71. <view class="well"></view>
  72. <!-- <view class="bottom-section">
  73. <view class="orders active">
  74. <image src="./images/icon-home-active.png" />
  75. <text>首页</text>
  76. </view>
  77. <view class="orders" bind:tap="onOrder">
  78. <image src="./images/icon-order.png" />
  79. <text>订单</text>
  80. </view>
  81. </view> -->
  82. </view>
  83. </scroll-view>
  84. </view>
  85. </swiper-item>
  86. </swiper>
  87. <van-popup show="{{ popupShow }}" safe-area-inset-bottom="{{false}}" lock-scroll="{{true}}" bind:close="onClose" position="bottom" round z-index="101" bind:close="onClose">
  88. <view class="popup-section">
  89. <image bind:tap="onClose" src="./images/icon-close-1.png" class="iconClose"></image>
  90. <scroll-view class="popup-container" bounces="{{ false }}" enhanced scroll-y type="list">
  91. <!-- <view class="popup-container"> -->
  92. <view class="popup-scroll">
  93. <image src="https://oss.dayaedu.com/ktyq/1739242193106.png" mode="widthFix" class="top-vip-img"></image>
  94. <!-- 添加权益人 -->
  95. <view class="addBuyer" bind:tap="onSelectBuyer">
  96. <view class="addBuyer-left">
  97. <image src="./images/icon-man.png" class="icon-man"></image>
  98. <view class="info" wx:if="{{ userBeneficiaryId }}">
  99. <view class="users">
  100. <text>{{ userBeneficiaryInfo.name }}</text>
  101. <text>{{ userBeneficiaryInfo.phoneNumber }}</text>
  102. </view>
  103. <view class="address">{{ userBeneficiaryInfo.schoolInfo }}</view>
  104. </view>
  105. <view class="info" wx:else>
  106. <view class="users">
  107. <text>请填写享用者的个人信息</text>
  108. </view>
  109. </view>
  110. </view>
  111. <image src="./images/icon-arrow-right.png" class="arrow-right"></image>
  112. </view>
  113. <view class="goodsInfo">
  114. <view class="desc">会员有效期</view>
  115. <view class="goodsList">
  116. <view wx:for="{{ list }}" wx:key="index" class="goodsItem {{ item.id == selected.id ? 'selected' : '' }} {{ item.stockNum <= 0 ? 'nosale' : '' }}" bind:tap="onSelectGoods" data-id="{{ item.id }}">{{ item.typeName }}
  117. <image wx:if="{{ item.stockNum <= 0 }}" src="./images/nosale.png"></image>
  118. </view>
  119. </view>
  120. </view>
  121. <view class="goodsInfo">
  122. <view class="desc">乐器搭配<text>(非必选)</text></view>
  123. <view class="goodsList">
  124. <view wx:for="{{ instrumentList }}" wx:key="index" class="goodsItem {{ item.id == selectInstrumentId ? 'selected' : '' }}" bind:tap="onSelectInstrument" data-id="{{ item.id }}">
  125. {{ item.name }}<text>¥{{ item.showSalePrice }}</text>
  126. </view>
  127. </view>
  128. </view>
  129. </view>
  130. <!-- </view> -->
  131. </scroll-view>
  132. <view class="popupBottom">
  133. <view class="current-item" wx:if="{{!isOverSaled && selected.id}}">
  134. <view class="current-top">
  135. 共计 <view class="prices"><text class="stuff">¥</text>
  136. <text class="priceZ">{{ formatSelectGood.integerPart || 0 }}</text>
  137. <text class="priceF">.{{ formatSelectGood.decimalPart || '00' }}</text>
  138. </view>
  139. <block wx:if="{{ formatSelectGood.originalPrice > formatSelectGood.salePrice }}">
  140. <text class="line">|</text>原价 ¥{{ formatSelectGood.showOriginalPrice }}
  141. </block>
  142. <block wx:if="{{ formatSelectGood.originalPrice > formatSelectGood.salePrice }}">
  143. <text class="line">|</text>
  144. <text>优惠 ¥{{ formatSelectGood.discountPrice }}</text>
  145. </block>
  146. </view>
  147. <view class="current-select-text">已选:会员有效期{{ formatSelectGood.typeName }}</view>
  148. </view>
  149. <view class="btnGroup">
  150. <button type="primary" catch:tap="onSubmit">立即享受专属权益</button>
  151. </view>
  152. </view>
  153. </view>
  154. </van-popup>
  155. <van-popup show="{{ showBuyer }}" safe-area-inset-bottom="{{false}}" lock-scroll="{{true}}" bind:close="onCloseBuyer" position="bottom" round z-index="101">
  156. <image src="./images/icon-back.png" class="icon-close-pop" bind:tap="onCloseBuyer" />
  157. <view class="container-pop">
  158. <view class="pop-address-title">享用者信息</view>
  159. <!-- <view class="section">
  160. </view> -->
  161. <scroll-view class="section" bounces="{{ false }}" enhanced scroll-y type="list">
  162. <view class="section-content">
  163. <van-field label="姓名" model:value="{{ name }}" maxlength="14" placeholder="请填写享用者姓名" />
  164. <van-field label="电话号码" model:value="{{ phone }}" maxlength="11" type="number" placeholder="请填写电话号码" />
  165. <van-field label="性别" placeholder="请选择性别" value="{{ gender ? (gender === '1' ? '男' : '女') : '' }}" is-link readonly bind:tap="onCheckedGender"></van-field>
  166. <van-field label="学校地区" value="{{ provinceName ? provinceName + '/' + cityName + (regionName ? ('/' + regionName) : '') : '' }}" bind:tap="onShowAreaList" placeholder="请选择学校地区" is-link readonly />
  167. <van-field model:value="{{ schoolAreaName }}" label="所在学校" placeholder="请选择所在学校" is-link readonly bind:tap="onSelectSchool" />
  168. <van-field value="{{ currentGradeTxt }}" label="所在年级" placeholder="请选择所在年级" is-link readonly bind:tap="onSelectGradeClass" />
  169. <van-field value="{{ currentClassTxt }}" label="所在班级" placeholder="请选择所在年级" is-link readonly bind:tap="onSelectClass" />
  170. </view>
  171. </scroll-view>
  172. <view class="pop-btn-group">
  173. <button disabled="{{ buyerLoading }}" class="submit-btn" bind:tap="onSubmitBuyer">保存信息</button>
  174. </view>
  175. </view>
  176. </van-popup>
  177. <!-- 性别 -->
  178. <van-action-sheet z-index="109" show="{{ showGender }}" actions="{{ genderList }}" description="选择性别" cancel-text="取消" bind:close="onCloseGender" bind:cancel="onCloseGender" bind:select="onSelectGender" />
  179. <!-- 地区 -->
  180. <van-popup round="{{true}}" lock-scroll="{{true}}" z-index="{{103}}" show="{{showArea}}" position="bottom" safe-area-inset-bottom="{{false}}" bind:close="onCloseAreaList" bind:after-leave="onAreaAfterLeave" bind:before-enter="onAreaBeforeEnter">
  181. <van-area wx:if="{{ !showAreaAfterLeave }}" id='area1' areaList="{{areaList}}" visible-item-count="8" item-height="46" value="{{ regionCode || cityCode }}" bind:cancel="onCloseAreaList" bind:confirm="submitArea" />
  182. </van-popup>
  183. <!-- 学校 -->
  184. <van-popup round="{{true}}" lock-scroll="{{true}}" z-index="{{102}}" show="{{showSchool}}" position="bottom" safe-area-inset-bottom="{{false}}" bind:close="onCloseSchool" bind:after-leave="onSchoolAfterLeave" bind:before-enter="onSchoolBeforeEnter">
  185. <view class="toolbar-top">
  186. <view class="toolbar-cancel" bind:tap="onCloseSchool">取消</view>
  187. <view class="toolbar-confirm" bind:tap="onSubmitSchool">确认</view>
  188. </view>
  189. <view class="select-school">
  190. <van-field border="{{ false }}" value="{{ provinceName ? provinceName + ' ' + cityName + ' ' + regionName : '' }}" bind:tap="onShowAreaList" placeholder="请选择学校地区" is-link readonly />
  191. </view>
  192. <view class="searchList" wx:if="{{ !showSchoolAfterLeave }}">
  193. <van-search value="{{ searchName }}" use-left-icon-slot use-action-slot show-action custom-class="searchInput" placeholder="请输入学校名称关键词" bind:search="onSearch" bind:clear="onSearch" bind:change="onSearchChange">
  194. <image slot="left-icon" src="./images/icon-search.png" class="icon-search" />
  195. <view slot="action" class="searchBtn" bind:tap="onSearch">搜索</view>
  196. </van-search>
  197. </view>
  198. <van-picker id="schoolArea" loading="{{ schoolLoading }}" wx:if="{{ !showSchoolAfterLeave && schoolAreaList.length > 0 }}" columns="{{ schoolAreaList }}" bind:change="onChangeSchool" visible-item-count="6" default-index="{{ schoolAreaIndex }}">
  199. </van-picker>
  200. <view class="empty-box" wx:if="{{ schoolAreaList.length <= 0 }}">
  201. <view class="empty_loading" wx:if="{{ schoolLoading }}">
  202. <van-loading color="#1989fa" />
  203. </view>
  204. <image mode="heightFix" src="https://oss.dayaedu.com/ktyq/1731839238916.png"></image>
  205. <view class="empty-text">暂无数据</view>
  206. </view>
  207. </van-popup>
  208. <!-- 年级 -->
  209. <van-popup round="{{true}}" lock-scroll="{{true}}" z-index="{{102}}" show="{{showGradeClass}}" position="bottom" safe-area-inset-bottom="{{false}}" bind:close="onCloseGradeClass" bind:after-leave="onGradeClassAfterLeave" bind:before-enter="onGradeClassBeforeEnter">
  210. <van-picker wx:if="{{ !showGradeClassAfterLeave }}" columns="{{ gradeGradeList }}" visible-item-count="6" show-toolbar default-index="{{ gradeGradeIndex }}" bind:cancel="onCloseGradeClass" bind:confirm="onSubmitGradeClass">
  211. </van-picker>
  212. </van-popup>
  213. <!-- 班级 -->
  214. <van-popup round="{{true}}" lock-scroll="{{true}}" z-index="{{102}}" show="{{showClass}}" position="bottom" safe-area-inset-bottom="{{false}}" bind:close="onCloseClass" bind:after-leave="onClassAfterLeave" bind:before-enter="onClassBeforeEnter">
  215. <van-picker wx:if="{{ !showClassAfterLeave }}" columns="{{ classList }}" visible-item-count="6" show-toolbar default-index="{{ classIndex }}" bind:cancel="onCloseClass" bind:confirm="onSubmitClass">
  216. </van-picker>
  217. </van-popup>