Browse Source

消息提示

master
Enzo 5 years ago
parent
commit
3e5d34cf13
  1. 63
      canteen/pages/index/index.vue
  2. 16
      supplier/pages/index/index.vue
  3. 2
      supplier/pages/order/detail.vue

63
canteen/pages/index/index.vue

@ -7,14 +7,14 @@
</view>
<view class="list">
<view class="lf-row-between list-item" hover-class="lf-opacity"
v-for="(item, index) in block_list" :key="index"
@click="$url(item.path)">
<view class="lf-row-between list-item" hover-class="lf-opacity" v-for="(item, index) in block_list"
:key="index" @click="$url(item.path)">
<view class="lf-row-center">
<image class="icon-img" :src="item.icon"></image>
<text class="lf-text-vertical lf-m-l-20 lf-font-28 lf-color-black">{{ item.name }}</text>
</view>
<view>
<view class="lf-flex">
<view class="message-tag" v-if="index == 1">1</view>
<u-icon name="arrow-right"></u-icon>
</view>
</view>
@ -28,41 +28,41 @@
<script>
export default {
data(){
data() {
return {
canteen: {},
block_list: []
}
},
onLoad(){
onLoad() {
// todo
this.getHomeData();
},
onReady(){
onReady() {
// #ifndef MP
var a = document.getElementsByClassName('uni-page-head-hd')[0];
a.style.display = 'none';
// #endif
},
methods: {
getHomeData(){
getHomeData() {
this.$http(this.API.API_CANTEEN_INDEX).then(res => {
console.log("getHomeData", res);
this.block_list = res.data.block;
this.canteen = res.data.canteen;
uni.setNavigationBarTitle({
  title: this.canteen.user.canteen.canteen_name
title: this.canteen.user.canteen.canteen_name
})
})
},
// 退
loginOut(){
loginOut() {
uni.showModal({
title: '温馨提示',
content: '确定退出登录吗?',
confirmColor: '#11D189',
success: result => {
if(result.confirm){
if (result.confirm) {
uni.removeStorageSync('canteen_token');
this.$redirectToLogin('您已退出登录, 即将跳转...');
}
@ -74,57 +74,78 @@
</script>
<style>
page{
page {
background-color: #F6F6F6;
}
</style>
<style lang="scss" scoped="scoped">
.head{
.message-tag {
width: 36rpx;
height: 36rpx;
background-color: red;
border-radius: 50%;
margin-right: 10rpx;
text-align: center;
align-content: center;
color: white;
display: flex;
justify-content: space-around;
}
.head {
height: 374rpx;
width: 750rpx;
background-color: #FFFFFF;
image{
image {
width: 200rpx;
height: 200rpx;
border: 2rpx solid #FFFFFF;
border-radius: 50%;
}
}
.list{
.list {
margin-top: 20rpx;
padding: 0 32rpx;
background-color: #FFFFFF;
width: 100%;
height: auto;
}
.list-item{
.list-item {
border-bottom: 1rpx solid #EEEEEE;
height: 110rpx;
box-sizing: border-box;
position: relative;
.icon-img{
.icon-img {
width: 50rpx;
height: 50rpx;
}
.feedback-btn{
.feedback-btn {
position: absolute;
width: 100%;
height: 100%;
z-index: 1;
background: transparent;
}
&:last-child{
&:last-child {
border-bottom: none;
}
}
.exit{
.exit {
padding: 0 32rpx;
// bottom: 50rpx;
padding-top: 10rpx;
padding-bottom: 50rpx;
box-sizing: border-box;
background-color: #F6F6F6;
button{
button {
background-color: #f0f0f0;
color: #777777;
}

16
supplier/pages/index/index.vue

@ -13,7 +13,8 @@
<image class="icon-img" :src="item.icon"></image>
<text class="lf-text-vertical lf-m-l-20 lf-font-28 lf-color-black">{{ item.name }}</text>
</view>
<view>
<view class="lf-flex">
<view class="message-tag" v-if="index == 2">1</view>
<u-icon name="arrow-right"></u-icon>
</view>
</view>
@ -80,6 +81,19 @@
}
</style>
<style lang="scss" scoped="scoped">
.message-tag {
width: 36rpx;
height: 36rpx;
background-color: red;
border-radius: 50%;
margin-right: 10rpx;
text-align: center;
align-content: center;
color: white;
display: flex;
justify-content: space-around;
}
.head{
height: 374rpx;
width: 750rpx;

2
supplier/pages/order/detail.vue

@ -26,7 +26,7 @@
<view class="lf-color-black">{{ order.created_at }}</view>
</view>
<view class="lf-row-between list">
<view>过期时间</view>
<view>有效时间</view>
<view class="lf-color-black">{{ order.deadline_text }}</view>
</view>
</view>

Loading…
Cancel
Save