猫妈狗爸伴宠师小程序前端代码
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.

194 lines
3.7 KiB

3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
  1. <template>
  2. <!-- <div>保证金</div> -->
  3. <view class="box">
  4. <view class="top" :style="{ borderRadius: '16rpx' }">
  5. <view class="level account">
  6. <view class="text1">
  7. 账户总览
  8. </view>
  9. <view class="level text4">
  10. <view @click="jumpToDetail">
  11. 资金明细
  12. </view>
  13. <view @click="jumpToRefund" class="line">
  14. 申请退还
  15. </view>
  16. </view>
  17. </view>
  18. <view class="level Recharge">
  19. <view class="money level">
  20. <text>¥</text>
  21. <input v-model="money" type="text" />
  22. </view>
  23. <view class="text2" :style="{ borderRadius: '23.5rpx' }" @click="onPay">
  24. 去充值
  25. </view>
  26. </view>
  27. </view>
  28. <view class="center size-28">
  29. <view class="text3">
  30. 保证金说明
  31. </view>
  32. <view>
  33. 履约保证金用于处理轻度违约行为以及交易纠纷;具体规则可在<text
  34. :style="{color:'#FFBF60'}">履约保证金协议</text>中查看如平台有任何私自克扣/乱扣费的情况可向市场监督局投诉平台会对违约做出公正的判罚同时接受公正的处理
  35. </view>
  36. <view class="">
  37. 若在服务过程中由于伴宠师自身原因发生用户的隐私或财产被侵犯等涉及法律相关问题并不是保证金可以解决的;如若发生恶性事件平台会坚决走法律程序判定责任并追责请各位伴宠师严于律己
  38. </view>
  39. </view>
  40. </view>
  41. </template>
  42. <script setup>
  43. import {
  44. ref,
  45. computed
  46. } from 'vue'
  47. import {
  48. cashIn
  49. } from '@/api/amount/index.js'
  50. import {
  51. useStore
  52. } from "vuex"
  53. const money = ref()
  54. const store = useStore();
  55. const userInfo = computed(() => {
  56. return store.getters.userInfo
  57. })
  58. const jumpToDetail = () => {
  59. uni.navigateTo({
  60. url: "/otherPages/myOrdersManage/bond/detail"
  61. })
  62. }
  63. const jumpToRefund = () => {
  64. uni.navigateTo({
  65. url: "/otherPages/myOrdersManage/bond/refund"
  66. })
  67. }
  68. const onPay = async () => {
  69. if (!money.value) {
  70. return uni.showToast({
  71. title: '请填写充值金额',
  72. icon: "none"
  73. })
  74. }
  75. let response = await cashIn({
  76. money: money.value,
  77. type: 1,
  78. userId: userInfo.value.userId
  79. })
  80. }
  81. </script>
  82. <style scoped lang="scss">
  83. .box {
  84. width: 750rpx;
  85. height: 180rpx;
  86. background-image: linear-gradient(to bottom, #FFBF60, #F2F2F2);
  87. padding: 60rpx 24rpx 0 24rpx;
  88. box-sizing: border-box;
  89. }
  90. .top {
  91. width: 702rpx;
  92. height: 227rpx;
  93. background-color: #FFFFFF;
  94. padding: 24rpx 34rpx 0 34rpx;
  95. box-sizing: border-box;
  96. }
  97. .account {
  98. justify-content: space-between;
  99. color: #BDBDBD;
  100. font-size: 22rpx;
  101. }
  102. .text1 {
  103. font-size: 30rpx;
  104. color: #000000;
  105. }
  106. .text4 {
  107. color: #BDBDBD;
  108. font-size: 22rpx;
  109. }
  110. .line {
  111. position: relative;
  112. padding: 0 0 0 20rpx;
  113. &::before {
  114. position: absolute;
  115. top: 7rpx;
  116. left: 10rpx;
  117. content: "";
  118. width: 3rpx;
  119. height: 26rpx;
  120. border-radius: 9rpx;
  121. background-color: #BDBDBD;
  122. }
  123. }
  124. .Recharge {
  125. width: auto;
  126. height: 71rpx;
  127. justify-content: space-between;
  128. margin: 30rpx 0 0 30rpx;
  129. color: #FFFFFF;
  130. font-size: 22rpx;
  131. align-items: center;
  132. }
  133. .money {
  134. width: 450rpx;
  135. height: 71rpx;
  136. /* background-color: #FFBF60; */
  137. color: #FFBF60 !important;
  138. font-size: 54rpx !important;
  139. }
  140. .money input {
  141. margin-left: 5%;
  142. font-size: 61rpx;
  143. height: 71rpx;
  144. }
  145. .text2 {
  146. width: 131rpx;
  147. height: 47rpx;
  148. background-color: #FFBF60;
  149. line-height: 47rpx;
  150. display: flex;
  151. justify-content: center;
  152. }
  153. .center {
  154. width: 100%;
  155. height: 1265rpx;
  156. font-size: 30rpx;
  157. color: #707070;
  158. padding: 44rpx 8rpx 0 34rpx;
  159. box-sizing: border-box;
  160. line-height: 45rpx;
  161. }
  162. .text3 {
  163. color: #000000;
  164. font-weight: 700;
  165. margin-bottom: 30rpx;
  166. }
  167. .level {
  168. display: flex;
  169. }
  170. .text4 {
  171. /* color: ; */
  172. }
  173. </style>