node.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  1. <template>
  2. <view class="center">
  3. <scroll-view class="box" scroll-y="true">
  4. <view class="bg"><image src="../../static/img/rengou.png" mode=""></image></view>
  5. <view class="title">
  6. <image src="../../static/img/start.png" mode=""></image>
  7. <view class="title-font">技术改变生活</view>
  8. <image src="../../static/img/start.png" mode=""></image>
  9. </view>
  10. <view class="main">
  11. 说明内容说明内容说明内容说明内容说明内容说明内容说明内容说明内容说明内容说明内容说明内容说明内容说明内容说明内容说明内容说明内容说明内容说明内容说明内容说明内容说明内容说明内容说明内容说明内容说明内容说明内容说明内容说明内容说明内容说明内容说明内容说明内容说明内容说明内容说明内容说明内容说明内容
  12. </view>
  13. <view class="btn" @click="buy()">加入合伙人</view>
  14. </scroll-view>
  15. <uni-popup ref="popup" type="center">
  16. <view class="popup">
  17. <view class="popup-dox">
  18. <view class="popup-title">确认付款</view>
  19. <view class="popup-little">请输入支付密码确认付款</view>
  20. </view>
  21. <view class="people-info">
  22. <view class="info-main">
  23. {{ list.buy_price * 1 }}
  24. <text>{{ list.buy_money_type }}</text>
  25. </view>
  26. <view class="info-tip">加入合伙人</view>
  27. <view class="pwd-box">
  28. <view class="pwd-font">密码</view>
  29. <view class="input"><input type="password" value="password" v-model="password" placeholder="请输入支付密码" placeholder-class="pwd-tip" /></view>
  30. </view>
  31. <view class="btn-box" @click="pswQd">确认</view>
  32. </view>
  33. </view>
  34. <view class="close_icon" @click="close"><image src="../../static/img/Close.png"></image></view>
  35. </uni-popup>
  36. </view>
  37. </template>
  38. <script>
  39. import { getPoint, buyPoint } from '@/api/set.js';
  40. export default {
  41. data() {
  42. return {
  43. mun: 1,
  44. zuiduo: 0, //剩余份数占总数的百分比
  45. shen: 0, //还剩几份
  46. all: 0, //总量
  47. id: '',
  48. list: '',
  49. password: ''
  50. };
  51. },
  52. onLoad() {
  53. this.loadData();
  54. },
  55. methods: {
  56. async loadData() {
  57. getPoint().then(({ data }) => {
  58. console.log(data);
  59. this.list = data[0];
  60. this.id = data[0].id;
  61. });
  62. },
  63. buy() {
  64. this.$refs.popup.open();
  65. },
  66. close() {
  67. this.$refs.popup.close();
  68. },
  69. pswQd() {
  70. const obj = this;
  71. buyPoint(
  72. {
  73. trade_psw: this.password,
  74. num: this.mun
  75. },
  76. this.id
  77. )
  78. .then(e => {
  79. this.password = '';
  80. this.show1 = false;
  81. this.$api.msg('购买节点成功');
  82. })
  83. .catch(e => {
  84. this.password = '';
  85. this.show1 = false;
  86. console.log(e);
  87. });
  88. }
  89. }
  90. };
  91. </script>
  92. <style lang="scss">
  93. page {
  94. height: 100%;
  95. }
  96. .center {
  97. height: 0;
  98. min-height: 100%;
  99. }
  100. .box {
  101. position: relative;
  102. width: 100%;
  103. height: 1930rpx;
  104. .bg {
  105. position: absolute;
  106. top: 0;
  107. right: 0;
  108. left: 0;
  109. width: 100%;
  110. height: 1930rpx;
  111. image {
  112. width: 100%;
  113. height: 1930rpx;
  114. }
  115. }
  116. .btn {
  117. width: 684rpx;
  118. height: 96rpx;
  119. position: absolute;
  120. bottom: 108rpx;
  121. left: 0;
  122. right: 0;
  123. margin: auto;
  124. background: #29f3fd;
  125. border-radius: 48rpx;
  126. text-align: center;
  127. line-height: 96rpx;
  128. font-size: 42rpx;
  129. font-family: PingFang SC;
  130. font-weight: bold;
  131. color: #030454;
  132. }
  133. .title {
  134. padding-top: 700rpx;
  135. position: relative;
  136. z-index: 10;
  137. display: flex;
  138. justify-content: center;
  139. align-items: center;
  140. image {
  141. width: 36rpx;
  142. height: 34rpx;
  143. }
  144. .title-font {
  145. padding: 0 10rpx;
  146. font-size: 48rpx;
  147. font-family: Source Han Sans CN;
  148. font-weight: 500;
  149. color: #FFFFFF;
  150. }
  151. }
  152. .main {
  153. position: relative;
  154. z-index: 10;
  155. width: 624rpx;
  156. height: 244rpx;
  157. font-size: 24rpx;
  158. font-family: PingFang SC;
  159. font-weight: 500;
  160. color: #FFFFFF;
  161. margin: 50rpx auto 0;
  162. }
  163. }
  164. .popup {
  165. width: 540rpx;
  166. background-color: #ffffff;
  167. border-radius: 15rpx;
  168. text-align: center;
  169. padding-bottom: 50rpx;
  170. .popup-dox {
  171. padding-top: 84rpx;
  172. display: flex;
  173. flex-direction: column;
  174. align-items: center;
  175. .popup-title {
  176. font-size: 36rpx;
  177. font-family: PingFang SC;
  178. font-weight: bold;
  179. color: #333333;
  180. }
  181. .popup-little {
  182. font-size: 24rpx;
  183. font-family: PingFang SC;
  184. font-weight: 500;
  185. color: #808080;
  186. }
  187. }
  188. .people-info {
  189. margin-top: 56rpx;
  190. padding: 0 26rpx;
  191. text-align: left;
  192. line-height: 1;
  193. .info-font {
  194. font-size: 30rpx;
  195. font-family: PingFang SC;
  196. font-weight: 500;
  197. color: #333333;
  198. }
  199. .info-main {
  200. text-align: center;
  201. margin-top: 70rpx;
  202. font-size: 70rpx;
  203. font-family: PingFang SC;
  204. font-weight: bold;
  205. color: #e83f30;
  206. text {
  207. font-size: 40rpx;
  208. }
  209. }
  210. .info-tip {
  211. text-align: center;
  212. margin-top: 20rpx;
  213. font-size: 28rpx;
  214. font-family: PingFang SC;
  215. font-weight: 500;
  216. color: #666666;
  217. }
  218. }
  219. .pwd-box {
  220. width: 490rpx;
  221. background: #f4f4f4;
  222. border-radius: 10rpx;
  223. display: flex;
  224. align-items: center;
  225. justify-content: flex-start;
  226. margin: 50rpx auto 0;
  227. padding: 20rpx 20rpx;
  228. .pwd-font {
  229. font-size: 30rpx;
  230. font-family: PingFang SC;
  231. font-weight: 500;
  232. color: #333333;
  233. }
  234. .pwd-tip {
  235. font-size: 28rpx;
  236. font-family: PingFang SC;
  237. font-weight: 500;
  238. color: #999999;
  239. opacity: 0.51;
  240. }
  241. .input {
  242. margin-left: 20rpx;
  243. }
  244. }
  245. .btn-box {
  246. margin: 46rpx auto 0;
  247. width: 460rpx;
  248. height: 70rpx;
  249. background: linear-gradient(0deg, #2e58ff, #32c6ff);
  250. border-radius: 10rpx;
  251. text-align: center;
  252. line-height: 70rpx;
  253. font-size: 28rpx;
  254. font-family: PingFang SC;
  255. font-weight: 500;
  256. color: #ffffff;
  257. }
  258. }
  259. .close_icon {
  260. width: 60rpx;
  261. height: 60rpx;
  262. margin: 88rpx auto 0;
  263. image {
  264. width: 100%;
  265. height: 100%;
  266. }
  267. }
  268. </style>