my.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. <template>
  2. <view class="tabPage" :style="{'min-height':h+'px', 'padding-top':mt+'px'}">
  3. <cus-header title='我的' bgColor="transparent" :showback="false"></cus-header>
  4. <image class="topbg" :src="imgBase+'my_topbg.png'" mode="widthFix"></image>
  5. <view class="box">
  6. <view class="top adfacjb">
  7. <view class="top-left adfac">
  8. <view class="top-left-img">
  9. <image :src="userInfo.headUrl||(imgBase+'my_avatar.png')"></image>
  10. </view>
  11. <view class="top-left-info">
  12. <view class="top-left-info-name">{{userInfo.realName||'未登录'}}</view>
  13. <view class="top-left-info-tip" v-if="!userInfo.id" @click="handleLogin">点击立即登录</view>
  14. <view class="top-left-info-version" v-else>{{'基础版'}}</view>
  15. </view>
  16. </view>
  17. <view class="top-right">
  18. <image :src="imgBase+'my_set.png'" @click="handleTurn('/pagesMy/userSet')"></image>
  19. </view>
  20. </view>
  21. <view class="num adf">
  22. <view class="num-pre adffcac">
  23. <view class="num-pre-sz">{{0}}</view>
  24. <view class="num-pre-text">基础版次数</view>
  25. </view>
  26. <view class="num-pre adffcac">
  27. <view class="num-pre-sz">{{0}}</view>
  28. <view class="num-pre-text">专业版次数</view>
  29. </view>
  30. <view class="num-pre adffcac">
  31. <view class="num-pre-sz">{{0}}</view>
  32. <view class="num-pre-text">我的团队</view>
  33. </view>
  34. </view>
  35. <view class="preill adfacjb">
  36. <view class="preill-left">深入了解支撑高价值团队的关键因素</view>
  37. <view class="preill-right" @click="handleTurn('/pagesPublish/rechargeCenter')">立即购买</view>
  38. </view>
  39. <view class="menu">
  40. <view class="menu-item adfacjb" v-for="(item,index) in menuList" :key="index" @click="handleTurn(item.path)">
  41. <view class="menu-item-left adfac">
  42. <image :src="item.img"></image>
  43. <text>{{item.title}}</text>
  44. </view>
  45. <image class="menu-item-right" :src="imgBase+'my_arrow_right.png'"></image>
  46. </view>
  47. </view>
  48. </view>
  49. <Tabbar :tabbarIndex="2"></Tabbar>
  50. </view>
  51. </template>
  52. <script>
  53. import Tabbar from '@/components/CusTabbar/index.vue'
  54. export default {
  55. components:{ Tabbar },
  56. data(){
  57. return {
  58. userInfo:{
  59. avatar:this.$imgBase+'my_avatar.png',
  60. name:''
  61. },
  62. menuList:[
  63. {
  64. img:this.$imgBase+'my_order.png',
  65. title:'我的订单',
  66. path:'/pagesMy/order'
  67. },
  68. {
  69. img:this.$imgBase+'my_record.png',
  70. title:'推荐记录',
  71. path:'/pagesMy/recommendHistory'
  72. },
  73. {
  74. img:this.$imgBase+'my_program.png',
  75. title:'我的项目',
  76. path:''
  77. },
  78. {
  79. img:this.$imgBase+'my_teamusers.png',
  80. title:'团队成员',
  81. path:'/pagesMy/teamUser'
  82. },
  83. {
  84. img:this.$imgBase+'my_friends.png',
  85. title:'邀请好友',
  86. path:''
  87. }
  88. ]
  89. }
  90. },
  91. onLoad(options) {
  92. if(uni.getStorageSync('userInfo')) this.userInfo = JSON.parse(uni.getStorageSync('userInfo'))
  93. },
  94. methods:{
  95. handleLogin(){
  96. uni.reLaunch({
  97. url:'/pages/login'
  98. })
  99. },
  100. handleTurn(url){
  101. if(!this.isLogin()) return
  102. if(!url) return
  103. uni.navigateTo({ url })
  104. },
  105. }
  106. }
  107. </script>
  108. <style scoped lang="scss">
  109. .tabPage{
  110. .topbg{
  111. width: 100%;
  112. position: absolute;
  113. left: 0;
  114. top: 0;
  115. }
  116. .box{
  117. position: relative;
  118. padding-top: 40rpx;
  119. .top{
  120. padding: 0 22rpx 0 16rpx;
  121. &-left{
  122. &-img{
  123. image{
  124. width: 128rpx;
  125. height: 128rpx;
  126. }
  127. }
  128. &-info{
  129. margin-left: 20rpx;
  130. &-name{
  131. font-family: PingFang-SC, PingFang-SC;
  132. font-weight: bold;
  133. font-size: 40rpx;
  134. color: #002846;
  135. line-height: 40rpx;
  136. }
  137. &-tip{
  138. font-family: PingFangSC, PingFang SC;
  139. font-weight: 400;
  140. font-size: 26rpx;
  141. color: #86909C;
  142. line-height: 26rpx;
  143. margin-top: 31rpx;
  144. }
  145. &-version{
  146. width: 129rpx;
  147. height: 40rpx;
  148. background: url('https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/my_version_bg.png') no-repeat;
  149. background-size: 100% 100%;
  150. padding-left: 48rpx;
  151. box-sizing: border-box;
  152. font-family: PingFang-SC, PingFang-SC;
  153. font-weight: bold;
  154. font-size: 22rpx;
  155. color: #795021;
  156. line-height: 40rpx;
  157. margin-top: 24rpx;
  158. }
  159. }
  160. }
  161. &-right{
  162. image{
  163. width: 42rpx;
  164. height: 42rpx;
  165. }
  166. }
  167. }
  168. .num{
  169. margin-top: 48rpx;
  170. &-pre{
  171. width: calc(100% / 3);
  172. &-sz{
  173. font-family: D-DINCondensed, D-DINCondensed;
  174. font-weight: bold;
  175. font-size: 48rpx;
  176. color: #002846;
  177. line-height: 48rpx;
  178. }
  179. &-text{
  180. font-family: PingFangSC, PingFang SC;
  181. font-weight: 400;
  182. font-size: 26rpx;
  183. color: #86909C;
  184. line-height: 26rpx;
  185. text-align: center;
  186. margin-top: 24rpx;
  187. }
  188. }
  189. }
  190. .preill{
  191. margin-top: 49rpx;
  192. background: url('https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/my_pinggu_bg.png') no-repeat;
  193. background-size: 100% 100%;
  194. padding: 34rpx 24rpx;
  195. &-left{
  196. font-family: PingFangSC, PingFang SC;
  197. font-weight: 400;
  198. font-size: 24rpx;
  199. color: #B0B7C7;
  200. line-height: 24rpx;
  201. padding-top: 42rpx;
  202. }
  203. &-right{
  204. padding: 18rpx 26rpx;
  205. background: linear-gradient( 270deg, #F0E2C7 0%, #E3CD9E 100%);
  206. border-radius: 32rpx;
  207. font-family: PingFangSC, PingFang SC;
  208. font-weight: 400;
  209. font-size: 26rpx;
  210. color: #795021;
  211. line-height: 26rpx;
  212. }
  213. }
  214. .menu{
  215. margin-top: 30rpx;
  216. background: #FFFFFF;
  217. border-radius: 16rpx;
  218. &-item{
  219. padding: 35rpx 30rpx;
  220. box-shadow: inset 0rpx -1rpx 0rpx 0rpx #EFEFEF;
  221. &-left{
  222. image{
  223. width: 40rpx;
  224. height: 40rpx;
  225. }
  226. text{
  227. font-family: PingFangSC, PingFang SC;
  228. font-weight: 400;
  229. font-size: 30rpx;
  230. color: #002846;
  231. line-height: 32rpx;
  232. margin-left: 21rpx;
  233. }
  234. }
  235. &-right{
  236. width: 36rpx;
  237. height: 36rpx;
  238. }
  239. }
  240. }
  241. }
  242. }
  243. </style>