Commit 12c189d1 by 尹烁恒

完成开发

parent 8fcec1c1
...@@ -36,6 +36,12 @@ ...@@ -36,6 +36,12 @@
"name": "counter", "name": "counter",
"pathName": "pages/counter/main", "pathName": "pages/counter/main",
"query": "" "query": ""
},
{
"id": -1,
"name": "result",
"pathName": "pages/logs/main",
"query": ""
} }
] ]
} }
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
scroll-y> scroll-y>
<div class="content-wrapper"> <div class="content-wrapper">
<div class="item-cell" v-for="(item, itemIndex) in itemList" :key="itemIndex" @click="handleItemCell(itemIndex)"> <div class="item-cell" v-for="(item, itemIndex) in itemList" :key="itemIndex" @click="handleItemCell(itemIndex)">
<!-- <img class="item-cell-image" src="../../assets/img/sel_box.png" :style="{ display: item.is_active ? 'none' : 'block'} "/> --> <img class="item-cell-image" src="../../assets/img/sel_box.png" :style="{ display: item.is_active ? 'none' : 'block'} "/>
<img class="item-cell-image" src="../../assets/img/sel_box_sel.png" :style="{ display: item.is_active ? 'block' : 'none'} "/> <img class="item-cell-image" src="../../assets/img/sel_box_sel.png" :style="{ display: item.is_active ? 'block' : 'none'} "/>
<img :src="item.img" class="item-img" mode="aspectFit" :lazy-load="true"/> <img :src="item.img" class="item-img" mode="aspectFit" :lazy-load="true"/>
<text class="item-text" :style="{color: item.is_active ? '#fff' : '#282828'}">{{item.name}}</text> <text class="item-text" :style="{color: item.is_active ? '#fff' : '#282828'}">{{item.name}}</text>
...@@ -173,6 +173,11 @@ export default { ...@@ -173,6 +173,11 @@ export default {
}) })
console.log(array, 'submit array') console.log(array, 'submit array')
console.log(JSON.stringify(array), 'json stringify array') console.log(JSON.stringify(array), 'json stringify array')
this.initData()
wx.redirectTo({
url: '/pages/logs/main'
})
this.initData()
}, },
// 获取详情 // 获取详情
fetchDetail(brand = '', page = 1) { fetchDetail(brand = '', page = 1) {
......
<template> <template>
<div class="index-page"> <div class="index-page">
<img src="../../assets/img/index-bg.jpg" class="index-bg"/> <img src="../../assets/img/index-bg.jpg" class="index-bg"/>
<img src="../../assets/img/index-bg-cover.jpg" class="index-bg-cover" /> <img src="../../assets/img/index-bg-cover.png" class="index-bg-cover" />
<img src="../../assets/img/index-start-button.jpg" class="index-start-button" @click="handleStart"/> <img src="../../assets/img/index-start-button.jpg" class="index-start-button" @click="handleStart"/>
<img src="../../assets/img/btn-more.png" class="btn-more"/>
</div> </div>
</template> </template>
...@@ -59,6 +60,7 @@ export default { ...@@ -59,6 +60,7 @@ export default {
height: 100vh; height: 100vh;
background: #c9baa8; background: #c9baa8;
text-align: center; text-align: center;
padding: 30rpx 0 0;
} }
.index-bg { .index-bg {
position: absolute; position: absolute;
...@@ -66,25 +68,24 @@ export default { ...@@ -66,25 +68,24 @@ export default {
height: 100%; height: 100%;
top: 0; top: 0;
left: 0; left: 0;
z-index: 1;
} }
.index-bg-cover { .index-bg-cover {
position: absolute; position: relative;
width: 659rpx; width: 659rpx;
height: 798rpx; height: 798rpx;
top: 30rpx; z-index: 1;
left: 50%;
transform: translate3d(-50%, 0 ,0);
z-index: 2;
} }
.index-start-button { .index-start-button {
position: absolute; position: relative;
width: 489rpx; width: 489rpx;
height: 123rpx; height: 123rpx;
bottom: 180rpx;
left: 50%;
transform: translate3d(-50%, 0, 0);
z-index: 3; z-index: 3;
margin: 50rpx 0 30rpx;
}
.btn-more {
position: relative;
width: 489rpx;
height: 123rpx;
z-index: 4;
} }
</style> </style>
<template> <template>
<div> <div>
<ul class="container log-list"> <img src="../../assets/img/log-bg.jpg" class="log-bg"/>
<li v-for="(log, index) in logs" :class="{ red: aa }" :key="index" class="log-item"> <div class="fixed">
<card :text="(index + 1) + ' . ' + log"></card> <ul class="list-container">
</li> <li class="list-item">
</ul> <img src="../../assets/img/ic_zhuanfa.png" mode="widthFix"/><text class="text-zhuanfan">发送给朋友</text>
<button open-type="share" class="btn-share"></button>
</li>
<li class="list-item"><img src="../../assets/img/ic_share.png" mode="widthFix"/><text class="text-share">生成分享图</text></li>
<li class="list-item"><img src="../../assets/img/re_sel.png" mode="widthFix"/></li>
</ul>
</div>
</div> </div>
</template> </template>
<script> <script>
import { formatTime } from '@/utils/index'
import card from '@/components/card'
export default { export default {
onShareAppMessage() {
return {
title: '我的手机',
path: '/page/index/main'
}
},
components: { components: {
card
}, },
data () { data () {
return { return {
logs: []
} }
}, },
created () { created () {
const logs = (wx.getStorageSync('logs') || [])
this.logs = logs.map(log => formatTime(new Date(log)))
} }
} }
</script> </script>
<style> <style lang="scss">
.log-list { .fixed {
display: flex; position: fixed;
flex-direction: column; bottom: 0;
padding: 40rpx; left: 0;
width: 100%;
height: 180rpx;
background: rgba(#000, 0.7);
z-index: 100;
} }
.log-bg {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
z-index: 1;
}
.list-container {
width: 100%;
height: 100%;
display: flex;
flex-flow: row nowrap;
align-items: center;
.log-item { .list-item {
margin: 10rpx; position: relative;
flex: 1;
display: flex;
flex-flow: column nowrap;
align-items: center;
padding: 20rpx 0;
font-size: 28rpx;
&:not(:last-child) {
border-right: 2rpx dashed #ddd1be;
}
&:first-child {
color: #ffde5e;
}
&:nth-child(2) {
color: #38eb95;
}
img {
width: 67rpx;
margin-bottom: 16rpx;
}
}
}
.btn-share {
position: absolute;
opacity: 0;
width: 100%;
height: 100%;
z-index: 1;
} }
</style> </style>
...@@ -3,9 +3,3 @@ import App from './index' ...@@ -3,9 +3,3 @@ import App from './index'
const app = new Vue(App) const app = new Vue(App)
app.$mount() app.$mount()
export default {
config: {
navigationBarTitleText: '查看启动日志'
}
}
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