rake.vue 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275
  1. <template>
  2. <view class="rake">
  3. <scroll-view scroll-y="true" id="item-wrapper" class="list-cell" :style="{ height: height }">
  4. <!-- <empty v-if="list.length === 0"></empty> -->
  5. <view class="item">
  6. <view class="top">
  7. <view class="info-title">
  8. <image src="../../static/img/img11.png" mode=""></image>
  9. <view class="">
  10. 六牛云有有有意义意义六牛云有有有意义
  11. </view>
  12. </view>
  13. <view class="tags">
  14. <view class="tag">540天矿机</view>
  15. <view class="tag">540天矿机</view>
  16. <view class="tag">540天矿机</view>
  17. <view class="tag">540天矿机</view>
  18. </view>
  19. <view class="base-info">
  20. <view class="info-item">
  21. <view class="tit">单价</view>
  22. <view class="val">25.00FIL/T</view>
  23. </view>
  24. <view class="info-item">
  25. <view class="tit">有效算力</view>
  26. <view class="val">1T/台</view>
  27. </view>
  28. <view class="info-item">
  29. <view class="tit">周期</view>
  30. <view class="val">540天 + 180天</view>
  31. </view>
  32. </view>
  33. <view class="end-time">
  34. 到期时间:2021年9月20日
  35. </view>
  36. </view>
  37. <view class="btn-wrapper">
  38. <view class="btn">
  39. 服务费:10%<text @click="set(1)">设置</text>
  40. </view>
  41. <view class="btn">
  42. 佣金比例:10%<text @click="set(2)">设置</text>
  43. </view>
  44. </view>
  45. </view>
  46. </scroll-view>
  47. <uni-popup ref="popup" type="center">
  48. <view class="wrapper">
  49. <view class="title">
  50. 设置{{setType === 0? '服务费':'佣金比例'}}
  51. </view>
  52. <input type="text" v-model="setVal" :placeholder="placeTitle" class="inp"/>
  53. <view class="btn-wrapper">
  54. <view class="cansel" @click="close()">
  55. 取消
  56. </view>
  57. <view class="qr" @click="sub()">
  58. 确定
  59. </view>
  60. </view>
  61. </view>
  62. </uni-popup>
  63. </view>
  64. </template>
  65. <script>
  66. import empty from '../../components/empty.vue'
  67. export default {
  68. components: {
  69. empty
  70. },
  71. data() {
  72. return {
  73. height: 0,
  74. setType: 0,
  75. setVal: null,
  76. list: []
  77. }
  78. },
  79. computed: {
  80. placeTitle() {
  81. return this.setType === 0 ? '设置比例为10%~10%': '设置比例为10%~10%'
  82. }
  83. },
  84. onReady(res) {
  85. var _this = this;
  86. uni.getSystemInfo({
  87. success: resu => {
  88. const query = uni.createSelectorQuery();
  89. query.select('.list-cell').boundingClientRect();
  90. query.exec(function(res) {
  91. console.log(res, 'ddddddddddddd');
  92. _this.height = resu.windowHeight - res[0].top + 'px';
  93. console.log('打印页面的剩余高度', _this.height);
  94. });
  95. },
  96. fail: res => {}
  97. });
  98. },
  99. methods: {
  100. set(index) {
  101. this.setType = index
  102. this.$refs.popup.open()
  103. },
  104. close() {
  105. this.$refs.popup.close()
  106. this.setVal = null
  107. },
  108. sub() {
  109. console.log()
  110. this.$refs.popup.close()
  111. }
  112. }
  113. }
  114. </script>
  115. <style lang="scss" scoped>
  116. page {
  117. height: 100%;
  118. // padding-top: 20rpx;
  119. }
  120. .rake {
  121. // padding-top: 30rpx;
  122. }
  123. .item {
  124. margin: 20rpx auto;
  125. width: 670rpx;
  126. // height: 438rpx;
  127. background: #F7F6FB;
  128. border-radius: 10rpx;
  129. box-shadow:0 0 20rpx rgba(0,0,0,0.2);
  130. .top {
  131. // height: 347rpx;
  132. width: 100%;
  133. padding: 40rpx 30rpx 0;
  134. .info-title {
  135. display: flex;
  136. image {
  137. display: inline-block;
  138. width: 38rpx;
  139. height: 38rpx;
  140. margin-left: 10rpx;
  141. flex-shrink: 0;
  142. }
  143. view {
  144. padding-left: 12rpx;
  145. font-size: 30rpx;
  146. font-family: PingFang SC;
  147. font-weight: bold;
  148. color: #333333;
  149. }
  150. }
  151. .tags {
  152. padding-top: 20rpx;
  153. display: flex;
  154. flex-wrap: wrap;
  155. .tag {
  156. display: inline-block;
  157. padding: 0 20rpx;
  158. text-align: center;
  159. line-height: 43rpx;
  160. background: #E3F6FA;
  161. border-radius: 22rpx;
  162. margin:10rpx 10rpx 0 ;
  163. font-size: 24rpx;
  164. font-family: PingFang SC;
  165. font-weight: bold;
  166. color: #0EC1A1;
  167. }
  168. }
  169. .base-info {
  170. padding-top: 30rpx;
  171. display: flex;
  172. justify-content: space-between;
  173. // text-align: center;
  174. font-size: 24rpx;
  175. font-family: PingFang SC;
  176. font-weight: bold;
  177. color: #333333;
  178. padding-bottom: 30rpx;
  179. }
  180. .end-time {
  181. font-size: 30rpx;
  182. font-family: PingFang SC;
  183. font-weight: bold;
  184. color: #5771DF;
  185. padding-bottom: 24rpx;
  186. }
  187. }
  188. .btn-wrapper {
  189. width: 670rpx;
  190. height: 95rpx;
  191. background: #FFFFFF;
  192. border-radius: 0px 0px 10rpx 10rpx;
  193. display: flex;
  194. justify-content: space-around;
  195. align-items: center;
  196. .btn {
  197. text {
  198. display: inline-block;
  199. width: 108rpx;
  200. height: 39rpx;
  201. background: #5771DF;
  202. border: 1rpx solid #5771DF;
  203. box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 0, 0, 0.1);
  204. border-radius: 20rpx;
  205. text-align: center;
  206. line-height: 35rpx;
  207. margin-left: 11rpx;
  208. font-size: 24rpx;
  209. font-family: PingFang SC;
  210. font-weight: 500;
  211. color: #FFFFFF;
  212. }
  213. }
  214. }
  215. }
  216. .list-cell {
  217. width: 100%;
  218. height: 100%;
  219. background-color: #f8f8f8;
  220. }
  221. .wrapper {
  222. width: 549rpx;
  223. height: 344rpx;
  224. background: #FFFFFF;
  225. border-radius: 14rpx;
  226. .title {
  227. text-align: center;
  228. padding-top: 40rpx;
  229. font-size: 37rpx;
  230. font-family: PingFang SC;
  231. font-weight: bold;
  232. color: #333333;
  233. }
  234. .inp {
  235. display: block;
  236. margin: 60rpx auto;
  237. width: 439rpx;
  238. height: 68rpx;
  239. background: #F6F6F6;
  240. border-radius: 10rpx;
  241. padding-left: 13rpx;
  242. }
  243. .btn-wrapper {
  244. display: flex;
  245. view {
  246. width: 50%;
  247. text-align: center;
  248. }
  249. .cansel {
  250. font-size: 37rpx;
  251. font-family: PingFang SC;
  252. font-weight: 500;
  253. color: #333333;
  254. }
  255. .qr {
  256. font-size: 37rpx;
  257. font-family: PingFang SC;
  258. font-weight: 500;
  259. color: #5771DF;
  260. }
  261. }
  262. }
  263. </style>