rosehan 2 years ago
parent 4f08ffad58
commit 2d3072234e
  1. 10
      common/httpRequest.js
  2. 217
      sunPackIndex/cate/destination.vue
  3. 30
      sunPackIndex/scenic/subscribe/yuyue/yue_time_js.vue

@ -25,7 +25,7 @@ module.exports = {
return info;
},
post: function(url, data, header) {
console.log(data)
for(var key in data){
data[key] = aes.aesMinEncrypt(data[key]);
}
@ -51,7 +51,7 @@ module.exports = {
})
})
},
get: function(url, data, header) {
get: function(url, data, header) {
header = header || "application/x-www-form-urlencoded";
// url = this.config("ROOTPATH")+url;
return new Promise((succ, error) => {
@ -60,9 +60,11 @@ module.exports = {
data: data,
method: "GET",
header: {
"content-type": header
"content-type": header,
"Cookie": 'ybsj-session=83BB981A09914477FF6063CAE6401A83',
},
success: function(result) {
success: function(result) {
console.log(result.data)
succ.call(self, result.data)
},
fail: function(e) {

@ -22,25 +22,25 @@
-->
</view>
<!-- 天气 -->
<!-- 天气
<view class="half_unit agn_right mmd_dl mmd_whe">
<image :src="weatherImgUrl" class="mmd_icon"></image>
<text class="dl_2">{{weather}}</text>
<view class="dl_1">{{tmpmin}}~{{tmpmax}}</view>
</view>
</view>-->
</view>
<!-- 轮播图 -->
<view class="mmd_scol">
<view class="uni-margin-wrap">
<swiper class="swiper_jqu" :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval" :duration="duration">
<swiper class="swiper_jqu" :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval"
:duration="duration">
<swiper-item v-for="(item,index) in imgList" :key="index" :item-id="index" :data-year="index">
<!-- <view class="swiper-item" :style="{ background: item.imgurl ? 'url(' + item.imgurl + ') center no-repeat / cover':''}"></view> -->
<view>
<image :src="item.imgurl" mode="aspectFill" class="swiper_tup br_radius"></image>
</view>
</swiper-item>
</swiper>
</view>
@ -54,7 +54,7 @@
<image class="tol_icn" src="../../static/images/menu_jq.png"></image>
<text class="tol_txt">赏美景</text>
</view>
<view @click="goToPage('hotevent')" class="scroll-view-item_H">
<image class="tol_icn" src="../../static/images/menu_hd.png"></image>
<text class="tol_txt">活动</text>
@ -73,7 +73,8 @@
<view @tap="changeShowType()" class="btn_shouq">{{showType}}
<text class="btn_down_zhank">
<image :src="showTypeUrl" class="btn_zhank"></image>
</text></view>
</text>
</view>
<view :class="showType == '展开'?'fod_det_inf h_define':'fod_det_inf'">
<!-- class="h_define" 固定高度 -->
<!-- 文本内容 -->
@ -84,14 +85,15 @@
<!-- 地理气候指南 -->
<view class="mode_com mdd_jj">
<text class="tit_com">地理气候</text>
<view class="sce_jianj_dest">
<!-- <view class="btn_shouq">查看更多
<text class="btn_down_zhank"> <image src="../../static/images/icn_down_g.png" class="btn_zhank"></image> </text></view> -->
<view @tap="changeDiLiShowType()" class="btn_shouq">{{diLiShowType}}
<text class="btn_down_zhank">
<image :src="diLiShowTypeUrl" class="btn_zhank"></image>
</text></view>
</text>
</view>
<view :class="diLiShowType == '展开'?'fod_det_inf h_define':'fod_det_inf'">
<!-- class="h_define" 固定高度 -->
<!-- 文本内容 -->
@ -102,18 +104,20 @@
<!-- 生态自然 -->
<view class="mode_com mdd_jj">
<text class="tit_com">生态自然</text>
<view class="sce_jianj_dest">
<!-- <view class="btn_shouq">查看更多
<text class="btn_down_zhank"> <image src="../../static/images/icn_down_g.png" class="btn_zhank"></image> </text></view> -->
<view @tap="changeZiRanShowType()" class="btn_shouq">{{ziRanShowType}}
<text class="btn_down_zhank">
<image :src="ziRanShowTypeUrl" class="btn_zhank"></image>
</text></view>
</text>
</view>
<view :class="ziRanShowType == '展开'?'fod_det_inf h_define':'fod_det_inf'">
<!-- class="h_define" 固定高度 -->
<!-- 文本内容 -->
<u-parse :content="msgDetail.regioncontent" :loading="loading" @preview="preview" @navigate="navigate" />
<u-parse :content="msgDetail.regioncontent" :loading="loading" @preview="preview"
@navigate="navigate" />
</view>
</view>
</view>
@ -121,8 +125,8 @@
<!-- 热门景区 -->
<view class="mode_com mdd_jj">
<text class="tit_com">热门景区</text>
</view>
<view class="pd_scl_new">
</view>
<view 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"
@ -136,16 +140,17 @@
<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="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="item.slogo"
mode="aspectFill"></image>
<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.saddress}}</text>
</view>
</view>
<view class="b_tol_ipt" v-if="scenicList == null || scenicList.length <= 0">
<view v-if="scenicList != null && scenicList.length <= 0" style="text-align: left;color: gray;">暂无热门景区信息</view>
<view v-if="scenicList != null && scenicList.length <= 0"
style="text-align: left;color: gray;">暂无热门景区信息</view>
</view>
</view>
</view>
@ -174,21 +179,22 @@
<!-- -->
<view class="tab_mmd">
<!-- direction:设置全屏时视频的方向 有效值为 0正常竖向, 90屏幕逆时针90度, -90屏幕顺时针90度 -->
<video class="swiper_tup" :show-fullscreen-btn='false' :poster="item.imgurl" :direction="direction" :src="item.videourl"></video>
<video class="swiper_tup" :show-fullscreen-btn='false' :poster="item.imgurl" :direction="direction"
:src="item.videourl"></video>
<view class="mssj_tit control_1">{{item.title}}</view>
</view>
</view>
</view>
<!-- 视频播放结束 -->
<!-- 玩转正定 -->
<!-- 精品线路 -->
<!-- 攻略 -->
</view>
</template>
@ -233,44 +239,45 @@
weatherImgUrl: "",
direction: "-90", // 0:, 90:90, -90:90
videoList: [],
showType:"展开",
diLiShowType:"展开",
ziRanShowType:"展开",
showTypeUrl:"/static/images/icn_down_g.png",
diLiShowTypeUrl:"/static/images/icn_down_g.png",
ziRanShowTypeUrl:"/static/images/icn_down_g.png",
width:"width:70%",
cityName:this.$param.cityName,
netType:true
showType: "展开",
diLiShowType: "展开",
ziRanShowType: "展开",
showTypeUrl: "/static/images/icn_down_g.png",
diLiShowTypeUrl: "/static/images/icn_down_g.png",
ziRanShowTypeUrl: "/static/images/icn_down_g.png",
width: "width:70%",
cityName: this.$param.cityName,
netType: true
}
},
onLoad: function(option) {
var that = this;
this.$util.getNetworkType(
function(res){
if(res.networkType === 'none'){
function(res) {
if (res.networkType === 'none') {
uni.showToast({
title:that.$param.netMsg,
icon:"none",
duration:2000
title: that.$param.netMsg,
icon: "none",
duration: 2000
})
that.netType = false;
}
},function(){
},
function() {
uni.showToast({
title:that.$param.netMsg,
icon:"none",
duration:2000
title: that.$param.netMsg,
icon: "none",
duration: 2000
})
that.netType = false;
}
)
if(!that.netType){
if (!that.netType) {
return;
}
this.$util.hideLoadingByTime();
this.getParam(function(guid,region){
that.$util.saveOperatorLog(that,"MDD",guid);
this.getParam(function(guid, region) {
that.$util.saveOperatorLog(that, "MDD", guid);
uni.showLoading({
title: "加载中",
mask: true
@ -280,10 +287,10 @@
that.getRedisData();
that.getWeather();
that.getMsgList(guid);
},function(){
}, function() {
uni.showToast({
icon:"none",
title:"系统异常"
icon: "none",
title: "系统异常"
})
})
},
@ -301,22 +308,22 @@
}
},
methods: {
getParam:function(successCallback,errorCallback){
getParam: function(successCallback, errorCallback) {
var that = this;
var url = this.$config.getMessageInfoFormFilter;
var data = {
type: this.$param.mddType,
userkey:this.$param.userkey,
pageSize:1,
userkey: this.$param.userkey,
pageSize: 1,
sort: "2"
};
this.$Request.post(url, data).then(res => {
var flag = that.$util.isSuccess(res);
if(!flag){
if (!flag) {
return;
}
var result = res.data[0];
successCallback(result.guid,result.bm);
successCallback(result.guid, result.bm);
})
},
bindPickerChange: function(e) {
@ -331,9 +338,9 @@
}
this.guid = data.guid
this.region = data.bm;
this.getRedisData(); //
this.getRedisData(); //
this.getMsgList(data.guid); //
this.getWeather();
this.getWeather();
// this.getVideoUrl(data.bm);
},
bindDateChange: function(e) {
@ -342,9 +349,9 @@
bindTimeChange: function(e) {
this.time = e.target.value
},
getRedisData:function(){
getRedisData: function() {
var data = {
"key": this.$param.userkey + "_mdd_"+this.region
"key": this.$param.userkey + "_mdd_" + this.region
}
this.$Request.post(this.$config.getRedisData, data).then(res => {
if (res.status == 200) {
@ -363,27 +370,27 @@
}
//
var hotScenicList = initData.hotScenic;
this.width = "width:"+ (hotScenicList.length * 70) + "%";
this.width = "width:" + (hotScenicList.length * 70) + "%";
for (let i = 0; i < hotScenicList.length; i++) {
hotScenicList[i].slogo = this.$config.ROOTPATH + hotScenicList[i].slogo;
}
this.scenicList = hotScenicList;
//
this.videoList = [];
var videoList = initData.videoList;
for (var i = 0; i < videoList.length; i++) {
var item = {
imgurl:this.$config.ROOTPATH + videoList[i].logo, //
videourl:this.$config.ROOTPATH + videoList[i].videopath,
guid:videoList[i].guid,
title:videoList[i].title
imgurl: this.$config.ROOTPATH + videoList[i].logo, //
videourl: this.$config.ROOTPATH + videoList[i].videopath,
guid: videoList[i].guid,
title: videoList[i].title
}
this.videoList.push(item);
}
this.methodList = methodList;
uni.hideLoading();
}else{
} else {
this.getMsgDetail(this.guid);
this.getHotScenic();
this.getFineLine();
@ -399,7 +406,7 @@
}
this.$Request.post(this.$config.getWeather, data).then(res => {
var flag = that.$util.isSuccess(res);
if(!flag){
if (!flag) {
return;
}
this.weather = res.data.cond_txt_d;
@ -476,18 +483,18 @@
}
});
},
getMddList: function(){
getMddList: function() {
var that = this;
var url = this.$config.getMessageInfoFormFilter;
var data = {
type: this.$param.mddType,
userkey:this.$param.userkey,
pageSize:100,
userkey: this.$param.userkey,
pageSize: 100,
sort: "2"
};
this.$Request.post(url, data).then(res => {
var flag = that.$util.isSuccess(res);
if(!flag){
if (!flag) {
return;
}
this.mudidiList = res.data;
@ -502,12 +509,12 @@
getMsgDetail: function(guid) {
var that = this;
var data = {
"userkey":this.$param.userkey,
"type":this.$param.mddType,
"guid":guid
"userkey": this.$param.userkey,
"type": this.$param.mddType,
"guid": guid
}
this.$Request.post(this.$config.getMessgeInfoDetailFormId, data).then(res => {
if(!that.$util.isSuccess(res)){
if (!that.$util.isSuccess(res)) {
return;
}
this.msgDetail = res.data;
@ -526,7 +533,7 @@
var that = this;
var url = this.$config.getScenicListFormFilter;
var data = {
userkey:this.$param.userkey,
userkey: this.$param.userkey,
sort: "2",
pageno: "1",
pageSize: "4",
@ -534,11 +541,11 @@
};
this.$Request.post(url, data).then(res => {
var flag = that.$util.isSuccess(res);
if(!flag){
if (!flag) {
return;
}
var data = res.data;
this.width = "width:"+ (data.length * 70) + "%";
this.width = "width:" + (data.length * 70) + "%";
for (let i = 0; i < data.length; i++) {
data[i].slogo = this.$config.ROOTPATH + data[i].slogo;
}
@ -590,13 +597,13 @@
var url = this.$config.getMessageInfoFormFilter;
var data = {
type: this.$param.methodType,
userkey:this.$param.userkey,
pageSize:6,
region:this.region
userkey: this.$param.userkey,
pageSize: 6,
region: this.region
};
this.$Request.post(url, data).then(res => {
var flag = that.$util.isSuccess(res);
if(!flag){
if (!flag) {
return;
}
var data = res.data;
@ -607,68 +614,68 @@
// uni.hideLoading();
})
},
getVideoUrl: function(qx) {
var that = this;
var url = this.$config.getMessageInfoFormFilter;
var data = {
type: this.$param.videoType,
userkey:this.$param.userkey,
pageSize:1,
region:qx,
sort:"2"
userkey: this.$param.userkey,
pageSize: 1,
region: qx,
sort: "2"
};
this.$Request.post(url, data).then(res => {
var flag = that.$util.isSuccess(res);
if(!flag){
if (!flag) {
return;
}
this.videoList = [];
var d = res.data;
for (var i = 0; i < d.length; i++) {
var item = {
imgurl:this.$config.ROOTPATH + d[i].logo, //
videourl:this.$config.ROOTPATH + d[i].videopath,
guid:d[i].guid,
title:d[i].title
imgurl: this.$config.ROOTPATH + d[i].logo, //
videourl: this.$config.ROOTPATH + d[i].videopath,
guid: d[i].guid,
title: d[i].title
}
this.videoList.push(item);
}
// uni.hideLoading();
})
},
changeShowType:function(){
if(this.showType == "展开"){
changeShowType: function() {
if (this.showType == "展开") {
this.showType = "收起";
this.showTypeUrl = "../../static/images/icn_up_g.png";
}else if(this.showType == "收起"){
} else if (this.showType == "收起") {
this.showType = "展开";
this.showTypeUrl = "/static/images/icn_down_g.png";
}
},
changeDiLiShowType:function(){
if(this.diLiShowType == "展开"){
changeDiLiShowType: function() {
if (this.diLiShowType == "展开") {
this.diLiShowType = "收起";
this.diLiShowTypeUrl = "/static/images/icn_up_g.png";
}else if(this.diLiShowType == "收起"){
} else if (this.diLiShowType == "收起") {
this.diLiShowType = "展开";
this.diLiShowTypeUrl = "/static/images/icn_down_g.png";
}
},
changeZiRanShowType:function(){
if(this.ziRanShowType == "展开"){
changeZiRanShowType: function() {
if (this.ziRanShowType == "展开") {
this.ziRanShowType = "收起";
this.ziRanShowTypeUrl = "/static/images/icn_up_g.png";
}else if(this.ziRanShowType == "收起"){
} else if (this.ziRanShowType == "收起") {
this.ziRanShowType = "展开";
this.ziRanShowTypeUrl = "/static/images/icn_down_g.png";
}
}
}
}
@ -708,4 +715,4 @@
padding-right: 1.5em;
font-size: 35upx; */
}
</style>
</style>

@ -67,15 +67,15 @@
scenicDetail:{},
changeIndex : 0,
scenicId: null,
timeDataList:[]
timeDataList:[],
};
},
onLoad(options) {
// uni.setStorageSync("userid",64)
var scenicId = options.guid;
var scenicId = 80;
this.scenicId = scenicId;
this.getDetail(scenicId);
this.getTimeList();
this.getDetail(scenicId);
this.getTimeList(scenicId);
},
methods: {
getDetail: function(scenicId){
@ -89,9 +89,27 @@
data.slogo = this.$config.ROOTPATH + data.slogo;
this.scenicDetail = data;
}
});
});
},
getTimeList: function(){
getTimeList: function(scenicId){
let date1 = new Date()
let time1=date1.getFullYear()+"-"+((date1.getMonth()+1).length == 2?(date1.getMonth()+1):"0"+(date1.getMonth()+1))+"-"+(date1.getDate().length == 2?date1.getDate():"0"+date1.getDate())
let data = {
date:time1,
scenicId: scenicId,
}
this.$Request.get(this.$config.appointmentList, data).then(res => {
if (res.status == 200) {
console.log('asdfasdfadfadsf')
}
});
var list = [];
for(var i = 0; i < 7; i++){
var map = this.getTime(i);

Loading…
Cancel
Save