my.uvue 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  1. <template>
  2. <cl-page>
  3. <cl-topbar fixed :show-back="false" safe-area-top background-color="transparent">
  4. <view class="flex flex-row items-center w-full flex-1 px-3">
  5. <view class="top-icon dark:!bg-surface-700" @tap="toSet">
  6. <cl-icon name="settings-line"></cl-icon>
  7. </view>
  8. <view class="top-icon dark:!bg-surface-700" @tap="toTest">
  9. <cl-icon name="notification-4-line"></cl-icon>
  10. </view>
  11. </view>
  12. </cl-topbar>
  13. <view class="p-3">
  14. <view class="flex flex-col justify-center items-center pt-6 pb-3">
  15. <view class="relative overflow-visible" @tap="toEdit">
  16. <cl-avatar
  17. :src="user.info.avatarUrl"
  18. :size="150"
  19. :pt="{ className: '!rounded-3xl', icon: { size: 60 } }"
  20. >
  21. </cl-avatar>
  22. <view
  23. class="flex flex-col justify-center items-center absolute bottom-0 right-[-6rpx] bg-black rounded-full p-1"
  24. v-if="!user.isNull()"
  25. >
  26. <cl-icon name="edit-line" color="white" :size="24"></cl-icon>
  27. </view>
  28. </view>
  29. <view class="flex-1 flex flex-col justify-center items-center" @tap="toEdit">
  30. <cl-text :pt="{ className: '!text-xl mt-5 mb-1 font-bold' }">{{
  31. user.info.nickName ?? t("未登录")
  32. }}</cl-text>
  33. <cl-text color="info" v-if="!user.isNull()">{{ user.info.phone }}</cl-text>
  34. </view>
  35. </view>
  36. <cl-row
  37. :pt="{
  38. className: 'pt-3 pb-6'
  39. }"
  40. >
  41. <cl-col :span="6">
  42. <view class="flex flex-col items-center justify-center">
  43. <cl-rolling-number
  44. :pt="{ className: '!text-xl' }"
  45. :value="171"
  46. ></cl-rolling-number>
  47. <cl-text :pt="{ className: 'mt-1 !text-xs' }" color="info">{{
  48. t("总点击")
  49. }}</cl-text>
  50. </view>
  51. </cl-col>
  52. <cl-col :span="6">
  53. <view class="flex flex-col items-center justify-center">
  54. <cl-rolling-number
  55. :pt="{ className: '!text-xl' }"
  56. :value="24"
  57. ></cl-rolling-number>
  58. <cl-text :pt="{ className: 'mt-1 !text-xs' }" color="info">{{
  59. t("赞")
  60. }}</cl-text>
  61. </view>
  62. </cl-col>
  63. <cl-col :span="6">
  64. <view class="flex flex-col items-center justify-center">
  65. <cl-rolling-number
  66. :pt="{ className: '!text-xl' }"
  67. :value="89"
  68. ></cl-rolling-number>
  69. <cl-text :pt="{ className: 'mt-1 !text-xs' }" color="info">{{
  70. t("收藏")
  71. }}</cl-text>
  72. </view>
  73. </cl-col>
  74. <cl-col :span="6">
  75. <view class="flex flex-col items-center justify-center">
  76. <cl-rolling-number
  77. :pt="{ className: '!text-xl' }"
  78. :value="653"
  79. ></cl-rolling-number>
  80. <cl-text :pt="{ className: 'mt-1 !text-xs' }" color="info">{{
  81. t("粉丝")
  82. }}</cl-text>
  83. </view>
  84. </cl-col>
  85. </cl-row>
  86. <cl-row :gutter="20" :pt="{ className: 'mb-3' }">
  87. <cl-col :span="12">
  88. <view class="bg-white dark:!bg-surface-800 p-4 rounded-2xl flex flex-row">
  89. <view class="flex flex-col mr-auto">
  90. <cl-text
  91. ellipsis
  92. :pt="{
  93. className: '!w-[180rpx]'
  94. }"
  95. >{{ t("接单模式") }}</cl-text
  96. >
  97. <cl-text :pt="{ className: '!text-xs mt-1' }" color="info">{{
  98. t("已关闭")
  99. }}</cl-text>
  100. </view>
  101. <cl-switch></cl-switch>
  102. </view>
  103. </cl-col>
  104. <cl-col :span="12">
  105. <view class="bg-white dark:!bg-surface-800 p-4 rounded-2xl flex flex-row">
  106. <view class="flex flex-col mr-auto">
  107. <cl-text
  108. ellipsis
  109. :pt="{
  110. className: '!w-[180rpx]'
  111. }"
  112. >{{ t("消息通知") }}</cl-text
  113. >
  114. <cl-text :pt="{ className: '!text-xs mt-1' }" color="info">{{
  115. t("已关闭")
  116. }}</cl-text>
  117. </view>
  118. <cl-switch></cl-switch>
  119. </view>
  120. </cl-col>
  121. </cl-row>
  122. <view class="bg-white dark:!bg-surface-800 py-5 rounded-2xl mb-3 h-[160rpx]">
  123. <cl-row :pt="{ className: 'overflow-visible' }">
  124. <cl-col :span="6">
  125. <view class="flex flex-col justify-center items-center px-2">
  126. <cl-icon name="money-cny-circle-line" :size="46"></cl-icon>
  127. <cl-text
  128. :pt="{ className: '!text-xs mt-2 text-center' }"
  129. color="info"
  130. >{{ t("待支付") }}</cl-text
  131. >
  132. </view>
  133. </cl-col>
  134. <cl-col :span="6">
  135. <view class="flex flex-col justify-center items-center px-2">
  136. <cl-icon name="box-1-line" :size="46"></cl-icon>
  137. <cl-text
  138. :pt="{ className: '!text-xs mt-2 text-center' }"
  139. color="info"
  140. >{{ t("未发货") }}</cl-text
  141. >
  142. </view>
  143. </cl-col>
  144. <cl-col :span="6">
  145. <view
  146. class="flex flex-col justify-center items-center relative overflow-visible px-2"
  147. >
  148. <cl-icon name="flight-takeoff-line" :size="46"></cl-icon>
  149. <cl-text
  150. :pt="{ className: '!text-xs mt-2 text-center' }"
  151. color="info"
  152. >{{ t("已发货") }}</cl-text
  153. >
  154. <cl-badge
  155. type="primary"
  156. :value="3"
  157. position
  158. :pt="{ className: '!right-6' }"
  159. ></cl-badge>
  160. </view>
  161. </cl-col>
  162. <cl-col :span="6">
  163. <view class="flex flex-col justify-center items-center px-2">
  164. <cl-icon name="exchange-cny-line" :size="46"></cl-icon>
  165. <cl-text
  166. :pt="{ className: '!text-xs mt-2 text-center' }"
  167. color="info"
  168. >{{ t("售后 / 退款") }}</cl-text
  169. >
  170. </view>
  171. </cl-col>
  172. </cl-row>
  173. </view>
  174. <cl-list :pt="{ className: 'mb-3' }">
  175. <cl-list-item
  176. :label="t('我的钱包')"
  177. icon="wallet-line"
  178. arrow
  179. hoverable
  180. @tap="toTest"
  181. >
  182. </cl-list-item>
  183. <cl-list-item
  184. :label="t('数据看板')"
  185. icon="pie-chart-line"
  186. arrow
  187. hoverable
  188. @tap="toTest"
  189. >
  190. </cl-list-item>
  191. <cl-list-item
  192. :label="t('历史记录')"
  193. icon="history-line"
  194. arrow
  195. hoverable
  196. @tap="toTest"
  197. >
  198. </cl-list-item>
  199. <cl-list-item
  200. :label="t('邀请好友')"
  201. icon="share-line"
  202. arrow
  203. hoverable
  204. @tap="toTest"
  205. >
  206. </cl-list-item>
  207. </cl-list>
  208. <cl-list>
  209. <cl-list-item :label="t('设置')" icon="settings-line" arrow hoverable @tap="toSet">
  210. </cl-list-item>
  211. </cl-list>
  212. </view>
  213. <tabbar></tabbar>
  214. </cl-page>
  215. </template>
  216. <script setup lang="ts">
  217. import { isDark, isMp, parseClass, router, useStore } from "@/cool";
  218. import { t } from "@/locale";
  219. import { useUi } from "@/uni_modules/cool-ui";
  220. import Tabbar from "@/components/tabbar.uvue";
  221. const { user } = useStore();
  222. const ui = useUi();
  223. function toTest() {
  224. ui.showToast({
  225. message: t("开发中,敬请期待")
  226. });
  227. }
  228. function toSet() {
  229. router.to("/pages/set/index");
  230. }
  231. function toEdit() {
  232. router.to("/pages/user/edit");
  233. }
  234. onReady(() => {
  235. user.get();
  236. });
  237. </script>
  238. <style lang="scss" scoped>
  239. .top-icon {
  240. @apply flex items-center justify-center rounded-lg bg-white mr-3;
  241. height: 50rpx;
  242. width: 50rpx;
  243. }
  244. </style>