small-paper.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. <template>
  2. <view class="paper-index box-sizing-border">
  3. <view class="close-box sys-background-gray-f">
  4. <uni-icons type="closeempty" size="14" @click="to(1)"></uni-icons>
  5. </view>
  6. <view class="box-info box-sizing-border">
  7. <view class="box-1">
  8. <image src="@/static/img/wallet/people.png" mode="scaleToFill"></image>
  9. <view class="box-2 mb-8 sys-size-40 sys-color-white sys-weight-600">小纸条</view>
  10. </view>
  11. <view class="mb-38 sys-size-28 sys-color-white">直接私信留言</view>
  12. <scroll-view scroll-x="true" class="scroll-list-x sys-background-gray-f box-sizing-border">
  13. <view v-if="false" class="list-n sys-size-28 sys-color-gray-9 sys-weight-600">暂无数据</view>
  14. <view v-else class="list-box" v-for="(item,i) in list" :key="i" @click="to(4,item)"
  15. :class="shopId===item.id?'view-s':'view-n'">
  16. <view class="incon-s" v-if="shopId===item.id">
  17. <image src="@/static/img/wallet/icon-s.png" mode=""></image>
  18. <text class="sys-size-20 sys-color-white">立省35元</text>
  19. </view>
  20. <view class="incon-s" v-else>
  21. <image src="@/static/img/wallet/icon-n.png" mode=""></image>
  22. <text class="sys-size-20 sys-color-white">立省35元</text>
  23. </view>
  24. <view :class="shopId===item.id?'sys-color-FE6915':'sys-color-gray-9'" class="sys-size-28 mt-60">50个</view>
  25. <view class="m-8">
  26. <text class="sys-size-24 sys-color-FE6915">¥</text>
  27. <text class="sys-size-48 sys-color-FE6915 sys-weight-600">9.9</text>
  28. </view>
  29. <view :class="shopId===item.id?'sys-color-FE6915':'sys-color-gray-9'" class="sys-size-28">2元/个</view>
  30. </view>
  31. </scroll-view>
  32. </view>
  33. <view class="info-b">
  34. <view class="card-button sys-background-41AAEE sys-size-32 sys-color-white" @click="to(2)">
  35. <image src="@/static/img/wallet/zfb-logo.png" mode="scaleToFill"></image>支付宝支付
  36. </view>
  37. <view class="card-button sys-background-6DCF06 sys-size-32 sys-color-white" @click="to(3)">
  38. <image src="@/static/img/wallet/wx-logo.png" mode="scaleToFill"></image>微信支付
  39. </view>
  40. </view>
  41. <view class="sys-size-24 sys-color-white info-1">会员特惠补充装,给你更多的动心</view>
  42. <view class="sys-size-22 sys-color-4BC285 info-1" @click="to(5)">《常见问题》</view>
  43. </view>
  44. </template>
  45. <script>
  46. export default {
  47. name:'small-paper',
  48. data(){
  49. return{
  50. shopId:2,
  51. list:[{id:1},{id:2},{id:1},{id:1},{id:1},{id:1},],
  52. }
  53. },
  54. mounted() {
  55. console.log('加载1');
  56. },
  57. methods:{
  58. to(type,item){
  59. if(type === 1){
  60. this.$emit('close')
  61. }else if(type === 4){
  62. // 选择
  63. }else if(type === 2){
  64. // 支付宝
  65. }else if(type === 3){
  66. // 微信
  67. }else if(type === 5){
  68. // 常见问题
  69. }
  70. },
  71. }
  72. }
  73. </script>
  74. <style scoped lang="scss">
  75. .paper-index{
  76. width: 100%;
  77. height: 100vh;
  78. position: absolute;
  79. top: 0;
  80. left: 0;
  81. background: rgba(0,0,0,0.65);
  82. z-index: 100;
  83. padding: 148rpx 32rpx 0 32rpx;
  84. .mb-8{
  85. margin-bottom: 8rpx;
  86. }
  87. .mb-38{
  88. margin-bottom: 38rpx;
  89. }
  90. .mt-60{
  91. margin-top: 60rpx;
  92. }
  93. .m-8{
  94. margin: 8rpx 0;
  95. }
  96. .info-1{
  97. margin-bottom: 12rpx;
  98. text-align: center;
  99. }
  100. .info-b{
  101. display: flex;
  102. justify-content: space-between;
  103. .card-button{
  104. width: 333rpx;
  105. height: 88rpx;
  106. border-radius: 16rpx;
  107. line-height: 88rpx;
  108. display: flex;
  109. align-items: center;
  110. justify-content: center;
  111. margin: 24rpx 0;
  112. image{
  113. width: 32rpx;
  114. height: 32rpx;
  115. margin-right: 8rpx;
  116. }
  117. }
  118. }
  119. .close-box{
  120. width: 48rpx;
  121. height: 48rpx;
  122. text-align: center;
  123. line-height: 48rpx;
  124. border-radius: 50%;
  125. margin-left: auto;
  126. margin-bottom: 24rpx;
  127. }
  128. .box-info{
  129. width: 100%;
  130. min-height: 950rpx;
  131. background: #F0B503;
  132. border-radius: 16rpx;
  133. padding: 44rpx 24rpx 24rpx 24rpx;
  134. text-align: center;
  135. .box-1{
  136. width: 485rpx;
  137. height: 485rpx;
  138. margin: 0 auto;
  139. position: relative;
  140. .box-2{
  141. position: absolute;
  142. bottom: 10rpx;
  143. left: 178rpx;
  144. }
  145. image{
  146. width: 485rpx;
  147. height: 485rpx;
  148. }
  149. }
  150. }
  151. .scroll-list-x{
  152. width: 100%;
  153. height: 324rpx;
  154. border-radius: 20rpx;
  155. padding: 40rpx 32rpx;
  156. display: flex;
  157. white-space: nowrap;
  158. .list-n{
  159. line-height: 324rpx;
  160. }
  161. .list-box{
  162. display: inline-block;
  163. width: 182rpx;
  164. height: 244rpx;
  165. border-radius: 20rpx;
  166. margin: 0rpx 8rpx;
  167. box-sizing: border-box;
  168. position: relative;
  169. .incon-s{
  170. width: 140rpx;
  171. height: 40rpx;
  172. position: absolute;
  173. left: -6rpx;
  174. top: 0;
  175. image{
  176. width: 100%;
  177. height: 100%;
  178. }
  179. text{
  180. position: absolute;
  181. top: 2rpx;
  182. left:14rpx;
  183. }
  184. }
  185. }
  186. .view-n{
  187. border: 2rpx solid #E0E0E0;
  188. }
  189. .view-s{
  190. border: 2rpx solid rgba(254, 215, 124, 1);
  191. background: linear-gradient(180deg, #FEFAEE 0%, rgba(255,247,221,0.94) 100%);
  192. }
  193. }
  194. }
  195. </style>