<template>
	<view class="content">
		<view class="img-div">
			<img class="img" v-for="url in images" :src="url" />
			<view>
				重庆润天健康管理有限公司，主营中医养生课程，课程内容包括居家养生，食疗食补房子，穴位养生等，针对50岁以上中老年人群，0基础即可学习，每天30分钟，在家轻松学。
			</view>
		</view>
		<view class="foot">
			<view class="butt">
				<!-- <u-button type="success" text="加微" @click="show = true"></u-button> -->
				<!-- <button data-agl-cvt="35">复制微信</button> -->
				<div class="copy">
				    加微信了解更多：
				    <!-- 点击微信号之后复制，设置转化类型为35（微信复制按钮点击） -->
				    <span @click="clickToWx">点击加微</span>
				</div>
			</view>
			<span>重庆润天健康管理有限公司</span>
			<span>重庆市经开区长生桥镇蔷薇路46号5-1</span>
			<span>18523923647</span>
		</view>
	</view>
</template>
<script>
	import Clipboard from 'clipboard'; // 引入Clipboard
	import {getTemplate,callback} from '../../api/api.js'
	import {clicks} from '../../common/common.js'
		
		
	export default {
		data() {
			return {
				images: [],
				json: {},
				vid: '',
				no: '',
				show: false,
				name: '',
				tel: ''
			}
		},
		mounted() {
			window.vueInstance = this;  // 将 Vue 实例暴露到全局
		},
		onLoad(option) {
			this.vid = option.bd_vid;
			this.no = option.no;
			if(option.no == null || option.no == "" || option.no == undefined){
				uni.showToast({
					icon:'none',
					title: '地址错误',
				});
				return;
			}
			getTemplate(option.no).then(e => {
				this.images = e.images;
				this.json = e.json;
			})
			// callback({vid: this.vid}).then(e => {
			// 	console.info(e)
			// })
		},
		methods: {
			confirm() {
				this.show = false;
			},
			clickToWx(){
				callback({url: window.location.href, no: this.no, bdVid: this.vid, t: 67}).then(e => {
					window.location.href = this.json.wxNo + "?customer_channel=" + this.vid;
				})
			},
		}
	}
</script>

<style>
	.content {
		text-align: center;
	}
	.img-div{
		margin: 0 auto;
	}
	.img{
		width: 100%;
	}
	.foot{
		background-color: #fff;
		font-size: 13px;
		width: 100%;
		margin-top: 20px;
		padding-top: 10px;
		line-height: 50px;
		color: #848b99;
		text-align: center;
	}
	.foot span{
		margin-left: 10px;
	}
	.butt{
		/* width: 80px; */
		margin: 0 auto;
	}
	.copy{
		width: 100%;
	}
</style>
