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.

304 lines
6.0 KiB

  1. <template>
  2. <view class="main">
  3. <view class="top">
  4. <view class="bell">
  5. <image class="image-bell" src="/static/my/bell.png"></image>
  6. </view>
  7. <view class="msg">
  8. <view class="msg-left">
  9. <view class="avatar"></view>
  10. </view>
  11. <view class="msg-center">
  12. <view style="display: flex;">
  13. <view class="userInfo">{{ username }}</view>
  14. <image class="image-editName" src="/static/my/editName.png"></image>
  15. </view>
  16. <view class="userId">ID:{{ dccode }}</view>
  17. </view>
  18. <view class="msg-right">
  19. <image class="image-attendance" src="/static/my/Check-in.png"/>
  20. <span style="font-size:10px;">签到</span>
  21. </view>
  22. </view>
  23. <view class="settings-buttons">
  24. <view class="setting-btn" @click="goToMarket">
  25. <image src="/static/my/MarketSettings.png" class="setting-icon"/>
  26. <text>行情设置</text>
  27. </view>
  28. <view class="setting-btn" @click="goToGeneral">
  29. <image src="/static/my/Settings.png" class="setting-icon"/>
  30. <text>通用设置</text>
  31. </view>
  32. </view>
  33. <view class="share" @click="goToShare">
  34. <image class="img-share" src="/static/my/share.png" mode="widthFix"/>
  35. </view>
  36. </view>
  37. <view class="bottom">
  38. <view class="list-item" @click="goToAccount">
  39. <image src="/static/my/security.png" class="list-icon"/>
  40. <text>账号与安全</text>
  41. <uni-icons type="arrowright" size="16" class="arrow"/>
  42. </view>
  43. <view class="list-item">
  44. <image src="/static/my/connection.png" class="list-icon"/>
  45. <text>联系我们</text>
  46. <uni-icons type="arrowright" size="16" class="arrow"/>
  47. </view>
  48. <view class="list-item" @click="goToNewVersion">
  49. <image src="/static/my/update.png" class="list-icon"/>
  50. <text>新版本更新</text>
  51. <view class="update-tip">有新版本可更新
  52. <view class="circle"></view>
  53. </view>
  54. <uni-icons type="arrowright" size="16" class="arrow"/>
  55. </view>
  56. <view class="list-item">
  57. <image src="/static/my/opinion.png" class="list-icon"/>
  58. <text>意见反馈</text>
  59. <uni-icons type="arrowright" size="16" class="arrow"/>
  60. </view>
  61. <view class="list-item" @click="goToAbout">
  62. <image src="/static/my/about.png" class="list-icon"/>
  63. <text>关于DeepChart</text>
  64. <uni-icons type="arrowright" size="16" class="arrow"/>
  65. </view>
  66. </view>
  67. <footerBar class="static-footer" :type="type"></footerBar>
  68. </view>
  69. </template>
  70. <script setup>
  71. import {
  72. ref,
  73. onMounted
  74. } from 'vue'
  75. import {
  76. ArrowRight
  77. } from '@element-plus/icons-vue'
  78. import footerBar from '../../components/footerBar.vue'
  79. import {getUserInfo} from "@/api/member"
  80. const type = ref('member')
  81. const iSMT = ref(0)
  82. const username = ref('')
  83. const dccode = ref('')
  84. const userInfoRes = ref()// 用户身份信息
  85. userInfoRes.value = getUserInfo()
  86. userInfoRes.value.then(res => {
  87. username.value = res.data.username
  88. dccode.value = res.data.dccode
  89. console.log('用户信息', userInfoRes.value)
  90. })
  91. const goToGeneral = () => {
  92. uni.navigateTo({
  93. url: '/pages/setting/general'
  94. })
  95. }
  96. const goToMarket = () => {
  97. uni.navigateTo({
  98. url: '../setting/market'
  99. })
  100. }
  101. const goToAccount = () => {
  102. uni.navigateTo({
  103. url: '../setting/account'
  104. })
  105. }
  106. const goToNewVersion = () => {
  107. uni.navigateTo({
  108. url: '../setting/newVersion'
  109. })
  110. }
  111. const goToAbout = () => {
  112. uni.navigateTo({
  113. url: '../setting/about'
  114. })
  115. }
  116. const goToShare = () => {
  117. uni.navigateTo({
  118. url: '../setting/share'
  119. })
  120. }
  121. onMounted(() => {
  122. // 状态栏高度
  123. iSMT.value = uni.getSystemInfoSync().statusBarHeight
  124. console.log('??????????????', iSMT.value)
  125. })
  126. </script>
  127. <style scoped>
  128. .static-footer {
  129. position: fixed;
  130. bottom: 0;
  131. }
  132. .top {
  133. height: 47vh;
  134. background-color: white;
  135. }
  136. .bell {
  137. height: 9.6vh;
  138. display: flex;
  139. align-items: flex-end;
  140. justify-content: flex-end;
  141. padding-right: 50rpx;
  142. }
  143. .image-bell {
  144. width: 13px;
  145. height: 16px;
  146. }
  147. .msg {
  148. height: 10.7vh;
  149. display: flex;
  150. margin-top: 3vh;
  151. margin-bottom: 3vh;
  152. }
  153. .msg-left {
  154. width: 33.6vw;
  155. display: flex;
  156. justify-content: center;
  157. align-items: center;
  158. }
  159. .avatar {
  160. width: 175rpx;
  161. height: 175rpx;
  162. border-radius: 50%;
  163. background-color: black;
  164. }
  165. .msg-center {
  166. width: 51.7vw;
  167. padding-left: 2.5vh;
  168. display: flex;
  169. flex-direction: column;
  170. justify-content: center;
  171. }
  172. .userInfo {
  173. font-size: 20px;
  174. }
  175. .userId {
  176. font-size: 14px;
  177. margin-top: 1vh;
  178. }
  179. .image-editName {
  180. width: 40rpx;
  181. height: 40rpx;
  182. margin-left: 2vw;
  183. }
  184. .msg-right {
  185. width: 14.7vw;
  186. display: flex;
  187. flex-direction: column;
  188. justify-content: center;
  189. }
  190. .image-attendance {
  191. width: 43rpx;
  192. height: 43rpx;
  193. }
  194. .settings-buttons {
  195. display: flex;
  196. justify-content: space-around;
  197. }
  198. .setting-btn {
  199. width: 349rpx;
  200. height: 135rpx;
  201. display: flex;
  202. align-items: center;
  203. justify-content: center;
  204. background-color: rgb(243, 243, 243);
  205. border-radius: 8%;
  206. }
  207. .setting-icon {
  208. width: 64.7rpx;
  209. height: 64.7rpx;
  210. margin-right: 25rpx;
  211. }
  212. .setting-btn text {
  213. font-size: 28rpx;
  214. font-weight: bold;
  215. color: #333;
  216. }
  217. .share {
  218. height: 12.6vh;
  219. display: flex;
  220. justify-content: center;
  221. align-items: center;
  222. }
  223. .img-share {
  224. width: 720rpx;
  225. height: 160rpx;
  226. }
  227. .bottom {
  228. height: 44.5vh;
  229. margin-top: 1vh;
  230. background-color: rgb(255, 255, 255);
  231. }
  232. .list-item {
  233. width: 670rpx;
  234. height: 7vh;
  235. display: flex;
  236. align-items: center;
  237. margin: 0rpx 40rpx;
  238. border-bottom: 1rpx solid #eee;
  239. }
  240. .list-item:last-child {
  241. border-bottom: none;
  242. }
  243. .list-icon {
  244. width: 42rpx;
  245. height: 42rpx;
  246. margin-right: 18rpx;
  247. }
  248. .arrow {
  249. margin-left: auto;
  250. }
  251. .update-tip {
  252. display: flex;
  253. color: #999;
  254. font-size: 24rpx;
  255. align-items: center;
  256. margin-left: 200rpx;
  257. justify-content: center;
  258. }
  259. .circle {
  260. width: 10rpx;
  261. height: 10rpx;
  262. border-radius: 50%;
  263. background-color: red;
  264. margin-left: 10rpx;
  265. }
  266. </style>