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.

316 lines
6.4 KiB

3 weeks ago
3 weeks ago
3 weeks ago
4 weeks ago
3 weeks ago
3 weeks ago
3 weeks ago
3 weeks ago
3 weeks ago
3 weeks ago
3 weeks ago
  1. <template>
  2. <LoginPrompt ref="loginwPrompt"></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. console.log('用户信息==========',userInfoRes.value.data)
  121. if (!userInfoRes.value.data) {
  122. uni.showToast({
  123. title: '请先登录',
  124. icon: 'none'
  125. })
  126. return
  127. }
  128. uni.navigateTo({
  129. url: '../setting/share'
  130. })
  131. }
  132. onMounted(() => {
  133. // 状态栏高度
  134. iSMT.value = uni.getSystemInfoSync().statusBarHeight
  135. console.log('??????????????', iSMT.value)
  136. console.log('通信来的用户身份',userStore.userInfo)
  137. })
  138. </script>
  139. <style scoped>
  140. .static-footer {
  141. position: fixed;
  142. bottom: 0;
  143. }
  144. .top {
  145. height: 50vh;
  146. background-color: white;
  147. }
  148. .bell {
  149. height: 9.6vh;
  150. display: flex;
  151. align-items: flex-end;
  152. justify-content: flex-end;
  153. padding-right: 50rpx;
  154. }
  155. .image-bell {
  156. width: 26rpx;
  157. height: 32rpx;
  158. }
  159. .msg {
  160. height: 10.7vh;
  161. display: flex;
  162. margin-top: 3vh;
  163. margin-bottom: 3vh;
  164. }
  165. .msg-left {
  166. width: 252rpx;
  167. display: flex;
  168. justify-content: center;
  169. align-items: center;
  170. }
  171. .avatar {
  172. width: 175rpx;
  173. height: 175rpx;
  174. border-radius: 50%;
  175. background-color: black;
  176. }
  177. .msg-center {
  178. width: 388rpx;
  179. padding-left: 2.5vh;
  180. display: flex;
  181. flex-direction: column;
  182. justify-content: center;
  183. }
  184. .userInfo {
  185. font-size: 20px;
  186. }
  187. .userId {
  188. font-size: 14px;
  189. margin-top: 1vh;
  190. }
  191. .image-editName {
  192. width: 40rpx;
  193. height: 40rpx;
  194. margin-left: 15rpx;
  195. }
  196. .msg-right {
  197. display: flex;
  198. flex-direction: column;
  199. justify-content: center;
  200. }
  201. .image-attendance {
  202. width: 43rpx;
  203. height: 43rpx;
  204. }
  205. .settings-buttons {
  206. display: flex;
  207. justify-content: space-around;
  208. }
  209. .setting-btn {
  210. width: 349rpx;
  211. height: 135rpx;
  212. display: flex;
  213. align-items: center;
  214. justify-content: center;
  215. background-color: rgb(243, 243, 243);
  216. border-radius: 8%;
  217. margin-bottom: 1vh;
  218. }
  219. .setting-icon {
  220. width: 64.7rpx;
  221. height: 64.7rpx;
  222. margin-right: 25rpx;
  223. }
  224. .setting-btn text {
  225. font-size: 28rpx;
  226. font-weight: bold;
  227. color: #333;
  228. }
  229. .share {
  230. height: 12.6vh;
  231. display: flex;
  232. justify-content: center;
  233. align-items: center;
  234. }
  235. .img-share {
  236. width: 720rpx;
  237. height: 160rpx;
  238. }
  239. .bottom {
  240. height: 44.5vh;
  241. margin-top: 1vh;
  242. background-color: rgb(255, 255, 255);
  243. }
  244. .list-item {
  245. width: 670rpx;
  246. height: 7vh;
  247. display: flex;
  248. align-items: center;
  249. margin: 0rpx 40rpx;
  250. border-bottom: 1rpx solid #eee;
  251. }
  252. .list-item:last-child {
  253. border-bottom: none;
  254. }
  255. .list-icon {
  256. width: 42rpx;
  257. height: 42rpx;
  258. margin-right: 18rpx;
  259. }
  260. .arrow {
  261. margin-left: auto;
  262. }
  263. .update-tip {
  264. display: flex;
  265. color: #999;
  266. font-size: 24rpx;
  267. align-items: center;
  268. margin-left: 200rpx;
  269. justify-content: center;
  270. }
  271. .circle {
  272. width: 10rpx;
  273. height: 10rpx;
  274. border-radius: 50%;
  275. background-color: red;
  276. margin-left: 10rpx;
  277. }
  278. </style>