index.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <template>
  2. <view class="content">
  3. <view class="img-div">
  4. <img class="img" v-for="url in images" :src="url" />
  5. <view class="text-color">
  6. 重庆润天健康管理有限公司,主营中医养生课程,课程内容包括居家养生,食疗食补房子,穴位养生等,针对50岁以上中老年人群,0基础即可学习,每天30分钟,在家轻松学。
  7. </view>
  8. </view>
  9. <view class="box"></view>
  10. <view class="foot">
  11. <view class="butt">
  12. <!-- <u-button type="success" text="加微" @click="show = true"></u-button> -->
  13. <!-- <button data-agl-cvt="35">复制微信</button> -->
  14. <div class="copy">
  15. <span>加微信了解更多</span>:
  16. <!-- 点击微信号之后复制,设置转化类型为35(微信复制按钮点击) -->
  17. <span @click="clickToWx" class="clickbox shake-animation">点击加微</span>
  18. </div>
  19. </view>
  20. <view class="foot-box">
  21. <span>重庆润天健康管理有限公司</span>
  22. <span>重庆市经开区长生桥镇蔷薇路46号5-1 18523923647</span>
  23. </view>
  24. </view>
  25. </view>
  26. </template>
  27. <script>
  28. import Clipboard from 'clipboard'; // 引入Clipboard
  29. import {getTemplate,callback} from '../../api/api.js'
  30. import {clicks} from '../../common/common.js'
  31. export default {
  32. data() {
  33. return {
  34. images: [],
  35. json: {},
  36. vid: '',
  37. no: '',
  38. show: false,
  39. name: '',
  40. tel: ''
  41. }
  42. },
  43. mounted() {
  44. window.vueInstance = this; // 将 Vue 实例暴露到全局
  45. },
  46. onLoad(option) {
  47. this.vid = option.bd_vid;
  48. this.no = option.no;
  49. if(option.no == null || option.no == "" || option.no == undefined){
  50. uni.showToast({
  51. icon:'none',
  52. title: '地址错误',
  53. });
  54. return;
  55. }
  56. getTemplate(option.no).then(e => {
  57. this.images = e.images;
  58. this.json = e.json;
  59. })
  60. // callback({vid: this.vid}).then(e => {
  61. // console.info(e)
  62. // })
  63. },
  64. methods: {
  65. confirm() {
  66. this.show = false;
  67. },
  68. clickToWx(){
  69. callback({url: window.location.href, no: this.no, bdVid: this.vid, t: 67}).then(e => {
  70. window.location.href = this.json.wxNo + "?customer_channel=" + this.vid;
  71. })
  72. },
  73. }
  74. }
  75. </script>
  76. <style lang="scss" scoped>
  77. .text-color{
  78. text-align: center;
  79. width: 90%;
  80. margin: 0 auto;
  81. font-size: 14px;
  82. }
  83. .foot-box{
  84. display: flex;
  85. flex-direction: column;
  86. margin: 4px 0;
  87. span{
  88. margin: 0;
  89. line-height:16px;
  90. font-size: 12px;
  91. }
  92. }
  93. .box{
  94. height: 120px;
  95. }
  96. .content {
  97. text-align: center;
  98. }
  99. .img-div{
  100. margin: 0 auto;
  101. display: flex;
  102. flex-direction: column;
  103. }
  104. .img{
  105. width: 100%;
  106. }
  107. .foot{
  108. background-color: #fff;
  109. font-size: 13px;
  110. width: 100%;
  111. margin-top: 20px;
  112. padding-top: 10px;
  113. line-height: 50px;
  114. color: #848b99;
  115. text-align: center;
  116. position: fixed;
  117. bottom: 0;
  118. }
  119. .butt{
  120. /* width: 80px; */
  121. margin: 0 auto;
  122. }
  123. .copy{
  124. width: 80%;
  125. background-color: #F26F00;
  126. margin: 0 auto;
  127. color: #fff;
  128. border-radius: 6px;
  129. display: flex;
  130. align-items: center;
  131. justify-content: center
  132. }
  133. .clickbox{
  134. background-color: #fff;
  135. color: #F26F00;
  136. display: inline-block;
  137. width: 100px;
  138. height: 40px;
  139. line-height: 40px;
  140. border-radius: 4px;
  141. font-size: 18px;
  142. font-weight: bold;
  143. }
  144. @keyframes shake-animation {
  145. 0% { transform: scale(1); }
  146. 25% { transform: scale(1.1); }
  147. 50% { transform: scale(1); }
  148. 75% { transform: scale(1.1); }
  149. 100% { transform: scale(1); }
  150. }
  151. .shake-animation {
  152. animation: shake-animation 1.5s;
  153. animation-iteration-count: infinite; /* 使动画无限循环 */
  154. }
  155. </style>