<template>
|
<view class="main-container home farmer">
|
<!-- <view>
|
我的
|
</view> -->
|
<!-- 背景图 -->
|
<view class="top-bg" :style="{'padding-top':(StatusBar)+'px','line-height':CustomBar+'rpx' }">
|
<view class="title" style="position: relative;">
|
首页
|
|
</view>
|
<view class="flex user-info" v-if="currentInfo&&(currentInfo.id)">
|
<!-- 头像 -->
|
<image class="user-icon" v-if="!currentInfo.picture" src="../../static/imgs/home/home-shop-top-icon.png"
|
mode="aspectFit"></image>
|
<image class="user-icon" v-if="currentInfo.picture" :src="currentInfo.picture" mode="aspectFit"></image>
|
|
<view class="name" >
|
<view class="t1" >{{currentInfo.nickName || '-'}}</view>
|
<view class="t2">{{currentInfo.tel || '暂无电话'}}</view>
|
</view>
|
</view>
|
|
|
</view>
|
<view class="item-container">
|
<view class="title">我的收益</view>
|
<view class="line"></view>
|
<view class="flex tj-container">
|
<view class="tj-each">
|
<view class="num">
|
0扎
|
</view>
|
<view class="name">
|
上月成交
|
</view>
|
</view>
|
<view class="tj-each">
|
<view class="num">
|
0扎
|
</view>
|
<view class="name">
|
今日成交
|
</view>
|
</view>
|
<view class="tj-each">
|
<view class="num">
|
0扎
|
</view>
|
<view class="name">
|
近30天成交
|
</view>
|
</view>
|
</view>
|
<view class="flex tj-container">
|
<view class="tj-each">
|
<view class="num">
|
0扎
|
</view>
|
<view class="name">
|
今日订单数
|
</view>
|
</view>
|
<view class="tj-each">
|
<view class="num">
|
0扎
|
</view>
|
<view class="name">
|
昨日订单数
|
</view>
|
</view>
|
<view class="tj-each">
|
<view class="num">
|
0扎
|
</view>
|
<view class="name">
|
本月订单数
|
</view>
|
</view>
|
</view>
|
</view>
|
<view class="item-container flex m-t-20" style="padding: 34rpx 44rpx;">
|
<view class="rate-view flex1" style="max-width: 140rpx;">
|
<view class="title">售后率</view>
|
<view class="title" style="color: red;">0.02%</view>
|
</view>
|
<view class="tj-panel green flex1">
|
<view class="name">今日待配送</view>
|
<view class="title">12扎</view>
|
</view>
|
<view class="tj-panel pink flex1">
|
<view class="name pink">今日配送汇总</view>
|
<view class="title">12扎</view>
|
</view>
|
</view>
|
<view class="m-t-12" @click="getNoticeMore" >
|
<uni-notice-bar class="notice-bar" color="#333" background-color="#fff" show-get-more
|
show-icon :scrollable="scrollable" :text="currentNotice.title" :key="currentNotice.id" />
|
<span v-if="!currentNotice||!currentNotice.id"> </span>
|
</view>
|
<view class="item-container">
|
<view class="title">常用功能</view>
|
<view class="flex order-icons m-t-12">
|
<view class="nav row margin-tb" @click="goto('/sub_pages/farmer/order-settlement/order-settlement',true)">
|
<view class="img-c">
|
<image class="icon margin-bottom order-icon zdjs"
|
src="/static/images/farmer/user/user-icon-kkjl.png" mode="scaleToFill" />
|
</view>
|
<view class="order-desc tg">账单结算</view>
|
</view>
|
<view class="nav row margin-tb" @click="goto('/sub_pages/farmer/flower-manage/flower-manage',true)">
|
<view class="img-c">
|
<image class="icon margin-bottom order-icon spgl"
|
src="/static/images/farmer/user/user-icon-spgl.png" mode="scaleToFill" />
|
</view>
|
<view class="order-desc cqw">商品管理</view>
|
</view>
|
<view class="nav row margin-tb" @click="goto('/sub_pages/farmer/order-sale/order-sale',true)">
|
<view class="img-c">
|
<image class="icon margin-bottom order-icon shlp"
|
src="/static/images/farmer/user/user-icon-shlp.png" mode="scaleToFill" />
|
</view>
|
<view class="order-desc syst">售后理赔</view>
|
</view>
|
<view class="nav row margin-tb" @click="goto('/sub_pages/farmer/order-records/order-records',true)">
|
<view class="img-c">
|
<image class="icon margin-bottom order-icon kkjl"
|
src="/static/images/farmer/user/user-icon-kkjl.png" mode="scaleToFill" />
|
</view>
|
<view class="order-desc wbsp">扣款记录</view>
|
</view>
|
</view>
|
</view>
|
|
<view style="padding-bottom:200rpx">
|
</view>
|
<farmer-footer flg="0"></farmer-footer>
|
|
|
</view>
|
</template>
|
|
<script>
|
export default {
|
data() {
|
return {
|
CustomBar: uni.getStorageSync('CustomBar'),
|
StatusBar: uni.getStorageSync('StatusBar'),
|
tcode: '',
|
inviterName: '',
|
// StatusBar:0,
|
|
//公告的
|
noticeList: [],
|
currentNoticeIndex: 0,
|
currentNotice: {
|
|
},
|
scrollable: false,
|
|
};
|
},
|
|
onLoad(options) {
|
const url = options.q ? decodeURIComponent(options.q) : '';
|
const urlcode = options.url && decodeURIComponent(options.url) || ''
|
},
|
created() {
|
//公告
|
this.$http.request('get', '/api/announcement/page', {
|
params: {
|
size: 5,
|
status: 'A'
|
}
|
}).then(res => {
|
if (res.code == 0) {
|
this.noticeList = (res.data && res.data.records || [])
|
console.log('this.noticeList', this.noticeList)
|
if (this.noticeList.length > 0) {
|
this.currentNotice = this.noticeList[0]
|
if (this.currentNotice.title && this.currentNotice.title.length >= 30) {
|
this.scrollable = true
|
} else {
|
this.scrollable = false
|
}
|
let that = this
|
if (this.noticeList.length >= 1) {
|
setInterval(() => {
|
console.log('interval,1')
|
that.currentNoticeIndex += 1
|
that.currentNoticeIndex %= that.noticeList.length
|
that.currentNotice = that.noticeList[that.currentNoticeIndex]
|
that.scrollable = false
|
that.$nextTick(() => {
|
if (that.currentNotice.title && that.currentNotice.title
|
.length >= 30) {
|
that.scrollable = true
|
} else {
|
that.scrollable = false
|
}
|
})
|
|
}, 8000)
|
}
|
|
}
|
}
|
})
|
|
},
|
methods: {
|
getNoticeMore() {
|
uni.navigateTo({
|
url: '/pages/notice/list?id=' + this.currentNotice.id
|
})
|
},
|
|
|
|
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
@import "../user/user.scss";
|
|
@import "./home.scss";
|
</style>
|
|
<style lang="scss" scoped>
|
</style>
|