<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>单机游戏</title>
    <link rel="stylesheet" type="text/css" href="./css/public.css">
    <script src="./js/VUE.js"></script>
    <script src="./js/axios.js"></script>
</head>
<body>
<div id="app">
    <span class="title">限时1元</span>
    <div class="one-yuan">
        <img src="./images/shape23.png" alt="" style="margin: 49px 40px">
        <div class="items" v-for="(x,index) in limitList" :key="index" @click="JsCallCpp(x.productId)">
            <img :src="ossUrl + x.productImage" alt="">
            <p class="name">
                <span>{{x.productName}}</span>
                <img src="./images/shape1.png" alt="">
            </p>
            <p class="price">¥{{price(x.specList[0].salesPrice)}}</p>
        </div>
    </div>
    <span class="title">5元,体验一款神奇大作</span>
    <div>
        <div class="items mb-25" v-for="(x,index) in promotionList" :key="index" @click="JsCallCpp(x.productId)">
            <img :src="ossUrl + x.productImage" alt="">
            <p class="name">
                <span>{{x.productName}}</span>
                <img src="./images/shape1.png" alt="">
            </p>
            <p class="price">¥{{price(x.specList[0].salesPrice)}}</p>
        </div>
    </div>
</div>
<script type="text/javascript">
    new Vue({
        el: '#app',
        data: function () {
            return {
                limitList: [],
                promotionList: [],
            }
        },
        methods: {
            getSingleActivityList: function () {
                let that = this;
                Ajax({
                    url: getSingleActivityList,
                    success: function (res) {
                        that.limitList = res.limitList;
                        that.promotionList = res.promotionList;
                    }
                })
            },
        },
        mounted: function () {
            this.getSingleActivityList();
        }
    })
</script>
</body>
</html>
