index.wxml 12 KB

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