Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Wscats committed Mar 13, 2017
0 parents commit cf037b8
Show file tree
Hide file tree
Showing 27 changed files with 2,746 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
22 changes: 22 additions & 0 deletions app/channel/heros.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<template>
<wchampion></wchampion>
</template>
<script>
import wchampion from "../wchampion.vue"
export default {
replace: false,
data() {
return {
channel: this.$route.params.id
}
},
methods: {
},
components: {
wchampion: wchampion
},
mounted() {
},
directives: {}
}
</script>
27 changes: 27 additions & 0 deletions app/channel/news.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<template>
<div>
<wswiper></wswiper>
<wpannel :channel="channel"></wpannel>
</div>
</template>
<script>
import wswiper from "../wswiper.vue";
import wpannel from "../wpannel.vue";
export default {
replace: false,
data() {
return {
channel:this.$route.params.id
}
},
methods: {
},
components: {
'wswiper': wswiper,
'wpannel': wpannel
},
mounted() {
},
directives: {}
}
</script>
29 changes: 29 additions & 0 deletions app/channel/players.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<template>
<div>
<!--<wswiper></wswiper>-->
<!--<wpannel :channel="channel"></wpannel>-->

<wsearch style="position: fixed; top: 56px;"></wsearch>
</div>
</template>
<script>
//import wswiper from "../wswiper.vue";
//import wpannel from "../wpannel.vue";
import wsearch from "../wsearch.vue";
export default {
replace: false,
data() {
return {
channel: this.$route.params.id
}
},
methods: {},
components: {
/*'wswiper': wswiper,
'wpannel': wpannel,*/
wsearch: wsearch
},
mounted() {},
directives: {}
}
</script>
38 changes: 38 additions & 0 deletions app/index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<template>
<div>
<wheader></wheader>
<router-view></router-view>
<wfooter></wfooter>
<wpopup></wpopup>
</div>
</template>
<script>
//import wheader from "./wheader.vue";
var wheader = require("./wheader.vue")
//import wsearch from "./wsearch.vue";
var wsearch = require("./wsearch.vue")
var wfooter = require("./wfooter.vue")
import wpopup from "./wpopup.vue"
export default {
replace: false,
data() {
return {
}
},
methods: {
},
components: {
'wheader': wheader,
'wsearch': wsearch,
'wfooter': wfooter,
'wpopup': wpopup
},
mounted() {
},
directives: {
}
}
</script>
<style scoped>
</style>
69 changes: 69 additions & 0 deletions app/wchampion.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<template>
<div class="gridlist-demo-container">
<mu-grid-list class="gridlist-demo">
<mu-sub-header>英雄列表</mu-sub-header>
<mu-grid-tile v-for="tile in list" style="width:25%;height:76px">
<img :src="'http://cdn.tgp.qq.com/pallas/images/champions_id/'+tile.id+'.png'" />
<span slot="title">{{tile.title}}</span>
<!--<span slot="subTitle">by <b>{{tile.author}}</b></span>-->
<!--<mu-icon-button icon="star_border" slot="action" />-->
</mu-grid-tile>
</mu-grid-list>
</div>
</template>
<script>
export default {
data() {
return {
list: []
}
},
computed: {
token() {
return this.$store.state.token;
}
},
methods: {
getChampionList() {
var self = this;
$.ajax({
url: "http://lolapi.games-cube.com/champion",
type: "GET",
headers: {
"DAIWAN-API-TOKEN": self.token
},
success: function(data) {
console.log(data);
self.list = data.data
}
});
}
},
mounted() {
this.getChampionList()
}
}
</script>
<style>
.gridlist-demo-container {
display: flex;
flex-wrap: wrap;
justify-content: space-around;
}
.gridlist-demo {
width: 500px;
height: 100%;
padding-top: 56px;
padding-bottom: 56px;
overflow-y: auto;
}
.mu-grid-tile-titlebar {
height: 15px;
}
.mu-grid-tile-title {
font-size: 8px;
}
</style>
107 changes: 107 additions & 0 deletions app/wchampiondetail.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
<template>
<mu-card>
<!--<mu-card-header title="Myron Avatar" subTitle="sub title">
<mu-avatar :src="img" slot="avatar" />
</mu-card-header>-->
<mu-card-media title="hero.title" :subTitle="hero.name">
<!--<img :src="'http://cdn.tgp.qq.com/pallas/images/skins/original/'+hero.image" />-->
</mu-card-media>
<mu-tabs :value="activeTab" @change="handleTabChange">
<mu-tab value="tab1" title="TAB ONE" />
<mu-tab value="tab2" title="TAB TWO" />
<!--<mu-tab value="tab3" @active="handleActive" title="TAB ACTIVE" />-->
</mu-tabs>
<mu-card-title title="Content Title" subTitle="Content Title" />
<mu-card-text>
散落在指尖的阳光,我试着轻轻抓住光影的踪迹,它却在眉宇间投下一片淡淡的阴影。 调皮的阳光掀动了四月的心帘,温暖如约的歌声渐起。 似乎在诉说着,我也可以在漆黑的角落里,找到阴影背后的阳光, 找到阳光与阴影奏出和谐的旋律。我要用一颗敏感赤诚的心迎接每一缕滑过指尖的阳光!
</mu-card-text>
<mu-card-actions>
<mu-flat-button label="Action 1" />
<mu-flat-button label="Action 2" />
</mu-card-actions>
<div>
<div v-if="activeTab === 'tab1'">
<h2>Tab One</h2>
<p>
这是第一个 tab
</p>
</div>
<div v-if="activeTab === 'tab2'">
<h2>Tab Two</h2>
<p>
这是第二个 tab
</p>
</div>
<div v-if="activeTab === 'tab3'">
<h2>Tab Three</h2>
<p>
这是第三个 tab
</p>
</div>
</div>
<mu-list>
<mu-sub-header>今天</mu-sub-header>
<mu-list-item :title="passive.name">
<mu-avatar :src="'http://ossweb-img.qq.com/images/lol/img/passive/'+passive.image" slot="leftAvatar" />
<p slot="describe">
<span style="color: rgba(0, 0, 0, .87)">{{passive.description}}</span>
</p>
</mu-list-item>
<mu-divider inset/>
</mu-list>
</mu-card>
</template>

