|
|
@@ -12,9 +12,9 @@ |
|
|
|
<view class="nickname">登录/注册</view> |
|
|
|
</view> |
|
|
|
<view v-else class="name"> |
|
|
|
<view class="nickname">林晨曦</view> |
|
|
|
<view class="nickname">{{state.accountInfoVo.nickName}}</view> |
|
|
|
<view class="user-id"> |
|
|
|
<view class="phone">15885137270</view> |
|
|
|
<view class="phone">{{state.accountInfoVo.mobile}}</view> |
|
|
|
<view @click="$util.navTo('/subpackage/personal-center/setting/change-phone', true)" |
|
|
|
class="btn-change">已关联</view> |
|
|
|
</view> |
|
|
@@ -113,29 +113,29 @@ |
|
|
|
</view> |
|
|
|
<view class="pass"> |
|
|
|
<view class="total m-top"> |
|
|
|
<text>通行消费</text> |
|
|
|
<text>总消费</text> |
|
|
|
<text>总充值</text> |
|
|
|
</view> |
|
|
|
<view class="amount m-top"> |
|
|
|
<text>¥ 501,220.00</text> |
|
|
|
<text>¥ 620,227.00</text> |
|
|
|
<text>¥ {{state.monthFlowingVo.money/100}}</text> |
|
|
|
<text>¥ {{state.monthFlowingVo.totalAmount/100}}</text> |
|
|
|
</view> |
|
|
|
<view class="line m-top"> |
|
|
|
<view class="line1" style="width: 75%;"></view> |
|
|
|
<view class="line1" :style="{width: state.monthFlowingVo.money*100/state.monthFlowingVo.totalAmount+'%'}"></view> |
|
|
|
<view class="line2"></view> |
|
|
|
</view> |
|
|
|
<view class="mileage"> |
|
|
|
<view class="txt"> |
|
|
|
<text class="tit">通行里程</text> |
|
|
|
<text class="val">81880km</text> |
|
|
|
<text class="val">{{state.monthFlowingVo.mileage}}km</text> |
|
|
|
</view> |
|
|
|
<view class="txt"> |
|
|
|
<text class="tit">通行时长</text> |
|
|
|
<text class="val">21小时30分钟</text> |
|
|
|
<text class="val">{{state.monthFlowingVo.duration}}</text> |
|
|
|
</view> |
|
|
|
<view class="txt"> |
|
|
|
<text class="tit ">通行次数</text> |
|
|
|
<text class="val">103次</text> |
|
|
|
<text class="val">{{state.monthFlowingVo.num}}次</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="detail">查看通行轨迹</view> |
|
|
@@ -193,7 +193,15 @@ |
|
|
|
import { getItem, StorageKeys } from "@/utils/storage"; |
|
|
|
import navBar from "../../components/nav-bar/nav-bar2.vue"; |
|
|
|
import { onLoad, onShow, onPageScroll } from "@dcloudio/uni-app"; |
|
|
|
|
|
|
|
import { |
|
|
|
userInfoIndex |
|
|
|
} from "@/utils/network/api.js"; |
|
|
|
import { |
|
|
|
request |
|
|
|
} from "@/utils/network/request.js"; |
|
|
|
import { |
|
|
|
stringToJson |
|
|
|
} from "@/utils/network/encryption.js"; |
|
|
|
const height = ref(null); |
|
|
|
const top = ref(null); |
|
|
|
const margin = ref(null); |
|
|
@@ -204,6 +212,20 @@ |
|
|
|
data: { |
|
|
|
opId: "", |
|
|
|
}, |
|
|
|
accountInfoVo: { |
|
|
|
nickName: '', |
|
|
|
mobile: '' |
|
|
|
}, |
|
|
|
monthFlowingVo: { |
|
|
|
duration: "", |
|
|
|
mileage: 0, |
|
|
|
money: 0, |
|
|
|
num: 0, |
|
|
|
parkingLotMoney: 0, |
|
|
|
parkingLotNum: 0, |
|
|
|
totalAmount: 0, |
|
|
|
}, |
|
|
|
vehicleManageList: [], |
|
|
|
}); |
|
|
|
onMounted(() => { |
|
|
|
const res = uni.getMenuButtonBoundingClientRect(); |
|
|
@@ -222,7 +244,35 @@ |
|
|
|
}); |
|
|
|
onShow((option : any) => { |
|
|
|
state.data.opId = getItem(StorageKeys.OpenId); |
|
|
|
if(state.data.opId){ |
|
|
|
getUserInfo() |
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
const getUserInfo = () => { |
|
|
|
|
|
|
|
const options = { |
|
|
|
type: 2, |
|
|
|
data: { |
|
|
|
openId: state.data.opId |
|
|
|
}, |
|
|
|
method: "POST", |
|
|
|
showLoading: true, |
|
|
|
}; |
|
|
|
//调用方式 |
|
|
|
request(userInfoIndex, options) |
|
|
|
.then((res) => { |
|
|
|
let data = stringToJson(res.bizContent) |
|
|
|
console.log(data); |
|
|
|
state.accountInfoVo = data.accountInfoVo; |
|
|
|
state.monthFlowingVo = data.monthFlowingVo; |
|
|
|
state.vehicleManageList = data.monthFlowingVo |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
console.log(err); |
|
|
|
}); |
|
|
|
} |
|
|
|
</script> |
|
|
|
<style> |
|
|
|
page { |