You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

225 lines
4.5 KiB

9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
  1. <template>
  2. <view class="starting bx">
  3. <view class="bg">
  4. <image src="@/static/starting/banner.png" mode="widthFix"></image>
  5. </view>
  6. <view class="user-info">
  7. <view class="top">
  8. <view class="current-balance">{{ $t('page.starting.balance') }}</view>
  9. <view class="money">
  10. <view class="number">{{ userInfo.money }}</view>
  11. <view class="unit">{{ $t('page.starting.unit') }}</view>
  12. </view>
  13. </view>
  14. <view class="todoy-info">
  15. <view class="todoy-info-main">
  16. <view class="today-info-l">
  17. <view class="today-income">{{ $t('page.starting.today-income') }}</view>
  18. <div class="money">
  19. <text class="number">{{ userInfo.belece }}</text>
  20. <text class="unit">{{ $t('page.starting.unit') }}</text>
  21. </div>
  22. </view>
  23. <div class="booking-info-r">
  24. <view class="booking-income">{{ $t('page.starting.completed') }}</view>
  25. <div class="booking-data">
  26. <text class="number">{{ userInfo.encourageNum }}/{{ userInfo.encourageSum }}</text>
  27. </div>
  28. </div>
  29. </view>
  30. </view>
  31. <view class="btn">
  32. <view @click="submit" class="submit">{{ $t('page.starting.auto-match') }}</view>
  33. </view>
  34. </view>
  35. <view class="steps">
  36. <view class="steps-title">The steps</view>
  37. <view class="steps-content">
  38. <view>1. Click the "Auto-match" button and follow the instructions to complete the task.</view>
  39. <view>2. After completing the task, you can settle the commission to the balance.</view>
  40. </view>
  41. </view>
  42. <sTabbar select="2" />
  43. <prizeDraw ref="prizeDraw" @orderPay="orderPay"></prizeDraw>
  44. </view>
  45. </template>
  46. <script>
  47. import sTabbar from '@/components/base/tabBar.vue'
  48. import prizeDraw from '@/components/prizeDraw/prizeDraw.vue'
  49. export default {
  50. name: 'Starting',
  51. components : { sTabbar , prizeDraw },
  52. data() {
  53. return {
  54. userInfo : {}
  55. }
  56. },
  57. onShow(){
  58. this.getUserInfo()
  59. },
  60. methods: {
  61. //点击抽奖按钮
  62. submit(){
  63. this.request('createOrder').then(res => {
  64. this.$refs.prizeDraw.toggle(res.result)
  65. })
  66. },
  67. //获取用户信息
  68. getUserInfo() {
  69. this.request('userInfo').then(res => {
  70. if (res.code == 200) {
  71. this.userInfo = res.result.userInfo
  72. }
  73. })
  74. },
  75. //订单支付
  76. orderPay(id){
  77. this.request('pay',{},{ id }).then(res => {
  78. if (res.code == 200) {
  79. uni.showToast({
  80. icon: "none",
  81. title: this.$t(`message.${res.message}`)
  82. });
  83. this.getUserInfo()
  84. this.$refs.prizeDraw.close()
  85. }
  86. })
  87. }
  88. }
  89. }
  90. </script>
  91. <style lang="scss" scoped>
  92. .starting {
  93. height: 100vh;
  94. .bg {
  95. border-bottom-left-radius: 60% 60rpx;
  96. border-bottom-right-radius: 60% 60rpx;
  97. overflow: hidden;
  98. image {
  99. width: 100%;
  100. }
  101. }
  102. .user-info {
  103. position: relative;
  104. z-index: 1;
  105. width: 90%;
  106. margin: -120rpx auto 0rpx auto;
  107. background: white;
  108. border-radius: 20rpx;
  109. box-shadow: aqua 0.5px 0.5px 5px 0px;
  110. .top {
  111. box-sizing: border-box;
  112. padding: 0rpx 15rpx;
  113. .current-balance {
  114. display: flex;
  115. align-items: center;
  116. height: 60rpx;
  117. color: #8e8e98;
  118. font-size: 30rpx;
  119. }
  120. .money {
  121. display: flex;
  122. color: rgb(0, 208, 234);
  123. font-size: 50rpx;
  124. font-weight: bold;
  125. .number {}
  126. .unit {
  127. margin-left: 20rpx;
  128. }
  129. }
  130. }
  131. .todoy-info {
  132. box-sizing: border-box;
  133. padding: 0rpx 20rpx;
  134. height: 140rpx;
  135. .todoy-info-main {
  136. display: flex;
  137. flex-wrap: wrap;
  138. height: 100%;
  139. background-color: rgba(0, 208, 234, 0.1);
  140. border-radius: 20rpx;
  141. margin: 20rpx 0rpx;
  142. box-sizing: border-box;
  143. padding: 0rpx 30rpx;
  144. .today-info-l,
  145. .booking-info-r {
  146. display: flex;
  147. flex-direction: column;
  148. justify-content: center;
  149. width: 50%;
  150. font-size: 28rpx;
  151. .today-income,
  152. .booking-income {
  153. // color: #8e8e98;
  154. }
  155. .money,
  156. .booking-data {
  157. font-weight: bold;
  158. margin-top: 10rpx;
  159. }
  160. }
  161. }
  162. }
  163. .btn {
  164. padding: 20rpx;
  165. .submit {
  166. background-color: rgb(0, 208, 234);
  167. color: white;
  168. height: 80rpx;
  169. display: flex;
  170. align-items: center;
  171. justify-content: center;
  172. font-size: 40rpx;
  173. font-weight: bold;
  174. border-radius: 20rpx;
  175. }
  176. }
  177. }
  178. .steps {
  179. width: 90%;
  180. margin: 0rpx auto;
  181. padding-top: 80rpx;
  182. .steps-title {
  183. font-size: 36rpx;
  184. font-weight: bold;
  185. }
  186. .steps-content {
  187. color: #8e8e98;
  188. font-size: 30rpx;
  189. margin-top: 20rpx;
  190. }
  191. }
  192. }
  193. </style>