mineSubscribe.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. <template>
  2. <view class="content">
  3. <statusBar :item="navBarData"></statusBar>
  4. <view class="" style="width: 750rpx;height: 60px;">
  5. <view class="activeTitle">
  6. <view class="left" @click="phoneLogin" :class="current==0?active:test">
  7. <text>教研室活动</text>
  8. <view :class="current==0?yun:test"></view>
  9. </view>
  10. <view class="right" @click="accountLogin" :class="current==1?active:test">
  11. <text>非常规活动</text>
  12. <view :class="current==1?yun:test"></view>
  13. </view>
  14. </view>
  15. </view>
  16. <swiper class="scroll-view-height" @change="swipeIndex" :current="current" :duration="300">
  17. <swiper-item>
  18. <view class="activeClass">
  19. <view class="classBox" v-for="i in 9" :key="i">
  20. <view class="classLeft">
  21. <view class="class_Img">
  22. <image src="../../static/mine/activeclass.png" mode=""></image>
  23. </view>
  24. <view class="class_Text">
  25. <view class="text_Title">
  26. <span class="manage">类型</span>
  27. <span>教研室标题</span>
  28. </view>
  29. <view class="text_Intro">
  30. <span>说明文字教研室简介</span>
  31. </view>
  32. </view>
  33. </view>
  34. <view class="classright">
  35. <image src="../../static/mine/Union.png" mode=""></image>
  36. </view>
  37. </view>
  38. </view>
  39. </swiper-item>
  40. <swiper-item>
  41. <view class="activeClass">
  42. <view class="classBox" v-for="i in 7" :key="i">
  43. <view class="classLeft">
  44. <view class="class_Img">
  45. <image src="../../static/mine/myactive.png" mode=""></image>
  46. </view>
  47. <view class="class_Text">
  48. <view class="text_Title">
  49. <span class="manage">类型</span>
  50. <span>活动标题</span>
  51. </view>
  52. <view class="text_Intro">
  53. <span>说明文字教研室简介</span>
  54. </view>
  55. </view>
  56. </view>
  57. <view class="classright">
  58. <image src="../../static/mine/Union.png" mode=""></image>
  59. </view>
  60. </view>
  61. </view>
  62. </swiper-item>
  63. </swiper>
  64. </view>
  65. </template>
  66. <script>
  67. export default {
  68. data() {
  69. return {
  70. navBarData: {
  71. title: '我的订阅',
  72. btn: 1
  73. },
  74. current:0,//切换
  75. height:`calc(100vh - this.navheight+'px' - 10px)`,
  76. navheight:this.navheight, //导航栏高度
  77. active:'active', //类名
  78. test:'test',
  79. yun:'yun',
  80. };
  81. },
  82. computed: {
  83. dynamicStyle() {
  84. return {
  85. height: `calc(100vh - 10px)`
  86. };
  87. }
  88. },
  89. methods: {
  90. swipeIndex(index){
  91. this.current=index.detail.current;
  92. },
  93. phoneLogin(){
  94. this.current=0
  95. },
  96. accountLogin(){
  97. this.current=1
  98. },
  99. }
  100. }
  101. </script>
  102. <style lang="scss">
  103. .content{
  104. .activeTitle{
  105. position: fixed;
  106. z-index: 9;
  107. width: 100%;
  108. height: 60px;
  109. background-color: white;
  110. border-top: 1px solid lightgray;
  111. display: flex;
  112. justify-content: center;
  113. padding: 0 30px;
  114. font-size: 34rpx;
  115. .test{
  116. // height: ;
  117. }
  118. .active{
  119. position: relative;
  120. font-weight: bold;
  121. .yun{
  122. width: 80rpx;
  123. height: 0rpx;
  124. position: absolute;
  125. left: 50%;
  126. top: 65%;
  127. transform: translate(-50%,-50%);
  128. box-shadow: 0px 0px 10px 2px #4a97f2;
  129. }
  130. }
  131. .left{
  132. width: 50%;
  133. height: 100%;
  134. display: flex;
  135. justify-content: center;
  136. align-items: center;
  137. }
  138. .right{
  139. width: 50%;
  140. height: 100%;
  141. display: flex;
  142. justify-content: center;
  143. align-items: center;
  144. }
  145. }
  146. .scroll-view-height{
  147. // height: 200vmin;
  148. // height: 100vh;
  149. // height: auto;
  150. .activeClass{
  151. width: 100%;
  152. height: auto;
  153. .classBox{
  154. display: flex;
  155. justify-content: space-between;
  156. padding: 0 47rpx;
  157. background-color: #fff;
  158. height: 144rpx;
  159. .classLeft{
  160. display: flex;
  161. height: 100%;
  162. .class_Img{
  163. display: flex;
  164. align-items: center;
  165. flex-grow: 1;
  166. image{
  167. width: 80rpx;
  168. height: 80rpx;
  169. }
  170. }
  171. .class_Text{
  172. display: flex;
  173. justify-content: center;
  174. flex-grow: 2;
  175. flex-direction: column;
  176. .text_Title{
  177. display: flex;
  178. margin-bottom: 6px;
  179. span{
  180. &:last-child {
  181. color: #000;
  182. font-size: 28rpx;
  183. font-weight: 600;
  184. }
  185. &.manage {
  186. border: 1px #00b2b6 solid;
  187. font-size: 10px;
  188. display: flex;
  189. white-space: nowrap;
  190. justify-content: center;
  191. align-items: center;
  192. padding: 1px 6px;
  193. border-radius: 3px;
  194. margin-right: 10rpx;
  195. color: #00b2b6;
  196. margin-left: 6px;
  197. font-weight: 600;
  198. }
  199. }
  200. }
  201. .text_Intro{
  202. display: flex;
  203. span{
  204. font-size: 24rpx;
  205. font-weight: 400;
  206. color: rgb(191, 191, 191);
  207. margin-left: 6px;
  208. }
  209. }
  210. }
  211. }
  212. .classright{
  213. display: flex;
  214. height: 100%;
  215. align-items: center;
  216. image{
  217. width: 38rpx;
  218. height: 42rpx;
  219. }
  220. }
  221. }
  222. }
  223. }
  224. }
  225. </style>