PageSourceSearch

https://ayeshaambreen.com/dist/site/js/app/car-model-public/common/app.js

js ayeshaambreen.com collected 2026-10-04 03:54:45 UTC 6,980 bytes, 226 lines download raw bytes

1function getQuery(id) {
2    var temData = new URLSearchParams(window.location.search);
3    return temData.get(id);
4}
5function isMobile() {
6    let userAgentInfo = navigator.userAgent;
7    let Agents = [
8        "Android",
9        "iPhone",
10        "SymbianOS",
11        "Windows Phone",
12        "iPad",
13        "iPod",
14        "ArkWeb",
15    ];
16    let getArr = Agents.filter((i) => userAgentInfo.includes(i));
17    return getArr.length ? true : false;
18}
19
20
21// if (PAGE_CONFIG.car_id === 2000034) {
22//     if (isMobile()) {
23//         $('.kv-box .detail .btn-box .btn3 a').attr('href', 'https://gw-haval-mall-h5.beantechyun.com/#/pages/carDetail/carDetail?id=28&productId=29629&dealerId=')
24//     } else {
25//         $('.kv-box .detail .btn-box .btn3 a').attr('href', 'javascript:void(0)')
26//     }
27// }
28
29
30
31if(window.screen.width < 768){
32    $('.policy-btn-yb').click(function(){
33        var url = $(this).attr('data-href')
34        window.open(url)
35    })
36}
37
38
39
40
41
42
43
44
45
46
47var paramContainer = getQuery("container");
48var innerConfigurePageUrl = `/configure/${PAGE_CONFIG.abbreviation_car_name}?container=${paramContainer}`;
49
50if(PAGE_CONFIG.car_id == 2000050) {
51    innerConfigurePageUrl = `/testdrive/?carId=2000050&container=${paramContainer}`
52}
53
54if(PAGE_CONFIG.car_id == 2000014) {
55    innerConfigurePageUrl = `/testdrive/?carId=2000014&container=${paramContainer}`
56}
57if(PAGE_CONFIG.car_id == 2000013) {
58    innerConfigurePageUrl = `/testdrive/?carId=2000013&container=${paramContainer}`
59}
60if(PAGE_CONFIG.car_id == 1000089) {
61    innerConfigurePageUrl = `/testdrive/?carId=1000089&container=${paramContainer}`
62}
63
64if(PAGE_CONFIG.car_id == 2000034) {
65    innerConfigurePageUrl = `/testdrive/?carId=2000034&container=${paramContainer}`
66}
67
68
69
70if(PAGE_CONFIG.car_id == 2000035) {
71    innerConfigurePageUrl = `/testdrive/?carId=2000035&container=${paramContainer}`
72}
73
74if(PAGE_CONFIG.car_id == 2000018) {
75    innerConfigurePageUrl = `/testdrive/?carId=2000018&container=${paramContainer}`
76}
77
78if(PAGE_CONFIG.car_id == 2000019) {
79    innerConfigurePageUrl = `/testdrive/?carId=2000019&container=${paramContainer}`
80}
81
82
83
84if(paramContainer) {
85    document.body.classList.add('is-container-' + paramContainer)
86}
87
88
89if (paramContainer == "app" || paramContainer == "dymp" || paramContainer == "sapp") {
90    if(PAGE_CONFIG.car_id == '2000013') {
91        $('.btn-box-th .link4').attr('href',`/configure/hdog?container=${paramContainer}`)
92    }
93    if(PAGE_CONFIG.car_id == '2000014') {
94        $('.btn-box-th .link4').attr('href',`/configure/hdogphev?container=${paramContainer}`)
95    }
96    if(PAGE_CONFIG.car_id == '1000089') {
97        $('.btn-box-th .link4').attr('href',`/configure/h6?container=${paramContainer}`)
98    }
99    
100    // $(".purchase-suppot-all").hide();
101    $("#new_header").hide();
102    $(".footer_box").hide();
103    $('.car-sidebar-all').hide()
104    // $('.car-sticky-config-all-box').hide()
105    // $('.policy-btn-box').hide()
106    $('.banner_btn_list').hide()
107    $('.other_car_mb').hide()
108
109
110    $('.kv-box .detail .btn-box .btn2 a').attr('href', innerConfigurePageUrl)
111    if(PAGE_CONFIG.car_id == '2000050') {
112        $('#menglong-config').attr('href', `/configure/menglong?container=${paramContainer}`)
113    } else {
114        $('#menglong-config').attr('href', `/configure/xiaolongmax?container=${paramContainer}`)
115    }
116
117    if(PAGE_CONFIG.car_id == '2000035') {
118        $('.btn-box-th .lin4').attr('href', `/configure/h5?container=${paramContainer}`)
119    }
120 
121    $('.J-goto720').attr("href", function(i, href) {
122        return href + (href.indexOf('?') > -1 ? '&' : '?') +  `container=${paramContainer}`;
123    });
124
125    // if (PAGE_CONFIG.car_id == 2000018) {
126    //     $('.kv-box .detail .btn-box .btn2 a').attr('href', `/car-center/configure-table/?container=${paramContainer}&model=b07`)
127    //     $('.section24 .title .box-btn').hide()
128    // }
129    // if (PAGE_CONFIG.car_id === 2000034) {
130    //     $('.kv-box .detail .btn-box .btn3 a').attr('href', 'https://gw-mall-static.beantechyun.com/#/VehicleDetail?data=%7B%22goods_id%22%3A29629%7D&shopCode=s0011')
131    // }
132    // if (PAGE_CONFIG.car_id === 2000035) {
133    //     $('.kv-box .detail .btn-box .btn3 a').attr('href', 'https://gw-mall-static.beantechyun.com/#/VehicleDetail?data=%7B%22goods_id%22%3A29736%7D&shopCode=s0011')
134    // }
135}
136
137if (paramContainer == "app" || paramContainer == "dymp") {
138    $(".purchase-suppot-all").hide();
139    $('.car-sticky-config-all-box').hide()
140    $('.policy-btn-box').hide()
141}
142
143if(paramContainer == "sapp") {
144    var $links = $('a');
145    $links.each(function(i, link){
146        link.setAttribute('target', '_self')
147    })
148    $('.car_banner').hide()
149    // console.log('in sapp')
150    $('#hi4').hide()
151    $('.policy-all .policy-btn2').hide()
152    $('.purchase-suppot-all').hide()
153    $('.car-sticky-config-all-box .car-sticky-config-link .link3') .attr('href', innerConfigurePageUrl)
154    if(PAGE_CONFIG.car_id == 2000048) {
155        $('.kv-box').hide()
156        $('.qy_btn').hide()
157        $('.test_driver_box').hide()
158        $('.btn-box-cs').hide()
159    }
160
161    if (window.sappUrls) {
162        $('.car-sticky-config-all-box .car-sticky-config-link .link4') .attr('href', window.sappUrls.testdrive)    
163        $('.policy-all .policy-btn-box .policy-btn3') .attr('href', window.sappUrls.order)
164    }
165}
166
167if (paramContainer == "dymp") {
168    $('.kv-box .detail .btn-box').hide()
169    if (PAGE_CONFIG.car_id === 2000014) {
170        $('.sw_car_banner, .sw_car_banner .swiper-slide .img-dymp').attr('src', 'https://www.ayeshaambreen.com/dist/site/images/car-model-public/h-dog/mb/kv_mb_2.jpg')
171    }
172    $('.kv-box').hide()
173    $('.policy-all').hide()
174    $('#section-kv').hide()
175    $('.video_text_box_pc').hide()
176    $('.banner_dog').hide()
177    $('.sw_car_banner').hide()
178    $('.car_detail_btn_mb').hide()
179}
180
181if(paramContainer == 'app') {
182    if(PAGE_CONFIG.car_id == '1000089') {
183        $('.kv-box').hide()
184    }
185    if(PAGE_CONFIG.car_id == '2000013') {
186        $('.banner_swiper').css('display','none')
187    }
188    if(PAGE_CONFIG.car_id == '2000014') {
189        $('.kv-box').hide()
190    }
191    if(PAGE_CONFIG.car_id == '2000034') {
192        $('.banner_dog').hide()
193    }
194    if(PAGE_CONFIG.car_id == '2000035') {
195        $('.kv-box').hide()
196    }
197}
198
199if (paramContainer == 'app' || paramContainer == 'sapp') {
200    bridge.call("Controller.refreshNav", {
201        right: []
202    })
203}
204
205
206
207//https://gw-mall-static.beantechyun.com/#/VehicleDetail?data=%7B%22goods_id%22%3A29629%7D&shopCode=s0011
208
209
210
211
212
213// 埋点
214function gerCarIdForQy(url){ //提取url中的carID
215    const regex = /[\?&]carId=(\d+)/;
216    const match = regex.exec(url);
217    if (match && match[1]) {
218        return match[1];
219    } else {
220        return null;
221    }
222}
223
224$('.policy-all .policy-btn.policy-btn2').click(function(){
225    Global.sensorsTrack('LeadspageFrom', { entrance_first: '销售支持', entrance_second: '预约试驾', pagefrom: '车型页优惠政策', car_model: gerCarIdForQy($(this).attr('href')) })
226})<!--0.00013399124145508-->

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.