123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188 |
- <template>
- <view class="page">
- <view class="wd">
- <view class="qw">28°</view>
- <view class="xs">
- <view>中雨 东风2级</view>
- <view>空气优23</view>
- </view>
- </view>
- <view class="ms">
- <text class="icon"></text>
- <text>谢通门县欢迎您</text>
- <navigator url="/pages/index/index" class="jb">旧版首页</navigator>
- </view>
- <view class="top"><image :src="aboutUs.bgImg1 ? ip + aboutUs.bgImg1 : '../../static/bj.jpg'"></image></view>
- <view class="flex menu">
- <view class="f" @click="tab('/pages/travel/index')">
- <view class="icon" style="background-color: #0f0b51;"></view>
- <view class="title">景区介绍</view>
- </view>
- <view class="f" @click="navigate('/pages/travel/introduction')">
- <view class="icon" style="background-color: #2cc937;"></view>
- <view class="title">旅游攻略</view>
- </view>
- <view class="f" @click="navigate('/pages/government/activity')">
- <view class="icon" style="background-color: #e23e33;"></view>
- <view class="title">热门活动</view>
- </view>
- <view class="f" @click="navigate('/pages/government/index')">
- <view class="icon" style="background-color: #e23e33;"></view>
- <view class="title">党政服务</view>
- </view>
- </view>
- <!-- <view class="flex" style="margin-top: 10px;">
- <view class="f a1"><image @click="tab('/pages/travel/index')" src="../../static/img11.jpg" style="height: 170px;width: 93%;"></image></view>
- <view class="f a1">
- <image @click="tab('/pages/shop/hotel/index')" src="../../static/aa2.jpg" style="height: 80px;width: 100%;"></image>
- <image @click="navigate('/pages/travel/introduction')" src="../../static/aa3.jpg" style="height: 80px;width: 100%;margin-top: 5px;position: relative;"></image>
- </view>
- </view> -->
- <view class="it">
- <view class="v_title">
- <image src="../../static/lo.png" class="lo" mode="widthFix"></image>
- <view class="hd">热门景区</view>
- <view class="more" @click="tab('/pages/travel/index')">
- 更多
- <text class="arrow icon"></text>
- </view>
- <view class="clear"></view>
- </view>
- <view class="jq_item" v-for="(item, index) in hot_list" :key="index" @click="detail(item)">
- <image :src="ip + item.showPictures" class="bmg"></image>
- <view class="tit omit">{{ item.title }}</view>
- <view class="desc omit">{{ item.briefContent }}</view>
- </view>
- </view>
- <view class="it">
- <view class="v_title">
- <image src="../../static/lo.png" class="lo" mode="widthFix"></image>
- <view class="hd">攻略指南</view>
- <view class="more" @click="navigate('/pages/travel/introduction')">
- 更多
- <text class="arrow icon"></text>
- </view>
- <view class="clear"></view>
- </view>
- <view class="jq_item flex" v-for="(item, index) in zn_list" :key="index" @click="detail(item)">
- <view class="f" style="height: 200px;border-radius: 5px;"><image :src="ip + item.showPictures" class="img"></image></view>
- <view class="f" style="padding: 10px;">
- <view class="tit omit">{{ item.title }}</view>
- <view class="str-summery">{{ item.briefContent }}</view>
- <view class="lx">浏览</view>
- </view>
- </view>
- </view>
- <u-back-top :scroll-top="scrollTop"></u-back-top>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- ip: this.$http.urls.ip,
- scrollTop: 0,
- hot_list: [],
- zn_list: [],
- aboutUs: {}
- };
- },
- onPageScroll(e) {
- this.scrollTop = e.scrollTop;
- },
- onLoad(e) {
- this.getData();
- //uni.setStorageSync("user",{"searchValue":null,"createBy":null,"createTime":null,"updateBy":null,"updateTime":null,"remark":null,"params":{},"memberId":2,"name":"wx_5259072147","mobile":"13097850972","email":null,"registerTime":"2021-09-30","lastLoginTime":"2021-11-04","lastLoginIp":"127.0.0.1","loginNum":2,"unionid":null,"openid":"oHYRz5QirxH4-tmZWP0D84HDCv1Q","nickName":"西域男孩","avatarUrl":"https://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTJCNYUsTpmibmbGAJa6icVT1RZ5uNmusrtibIBgFu112ibe4f0jEvicZlWf0DkeS3l0YlnYkq178W2h8fw/132","gender":"1","province":"广西","city":"玉林","country":"中国","language":"zh_CN","lastLat":null,"lastLng":null,"isShop":2,"apiToken":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyIiwiaWF0IjoxNjM2NjE4Mjc2LCJleHAiOjE2MzcyMjMwNzZ9.c4reK2ce_SfKOaWuaK8CdWv2kLQl4xl92-HLfWuvLySaRNp1oBrW51KToxggbvOcFgRS0bBpl7UCSOMKIkff5A"})
- },
- methods: {
- getData() {
- this.$http.request({
- url: this.$http.urls.home,
- success: res => {
- this.hot_list = res.data.data.hot_list;
- this.zn_list = res.data.data.zn_list;
- this.aboutUs = res.data.data.aboutUs;
- uni.setStorageSync('aboutUs', this.aboutUs);
- }
- });
- },
- tab(url) {
- console.log('zxx');
- uni.switchTab({
- url: url
- });
- },
- //详情
- detail(item) {
- uni.navigateTo({ url: '/pages/travel/detail?id=' + item.contentId });
- },
- navigate(url) {
- uni.navigateTo({ url: url });
- }
- },
- //下拉刷新
- onPullDownRefresh() {
- setTimeout(() => {
- uni.stopPullDownRefresh();
- this.getData();
- }, 1000);
- }
- };
- </script>
- <style lang="scss">
- .page {
- padding: 10px;
- overflow-x: hidden;
- }
- .wd {
- margin-top: 28px;
- z-index: 111111;
- .qw {
- font-size: 25px;
- float: left;
- font-weight: bold;
- }
- .xs {
- margin-left: 45px;
- width: 100%;
- margin-top: 6px;
- font-size: 13px;
- }
- }
- .ms {
- font-size: 22px;
- font-weight: bold;
- margin-bottom: 15px;
- margin-top: 10px;
- .jb {
- float: right;
- font-size: 13px;
- font-weight: normal;
- margin-top: 6px;
- }
- }
- .top {
- image {
- width: 100%;
- height: 150px;
- border-radius: 5px;
- box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
- }
- }
- .a1 {
- padding: 5px 0px 5px 0px;
- image {
- border-radius: 5px;
- }
- }
- .it {
- margin-top: 15px;
- }
- .v_title {
- .hd {
- left: 25px;
- }
- }
- </style>
|