institutiondetail.vue
3.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<template>
<view>
<pyh-nv ref="nv" :config="nvConfig"></pyh-nv>
<view class="listBox" :style="{'padding-top':(pageTop+'px')}">
<view class="content">
<!-- banner,标题 -->
<view class="banner-title">
<view>
<view class="navTab">
<scroll-view :scroll-x="true" style="white-space: nowrap;">
<view class="tabBox">
<view class="tabList" v-for="item in info.image">
<image :src="Baseapi + item"></image>
</view>
</view>
</scroll-view>
</view>
</view>
<!-- 标题 -->
<view class="goods-title">
<view class="big">{{info.name}}</view>
<view class="goods-small">
<view class="goods-small-left">
<view class="goods-small-left-list"><image src="../../static/institution1.png"></image>{{info.address}}</view>
<view class="goods-small-left-list"><image src="../../static/institution2.png"></image>{{info.operatingHours}}</view>
</view>
<view class="goods-small-right" @click="open">
<view><image src="../../static/phone2.png"></image></view>
<view>电话</view>
</view>
</view>
<view v-html="info.introduction"></view>
</view>
</view>
<!-- 商品介绍 -->
<view class="products-introduction" ref="products">
<view class="content-box">
<image v-for="item in info.image" :src="Baseapi + item"></image>
</view>
</view>
<!-- 底部 -->
<view class="page-footer">
<view class="footer-buy" style="display: flex;justify-content: center;">
<view class="cart-add" @click="open">
<view><image src="../../static/btn2.png"></image></view>
<view class="cart-add-text"><image src="../../static/phone.png"></image><text>联系电话</text></view>
</view>
<!-- <view class="buy-at">
<image src="../../static/btn1.png"></image>
<text>立即购买</text>
</view> -->
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
Baseapi:"http://zhmz.rsxmzj.cn:8536",
nvConfig:{
title:"殡葬服务机构详情",
bgColor:"#ffffff",
color:"#000000",
fixedAssist:{
hide:true,
},
},
swiperList: [
{
id: 0,
type: 'image',
url: '/static/img/01.jpg'
},
{
id: 1,
type: 'image',
url: '/static/img/01.jpg'
},
],
info:{},
contentshow:false,
contentNumber: 10086,
};
},
onPageScroll(e) {this.$refs.nv.pageScroll(e)},
computed:{
pageTop(){return parseInt(88*uni.getSystemInfoSync().windowWidth/750) + uni.getSystemInfoSync().statusBarHeight}
},
onLoad(e) {
this.info = JSON.parse(e.info)
console.log(this.info.name);
console.log("上一个页面的值",e,this.info);
},
methods: {
open(){
console.log("123",this.contentshow);
var that = this
uni.showModal({
title: '联系电话',
content: '拨打电话:' + that.contentNumber,
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
}
};
</script>
<style scoped lang="scss">
@import 'institutiondetail.scss';
</style>