index.vue 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  1. <template>
  2. <view >
  3. <image mode="widthFix" :src="isLogin?'/static/wd_bg_login.jpg':'/static/wd_bg.jpg'" :class="isLogin?'login_full_img':'full_img'"></image>
  4. <view style="text-align: center;margin-top: 60rpx;" v-if="!isLogin">
  5. <view style="color: #007AFF ;font-size: 36rpx;font-weight: bold;">
  6. 您还没有登录哦~
  7. </view>
  8. <view class="loginBtn" @click="jumpLogin">
  9. 立即登录/注册
  10. </view>
  11. </view>
  12. <view v-if="isLogin" class="loginBox">
  13. <view style="width: 100%;height: 40px;background-color: #F0F1F5;position: fixed;top: 150px;z-index: 100;"></view>
  14. <view style="display: flex;height: 160rpx;align-items: center; position: fixed;z-index: 999;top: 110px;" v-if="isLogin">
  15. <image :src="$method.splitImgHost(userInfo.avatar, true)" class="avatar"></image>
  16. <view style="margin-left: 20rpx;z-index: 999;">
  17. <view style="color: #FFFFFF;font-size: 36rpx;padding: 10rpx;">{{userInfo.realname}}</view>
  18. <view style="color: #333333;font-size: 36rpx;padding: 10rpx;">{{userInfo.telphone}}</view>
  19. </view>
  20. <view style="background-color: #F0F1F5;height:80rpx;"></view>
  21. </view>
  22. <view style="top: 195px;position: relative;padding-bottom: 30rpx;">
  23. <navigator url="/pages2/plan/index" class="menu_box">
  24. <view style="display: flex;align-items: center;">
  25. <image src="/static/icon/my_icon1.png" class="my_icon"></image>
  26. <view>学习计划</view>
  27. </view>
  28. <view>
  29. 今天有 <text style="color: #007AFF;margin: 0 5rpx;">3</text> 个学习任务
  30. </view>
  31. </navigator>
  32. <view class="menu_box">
  33. <view style="display: flex;align-items: center;">
  34. <image src="/static/icon/my_icon2.png" class="my_icon"></image>
  35. <view>我的学时</view>
  36. </view>
  37. <view>
  38. 累计<text style="color: #007AFF;margin: 0 5rpx;">3</text> 学时未通过
  39. </view>
  40. </view>
  41. <view class="two_menu">
  42. <navigator url="/pages2/wd/class" class="small_menu">
  43. <image src="/static/icon/my_icon3.png" class="my_icon"></image>
  44. <view>我的网课</view>
  45. </navigator>
  46. <navigator class="small_menu">
  47. <image src="/static/icon/my_icon4.png" class="my_icon"></image>
  48. <view>我的题库通</view>
  49. </navigator>
  50. </view>
  51. <view class="two_menu">
  52. <navigator class="small_menu">
  53. <image src="/static/icon/my_icon5.png" class="my_icon"></image>
  54. <view>我的证书</view>
  55. </navigator>
  56. <navigator class="small_menu">
  57. <image src="/static/icon/my_icon6.png" class="my_icon"></image>
  58. <view>我的发票</view>
  59. </navigator>
  60. </view>
  61. <navigator url="/pages2/order/index" class="menu_box">
  62. <view style="display: flex;align-items: center;">
  63. <image src="/static/icon/my_icon7.png" class="my_icon"></image>
  64. <view>我的订单</view>
  65. </view>
  66. <view>
  67. <text style="color: #007AFF;margin: 0 5rpx;">3</text>笔待支付
  68. </view>
  69. </navigator>
  70. <navigator url="/pages2/msg/index" class="menu_box">
  71. <view style="display: flex;align-items: center;">
  72. <image src="/static/icon/my_icon8.png" class="my_icon"></image>
  73. <view>我的消息</view>
  74. </view>
  75. <view>
  76. <text style="color: #007AFF;margin: 0 5rpx;">3</text>条未读
  77. </view>
  78. </navigator>
  79. <navigator url="/pages2/wd/info" class="menu_box">
  80. <view style="display: flex;align-items: center;">
  81. <image src="/static/icon/my_icon9.png" class="my_icon"></image>
  82. <view>我的资料</view>
  83. </view>
  84. </navigator>
  85. <view style="color: #999999;text-align: center;font-size: 32rpx;margin-top: 50rpx;" @click="logout">
  86. 退出
  87. </view>
  88. </view>
  89. </view>
  90. <u-navbar :is-back="false" title="我的" :border-bottom="false" background="{ background: '#ffffff',opacity:0.4; }" title-color="#ffffff" back-icon-color="#ffffff">
  91. <view class="slot-wrap">
  92. <image src="/static/logo.png" style="width: 178rpx;height: 31rpx;margin-left: 30rpx;"></image>
  93. </view>
  94. </u-navbar>
  95. </view>
  96. </template>
  97. <script>
  98. import {mapGetters} from 'vuex';
  99. export default {
  100. components: {
  101. },
  102. data() {
  103. return {
  104. list:[23,24,25,26,27,28,29],
  105. content:'此功能暂未开放',
  106. show:false,
  107. isLogin:false
  108. }
  109. },
  110. onLoad() {
  111. },
  112. onShow(){
  113. this.isLogin = this.$method.isLogin()
  114. console.log(this.isLogin)
  115. },
  116. methods: {
  117. logout(){
  118. console.log(343)
  119. this.$method.isLogout()
  120. this.isLogin = this.$method.isLogin()
  121. uni.switchTab({
  122. url:'/pages/index/index'
  123. })
  124. },
  125. jumpLogin(){
  126. this.$navTo.togo('/pages/login/login');
  127. }
  128. },
  129. computed: {...mapGetters(['userInfo'])}
  130. }
  131. </script>
  132. <style>
  133. ::-webkit-scrollbar{
  134. width: 0;
  135. height: 0;
  136. color: transparent;
  137. }
  138. page{
  139. background-color: #F0F1F5;
  140. }
  141. </style>
  142. <style scoped>
  143. .avatar{
  144. height: 70rpx;
  145. width: 70rpx;
  146. border-radius: 50%;
  147. }
  148. .small_menu{
  149. width: 45%;
  150. height: 104rpx;
  151. background: #FFFFFF;
  152. border-radius: 24rpx;
  153. display: flex;
  154. align-items: center;
  155. padding-left: 20rpx;
  156. margin-top: 30rpx;
  157. }
  158. .two_menu{
  159. display: flex;
  160. justify-content:space-between;
  161. }
  162. .my_icon{
  163. width: 56rpx;
  164. height: 56rpx;
  165. margin-right: 20rpx;
  166. }
  167. .menu_box{
  168. height: 104rpx;
  169. background: #FFFFFF;
  170. border-radius: 24rpx;
  171. margin-top: 30rpx;
  172. display: flex;
  173. align-items: center;
  174. padding: 0 20rpx;
  175. justify-content:space-between;
  176. color: #666666;
  177. font-size: 32rpx;
  178. }
  179. .loginBox{
  180. position: relative;
  181. padding:0 30rpx;
  182. }
  183. .avatar{
  184. width: 80px;
  185. height: 80px;
  186. }
  187. .login_full_img {
  188. display: block;
  189. width: 100%;
  190. height: 150px !important;
  191. z-index: 300;
  192. top: 0;
  193. position: fixed;
  194. }
  195. .full_img {
  196. display: block;
  197. width: 100%;
  198. z-index: -999;
  199. top: 0;
  200. }
  201. .loginBtn{
  202. width: 526rpx;
  203. height: 80rpx;
  204. background: linear-gradient(90deg, #015EEA, #00C0FA);
  205. box-shadow: 0rpx 10rpx 16rpx 4rpx rgba(1, 99, 235, 0.04);
  206. border-radius: 40rpx;
  207. color: #FFFFFF;
  208. line-height: 80rpx;
  209. margin: 0 auto;
  210. margin-top: 50rpx;
  211. }
  212. </style>