node.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  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.$refs.popup.close();
  81. uni.navigateTo({
  82. url: '/pages/money/success'
  83. })
  84. })
  85. .catch(e => {
  86. this.password = '';
  87. this.$refs.popup.close();
  88. console.log(e);
  89. });
  90. }
  91. }
  92. };
  93. </script>
  94. <style lang="scss">
  95. page {
  96. height: 100%;
  97. }
  98. .center {
  99. height: 0;
  100. min-height: 100%;
  101. }
  102. .box {
  103. position: relative;
  104. width: 100%;
  105. height: 1930rpx;
  106. .bg {
  107. position: absolute;
  108. top: 0;
  109. right: 0;
  110. left: 0;
  111. width: 100%;
  112. height: 1930rpx;
  113. image {
  114. width: 100%;
  115. height: 1930rpx;
  116. }
  117. }
  118. .btn {
  119. width: 684rpx;
  120. height: 96rpx;
  121. position: absolute;
  122. bottom: 108rpx;
  123. left: 0;
  124. right: 0;
  125. margin: auto;
  126. background: #29f3fd;
  127. border-radius: 48rpx;
  128. text-align: center;
  129. line-height: 96rpx;
  130. font-size: 42rpx;
  131. font-family: PingFang SC;
  132. font-weight: bold;
  133. color: #030454;
  134. }
  135. .title {
  136. padding-top: 700rpx;
  137. position: relative;
  138. z-index: 10;
  139. display: flex;
  140. justify-content: center;
  141. align-items: center;
  142. image {
  143. width: 36rpx;
  144. height: 34rpx;
  145. }
  146. .title-font {
  147. padding: 0 10rpx;
  148. font-size: 48rpx;
  149. font-family: Source Han Sans CN;
  150. font-weight: 500;
  151. color: #FFFFFF;
  152. }
  153. }
  154. .main {
  155. position: relative;
  156. z-index: 10;
  157. width: 624rpx;
  158. height: 244rpx;
  159. font-size: 24rpx;
  160. font-family: PingFang SC;
  161. font-weight: 500;
  162. color: #FFFFFF;
  163. margin: 50rpx auto 0;
  164. }
  165. }
  166. .popup {
  167. width: 540rpx;
  168. background-color: #ffffff;
  169. border-radius: 15rpx;
  170. text-align: center;
  171. padding-bottom: 50rpx;
  172. .popup-dox {
  173. padding-top: 84rpx;
  174. display: flex;
  175. flex-direction: column;
  176. align-items: center;
  177. .popup-title {
  178. font-size: 36rpx;
  179. font-family: PingFang SC;
  180. font-weight: bold;
  181. color: #333333;
  182. }
  183. .popup-little {
  184. font-size: 24rpx;
  185. font-family: PingFang SC;
  186. font-weight: 500;
  187. color: #808080;
  188. }
  189. }
  190. .people-info {
  191. margin-top: 56rpx;
  192. padding: 0 26rpx;
  193. text-align: left;
  194. line-height: 1;
  195. .info-font {
  196. font-size: 30rpx;
  197. font-family: PingFang SC;
  198. font-weight: 500;
  199. color: #333333;
  200. }
  201. .info-main {
  202. text-align: center;
  203. margin-top: 70rpx;
  204. font-size: 70rpx;
  205. font-family: PingFang SC;
  206. font-weight: bold;
  207. color: #e83f30;
  208. text {
  209. font-size: 40rpx;
  210. }
  211. }
  212. .info-tip {
  213. text-align: center;
  214. margin-top: 20rpx;
  215. font-size: 28rpx;
  216. font-family: PingFang SC;
  217. font-weight: 500;
  218. color: #666666;
  219. }
  220. }
  221. .pwd-box {
  222. width: 490rpx;
  223. background: #f4f4f4;
  224. border-radius: 10rpx;
  225. display: flex;
  226. align-items: center;
  227. justify-content: flex-start;
  228. margin: 50rpx auto 0;
  229. padding: 20rpx 20rpx;
  230. .pwd-font {
  231. width: 80rpx;
  232. font-size: 30rpx;
  233. font-family: PingFang SC;
  234. font-weight: 500;
  235. color: #333333;
  236. }
  237. .pwd-tip {
  238. font-size: 28rpx;
  239. font-family: PingFang SC;
  240. font-weight: 500;
  241. color: #999999;
  242. opacity: 0.51;
  243. }
  244. .input {
  245. margin-left: 20rpx;
  246. }
  247. }
  248. .btn-box {
  249. margin: 46rpx auto 0;
  250. width: 460rpx;
  251. height: 70rpx;
  252. background: linear-gradient(0deg, #2e58ff, #32c6ff);
  253. border-radius: 10rpx;
  254. text-align: center;
  255. line-height: 70rpx;
  256. font-size: 28rpx;
  257. font-family: PingFang SC;
  258. font-weight: 500;
  259. color: #ffffff;
  260. }
  261. }
  262. .close_icon {
  263. width: 60rpx;
  264. height: 60rpx;
  265. margin: 88rpx auto 0;
  266. image {
  267. width: 100%;
  268. height: 100%;
  269. }
  270. }
  271. </style>