list.vue 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328
  1. <template>
  2. <view class="content">
  3. <view>
  4. <view class="active-title-box">
  5. <view class="header-title">活动名称XXXXXXX</view>
  6. <view style="color: gray;">2021.12.01 - 2022.1.31</view>
  7. </view>
  8. <view class="active-box" v-for="(item,index) in activiList" :key="index" style="flex-direction: column;">
  9. <view class="active-header">
  10. <view class="active-type">
  11. <text style="margin: 0 auto;">头像</text>
  12. </view>
  13. <view class="active-content-box">
  14. <view class="active-content margin-top-3">
  15. <view class="active-name">{{item.name}}</view>
  16. </view>
  17. <view class="active-content">
  18. <view class="active-date">{{item.date}}</view>
  19. </view>
  20. </view>
  21. </view>
  22. <view class="active-content-box-img margin-top-3">
  23. <image :src="item.img_url" mode="aspectFit"></image>
  24. <image :src="item.img_url" mode="aspectFit"></image>
  25. <image :src="item.img_url" mode="aspectFit"></image>
  26. </view>
  27. <view class="margin-top-3" style="color: #007AFF;">
  28. {{item.link}}
  29. </view>
  30. <view class="edit-icon-box">
  31. <image src="/static/edit-icon.png" mode="aspectFit"></image>
  32. <image src="/static/del-icon.png" mode="aspectFit"></image>
  33. </view>
  34. </view>
  35. <button class="footer-box-record" @click="goRecord()">上传记录</button>
  36. </view>
  37. </view>
  38. </template>
  39. <script>
  40. import md5 from "@/common/md5.js";
  41. export default {
  42. components: {
  43. },
  44. data() {
  45. return {
  46. isAuth:getApp().globalData.globalAuth,
  47. userHeadImg: getApp().globalData.user_headUrl,
  48. userNickName:getApp().globalData.user_name,
  49. array: ['全部', '浐灞一支部', '浐灞二支部'],
  50. index: 0,
  51. activeId:'',
  52. activiList:[
  53. {
  54. type:'组织建设',
  55. typeNum:'1',
  56. activi_name:'活动名称XXX',
  57. date:'2022.01.22 14:25:40',
  58. name:'路小路',
  59. department:'浐灞一支部',
  60. record_num:'22',
  61. num:'9',
  62. img_url:'/static/logo.png',
  63. link:'https://weread.qq.com/'
  64. },
  65. {
  66. type:'学习培训',
  67. typeNum:'2',
  68. activi_name:'活动名称XXX',
  69. date:'2022.01.15 09:31:55',
  70. name:'陈伟',
  71. department:'浐灞二支部',
  72. record_num:'22',
  73. num:'9',
  74. img_url:'/static/logo.png',
  75. link:'https://weread.qq.com/'
  76. },
  77. {
  78. type:'参政议政',
  79. typeNum:'3',
  80. activi_name:'活动名称XXX',
  81. date:'2022.01.15 18:55:33',
  82. name:'陈伟',
  83. department:'浐灞二支部',
  84. record_num:'22',
  85. num:'9',
  86. img_url:'/static/logo.png',
  87. link:'https://open.163.com/'
  88. },
  89. ]
  90. };
  91. },
  92. onLoad(option) {
  93. this.readActive(option.id)
  94. },
  95. onShow() {
  96. },
  97. methods: {
  98. bindPickerChange: function(e) {
  99. console.log('picker发送选择改变,携带值为', e.target.value)
  100. this.index = e.target.value
  101. },
  102. change(e) {
  103. this.single = e;
  104. console.log("-change事件:", e);
  105. },
  106. readActive(id){
  107. let md5Sign = md5(
  108. "method=" +"activity" + "&timestamp=" + getApp().globalData.globalTimestamp +
  109. "&secret=" + getApp().globalData.secret
  110. );
  111. let url = getApp().globalData.shareUrl +"api/api.php" +
  112. "?method=activity&action=process_list&timestamp=" +
  113. getApp().globalData.globalTimestamp + "&sign=" + md5Sign;
  114. uni.request({
  115. url: url,
  116. method: "POST",
  117. header: {
  118. "content-type": "application/x-www-form-urlencoded",
  119. },
  120. data: {
  121. openid: getApp().globalData.open_id,
  122. activity_id :id
  123. },
  124. success: (res) => {
  125. if (res.data.code === 200) {
  126. }
  127. },
  128. fail: () => {
  129. console.log("连接失败");
  130. },
  131. });
  132. },
  133. publish(){
  134. uni.navigateTo({
  135. url:'./create1'
  136. })
  137. },
  138. goRecord(){
  139. uni.navigateTo({
  140. url:'./record'
  141. })
  142. }
  143. },
  144. };
  145. </script>
  146. <style lang="scss" scoped>
  147. .content {
  148. display: flex;
  149. flex-direction: column;
  150. .self-inf {
  151. // border-radius: 0rpx 0rpx 100% 100%;
  152. .img-name-box {
  153. height: 150rpx;
  154. margin-top: 20rpx;
  155. margin-bottom: 20rpx;
  156. display: flex;
  157. align-items: center;
  158. width: 85%;
  159. .auth-btn {
  160. margin-left: 30rpx;
  161. margin-top: 20rpx;
  162. font-size: 28rpx;
  163. background-color: #02a7f0;
  164. color: #fff;
  165. }
  166. .heade-img {
  167. z-index: 1;
  168. width: 100rpx;
  169. height: 100rpx;
  170. border-radius: 50%;
  171. // margin-left: 80rpx;
  172. }
  173. }
  174. .nickname {
  175. font-weight: 600;
  176. font-size: 28rpx;
  177. margin-left: 30rpx;
  178. margin-top: 20rpx;
  179. color: #555;
  180. letter-spacing: 1rpx;
  181. }
  182. }
  183. }
  184. .org-info-box {
  185. display: flex;
  186. justify-content: space-evenly;
  187. height: 80rpx;
  188. align-items: center;
  189. width: 100%;
  190. border-top: 1px solid #d4d4d4;
  191. color: #555;
  192. font-size: 28rpx;
  193. background: #fff;
  194. }
  195. .org-line {
  196. width: 1px;
  197. height: 82rpx;
  198. background: #d4d4d4;
  199. }
  200. .header-title {
  201. margin-top: 3%;
  202. margin-bottom: 1%;
  203. font-size: 32rpx;
  204. font-weight: bold
  205. }
  206. .active-title-box {
  207. padding-left: 5%;
  208. font-size: 26rpx;
  209. height: 100rpx;
  210. border-bottom: 4px solid #eeeeee;
  211. .time-select-box {
  212. width: 32%;
  213. margin-left: 5%;
  214. }
  215. picker {
  216. width: 25%;
  217. border: 1px solid #d7d7d7;
  218. height: 60rpx;
  219. line-height: 60rpx;
  220. border-radius: 10rpx;
  221. margin-left: 20rpx;
  222. padding: 0 10rpx;
  223. position: relative;
  224. image {
  225. width: 20rpx;
  226. height: 20rpx;
  227. position: absolute;
  228. top: 11px;
  229. right: 5px;
  230. }
  231. }
  232. button {
  233. width: 24%;
  234. font-size: 25rpx;
  235. background: #4988fd;
  236. color: #fff;
  237. margin-left: 25rpx;
  238. }
  239. }
  240. .margin-top-3 {
  241. margin-top: 3%;
  242. }
  243. .active-box {
  244. display: flex;
  245. position: relative;
  246. font-size: 28rpx;
  247. padding: 30rpx;
  248. border-bottom: 1px solid #d7d7d7;
  249. .active-header {
  250. display: flex;
  251. width: 100%;
  252. }
  253. .active-type {
  254. width: 100rpx;
  255. height: 100rpx;
  256. border-radius: 50%;
  257. background-color: #ccc;
  258. text-align: center;
  259. display: flex;
  260. align-items: center;
  261. font-size: 26rpx;
  262. color: #fff;
  263. }
  264. .active-content-box{
  265. display: flex;
  266. flex-direction: column;
  267. margin-left: 20rpx;
  268. }
  269. .active-content-box-img {
  270. display: flex;
  271. justify-content: space-around;
  272. image {
  273. width: 240rpx;
  274. height: 160rpx;
  275. }
  276. }
  277. .active-content {
  278. display: flex;
  279. align-items: center;
  280. height: 45rpx;
  281. font-size: 26rpx;
  282. .active-name {
  283. font-size: 30rpx;
  284. margin-right: 10rpx;
  285. }
  286. .active-date {
  287. color: #ccc;
  288. }
  289. }
  290. .edit-icon-box {
  291. position: absolute;
  292. right: 10px;
  293. top: 10px;
  294. image {
  295. width: 35rpx;
  296. height: 35rpx;
  297. margin-right: 10rpx;
  298. }
  299. }
  300. .bg-yellow {
  301. background-color: #ffdd40;
  302. }
  303. .bg-red {
  304. background-color: #ec808d;
  305. }
  306. .bg-blue {
  307. background-color: #81d3f8;
  308. }
  309. }
  310. .footer-box-record{
  311. position: fixed;
  312. bottom: 0;
  313. background-color:#f59a23;
  314. width: 100%;
  315. border-radius: 0;
  316. color: #fff;
  317. font-size: 32rpx;
  318. }
  319. </style>