123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- <template>
- <div class="pa">
- <div class="box">
- <img class="download" src="/static/image/getapp/app.png" alt="">
- <div class="btn" @click="installClick">
- Download OneCric Now
- </div>
- </div>
- </div>
- </template>
- <script>
- export default {
- created() {
- // this.installClick()
- },
- activated() {
- // this.installClick()
- },
- methods: {
- installClick() {
- uni.showLoading({
- title: this.$t('common.lab'),
- });
- var adgroup_id = localStorage.getItem('adgroup_id');
- var agency_id = localStorage.getItem('agency_id');
- var code = localStorage.getItem('agency_code');
- adgroup_id && (adgroup_id = JSON.parse(adgroup_id));
- agency_id && (agency_id = JSON.parse(agency_id));
- code && (code = JSON.parse(code));
- uni.$u.http
- .post("/api/Nginx/apk_download_log", {
- adgroup_id: adgroup_id,
- agency_id: agency_id,
- code: code,
- // ip: ip || 1,
- types: 'H5'
- })
- .then((res) => {
- window.location.href = res
- gtag('event', 'H5_install_app', {
- 'H5_install_app': '0'
- });
- }).finally(() => {
- // uni.switchTab({
- // url: '/pages/Live/Live'
- // })
- uni.hideLoading();
- });
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- .pa {
- padding-top: 55px;
- padding-bottom: 50px;
- min-height: 100vh;
- background-image: url('/static/image/getapp/bg.jpg');
- background-repeat: no-repeat;
- background-size: 100% 100%;
- }
- .download {
- display: block;
- width: 100%;
- }
- .box {
- position: relative;
- padding-left: 47px;
- }
- .btn {
- position: absolute;
- bottom: 0;
- left: 50%;
- transform: translateX(-50%);
- cursor: pointer;
- text-align: center;
- background: #ff3300;
- border-radius: 6px;
- color: #fff;
- font-size: 15px;
- font-weight: 700;
- white-space: nowrap;
- width: 49.22vw;
- height: 7%;
- opacity: 0;
- }
- </style>
|