index.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <template>
  2. <view class="content">
  3. <view class="img-div">
  4. <img class="img" v-for="url in images" :src="url" />
  5. <view>
  6. 重庆润天健康管理有限公司,主营中医养生课程,课程内容包括居家养生,食疗食补房子,穴位养生等,针对50岁以上中老年人群,0基础即可学习,每天30分钟,在家轻松学。
  7. </view>
  8. </view>
  9. <view class="foot">
  10. <view class="butt">
  11. <!-- <u-button type="success" text="加微" @click="show = true"></u-button> -->
  12. <!-- <button data-agl-cvt="35">复制微信</button> -->
  13. <div class="copy">
  14. 加微信了解更多:
  15. <!-- 点击微信号之后复制,设置转化类型为35(微信复制按钮点击) -->
  16. <span @click="clickToWx">点击加微</span>
  17. </div>
  18. </view>
  19. <span>重庆润天健康管理有限公司</span>
  20. <span>重庆市经开区长生桥镇蔷薇路46号5-1</span>
  21. <span>18523923647</span>
  22. </view>
  23. </view>
  24. </template>
  25. <script>
  26. import Clipboard from 'clipboard'; // 引入Clipboard
  27. import {getTemplate,callback} from '../../api/api.js'
  28. import {clicks} from '../../common/common.js'
  29. export default {
  30. data() {
  31. return {
  32. images: [],
  33. json: {},
  34. vid: '',
  35. no: '',
  36. show: false,
  37. name: '',
  38. tel: ''
  39. }
  40. },
  41. mounted() {
  42. window.vueInstance = this; // 将 Vue 实例暴露到全局
  43. },
  44. onLoad(option) {
  45. this.vid = option.bd_vid;
  46. this.no = option.no;
  47. if(option.no == null || option.no == "" || option.no == undefined){
  48. uni.showToast({
  49. icon:'none',
  50. title: '地址错误',
  51. });
  52. return;
  53. }
  54. getTemplate(option.no).then(e => {
  55. this.images = e.images;
  56. this.json = e.json;
  57. })
  58. // callback({vid: this.vid}).then(e => {
  59. // console.info(e)
  60. // })
  61. },
  62. methods: {
  63. confirm() {
  64. this.show = false;
  65. },
  66. clickToWx(){
  67. callback({url: window.location.href, no: this.no, bdVid: this.vid, t: 67}).then(e => {
  68. window.location.href = this.json.wxNo + "?customer_channel=" + this.vid;
  69. })
  70. },
  71. }
  72. }
  73. </script>
  74. <style>
  75. .content {
  76. text-align: center;
  77. }
  78. .img-div{
  79. margin: 0 auto;
  80. }
  81. .img{
  82. width: 100%;
  83. }
  84. .foot{
  85. background-color: #fff;
  86. font-size: 13px;
  87. width: 100%;
  88. margin-top: 20px;
  89. padding-top: 10px;
  90. line-height: 50px;
  91. color: #848b99;
  92. text-align: center;
  93. }
  94. .foot span{
  95. margin-left: 10px;
  96. }
  97. .butt{
  98. /* width: 80px; */
  99. margin: 0 auto;
  100. }
  101. .copy{
  102. width: 100%;
  103. }
  104. </style>