Commit ffaf6fa23289916da0ba789832d149df29bee7f2

Authored by 李宇
1 parent 1f2052a7

1

pages/activitylist/activitylist.vue
... ... @@ -72,7 +72,7 @@
72 72 display: flex;
73 73 padding: 20rpx;
74 74 border-radius: 20rpx;
75   - height: 200rpx;
  75 + // height: 200rpx;
76 76  
77 77 .box_left {
78 78 display: flex;
... ...
pages/home/home.vue
... ... @@ -68,26 +68,30 @@
68 68 </view>
69 69 </view>
70 70 <view class="content" style="padding-bottom: 0;">
71   - <view class="box_item" @click="goyl('http://icare.rsxmzj.91xxt.com:81/admin/resources/wsShop/html/index/oIndex_index.html')">
  71 + <view class="box_item"
  72 + @click="goyl('http://icare.rsxmzj.91xxt.com:81/admin/resources/wsShop/html/index/oIndex_index.html')">
72 73 <view style="margin-bottom: 20rpx;">
73 74 <image src="../../static/yl/image-2.png" style="height: 100rpx;" mode="heightFix"></image>
74 75 </view>
75 76 <view class="text">服务预约</view>
76 77 </view>
77   - <view class="box_item" @click="goyl('http://icare.rsxmzj.91xxt.com:81/admin/resources/H5_YLZS/html/login.html')">
  78 + <view class="box_item"
  79 + @click="goyl('http://icare.rsxmzj.91xxt.com:81/admin/resources/H5_YLZS/html/login.html')">
78 80 <view style="margin-bottom: 20rpx;">
79 81 <image src="../../static/yl/image.png" style="height: 100rpx;" mode="heightFix"></image>
80 82 </view>
81 83 <view class="text">高龄津贴认证</view>
82 84 </view>
83   - <view class="box_item" @click="goyl('http://show.rsxmzj.91xxt.com:81/2020/orgMap/html/map/list.html')">
  85 + <view class="box_item"
  86 + @click="goyl('http://show.rsxmzj.91xxt.com:81/2020/orgMap/html/map/list.html')">
84 87 <view style="margin-bottom: 20rpx;">
85 88 <image src="../../static/yl/image-4.png" style="height: 100rpx;" mode="heightFix"></image>
86 89 </view>
87 90 <view class="text">关爱地图</view>
88 91 </view>
89   -
90   - <view class="box_item" @click="goyl('http://icare.rsxmzj.91xxt.com:81/admin/mobile/meal_aid_copy/html/login.html')">
  92 +
  93 + <view class="box_item"
  94 + @click="goyl('http://icare.rsxmzj.91xxt.com:81/admin/mobile/meal_aid_copy/html/login.html')">
91 95 <view style="margin-bottom: 20rpx;">
92 96 <image src="../../static/yl/image-5.png" style="height: 100rpx;" mode="heightFix"></image>
93 97 </view>
... ... @@ -95,7 +99,8 @@
95 99 </view>
96 100 </view>
97 101 <view class="content" style="padding-top: 0;">
98   - <view class="box_item" @click="goyl('http://cwservice.rsxmzj.91xxt.com:81/icare-admin/resources/cwbt/html/login.html')">
  102 + <view class="box_item"
  103 + @click="goyl('http://cwservice.rsxmzj.91xxt.com:81/icare-admin/resources/cwbt/html/login.html')">
99 104 <view style="margin-bottom: 20rpx;">
100 105 <image src="../../static/yl/image-3.png" style="height: 100rpx;" mode="heightFix"></image>
101 106 </view>
... ... @@ -123,7 +128,7 @@
123 128 </view>
124 129 <view class="text">悄悄话</view>
125 130 </view>
126   - <!-- <view class="box_item" @click="gopath('/pages/activitylist/activitylist?activeType=未成年')">
  131 + <!-- <view class="box_item" @click="gopath('/pages/activitylist/activitylist?activeType=未成年')">
127 132 <view style="margin-bottom: 20rpx;">
128 133 <image src="/static/new/image 4.png" style="height: 100rpx;" mode="heightFix"></image>
129 134 </view>
... ... @@ -175,7 +180,7 @@
175 180 </view>
176 181 <view class="text">门楼牌备案</view>
177 182 </view>
178   - <!-- <view class="box_item" @click="gopath('/pages/maptask/maptask')">
  183 + <!-- <view class="box_item" @click="gopath('/pages/maptask/maptask')">
179 184 <view style="margin-bottom: 20rpx;">
180 185 <image src="/static/new/image 1.png" style="width: 60%;height: 90rpx;" mode=""></image>
181 186 </view>
... ... @@ -187,7 +192,7 @@
187 192 </view>
188 193 <view class="text">政策文件</view>
189 194 </view>
190   -
  195 +
191 196 </view>
192 197 </view>
193 198  
... ... @@ -227,23 +232,48 @@
227 232 </view>
228 233 </view>
229 234 </view>
230   - <view class="xw" style="padding-top: 20rpx;padding-left: 20rpx;">
231   - <view class="title">
232   - <view class="box1">
233   - <image src="../../static/new/矩形 331.png" mode=""></image>
234   - <span>活动服务</span>
  235 + <view class="xw" style="padding-top: 20rpx;padding-left: 20rpx;padding-bottom: 20rpx;">
  236 + <view class="title">
  237 + <view class="box1">
  238 + <image src="../../static/new/矩形 331.png" mode=""></image>
  239 + <span>最新活动</span>
  240 + </view>
  241 + <view @click="gopath('/pages/activitylist/activitylist')" style="margin-right: 20rpx;font-size: 26rpx;display: flex;align-items: center;">
  242 + 查看更多
  243 + <u-icon name="arrow-right"></u-icon>
  244 + </view>
  245 + </view>
  246 + <view v-if="list.length>0">
  247 + <view class="content1" @click="gopath('/pages/activity/activity?id='+item.id)" v-for="(item,index) in list" :key="index">
  248 + <view class="box_item">
  249 + <view class="box_left">
  250 + <span class="f1">{{item.activityName}}</span>
  251 + <span
  252 + class="f2">{{item.eventStartDate?item.eventStartDate:'-'}}{{item.eventEndDate?'至'+item.eventEndDate:'-'}}</span>
  253 + </view>
  254 + <view class="box_right" v-if="item.activeImage">
  255 + <view class="images">
  256 + <image :src="BASE_URL + item.activeImage[0]"
  257 + style="width: 100%;height: 100%;border-radius: 20rpx;" mode="aspectFill">
  258 + </image>
  259 + </view>
  260 + </view>
235 261 </view>
236 262 </view>
237   - <view class="content" >
  263 + </view>
  264 + <view v-else style="width: 100%;text-align: center;margin-top: 100rpx;font-size: 30rpx;">
  265 + 暂无数据
  266 + </view>
  267 + <!-- <view class="content" >
238 268 <view class="box_item" @click="gopath('/pages/activitylist/activitylist')">
239 269 <view style="margin-bottom: 20rpx;">
240 270 <image src="/static/new/image 4.png" style="width: 60%;height: 90rpx;" mode=""></image>
241 271 </view>
242 272 <view class="text">活动</view>
243 273 </view>
244   - </view>
245   - </view>
246   -
  274 + </view> -->
  275 + </view>
  276 + <view style="height: 50rpx;"></view>
247 277 </view>
248 278 </view>
249 279  
... ... @@ -251,9 +281,16 @@
251 281  
252 282 <script>
253 283 import md5 from "../../common/md5.js";
  284 + import BASE_URL from "@/common/config.js"
254 285 export default {
255 286 data() {
256 287 return {
  288 + from:{
  289 + activeStatus:'展示',
  290 + activeType:''
  291 + },
  292 + BASE_URL,
  293 + list: [],
257 294 nvConfig: {
258 295 title: "数字民政服务平台",
259 296 bgColor: "#ffffff",
... ... @@ -291,12 +328,26 @@
291 328 },
292 329 onLoad() {
293 330 uni.hideTabBar();
  331 + this.getlist()
294 332 },
295 333 methods: {
  334 + getlist() {
  335 + this.API.getactivityInfoSheet(this.from).then(res => {
  336 + console.log(res);
  337 + for (let i = 0; i < res.rows.length; i++) {
  338 + if (res.rows[i].activeImage) {
  339 + res.rows[i].activeImage = res.rows[i].activeImage.split(',')
  340 + }
  341 +
  342 + }
  343 + this.list = res.rows
  344 +
  345 + })
  346 + },
296 347 goyl(e) {
297 348 console.log(e)
298 349 uni.navigateTo({
299   - url: '/pages/webviewyl/webviewyl?url='+e
  350 + url: '/pages/webviewyl/webviewyl?url=' + e
300 351 })
301 352 },
302 353 //
... ... @@ -434,4 +485,50 @@
434 485 </script>
435 486 <style scoped lang="scss">
436 487 @import 'home.scss';
  488 +
  489 + .content1 {
  490 + padding: 20rpx;
  491 + border: 2rpx solid #eee;
  492 + border-radius: 36rpx;
  493 + margin-top: 20rpx;
  494 +
  495 + .box_item {
  496 + background-color: #fff;
  497 + display: flex;
  498 + padding: 20rpx;
  499 + border-radius: 20rpx;
  500 + // height: 200rpx;
  501 +
  502 + .box_left {
  503 + display: flex;
  504 + flex-direction: column;
  505 + justify-content: space-between;
  506 + width: 100%;
  507 + // margin-right: 2%;
  508 +
  509 + .f1 {
  510 + font-size: 30rpx;
  511 + font-weight: 600;
  512 + display: block;
  513 + margin-bottom: 20rpx;
  514 + }
  515 +
  516 + .f2 {
  517 + color: #ababab;
  518 + }
  519 + }
  520 +
  521 + .box_right {
  522 + width: 40%;
  523 +
  524 + .images {
  525 + // background-color: #ababab;
  526 + height: 160rpx;
  527 + width: 100%;
  528 + // background-image: url("http://antis14.sherkxuan.cn/assets/images/a1.png");
  529 + // background-size: 100% 100%;
  530 + }
  531 + }
  532 + }
  533 + }
437 534 </style>
438 535 \ No newline at end of file
... ...