my_history.html 4.7 KB
<!doctype html>
<html lang="en">
<head>
		<meta charset="UTF-8">
		<meta name="viewport"
		      content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
		<meta http-equiv="X-UA-Compatible" content="ie=edge">
		<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
		<script src="../../assets/js/fontsize.js"></script>
		<link rel="stylesheet" href="../../assets/css/api.css"/>
		<link rel="stylesheet" href="../../assets/css/index.css">
		<link rel="stylesheet" href="../../assets/icon/iconfont.css">
		<title></title>
		<style>
				body, html {
						background-color: #efefef;
				}

				.his_item {
						background-color: #fff;
						margin: .35rem;
						display: flex;
						align-items: center;
						justify-content: space-between;
						font-size: 12px;
						color: #a7a7a7;
						border-radius: 0.2rem;
				}

				.his_item_ok {
						-webkit-box-shadow: 0 0.15rem 0 #D8B25F;
						-moz-box-shadow: 0 0.15rem 0 #D8B25F;
						box-shadow: 0 0.15rem 0 #D8B25F;
						padding: 0.12rem 0.4rem 0.12rem 0.23rem;
				}

				.his_item_no {
						-webkit-box-shadow: 0 0.15rem 0 #b0b0b0;
						-moz-box-shadow: 0 0.15rem 0 #b0b0b0;
						box-shadow: 0 0.15rem 0 #b0b0b0;
						padding: 0.12rem 0.4rem 0.12rem 0.8rem;
				}

				.his_item_img {
						width: 1.85rem;
				}

				.his_item_img img {
						width: 100%;
				}

				.history_ok:after {
						/*border-bottom: 1px solid #D8B25F;*/
						content: " ";
						position: absolute;
						width: 70%;
						right: 0;
						bottom: -0.02rem;
						left: 0;
						border-bottom: 2px solid #D8B25F;
				}

				.history_no {
						position: relative;
				}

				.history_no:after {
						content: " ";
						position: absolute;
						width: 70%;
						right: 0;
						bottom: -0.02rem;
						left: 0;
						border-bottom: 2px solid #b0b0b0;
				}

				.inblock {
						font-size: 15px;
						color: #6d6d6d;
				}

				.history_ok {
						position: relative;
				}
		</style>
</head>
<body>
<div id="loadStart"></div>
<div id="app" v-cloak>
		<div v-for="(item,index) in history_list">
				<!--<div :class='["his_item",item.remark=="已完善"?"his_item_no":"his_item_ok"]' @click="openHome(item.name,index)"-->
				<div class='his_item his_item_ok' @click="openHome(item.name,index)"
				     v-if="index%2==1">
						<div class="his_item_img"><img :src="item.img"/></div>
						<div class="inblock">
								<span :class='[item.remark=="已完善"?"history_no":"history_ok"]'>{{item.name}}</span>
						</div>
						<div>{{item.remark}}</div>
				</div>
				<div class='his_item his_item_no' @click="openHome(item.name,index)"
				     v-else>
						<div class="inblock">
								<span :class='[item.remark=="已完善"?"history_no":"history_ok"]'>{{item.name}}</span>
						</div>
						<div class="his_item_img"><img :src="item.img"/></div>
						<div>{{item.remark}}</div>
				</div>
		</div>
</div>
</body>
</html>
<script type="text/javascript" src="../../assets/js/api.js"></script>
<script type="text/javascript" src="../../assets/js/public.js"></script>
<script type="text/javascript" src="../../assets/js/fastclick.js"></script>
<script>
    new FastClick(document.body);
</script>
<script type="text/javascript" src="../../assets/js/vue.min.js"></script>
<script type="text/javascript" src="../../assets/js/axios.min.js"></script>
<script type="text/javascript" src="../../assets/icon/iconfont.js"></script>
<script>
    var app = new Vue({
        el: '#app',
        data: {
            history_list: [],
            rid: '',
        },
        created: function () {
            var app = this;
			app.rid = localStorage.getItem('rid');
			// alert(app.rid);
			app.question();
        },
        methods: {
//            打开详情
            openHome: function (name, index) {

                var app = this;
                openView('history_detail', '../my/history_detail', name, 'history_detail', false, {
                    rid: app.rid,
                    id: index
                })
            },
//            获取完善情况
            question: function () {
                var app = this;
                var header = {
                    'XX-Device-Type': getDevice(),
                    'XX-Token': getToken()
                };

                var post = {
                    rid: app.rid
                };
                getRequest('post', 'user/index/question', post, header).then(function (res) {
//                    alert(JSON.stringify(res.data.data));
                    if (res.data.code == 1) {
                        app.history_list = res.data.data;
                         loadEnd();
                    } else {
                        toastMsg(res.data.msg)
                    }
                })
            }
        }
    })
</script>