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.

308 lines
6.2 KiB

4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
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. import { useUserStore } from "../../stores/modules/userInfo"
  82. const userStore = useUserStore()
  83. const type = ref('member')
  84. const iSMT = ref(0)
  85. const username = ref('')
  86. const dccode = ref('')
  87. const userInfoRes = ref()// 用户身份信息
  88. userInfoRes.value = getUserInfo()
  89. userInfoRes.value.then(res => {
  90. username.value = res.data.dcname
  91. dccode.value = res.data.dccode
  92. console.log('用户信息', userInfoRes.value)
  93. })
  94. const goToGeneral = () => {
  95. uni.navigateTo({
  96. url: '/pages/setting/general'
  97. })
  98. }
  99. const goToMarket = () => {
  100. uni.navigateTo({
  101. url: '../setting/market'
  102. })
  103. }
  104. const goToAccount = () => {
  105. uni.navigateTo({
  106. url: '../setting/account'
  107. })
  108. }
  109. const goToNewVersion = () => {
  110. uni.navigateTo({
  111. url: '../setting/newVersion'
  112. })
  113. }
  114. const goToAbout = () => {
  115. uni.navigateTo({
  116. url: '../setting/about'
  117. })
  118. }
  119. const goToShare = () => {
  120. uni.navigateTo({
  121. url: '../setting/share'
  122. })
  123. }
  124. onMounted(() => {
  125. // 状态栏高度
  126. iSMT.value = uni.getSystemInfoSync().statusBarHeight
  127. console.log('??????????????', iSMT.value)
  128. console.log('通信来的用户身份',userStore.userInfo)
  129. })
  130. </script>
  131. <style scoped>
  132. .static-footer {
  133. position: fixed;
  134. bottom: 0;
  135. }
  136. .top {
  137. height: 50vh;
  138. background-color: white;
  139. }
  140. .bell {
  141. height: 9.6vh;
  142. display: flex;
  143. align-items: flex-end;
  144. justify-content: flex-end;
  145. padding-right: 50rpx;
  146. }
  147. .image-bell {
  148. width: 26rpx;
  149. height: 32rpx;
  150. }
  151. .msg {
  152. height: 10.7vh;
  153. display: flex;
  154. margin-top: 3vh;
  155. margin-bottom: 3vh;
  156. }
  157. .msg-left {
  158. width: 252rpx;
  159. display: flex;
  160. justify-content: center;
  161. align-items: center;
  162. }
  163. .avatar {
  164. width: 175rpx;
  165. height: 175rpx;
  166. border-radius: 50%;
  167. background-color: black;
  168. }
  169. .msg-center {
  170. width: 388rpx;
  171. padding-left: 2.5vh;
  172. display: flex;
  173. flex-direction: column;
  174. justify-content: center;
  175. }
  176. .userInfo {
  177. font-size: 20px;
  178. }
  179. .userId {
  180. font-size: 14px;
  181. margin-top: 1vh;
  182. }
  183. .image-editName {
  184. width: 40rpx;
  185. height: 40rpx;
  186. margin-left: 15rpx;
  187. }
  188. .msg-right {
  189. display: flex;
  190. flex-direction: column;
  191. justify-content: center;
  192. }
  193. .image-attendance {
  194. width: 43rpx;
  195. height: 43rpx;
  196. }
  197. .settings-buttons {
  198. display: flex;
  199. justify-content: space-around;
  200. }
  201. .setting-btn {
  202. width: 349rpx;
  203. height: 135rpx;
  204. display: flex;
  205. align-items: center;
  206. justify-content: center;
  207. background-color: rgb(243, 243, 243);
  208. border-radius: 8%;
  209. margin-bottom: 1vh;
  210. }
  211. .setting-icon {
  212. width: 64.7rpx;
  213. height: 64.7rpx;
  214. margin-right: 25rpx;
  215. }
  216. .setting-btn text {
  217. font-size: 28rpx;
  218. font-weight: bold;
  219. color: #333;
  220. }
  221. .share {
  222. height: 12.6vh;
  223. display: flex;
  224. justify-content: center;
  225. align-items: center;
  226. }
  227. .img-share {
  228. width: 720rpx;
  229. height: 160rpx;
  230. }
  231. .bottom {
  232. height: 44.5vh;
  233. margin-top: 1vh;
  234. background-color: rgb(255, 255, 255);
  235. }
  236. .list-item {
  237. width: 670rpx;
  238. height: 7vh;
  239. display: flex;
  240. align-items: center;
  241. margin: 0rpx 40rpx;
  242. border-bottom: 1rpx solid #eee;
  243. }
  244. .list-item:last-child {
  245. border-bottom: none;
  246. }
  247. .list-icon {
  248. width: 42rpx;
  249. height: 42rpx;
  250. margin-right: 18rpx;
  251. }
  252. .arrow {
  253. margin-left: auto;
  254. }
  255. .update-tip {
  256. display: flex;
  257. color: #999;
  258. font-size: 24rpx;
  259. align-items: center;
  260. margin-left: 200rpx;
  261. justify-content: center;
  262. }
  263. .circle {
  264. width: 10rpx;
  265. height: 10rpx;
  266. border-radius: 50%;
  267. background-color: red;
  268. margin-left: 10rpx;
  269. }
  270. </style>