Commit a93a3da5 by 王锐

个人中心修改

parent 07f28489
......@@ -33,7 +33,7 @@ var originalConfig = {
'Assets': resolve('src/assets'),
'Service': resolve('src/service'),
'Plugins': resolve('src/Plugins'),
'Components': resolve('src/Components'),
'Components': resolve('src/components'),
'Directives': resolve('src/directives'),
'styles': resolve('src/assets/styles'),
}
......
[0325/091852.500:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
[0424/092055.599:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
[0506/090148.529:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
[0507/091459.984:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
......@@ -13,6 +13,9 @@
<script src="static/js/mui.js"></script>
<script src="static/js/pinyin_dict_firstletter.js"></script>
<script src="static/js/pinyinUtil.js"></script>
<style>
* { touch-action: pan-y; }
</style>
</head>
<body style="overflow:visible; ">
......@@ -59,9 +62,8 @@
}
}
};
</script>
</body>
</html>
\ No newline at end of file
</html>
......@@ -81,10 +81,10 @@
p {
font-weight: normal;
}
/* a:active {
.yd-navbar-item:active {
background: rgb(194, 193, 193);
color: rgb(78, 78, 78);
} */
}
@import "./assets/icon/iconfont.css";
@import "./assets/style/index.scss";
</style>
......
<template>
<div class="home-news">
<div class="home-news-left">
<b>视点推荐</b>
</div>
<div class="home-news-right">
<yd-rollnotice autoplay="2000" :height="'40'" style="font-size:0.3rem ;color:#999;">
<yd-rollnotice-item>
<span class="home-news-rollnotice">
<span style="color:#FF6A6A;"></span>&nbsp;比较重要的行业资讯业资讯业资业资业资业资
</span>
</yd-rollnotice-item>
</yd-rollnotice>
</div>
</div>
</template>
<script>
export default {};
</script>
<style>
.home-news {
background-color: white;
overflow: hidden;
height: 40px;
width: 100%;
}
.home-news-left {
margin-left: 0.3rem;
margin-right: 0.4rem;
float: left;
height: 40px;
font-size: 0.3rem;
display: flex;
align-items: center;
background-color: white;
}
.home-news-right {
float: left;
}
.home-news-rollnotice {
width: 210px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
</style>
<template>
<div class="parent">
<div class="child"></div>
</div>
</template>
<script>
export default {
data() {
return {
state: "",
top: 0,
startY: 0, // 保存 y轴点的位置
touching: false // 代表当前是否处于 下拉刷新行为的开关,也就是当属于滚动行为时,就要退出该事件机制
};
},
methods: {
touchStart(e) {
// e代表该事件对象,e.targetTouches[0].pageY可以拿到手指按下的 y轴点
this.startY = e.targetTouches[0].pageY; // 开启下拉刷新状态
this.touching = true;
},
touchMove(e) {
//这个 touchMove,只要页面在动都会发生的,所以 touching就起作用了
// 如果 touching为false,说明这个正在移动的页面不是我们想要的下拉刷新,有可能是用户随意拉了一下页面而已,或者其他
if (!this.touching) return; // 获取移动的距离
let diff = e.targetTouches[0].pageY - this.startY; //判断是向上拉还是向下拉
if (diff > 0) {
e.preventDefault();
} else {
return;
} //这个this.top要对应绑定到该元素的transform: translateY(+top+ 'px')上,不然是无法拉动的 // 因此这里还要对偏移高度做一下处理,直接设置diff +(this.state === 2 ? 40 : 0) 太快了,因为拉取幅度太大 // 让diff*0.25这样子就差不多了
this.top = Math.floor(diff * 0.25) + (this.state === 2 ? 40 : 0);
if (this.top >= 40) {
this.state = 1; //代表正在拉取
} else {
this.state = 0; // 代表初始转态
}
},
touchEnd(e) {
this.touching = false;
if (this.state === 2) {
this.top = 40;
return;
} // 判断抬起时的高度,是大于40 就开启刷新
if (this.top >= 40) {
this.refresh();
} else {
this.state = 0;
this.top = 0;
}
},
refresh() {
this.state = 2;
this.top = 40;
const self = this; // 这里可以调用父组件的方法去请求刷新接口
this.$emit("getRefresh", function(self) {
//传个回调过去,请求完数据就复原
self.state = 0;
self.top = 0;
});
}
}
};
</script>
\ No newline at end of file
<template>
<yd-infinitescroll :callback="pullList" ref="infinitescrollDemo">
<yd-pullrefresh :callback="downList" ref="pullrefreshDemo">
<yd-list theme="1" slot="list">
<yd-list-item v-for="(item, key) in list" :key="key">
<img slot="img" :src="item.img">
<span slot="title">{{item.title}}</span>
<yd-list-other slot="other">
<div>
<span class="list-price">
<em>¥</em>
{{item.marketprice}}
</span>
<span class="list-del-price">¥{{item.productprice}}</span>
</div>
<div>content</div>
</yd-list-other>
</yd-list-item>
</yd-list>
<!-- 数据全部加载完毕显示 -->
<span slot="doneTip">啦啦啦,啦啦啦,没有数据啦~~</span>
<!-- 加载中提示,不指定,将显示默认加载中图标 -->
<img slot="loadingTip" src="http://static.ydcss.com/uploads/ydui/loading/loading10.svg">
</yd-pullrefresh>
</yd-infinitescroll>
</template>
<script type="text/babel">
export default {
data() {
return {
page: 1,
pageSize: 10,
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() {
this.$http
.jsonp("http://list.ydui.org/getdata.php?type=backposition", {
params: {
page: this.page,
pagesize: this.pageSize
}
})
.then(function(response) {
const _list = response.body;
this.list = [...this.list, ..._list];
if (_list.length < this.pageSize || this.page == 3) {
/* 所有数据加载完毕 */
this.$refs.infinitescrollDemo.$emit(
"ydui.infinitescroll.loadedDone"
);
return;
}
/* 单次请求数据完毕 */
this.$refs.infinitescrollDemo.$emit("ydui.infinitescroll.finishLoad");
this.page++;
});
}
}
};
</script>
\ No newline at end of file
......@@ -11,14 +11,7 @@
</a>
</router-link>
<router-link to="/checkstandard" tag="dl" active-class="footeractive3">
<a href="javascript:;">
<dt>
<i class="iconfont icon-ren">&#xe638;</i>
</dt>
<dd>标准</dd>
</a>
</router-link>
<router-link to="/group" tag="dl" active-class="footeractive4">
<a href="javascript:;">
......@@ -49,6 +42,8 @@
height: 1rem;
border-top: #ddd 1px solid;
background: #f7f7f7;
display: flex;
justify-content: space-around;
}
.footNav dl {
float: left;
......@@ -72,9 +67,7 @@
.footNav .footeractive2 {
color: #437dff;
}
.footNav .footeractive3 {
color: #63f7de;
}
.footNav .footeractive4 {
color: #87c596;
}
......
<template>
<div
class="my-scroll"
:class="[scrollState?'prohibit':'allow']"
ref="myScroll"
@scroll.passive="onScroll($event)"
@touchstart="touchStart($event)"
@touchmove="touchMove($event)"
@touchend="touchEnd($event)"
>
<div class="scroll-top" :style="{height:top+'px'}">
<div v-if="aspect==2">
<p style="color:red;" v-if="state==6">下拉刷新</p>
<p v-if="state==1">
<i>
<img src="../assets/img/pullrefresh.gif">
</i>
<br>
<a style="color:red;">刷新中</a>
</p>
<p style="color:red;" v-if="state==2">松开刷新</p>
<p style="color:red;" v-if="state==3">
<i>
<img src="../assets/img/pullrefresh.gif">
</i>
<br>刷新完成
</p>
</div>
</div>
<!-- top -->
<div class="scroll-list" :style="{ transform: 'translate3d(0, ' + top + 'px, 0)'}">
<slot name="scrollList"></slot>
<div style="color:red;" class="scroll-bottom">
<div v-if="state==4">加载中</div>
<div v-if="state==5">加载完成</div>
<div v-if="state==7">没有更多</div>
</div>
</div>
</div>
</template>
<script type="text/javascript">
// import tween from '@/plugins/tween'
// import Load from '@/assets/Load.gif'
export default {
name: "myScroll",
props: {
page: {
type: Object //counter:当前页 pageStart:开始页数 pageEnd:结束页数 total:总页数
},
onRefresh: {
//刷新回调
type: Function,
require: true
},
onPull: {
//加载回调
type: Function,
require: true
},
getScrollTop: {
//获取滚动条位置
type: Function
},
setScrollPage: {
//改变滚动条位置
type: Function
},
scrollState: {
//是否可滑动
type: Boolean,
require: true
}
},
data() {
return {
// Load,
pageX: 0,
pageY: 0,
state: 0,
scrollPosition: 0,
myScroll: null,
myScrollList: null,
top: 0,
aspect: 0, //1:向下 2:向上
listHeight: 0
};
},
created() {},
methods: {
ScrollTop(top) {
//修改滚动条位置
this.myScroll.scrollTop = top;
},
easeInOut(t, b, c, d) {
if ((t /= d / 2) < 1) return (c / 2) * t * t * t * t + b;
return (-c / 2) * ((t -= 2) * t * t * t - 2) + b;
},
/*
* 刷新中:1
* 松开刷新:2
* 刷新完成:3
* 加载中:4
* 加载完成:5
* 下拉刷新:6
* 没有更多:7
*/
setState(index) {
//修改状态
this.state = index;
if (index == 5 || index == 3) {
setTimeout(() => {
this.state = 0;
let timer = null;
let that = this;
var b = 50,
c = 100,
d = 100,
t = 0;
cancelAnimationFrame(timer);
timer = requestAnimationFrame(function fn() {
var oTop = that.top;
if (that.top > 0) {
that.top =
Math.ceil(that.easeInOut(10, oTop, 8, 10)) - 15;
timer = requestAnimationFrame(fn);
} else {
cancelAnimationFrame(timer);
that.top = 0;
}
});
}, 500);
}
},
touchStart(e) {
//触摸事件
this.pageX = e.targetTouches[0].pageX;
this.pageY = e.targetTouches[0].pageY;
},
touchMove(e) {
//触摸滑动事件
// console.log( this.scrollPosition)
if (document.documentElement.scrollTop == 0) {
this.scrollPosition = this.myScroll.scrollTop; //获取滚动条位置
if (this.scrollState && e.targetTouches[0].pageY > this.pageY) {
//向上滑动
this.aspect = 2;
if (this.myScroll.scrollTop == 0) {
let diff =
e.targetTouches[0].pageY -
this.pageY -
this.scrollPosition;
// console.log(diff)
this.top = Math.pow(diff, 0.9);
let ranget = (diff / document.body.clientHeight) * 100; //计算在屏幕上滑动了多少
if (ranget > 10) {
this.state = 2;
this.top = 50;
} else if (ranget < 5) {
this.state = 6;
}
e.preventDefault();
}
} else if (this.scrollState && this.state != 4) {
//向上滑动
this.aspect = 1;
}
}
},
touchEnd(e) {
if ((this.aspect == 2 && this.state == 2) || this.state == 1) {
//上拉处理
this.top = 50;
this.state = 1;
this.topCallback();
} else if (this.aspect == 2) {
this.state = 0;
this.top = 0;
}
},
onScroll(e) {
let listHeight = this.myScrollList.offsetHeight; //列表总高度
let listScrollTop = e.target.scrollTop + this.myScroll.offsetHeight; //当前滚动条位置
if (this.state == 0 && listHeight - listScrollTop < 100) {
this.bottomCallback();
}
if (this.getScrollTop) this.getScrollTop(e.target.scrollTop); //返回X,Y
},
topCallback() {
//刷新回调
this.onRefresh(this.state);
},
bottomCallback() {
//加载回调
if (this.state != 7) {
this.state = 4;
this.onPull(this.state);
}
}
},
mounted() {
this.myScroll = this.$refs.myScroll; //获取滑条dom
this.myScrollList = this.myScroll.children[1]; //获取列表dom
// console.log(this.myScroll)
}
};
</script>
<style lang="scss" scoped>
.allow {
overflow: hidden;
height: auto;
}
.prohibit {
max-width: 100%;
max-height: 100%;
height: 100%;
overflow: hidden;
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
will-change: transform;
transition: all 450ms;
backface-visibility: hidden;
perspective: 1000;
}
.my-scroll {
position: relative;
color: #fff;
.scroll-top {
text-align: center;
display: flex;
position: absolute;
top: 0;
left: 0;
width: 100%;
overflow: hidden;
div {
display: flex;
height: auto;
width: 100%;
justify-content: center;
align-items: center;
flex-wrap: wrap;
i {
flex: 1 0 100%;
display: block;
height: 0.4rem;
}
img {
width: 0.6rem;
}
p {
flex: 1 0 100%;
}
}
}
.scroll-list {
overflow: hidden;
min-height: 100%;
}
.scroll-bottom {
text-align: center;
line-height: 40px;
}
}
</style>
<template>
<yd-search :result="result" fullpage v-model="value2" :item-click="itemClickHandler" :on-submit="submitHandler"></yd-search>
</template>
<script type="text/babel">
export default {
data() {
return {
value2: '',
result: []
}
},
methods: {
getResult(val) {
if (!val) return [];
return [
'Apple', 'Banana', 'Orange', 'Durian', 'Lemon', 'Peach', 'Cherry', 'Berry',
'Core', 'Fig', 'Haw', 'Melon', 'Plum', 'Pear', 'Peanut', 'Other'
].filter(value => new RegExp(val, 'i').test(value));
},
itemClickHandler(item) {
this.$dialog.toast({mes: `搜索:${item}`});
},
submitHandler(value) {
this.$dialog.toast({mes: `搜索:${value}`});
}
},
watch: {
value2(val) {
this.result = this.getResult(val);
}
}
}
</script>
\ No newline at end of file
......@@ -26,6 +26,15 @@ export default[
}
},
{
name: "about",
path: "/about",
component: resolve => require(['Views/user/about'], resolve),
meta: {
requireAuth: true,
}
},
{
name: "feedback",
path: "/feedback",
......
......@@ -18,10 +18,10 @@
<p class="repo_title">
<b>{{item.ReportId}}</b>
</p>
<p class="repo_content">款号:</p>
<p class="repo_content">生产企业:{{item.ProductOrgName}}</p>
<p class="repo_content">商标</p>
<p class="repo_content">签发日期</p>
<p class="repo_content">检验结果</p>
<p class="repo_content">检验结果{{item.ProductJudgement}}</p>
</router-link>
</yd-list>
......@@ -62,7 +62,7 @@ export default {
return;
}
/* 单次请求数据完毕 */
/* 单次请求数据完毕 */
vm.$refs.infinitescrollDemo.$emit("ydui.infinitescroll.finishLoad");
vm.page++;
......@@ -77,7 +77,7 @@ export default {
var vm = this;
vm.$ajax.get(url).then(res => {
vm.results = res.data.Results;
console.log(vm.results);
console.log(res.data.Results);
});
}
},
......
......@@ -60,7 +60,8 @@
<p>我的合同</p>
</div>
</router-link>
<router-link tag="div" to="grorder" class="home_list">
<router-link tag="div" to="#" @click.native="xxx" class="home_list">
<!-- <router-link tag="div" to="grorder" class="home_list"> -->
<img src="../../assets/img/wodedingdan.png" alt>
<div>
<p>我的订单</p>
......@@ -79,9 +80,9 @@ export default {
scancode() {
this.$router.push({ path: "qrcode" });
},
created() {
}
xxx(){
window.location.href="file:///storage/emulated/0/Android/data/io.dcloud.HBuilder/downloads/dist/index.html"
}
}
};
</script>
......
<template>
<div>
<yd-navbar title="关于">
<a href="javascript:;window.history.go(-1)" slot="left">
<yd-navbar-back-icon></yd-navbar-back-icon>
</a>
</yd-navbar>
</div>
</template>
......@@ -5,17 +5,27 @@
<yd-navbar-back-icon></yd-navbar-back-icon>
</a>
</yd-navbar>
<div class="fd-box">
<yd-cell-item>
<yd-textarea style="border:1px solid #f1f1f1;" slot="right" placeholder="请输入反馈内容,我们将尽快给您回复。" maxlength="200"></yd-textarea>
<yd-textarea slot="right" placeholder="请输入反馈内容,我们将尽快给您回复。" maxlength="200"></yd-textarea>
</yd-cell-item>
<yd-button style="border-radius:4px; width:95%; margin-left:2.5%;" size="large" type="primary" shape="angle">提交</yd-button>
</div>
</div>
</template>
<style>
.inputbox{
width:90%;
margin-left: 5%;
<style scoped >
.fd-box{
background: white;
position: absolute;
top: 1rem;
bottom: 0;
left: 0;
right: 0;
margin: auto;
}
</style>
......@@ -12,7 +12,7 @@
<img src="static/img/userright.png">
</div>
</div>
<router-link to="changename" tag="div" class="userinfo-list">昵称
<router-link to="changename" tag="div" class="userinfo-list">姓名
<div class="userinfo-list-right">
<p>{{username}}</p>
<img src="static/img/userright.png">
......
<template>
<div class="myuser">
<router-link to="personalinformation" class="myuser-header">
<router-link to="#" class="myuser-header">
<div class="myuser-header-left">
<img class="myuser-head" :src="Avatar ? Avatar : 'static/img/head.png'">
<div class="myuser-header-name">
......@@ -8,52 +8,55 @@
<p>{{phone}}</p>
</div>
</div>
<img style=" height: 0.4rem; margin-right:0.2rem;" src="static/img/userright.png" alt>
</router-link>
<div class="myuser-list">
<div class="myuser-clear"></div>
<div class="myuser-list-order">
<router-link tag="div" to="personalinformation" class="myuser-list-order">
<div>
<i class="iconfont icon-ren">&#xe693;</i>
<span>我的订单</span>
<img src="../../assets/img/usercenter.png" alt>
<span>个人信息</span>
</div>
<img src="static/img/userright.png" alt>
</div>
</router-link>
<div class="myuser-clear"></div>
<div class="myuser-list-order">
<div>
<i class="iconfont icon-ren">&#xe605;</i>
<span>设备管理</span>
<img src="../../assets/img/order.png" alt>
<span>我的订单</span>
</div>
<img src="static/img/userright.png" alt>
</div>
<div class="myuser-clear"></div>
<div class="myuser-list-order">
<div>
<i class="iconfont icon-ren">&#xe607;</i>
<span>清理缓存</span>
<img src="../../assets/img/safe.png" alt>
<span>账户安全</span>
</div>
<img src="static/img/userright.png" alt>
</div>
<div class="myuser-clear"></div>
<div class="myuser-list-order">
<div>
<i class="iconfont icon-ren">&#xe63a;</i>
</div>
<router-link tag=div to="feedback" class="myuser-list-right">
<img src="../../assets/img/feedback.png" alt>
<router-link tag="div" to="feedback" class="myuser-list-right">
<span>建议反馈</span>
<img src="static/img/userright.png" alt>
</router-link>
</div>
<div class="myuser-list-order">
<div>
<i class="iconfont icon-ren">&#xe6b7;</i>
<span>人工客服</span>
</div>
<img src="static/img/userright.png" alt>
<div class="myuser-clear"></div>
<div class="myuser-list-order">
<img src="../../assets/img/about.png" alt>
<router-link tag="div" to="about" class="myuser-list-right">
<span>关于</span>
<img src="static/img/userright.png" alt>
</router-link>
</div>
</div>
<div @click="quit" class="myuser-quit">
......@@ -62,47 +65,44 @@
</div>
</template>
<script>
import { removeStore , getStore} from "../../components/common/mixin";
import { removeStore, getStore } from "../../components/common/mixin";
export default {
data() {
return {
ifquit: false,
username:'',
phone:'',
Avatar:''
username: "",
phone: "",
Avatar: ""
};
},
created(){
var vm=this;
vm.username=JSON.parse(getStore("userinfo")).DisplayName;
vm.phone=JSON.parse(getStore("userinfo")).phone;
vm.Avatar=JSON.parse(getStore("userinfo")).Avatar
created() {
var vm = this;
vm.username = JSON.parse(getStore("userinfo")).DisplayName;
vm.phone = JSON.parse(getStore("userinfo")).phone;
vm.Avatar = JSON.parse(getStore("userinfo")).Avatar;
},
methods: {
quit() {
var vm = this;
vm.ifquit = true;
vm.$ajax.post('/auth/logout.json', {
}).then(function(response){
vm.$store.dispatch("SET_TOKEN", 0);
vm.$dialog.loading.open('正在退出');
setTimeout(() => {
vm.$dialog.loading.close();
vm.$router.replace({ path: "/home" });
}, 2000);
removeStore("queryModules")
vm.$ajax.post("/auth/logout.json", {}).then(function(response) {
vm.$store.dispatch("SET_TOKEN", 0);
vm.$dialog.loading.open("正在退出");
setTimeout(() => {
vm.$dialog.loading.close();
vm.$router.replace({ path: "/home" });
}, 2000);
removeStore("queryModules");
});
},
}
},
beforeRouteLeave(to, from, next) {
if(this.ifquit){
to.meta.keepAlive = false; // C 跳转到 A 时让 A 不缓存,即刷新
}
next();
}
beforeRouteLeave(to, from, next) {
if (this.ifquit) {
to.meta.keepAlive = false; // C 跳转到 A 时让 A 不缓存,即刷新
}
next();
}
};
</script>
......@@ -149,7 +149,6 @@ export default {
}
.myuser-header-name p:nth-child(2) {
font-size: 0.3rem;
}
.myuser-header-office {
color: white;
......
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