Commit 58b95a02 by 王锐

1

parent 9249fc5a
......@@ -25,7 +25,6 @@
// btn6.onclick=function(){
// alert(16)
// }
// }
window.onload = function () {
......
......@@ -14,16 +14,16 @@
export default {
name: "App",
data() {
return { comlist: [], d: "index" };
return { comlist: [], viewId:"index" };
},
created() {
if (!this.getQueryVariable("d")) {
this.d = "login";
if (!this.getQueryVariable("viewId")) {
this.viewId = "report";
} else {
this.d = this.getQueryVariable("d");
this.viewId = this.getQueryVariable("viewId");
}
this.$get(`/api/api/${this.d}.json?t=` + Math.random()).then(res => {
this.$get(`/api/api/${this.viewId}.json?t=` + Math.random()).then(res => {
console.log(res);
this.comlist = res;
});
......@@ -50,5 +50,6 @@ export default {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
color: #2c3e50;
}
</style>
<template>
<yd-infinitescroll :callback="loadList" ref="infinitescrollKv">
<yd-list theme="1" slot="list">
<div v-for="(item, key) in list" :key="key">
<img slot="img" :src="item.img" />
<span slot="title">{{item.title}}</span>
</div>
</yd-list>
<!-- 数据全部加载完毕显示 -->
<span slot="doneTip">啦啦啦,啦啦啦,没有数据啦~~</span>
<!-- 加载中提示,不指定,将显示默认加载中图标 -->
<img slot="loadingTip" src="path/img/loading.svg" />
</yd-infinitescroll>
</template>
<script type="text/babel">
export default {
data() {
return {
page: 0,
pageSize: 20,
list: [
{
img: "http://img1.shikee.com/try/2016/06/23/14381920926024616259.jpg",
title: "标题标题标题标题标题",
marketprice: 56.23,
productprice: 89.36
},
{
img: "http://img1.shikee.com/try/2016/06/21/10172020923917672923.jpg",
title: "骆驼男装2016夏装男士短袖T恤 圆领衣服 印花男装体恤 半袖打底衫",
marketprice: 56.23,
productprice: 89.36
},
{
img: "http://img1.shikee.com/try/2016/06/23/15395220917905380014.jpg",
title: "条纹短袖T恤男士韩版衣服大码潮流男装夏季圆领体恤2016新款半袖",
marketprice: 56.23,
productprice: 89.36
},
{
img: "http://img1.shikee.com/try/2016/06/25/14244120933639105658.jpg",
title: "夏季青少年衣服男生潮牌t恤 男士 夏秋学生 日系棉短袖半袖男小衫",
marketprice: 56.23,
productprice: 89.36
},
{
img: "http://img1.shikee.com/try/2016/06/26/12365720933909085511.jpg",
title: "2016夏装新款时尚潮流短袖T恤男纯棉V领日系青少年韩版夏季上衣服",
marketprice: 56.23,
productprice: 89.36
},
{
img: "http://img1.shikee.com/try/2016/06/19/09430120929215230041.jpg",
title: "男装衣服男夏t恤 男士短袖t恤圆领夏季潮牌宽松原宿风半截袖男",
marketprice: 56.23,
productprice: 89.36
}
]
};
},
methods: {
loadList() {
var vm = this;
this.$get(
"http://k5.jst-gov.com/Restful/Jst.Lims.Entities.Contract/Query.json",
{
Skip: vm.page * 20,
Take: vm.pageSize
}
).then(function(response) {
const _list = response.Results;
console.log(vm.list);
vm.list = [...vm.list, ..._list];
console.log(vm.list);
if (_list.length < vm.pageSize) {
/* 所有数据加载完毕 */
vm.$refs.infinitescrollKv.$emit("ydui.infinitescroll.loadedDone");
return;
}
/* 单次请求数据完毕 */
vm.$refs.infinitescrollKv.$emit("ydui.infinitescroll.finishLoad");
vm.page++;
});
}
}
};
</script>
\ No newline at end of file
<template>
<div class="hello">
<div @click="to1">传值</div> zi 2
{{msg}}
</div>
</template>
<script>
import bus from "../assets/bus.js";
export default {
name: "HelloWorld",
data() {
return {
msg: "子2"
};
},
mounted() {
var vm = this;
bus.$on("userDefinedEvent", function(msg) {
vm.msg = msg;
});
},
methods: {
to1() {
bus.$emit("toson","来自2")
}
}
};
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h1,
h2 {
font-weight: normal;
}
ul {
list-style-type: none;
padding: 0;
}
li {
display: inline-block;
margin: 0 10px;
}
a {
color: #42b983;
}
</style>
......@@ -22,18 +22,16 @@ import * as custom from "./common/filters"
Object.keys(custom).forEach(key => {
Vue.filter(key, custom[key])
})
export let bus = new Vue
Vue.prototype.$post = post;
Vue.prototype.$get = get;
Vue.prototype.$patch = patch;
Vue.prototype.$put = put;
/* eslint-disable no-new */
import VueAwesomeSwiper from 'vue-awesome-swiper'
// require styles
import 'swiper/dist/css/swiper.css'
Vue.use(VueAwesomeSwiper, /* { default global options } */ )
new Vue({
el: '#app',
router,
......
<template>
<div class="weui-cells">
<yd-cell-item arrow v-for="(item,index) of jsondata" :key="index">
<img slot="icon" :src="item.icon">
<span slot="left" style="font-size:0.3rem;">{{item.title}}</span>
<span slot="right"></span>
</yd-cell-item>
<a :href="uiConfig.href" v-for="(item,index) of item" :key="index" style="display:block;">
<yd-cell-item arrow>
<img slot="icon" :src="item.img" />
<span slot="left" style="font-size:0.3rem;">{{item.title}}</span>
<span slot="right"></span>
</yd-cell-item>
</a>
</div>
</template>
<script>
export default {
name: "KvCelllist",
props: {
jsondata: {
type: Array,
dataSource: {
type: Object,
default: function() {
return [
{
"icon": "../../../static/fankui.png",
"title": "反馈记录",
"href": "javascript:;"
},
{
"icon": "../../../static/lianxi.png",
"title": "客服经理",
"href": "javascript:;"
}
];
return {
url: "",
root: "",
fields: {
img: "Img",
title: "Title"
}
};
}
},
uiConfig: {
type: Object,
default: function() {
return {
href: "javascript:;"
};
}
}
},
data() {
return {};
return {
item: ""
};
},
created() {},
mounted() {}
mounted() {
var vm = this;
var item = vm.dataSource.fields;
this.$get(this.dataSource.url).then(res => {
var list = [];
for (let i = 0; i < res.length; i++) {
var obj = {};
for (const key in item) {
obj[key] = res[i][item[key]];
}
list.push(obj);
}
vm.item = list;
});
}
};
</script>
<style scoped>
.weui-cells {
background-color: #ffffff;
}
.yd-cell-item{
.yd-cell-item {
border-bottom: 1px solid #e1e1e1;
}
.yd-cell-item img{
.yd-cell-item img {
height: 0.4rem;
}
</style>
\ No newline at end of file
......@@ -3,7 +3,7 @@
<footer class="footer">
<a
v-for="(item, index) in item"
:href="uiConfig.href"
:href="uiConfig.href+item.view"
:class="[item.active?'footer_active':'']"
:key="index"
>
......
......@@ -5,16 +5,31 @@
v-if="uiConfig.titleSwitch"
>{{uiConfig.titleContent}}</div>
<div class="funlist_content">
<a
v-for="(item,index) of item"
:key="index"
class="funlist_list"
:href="uiConfig.href"
>
<img :src="item.img" alt />
<div>
<p>{{item.title}}</p>
<a v-for="(item,index) of item" :key="index" class="funlist_list" :href="uiConfig.href">
<div class="funlist_left" v-if="'left'==uiConfig.type">
<img :src="item.img" alt />
<div>
<p>{{item.title}}</p>
</div>
</div>
<div class="funlist_right" v-if="'right'==uiConfig.type">
<div>
<p>{{item.title}}</p>
</div>
<img :src="item.img" alt />
</div>
<div class="funlist_top" v-if="'top'==uiConfig.type">
<img :src="item.img" class="subtitle" alt />
<!-- <p style="color:#FF9102" class="subtitle">1111</p> -->
<div>
<p>{{item.title}}</p>
</div>
</div>
<div class="funlist_bottom" v-if="'bottom'==uiConfig.type">
<div>
<p>{{item.title}}</p>
</div>
<img :src="item.img" class="subtitle" alt />
</div>
</a>
</div>
......@@ -29,31 +44,27 @@ export default {
{
href: "javascript:;",
title: "进度查询",
img: "../static/inquiry.png",
id: "btn1"
img: "../static/inquiry.png"
},
{
href: "javascript:;",
title: "服务指南",
img: "../static/fwzn.png",
id: "btn2"
img: "../static/fwzn.png"
},
{
href: "javascript:;",
title: "扫码查询",
img: "../static/sys.png",
id: "btn3"
img: "../static/sys.png"
},
{
href: "javascript:;",
title: "快递查询",
img: "../static/kuaidi.png",
id: "btn4"
img: "../static/kuaidi.png"
}
]
};
},
mounted() {
mounted() {
var vm = this;
var item = vm.dataSource.fields;
this.$get(this.dataSource.url).then(res => {
......@@ -65,12 +76,10 @@ export default {
}
list.push(obj);
}
vm.item = list;
});
},
props: {
dataSource: {
type: Object,
default: function() {
......@@ -103,8 +112,23 @@ export default {
padding: 0 0.2rem;
box-shadow: #e1e1e1 0px 0px 10px;
}
.funlist_list:nth-child(2n) {
border-right: none;
}
.funlist_list img {
height: 0.5rem;
width: 0.5rem;
float: left;
}
.funlist_list p {
font-size: 0.28rem;
}
.funlist_list {
display: block;
}
.funlist_list .funlist_left {
border-bottom: 1px solid #e1e1e1;
border-right: 1px solid #e1e1e1;
padding: 0.2rem;
......@@ -118,32 +142,63 @@ export default {
justify-content: center;
}
.funlist_list:nth-child(2n) {
border-right: none;
}
.funlist_list:nth-child(5) {
border-bottom: none;
}
.funlist_list:nth-child(6) {
border-bottom: none;
}
.funlist_list img {
.funlist_list .funlist_left img {
margin-right: 0.2rem;
height: 0.5rem;
width: 0.5rem;
float: left;
}
.funlist_list .funlist_right {
border-bottom: 1px solid #e1e1e1;
border-right: 1px solid #e1e1e1;
padding: 0.2rem;
overflow: hidden;
width: 50%;
float: left;
text-align: center;
display: flex;
align-items: center;
height: 1.2rem;
justify-content: center;
}
.funlist_list p {
font-size: 0.28rem;
.funlist_list .funlist_right img {
margin-left: 0.2rem;
height: 0.5rem;
width: 0.5rem;
}
.funlist_list span {
font-size: 0.24rem;
color: rgb(120, 121, 120);
.funlist_list .funlist_top {
display: flex;
justify-content: space-around;
float: left;
padding: 20px 10px;
width: 33.33333333%;
box-sizing: border-box;
flex-direction: column;
align-items: center;
border-right: 1px solid #e1e1e1;
margin-bottom: 0.2rem;
}
.funlist_list .funlist_top .subtitle {
margin-bottom: 0.2rem;
}
.funlist_list .funlist_bottom {
display: flex;
justify-content: space-around;
float: left;
padding: 20px 10px;
width: 33.33333333%;
box-sizing: border-box;
flex-direction: column;
align-items: center;
border-right: 1px solid #e1e1e1;
}
.funlist_list:nth-child(3n) .funlist_bottom,
.funlist_list:nth-child(3n) .funlist_top {
border-right: none;
}
.funlist_list .funlist_bottom .subtitle {
margin-top: 0.2rem;
}
</style>
\ No newline at end of file
......@@ -4,6 +4,7 @@
<img :src="item.img" alt />
<div>{{item.title}}</div>
</a>
<!-- <a class="funlists_bottom_right" href="html/feedBack.html">
<img src="../../assets/xinfeng.png" alt />
<div>意见反馈</div>
......@@ -39,6 +40,7 @@ export default {
},
data() {
return {
item: [
{
title: "意见反馈",
......@@ -63,7 +65,6 @@ export default {
}
list.push(obj);
}
vm.item = list;
});
}
......@@ -71,11 +72,11 @@ export default {
</script>
<style scoped>
.funlists_bottom {
display: flex;
display: flex;
width: 100%;
padding: 0.2rem;
font-size: 0.28rem;
margin-bottom: 105px;
margin-bottom: 1rem;
}
.funlists_bottom_left {
......@@ -87,6 +88,7 @@ export default {
align-items: center;
justify-content: center;
border-radius: 4px;
float: left;
}
.funlists_bottom_left img {
......
......@@ -20,8 +20,9 @@ import KvChangeph from "./changephone/index"
import KvNews from "./news/index"
import KvLogin from "./login/index"
import KvRegister from "./register/index"
import KvPaymentdetail from "./paymentdetail/index"
const components = [
KvFooter, KvSwiper, KvRollnotice, KvFunlist, KvFunlists, KvUserlist, KvThreelist, KvCelllist, KvUserinfo, KvBusinesslist, KvTab, KvSearch, KvFeedback, KvFeedbacklist, KvInvoice, KvOverage, KvCollection, KvPassword,KvChangeph,KvNews,KvLogin,KvRegister
KvFooter, KvSwiper, KvRollnotice, KvFunlist, KvFunlists, KvUserlist, KvThreelist, KvCelllist, KvUserinfo, KvBusinesslist, KvTab, KvSearch, KvFeedback, KvFeedbacklist, KvInvoice, KvOverage, KvCollection, KvPassword,KvChangeph,KvNews,KvLogin,KvRegister,KvPaymentdetail
]
const install = function (Vue) {
if (install.installed) return
......@@ -51,5 +52,5 @@ export default {
KvInvoice,
KvOverage,
KvCollection,
KvPassword,KvChangeph,KvNews,KvLogin,KvRegister
KvPassword,KvChangeph,KvNews,KvLogin,KvRegister,KvPaymentdetail
}
<template>
<div style="background:white; padding:0.2rem;">
<h4
id="title"
style="width: 100%; text-align: center; padding-top:1rem; font-size:0.3rem;"
>{{item.title}}</h4>
<h4 id="title" style="width: 100%; text-align: center; font-size:0.36rem;">{{item.title}}</h4>
<p
id="time"
style="text-align: center; font-size: 14px; color: #898383; margin: 0.2rem 0;"
......@@ -42,10 +39,8 @@ export default {
var vm = this;
var item = vm.dataSource.fields;
var querys = {};
vm.dataSource.queryName.forEach(element => {
querys[element] = vm.getQueryVariable(element);
console.log(querys);
});
querys[vm.dataSource.queryName] = vm.getQueryVariable("contentId");
this.$get(this.dataSource.url, querys).then(res => {
console.log(res);
......
import paymentdetail from "./paymentdetail"
paymentdetail.install=function(Vue){
Vue.component(paymentdetail.name,paymentdetail)
}
export default paymentdetail
\ No newline at end of file
<template>
<div>
<yd-cell-group>
<yd-cell-item>
<span slot="left">订单编号</span>
<span slot="right">19248000024</span>
</yd-cell-item>
<yd-cell-item>
<span slot="left">订单类型</span>
<span slot="right">检测费</span>
</yd-cell-item>
<yd-cell-item>
<span slot="left">创建时间</span>
<span slot="right">2017-01-01</span>
</yd-cell-item>
<yd-cell-item>
<span slot="left">订单金额</span>
<span slot="right" style="color:orange;">100</span>
</yd-cell-item>
<yd-cell-item>
<span slot="left">支付方式</span>
<span slot="right">银行打款</span>
</yd-cell-item>
<yd-cell-item>
<span slot="left">付款银行</span>
<span slot="right">中国银行股份有限公司江苏省分行</span>
</yd-cell-item>
<yd-cell-item>
<span slot="left">付款账户</span>
<span slot="right">471558271347</span>
</yd-cell-item>
</yd-cell-group>
</div>
</template>
<script>
export default {
name: "KvPaymentdetail",
data() {
return {};
},
created() {},
mounted() {}
};
</script>
<style scoped>
.yd-cell-item {
border-bottom: 1px solid #e1e1e1;
}
</style>
\ No newline at end of file
businessint 报告
celllist 列表
changephone修改手机
collection 收藏
feedback 反馈
feedbacklist 反馈列表
footers 底部导航
funlist 功能列表
inVOCe 发票
news 新闻
overage 消费
password 修改密码
register 注册
search 搜索
swipers 轮播
tab 切换
userinfo 信息
rollnotice 公告
\ No newline at end of file
<template>
<yd-rollnotice :autoplay="uiConfig.autotime">
<yd-rollnotice-item v-for="(item,index) of item" :key="index">
<a :href="uiConfig.href+item.Kvid">
<a :href="'?viewId='+viewId+'&contentId='+item.contentId">
<img src="../../assets/laba.png" alt />
<span>{{item.title}}</span>
</a>
......@@ -14,7 +14,9 @@ export default {
name: "KvRollnotice",
data() {
return {
item: []
item: [],
viewId: "",
contentId: ""
};
},
props: {
......@@ -42,6 +44,8 @@ export default {
mounted() {
var vm = this;
var item = vm.dataSource.fields;
vm.viewId = item.contentId ? item.viewId : vm.uiConfig.viewId;
vm.contentId = item.contentId ? item.contentId : vm.uiConfig.contentId;
this.$get(this.dataSource.url).then(res => {
var list = [];
for (let i = 0; i < res.length; i++) {
......@@ -51,7 +55,6 @@ export default {
}
list.push(obj);
}
console.log(list)
vm.item = list;
});
}
......
<template>
<yd-tab>
<yd-tab-panel v-for="(item,index) of jsondata" :key="index" :label="item.labtitle">
<demo-businesslist :jsondata="item.itemlist"></demo-businesslist>
<demo-businesslist :dataSource="item.dataSource" :uiConfig="item.uiConfig"></demo-businesslist>
</yd-tab-panel>
</yd-tab>
</template>
......
......@@ -6,21 +6,19 @@
</div>
<p class="weui-grid__label">{{item.title}}</p>
</a>
</div>
</template>
<script>
export default {
name: "KvThreelist",
props:{
jsondata:{
type:Array,
default:function(){
return [
]
}
props: {
jsondata: {
type: Array,
default: function() {
return [];
}
},
},
data() {
return {};
......
import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
Vue.use(Router)
export default new Router({
routes: [
{
path: '/',
name: 'HelloWorld',
component: HelloWorld
}
]
})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment