my.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  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+'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">点击立即登录</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'"></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="handleActiveDetail">立即购买</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. handleTurn(url){
  96. if(!url) return
  97. uni.navigateTo({ url })
  98. },
  99. handleActiveDetail(){
  100. let url = '/pagesPublish/rechargeCenter'
  101. if(this.userInfo.name) url = '';
  102. url && uni.navigateTo({ url })
  103. }
  104. }
  105. }
  106. </script>
  107. <style scoped lang="scss">
  108. .tabPage{
  109. .topbg{
  110. width: 100%;
  111. position: absolute;
  112. left: 0;
  113. top: 0;
  114. }
  115. .box{
  116. position: relative;
  117. padding-top: 40rpx;
  118. .top{
  119. padding: 0 22rpx 0 16rpx;
  120. &-left{
  121. &-img{
  122. image{
  123. width: 128rpx;
  124. height: 128rpx;
  125. }
  126. }
  127. &-info{
  128. margin-left: 20rpx;
  129. &-name{
  130. font-family: PingFang-SC, PingFang-SC;
  131. font-weight: bold;
  132. font-size: 40rpx;
  133. color: #002846;
  134. line-height: 40rpx;
  135. }
  136. &-tip{
  137. font-family: PingFangSC, PingFang SC;
  138. font-weight: 400;
  139. font-size: 26rpx;
  140. color: #86909C;
  141. line-height: 26rpx;
  142. margin-top: 31rpx;
  143. }
  144. &-version{
  145. width: 129rpx;
  146. height: 40rpx;
  147. background: url('https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/my_version_bg.png') no-repeat;
  148. background-size: 100% 100%;
  149. padding-left: 48rpx;
  150. box-sizing: border-box;
  151. font-family: PingFang-SC, PingFang-SC;
  152. font-weight: bold;
  153. font-size: 22rpx;
  154. color: #795021;
  155. line-height: 40rpx;
  156. margin-top: 24rpx;
  157. }
  158. }
  159. }
  160. &-right{
  161. image{
  162. width: 42rpx;
  163. height: 42rpx;
  164. }
  165. }
  166. }
  167. .num{
  168. margin-top: 48rpx;
  169. &-pre{
  170. width: calc(100% / 3);
  171. &-sz{
  172. font-family: D-DINCondensed, D-DINCondensed;
  173. font-weight: bold;
  174. font-size: 48rpx;
  175. color: #002846;
  176. line-height: 48rpx;
  177. }
  178. &-text{
  179. font-family: PingFangSC, PingFang SC;
  180. font-weight: 400;
  181. font-size: 26rpx;
  182. color: #86909C;
  183. line-height: 26rpx;
  184. text-align: center;
  185. margin-top: 24rpx;
  186. }
  187. }
  188. }
  189. .preill{
  190. margin-top: 49rpx;
  191. background: url('https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/my_pinggu_bg.png') no-repeat;
  192. background-size: 100% 100%;
  193. padding: 34rpx 24rpx;
  194. &-left{
  195. font-family: PingFangSC, PingFang SC;
  196. font-weight: 400;
  197. font-size: 24rpx;
  198. color: #B0B7C7;
  199. line-height: 24rpx;
  200. padding-top: 42rpx;
  201. }
  202. &-right{
  203. padding: 18rpx 26rpx;
  204. background: linear-gradient( 270deg, #F0E2C7 0%, #E3CD9E 100%);
  205. border-radius: 32rpx;
  206. font-family: PingFangSC, PingFang SC;
  207. font-weight: 400;
  208. font-size: 26rpx;
  209. color: #795021;
  210. line-height: 26rpx;
  211. }
  212. }
  213. .menu{
  214. margin-top: 30rpx;
  215. background: #FFFFFF;
  216. border-radius: 16rpx;
  217. &-item{
  218. padding: 35rpx 30rpx;
  219. box-shadow: inset 0rpx -1rpx 0rpx 0rpx #EFEFEF;
  220. &-left{
  221. image{
  222. width: 40rpx;
  223. height: 40rpx;
  224. }
  225. text{
  226. font-family: PingFangSC, PingFang SC;
  227. font-weight: 400;
  228. font-size: 30rpx;
  229. color: #002846;
  230. line-height: 32rpx;
  231. margin-left: 21rpx;
  232. }
  233. }
  234. &-right{
  235. width: 36rpx;
  236. height: 36rpx;
  237. }
  238. }
  239. }
  240. }
  241. }
  242. </style>