index.vue 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. <template>
  2. <page-meta :page-font-size="fontValue+'px'" :root-font-size="fontValue+'px'"></page-meta>
  3. <view class="userV" >
  4. <view class="contentIncolumnC bg-img-mine bottomLine">
  5. <view v-if="user" class="contentIncolumnC">
  6. <image class="logoImg" :src="user.avatar" mode="scaleToFill"></image>
  7. <view class="text-xl text-center text-black" >
  8. {{ user.name }}
  9. </view>
  10. </view>
  11. </view>
  12. <view class="contentIncolumnC" style="margin-top:20rpx">
  13. <view class="contentInRowS itemView" @tap="userinfo">
  14. <view class="contentInRowL">
  15. <image style="width:40rpx;height:40rpx;" src="/static/mine/gerenxx.png" mode="scaleToFill"></image>
  16. <text class="titleText">个人信息</text>
  17. </view>
  18. <image style="width:40rpx;height:40rpx;" src="/static/mine/youjt.png" mode="scaleToFill"></image>
  19. </view>
  20. <view class="contentInRowS itemView" @tap="fontSizeSetting">
  21. <view class="contentInRowL">
  22. <image style="width:40rpx;height:40rpx;" src="/static/mine/gerenxx.png" mode="scaleToFill"></image>
  23. <text class="titleText">字体大小</text>
  24. </view>
  25. <image style="width:40rpx;height:40rpx;" src="/static/mine/youjt.png" mode="scaleToFill"></image>
  26. </view>
  27. <view class="contentInRowS itemView" @tap="handlePassword">
  28. <view class="contentInRowL">
  29. <image style="width:40rpx;height:40rpx;" src="/static/mine/xiugaimm.png" mode="scaleToFill"></image>
  30. <text class="titleText">修改密码</text>
  31. </view>
  32. <image style="width:40rpx;height:40rpx;" src="/static/mine/youjt.png" mode="scaleToFill"></image>
  33. </view>
  34. <view class="contentInRowS itemView" style="margin-top: 0rpx;" @tap="zhaohuiPassword">
  35. <view class="contentInRowL">
  36. <image style="width:40rpx;height:40rpx;" src="/static/mine/gerenxx.png" mode="scaleToFill"></image>
  37. <text class="titleText">重置密码</text>
  38. </view>
  39. <image style="width:40rpx;height:40rpx;" src="/static/mine/youjt.png" mode="scaleToFill"></image>
  40. </view>
  41. <view class="contentInRowS itemView" style="margin-top: 0rpx;" @tap="handlesavePassword">
  42. <view class="contentInRowL">
  43. <image style="width:40rpx;height:40rpx;" src="/static/mine/anquanmm.png" mode="scaleToFill"></image>
  44. <text class="titleText">安全密码</text>
  45. </view>
  46. <image style="width:40rpx;height:40rpx;" src="/static/mine/youjt.png" mode="scaleToFill"></image>
  47. </view>
  48. <view class="contentInRowS itemView" @tap="handleCollect">
  49. <view class="contentInRowL">
  50. <image style="width:40rpx;height:40rpx;" src="/static/mine/shoucjia.png" mode="scaleToFill"></image>
  51. <text class="titleText">收藏夹</text>
  52. </view>
  53. <image style="width:40rpx;height:40rpx;" src="/static/mine/youjt.png" mode="scaleToFill"></image>
  54. </view>
  55. <view class="contentInRowS itemView" @tap="setting">
  56. <view class="contentInRowL">
  57. <image style="width:40rpx;height:40rpx;" src="/static/mine/shezhi.png" mode="scaleToFill"></image>
  58. <text class="titleText">聊天设置</text>
  59. </view>
  60. <image style="width:40rpx;height:40rpx;" src="/static/mine/youjt.png" mode="scaleToFill"></image>
  61. </view>
  62. <view class="contentInRowS itemView" @tap="yinsizhengc">
  63. <view class="contentInRowL">
  64. <image style="width:40rpx;height:40rpx;" src="/static/mine/gerenxx.png" mode="scaleToFill"></image>
  65. <text class="titleText">隐私政策</text>
  66. </view>
  67. <image style="width:40rpx;height:40rpx;" src="/static/mine/youjt.png" mode="scaleToFill"></image>
  68. </view>
  69. <view class="contentInRowS itemView" @tap="zhuxiaozhanghao">
  70. <view class="contentInRowL">
  71. <image style="width:40rpx;height:40rpx;" src="/static/mine/gerenxx.png" mode="scaleToFill"></image>
  72. <text class="titleText">注销账号</text>
  73. </view>
  74. <image style="width:40rpx;height:40rpx;" src="/static/mine/youjt.png" mode="scaleToFill"></image>
  75. </view>
  76. <view class="contentIncolumnC itemView" style="margin-top: 40rpx;" @tap="logout">
  77. <text class="titleText">退出登录</text>
  78. </view>
  79. </view>
  80. <view class="text-sm text-center text-grey" style="margin-top: 10rpx;">
  81. {{version}}
  82. </view>
  83. <view class="text-center text-black" style="margin-top: 10rpx;font-size: 10px;">
  84. Copyright © 2024 Amazeway TECH Inc. 保留所有权利。
  85. </view>
  86. <view style="height: 150upx;"></view>
  87. </view>
  88. </template>
  89. <script setup lang="ts">
  90. import {getCurrentInstance, ref} from "vue";
  91. import Auth from "@/api/Auth";
  92. import UserApi from "@/api/UserApi";
  93. import type User from "@/mode/User";
  94. import {onShow} from '@dcloudio/uni-app'
  95. const fontValue=ref(Auth.getfontSize());
  96. const user = ref<User>();
  97. const version = ref('');
  98. const {proxy} = getCurrentInstance();
  99. UserApi.currentUser()
  100. .then((res) => {
  101. user.value = res.data;
  102. getVersion();
  103. })
  104. onShow(() =>{
  105. fontValue.value=Auth.getfontSize();
  106. })
  107. const handlePassword = () => {
  108. uni.navigateTo({
  109. url: '/pages/mine/password'
  110. })
  111. }
  112. const zhaohuiPassword = () => {
  113. uni.navigateTo({
  114. url: '/pages/mine/zhpassword'
  115. })
  116. }
  117. const handlesavePassword = () => {
  118. uni.navigateTo({
  119. url: '/pages/mine/savepassword'
  120. })
  121. }
  122. const handleCollect = () => {
  123. uni.navigateTo({
  124. url: '/pages/collect/index'
  125. })
  126. }
  127. const systemInfo = () => {
  128. uni.navigateTo({
  129. url: '/pages/mine/system'
  130. })
  131. }
  132. if (!user) {
  133. uni.reLaunch({
  134. url: '/pages/login/login'
  135. })
  136. }
  137. const userinfo = () => {
  138. uni.navigateTo({
  139. url: '/pages/mine/info'
  140. })
  141. }
  142. const fontSizeSetting = () => {
  143. console.log('fontSizeSetting')
  144. uni.navigateTo({
  145. url: '/pages/mine/fontSizeSetting'
  146. })
  147. }
  148. const setting = () => {
  149. uni.navigateTo({
  150. url: '/pages/mine/setting'
  151. })
  152. }
  153. const yinsizhengc = () =>{
  154. uni.navigateTo({
  155. url: '/pages/mine/yinsizhngce'
  156. })
  157. }
  158. const zhuxiaozhanghao = () =>{
  159. uni.navigateTo({
  160. url: '/pages/mine/zhuxiaozhanghao'
  161. })
  162. }
  163. const logout = () => {
  164. uni.showModal({
  165. title: '提示',
  166. content: '是否退出登录?',
  167. cancelText: '取消',
  168. confirmText: '确定',
  169. success: res => {
  170. if (res.confirm) {
  171. Auth.logout();
  172. }
  173. }
  174. });
  175. }
  176. const getVersion=()=>{
  177. var info = uni.getSystemInfoSync();
  178. version.value='Version:'+info.appVersion+' VersionCode:'+info.appVersionCode;
  179. console.log(info);
  180. }
  181. </script>
  182. <style scoped>
  183. @import url('@/static/css/main.css');
  184. .logoImg{
  185. width: 170upx;
  186. height: 170upx;
  187. margin-top: 50upx;
  188. border-radius: 85upx;
  189. margin-bottom:16rpx;
  190. }
  191. .gif-wave {
  192. position: absolute;
  193. width: 100%;
  194. bottom: 0;
  195. left: 0;
  196. z-index: 99;
  197. mix-blend-mode: screen;
  198. height: 100upx;
  199. }
  200. .bg-img-mine {
  201. height: 400upx;
  202. }
  203. .menu-margin {
  204. margin-bottom: 51px;
  205. }
  206. .userV{
  207. width: 100%;
  208. height:100%;
  209. background-image: url("/static/wodeBG.png");
  210. /* background-image: url("/static/images/wodetop.jpg"); */
  211. background-size: cover;
  212. background-position: center bottom;
  213. }
  214. .itemView{
  215. padding: 16rpx;
  216. margin-top:20rpx;
  217. width:90%;
  218. height: 100rpx;
  219. border-radius: 8rpx;
  220. border: 1rpx solid lightgray;
  221. }
  222. .titleText{
  223. font-weight:600;
  224. font-size: 32upx;
  225. color:black;
  226. margin-left: 10rpx;
  227. }
  228. </style>