1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- /* 推荐区 */
- <template>
- <gy-card
- title="推荐区"
- area-style="recommended"
- circle-style="green"
- content-style="37"
- >
- <div>
- <table v-for="vl in values" :key="vl">
- <tr>{{vl.stationName}}</tr>
- <tr>{{vl.content}}</tr>
- <tr>{{vl.createTime}}</tr>
- </table>
- </div>
- </gy-card>
- </template>
- <script>
- import BackgroundData from "../../assets/script/BackgroundData";
- export default {
- name: "RecommendedArea",
- props: ["datas"],
- data() {
- return {
- values: new Array(),
- };
- },
- created() {
- this.initData();
- },
- mounted() {},
- watch: {},
- methods: {
- initData() {
- setInterval(this.refreshData, 2000);
- },
- refreshData() {
- var bd = BackgroundData.getInstance();
- var ll = new Array();
- for (var v in bd.Recommends) {
- if (bd.Recommends[v].isActive) {
- ll.push(bd.Recommends[v]);
- }
- }
- this.values = ll;
- },
- },
- };
- </script>
- <style scoped>
- table{
- background-image: url("../../assets/img/RecommendedArea/guznzhu_bg_01.png");
- text-align: center;
- font-size:12px;
- width: 110px;
- height: 110px;
- background-size:110px;
- margin-left: 10px;
- margin-top: 10px;
- padding-top: 10px;
- background-repeat:no-repeat;
- }
- </style>
|