<script>
import img from '../public/wscats.jpg'
export default {
data() {
return {
img: img,
activeTab: 'tab1',
hero: [],
passive: {},
}
},
computed: {
token() {
return this.$store.state.token;
}
},
methods: {
getDetail() {
var self = this;
$.ajax({
url: "http://lolapi.games-cube.com/GetChampionDetail?champion_id=1",
type: "GET",
headers: {
"DAIWAN-API-TOKEN": self.token
},
success: function(data) {
console.log(data);
self.hero = data.data[0];
//被动图片
self.passive = {
image: data.data[0].passive.image.full,
description: data.data[0].passive.description,
name: data.data[0].passive.name
}
}
});
},
handleTabChange(val) {
this.activeTab = val
},
handleActive() {
window.alert('tab active')
}
},
mounted() {
this.getDetail()
}
}
</script>

<style lang="css">
</style>
58 changes: 58 additions & 0 deletions app/wdetail.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<template>
<article class="weui-article">
<h1>{{detail.title}}</h1>
<section>
<h2 class="title">{{detail.channel_name}}</h2>
<section>
<h3>{{detail.id}}</h3>
<p>
{{detail.text}}
</p>
<p>
<img src="" alt="">
<img src="" alt="">
</p>
</section>
<section>
<h3>{{detail.title}}</h3>
<p>
{{detail.text}}
</p>
</section>
</section>
</article>
</template>
<script>
export default {
data() {
return {
detail:[]
}
},
methods: {
getDetail(callback) {
$.ajax({
type: "get",
//url: "http://localhost:81/news/php/index.php/news_api/show_detail",
url: "./api/detail.json",
data: {
//获取路由的参数
id: this.$route.params.id
},
async: true,
success: function(data) {
callback(data)
//callback(JSON.parse(data))
}
});
}
},
mounted() {
var self = this;
this.getDetail(function(data){
console.log(data)
self.detail = data.news_list[0];
});
}
}
</script>
Loading

0 comments on commit cf037b8

Please sign in to comment.