index.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. <template>
  2. <view>
  3. <view class="user-info">
  4. <view class="left justify-start align-center" @click="openPersonInfo()">
  5. <!-- <view class="head-img">
  6. <image :src="user.avatar==null?'/static/images/detault_head.jpg':user.avatar" mode="aspectFill"></image>
  7. </view> -->
  8. <u-avatar :src="avatar" ></u-avatar>
  9. <view class="name-phone ml20">
  10. <view class="name">{{user.nickname?user.nickname:"游客01"}}</view>
  11. <!-- <view class="phone" v-if="user.phone!=''">{{utils.parsePhone(user.phone)}}</view> -->
  12. </view>
  13. </view>
  14. <view class="right">
  15. </view>
  16. </view>
  17. <view class="p20">
  18. <view class="used-tools">
  19. <view class="title">常用工具</view>
  20. <view class="tools-list">
  21. <!-- <view class="item no-marin-bottom" @click="openH5('/web/userAgreement')">
  22. <u-icon name="order" size="28"></u-icon>
  23. <text class="text">用户协议</text>
  24. </view>
  25. <view class="item no-marin-bottom align-top" @click="openH5('/web/privacyPolicy')">
  26. <u-icon name="lock-open" size="28"></u-icon>
  27. <text class="text">隐私保护</text>
  28. </view> -->
  29. <view class="item no-marin-bottom align-top" @click="nato('')">
  30. <u-icon name="account" size="28"></u-icon>
  31. <text class="text">销售管理</text>
  32. </view>
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. </template>
  38. <script>
  39. export default {
  40. data() {
  41. return {
  42. avatar:''
  43. }
  44. },
  45. methods: {
  46. openH5(type){
  47. uni.navigateTo({
  48. url:"/pages/user/userAgreement?type="+type
  49. })
  50. },
  51. nato(urls){
  52. if(!uni.getStorageSync('ManageToken')){
  53. uni.navigateTo({
  54. url:'/pages_manage/login'
  55. })
  56. }else{
  57. uni.navigateTo({
  58. url:'/pages_manage/index'
  59. })
  60. }
  61. }
  62. }
  63. }
  64. </script>
  65. <style lang="scss" scoped>
  66. .user-info{
  67. padding: 40upx 30upx 0 30upx;
  68. display: flex;
  69. align-items: center;
  70. justify-content: space-between;
  71. .left{
  72. position: relative;
  73. display: flex;
  74. .head-img{
  75. width: 120upx;
  76. height: 120upx;
  77. border-radius: 50%;
  78. overflow: hidden;
  79. margin-right: 30upx;
  80. border: 4upx solid #FFFFFF;
  81. box-shadow: 0px 5px 15px 2px rgba(0,0,0,0.1);
  82. image{
  83. width: 100%;
  84. height: 100%;
  85. }
  86. }
  87. .name-phone{
  88. // padding-top: 15upx;
  89. .name{
  90. font-size: 40upx;
  91. font-family: PingFang SC;
  92. font-weight: bold;
  93. color: #111111;
  94. line-height: 1;
  95. }
  96. .phone{
  97. font-size: 28upx;
  98. font-family: PingFang SC;
  99. font-weight: 500;
  100. color: #666666;
  101. line-height: 1;
  102. margin-top: 30upx;
  103. }
  104. }
  105. }
  106. .right{
  107. display: flex;
  108. align-items: center;
  109. justify-content: center;
  110. .msg-box{
  111. margin-left: 10upx;
  112. width: 44upx;
  113. height: 44upx;
  114. image{
  115. width: 100%;
  116. height: 100%;
  117. }
  118. }
  119. .set{
  120. width: 44upx;
  121. height: 44upx;
  122. image{
  123. width: 100%;
  124. height: 100%;
  125. }
  126. }
  127. }
  128. }
  129. .used-tools{
  130. box-sizing: border-box;
  131. background: #FFFFFF;
  132. border-radius: 16upx;
  133. padding: 40upx 30upx;
  134. .title{
  135. font-size: 34upx;
  136. font-family: PingFang SC;
  137. font-weight: bold;
  138. color: #222222;
  139. line-height: 1;
  140. }
  141. .tools-list{
  142. margin-top: 50upx;
  143. display: flex;
  144. flex-wrap: wrap;
  145. width: 100%;
  146. .item{
  147. box-sizing: border-box;
  148. width: 25%;
  149. display: flex;
  150. flex-direction: column;
  151. align-items: center;
  152. justify-content: center;
  153. margin-bottom: 50upx;
  154. position: relative;
  155. image{
  156. width: 50upx;
  157. height: 50upx;
  158. }
  159. .text{
  160. font-size: 24upx;
  161. font-family: PingFang SC;
  162. font-weight: 500;
  163. color: #111111;
  164. line-height: 1;
  165. margin-top: 10upx;
  166. }
  167. .contact-btn{
  168. display: inline-block;
  169. position: absolute;
  170. top: 0;
  171. left: 0;
  172. width: 100%;
  173. height: 100%;
  174. opacity: 0;
  175. }
  176. }
  177. }
  178. }
  179. </style>