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.

305 lines
6.0 KiB

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