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

200 lines
3.8 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. if (response.code == 200) {
  81. uni.showToast({
  82. title: response.msg,
  83. icon: "none"
  84. })
  85. }
  86. }
  87. </script>
  88. <style scoped lang="scss">
  89. .box {
  90. width: 750rpx;
  91. height: 180rpx;
  92. background-image: linear-gradient(to bottom, #FFBF60, #F2F2F2);
  93. padding: 60rpx 24rpx 0 24rpx;
  94. box-sizing: border-box;
  95. }
  96. .top {
  97. width: 702rpx;
  98. height: 227rpx;
  99. background-color: #FFFFFF;
  100. padding: 24rpx 34rpx 0 34rpx;
  101. box-sizing: border-box;
  102. }
  103. .account {
  104. justify-content: space-between;
  105. color: #BDBDBD;
  106. font-size: 22rpx;
  107. }
  108. .text1 {
  109. font-size: 30rpx;
  110. color: #000000;
  111. }
  112. .text4 {
  113. color: #BDBDBD;
  114. font-size: 22rpx;
  115. }
  116. .line {
  117. position: relative;
  118. padding: 0 0 0 20rpx;
  119. &::before {
  120. position: absolute;
  121. top: 7rpx;
  122. left: 10rpx;
  123. content: "";
  124. width: 3rpx;
  125. height: 26rpx;
  126. border-radius: 9rpx;
  127. background-color: #BDBDBD;
  128. }
  129. }
  130. .Recharge {
  131. width: auto;
  132. height: 71rpx;
  133. justify-content: space-between;
  134. margin: 30rpx 0 0 30rpx;
  135. color: #FFFFFF;
  136. font-size: 22rpx;
  137. align-items: center;
  138. }
  139. .money {
  140. width: 450rpx;
  141. height: 71rpx;
  142. /* background-color: #FFBF60; */
  143. color: #FFBF60 !important;
  144. font-size: 54rpx !important;
  145. }
  146. .money input {
  147. margin-left: 5%;
  148. font-size: 61rpx;
  149. height: 71rpx;
  150. }
  151. .text2 {
  152. width: 131rpx;
  153. height: 47rpx;
  154. background-color: #FFBF60;
  155. line-height: 47rpx;
  156. display: flex;
  157. justify-content: center;
  158. }
  159. .center {
  160. width: 100%;
  161. height: 1265rpx;
  162. font-size: 30rpx;
  163. color: #707070;
  164. padding: 44rpx 8rpx 0 34rpx;
  165. box-sizing: border-box;
  166. line-height: 45rpx;
  167. }
  168. .text3 {
  169. color: #000000;
  170. font-weight: 700;
  171. margin-bottom: 30rpx;
  172. }
  173. .level {
  174. display: flex;
  175. }
  176. .text4 {
  177. /* color: ; */
  178. }
  179. </style>