智莺站长PC端官网代码, vite-vue
 
 
 

313 lines
6.6 KiB

  1. <template>
  2. <div class="download-box" ref="pronbit">
  3. <div class="container">
  4. <div class="title">
  5. <h3>下载软件地址</h3>
  6. </div>
  7. <div class="row" :style="'background:url(' + mod.bgImage + ')'" style="padding: 40px 20px 0 20px;">
  8. <div class=" col-lg-7 col-md-8 col-sm-12 center" style="margin-top: 20px;margin-bottom: 40px;">
  9. <div class="mainRight-box ">
  10. <div class="modLogo-text">
  11. <img class="modLogo" :src="mod.applyLogo" alt="" />
  12. <h1>{{ mod.mainText }}</h1>
  13. </div>
  14. <h2 class="subText">{{ mod.subText }}</h2>
  15. <div class="mod-cnt">
  16. {{mod.content}}
  17. </div>
  18. <div class="download-code">
  19. <div class="downloadImg">
  20. <div class="downloadImg-box" :style="getHoversColor"
  21. @click="downloadLink(linkData.iosLink)">
  22. <img :src="mod.iosDownloadBtn" style="width: 42px; height: 42px" alt="" />
  23. <div style="margin-left: 10px">iPhone下载</div>
  24. </div>
  25. <div class="downloadImg-box" :style="getHoversColor"
  26. @click="downloadLink(linkData.androidLink)">
  27. <img :src="mod.androidDownloadBtn" style="width: 42px; height: 42px" alt="" />
  28. <div style="margin-left: 10px">Android下载</div>
  29. </div>
  30. </div>
  31. <div class="download-content-code">
  32. <!-- <img class="modQrCde" :src="mod.qrcode" alt="" /> -->
  33. <qrcode-vue class="modQrCde" :value="url" size="100" level="H" />
  34. <div>扫一扫轻松下载</div>
  35. </div>
  36. </div>
  37. </div>
  38. </div>
  39. <div class="col-lg-1 d-none d-lg-block"></div>
  40. <div class="col-lg-4 col-md-4 col-sm-12" style="margin-top: 20px;">
  41. <div class="iphone">
  42. <img class="iphone12" :src="mod.mainImage" alt="" />
  43. </div>
  44. </div>
  45. </div>
  46. </div>
  47. <DefaultBowser ref="bowser"/>
  48. </div>
  49. </template>
  50. <script>
  51. import QrcodeVue from 'qrcode.vue'
  52. import DefaultBowser from './default-browser.vue'
  53. import {isWxBrowser} from '../utlis/browser.js'
  54. export default {
  55. components: {
  56. QrcodeVue,
  57. DefaultBowser,
  58. },
  59. computed: {
  60. getHoversColor: function() {
  61. return {
  62. "--text-color": this.mod.unSelectTextColor,
  63. "--text-color-hover": this.mod.selectTextColor,
  64. "--background-color": this.mod.unSelectBgColor,
  65. "--background-color-hover": this.mod.selectBgColor,
  66. "--box-shadow-color-hover": this.mod.selectBgColor + "4D",
  67. };
  68. },
  69. },
  70. data() {
  71. return {
  72. winHeight: 0,
  73. isShow: false,
  74. url: ''
  75. };
  76. },
  77. props: {
  78. mod: {
  79. type: Object,
  80. default: () => {},
  81. },
  82. linkData: {
  83. tpye: Object,
  84. default: () => {},
  85. },
  86. },
  87. created() {
  88. console.log(this.linkData)
  89. window.addEventListener("scroll", this.handleScrollx, true);
  90. this.winHeight =
  91. document.documentElement.clientHeight / 2 ||
  92. document.body.clientHeight / 2;
  93. this.url = document.URL
  94. },
  95. methods: {
  96. downloadLink: function(link) {
  97. // window.open(link);
  98. if (isWxBrowser() && link.endsWith('.apk')) {
  99. console.log('请使用默认浏览器打开')
  100. this.$refs.bowser.show()
  101. } else {
  102. window.open(link);
  103. }
  104. },
  105. handleScrollx() {
  106. if (this.winHeight > this.$refs.pronbit.getBoundingClientRect().top) {
  107. this.isShow = true;
  108. window.removeEventListener("scroll", this);
  109. }
  110. },
  111. },
  112. };
  113. </script>
  114. <style scoped>
  115. .iphone {
  116. width: 100%;
  117. max-height: 600px;
  118. overflow: hidden;
  119. }
  120. .iphone12 {
  121. width: 100%;
  122. height: 100%;
  123. object-fit: scale-down;
  124. }
  125. .download-box {
  126. display: flex;
  127. flex-flow: column;
  128. }
  129. .title {
  130. color: #0f0f0f;
  131. font-size: 26px;
  132. font-weight: bold;
  133. display: flex;
  134. justify-content: center;
  135. align-items: center;
  136. margin-bottom: 55px;
  137. letter-spacing: 5px;
  138. }
  139. .title::after {
  140. content: "";
  141. width: 12px;
  142. height: 12px;
  143. background: #ff4242;
  144. border-radius: 50%;
  145. margin-left: 5px;
  146. }
  147. .download-bg {
  148. /* width: 100%; */
  149. /* height: 520px; */
  150. background-size: 100% 100% !important;
  151. background-repeat: no-repeat;
  152. box-sizing: border-box;
  153. /* padding: 94px 110px 0; */
  154. /* opacity: 0; */
  155. /* animation: aniamtionDownload 1.2s ease-in-out forwards; */
  156. }
  157. @keyframes aniamtionDownload {
  158. 100% {
  159. opacity: 1;
  160. }
  161. }
  162. .mainImg-box {
  163. /* width: 344px;
  164. position: relative; */
  165. /* animation: aniamtionMainImg 1.2s forwards; */
  166. /* transform: translateY(600px); */
  167. }
  168. /*
  169. @keyframes aniamtionMainImg {
  170. 100% {
  171. transform: translateX(0);
  172. }
  173. } */
  174. .mainImg-box::after {
  175. content: "";
  176. height: 100px;
  177. background: linear-gradient(rgba(255, 255, 255, 0) 0%,
  178. rgb(255, 255, 255) 100%);
  179. width: 100%;
  180. top: 326px;
  181. z-index: 99;
  182. position: absolute;
  183. left: 0px;
  184. }
  185. .mainRight-box {
  186. display: flex;
  187. flex-direction: column;
  188. max-width: 600px;
  189. }
  190. .center {
  191. display: flex;
  192. justify-content: center;
  193. align-items: center;
  194. }
  195. .modLogo-text {
  196. display: flex;
  197. color: #333333;
  198. font-weight: bold;
  199. align-items: center;
  200. margin-top: 14px;
  201. }
  202. .modLogo {
  203. margin-right: 18px;
  204. width: 60px;
  205. height: 60px;
  206. border-radius: 5px;
  207. }
  208. .subText {
  209. margin-top: 12px;
  210. font-size: 20px;
  211. color: #999999;
  212. white-space: pre-line;
  213. }
  214. .download-code {
  215. display: flex;
  216. margin-top: 26px;
  217. justify-content: center;
  218. }
  219. .downloadImg {
  220. display: flex;
  221. flex-flow: column;
  222. margin-right: 20px;
  223. justify-content: space-between;
  224. }
  225. .download-content-code {
  226. width: 120px;
  227. height: 170px;
  228. background: #ffffff;
  229. border-radius: 10px;
  230. box-sizing: border-box;
  231. padding: 10px;
  232. color: #333333;
  233. font-size: 14px;
  234. display: flex;
  235. flex-flow: column;
  236. align-items: center;
  237. }
  238. .modQrCde {
  239. /* width: 100%; */
  240. margin-bottom: 12px;
  241. border-radius: 3px;
  242. }
  243. .downloadImg-box {
  244. /* width: 222px; */
  245. height: 72px;
  246. display: flex;
  247. align-items: center;
  248. box-sizing: border-box;
  249. padding-left: 15px;
  250. border-radius: 10px;
  251. color: var(--text-color);
  252. background: var(--background-color);
  253. box-shadow: 0px;
  254. transition: color 0.25s, background-color 0.25s, box-shadow 0.25s;
  255. cursor: pointer;
  256. padding-right: 12px;
  257. }
  258. .downloadImg-box:hover {
  259. color: var(--text-color-hover);
  260. background: var(--background-color-hover);
  261. box-shadow: 0px 2px 30px 0px var(--box-shadow-color-hover);
  262. transition: color 0.35s, background-color 0.35s, box-shadow 0.35s;
  263. }
  264. /* @media screen and (max-width: 1500px) {
  265. .mainImg-box {
  266. width: 300px;
  267. }
  268. } */
  269. .mod-cnt {
  270. color: #333;
  271. }
  272. </style>