已对接6个接口
准备回复订单详情页面
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
<view class="txet-xxs">
|
||||
<text class="text-white">今日收款(元)</text>
|
||||
</view>
|
||||
<view class=" text-sl padding padding-top-xs"><text class="text-white">8450.50</text></view>
|
||||
<view class=" text-sl padding padding-top-xs"><text class="text-white">{{userAccount.totalMoney?userAccount.totalMoney:'0.00'}}</text></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -22,7 +22,7 @@
|
||||
<view class="padding text-center flex-sub">
|
||||
<text>今日消费笔数</text>
|
||||
<view class="padding-sm">
|
||||
89
|
||||
{{userAccount.totalCount}}
|
||||
</view>
|
||||
<button class="cu-btn bg-main-oil text-white text-sm ">
|
||||
查看明细
|
||||
@@ -31,7 +31,7 @@
|
||||
<view class="padding text-center flex-sub">
|
||||
<text>账户余额(元)</text>
|
||||
<view class="padding-sm">
|
||||
1899.50
|
||||
x.xx
|
||||
</view>
|
||||
<button class="cu-btn bg-main-oil text-white text-sm ">
|
||||
查看明细
|
||||
@@ -41,7 +41,7 @@
|
||||
</view>
|
||||
|
||||
<view class="cu-list grid col-3 no-border margin radius ">
|
||||
<view class="cu-item" @tap="routerTo('/pages/station-info/station-info')">
|
||||
<view class="cu-item" @tap="routerTo('/pages/station-info/station-info')">
|
||||
<view :class="['cuIcon-' + cuIconList[0].cuIcon, 'text-' + cuIconList[0].color]" class="text-sl">
|
||||
<view class="cu-tag badge" v-if="cuIconList[0].badge != 0">
|
||||
<block v-if="cuIconList[0].badge != 1">{{ cuIconList[0].badge > 99 ? '99+' : cuIconList[0].badge }}</block>
|
||||
@@ -73,7 +73,7 @@
|
||||
</view>
|
||||
<text>{{ cuIconList[3].name }}</text>
|
||||
</view>
|
||||
<view class="cu-item">
|
||||
<view class="cu-item" @tap="routerTo('/pages/qrcode/QrCode_xy')">
|
||||
<view :class="['cuIcon-' + cuIconList[4].cuIcon, 'text-' + cuIconList[4].color]" class="text-sl">
|
||||
<view class="cu-tag badge" v-if="cuIconList[4].badge != 0">
|
||||
<block v-if="cuIconList[4].badge != 1">{{ cuIconList[4].badge > 99 ? '99+' : cuIconList[4].badge }}</block>
|
||||
@@ -97,30 +97,39 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import cloudSiteApi from '@/api/cloud-site.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
userAccount: {
|
||||
totalCount: 0,
|
||||
totalMoney: 0.00
|
||||
},
|
||||
title: 'Hello',
|
||||
cuIconList: [{
|
||||
cuIcon: 'location',
|
||||
path: '/pages/station-info/station-info',
|
||||
color: 'red',
|
||||
badge: 120,
|
||||
name: '加油信息'
|
||||
badge: 0,
|
||||
name: '油站信息'
|
||||
},
|
||||
{
|
||||
cuIcon: 'form',
|
||||
color: 'orange',
|
||||
path: '/pages/orderList/orderList',
|
||||
badge: 0,
|
||||
name: '加油订单'
|
||||
},
|
||||
{
|
||||
cuIcon: 'new',
|
||||
path: '暂无',
|
||||
color: 'yellow',
|
||||
badge: 0,
|
||||
name: '经营分析'
|
||||
},
|
||||
{
|
||||
cuIcon: 'scan',
|
||||
path: '/pages/stationDetail/stationDetail',
|
||||
color: 'olive',
|
||||
badge: 0,
|
||||
name: '扫码加油'
|
||||
@@ -129,11 +138,13 @@
|
||||
cuIcon: 'qr_code',
|
||||
color: 'cyan',
|
||||
badge: 0,
|
||||
path: '/pages/qrcode/QrCode_xy',
|
||||
name: '油站二维码'
|
||||
},
|
||||
{
|
||||
cuIcon: 'expressman',
|
||||
color: 'red',
|
||||
path: '暂无',
|
||||
badge: 0,
|
||||
name: '员工管理'
|
||||
}
|
||||
@@ -141,26 +152,38 @@
|
||||
]
|
||||
};
|
||||
},
|
||||
onLoad() {},
|
||||
onLoad() {
|
||||
this.getUserInfo()
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.getUserInfo()
|
||||
},
|
||||
methods: {
|
||||
scanQr(){
|
||||
getUserInfo() {
|
||||
cloudSiteApi.getSiteBasicData().then(res => {
|
||||
console.log('用户资料', res)
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.code === 20000) {
|
||||
this.userAccount = res.data
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
scanQr() {
|
||||
uni.scanCode({
|
||||
onlyFromCamera: true,
|
||||
success: function(res) {
|
||||
console.log('条码类型:' + res.scanType);
|
||||
console.log('条码内容:' + res.result);
|
||||
uni.vibrate({
|
||||
success: function() {
|
||||
console.log('success');
|
||||
this.routerTo('/pages/stationDetail/stationDetail')
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: '/pages/stationDetail/stationDetail'
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
routerTo(url){
|
||||
routerTo(url) {
|
||||
uni.navigateTo({
|
||||
url:url
|
||||
url: url
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user