uu
This commit is contained in:
parent
5a3a7a2767
commit
d66a8c6f69
@ -46,5 +46,13 @@ export const parseAddress = (data = {})=> {
|
||||
return coreRequest(url.parseAddress, data, {}, "GET")
|
||||
}
|
||||
|
||||
export const getAppHomeStatData = (data = {})=> {
|
||||
return coreRequest(url.getAppHomeStatData, data, {}, "GET")
|
||||
}
|
||||
|
||||
export const getLatestNotices = (data = {})=> {
|
||||
return coreRequest(url.getLatestNotices, data, {}, "GET")
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -10,6 +10,9 @@ export default {
|
||||
getEmisRegion: `/emis/emisRegion/list`,// 获取省市区列表
|
||||
getDicDataJson: `/common/getDicDataJson`, // 获取枚举字段
|
||||
|
||||
getAppHomeStatData: `/emis/commonTools/getAppHomeStatData`,// 首页统计数据
|
||||
getLatestNotices: `/emis/commonTools/getLatestNotices`,// 首页统计数据
|
||||
|
||||
getCustomerUserAddressList: `/emis/emisCustomerAddress/listSimple`, // 获取客户地址列表
|
||||
setDefaultAddressById: `/emis/emisCustomerAddress/setDefaultAddressById`, // 设置默认地址
|
||||
deleteAddressById: `/emis/emisCustomerAddress/deleteAddressById`, // 删除地址
|
||||
|
||||
@ -7,12 +7,14 @@
|
||||
<view class="font-32 font-weight">网点发件</view>
|
||||
<view class="mt-10">
|
||||
<u-row justify="start" gutter="18" custom-style="flex-wrap: wrap;">
|
||||
<u-col v-for="(item, index) in faBtnlist" span="3" @click="goto(item.url)">
|
||||
<view class="dlb-item">
|
||||
<u-image height="46" width="46" :src="item.icon"></u-image>
|
||||
<view class="pt-10 font-26">{{item.title}}</view>
|
||||
</view>
|
||||
</u-col>
|
||||
<buns-auth v-for="(item, index) in faBtnlist" :code="item.code">
|
||||
<u-col span="3" @click="goto(item.url)">
|
||||
<view class="dlb-item">
|
||||
<u-image height="46" width="46" :src="item.icon"></u-image>
|
||||
<view class="pt-10 font-26">{{item.title}}</view>
|
||||
</view>
|
||||
</u-col>
|
||||
</buns-auth>
|
||||
</u-row>
|
||||
</view>
|
||||
</view>
|
||||
@ -21,12 +23,14 @@
|
||||
<view class="font-32 font-weight">网点到件</view>
|
||||
<view class="mt-10">
|
||||
<u-row justify="start" gutter="18" custom-style="flex-wrap: wrap;">
|
||||
<u-col v-for="(item, index) in daoBtnlist" span="3" @click="goto(item.url)">
|
||||
<view class="dlb-item">
|
||||
<u-image height="46" width="46" :src="item.icon"></u-image>
|
||||
<view class="pt-10 font-26">{{item.title}}</view>
|
||||
</view>
|
||||
</u-col>
|
||||
<buns-auth v-for="(item, index) in daoBtnlist" :code="item.code">
|
||||
<u-col span="3" @click="goto(item.url)">
|
||||
<view class="dlb-item">
|
||||
<u-image height="46" width="46" :src="item.icon"></u-image>
|
||||
<view class="pt-10 font-26">{{item.title}}</view>
|
||||
</view>
|
||||
</u-col>
|
||||
</buns-auth>
|
||||
</u-row>
|
||||
</view>
|
||||
</view>
|
||||
@ -35,12 +39,14 @@
|
||||
<view class="font-32 font-weight">其他</view>
|
||||
<view class="mt-10">
|
||||
<u-row justify="start" gutter="18" custom-style="flex-wrap: wrap;">
|
||||
<u-col v-for="(item, index) in otherBtnlist" span="3" @click="goto(item.url)">
|
||||
<view class="dlb-item">
|
||||
<u-image height="46" width="46" :src="item.icon"></u-image>
|
||||
<view class="pt-10 font-26">{{item.title}}</view>
|
||||
</view>
|
||||
</u-col>
|
||||
<buns-auth v-for="(item, index) in otherBtnlist" :code="item.code">
|
||||
<u-col span="3" @click="goto(item.url)">
|
||||
<view class="dlb-item">
|
||||
<u-image height="46" width="46" :src="item.icon"></u-image>
|
||||
<view class="pt-10 font-26">{{item.title}}</view>
|
||||
</view>
|
||||
</u-col>
|
||||
</buns-auth>
|
||||
</u-row>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -66,7 +66,12 @@
|
||||
<u-row>
|
||||
<image style="height: 30rpx;width:30rpx" :src="getCdnUrl(`home/laba.png`)"/>
|
||||
<image style="height: 24rpx; width: 110rpx;margin-left: 10rpx;" :src="getCdnUrl(`home/ggchxun.png`)"/>
|
||||
<u-text size="22" color="#333" margin="0 0 0 30rpx">最近一周内暂未有新通告!!!</u-text>
|
||||
|
||||
<u-notice-bar :text="noticeList" @click="handleNoticeClick" icon=""
|
||||
direction="column" speed="250" bgColor="#F6F6F6" duration="3000"
|
||||
fontSize="26" color="#000"
|
||||
></u-notice-bar>
|
||||
|
||||
</u-row>
|
||||
</u-col>
|
||||
<u-icon name="arrow-right" size="20"></u-icon>
|
||||
@ -79,11 +84,11 @@
|
||||
<view class="btnlist2 com-jianju">
|
||||
<u-row justify="start" gutter="18" custom-style="flex-wrap: wrap;">
|
||||
<buns-auth v-for="tlItem in toolBtnlist" :code="tlItem.code">
|
||||
<u-col span="3" align="center" @click="goto(tlItem.url)">
|
||||
<u-col align="center" justify="center" custom-style="padding: 20rpx;border: 2rpx solid #F6F6F6;border-radius: 16rpx;margin-bottom: 18rpx;display: flex;">
|
||||
<u-col span="3" @click="goto(tlItem.url)">
|
||||
<view class="dlb-item">
|
||||
<image :src="tlItem.icon" style="height: 46rpx;width: 46rpx" mode="aspectFit"/>
|
||||
<view style="font-size: 24rpx;margin-top: 20rpx;">{{tlItem.title}}</view>
|
||||
</u-col>
|
||||
<view class="pt-20 font-26">{{tlItem.title}}</view>
|
||||
</view>
|
||||
</u-col>
|
||||
</buns-auth>
|
||||
</u-row>
|
||||
@ -92,15 +97,41 @@
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<tpx-dialog v-model:show="noticeDetailDialog.show" title="公告详情" type="type-dialog">
|
||||
<view style="min-height: 100rpx;width: 500rpx;">
|
||||
<u-parse :content="noticeDetailDialog.content"></u-parse>
|
||||
</view>
|
||||
</tpx-dialog>
|
||||
</tpx-page>
|
||||
</template>
|
||||
<script>
|
||||
import { dealBtnMap } from "@/common/enum"
|
||||
import * as apiService from "@/common/api"
|
||||
|
||||
export default {
|
||||
computed: {
|
||||
userInfo() {
|
||||
return this.$store.getters.userInfo
|
||||
}
|
||||
},
|
||||
tjList(){
|
||||
let { orderStat } = this.staticInfo
|
||||
let list = [
|
||||
{ title: '未接单', value: orderStat.waitTakeNum, key: "" },
|
||||
{ title: '已接收', value: orderStat.dispNum, key: "" },
|
||||
{ title: '派送中', value: orderStat.waitTakeNum, key: "" },
|
||||
{ title: '已签收', value: orderStat.signedNum, key: "" }
|
||||
]
|
||||
return list
|
||||
},
|
||||
mainBtnlist(){
|
||||
let { commStat } = this.staticInfo
|
||||
let list = [
|
||||
{ title: '计提预估', subTitle: commStat.estMoney, icon: this.getCdnUrl(`home/jityugu.png`), url: '' },
|
||||
{ title: '待回款', subTitle: commStat.waitPay, icon: this.getCdnUrl(`home/daihuikuan.png`), url: '' }
|
||||
]
|
||||
return list
|
||||
},
|
||||
},
|
||||
props: {
|
||||
// hasLeftWin: {
|
||||
@ -109,16 +140,16 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tjList: [
|
||||
{ title: '未接单', value: "56", key: "" },
|
||||
{ title: '已接收', value: "56", key: "" },
|
||||
{ title: '派送中', value: "56", key: "" },
|
||||
{ title: '已签收', value: "56", key: "" }
|
||||
],
|
||||
mainBtnlist: [
|
||||
{ title: '计提预估', subTitle: "2888.80", icon: this.getCdnUrl(`home/jityugu.png`), url: '' },
|
||||
{ title: '待回款', subTitle: "12888.80", icon: this.getCdnUrl(`home/daihuikuan.png`), url: '' }
|
||||
],
|
||||
noticeList: [],
|
||||
noticeRes: [],
|
||||
noticeDetailDialog: {
|
||||
show: false,
|
||||
content: ''
|
||||
},
|
||||
staticInfo: {
|
||||
commStat: {},
|
||||
orderStat: {},
|
||||
},
|
||||
toolBtnlist: [
|
||||
{ ...dealBtnMap.lanShou },
|
||||
{ ...dealBtnMap.shouHuo },
|
||||
@ -140,14 +171,32 @@
|
||||
},
|
||||
onShareAppMessage() {
|
||||
return {
|
||||
// title: '',
|
||||
// path: 'TODO'
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
this.initData()
|
||||
},
|
||||
methods: {
|
||||
async initData(){
|
||||
this.getLatestNotices()
|
||||
this.getAppHomeStatData()
|
||||
},
|
||||
async getLatestNotices(){
|
||||
let res = await apiService.getLatestNotices()
|
||||
this.noticeRes = res.rows
|
||||
this.noticeList = this.noticeRes.map(t=> t.noticeTitle)
|
||||
},
|
||||
async getAppHomeStatData(){
|
||||
let res = await apiService.getAppHomeStatData()
|
||||
this.staticInfo = res.data
|
||||
},
|
||||
handleNoticeClick(index) {
|
||||
let noticeContent = this.noticeRes[index].noticeContent
|
||||
this.noticeDetailDialog = {
|
||||
show: true,
|
||||
content: noticeContent
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -230,4 +279,14 @@
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
}
|
||||
.dlb-item{
|
||||
margin-top:20rpx;
|
||||
flex-direction: column;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border: 2rpx solid #F6F6F6;
|
||||
border-radius: 16rpx;
|
||||
height: 140rpx;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -98,7 +98,7 @@
|
||||
|
||||
.u-notice-bar {
|
||||
overflow: hidden;
|
||||
padding: 9px 12px;
|
||||
padding: 9rpx 12rpx;
|
||||
flex: 1;
|
||||
}
|
||||
</style>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user