|
|
@@ -6,9 +6,18 @@
|
|
|
<swiper-item v-for="item in carouselList" :key="item.id"><image :src="item.pic"></image></swiper-item>
|
|
|
</swiper>
|
|
|
</view>
|
|
|
-
|
|
|
+ <view class="bk-box">
|
|
|
+ <view class="box-item" v-for="item in navList" @click="navItemTo(item.cid)">
|
|
|
+ <view class="item-logo">
|
|
|
+ <image :src="item.logo" mode=""></image>
|
|
|
+ </view>
|
|
|
+ <view class="item-tit">
|
|
|
+ {{item.name}}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
<!-- 分类 -->
|
|
|
- <view class="cate-section flex">
|
|
|
+ <!-- <view class="cate-section flex">
|
|
|
<view class="cate-item flex" @click="navTo('/pages/applic/love')">
|
|
|
<view class="img-wrapper flex">
|
|
|
<image src="../../static/icon/icon1.png" mode="" class="img1"></image>
|
|
|
@@ -33,21 +42,6 @@
|
|
|
</view>
|
|
|
<view class="item-title">志愿者登记</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
-
|
|
|
- <!-- 爱心红会 -->
|
|
|
- <!-- <view class="red-box">
|
|
|
- <top-title :title="'爱心红会'"></top-title>
|
|
|
- <view class="red-nav flex">
|
|
|
- <view class="left-nav" @click="navTo('/pages/donate/donate')"></view>
|
|
|
- <view class="right-nav flex">
|
|
|
- <view class="right-top-nav" @click="navTo('/pages/donate/idonate?type=1')"></view>
|
|
|
- <view class="right-bottom-nav flex">
|
|
|
- <view class="left-item" @click="navTo('/pages/applic/love')"></view>
|
|
|
- <view class="right-item" @click="navTo('/pages/applic/science')"></view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
</view> -->
|
|
|
<!-- 红会科普 -->
|
|
|
<view class="science" @click="navTo('/pages/applic/science')">
|
|
|
@@ -160,7 +154,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { loadIndexs, bannerlist, getListAED, getDistance ,getListMechanism} from '@/api/index.js';
|
|
|
+import { loadIndexs, bannerlist, getListAED, getDistance ,getListMechanism ,getArticleCateList} from '@/api/index.js';
|
|
|
import { saveUrl, interceptor } from '@/utils/loginUtils.js';
|
|
|
import { mapState, mapMutations } from 'vuex';
|
|
|
import { userinfo } from '@/api/user.js';
|
|
|
@@ -177,6 +171,68 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ navList: [
|
|
|
+ {
|
|
|
+ logo: '../../static/icon/index1.png',
|
|
|
+ name: '党建引领',
|
|
|
+ cid: 3,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ logo: '../../static/icon/index2.png',
|
|
|
+ name: '认识红会',
|
|
|
+ cid: 4,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ logo: '../../static/icon/index3.png',
|
|
|
+ name: '应急救援',
|
|
|
+ cid: 5,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ logo: '../../static/icon/index4.png',
|
|
|
+ name: '应急救护',
|
|
|
+ cid: 6,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ logo: '../../static/icon/index5.png',
|
|
|
+ name: '人道救助',
|
|
|
+ cid: 7,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ logo: '../../static/icon/index6.png',
|
|
|
+ name: '器官捐献',
|
|
|
+ cid: 8,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ logo: '../../static/icon/index7.png',
|
|
|
+ name: '造血干细胞捐献',
|
|
|
+ cid: 9,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ logo: '../../static/icon/index8.png',
|
|
|
+ name: '无偿献血',
|
|
|
+ cid: 10,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ logo: '../../static/icon/index9.png',
|
|
|
+ name: '红十字会员',
|
|
|
+ cid: 11,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ logo: '../../static/icon/index10.png',
|
|
|
+ name: '志愿服务',
|
|
|
+ cid: 12,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ logo: '../../static/icon/index11.png',
|
|
|
+ name: '博爱家园',
|
|
|
+ cid: 13,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ logo: '',
|
|
|
+ name: '',
|
|
|
+ cid: 0,
|
|
|
+ }
|
|
|
+ ],
|
|
|
carouselList: [], //轮播
|
|
|
science: [], //文章列表
|
|
|
page: 1,
|
|
|
@@ -239,16 +295,9 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
onLoad() {
|
|
|
- // uni.showModal({
|
|
|
- // content: '请选择您当前位置',
|
|
|
- // success: res => {
|
|
|
- // if (res.confirm) {
|
|
|
- // this.chooseAddress()
|
|
|
- // }
|
|
|
- // }
|
|
|
- // })
|
|
|
saveUrl();
|
|
|
let obj = this;
|
|
|
+ // obj.getNavList()
|
|
|
try {
|
|
|
let locationAddress;
|
|
|
// #ifdef H5
|
|
|
@@ -364,6 +413,21 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
...mapMutations('user', ['setUserInfo']),
|
|
|
+ //获取导航列表
|
|
|
+ navItemTo(cid) {
|
|
|
+ let url = ''
|
|
|
+ if(cid == 0) {
|
|
|
+ return
|
|
|
+ }else if(cid !== 6) {
|
|
|
+ url = '/pages/article/list?cid=' + cid
|
|
|
+ }else {
|
|
|
+ url = '/pages/article/lists?cid=' + cid
|
|
|
+ }
|
|
|
+ uni.navigateTo({
|
|
|
+ url: url
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
tocontribution() {
|
|
|
uni.navigateTo({
|
|
|
// url: "/pages/applic/contribution"
|
|
|
@@ -455,16 +519,6 @@ export default {
|
|
|
obj.latitude2 = obj.marker[i].latitude;
|
|
|
obj.longitude2 = obj.marker[i].longitude;
|
|
|
obj.address = obj.marker[i].address;
|
|
|
- // uni.showModal({
|
|
|
- // title: '坐标',
|
|
|
- // content: JSON.stringify(obj.marker[i]),
|
|
|
- // success() {
|
|
|
- // uni.showModal({
|
|
|
- // title: '成功',
|
|
|
- // content: obj.marker[i].latitude
|
|
|
- // })
|
|
|
- // }
|
|
|
- // })
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
@@ -993,4 +1047,40 @@ a {
|
|
|
height: 192rpx;
|
|
|
}
|
|
|
}
|
|
|
+.bk-box {
|
|
|
+ width: 750rpx;
|
|
|
+ height: 779rpx;
|
|
|
+ background-color: #eee;
|
|
|
+ margin-top: 10rpx;
|
|
|
+ // background-color: red;
|
|
|
+ display: flex;
|
|
|
+ justify-content: flex-start;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ .box-item {
|
|
|
+ width: 33%;
|
|
|
+ height: 194rpx;
|
|
|
+ margin: 1rpx;
|
|
|
+ display: flex;
|
|
|
+ background-color: #fff;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ .item-logo {
|
|
|
+ width: 93rpx;
|
|
|
+ height: 93rpx;
|
|
|
+
|
|
|
+ margin-bottom: 8rpx;
|
|
|
+ image {
|
|
|
+
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ background-color: #fff;
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .item-tit {
|
|
|
+ font-size: 30rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|