You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1284 lines
40 KiB
1284 lines
40 KiB
<template>
|
|
<view class="scenic_warp" :class="showNotice == false ? 'scenic_warp' : 'scenic_warp active'">
|
|
<!-- 头部模糊部分 -->
|
|
<view class="det_top"><image :src="logo" mode="aspectFill" class="pic_swp_bg"></image></view>
|
|
<!-- 黑色遮罩 -->
|
|
<view class="top_zhe"></view>
|
|
<!-- 头部地址与天气 -->
|
|
<view class="dly_flex mmd_top">
|
|
<!-- 地址切换 -->
|
|
<view class="sec_name_unit agn_left mmd_dl">
|
|
<view class="cur-input">{{ info.sname }}</view>
|
|
<view class="dl_1">
|
|
<text>{{ info.slevel }}</text>
|
|
</view>
|
|
</view>
|
|
<!-- 天气 -->
|
|
<view class="sec_whe_unit agn_right mmd_dl mmd_whe">
|
|
<image :src="weatherImgUrl" class="mmd_icon"></image>
|
|
<text class="dl_2" v-if="weather != null">{{ weather.cond_txt_d }}</text>
|
|
<view class="dl_1" v-if="weather != null">{{ weather.tmp_min }}℃~{{ weather.tmp_max }}℃</view>
|
|
</view>
|
|
</view>
|
|
<!-- 轮播图 -->
|
|
<view class="mmd_scol">
|
|
<view class="uni-margin-wrap">
|
|
<swiper class="swiper_jqu" :indicator-dots="indicatorDots_sce" :autoplay="autoplay_sce" :interval="interval_sce" :duration="duration_sce">
|
|
<swiper-item v-for="(item, index) in pic_list" :key="index">
|
|
<view class=""><image :src="item" mode="aspectFill" class="swiper_tup br_radius"></image></view>
|
|
</swiper-item>
|
|
</swiper>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 功能键 -->
|
|
<view class="mode_com mt_1">
|
|
<view class="inx_ht_warp dly_flex tol_2_warp sec_tol">
|
|
<view class="sec_tol_unit" @tap="qierlingurl(info.url_720)">
|
|
<image class="sec_tol_pic" src="../../../static/images/daol_bg.jpg" mode="scaleToFill"></image>
|
|
<view class="gjz_box">
|
|
<image class="gjz_pic" src="../../../static/images/icn_xnty2.png"></image>
|
|
<text class="ht_text">720全景</text>
|
|
</view>
|
|
</view>
|
|
<view class="sec_tol_unit" @tap="wisdomGuide(info.linkDaoLanId)">
|
|
<image class="sec_tol_pic" src="../../../static/images/qj720_bg.jpg" mode="scaleToFill"></image>
|
|
<view class="gjz_box">
|
|
<image class="gjz_pic" src="../../../static/images/icn_zhdl2.png"></image>
|
|
<text class="ht_text">智慧导览</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view v-if="info.soundpath != null && info.soundpath != ''" class="mode_com mt_1">
|
|
<view class="dly_flex_c sce_voe">
|
|
<view id="audioTest" class="sec_whe_unit">
|
|
<button @tap="play(info.soundpath)" :class="[open < stop ? 'btn_play' : 'btn_play btn_open']">播放</button>
|
|
<button @tap="stops(info.soundpath)" :class="[open > stop ? 'btn_stop ' : 'btn_stop btn_open']">停止</button>
|
|
</view>
|
|
<view class="sec_name_unit">
|
|
<text class="sev_t control_1">{{ info.sname }}音频</text>
|
|
<view class="slider_sec"><slider @change="sliderChange" activeColor="#11C966" block-size="12" :value="audioTime" /></view>
|
|
<view class="mssj_adr">{{ current }}/{{ total }}</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 分割线 -->
|
|
<view class="shadow_fg"></view>
|
|
<!-- 音频 -->
|
|
<view class="mode_com mt_1"></view>
|
|
<!-- 简介 -->
|
|
<view class="mode_com mt_1">
|
|
<text class="tit_com">简介</text>
|
|
<view class="sce_jianj">
|
|
<view class="btn_shouq">
|
|
<text v-if="flag">查看更多</text>
|
|
<text v-if="!flag">收起</text>
|
|
<text @tap="opens()" :class="[zhankai < shouqi ? 'btn_down' : 'btn_up btn_open']">展开</text>
|
|
<text @tap="retract()" :class="[zhankai > shouqi ? 'btn_up' : 'btn_down btn_open']">收起</text>
|
|
</view>
|
|
<view :class="[zhankai > shouqi ? 'lvdh_inf ' : 'lvdh_inf h_define']">
|
|
<!-- class="h_define" 固定高度 -->
|
|
<u-parse :content="info.sdescribe" />
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 景区地址 -->
|
|
<view class="mode_com mt_1">
|
|
<text class="tit_com">景区地址</text>
|
|
<view class="dly_flex_c secdt_tck mt_1">
|
|
<view class="sec_name_unit">
|
|
<text class="cot_adr" style="margin-right: 20rpx;">{{ info.saddress }}</text>
|
|
</view>
|
|
<view class="agn_right sec_whe_unit"><button class="btn_com btn_daoh" @click="daohang">导航</button></view>
|
|
</view>
|
|
<view class="secdt_tips">
|
|
<view class="secdt_adr dly_flex_c" @tap="tel(info.smobile)">
|
|
<image class="adr_pic" style="position: relative; top:6rpx" src="../../../static/images/icon_phe.png"></image>
|
|
<text class="w_adr">景区电话</text>
|
|
<text class="cot_adr2">{{ info.smobile }}</text>
|
|
<!-- 电话号码上加拨打功能 -->
|
|
</view>
|
|
<view class="secdt_adr dly_flex">
|
|
<image class="adr_pic" src="../../../static/images/icon_time.png"></image>
|
|
<text class="w_adr">开放时间</text>
|
|
<text class="cot_adr">{{ info.businesstime }}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 景区门票 -->
|
|
|
|
<view
|
|
v-if="isShowBuy == 'YES' && isShowLink_st == 'YES'"
|
|
:class="[scenicDetail.ticketinfo&&scenicDetail.ticketinfo.length != null && scenicDetail.ticketinfo.length > 0 ? 'mt_1' : 'mt_1 btn_open']"
|
|
class="piao_box"
|
|
>
|
|
<view class="mode_com">
|
|
<text class="tit_com">热卖门票</text>
|
|
|
|
<view class="piao_list">
|
|
<!-- 第一张门票 -->
|
|
<view class="dly_flex_c secdt_tck" v-for="(item, index) in scenicDetail.ticketinfo" :key="index" :item-id="index" :data-year="index">
|
|
<view class="mp_l_box">
|
|
<!-- <image class="mp_pic" :src="pic_url + itemName.images"></image> -->
|
|
<view class="mp_inf">
|
|
<view class="mp_name">{{ item.kindname }}</view>
|
|
<view class="tags">
|
|
<text v-for="(items, indexs) in item.attrs" :key="indexs" :item-id="indexs" :data-year="indexs">{{ items.attrname }}</text>
|
|
</view>
|
|
<!-- 原价 购买须知 -->
|
|
<view class="tips_piao">
|
|
<text class="tips_style txt-lineth">
|
|
¥{{ item.sellprice }}
|
|
<text class="tips_style3">起</text>
|
|
</text>
|
|
<text
|
|
class="tips_style"
|
|
:data-notice="item.newdescription"
|
|
:data-price="item.price"
|
|
:data-sellprice="item.sellprice"
|
|
:data-suitid="item.id"
|
|
:data-isspecial="item.isspecialprice"
|
|
@tap="showNoticeBtn"
|
|
>
|
|
购买须知 >
|
|
</text>
|
|
</view>
|
|
<!-- 联系我们 服务保障 -->
|
|
<view class="third_tips">
|
|
<text class="tips_style" @tap="showContactBtn">
|
|
<image src="https://www.aitto.net/phone/public/images/2019spot/icon_content.png" class="icon_size_5"></image>
|
|
联系我们
|
|
</text>
|
|
<text class="tips_style" @tap="showSeverBtn">
|
|
<image src="https://www.aitto.net/phone/public/images/2019spot/icon_guarantee.png" class="icon_size_5"></image>
|
|
服务保障
|
|
</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="mp_r_box">
|
|
<view style="">
|
|
<text class="fh_rmb">¥</text>
|
|
<text class="price_rmb">{{ item.price }}</text>
|
|
</view>
|
|
<view
|
|
:data-notice="item.newdescription"
|
|
:data-price="item.price"
|
|
:data-sellprice="item.sellprice"
|
|
:data-suitid="item.id"
|
|
:data-isspecial="item.isspecialprice"
|
|
class="btn_buy"
|
|
@tap="showNoticeBtn"
|
|
>
|
|
预定
|
|
</view>
|
|
<!-- 余票 -->
|
|
<view>
|
|
<text class="tips_style2">剩余{{ item.number }}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 热门景区 -->
|
|
<view v-if="guid == 78" class="mode_com mdd_jj">
|
|
<text class="tit_com">热门景点</text>
|
|
</view>
|
|
<view v-if="guid == 78" class="pd_scl_new">
|
|
<view class="mmd_s_hot">
|
|
<!-- <scroll-view class="scroll-view_s" scroll-x="true" @scroll="scroll" scroll-left="">
|
|
<view @click="goToScenicDetail(item.guid)" class="scroll-view-item_s" v-for="(item,index) in scenicList" :key="index"
|
|
:item-id="index" :data-year="index">
|
|
<image class="mmd_jq_pic" :src="item.slogo" mode="aspectFill"></image>
|
|
<text class="mmd_s_txt">{{item.sname}}</text>
|
|
<text class="mmd_s_adr">{{item.sname}}</text>
|
|
</view>
|
|
</scroll-view> -->
|
|
<scroll-view class="scroll-view_s" scroll-x="true" @scroll="scroll" scroll-left="">
|
|
<view class="yx_warp_3" :style="width"><!--width: 210%; 应改为动态计算得出 基数为70% *n-->
|
|
<view class="dly_flex mud_hot_box">
|
|
<!-- 此处循环 -->
|
|
<view class="b_tol_ipt" @click="goToScenicDetail(item.guid)" v-for="(item,index) in scenicList" :key="index">
|
|
<view class="scroll-view-item_s">
|
|
<image class="mmd_jq_pic" :src="rootPaht+item.slogo"
|
|
mode="aspectFill"></image>
|
|
<text class="mmd_s_txt">{{item.sname}}</text>
|
|
<text class="mmd_s_adr">{{item.saddress}}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</scroll-view>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 人流量情况 -->
|
|
<view v-if="isShowFlow" class="mode_com mt_1">
|
|
<text class="tit_com">人流量情况</text>
|
|
<view class="jqdg_liu amt_30">
|
|
<view class=""><image :src="'../../../static/animg/' + flowImg" mode="aspectFill" class="liu_img"></image></view>
|
|
<view :class="flowStyle">实时:{{ flowState }}</view>
|
|
|
|
<!-- <view class="amt_30 liu_echarts"><view class="" style="height: 200rpx;">柱形图</view></view> -->
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 攻略 -->
|
|
<view class="mode_com mt_1">
|
|
<text class="tit_com">景区游玩攻略</text>
|
|
<text v-if="listDatas.length == 0 || listDatas == undefined" class="mssj_adr">暂无数据</text>
|
|
<view class="inx_ht_warp glue_warp secdt_glue" v-for="(itemName, index) in listDatas" :key="index">
|
|
<view class="fod_sp_box" @tap="gotomethod(itemName.guid)">
|
|
<view class="msimg_wrp"><image :src="itemName.logo" class="pic_shop" mode="aspectFill"></image></view>
|
|
<view class="mssj_box">
|
|
<text class="mssj_tit">{{ itemName.mtitle }}</text>
|
|
<text class="mssj_adr">{{ itemName.mcontent }}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 评论 -->
|
|
|
|
<view class="mode_com mt_1">
|
|
<!-- <view class="mode_com mt_1" > -->
|
|
|
|
<view class="lxidh">
|
|
<text class="tit_com">游客评价</text>
|
|
<!-- <view @tap="goToComment()" class="jq_xie"><button class="btn_com btn_daoh">写评论</button></view> -->
|
|
</view>
|
|
<view class="inx_ht_warp">
|
|
<text v-if="!(peoplesnum != null && peoplesnum.pj != null && peoplesnum.pj != '')" class="mssj_adr">暂无数据</text>
|
|
<view class="dly_flex pj_fens_warp" v-if="peoplesnum.pj != null && peoplesnum.pj != ''">
|
|
<view class="half_unit">
|
|
<view class="pj_fens">
|
|
{{ peoplesnum.pj }}
|
|
<text>分</text>
|
|
</view>
|
|
<view><uni-rate :value="peoplesnum.pj" :disabled="true" :size="15" /></view>
|
|
</view>
|
|
<view class="half_unit agn_right">
|
|
<view class="pj_tol">景区总得分</view>
|
|
<view>
|
|
<text class="pjia_time">{{ peoplesnum.totalnum }}人点评</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="pj_warp_lst" v-for="(item, index) in comments" :key="index" style="border-bottom: 3rpx dashed #ddd;">
|
|
<view class="pingj_lst dy_fx">
|
|
<!-- 头像区 -->
|
|
<view>
|
|
<image :src="item.headimgurl" mode="aspectFill" style="width: 80rpx; height: 80rpx; margin-right:15rpx; border-radius: 100rpx;"></image>
|
|
</view>
|
|
<!-- 评价内容区 -->
|
|
<view class="fx_1">
|
|
<view class="pjia_usr_inf dly_flex">
|
|
<!-- 昵称 +时间 -->
|
|
<view class="sec_name_unit">
|
|
<view>
|
|
<view>
|
|
<text class="ykusr_name">{{ item.user_name }}</text>
|
|
<view>
|
|
<text class="pjia_time">{{ item.createtime | dateformat('YYYY-MM-DD') }}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<!-- 分值 + 星星 -->
|
|
<view class="sec_whe_unit agn_right">
|
|
<text class="yk_daf">{{ item.grade }}</text>
|
|
<view class="yk_star" style="margin-top:26rpx"><uni-rate :value="item.grade" :disabled="true" :size="14" /></view>
|
|
</view>
|
|
</view>
|
|
<!-- 评论文字 -->
|
|
<view class="lvdh_inf pjia_cot word_2">{{ item.evaluate }}</view>
|
|
<!-- 图片区 只显示三张图片 -->
|
|
<view class="dy_fx fx_warp_w jqu_pl_area">
|
|
<view v-if="indexs < 3" v-for="(items,indexs) in item.imgList" :key="indexs" class="jq_parea_unt"><image :src="rootPaht+items" mode="aspectFill"></image></view>
|
|
</view>
|
|
<!-- 回复区 只显示一条回复内容 -->
|
|
<view v-if="item.interactList.length > 0" class="jq_parea_hfu amb_30">
|
|
<view class="rcd_box2">
|
|
<view v-if="indexs == 0" class="word_2 fu_jq_1" v-for="(items,indexs) in item.interactList" :key="indexs">
|
|
<text>系统管理员</text>
|
|
{{items.content}}
|
|
</view>
|
|
<view class="t_col_2">2020/05/12 21:03:52</view>
|
|
<view @tap="goToCommentDetail(item.guid)" class="fu_t_3">查看全部>></view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view v-if="isShow" @tap="viewMore()" class="btn_link_m amt_30"><text class="link_m_txt">查看更多+</text></view>
|
|
<view v-if="!isShow" @tap="viewMore()" class="btn_link_m amt_30"><text class="link_m_txt">暂无更多数据</text></view>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 联系我们 弹框 -->
|
|
<view class="dialog-container" v-if="showContact" @touchmove.stop.prevent="preventHandler">
|
|
<view class="dialog-mask" @tap="closeContactBtn"></view>
|
|
<view class="dialog-info J-contact">
|
|
<view class="contact-box">
|
|
<!-- <button class='closeBtn' @tap="closeContactBtn"></button> -->
|
|
<view class="contact-top">
|
|
<view class="time">客服服务时间:9:00~21:00</view>
|
|
<view class="exp">河北旅游网客服竭诚为您服务!</view>
|
|
</view>
|
|
<!-- <view class='contact-code'>
|
|
<button open-type="contact" bindcontact="handleContact">在线客服</button>
|
|
</view> -->
|
|
<view class="contact-tel">
|
|
<view class="tel-box">
|
|
<view class="tel" @tap="getMobile">
|
|
<text>客服手机</text>
|
|
<text class="samll">点击拨打电话</text>
|
|
</view>
|
|
</view>
|
|
<view class="tel-box">
|
|
<view class="tel" @tap="getTel">
|
|
<text>客服座机</text>
|
|
<text class="samll">点击拨打电话</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 服务保障 弹框 -->
|
|
<view class="dialog-container" v-if="showSever">
|
|
<view class="dialog-info J-sever">
|
|
<view class="wd_bax_scrol">
|
|
<button class="closeBtn" @tap="closeSeverBtn"></button>
|
|
<view class="sever-tit">
|
|
服务保障
|
|
<text>多重保障,让您购票无忧</text>
|
|
</view>
|
|
<view class="line"></view>
|
|
<view class="sever-con">
|
|
<view class="title">如实描述</view>
|
|
<view class="conP">河北旅游网保证提供的产品信息真实有效,如出现页面描述与实际情况不相符,提供有效凭证后,平台将承担不低于订单金额的30%补偿。</view>
|
|
<view class="line" style="margin-left:40rpx;"></view>
|
|
<view class="title">入园保障</view>
|
|
<view class="conP">
|
|
成功预订景区门票并按产品规则使用,出游当日无法按照原订单入园,联系河北旅游网客服后10分钟内未解决问题,客户可在景区购买当日门市票入园,平台将赔付差价。
|
|
</view>
|
|
<view class="line" style="margin-left:40rpx;"></view>
|
|
<view class="title">特殊退订保障:</view>
|
|
<view class="conP">为了分担河北旅游网客户因自身不能预期和控制的特殊原因退订产生的损失,平台设立“特殊原因退订保障”。</view>
|
|
<view class="conP">
|
|
如果客户遇到“航班延误或取消”、“不可抗力(自然灾害—政府官方机构发布橙色或红色预警级别、政府行为或社会异常事件—政府官方机构发布不宜或禁止前往预警)”、“怀孕”、“身故”、“住院”、“骨折”的情况,发生时间晚于预订时间的,,提供材料并审核通过后,河北旅游网将退还客户支付的费用。
|
|
</view>
|
|
<view class="conP">【具体材料说明】</view>
|
|
<view class="conP">航班问题:航班延误说明或其他可以证明的材料;</view>
|
|
<view class="conP">
|
|
怀孕及骨折:出具三级甲等医院病历诊断书、包含“不宜出行”字样的病假单和收费证明;住院:出具三级甲等医院病历诊断书、住院证明(住院期间与出行期间重叠)和收费证明;身故:死亡证明。
|
|
</view>
|
|
<view class="noCon"></view>
|
|
</view>
|
|
|
|
<view class="sever-btn"><button class="readBtn" @tap="closeSeverBtn">已经阅读</button></view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 购买须知 弹框 -->
|
|
<view class="dialog-container" v-if="showNotice">
|
|
<view class="dialog-mask" @tap="closeNoticeBtn"></view>
|
|
<view class="dialog-info J-notice">
|
|
<button class="closeBtn" @tap="closeNoticeBtn"></button>
|
|
<view class="notice-con">
|
|
<view class="con-box gmai_box"><u-parse :content="notice" :loading="loading" @preview="preview" @navigate="navigate" /></view>
|
|
</view>
|
|
<view class="notice-pay">
|
|
<view class="pay-box">
|
|
<view class="price">
|
|
<text class="name">单价:</text>
|
|
<text class="sym">¥</text>
|
|
<text class="cur">{{ ticketPrice }}</text>
|
|
<text class="txt">起</text>
|
|
<text class="old">¥{{ ticketSellprice }}</text>
|
|
</view>
|
|
<view class="payBtn" @tap="paybtn">立即预定</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import uniRate from '@/components/uni-rate/uni-rate2.vue';
|
|
import uParse from '@/components/gaoyia-parse/parse.vue';
|
|
import aes from "@/common/aes.js";
|
|
export default {
|
|
components: {
|
|
uniRate,
|
|
uParse
|
|
},
|
|
onLoad(options) {
|
|
var that = this;
|
|
this.$util.getNetworkType(
|
|
function(res){
|
|
if(res.networkType === 'none'){
|
|
uni.showToast({
|
|
title:that.$param.netMsg,
|
|
icon:"none",
|
|
duration:2000
|
|
})
|
|
that.netType = false;
|
|
}
|
|
},function(){
|
|
uni.showToast({
|
|
title:that.$param.netMsg,
|
|
icon:"none",
|
|
duration:2000
|
|
})
|
|
that.netType = false;
|
|
}
|
|
)
|
|
if(!that.netType){
|
|
return;
|
|
}
|
|
|
|
this.$util.hideLoadingByTime();
|
|
// #ifdef H5
|
|
const oMeta = document.createElement('meta');
|
|
oMeta.httpEquiv = "Cache-Control";
|
|
oMeta.content = "no-cache, no-store, must-revalidate"
|
|
document.getElementsByTagName('head')[0].appendChild(oMeta);
|
|
// #endif
|
|
|
|
|
|
// this.requestLocation();
|
|
that.$util.saveOperatorLog(that, 'SCENIC', options.guid);
|
|
//正常进入详情
|
|
if (options.unionid == undefined || options.unionid == null || options.unionid == '') {
|
|
uni.showLoading({
|
|
title: '加载中',
|
|
mask: true
|
|
});
|
|
this.guid = options.guid;
|
|
this.detailInfo(options.guid);
|
|
this.getIsShow();
|
|
if (this.$wechat.isWechat()) {
|
|
this.isZb = false;
|
|
}
|
|
} else {
|
|
//授权重定向回来的页面
|
|
this.guid = options.guid;
|
|
this.detailInfo(options.guid);
|
|
uni.setStorageSync('oauthTime', new Date().getTime());
|
|
uni.setStorageSync('nickname', aes.aesMinEncrypt(options.nickname));
|
|
uni.setStorageSync('openid', aes.aesMinEncrypt(options.openid));
|
|
uni.setStorageSync('unionid', aes.aesMinEncrypt(options.unionid));
|
|
uni.setStorageSync('headimgurl', aes.aesMinEncrypt(options.headimgurl));
|
|
this.suitid = options.suitid;
|
|
this.$util.getUserInfo(that, options.unionid, function() {
|
|
that.paybtn();
|
|
});
|
|
}
|
|
this.getScenicListGuids();
|
|
},
|
|
onUnload() {
|
|
this.stops(this.info.soundpath);
|
|
},
|
|
onShow() {
|
|
this.param.page = 1;
|
|
this.getComment();
|
|
if (this.isToDingDanType) {
|
|
this.goDingDan();
|
|
}
|
|
},
|
|
onReady() {
|
|
// setTimeout(function() {
|
|
// uni.hideLoading();
|
|
// }, 500);
|
|
// // #ifdef MP-WEIXIN
|
|
// const oMeta = document.createElement('meta');
|
|
// oMeta.httpEquiv = "Cache-Control";
|
|
// oMeta.content = "no-cache, no-store, must-revalidate"
|
|
// document.getElementsByTagName('head')[0].appendChild(oMeta);
|
|
// // #endif
|
|
},
|
|
data() {
|
|
return {
|
|
guid:"",
|
|
indicatorDots_sce: true,
|
|
zhankai: 0,
|
|
shouqi: 1,
|
|
open: 0,
|
|
stop: 1,
|
|
autoplay_sce: true,
|
|
interval_sce: 4000,
|
|
duration_sce: 500,
|
|
pic_url: this.$config.ROOTPATH,
|
|
rootPaht: this.$config.ROOTPATH,
|
|
comments: [],
|
|
pic_list: [],
|
|
info: {},
|
|
weather: {},
|
|
listDatas: [],
|
|
tickeTlist: [],
|
|
param: {
|
|
page: 1,
|
|
noData: !1,
|
|
loading: !1,
|
|
finished: !1
|
|
},
|
|
peoplesnum: {},
|
|
logo: '',
|
|
soundlength: 0,
|
|
AudioContext: uni.createInnerAudioContext(),
|
|
isShow: true,
|
|
weatherImgUrl: '',
|
|
flag: true,
|
|
total: '00:00',
|
|
current: '--',
|
|
seektime: 0,
|
|
audioTime: 0,
|
|
isZb: true,
|
|
isShowBuy: 'YES',
|
|
|
|
// // 门票
|
|
showNotice: false,
|
|
markers: [],
|
|
notice: '',
|
|
ticketSellprice: '',
|
|
ticketPrice: '',
|
|
suitid: '',
|
|
isspecial: '',
|
|
isToDingDanType: false,
|
|
tapDate: '',
|
|
showSever: false,
|
|
score: '', //评论分数 数据初始化
|
|
showContact: false,
|
|
sid: '',
|
|
scenicDetail: {},
|
|
isShowLink_st: 'YES',
|
|
isShowFlow: false,
|
|
flowImg: '',
|
|
flowState: '',
|
|
flowStyle: 'agn_center liu_txt amt_30',
|
|
netType:true,
|
|
scenicList:[]
|
|
};
|
|
},
|
|
methods: {
|
|
requestLocation: function() {
|
|
var that = this;
|
|
this.$util.bindGpsObj(that);
|
|
this.$util.getLocation(
|
|
function(res) {
|
|
if (that.$wechat.isWechat()) {
|
|
that.$param.clat = res.latitude;
|
|
that.$param.clng = res.longitude;
|
|
uni.hideLoading();
|
|
}
|
|
},
|
|
function() {
|
|
console.log('location error---');
|
|
}
|
|
);
|
|
},
|
|
callGpsSuccess: function(lat, lng) {},
|
|
callGpsFail: function() {},
|
|
preventHandler() {
|
|
return;
|
|
},
|
|
|
|
getIsShow: function() {
|
|
this.$Request.post(this.$config.getYbsjSysParam, {}).then(res => {
|
|
var d = res.data;
|
|
this.isShowBuy = d.is_show_buy;
|
|
});
|
|
},
|
|
getScenicListGuids:function(){
|
|
var data = {
|
|
guids: this.$param.hotScenicGuid
|
|
};
|
|
this.$Request.post(this.$config.getScenicListByGuids, data).then(res => {
|
|
console.log(res)
|
|
this.scenicList = res.data;
|
|
});
|
|
},
|
|
detailInfo: function(guid) {
|
|
/* var that = this;
|
|
var data = {
|
|
key: this.$param.userkey+'_scenic_' + guid
|
|
};
|
|
this.$Request.post(this.$config.getRedisData, data).then(res => {
|
|
console.log("Redis景区")
|
|
console.log(res);
|
|
if(res.status == 200){
|
|
//所有的数据
|
|
var initData = res.data;
|
|
}else{ */
|
|
this.getScDetail(guid);
|
|
/* }
|
|
}); */
|
|
},
|
|
getScDetail: function(guid) {
|
|
var data = {
|
|
guid: guid,
|
|
userkey: this.$param.userkey
|
|
};
|
|
console.log(data,'0-0-0-0')
|
|
this.$Request.post(this.$config.scenicDetial, data).then(res => {
|
|
this.info = res.data;
|
|
this.tickeTlist = res.data.ticketlist;
|
|
this.logo = this.$config.ROOTPATH + res.data.slogo;
|
|
var pic_list = res.data.imgList;
|
|
if (pic_list != null) {
|
|
for (var i = 0; i < pic_list.length; i++) {
|
|
pic_list[i] = '' + this.pic_url + pic_list[i];
|
|
}
|
|
}
|
|
this.pic_list = pic_list;
|
|
if (res.data.controlInfo.cyjcScenicUuid != '' && res.data.controlInfo.cyjcScenicUuid != null) {
|
|
//this.comment(res.data.controlInfo.cyjcScenicUuid);
|
|
if (res.data.controlInfo.isPeopleFlow == 'YES') {
|
|
this.isShowFlow = true;
|
|
this.getScenicVolume(res.data.controlInfo.cyjcScenicUuid);
|
|
}
|
|
} else {
|
|
this.isShow = false;
|
|
}
|
|
this.getDuration(this.info.soundpath, res.data.sfunc);
|
|
this.getWeather(res.data.region);
|
|
this.getMethod(res.data.region);
|
|
uni.hideLoading();
|
|
});
|
|
},
|
|
getWeather: function(region) {
|
|
var data = {
|
|
region: region
|
|
};
|
|
this.$Request.post(this.$config.getWeather, data).then(res => {
|
|
this.weather = res.data;
|
|
if (this.weather.cond_txt_d.indexOf('雷') != -1) {
|
|
this.weatherImgUrl = '../../../static/images/whe_lei.png';
|
|
} else if (this.weather.cond_txt_d.indexOf('雨') != -1) {
|
|
this.weatherImgUrl = '../../../static/images/whe_yu.png';
|
|
} else if (this.weather.cond_txt_d.indexOf('雾') != -1) {
|
|
this.weatherImgUrl = '../../../static/images/whe_wu.png';
|
|
} else if (this.weather.cond_txt_d.indexOf('阴') != -1) {
|
|
this.weatherImgUrl = '../../../static/images/whe_yin.png';
|
|
} else if (this.weather.cond_txt_d.indexOf('雪') != -1) {
|
|
this.weatherImgUrl = '../../../static/images/whe_xu.png';
|
|
} else if (this.weather.cond_txt_d.indexOf('晴') != -1) {
|
|
this.weatherImgUrl = '../../../static/images/whe_sun.png';
|
|
} else {
|
|
this.weatherImgUrl = '../../../static/images/whe_cloudy.png';
|
|
}
|
|
});
|
|
},
|
|
getComment: function() {
|
|
var that = this;
|
|
var data = {
|
|
dataid: this.guid,
|
|
type: 'SCENIC',
|
|
userkey: this.$param.userkey,
|
|
pageno: this.param.page,
|
|
pagesize: 5
|
|
};
|
|
this.$Request.post(this.$config.getCommentFromMobile, data).then(res => {
|
|
var commentList = res.data.commentList;
|
|
this.peoplesnum = res.data.commentCountMap;
|
|
if (commentList == null || commentList.length <= 0) {
|
|
that.isShow = false;
|
|
} else {
|
|
var dataListLen = commentList.length;
|
|
if (dataListLen > 0) {
|
|
for (var i = 0; i < dataListLen; i++) {
|
|
var date = that.getMyDate(commentList[i].createtime);
|
|
commentList[i].createtime = date;
|
|
that.comments.push(commentList[i]);
|
|
}
|
|
that.isShow = true;
|
|
}
|
|
if (that.param.page == 1) {
|
|
that.comments = commentList;
|
|
}
|
|
}
|
|
});
|
|
},
|
|
getMethod: function(region) {
|
|
var requestData = {
|
|
pageno: '1',
|
|
pageSize: '5',
|
|
sort: '2',
|
|
region: region,
|
|
type: this.$param.methodType,
|
|
userkey: this.$param.userkey,
|
|
scenicid: this.guid
|
|
};
|
|
this.$Request.post(this.$config.getMessageInfoFormFilter, requestData).then(res => {
|
|
var listDatas = this.listDatas,
|
|
dataListLen = res.data.length;
|
|
for (var i = 0; i < dataListLen; i++) {
|
|
var item = {
|
|
guid: res.data[i].guid,
|
|
logo: this.rootPaht + res.data[i].logo,
|
|
mtitle: res.data[i].title,
|
|
sendtime: res.data[i].sendtime,
|
|
browsenum: res.data[i].browsenum,
|
|
mcontent: this.delHtmlTag(res.data[i].content)
|
|
};
|
|
this.listDatas.push(item);
|
|
}
|
|
});
|
|
},
|
|
opens: function() {
|
|
(this.zhankai = 1), (this.shouqi = 0), (this.flag = false);
|
|
},
|
|
retract: function() {
|
|
(this.zhankai = 0), (this.shouqi = 1), (this.flag = true);
|
|
},
|
|
// comment: function(uuid) {
|
|
// var data = {
|
|
// pageno: this.param.page,
|
|
// sceniccode: uuid,
|
|
// pagesize: 5
|
|
// };
|
|
// if (data.sceniccode == '') {
|
|
// this.isShow = false;
|
|
// }
|
|
// this.$Request.post(this.$config.scenicgoodlist, data).then(res => {
|
|
// if (res.data == null || res.data.length <= 0) {
|
|
// this.isShow = false;
|
|
// } else {
|
|
// var dataListLen = res.data.length;
|
|
// if (
|
|
// (dataListLen == data.pagesize
|
|
// ? (this.param.page += 1)
|
|
// : (this.param.page = 1 && 0 == dataListLen ? (this.param.noData = true) : (this.param.finished = true)),
|
|
// (this.param.loading = false),
|
|
// dataListLen > 0)
|
|
// ) {
|
|
// for (var i = 0; i < dataListLen; i++) {
|
|
// var item = {
|
|
// criticism_user: res.data[i].criticism_user,
|
|
// criticism_content: res.data[i].criticism_content,
|
|
// criticism_time: res.data[i].criticism_time,
|
|
// grade: res.data[i].grade
|
|
// };
|
|
// if (item.grade.toString().indexOf('.') == -1) {
|
|
// item.grade = item.grade + '.0';
|
|
// }
|
|
// this.comments.push(item);
|
|
// }
|
|
// }
|
|
// }
|
|
// });
|
|
// this.peopleNum(uuid);
|
|
// },
|
|
/* peopleNum: function(sceniccode) {
|
|
var data = {
|
|
sceniccode: sceniccode
|
|
};
|
|
this.$Request.post(this.$config.totalnumAndPj, data).then(res => {
|
|
if (res.data.length > 0) {
|
|
this.peoplesnum = res.data[0];
|
|
}
|
|
});
|
|
}, */
|
|
qierlingurl: function(url) {
|
|
if (url.length > 10 && url != '') {
|
|
// if(url.indexOf("https") != -1){
|
|
var r = this.$base64.encode(url);
|
|
uni.navigateTo({
|
|
url: '/pages/scenic/scenicdetial/url720/url720?url=' + r
|
|
});
|
|
/* }else{
|
|
window.location.href = url;
|
|
} */
|
|
} else {
|
|
uni.showModal({
|
|
title: '提示',
|
|
content: '敬请期待',
|
|
success: function(res) {
|
|
if (res.confirm) {
|
|
console.log('用户点击确定');
|
|
} else if (res.cancel) {
|
|
console.log('用户点击取消');
|
|
}
|
|
}
|
|
});
|
|
}
|
|
// window.location.href =url;
|
|
},
|
|
wisdomGuide: function(linkDaoLanId) {
|
|
if (linkDaoLanId != null && linkDaoLanId != '') {
|
|
uni.navigateTo({
|
|
url: '/pages/daolan/daolan?scenicId=' + linkDaoLanId
|
|
});
|
|
} else {
|
|
uni.showModal({
|
|
title: '提示',
|
|
content: '敬请期待',
|
|
success: function(res) {
|
|
if (res.confirm) {
|
|
console.log('用户点击确定');
|
|
} else if (res.cancel) {
|
|
console.log('用户点击取消');
|
|
}
|
|
}
|
|
});
|
|
}
|
|
// window.location.href =this.$config.wisdomGuide+'?scenicId='+guid;
|
|
},
|
|
/* gotoTicket: function() {
|
|
if (this.info.chanjian.link_st == "YES" && this.info.chanjian.st_scenic_id != 0 &&
|
|
this.info.chanjian.st_scenic_id != "") {
|
|
uni.navigateTo({
|
|
url: '/pages/pay/scenicdetail?sid=' + this.info.chanjian.st_scenic_id
|
|
});
|
|
} else {
|
|
uni.showModal({
|
|
title: '提示',
|
|
content: '暂未开通订票服务',
|
|
success: function(res) {
|
|
if (res.confirm) {
|
|
console.log('用户点击确定');
|
|
} else if (res.cancel) {
|
|
console.log('用户点击取消');
|
|
}
|
|
}
|
|
});
|
|
}
|
|
}, */
|
|
liveBeauty: function(guid) {
|
|
if (this.info.controlInfo.isLive == 'YES') {
|
|
Android.gotoDetial('LIVEVIDEO', guid + '');
|
|
} else {
|
|
uni.showModal({
|
|
title: '提示',
|
|
content: '暂无直播',
|
|
success: function(res) {
|
|
if (res.confirm) {
|
|
console.log('用户点击确定');
|
|
} else if (res.cancel) {
|
|
console.log('用户点击取消');
|
|
}
|
|
}
|
|
});
|
|
}
|
|
},
|
|
goToScenicDetail: function(guid) {
|
|
//Android.gotoDetial("SCENIC", guid + "");
|
|
uni.navigateTo({
|
|
url: '/pages/scenic/scenicdetial/scenicdetial?guid=' + guid
|
|
});
|
|
},
|
|
play: function(soundpath) {
|
|
if (soundpath == '' || soundpath == null) {
|
|
this.total = '--';
|
|
uni.showModal({
|
|
title: '提示',
|
|
content: '本景区暂无音频',
|
|
showCancel: false,
|
|
success: function(res) {
|
|
if (res.confirm) {
|
|
console.log('用户点击确定');
|
|
} else if (res.cancel) {
|
|
console.log('用户点击取消');
|
|
}
|
|
}
|
|
});
|
|
} else {
|
|
var that = this;
|
|
this.open = 1;
|
|
this.stop = 0;
|
|
this.AudioContext.autoplay = true;
|
|
this.AudioContext.src = this.$config.ROOTPATH + soundpath;
|
|
this.AudioContext.play();
|
|
var i = 1;
|
|
this.AudioContext.onTimeUpdate(() => {
|
|
/* console.log('进度更新了总进度为:'+parseInt(that.AudioContext.duration)+'当前进度为:'+parseInt(that.AudioContext.currentTime));
|
|
*/
|
|
setTimeout(() => {
|
|
this.getParseInt(that.AudioContext.currentTime);
|
|
}, 1000);
|
|
});
|
|
if (this.seektime > 0 && this.seektime != null && this.seektime != '') {
|
|
this.AudioContext.seek(this.seektime);
|
|
}
|
|
}
|
|
},
|
|
getParseInt: function(current) {
|
|
/* console.log('总:'+parseInt(this.AudioContext.duration)+'当前:'+this.current); */
|
|
if (parseInt(current) == parseInt(this.AudioContext.duration)) {
|
|
this.stops(this.info.soundpath);
|
|
this.audioTime = 0;
|
|
this.AudioContext.stop();
|
|
} else {
|
|
this.audioTime = parseInt((current / this.AudioContext.duration) * 100);
|
|
//this.current = parseInt(current);
|
|
this.seektime = parseInt(current);
|
|
var b = this.$util.secsToStr(parseInt(current));
|
|
this.current = b;
|
|
}
|
|
|
|
/* this.current=parseInt(this.AudioContext.duration);*/
|
|
},
|
|
getDuration: function(soundpath, dur) {
|
|
if (soundpath == '' || soundpath == null) {
|
|
this.total = '--';
|
|
} else {
|
|
this.total = this.$util.secsToStr(Number(dur));
|
|
this.AudioContext.autoplay = false;
|
|
this.AudioContext.src = this.$config.ROOTPATH + soundpath;
|
|
/* this.AudioContext.duration=Number(dur); */
|
|
/* this.getTimeOut(); */
|
|
}
|
|
},
|
|
getTimeOut: function() {
|
|
setTimeout(() => {
|
|
/* console.log(this.AudioContext.duration); */
|
|
var total = parseInt(this.AudioContext.duration);
|
|
if (isNaN(total)) {
|
|
this.total = '--';
|
|
this.current = '--';
|
|
this.getTimeOut();
|
|
} else {
|
|
var a = this.$util.secsToStr(total);
|
|
/* console.log(a); */
|
|
this.total = a;
|
|
}
|
|
}, 1000);
|
|
},
|
|
sliderChange: function(e) {
|
|
var a = parseInt(((e.detail.value - 1) / 100) * this.AudioContext.duration);
|
|
this.AudioContext.seek(a);
|
|
},
|
|
stops: function(soundpath) {
|
|
this.open = 0;
|
|
this.stop = 1;
|
|
this.AudioContext.pause();
|
|
},
|
|
gotomethod: function(guid) {
|
|
uni.navigateTo({
|
|
url: `/pages/method/methoddetail/methoddetail?guid=` + guid + ``
|
|
});
|
|
},
|
|
delHtmlTag: function(str) {
|
|
if (str != undefined && str != null) {
|
|
var temp = str.replace(/<\/?.+?>/g, '');
|
|
var result = temp.replace(/ /g, '');
|
|
return result.replace(/ /gi, '');
|
|
}
|
|
},
|
|
daohang() {
|
|
// #ifdef H5
|
|
|
|
if (this.$wechat.isWechat()) {
|
|
var mapParam = {
|
|
latitude: this.info.lat,
|
|
longitude: this.info.lng,
|
|
scale: 18,
|
|
name: this.info.sname,
|
|
address: this.info.saddress
|
|
};
|
|
this.$util.openLocation(mapParam);
|
|
return;
|
|
}
|
|
window.location.href =
|
|
'https://uri.amap.com/navigation?from=' +
|
|
this.$param.clng +
|
|
',' +
|
|
this.$param.clat +
|
|
',我的位置&to=' +
|
|
this.info.lng +
|
|
',' +
|
|
this.info.lat +
|
|
',' +
|
|
this.info.saddress +
|
|
'&mode=walk&src=sjz_uniapp&callnative=1';
|
|
// #endif
|
|
},
|
|
viewMore: function() {
|
|
//console.log(this.param.page);
|
|
this.param.page++;
|
|
/* this.comment( this.info.controlInfo.cyjcScenicUuid); */
|
|
//this.comment(uuid);
|
|
this.getComment();
|
|
},
|
|
tel: function(tels) {
|
|
uni.makePhoneCall({
|
|
phoneNumber: tels //仅为示例
|
|
});
|
|
},
|
|
getScenicDetail: function(sid) {
|
|
var api_token = this.$MD5.hexMD5('APIgetSpotInfolvyou');
|
|
var sendData = {
|
|
api_token: api_token,
|
|
productaid: sid
|
|
};
|
|
var data = {
|
|
data: JSON.stringify(sendData),
|
|
url: this.$config.getSpotInfo
|
|
};
|
|
this.$Request.post(this.$config.getAittoData, data).then(res => {
|
|
this.scenicDetail = res.data;
|
|
/* var item = {
|
|
latitude: this.scenicDetail.lat,
|
|
longitude: this.scenicDetail.lng,
|
|
}
|
|
this.markers.push(item);
|
|
this.score=res.data.comment.score / res.data.comment.num;
|
|
this.latitude=res.data.lat; //要去的纬度-地址
|
|
this.longitude=res.data.lng; //要去的经度-地址
|
|
this.address= res.data.address;
|
|
this.title= res.data.title;
|
|
this.noticeData=res.data.ticketinfo;
|
|
this.couponData=res.data.discountInfo ? res.data.discountInfo : [];
|
|
this.showCoupon=res.data.userDiscount ? true : false; */
|
|
});
|
|
},
|
|
callBackMethod: function() {
|
|
this.paybtn();
|
|
uni.hideLoading();
|
|
},
|
|
// 门票详情
|
|
paybtn: function() {
|
|
var that = this;
|
|
if (aes.aesDecrypt(uni.getStorageSync('unionid')) == undefined || aes.aesDecrypt(uni.getStorageSync('unionid')) == null || aes.aesDecrypt(uni.getStorageSync('unionid')) == '') {
|
|
if (this.$wechat.isWechat()) {
|
|
//weixin 调用授权
|
|
this.$util.getUser(that, 'scenicdetail', that.suitid, that.guid);
|
|
} else {
|
|
switch (uni.getSystemInfoSync().platform) {
|
|
case 'android':
|
|
//Android
|
|
//安卓授权
|
|
var that = this;
|
|
this.$util.bindGpsObj(that);
|
|
Android.gotoDetial('WxUserInfo', '');
|
|
break;
|
|
case 'ios':
|
|
//ios授权
|
|
break;
|
|
}
|
|
}
|
|
return;
|
|
} else {
|
|
if (this.$util.isBlack(aes.aesDecrypt(uni.getStorageSync('user_token')))) {
|
|
this.$util.getUserInfo(that, aes.aesDecrypt(uni.getStorageSync('unionid')), function() {});
|
|
}
|
|
}
|
|
that.showNotice = false;
|
|
var api_token = that.$MD5.hexMD5('APIgetSpotSuitVilTimelvyou');
|
|
var sendData = {
|
|
api_token: api_token,
|
|
suitid: that.suitid //套餐id
|
|
};
|
|
var data = {
|
|
data: JSON.stringify(sendData),
|
|
url: that.$config.getSpotSuitVilTime
|
|
};
|
|
that.$Request.post(that.$config.getAittoData, data).then(re => {
|
|
if (re.code == 0 && re.msg == 'Success') {
|
|
uni.navigateTo({
|
|
url: '/pages/pay/calendar/index?date2=' + re.data[0].maxday
|
|
});
|
|
}
|
|
});
|
|
},
|
|
showNoticeBtn: function(e) {
|
|
this.showNotice = true;
|
|
var view = e.currentTarget.dataset;
|
|
//this.notice = view.notice;
|
|
var regex = /style="[^=>]*"([(\s+\w+=)|>])/g;
|
|
this.notice = view.notice.replace(regex, '$1'); //使用正则去掉富文本中的所有style样式
|
|
(this.ticketSellprice = view.sellprice), (this.ticketPrice = view.price), (this.suitid = view.suitid), (this.isspecial = view.isspecial);
|
|
},
|
|
closeNoticeBtn: function() {
|
|
this.showNotice = false;
|
|
},
|
|
showSeverBtn: function() {
|
|
this.showSever = true;
|
|
},
|
|
closeSeverBtn: function() {
|
|
this.showSever = false;
|
|
},
|
|
showContactBtn: function() {
|
|
this.showContact = true;
|
|
},
|
|
closeContactBtn: function() {
|
|
this.showContact = false;
|
|
},
|
|
/**
|
|
* 拨打客服电话 函数
|
|
*/
|
|
getMobile: function() {
|
|
uni.makePhoneCall({
|
|
phoneNumber: '18630172332'
|
|
});
|
|
},
|
|
getTel: function() {
|
|
uni.makePhoneCall({
|
|
phoneNumber: '0311-87885822'
|
|
});
|
|
},
|
|
goDingDan: function() {
|
|
uni.showLoading({
|
|
mask: true,
|
|
title: '加载中'
|
|
});
|
|
let productid = this.scenicDetail.id;
|
|
let suitid = this.suitid;
|
|
let dismid = 0;
|
|
let substation = 0;
|
|
var sendData = {
|
|
productid: productid,
|
|
day: this.tapDate,
|
|
suitid: suitid,
|
|
dismid: dismid,
|
|
substation: substation
|
|
};
|
|
this.isToDingDanType = false;
|
|
uni.navigateTo({
|
|
url: '/pages/pay/book/book?sendData=' + encodeURIComponent(JSON.stringify(sendData))
|
|
});
|
|
},
|
|
/* goToComment: function() {
|
|
if (this.$util.isBlack(uni.getStorageSync('unionid'))) {
|
|
uni.switchTab({
|
|
url: '/pages/personcenter/personcenter'
|
|
});
|
|
} else {
|
|
uni.navigateTo({
|
|
url: '/pages/myComment/form/form?guid=' + this.guid + '&commentType=SCENIC&cname=' + this.info.sname
|
|
});
|
|
}
|
|
}, */
|
|
getScenicVolume: function(uuid) {
|
|
var data = {
|
|
scenicUUID: uuid
|
|
};
|
|
this.$Request.post(this.$config.getScenicVolume, data).then(res => {
|
|
if (res.data != null && res.data.length > 0) {
|
|
this.flowStyle = 'agn_center liu_txt amt_30';
|
|
var flowData = res.data[0];
|
|
var currentcount = flowData.currentcount;
|
|
var maxload = flowData.maxload;
|
|
currentcount = parseFloat(currentcount);
|
|
maxload = parseFloat(maxload);
|
|
var percentage = maxload <= 0 ? 0 : Math.round((currentcount / maxload) * 10000) / 100.0;
|
|
if (percentage == 0) {
|
|
this.flowStyle = 'agn_center liu_txt amt_30 liu_green';
|
|
this.flowImg = 'liu_1.png';
|
|
this.flowState = '人流量舒适';
|
|
} else if (percentage < 21) {
|
|
this.flowStyle = 'agn_center liu_txt amt_30 liu_green';
|
|
this.flowImg = 'liu_1.png';
|
|
this.flowState = '人流量舒适';
|
|
} else if (percentage > 20 && percentage < 41) {
|
|
this.flowStyle = 'agn_center liu_txt amt_30 liu_green';
|
|
this.flowImg = 'liu_2.png';
|
|
this.flowState = '人流量舒适';
|
|
} else if (percentage > 40 && percentage < 61) {
|
|
this.flowImg = 'liu_3.png';
|
|
this.flowState = '人流量适中';
|
|
} else if (percentage > 60 && percentage < 81) {
|
|
this.flowStyle = 'agn_center liu_txt amt_30 liu_red';
|
|
this.flowImg = 'liu_4.png';
|
|
this.flowState = '人流量适中';
|
|
} else if (percentage > 80) {
|
|
this.flowStyle = 'agn_center liu_txt amt_30 liu_red';
|
|
this.flowImg = 'liu_5.png';
|
|
this.flowState = '人流量拥挤';
|
|
}
|
|
} else {
|
|
this.flowStyle = 'agn_center liu_txt amt_30 liu_hui';
|
|
this.flowImg = 'liu_hui.png';
|
|
this.flowState = '暂无最新数据';
|
|
}
|
|
});
|
|
},
|
|
getMyDate: function(str) {
|
|
var oDate = new Date(str),
|
|
oYear = oDate.getFullYear(),
|
|
oMonth = oDate.getMonth() + 1,
|
|
oDay = oDate.getDate(),
|
|
oHour = oDate.getHours(),
|
|
oMin = oDate.getMinutes(),
|
|
oSen = oDate.getSeconds(),
|
|
oTime = oYear + '-' + this.addZero(oMonth) + '-' + this.addZero(oDay) + ' ' + this.addZero(oHour) + ':' + this.addZero(oMin) + ':' + this.addZero(oSen);
|
|
return oTime;
|
|
},
|
|
//补零操作
|
|
addZero: function(num) {
|
|
if (parseInt(num) < 10) {
|
|
num = '0' + num;
|
|
}
|
|
return num;
|
|
},
|
|
goToCommentDetail:function(guid){
|
|
uni.navigateTo({
|
|
url: "/pages/myComment/detail/detail?guid=" + guid+"&type=visitor"
|
|
})
|
|
}
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<style>
|
|
@import '../../../static/css/common.css';
|
|
@import '../../food/fooddetial/fooddetial.css';
|
|
@import '../../destination/destination.css';
|
|
@import url('../../index/index.css');
|
|
@import url('../../pay/scenicdetail.css');
|
|
@import url('scenicdetial.css');
|
|
|
|
page {
|
|
background: none;
|
|
}
|
|
|
|
.liu_hui {
|
|
color: #cbcbcb !important;
|
|
}
|
|
.liu_green {
|
|
color: #07b800 !important;
|
|
}
|
|
.liu_red {
|
|
color: #ef0a0a !important;
|
|
}
|
|
|
|
.slider_sec {
|
|
width: 450rpx;
|
|
height: 100%;
|
|
}
|
|
|
|
.slider_sec slider {
|
|
width: 95%;
|
|
margin-left: 2%;
|
|
margin-right: 0;
|
|
margin-top: 10rpx;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
/* 景区门票 */
|
|
.active {
|
|
overflow: hidden;
|
|
/* height: 100vh !important; */
|
|
}
|
|
|
|
.dialog-mask {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
z-index: 999;
|
|
width: 100%;
|
|
height: 100%;
|
|
background: rgba(0, 0, 0, 0.4);
|
|
}
|
|
</style>
|
|
|