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

127 lines
4.3 KiB

11 months ago
10 months ago
11 months ago
11 months ago
11 months ago
10 months ago
11 months ago
  1. <template>
  2. <view>
  3. <view class="user-header">
  4. <view class="flex flex-between login">
  5. <view class="flex">
  6. <up-image class="mr20" width="120rpx" height="120rpx"
  7. src="https://cdn.uviewui.com/uview/album/1.jpg" shape="circle"></up-image>
  8. <view>{{!getIsLogin()?userInfo.name:"欢迎来到版宠师"}}</view>
  9. </view>
  10. <view style="width: 140rpx" v-if="!getIsLogin()">
  11. <up-button @click="handleLogin" :customStyle="{borderColor:'#fff'}" type="primary" text="请登录"
  12. shape="circle" color="#FFBF60"></up-button>
  13. </view>
  14. </view>
  15. <view class="header-money">
  16. <view class="header-money-list">
  17. <view class="header-money-item flex flex-evenly">
  18. <view style="text-align: center">
  19. <view class="mb20 flex">
  20. <up-image :show-loading="true" src="https://cdn.catmdogd.com/Work/image/work/icon4.png"
  21. width="68rpx" height="68rpx"></up-image>
  22. 服务酬劳
  23. </view>
  24. <view class="mb20">--</view>
  25. <view class="flex flex-between but">
  26. <view>提现</view>
  27. <view>|</view>
  28. <view>明细</view>
  29. </view>
  30. </view>
  31. <view style="text-align: center">
  32. <view class="mb20 flex">
  33. <up-image :show-loading="true" src="https://cdn.catmdogd.com/Work/image/work/icon4.png"
  34. width="68rpx" height="68rpx"></up-image>
  35. 保证金
  36. </view>
  37. <view class="mb20">--</view>
  38. <view class="but">保证金中心</view>
  39. </view>
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. <view class="user-container">
  45. <view class="bgf pd4 radius20 mb28">
  46. <view class=" mb28 flex flex-between">
  47. <view class="font36">我的宠物</view>
  48. <view style="color: #707070">更多 ></view>
  49. </view>
  50. <view>
  51. <up-button v-if="!getIsLogin()" @click="handleLogin" class="mb20" size="large"
  52. style="width: 600rpx;height: 135rpx;" type="primary" text="登录后管理宠物" shape=""
  53. color="#FFF4E5"></up-button>
  54. <up-button v-if="getIsLogin()" class="mb20" size="large" style="width: 500rpx" type="primary"
  55. text="请添加您的爱宠" shape="circle"
  56. color="linear-gradient(to right, rgb(255 ,191 ,96 ,1), rgb(255, 51, 186))"></up-button>
  57. <view v-if="isLogin" class="cw-box radius20 pd20 flex">
  58. <up-image class="mr20" width="140rpx" style="flex-shrink: 0" height="140rpx"
  59. src="https://cdn.uviewui.com/uview/album/1.jpg" shape="circle"></up-image>
  60. <view style="width: 418rpx">
  61. <view class="font32 mb20">阿拉斯加</view>
  62. <view class="font24 ellipsis">澳大利亚雾猫澳洲斑点雾猫| 1 个月</view>
  63. </view>
  64. </view>
  65. </view>
  66. </view>
  67. <view class="bgf pd40 radius20">
  68. <view class="font36 mb28">服务中心</view>
  69. <view class="flex flex-between font28 flex-wrap">
  70. <view class="icon-list" @click="toNext">
  71. <up-image class="mb20" src="https://cdn.catmdogd.com/Work/image/work/icon1.png" width="68rpx"
  72. height="68rpx"></up-image>
  73. <view>我的评价</view>
  74. </view>
  75. <view class="icon-list">
  76. <up-image class="mb20" :show-loading="true"
  77. src="https://cdn.catmdogd.com/Work/image/work/icon2.png" width="68rpx"
  78. height="68rpx"></up-image>
  79. <view>平台协议</view>
  80. </view>
  81. <view class="icon-list">
  82. <up-image class="mb20" :show-loading="true"
  83. src="https://cdn.catmdogd.com/Work/image/work/icon3.png" width="68rpx"
  84. height="68rpx"></up-image>
  85. <view>联系客服</view>
  86. </view>
  87. <view class="icon-list">
  88. <up-image class="mb20" :show-loading="true"
  89. src="https://t9.baidu.com/it/u=2834693008,3232051400&fm=193" width="68rpx"
  90. height="68rpx"></up-image>
  91. <view>分享好友</view>
  92. </view>
  93. </view>
  94. </view>
  95. </view>
  96. </view>
  97. </template>
  98. <script setup>
  99. import {
  100. ref
  101. } from "vue"
  102. import {
  103. getIsLogin,
  104. getStorage,
  105. getToken
  106. } from "../../utils/auth";
  107. import tab from "../../plugins/tab";
  108. const isLogin = ref(false)
  109. const userInfo = ref({})
  110. if (getIsLogin() && getToken()) {
  111. userInfo.value = getStorage("userInfo")
  112. isLogin.value = true
  113. }
  114. const handleLogin = () => {
  115. tab.navigateTo('/pages/login/index')
  116. }
  117. const toNext = () => {
  118. uni.navigateTo({
  119. url: "/otherPages/orderTakingManage/evaluate/index"
  120. })
  121. }
  122. </script>
  123. <style scoped lang="scss">
  124. @import "index";
  125. </style>