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

208 lines
3.6 KiB

3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
2 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="digit" />
  22. </view>
  23. <!-- <view class="text2" @click="onPay">
  24. 去充值
  25. </view> -->
  26. <view class="text2" style="background-color: #999;color: #fff">
  27. 暂未开放
  28. </view>
  29. </view>
  30. </view>
  31. <view class="center size-28">
  32. <view class="text3">
  33. 保证金说明
  34. </view>
  35. <view >
  36. <up-parse class="size-28" :content="configList.pet_money_text.paramValueArea"></up-parse>
  37. </view>
  38. </view>
  39. </view>
  40. </template>
  41. <script setup>
  42. import {
  43. ref,
  44. computed
  45. } from 'vue'
  46. import {
  47. cashIn,
  48. teacherPayPrice,
  49. } from '@/api/amount/index.js'
  50. import {
  51. useStore
  52. } from "vuex"
  53. import { onShow } from '@dcloudio/uni-app'
  54. const money = ref()
  55. const store = useStore();
  56. const configList = computed(() => {
  57. return store.getters.configList
  58. })
  59. const userInfo = computed(() => {
  60. return store.getters.userInfo
  61. })
  62. const jumpToDetail = () => {
  63. uni.navigateTo({
  64. url: "/otherPages/myOrdersManage/bond/detail"
  65. })
  66. }
  67. const jumpToRefund = () => {
  68. uni.navigateTo({
  69. url: "/otherPages/myOrdersManage/bond/refund"
  70. })
  71. }
  72. const onPay = async () => {
  73. if (!money.value) {
  74. return uni.showToast({
  75. title: '请填写充值金额',
  76. icon: "none"
  77. })
  78. }
  79. let response = await teacherPayPrice({
  80. money: money.value,
  81. memberId: userInfo.value.userId
  82. })
  83. if (response.code == 200) {
  84. uni.showToast({
  85. title: response.msg,
  86. icon: "none"
  87. })
  88. }
  89. }
  90. onShow(() => {
  91. // money.value = Number(configList.value.pet_money.pet_money)
  92. })
  93. </script>
  94. <style scoped lang="scss">
  95. .box {
  96. width: 750rpx;
  97. height: 180rpx;
  98. background-image: linear-gradient(to bottom, #FFBF60, #F2F2F2);
  99. padding: 60rpx 24rpx 0 24rpx;
  100. box-sizing: border-box;
  101. }
  102. .top {
  103. width: 702rpx;
  104. height: 227rpx;
  105. background-color: #FFFFFF;
  106. padding: 24rpx 34rpx 0 34rpx;
  107. box-sizing: border-box;
  108. }
  109. .account {
  110. justify-content: space-between;
  111. color: #BDBDBD;
  112. font-size: 22rpx;
  113. }
  114. .text1 {
  115. font-size: 30rpx;
  116. color: #000000;
  117. }
  118. .text4 {
  119. color: #BDBDBD;
  120. font-size: 22rpx;
  121. }
  122. .line {
  123. position: relative;
  124. padding: 0 0 0 20rpx;
  125. &::before {
  126. position: absolute;
  127. top: 7rpx;
  128. left: 10rpx;
  129. content: "";
  130. width: 3rpx;
  131. height: 26rpx;
  132. border-radius: 9rpx;
  133. background-color: #BDBDBD;
  134. }
  135. }
  136. .Recharge {
  137. width: auto;
  138. height: 71rpx;
  139. justify-content: space-between;
  140. margin: 30rpx 0 0 30rpx;
  141. color: #FFFFFF;
  142. font-size: 22rpx;
  143. align-items: center;
  144. }
  145. .money {
  146. width: 450rpx;
  147. height: 71rpx;
  148. /* background-color: #FFBF60; */
  149. color: #FFBF60 !important;
  150. font-size: 54rpx !important;
  151. }
  152. .money input {
  153. margin-left: 5%;
  154. font-size: 61rpx;
  155. height: 71rpx;
  156. }
  157. .text2 {
  158. width: 131rpx;
  159. height: 47rpx;
  160. background-color: #FFBF60;
  161. line-height: 47rpx;
  162. display: flex;
  163. border-radius: 24rpx;
  164. justify-content: center;
  165. }
  166. .center {
  167. width: 100%;
  168. height: 1265rpx;
  169. font-size: 30rpx;
  170. color: #707070;
  171. padding: 44rpx 8rpx 0 34rpx;
  172. box-sizing: border-box;
  173. line-height: 45rpx;
  174. }
  175. .text3 {
  176. color: #000000;
  177. font-weight: 700;
  178. margin-bottom: 30rpx;
  179. }
  180. .level {
  181. display: flex;
  182. }
  183. .text4 {
  184. /* color: ; */
  185. }
  186. </style>