Commit 85d9f140 by zhangzhen

完善用户信息部分内容

parent 99cd18b1
...@@ -24,6 +24,12 @@ export const getUserInfo=()=>{ ...@@ -24,6 +24,12 @@ export const getUserInfo=()=>{
return http.get(url) return http.get(url)
} }
export const getUserWallet=()=>{
let url=`/wallet/query`
return http.get(url)
}
// 修改用户信息 // 修改用户信息
export const updateUserInfo=(data)=>{ export const updateUserInfo=(data)=>{
let url=`/consumer/edit` let url=`/consumer/edit`
......
import http from "@/common/vmeitime-http/index.js"
// 查询充值记录列表
export const recordsList=(data)=>{
let url=`/recharge/list`
return http.get(url,data)
}
import http from "@/common/vmeitime-http/index.js"
// 查询充值记录列表
export const recordsList=(data)=>{
let url=`/recharge/list`
return http.get(url,data)
}
...@@ -134,6 +134,9 @@ ...@@ -134,6 +134,9 @@
}, },
methods: { methods: {
onTabbar(index) { onTabbar(index) {
if(uni.getStorageSync("statusIndex")){
uni.removeStorageSync('statusIndex')
}
if (this.path !== this.list[index].url) { if (this.path !== this.list[index].url) {
uni.switchTab({ uni.switchTab({
url: '/' + this.list[index].url url: '/' + this.list[index].url
......
...@@ -2,8 +2,8 @@ const CONFIG = { ...@@ -2,8 +2,8 @@ const CONFIG = {
// 开发环境配置 // 开发环境配置
development: { development: {
// assetsPath: 'https://www.coujio.com/wechat_static', // 静态资源路径 // assetsPath: 'https://www.coujio.com/wechat_static', // 静态资源路径
assetsPath: 'https://coujiao.pseer.com/wechat_static', // 静态资源路径 // assetsPath: 'https://coujiao.pseer.com/wechat_static', // 静态资源路径
// assetsPath: 'http://10.24.5.167:8211/static', // 静态资源路径 assetsPath: 'http://10.24.5.167:8211/static', // 静态资源路径
// baseUrl: 'https://www.coujio.com/front-api', // 后台接口请求地址 // baseUrl: 'https://www.coujio.com/front-api', // 后台接口请求地址
baseUrl: 'https://coujiao.pseer.com/front-api', // 后台接口请求地址 baseUrl: 'https://coujiao.pseer.com/front-api', // 后台接口请求地址
// baseUrl: 'http://10.24.3.185:8883/front-api', // baseUrl: 'http://10.24.3.185:8883/front-api',
......
...@@ -73,6 +73,9 @@ ...@@ -73,6 +73,9 @@
"requiredPrivateInfos" : [ "getLocation" ], "requiredPrivateInfos" : [ "getLocation" ],
"uniStatistics" : { "uniStatistics" : {
"enable" : false "enable" : false
},
"secureNetwork" : {
"enable" : false
} }
}, },
"mp-alipay" : { "mp-alipay" : {
......
...@@ -51,13 +51,6 @@ ...@@ -51,13 +51,6 @@
} }
}, },
{ {
"path": "pages/webUrl/index",
"style": {
"navigationBarTitleText": "详情",
"navigationStyle": "default"
}
},
{
"path": "pages/article/article", "path": "pages/article/article",
"style": { "style": {
"navigationBarTitleText": "详情", "navigationBarTitleText": "详情",
...@@ -145,13 +138,6 @@ ...@@ -145,13 +138,6 @@
} }
}, },
{ {
"path": "pages/payRecord/index",
"style": {
"navigationBarTitleText": "消费记录",
"enablePullDownRefresh" : false
}
},
{
"path": "pages/deviceManage/index", "path": "pages/deviceManage/index",
"style": { "style": {
"navigationBarTitleText": "设备控制" "navigationBarTitleText": "设备控制"
...@@ -169,6 +155,27 @@ ...@@ -169,6 +155,27 @@
"navigationBarTitleText": "我的车辆", "navigationBarTitleText": "我的车辆",
"navigationStyle": "default" "navigationStyle": "default"
} }
},
{
"path": "webUrl/index",
"style": {
"navigationBarTitleText": "详情",
"navigationStyle": "default"
}
},
{
"path": "payRecord/index",
"style": {
"navigationBarTitleText": "消费记录",
"enablePullDownRefresh" : false
}
},
{
"path": "recharge/index",
"style": {
"navigationBarTitleText": "充值记录",
"enablePullDownRefresh" : false
}
} }
] ]
} }
......
...@@ -182,11 +182,7 @@ import NoLogin from "@/components/noLogin/noLogin" ...@@ -182,11 +182,7 @@ import NoLogin from "@/components/noLogin/noLogin"
listBlankImage:config.assetsPath+'/no_data_icon.png', listBlankImage:config.assetsPath+'/no_data_icon.png',
}; };
}, },
onLoad(option) { onLoad() {
if(option.index){
this.statusIndex = option.index
}
// 隐藏原生的tabbar
uni.hideTabBar(); uni.hideTabBar();
}, },
onReachBottom() { onReachBottom() {
...@@ -196,6 +192,11 @@ import NoLogin from "@/components/noLogin/noLogin" ...@@ -196,6 +192,11 @@ import NoLogin from "@/components/noLogin/noLogin"
} }
}, },
onShow() { onShow() {
let statusIndex = uni.getStorageSync("statusIndex");
console.log(statusIndex,99999)
if(statusIndex === 0 || statusIndex > 0){
this.statusIndex = statusIndex
}
this.onGetDicts() this.onGetDicts()
}, },
methods: { methods: {
......
...@@ -61,14 +61,12 @@ ...@@ -61,14 +61,12 @@
userInfo:{} userInfo:{}
}; };
}, },
onLoad(option) { onLoad() {
console.log(option, 999)
this.userInfo = uni.getStorageSync('userInfo') this.userInfo = uni.getStorageSync('userInfo')
if (option.number){ if (this.userInfo.numberplate){
this.licensePlateNumber.push({ this.licensePlateNumber.push({
name: option.number name: this.userInfo.numberplate
}) })
} }
}, },
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<text class="text-title">{{item.name}}</text> <text class="text-title">{{item.name}}</text>
</view> </view>
<view class="flex-row"> <view class="flex-row">
<text class="text-bold text-xl" :class="item.sign=='income'?'text-red':'text-black'">{{payStatus[item.sign||'expenditure']}}</text> <text class="text-bold text-xl" :class="item.sign=='income'?'text-red':'text-black'">{{ item.price !== 0? payStatus[item.sign||'expenditure']:''}}</text>
<text class="text-black text-bold text-lg" >{{item.price}}</text> <text class="text-black text-bold text-lg" >{{item.price}}</text>
</view> </view>
</view> </view>
......
<template>
<view class="order-record">
<view v-if="loginStatus" class="content-box">
<view class="list-content">
<view v-for="(item,index) in list" :key="index" class="list-item" @tap="onNavToOrderInfo(item)">
<view class="flex-between part-1">
<view class="">
<text class="text-title">{{item.name}}</text>
</view>
<view class="flex-row">
<text class="text-bold text-xl" :class="item.sign=='income'?'text-red':'text-black'">{{ item.price !== 0? payStatus[item.sign||'expenditure']:''}}</text>
<text class="text-black text-bold text-lg" >{{item.price}}</text>
</view>
</view>
<view class="flex-between part-1">
<text>{{item.createTime}}</text>
<text>{{item.payType}}</text>
</view>
</view>
</view>
</view>
<view v-if="loginStatus && list.length == 0" class="empty-box">
<u-empty text="暂无数据" textColor='#C1C1C1' width="120"
:icon="listBlankImage">
</u-empty>
</view>
<view v-if="loginStatus && list.length" style="padding: 12px 6% 0;">
<u-loadmore :status="status" :icon="true" :line='true' :loading-text="loadingText"
:loadmore-text="loadmoreText" :nomore-text="nomoreText" />
</view>
<NoLogin v-model="loginStatus" />
</view>
</template>
<script>
import config from "@/config/index.config"
import {
recordsList
} from "@/api/recharge.js"
import NoLogin from "@/components/noLogin/noLogin"
import {
getDictItem
} from "@/utils/tools.js"
export default {
components:{
NoLogin
},
data() {
return {
status: 'nomore ',
loadingText: '努力加载中',
loadmoreText: '上划加载',
nomoreText: '到底啦',
statusIndex: 0,
list: [],
statusList: [{
label: "全部",
value: "",
},
{
label: "已预约",
value: "0",
},
{
label: "使用中",
value: "1",
},
{
label: "已完成",
value: "2",
},
{
label: "退单",
value: "3",
}
],
queryParams: {
pageNum: 1,
pageSize: 10
},
loginStatus:true,
orderStatusEnum:{},
payTypeEnum:{
1:"微信支付",
2:"支付宝支付",
3:"余额支付"
},
payStatus:{
expenditure:'-',
income:'+'
},
listBlankImage:config.assetsPath+'/no_data_icon.png',
};
},
onLoad() {
},
onReachBottom() {
if (this.status == 'loadmore') {
this.queryParams.pageNum += 1;
this.onLoading();
}
},
onShow() {
this.onGetDicts()
},
methods: {
onGetDicts() {
let dicts = []
if (uni.getStorageSync('dicts')) {
dicts = JSON.parse(uni.getStorageSync('dicts'))
this.orderStatusEnum = getDictItem(dicts, "store_order_status");
this.onLoading()
} else {
dictList().then(res => {
dicts = res.data.data;
uni.setStorageSync('dicts', JSON.stringify(res.data.data))
this.orderStatusEnum = getDictItem(dicts, "store_order_status");
this.onLoading()
})
}
},
onLoading() {
uni.showLoading({
title: '加载中'
})
this.status = 'loading'
this.queryParams.status = this.statusList[this.statusIndex].value;
recordsList(this.queryParams).then(res => {
console.log(res)
uni.hideLoading()
if (res.data.code == 200) {
if(this.queryParams.pageNum ==1){
this.list = res.data.rows
}else{
this.list = [...this.list,...res.data.rows]
}
if(this.list.length < res.data.total){
this.status = "loadmore"
}else{
this.status = 'nomore'
}
}else if(res.data.code == 401){
this.loginStatus = false
}
})
},
tabSelect(i) {
console.log(i, 99999)
this.statusIndex = i;
this.queryParams.pageNum = 1;
this.list = []
this.onLoading()
},
onNavToOrderInfo(val){
uni.navigateTo({
url:"/pages/orderResult/orderResult?orderNo="+val.orderNo
})
}
}
}
</script>
<style>
page{
background-color: #f1f1f1;
}
</style>
<style lang="scss" scoped>
.order-record {
display: flex;
flex-direction: column;
.content-box {
display: flex;
flex-direction: column;
.list-content{
display: flex;
flex-direction: column;
align-items: center;
.list-item{
width: 94%;
padding: 20upx 20upx;
border-radius: 20upx;
background-color: #ffffff;
margin-top: 30upx;
.part-1{
display: flex;
align-items: center;
padding: 10upx;
.flex-row{
display: flex;
flex-direction: row;
align-items: center;
}
}
}
}
}
}
</style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment