candy.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <template>
  2. <view class="center">
  3. <view class="content-money">
  4. <view class="buttom">
  5. <text class="text">可兑换积分</text>
  6. <view class="icon"><text>¥</text>{{ integral }}</view>
  7. </view>
  8. <view class="interval"></view>
  9. <view class="buttom">
  10. <text class="text">申请兑换糖果</text>
  11. <view class=" icon">
  12. <input class="input" type="number" v-model="withdrawal > integral ? integral : withdrawal"
  13. placeholder="申请兑换糖果数量" placeholder-class="placeholder" /></view>
  14. </view>
  15. <view class="interval"></view>
  16. <view class="tip">
  17. <view class=" tip-icon" @click="all()">全部转换</view>
  18. </view>
  19. </view>
  20. <view class="code">
  21. </view>
  22. <view class="btn" @click="submit">
  23. 提交申请
  24. </view>
  25. </view>
  26. </template>
  27. <script>
  28. import { exchange } from '@/api/market.js';
  29. export default {
  30. data(){
  31. return{
  32. // money: 1000,
  33. withdrawal:'',
  34. }
  35. },
  36. computed: {
  37. //可兑换积分
  38. integral() {
  39. return this.$store.state.user.userInfo.integral
  40. }
  41. },
  42. methods: {
  43. //全部转换
  44. all() {
  45. this.withdrawal = this.integral
  46. },
  47. //提交申请兑换
  48. submit() {
  49. }
  50. }
  51. }
  52. </script>
  53. <style lang="scss">
  54. page,.center {
  55. height: 100%;
  56. background: #FFFFFF;
  57. }
  58. .content-money {
  59. padding: 0 20rpx;
  60. background-color: #ffffff;
  61. .buttom {
  62. display: flex;
  63. justify-content: space-between;
  64. align-items: center;
  65. height: 110rpx;
  66. }
  67. .interval {
  68. width: 100%;
  69. height: 1px;
  70. background: #E6E6E6;
  71. }
  72. .icon {
  73. font-size: 48rpx;
  74. font-family: SourceHanSansCN;
  75. font-weight: 500;
  76. color: #333333;
  77. text{
  78. font-size: 32rpx;
  79. }
  80. .input {
  81. text-align: right;
  82. flex: 1;
  83. font-size: 30rpx;
  84. color: $font-color-dark;
  85. }
  86. .iconlocation {
  87. text-align: right;
  88. font-size: 36rpx;
  89. color: $font-color-light;
  90. }
  91. }
  92. .text {
  93. font-size: 32rpx;
  94. font-family: PingFang SC;
  95. font-weight: 500;
  96. color: #333333;
  97. }
  98. .tip {
  99. height: 74rpx;
  100. display: flex;
  101. justify-content: flex-end;
  102. align-items: center;
  103. .tip-text {
  104. font-size: 24rpx;
  105. font-family: PingFang SC;
  106. font-weight: 500;
  107. color: #999999;
  108. }
  109. .tip-icon {
  110. font-size: 26rpx;
  111. font-family: SourceHanSansCN;
  112. font-weight: 400;
  113. color: #EF041F;
  114. }
  115. }
  116. }
  117. .btn {
  118. text-align: center;
  119. margin: 134rpx auto;
  120. width: 670rpx;
  121. height: 88rpx;
  122. background: linear-gradient(0deg, #2E58FF, #32C6FF);
  123. border-radius: 10px;
  124. text-align: center;
  125. line-height: 88rpx;
  126. font-size: 32rpx;
  127. font-family: SourceHanSansCN;
  128. font-weight: 500;
  129. color: #FEFEFE;
  130. }
  131. .code {
  132. width: 750rpx;
  133. height: 20rpx;
  134. background: #F7F7F7;
  135. }
  136. </style>