activity.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  1. <template>
  2. <view class="content">
  3. <view class="self-inf">
  4. <view class="antu-box" v-if="isAuth">
  5. <view class="img-name-box">
  6. <image :src="userHeadImg" class="heade-img" mode="aspectFill"></image>
  7. <p class="nickname">{{ userNickName }}</p>
  8. <p class="nickname">136****0648</p>
  9. </view>
  10. <view class="org-info-box">
  11. <view class="org-info">浐灞一支部</view>
  12. <view class="org-line"></view>
  13. <view class="org-info">宣传委员</view>
  14. </view>
  15. </view>
  16. <view class="img-name-box" v-if="!isAuth" style="height: 180rpx;">
  17. <image src="/static/auth-icon.png" class="heade-img" mode="aspectFill" style="margin-left: 80rpx;"></image>
  18. <button @click="goAuthPage()" class="auth-btn">授权登录</button>
  19. </view>
  20. </view>
  21. <view>
  22. <view class="active-title-box">
  23. <uni-datetime-picker
  24. class="time-select-box"
  25. type="date"
  26. :value="single"
  27. @change="change"
  28. :clear-icon="false"
  29. />
  30. <picker @change="bindPickerChange" :value="index" :range="array">
  31. <view class="uni-input">{{array[index]}}</view>
  32. <image src="/static/arrow_down.svg" mode="aspectFit"></image>
  33. </picker>
  34. <button>+发布活动</button>
  35. </view>
  36. <view class="active-box" v-for="(item,index) in activiList" :key="index">
  37. <view class="active-type" :class="{'bg-yellow':item.typeNum == '1' ,'bg-red':item.typeNum == '2','bg-blue':item.typeNum == '3',}" >
  38. {{item.type}}
  39. </view>
  40. <view class="active-content-box">
  41. <view class="active-content">
  42. <view class="active-name">{{item.activi_name}}</view>
  43. <view class="active-date">{{item.date}}</view>
  44. </view>
  45. <view class="active-content">
  46. <view style="margin-right:10rpx;">{{item.department}} | </view>
  47. <view>{{item.name}} | </view>
  48. <view style="margin-left:10rpx;">记录数:({{item.record_num}}/{{item.num}})</view>
  49. </view>
  50. </view>
  51. <view class="edit-icon-box">
  52. <image src="/static/edit-icon.png" mode="aspectFit"></image>
  53. <image src="/static/del-icon.png" mode="aspectFit"></image>
  54. </view>
  55. </view>
  56. </view>
  57. </view>
  58. </template>
  59. <script>
  60. import md5 from "@/common/md5.js";
  61. export default {
  62. components: {
  63. },
  64. data() {
  65. return {
  66. isAuth:getApp().globalData.globalAuth,
  67. userHeadImg: getApp().globalData.user_headUrl,
  68. userNickName:getApp().globalData.user_name,
  69. array: ['全部', '浐灞一支部', '浐灞二支部'],
  70. index: 0,
  71. activiList:[
  72. {
  73. type:'组织建设',
  74. typeNum:'1',
  75. activi_name:'活动名称XXX',
  76. date:'2022.01.22',
  77. name:'路小路',
  78. department:'浐灞一支部',
  79. record_num:'22',
  80. num:'9'
  81. },
  82. {
  83. type:'学习培训',
  84. typeNum:'2',
  85. activi_name:'活动名称XXX',
  86. date:'2022.01.15',
  87. name:'陈伟',
  88. department:'浐灞二支部',
  89. record_num:'22',
  90. num:'9'
  91. },
  92. {
  93. type:'参政议政',
  94. typeNum:'3',
  95. activi_name:'活动名称XXX',
  96. date:'2022.01.15',
  97. name:'陈伟',
  98. department:'浐灞二支部',
  99. record_num:'22',
  100. num:'9'
  101. },
  102. ]
  103. };
  104. },
  105. onShow() {
  106. },
  107. methods: {
  108. bindPickerChange: function(e) {
  109. console.log('picker发送选择改变,携带值为', e.target.value)
  110. this.index = e.target.value
  111. },
  112. change(e) {
  113. this.single = e;
  114. console.log("-change事件:", e);
  115. },
  116. },
  117. };
  118. </script>
  119. <style lang="scss" scoped>
  120. .content {
  121. display: flex;
  122. flex-direction: column;
  123. .self-inf {
  124. // border-radius: 0rpx 0rpx 100% 100%;
  125. .img-name-box {
  126. height: 150rpx;
  127. margin-top: 20rpx;
  128. margin-bottom: 20rpx;
  129. display: flex;
  130. align-items: center;
  131. width: 85%;
  132. .auth-btn {
  133. margin-left: 30rpx;
  134. margin-top: 20rpx;
  135. font-size: 28rpx;
  136. background-color: #02a7f0;
  137. color: #fff;
  138. }
  139. .heade-img {
  140. z-index: 1;
  141. width: 100rpx;
  142. height: 100rpx;
  143. border-radius: 50%;
  144. // margin-left: 80rpx;
  145. }
  146. }
  147. .nickname {
  148. font-weight: 600;
  149. font-size: 28rpx;
  150. margin-left: 30rpx;
  151. margin-top: 20rpx;
  152. color: #555;
  153. letter-spacing: 1rpx;
  154. }
  155. }
  156. }
  157. .antu-box {
  158. display: flex;
  159. flex-direction: column;
  160. align-items: center;
  161. background: #fff;
  162. margin-left: 5%;
  163. margin-top: 50rpx;
  164. border-radius: 10rpx;
  165. width: 90%;
  166. color: #555;
  167. box-shadow: 0px 2px 16px rgba(0, 0, 0, 0.2);
  168. }
  169. .org-info-box {
  170. display: flex;
  171. justify-content: space-evenly;
  172. height: 80rpx;
  173. align-items: center;
  174. width: 100%;
  175. border-top: 1px solid #d4d4d4;
  176. color: #555;
  177. font-size: 28rpx;
  178. background: #fff;
  179. }
  180. .org-line {
  181. width: 1px;
  182. height: 82rpx;
  183. background: #d4d4d4;
  184. }
  185. .active-title-box {
  186. display: flex;
  187. align-items: center;
  188. margin-top: 10rpx;
  189. font-size: 26rpx;
  190. height: 100rpx;
  191. border-bottom: 1px solid #d7d7d7;
  192. margin-top: 10rpx;
  193. .time-select-box {
  194. width: 32%;
  195. margin-left: 5%;
  196. }
  197. picker {
  198. width: 25%;
  199. border: 1px solid #d7d7d7;
  200. height: 60rpx;
  201. line-height: 60rpx;
  202. border-radius: 10rpx;
  203. margin-left: 20rpx;
  204. padding: 0 10rpx;
  205. position: relative;
  206. image {
  207. width: 20rpx;
  208. height: 20rpx;
  209. position: absolute;
  210. top: 11px;
  211. right: 5px;
  212. }
  213. }
  214. button {
  215. width: 24%;
  216. font-size: 25rpx;
  217. background: #4988fd;
  218. color: #fff;
  219. margin-left: 25rpx;
  220. }
  221. }
  222. .active-box {
  223. display: flex;
  224. align-items: center;
  225. position: relative;
  226. font-size: 28rpx;
  227. padding: 30rpx;
  228. border-bottom: 1px solid #d7d7d7;
  229. .active-type {
  230. width: 100rpx;
  231. height: 100rpx;
  232. border-radius: 50%;
  233. background-color: yellow;
  234. text-align: center;
  235. display: flex;
  236. align-items: center;
  237. font-size: 26rpx;
  238. color: #fff;
  239. }
  240. .active-content-box {
  241. display: flex;
  242. flex-direction: column;
  243. margin-left: 20rpx;
  244. }
  245. .active-content {
  246. display: flex;
  247. align-items: center;
  248. height: 45rpx;
  249. font-size: 26rpx;
  250. .active-name {
  251. font-size: 30rpx;
  252. margin-right: 10rpx;
  253. }
  254. .active-date {
  255. color: #ccc;
  256. }
  257. }
  258. .edit-icon-box {
  259. position: absolute;
  260. right: 10px;
  261. top: 10px;
  262. image {
  263. width: 35rpx;
  264. height: 35rpx;
  265. margin-right: 10rpx;
  266. }
  267. }
  268. .bg-yellow {
  269. background-color: #ffdd40;
  270. }
  271. .bg-red {
  272. background-color: #ec808d;
  273. }
  274. .bg-blue {
  275. background-color: #81d3f8;
  276. }
  277. }
  278. </style>