<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">var arr = []
var plist_item = {}

Vue.config.delimiters = ['[[', ']]']

var goodsPageValue = new Vue({
    delimiters: ['[[', ']]'],
    el: '#warp',
    mixins: [header],
    data: {
        FQA: '',
        product_tab: "1",
        imageList: [

        ],
        purchased: 45, names: 'V***M', people: 20, stock: 8,
        deadline2: Date.now() + (new Date().setHours(23, 59, 59) - Date.now()),
        search: "",
        list: [

        ],
        islogin: null,
        leftrightList: [],

        pindecList: [],
        activeName: 'first',
        productpage: [],

        isIntroduction: false,
        chartList: [],
        num: 1,
        sku_code_List: [],
        pageData: {
            product_sku: {
                sku_code: {
                    data: [], show_name: ''
                }
            }
        },
        cart_price: 0,
        cart_currency: '$',
        products_introduction: [],
        related_productsData: [],
        banner_img: '',
        banner_List: [],
        srcList: [],

        srcListBig: [],
        nowshoppList: [],
        //product_list:[ ],     
        tabs: 0,
        currency: '',
        dialogVisible: false,
        ruleForm: {
            username: '',
            password: '',

        },
        regForm: {
            username: '',
            password: '',
            address: ""
        },

        indexImg: 0,
        radio_templete2: "2",
        specifications: '',
        specifications_2: "",
        selspecificat: 0,

        specificationsInfo: {}, previewlist: [], sku_code_AddList: [],
        dectitle: "", bill_number: '',
        color_sel: '',
        isshow: 8,
        url: '', size_sel: "",
        srcListK: [],
        country: "",
        countries: ['India', 'United States', 'Indonesia', 'Pakistan', 'Brazil', 'Nigeria', 'Bangladesh', 'Russia', 'Mexico', 'Japan', 'Philippines', 'Egypt', 'Vietnam', 'Germany', 'Turkey', 'Iran', 'Thailand', 'France', 'United Kingdom']
        ,
        MultipleList: [
            {
                id: '',
                sku_code: "",
                Product_num: 1,
                sku_code_add: "", price: ''
            },
            {
                id: '',
                sku_code: "",
                Product_num: 1,
                sku_code_add: "", price: ''
            },
        ],
        num_page_4: '',
        buyList: []
    },
    created: function () {
        let title = window.location.href
        console.log(title);
        let pn = title.split("-").pop().split("?").shift();
        console.log(pn, 'pn');
        this.product_number = pn
        const jsonLDData = document.getElementById('pro_data');
        if (jsonLDData &amp;&amp; jsonLDData.textContent.trim() !== '') {
            const jsonData = JSON.parse(jsonLDData.textContent);
            this.pageData = jsonData
            this.pageData.product_number = this.product_number
            this.sku_code_List = jsonData.product_sku.sku_code.data
            this.sku_code_AddList = jsonData.product_sku.sku_code_add.data
            if (this.sku_code_List.length &gt; 0) {
                this.url = this.sku_code_List[0].img
                this.srcListK.push(this.url)
                this.dectitle = `${this.sku_code_List[0].name}${this.sku_code_List[0].currency ? this.sku_code_List[0].currency : ''}${this.sku_code_List[0].price ? this.sku_code_List[0].price : ''}`
                this.specificationsInfo = this.sku_code_List[0]
                this.color_sel = this.specificationsInfo.name
            }
            if (this.sku_code_AddList.length &gt; 0) {
                this.specifications = this.sku_code_AddList[0]
            }
            this.MultipleList.forEach(i =&gt; {
                i.sku_code = this.color_sel
                i.sku_code_add = this.specifications
            })
            this.pageData.banners.forEach(item =&gt; {
                this.previewlist.push(item.image_url)
            })
            this.currency = this.pageData.currency
        } else {
            this.pro()
        }

        // -------------------------
        localStorage.removeItem('activeMenu')
        this.activeMenu = ''
        if (localStorage.getItem('chartList') !== null) {
            this.chartList = JSON.parse(localStorage.getItem('chartList'))
            // this.currency=this.chartList.currency
        }
        if (localStorage.getItem('islogin') !== null) {
            this.islogin = JSON.parse(localStorage.getItem('islogin'))

        }
        if (localStorage.getItem('product_number') !== null) {
            this.product_number = localStorage.getItem('product_number')

        }
        // const csrftoken = document.querySelector('[name=csrfmiddlewaretoken]').value;

        if (document.getElementById('template37').value == 37) {
            fetch('/app/get_productpage', {
                method: 'POST',
                headers: {
                    'Content-Type': 'application/json',
                    // 'X-CSRFToken': csrftoken
                },
                mode: 'same-origin',
                body: JSON.stringify({
                    pn: pn,
                })
            })
                .then(response =&gt; response.json())
                .then(data =&gt; {
                    // this.pageData = data.data
                    this.nowshoppList = data.data.related_products
                    if (this.nowshoppList.length &gt; 0) {
                        setInterval(() =&gt; {
                            let mowlength = this.nowshoppList.length
                            let d = Math.floor(Math.random() * mowlength)
                            let date = new Date();
                            let monthList = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
                            let month = date.getMonth();
                            this.$notify({
                                dangerouslyUseHTMLString: true, position: 'bottom-right',
                                message:
                                    `&lt;div style='color:#fff;font-size:12px;margin-top:5px;display:flex;'&gt;
                              &lt;div style='width:80px;height:80px;margin-right:5px;  display:flex;align-items: center;justify-content: center;'&gt;
                                &lt;img src=${this.nowshoppList[d].main_img} style='max-width:100%;max-height:100%'&gt;
                              &lt;/div&gt;
                              &lt;ul style='list-style:none'&gt;
                               &lt;li style='text-overflow: ellipsis;overflow: hidden;-webkit-line-clamp: 1;white-space:nowrap;max-width:180px'&gt;${this.nowshoppList[d].title}&lt;/li&gt;
                               &lt;li&gt;${this.names}&lt;/span&gt; form &lt;span style="color: #fff;font-weight: bold;"&gt;${this.country}&lt;/span&gt; has completed the purchase&lt;/li&gt;
                               &lt;li&gt;${monthList[month]}  ${date.getDate()}, ${date.getHours()} : ${date.getMinutes()}&lt;/li&gt;
                              &lt;/ul&gt;
                            &lt;/div&gt;`
                            });
                        }, 7000)
                    }
                    // this.sku_code_List = data.data.product_sku.sku_code.data
                    // this.sku_code_AddList = data.data.product_sku.sku_code_add.data
                    // if (this.sku_code_List.length &gt; 0) {
                    //     this.url = this.sku_code_List[0].img
                    //     this.srcListK.push(this.url)
                    //     this.dectitle = `${this.sku_code_List[0].name}${this.sku_code_List[0].currency ? this.sku_code_List[0].currency : ''}${this.sku_code_List[0].price ? this.sku_code_List[0].price : ''}`
                    //     this.specificationsInfo = this.sku_code_List[0]
                    //     this.color_sel = this.specificationsInfo.name
                    // }
                    // if (this.sku_code_AddList.length &gt; 0) {
                    //     this.specifications = this.sku_code_AddList[0]
                    // }
                    // this.MultipleList.forEach(i =&gt; {
                    //     i.sku_code = this.color_sel
                    //     i.sku_code_add = this.specifications
                    // })
                    // this.pageData.banners.forEach(item =&gt; {
                    //     this.previewlist.push(item.image_url)
                    // })            
                    // this.currency = this.pageData.currency

                })
                .catch(error =&gt; {
                    console.error('Error:', error);
                });

        }

        // this.shared()


    },
    mounted() {
        if (localStorage.getItem('bill_number') != null) {
            this.bill_number = JSON.parse(localStorage.getItem('bill_number'))
        }
        setInterval(() =&gt; {
            this.people = (Math.floor(Math.random() * 100))
            let num = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
            let a = Math.floor(Math.random() * 26)
            let b = Math.floor(Math.random() * 26)
            let c = Math.floor(Math.random() * 18)
            this.names = `${num[a]}****${num[b]}`
            this.country = `${this.countries[c]}`
            if (this.buyList.length &gt;= 3) {
                this.buyList.shift()
            }
            this.buyList.push(`${this.names} from ${this.country} bougth this item`)
        }, 6000)

    },

    methods: {
        pro() {
            let title = window.location.href
            console.log(title);
            let pn = title.split("-").pop().split("?").shift();
            console.log(pn, 'pn');
            this.product_number = pn
            fetch('/app/get_productpage', {
                method: 'POST',
                headers: {
                    'Content-Type': 'application/json',
                    // 'X-CSRFToken': csrftoken
                },
                mode: 'same-origin',
                body: JSON.stringify({
                    pn: pn,
                })
            })
                .then(response =&gt; response.json())
                .then(data =&gt; {
                    this.pageData = data.data
                    this.pageData.product_number = this.product_number
                    this.sku_code_List = data.data.product_sku.sku_code.data
                    this.sku_code_AddList = data.data.product_sku.sku_code_add.data
                    if (this.sku_code_List.length &gt; 0) {
                        this.url = this.sku_code_List[0].img
                        this.srcListK.push(this.url)
                        this.dectitle = `${this.sku_code_List[0].name}${this.sku_code_List[0].currency ? this.sku_code_List[0].currency : ''}${this.sku_code_List[0].price ? this.sku_code_List[0].price : ''}`
                        this.specificationsInfo = this.sku_code_List[0]
                        this.color_sel = this.specificationsInfo.name
                    }
                    if (this.sku_code_AddList.length &gt; 0) {
                        this.specifications = this.sku_code_AddList[0]
                    }
                    this.MultipleList.forEach(i =&gt; {
                        i.sku_code = this.color_sel
                        i.sku_code_add = this.specifications
                    })
                    this.pageData.banners.forEach(item =&gt; {
                        this.previewlist.push(item.image_url)
                    })
                    this.currency = this.pageData.currency

                })
                .catch(error =&gt; {
                    console.error('Error:', error);
                });
        },
        template2(f) {
            console.log(f);
        },
        specificationsSelect(item, index) {
            console.log(item);
            this.srcListK = []
            if (item.img != '') {
                this.url = item.img
                this.srcListK.push(item.img)
            }
            this.color_sel = item.name
            this.specificationsInfo = item
            this.selspecificat = index
            this.dectitle = `${item.name ? item.name : ''} ${item.currency ? item.currency : ''} ${item.price ? item.price : ''}`
        },
        imgchange(index) {
            this.indexImg = index
            // let a=document.getElementsByClassName('attachment-woocommerce_thumbnail')
            // this.pageData.banners.forEach((img, e) =&gt; {             
            //     if(index==e)   
            //       a.style.transform = `translateX(-${index * 100}%)`;                          
            //    });
        },
        get_product_list(header) {
            if (header) {
                window.location.href = `${window.location.origin}/shop?title=${this.search}`
            }
        },

        shared() {

            shared(this.product_number).then(res =&gt; {
                if (res.code == 200) {

                    this.pindecList = res.data
                    if (res.data.length &gt; 0) {
                        this.purchased = res.data.length
                    } else {
                        this.purchased = 109
                    }
                }
            })
        },
        tab(index) {
            this.tabs = index
            console.log(index);
        },

        buynow(data, num, l) {
            // if (num &gt; 4) {
            //     this.num_page_4='Sorry, We only support one order for 4 products. If you need to purchase more products, please create a new order after paying for the current order.'
            //     this.$message.warning('Sorry, We only support one order for 4 products. If you need to purchase more products, please create a new order after paying for the current order.')
            //     return
            // }
            this.addCar('checkout')
            // if(this.bill_number!=''){
            //     this.$message.error('You have unpaid orders, please process the unfinished orders first')
            //     return
            //   }

            if (this.pageData.product_sku &amp;&amp; this.pageData.product_sku.sku_code.data.length &gt; 0) {
                if (this.selspecificat == null) {
                    this.$message.error('Please select a specification');
                    return
                }
            }
            if (this.pageData.product_sku &amp;&amp; this.pageData.product_sku.sku_code_add.data.length &gt; 0) {
                if (this.specifications == '' || this.selspecificat == null) {
                    this.$message.error('Please select a specification');
                    return
                }
            }
            this.disablepRompt = false
            const loading = this.$loading({
                lock: true,
                text: 'Loading',
                spinner: 'el-icon-loading',
                background: 'rgba(0, 0, 0, 0.7)'
            });
            this.isIntroduction = true
            let { main_img, product_type, title, price, id, currency, url } = data
            let listboj = {
                id, currency, product_number: this.product_number, url: url,
                main_img, product_type, title, price: Number(price), Product_num: Number(this.num), allPrice: Number(price) * Number(this.num)
            }

            let hasSize = {
                url: url, id, currency: !this.specificationsInfo.currency || this.specificationsInfo.currency == '' ? currency : this.specificationsInfo.currency, product_number: this.product_number,
                main_img: !this.specificationsInfo.img || this.specificationsInfo.img == '' ? main_img : this.specificationsInfo.img, product_type, title, price: !this.specificationsInfo.price || this.specificationsInfo.price == '' ? price : this.specificationsInfo.price, Product_num: this.num, allPrice: !this.specificationsInfo.price || this.specificationsInfo.price == '' ? price * this.num : this.specificationsInfo.price * this.num, skuinfo: `${this.specificationsInfo.name ? `${this.specificationsInfo.name},` : ''}${this.specifications ? this.specifications : ''}`, sku_code: this.specificationsInfo.name, sku_code_add: this.specifications
            }

            let item = this.chartList.find(item =&gt; {
                return item.id == id;
            });

            let skusame = this.chartList.find(item =&gt; {
                return item.sku_code == hasSize.sku_code &amp;&amp; item.sku_code_add == hasSize.sku_code_add;
            });
            let v = []
            if (this.pageData.product_sku &amp;&amp; (this.pageData.product_sku.sku_code.data.length &gt; 0 || this.pageData.product_sku.sku_code_add.data.length &gt; 0)) {
                v.push(hasSize)
            } else {
                v.push(listboj)
            }
            this.PaymentGoods = v
            localStorage.setItem("PaymentGoods", JSON.stringify(v))

            loading.close();
            // this.chartList.forEach(i =&gt; {
            //     i.title = i.title.replace(/[!"#$%&amp;'()*+,-./:;&lt;=&gt;?@[\]^_`{|}~]/g, "-");
            // })
            if (l != 'None') {
                this.getDomain('buynow', l)
            } else {
                this.getDomain('buynow')
            }
            // window.location.href = `${window.location.origin}/checkout/`
            // window.location.href = `https://mitisshop.com/publicCheckout/?cartList=${JSON.stringify(this.chartList)}&amp;domain=${window.location.origin}`
            // window.location.href = `http://192.168.124.31:1400/publicCheckout/?cartList=${JSON.stringify(this.chartList)}&amp;domain=${window.location.origin}`
        },

        bigIMg(item) {
            this.srcListBig = []
            this.srcListBig.push(item)

        },
        mergeByIdAndSum(array) {
            const idSkuCodeMap = {};

            array.forEach(obj =&gt; {

                const key = `${obj.id}_${obj.sku_code}_${obj.sku_code_add}`;

                if (idSkuCodeMap[key]) {
                    idSkuCodeMap[key].Product_num += obj.Product_num;
                    idSkuCodeMap[key].allPrice = idSkuCodeMap[key].Product_num * obj.price;
                } else {

                    idSkuCodeMap[key] = { ...obj };
                }
            });

            const mergedArray = Object.values(idSkuCodeMap);

            return mergedArray;
        },
        formsubmit_2(data, num) {
            //  if (num &gt; 4) {
            //     this.num_page_4='Sorry, We only support one order for 4 products. If you need to purchase more products, please create a new order after paying for the current order.'
            //     this.$message.warning('Sorry, We only support one order for 4 products. If you need to purchase more products, please create a new order after paying for the current order.')
            //     return
            // }
            let { main_img, product_type, title, price, id, currency, url } = data
            this.disablepRompt = false
            this.addCar('addCart')
            this.MultipleList.forEach(i =&gt; {
                i.allPrice = price
                i.main_img = main_img
                i.product_type = product_type
                i.title = title
                i.price = price
                i.id = id
                i.currency = currency
                i.url = url
                i.product_number = this.product_number
                i.skuinfo = `${i.sku_code ? `${i.sku_code},` : ''}${i.sku_code_add ? i.sku_code_add : ''}`
            })

            const merged = this.chartList.concat(this.MultipleList)
            this.isIntroduction = true
            this.chartList = this.mergeByIdAndSum(merged)
            this.$message.success('Added to shopping cart')
            localStorage.setItem("chartList", JSON.stringify(this.chartList))

        },
        formsubmit(data, num) {
            // if (num &gt; 4) {
            //     this.num_page_4='Sorry, We only support one order for 4 products. If you need to purchase more products, please create a new order after paying for the current order.'
            //     this.$message.warning('Sorry, We only support one order for 4 products. If you need to purchase more products, please create a new order after paying for the current order.')
            //     return
            // }
            this.disablepRompt = false
            this.addCar('addCart')

            // if(this.bill_number!=''){
            //     this.$message.error('You have unpaid orders, please process the unfinished orders first')
            //     return
            //   }
            if (this.pageData.product_sku &amp;&amp; this.pageData.product_sku.sku_code.data.length &gt; 0) {
                if (this.selspecificat == null) {
                    this.$message.error('Please select a specification');
                    return
                }
            }
            if (this.pageData.product_sku &amp;&amp; this.pageData.product_sku.sku_code_add.data.length &gt; 0) {
                if (this.specifications == '' || this.selspecificat == null) {
                    this.$message.error('Please select a specification');
                    return
                }
            }

            this.isIntroduction = true

            let { main_img, product_type, title, price, id, currency, url } = data
            let listboj = {
                id, currency, product_number: this.product_number, url: url,
                main_img, product_type, title, price: Number(price), Product_num: Number(this.num), allPrice: Number(price) * Number(this.num)
            }

            let hasSize = {
                url: url, id, currency: !this.specificationsInfo.currency || this.specificationsInfo.currency == '' ? currency : this.specificationsInfo.currency, product_number: this.product_number,
                main_img: !this.specificationsInfo.img || this.specificationsInfo.img == '' ? main_img : this.specificationsInfo.img, product_type, title, price: !this.specificationsInfo.price || this.specificationsInfo.price == '' ? price : this.specificationsInfo.price, Product_num: this.num, allPrice: !this.specificationsInfo.price || this.specificationsInfo.price == '' ? price * this.num : this.specificationsInfo.price * this.num, skuinfo: `${this.specificationsInfo.name ? `${this.specificationsInfo.name},` : ''}${this.specifications ? this.specifications : ''}`, sku_code: this.specificationsInfo.name, sku_code_add: this.specifications
            }

            let item = this.chartList.find(item =&gt; {
                return item.id == id;
            });

            let skusame = this.chartList.find(item =&gt; {
                return item.sku_code == hasSize.sku_code &amp;&amp; item.sku_code_add == hasSize.sku_code_add;
            });

            if (this.pageData.product_sku &amp;&amp; (this.pageData.product_sku.sku_code.data.length &gt; 0 || this.pageData.product_sku.sku_code_add.data.length &gt; 0)) {
                if (this.chartList.length &gt; 0) {
                    if (skusame != undefined) {
                        this.chartList.forEach(element =&gt; {
                            if (element.sku_code == hasSize.sku_code &amp;&amp; element.sku_code_add == hasSize.sku_code_add) {
                                element.Product_num = Number(element.Product_num) + Number(num)
                                !this.specificationsInfo.price || this.specificationsInfo.price == '' ? element.price = element.price : element.price = this.specificationsInfo.price
                                element.allPrice = Number(element.price) * Number(element.Product_num)
                                // element.allPrice = element.allPrice.toFixed(2)
                            }
                        })
                    } else {
                        this.chartList.push(hasSize)
                    }
                } else {
                    this.chartList.push(hasSize)
                }
            } else {
                if (this.chartList.length &gt; 0) {
                    if (item != undefined) {
                        this.chartList.forEach(element =&gt; {
                            if (element.id == item.id) {
                                element.Product_num = Number(element.Product_num) + Number(num)
                                element.allPrice = Number(element.price) * Number(element.Product_num)
                            }
                        })
                    } else {
                        this.chartList.push(listboj)
                    }
                } else {
                    this.chartList.push(listboj)
                }
            }
            this.$message.success({
                showClose: true,
                message: 'Added to shopping cart',
                offset: 100,
                duration: 2000
            })
            localStorage.setItem("chartList", JSON.stringify(this.chartList))
            // if(this.chatnum&lt;2){
            //     this.Bottom_prompt=true
            // }else{
            //     this.Bottom_prompt=false
            // }       
        },
        setActiveItem(index) {
            this.indexImg = index
            this.$refs.carousel.setActiveItem(index)
        },
        bannerbottom(j) {
            this.$refs.carousel.setActiveItem(j)
            this.indexImg = j
        },
        // carouselChange(now) {
        //     console.log(55);
        //     this.srcList = []
        //     this.srcList.push(now)
        // },
        firsts() {
            this.indexImg--


            this.$refs.carousel.setActiveItem(this.indexImg)
        },
        next() {
            this.indexImg++
            // let d=document.querySelectorAll('.img-box')
            // d.forEach(function(element) {
            //     // let computedStyle = getComputedStyle(element);
            //     // let currentTranslateY = computedStyle.transform.match(/[-+]?[\d]*\.?[\d]+/g);
            //     // let translateY = currentTranslateY ? parseInt(currentTranslateY[5]) - 100 : -100;
            //     element.style.transform = `translateY(-100px)`;
            //   });
            this.$refs.carousel.setActiveItem(this.indexImg)
        },
        handleLinkClick(img) {
            console.log(img, 99)
            this.banner_img = img
        },
    }
})

</pre></body></html>