index.wxml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  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="goodsSection">
  6. <view class="goodsIntro">
  7. <view class="images">
  8. <block wx:for="{{goodsImgList}}" wx:key="index">
  9. <!-- bind:tap="onPreivewGoodsImg" -->
  10. <image mode="widthFix" data-src="{{item}}" src="{{item}}"></image>
  11. </block>
  12. </view>
  13. </view>
  14. </view>
  15. <view class="bottom-section">
  16. <view class="orders active">
  17. <image src="./images/icon-home-active.png" />
  18. <text>首页</text>
  19. </view>
  20. <view class="orders" bind:tap="onOrder">
  21. <image src="./images/icon-order.png" />
  22. <text>订单</text>
  23. </view>
  24. </view>
  25. <van-popup show="{{ popupShow }}" safe-area-inset-bottom="{{false}}" lock-scroll="{{true}}" bind:close="onClose" position="bottom" round z-index="101">
  26. <view class="popup-section">
  27. <image bind:tap="onClose" src="./images/icon-close-1.png" class="iconClose"></image>
  28. <!-- wx:if="{{popupShow}}" -->
  29. <!-- <view class="popup-mask" bind:tap="onClose"></view> -->
  30. <scroll-view class="popup-container" bounces="false" scroll-y="true" type="list">
  31. <view class="popup-scroll">
  32. <image src="https://oss.dayaedu.com/ktyq/1739242193106.png" mode="widthFix" class="top-vip-img"></image>
  33. <!-- 添加权益人 -->
  34. <view class="addBuyer" bind:tap="onSelectBuyer">
  35. <view class="addBuyer-left">
  36. <image src="./images/icon-man.png" class="icon-man"></image>
  37. <view class="info" wx:if="{{ userBeneficiaryId }}">
  38. <view class="users">
  39. <text>{{ userBeneficiaryInfo.name }}</text>
  40. <text>{{ userBeneficiaryInfo.phoneNumber }}</text>
  41. </view>
  42. <view class="address">{{ userBeneficiaryInfo.schoolInfo }}</view>
  43. </view>
  44. <view class="info" wx:else>
  45. <view class="users">
  46. <text>请填写享用者的个人信息</text>
  47. </view>
  48. </view>
  49. </view>
  50. <image src="./images/icon-arrow-right.png" class="arrow-right"></image>
  51. </view>
  52. <view class="goodsInfo">
  53. <view class="desc">会员有效期</view>
  54. <view class="goodsList">
  55. <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 }}
  56. <image wx:if="{{ item.stockNum <= 0 }}" src="./images/nosale.png"></image>
  57. </view>
  58. </view>
  59. </view>
  60. <view class="goodsInfo">
  61. <view class="desc">乐器搭配<text>(非必选)</text></view>
  62. <view class="goodsList">
  63. <view wx:for="{{ instrumentList }}" wx:key="index" class="goodsItem {{ item.id == selectInstrumentId ? 'selected' : '' }}" bind:tap="onSelectInstrument" data-id="{{ item.id }}">
  64. {{ item.name }} <text>¥{{ item.showSalePrice }}</text>
  65. </view>
  66. </view>
  67. </view>
  68. </view>
  69. <view style="padding-bottom: 300rpx;"></view>
  70. <view class="popupBottom">
  71. <!-- 有选择商品的时候 -->
  72. <view class="current-item" wx:if="{{!isOverSaled && selected.id}}">
  73. <!-- <view class="current-item-text">您已选择:</view> -->
  74. <view class="current-top">
  75. 共计 <view class="prices"><text class="stuff">¥</text>
  76. <text class="priceZ">{{ formatSelectGood.integerPart || 0 }}</text>
  77. <text class="priceF">.{{ formatSelectGood.decimalPart || '00' }}</text>
  78. </view>
  79. <text class="line">|</text>原价 ¥ {{ formatSelectGood.originalPrice }}
  80. <block wx:if="{{ formatSelectGood.originalPrice > formatSelectGood.salePrice }}">
  81. <text class="line">|</text>
  82. <text>优惠 ¥ {{ formatSelectGood.discountPrice }}</text>
  83. </block>
  84. </view>
  85. <view class="current-select-text">已选:{{ formatSelectGood.typeName }}</view>
  86. </view>
  87. <view class="btnGroup">
  88. <button type="primary" catch:tap="onSubmit">立即享受专属权益</button>
  89. </view>
  90. </view>
  91. </scroll-view>
  92. <!-- <view class="popup-container">
  93. </view> -->
  94. </view>
  95. </van-popup>
  96. </view>
  97. <!-- <service popShow="{{ showService }}" bind:changePop="changePop"></service> -->
  98. <van-popup show="{{ showBuyer }}" safe-area-inset-bottom="{{false}}" lock-scroll="{{true}}" bind:close="onCloseBuyer" position="bottom" round z-index="101">
  99. <image src="./images/icon-back.png" class="icon-close-pop" bind:tap="onCloseBuyer" />
  100. <view class="container-pop">
  101. <view class="pop-address-title">享用者信息</view>
  102. <view class="section">
  103. <view class="section-content">
  104. <van-field label="姓名" model:value="{{ name }}" maxlength="15" placeholder="请填写享用者姓名" />
  105. <van-field label="电话号码" model:value="{{ phone }}" maxlength="11" type="number" placeholder="请填写电话号码" />
  106. <van-field label="性别" placeholder="请选择性别" value="{{ gender ? (gender === '1' ? '男' : '女') : '' }}" is-link readonly bind:tap="onCheckedGender"></van-field>
  107. <van-field label="学校地区" value="{{ provinceName ? provinceName + '/' + cityName + (regionName ? ('/' + regionName) : '') : '' }}" bind:tap="onShowAreaList" placeholder="请选择学校地区" is-link readonly />
  108. <van-field model:value="{{ schoolAreaName }}" label="所在学校" placeholder="请选择所在学校" is-link readonly bind:tap="onSelectSchool" />
  109. <van-field value="{{ currentGradeTxt }}" label="所在年级" placeholder="请选择所在年级" is-link readonly bind:tap="onSelectGradeClass" />
  110. <van-field value="{{ currentClassTxt }}" label="所在班级" placeholder="请选择所在年级" is-link readonly bind:tap="onSelectClass" />
  111. </view>
  112. </view>
  113. <view class="pop-btn-group">
  114. <button disabled="{{ buyerLoading }}" class="submit-btn" bind:tap="onSubmitBuyer">保存信息</button>
  115. </view>
  116. </view>
  117. </van-popup>
  118. <!-- 性别 -->
  119. <van-action-sheet z-index="103" show="{{ showGender }}" actions="{{ genderList }}" description="选择性别" cancel-text="取消" bind:close="onCloseGender" bind:cancel="onCloseGender" bind:select="onSelectGender" />
  120. <!-- 地区 -->
  121. <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">
  122. <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" />
  123. </van-popup>
  124. <!-- 学校 -->
  125. <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">
  126. <view class="toolbar-top">
  127. <view class="toolbar-cancel" bind:tap="onCloseSchool">取消</view>
  128. <view class="toolbar-confirm" bind:tap="onSubmitSchool">确认</view>
  129. </view>
  130. <view class="select-school">
  131. <van-field border="false" value="{{ provinceName ? provinceName + ' ' + cityName + ' ' + regionName : '' }}" bind:tap="onShowAreaList" placeholder="请选择学校地区" is-link readonly />
  132. </view>
  133. <view class="searchList" wx:if="{{ !showSchoolAfterLeave }}">
  134. <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">
  135. <image slot="left-icon" src="./images/icon-search.png" class="icon-search" />
  136. <view slot="action" class="searchBtn" bind:tap="onSearch">搜索</view>
  137. </van-search>
  138. </view>
  139. <van-picker loading="{{ schoolLoading }}" wx:if="{{ !showSchoolAfterLeave && schoolAreaList.length > 0 }}" columns="{{ schoolAreaList }}" bind:change="onChangeSchool" visible-item-count="6" default-index="{{ schoolAreaIndex }}">
  140. </van-picker>
  141. <view class="empty-box" wx:if="{{ schoolAreaList.length <= 0 }}">
  142. <view class="empty_loading" wx:if="{{ schoolLoading }}">
  143. <van-loading color="#1989fa" />
  144. </view>
  145. <image mode="widthFix" src="https://oss.dayaedu.com/ktyq/1731839238916.png"></image>
  146. <view class="empty-text">暂无数据</view>
  147. </view>
  148. </van-popup>
  149. <!-- 年级 -->
  150. <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">
  151. <van-picker wx:if="{{ !showGradeClassAfterLeave }}" columns="{{ gradeGradeList }}" visible-item-count="6" show-toolbar default-index="{{ gradeGradeIndex }}" bind:cancel="onCloseGradeClass" bind:confirm="onSubmitGradeClass">
  152. </van-picker>
  153. </van-popup>
  154. <!-- 班级 -->
  155. <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">
  156. <van-picker wx:if="{{ !showClassAfterLeave }}" columns="{{ classList }}" visible-item-count="6" show-toolbar default-index="{{ classIndex }}" bind:cancel="onCloseClass" bind:confirm="onSubmitClass">
  157. </van-picker>
  158. </van-popup>
  159. </scroll-view>
  160. </view>