公司演示版e鹿悦游
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.
 
 
 
 
 
CjyTravel/subPageB/store/storedetail/storedetail.vue

226 lines
5.6 KiB

<template>
<view class="">
<swiper :autoplay="autoplay" class="lh-swiper" :duration="duration" :indicator-dots="indicatorDots" :interval="interval">
<swiper-item v-for="(item,index) in pic_list" :key="index">
<image class="slide-image" height="187" :src="item" width="375"></image>
</swiper-item>
</swiper>
<view class="mode_com mdd_jj arc_box news_info shadow_fg">
<view class="arc_t_pd mt_1">
<view class="news_tit">{{info.title}}
</view>
</view>
</view>
<view class="mode_com">
<text class="tit_com">商家地址</text>
<view class="dly_flex_c secdt_tck mt_1" bindtap="showMap">
<view class="sec_name_unit" >
<text class="cot_adr" style="margin-right: 20rpx;">{{info.address}}</text>
</view>
<view class="agn_right sec_whe_unit">
<button class="btn_com btn_daoh" bindtap="showMap" @click="daohang">导航</button>
</view>
</view>
<view class="secdt_tips">
<view bindtap="callPhone" class="secdt_adr dly_flex_c" :data-mobile="info.sub_column1" >
<image class="adr_pic" src="/subPageB/static/img/icon_phe.png"></image>
<text class="w_adr">商家电话</text>
<text class="cot_adr2" @click="callPhone(info.sub_column1)">{{info.sub_column1}}</text><!-- 电话号码上加拨打功能 -->
</view>
</view>
</view>
<view class="swiper-tab-wrap">
<view class="line-show-wrap">
<view class="mode_com mdd_jj">
<text class="tit_com">商家介绍</text>
<view class="nr_cot mt_1">
<u-parse :content="info.content" :loading="loading" @preview="preview" @navigate="navigate" />
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import uParse from '@/uni_modules/uview-ui/components/u-parse/u-parse.vue'
export default {
components: {
uParse
},
data() {
return {
priceSymbol: "",
indicatorDots: false,
autoplay: true,
interval: 3000,
duration: 500,
pic_url: this.$config.ROOTPATH,
pic_list: [],
info: {},
isShow: true,
comments: [],
peoplesnum: {},
param: {
page: 1,
noData: !1,
loading: !1,
finished: !1
},
netType:true
}
},
onLoad: function(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();
this.detailInfo(options.id,options.region);
that.$util.saveOperatorLog(that,"STORE",options.id);
},
methods: {
detailInfo: function(id) {
var data = {
"userkey":this.$param.userkey,
"type":this.$param.restaurantType,
"guid":id,
"lng":this.$param.clng,
"lat":this.$param.clat
}
this.$Request.post(this.$config.getMessgeInfoDetailFormId, data).then(res => {
this.info = res.data;
var pic_list = res.data.imagelist;
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;
})
},
daohang:function(){
// #ifdef H5
if (this.$wechat.isWechat()) {
var mapParam = {
latitude: this.info.lat,
longitude: this.info.lng,
scale: 18,
name: this.info.title,
address: this.info.address
};
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.address+"&mode=walk&src=sjz_uniapp&callnative=1"
// #endif
},
callPhone:function(tel){
uni.makePhoneCall({
phoneNumber:tel
})
},
comment: function(uuid) {
var data = {
pageno: this.param.page,
hotelcode: uuid,
pagesize: 5
};
if (data.sceniccode == '') {
this.isShow = false;
}
this.$Request.post(this.$config.hotelgoodlist, 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(hotelcode) {
var data = {
hotelcode: hotelcode
};
this.$Request.post(this.$config.hoteltotalnumAndPj, data).then(res => {
if(res.data.length > 0){
this.peoplesnum = res.data[0];
}
});
},
viewMore: function(uuid) {
this.param.page += 1;
this.comment(uuid);
},
}
}
</script>
<style>
@import url("/static/css/common.css");
@import url("/subPageB/static/css/scenicdetial.css");
@import url("storedetail.css");
@import '/subPageB/static/css/fooddetial.css';
@import '/subPageB/static/css/destination.css';
@import url('/pages/index/index.css');
</style>