4.9(优化
This commit is contained in:
@@ -10,6 +10,14 @@ export function getPageList(params) {
|
||||
params
|
||||
})
|
||||
}
|
||||
//车商客户管理 /api/front/user/center/cardelar/user/list
|
||||
export function getCardelarUserList(params) {
|
||||
return request({
|
||||
'url': '/api/front/user/center/cardelar/user/list',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
//车商店铺信息 /api/front/car/dealer/info
|
||||
export function getDealerInfo() {
|
||||
return request({
|
||||
|
||||
@@ -9,6 +9,14 @@ export function getMyWalletAPI() {
|
||||
})
|
||||
}
|
||||
|
||||
//获取车商工单金额,订单金额
|
||||
export function getMyWalletCarDealer() {
|
||||
return request({
|
||||
url: '/api/front/user/center/car/dealer',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
//余额记录 /api/front/user/center/balance/record
|
||||
export function balanceList(params) {
|
||||
return request({
|
||||
|
||||
@@ -4,7 +4,7 @@ module.exports = {
|
||||
baseUrl: 'https://cms.diyouzhijia.com/car_app_api',
|
||||
TOKENNAME: 'Authori-zation',
|
||||
//薛磊测试
|
||||
// baseUrl: 'http://192.168.31.226:8081/car_app_api',
|
||||
// baseUrl: 'http://192.168.31.228:8081/car_app_api',
|
||||
fileUploadUrl: 'https://cms.diyouzhijia.com/car_app_api/api/front/upload/image',
|
||||
WebSocketUrl: 'ws://121.199.24.205:9107/lxk/websocket',
|
||||
WebSocketOpen: false,
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
"name" : "滴友之家",
|
||||
"appid" : "__UNI__F2BE74F",
|
||||
"description" : "",
|
||||
"versionName" : "1.1.6",
|
||||
"versionCode" : 116,
|
||||
"versionName" : "1.1.7",
|
||||
"versionCode" : 117,
|
||||
"transformPx" : false,
|
||||
"app-plus" : {
|
||||
"usingComponents" : true,
|
||||
|
||||
@@ -264,7 +264,7 @@
|
||||
},
|
||||
filters: {
|
||||
filtersTime(value) {
|
||||
console.log(value);
|
||||
// console.log(value);
|
||||
if (!value) return '--';
|
||||
return getTimeDifference(value);
|
||||
}
|
||||
@@ -539,7 +539,7 @@
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log(res.data.list);
|
||||
// console.log(res.data.list);
|
||||
this.$refs.paging.complete(res.data.list);
|
||||
}).catch(err => {
|
||||
this.$refs.paging.complete(false)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<image :src="item.avatar" mode=""></image>
|
||||
<view class="item-cont">
|
||||
<view class="f-a-i f-jcsb" style="margin-bottom: 36rpx;">
|
||||
<view class="item-cont-name">{{item.realName?item.realName:'客户名称'}}</view>
|
||||
<view class="item-cont-name">{{item.nickname?item.nickname:'客户名称'}}</view>
|
||||
<view class="item-cont-time">{{item.createTime}}</view>
|
||||
</view>
|
||||
<view class="item-cont-call">{{item.phone?item.phone:'客户手机号'}}</view>
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
<script>
|
||||
import {
|
||||
getPageList
|
||||
getCardelarUserList
|
||||
} from "@/api/carShop/user/index.js"
|
||||
export default {
|
||||
data() {
|
||||
@@ -38,7 +38,8 @@
|
||||
// 此处请求仅为演示,请替换为自己项目中的请求
|
||||
this.pageForm.limit = pageSize
|
||||
this.pageForm.page = pageNo
|
||||
getPageList(this.pageForm).then(res => {
|
||||
getCardelarUserList(this.pageForm).then(res => {
|
||||
console.log(res.data.list);
|
||||
this.$refs.paging.complete(res.data.list);
|
||||
})
|
||||
},
|
||||
|
||||
@@ -5,12 +5,15 @@
|
||||
:empty-view-img-style="{ width: '500rpx',height: '280rpx'}">
|
||||
<view class="item mt-2 pz-2 px-3 f-a-i" v-for="(item,index) in dataList" :key="index">
|
||||
<image :src="item.avatar" mode=""></image>
|
||||
<view class="item-cont">
|
||||
<view class="f-a-i f-jcsb" style="margin-bottom: 36rpx;">
|
||||
<view class="item-cont-name">{{item.realName}}</view>
|
||||
<view class="item-cont flex flex-column justify-around">
|
||||
<view class="flex justify-between align-center" >
|
||||
<view class="item-cont-name">{{item.nickname}}</view>
|
||||
<view class="item-cont-time">{{item.createTime}}</view>
|
||||
</view>
|
||||
<view class="item-cont-call">{{item.phone}}</view>
|
||||
<view class="flex justify-between align-center" >
|
||||
<view class="item-cont-call">{{item.phone}}</view>
|
||||
<view class="f26" style="color: #13AFA8;">{{item.carNo}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</z-paging>
|
||||
@@ -39,6 +42,7 @@
|
||||
this.pageForm.limit = pageSize
|
||||
this.pageForm.page = pageNo
|
||||
getPageList(this.pageForm).then(res => {
|
||||
console.log(res.data.list);
|
||||
this.$refs.paging.complete(res.data.list);
|
||||
})
|
||||
},
|
||||
@@ -60,7 +64,8 @@
|
||||
.item-cont {
|
||||
width: calc(100% - 174rpx);
|
||||
margin-left: 24rpx;
|
||||
|
||||
height: 150rpx;
|
||||
|
||||
.item-cont-name {
|
||||
font-size: 36rpx;
|
||||
font-weight: 500;
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
},
|
||||
//to
|
||||
navigatorFn(item) {
|
||||
console.log(item);
|
||||
// console.log(item);
|
||||
if (item.text == '联系客服') {
|
||||
configGetuniq({
|
||||
key: 'consumer_hotline'
|
||||
@@ -155,7 +155,6 @@
|
||||
//获取个人信息
|
||||
getUserInfo() {
|
||||
userCenterPersonalInfo().then(res => {
|
||||
console.log(res.data);
|
||||
this.userInfo = res.data
|
||||
uni.setStorageSync('userInfo', res.data);
|
||||
})
|
||||
|
||||
@@ -6,25 +6,29 @@
|
||||
<view class="f-a-i f-jcsb">
|
||||
<view>
|
||||
<view class="wallet-header-title">总金额(元)</view>
|
||||
<view class="wallet-header-number">
|
||||
<u--text mode="price" text="728732" size="26" :bold="true"></u--text>
|
||||
<view class="wallet-header-number f-56 c111">
|
||||
{{myWallet.nowMoney}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="f-a-i">
|
||||
<u-button type="primary" text="提现" color="#13AFA8" :customStyle='buttomStyle'></u-button>
|
||||
<u-button type="primary" text="充值" color="#13AFA8" :customStyle='buttomStyle'></u-button>
|
||||
<u-button type="primary" text="提现" color="#13AFA8" :customStyle='buttomStyle'
|
||||
@click="topUpFn(1)"></u-button>
|
||||
<u-button type="primary" text="充值" color="#13AFA8" :customStyle='buttomStyle'
|
||||
@click="topUpFn(2)"></u-button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="f-a-i" style="margin-top: 40rpx;">
|
||||
<view style="width: 50%;" @click="navReconciliationFn">
|
||||
<view>工单账单(元)</view>
|
||||
<view class="wallet-header-can-withdraw"> <u--text mode="price" text="728732" size="20"
|
||||
color="#111"></u--text></view>
|
||||
<view class="wallet-header-can-withdraw f-40 c111">
|
||||
{{carData.workOrderBill}}
|
||||
</view>
|
||||
</view>
|
||||
<view style="width: 50%;">
|
||||
<view>订单账单(元)</view>
|
||||
<view class="wallet-header-can-withdraw"> <u--text mode="price" text="728732" size="20"
|
||||
color="#111"></u--text></view>
|
||||
<view class="wallet-header-can-withdraw f-40 c111">
|
||||
{{carData.orderSum}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -32,37 +36,45 @@
|
||||
<view class="f-a-i f-jcsb">
|
||||
<view class="wallet-list-consumption-detail">消费明细</view>
|
||||
<view class="f-a-i wallet-list-date" @click="dateShow=true">
|
||||
<!-- 2023-06 -->{{dateText}}
|
||||
<!-- <u--text mode="date" :text="dateText" @format="DateFormat"></u--text> -->
|
||||
{{dateText}}
|
||||
<image src="@/static/images/carshop/user/arrows_bott.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="f-a-i f-jcsb wallet-operation">
|
||||
<view class="f-a-i">
|
||||
<view>支出:¥1000.00</view>
|
||||
<view style="margin-left: 24rpx;">收入:¥1000.00</view>
|
||||
<view>支出:{{myWallet.monetary}}</view>
|
||||
<view style="margin-left: 24rpx;">收入:{{myWallet.recharge}}</view>
|
||||
</view>
|
||||
<view>
|
||||
余额:¥1000.00
|
||||
余额:{{myWallet.nowMoney }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<z-paging ref="paging" class="box" id="box" :fixed="false" :style="{width: '100%',height:listTop}"
|
||||
v-model="billList" @query="queryList">
|
||||
<view v-for="(item,index) in billList" :key="index" class="box-cont">
|
||||
<view class="f-a-i">
|
||||
<view v-if="item.type==1" class="f-a-i">
|
||||
<view class="box-list ">
|
||||
<view>
|
||||
<image v-if="index%2==0" src="@/static/images/carshop/user/harvest.png" mode=""></image>
|
||||
<image v-else src="@/static/images/carshop/user/expenditure.png"></image>
|
||||
</view>
|
||||
<image src="@/static/images/carshop/user/harvest.png" mode=""></image>
|
||||
</view>
|
||||
<view class="f-a-i f-jcsb box-list-title">
|
||||
<view class="">
|
||||
<view class="box-list-title-cont">购买产品</view>
|
||||
<view class="box-list-title-time">2021-06-21 12:33:00</view>
|
||||
<view class="box-list-title-cont">{{item.remark}}</view>
|
||||
<view class="box-list-title-time"> {{item.createTime}}</view>
|
||||
</view>
|
||||
<view class="box-list-title-money">{{index%2==0?'+':'-'}}100</view>
|
||||
<view class="box-list-title-money"> +{{item.amount}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="f-a-i">
|
||||
<view class="box-list ">
|
||||
<image src="@/static/images/carshop/user/expenditure.png"></image>
|
||||
</view>
|
||||
<view class="f-a-i f-jcsb box-list-title">
|
||||
<view class="">
|
||||
<view class="box-list-title-cont">{{item.remark}}</view>
|
||||
<view class="box-list-title-time"> {{item.createTime}}</view>
|
||||
</view>
|
||||
<view class="box-list-title-money"> -{{item.amount}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -75,6 +87,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
balanceList,
|
||||
getMyWalletAPI,
|
||||
getMyWalletCarDealer
|
||||
} from '@/api/mine/wallet'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -91,13 +108,16 @@
|
||||
},
|
||||
//列表
|
||||
billList: [],
|
||||
listTop: 0
|
||||
listTop: 0,
|
||||
myWallet: {},
|
||||
carData:{
|
||||
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
//格式化
|
||||
DateFormat(e) {
|
||||
},
|
||||
DateFormat(e) {},
|
||||
//确认时间
|
||||
dateConfirm(e) {
|
||||
this.dateShow = false
|
||||
@@ -106,7 +126,7 @@
|
||||
const year = date.getFullYear();
|
||||
const month = date.getMonth() + 1; // 月份是从0开始计数的,所以要加1
|
||||
this.dateText = `${year}-${month<10?('0'+month):month}`
|
||||
|
||||
this.$refs.paging.refresh();
|
||||
},
|
||||
//去工单对账
|
||||
navReconciliationFn() {
|
||||
@@ -116,14 +136,47 @@
|
||||
},
|
||||
//订单列表
|
||||
queryList(pageNo, pageSize) {
|
||||
// 此处请求仅为演示,请替换为自己项目中的请求
|
||||
// this.$request.queryList({
|
||||
// pageNo,
|
||||
// pageSize
|
||||
// }).then(res => {
|
||||
let arr = [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}]
|
||||
this.$refs.paging.complete(arr);
|
||||
// })
|
||||
balanceList({
|
||||
pageNo,
|
||||
pageSize,
|
||||
month: this.dateText,
|
||||
type: 'all'
|
||||
}).then(res => {
|
||||
// console.log(res);
|
||||
if (res.data.list[0]) {
|
||||
this.$refs.paging.complete(res.data.list[0].list)
|
||||
} else {
|
||||
this.$refs.paging.complete([])
|
||||
}
|
||||
}).catch(err => {
|
||||
this.$refs.paging.complete(false)
|
||||
})
|
||||
},
|
||||
//获取钱包信息
|
||||
getMyWallet() {
|
||||
//余额
|
||||
getMyWalletAPI().then(res => {
|
||||
// console.log(res);
|
||||
this.myWallet = res.data
|
||||
})
|
||||
//获取订单,工单
|
||||
getMyWalletCarDealer().then(res => {
|
||||
console.log('工单,订单',res);
|
||||
this.carData=res.data
|
||||
// this.myWallet = res.data
|
||||
})
|
||||
},
|
||||
//提现,充值
|
||||
topUpFn(type) {
|
||||
if (type == 2) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/driver/mine/wallet/topUp?money=${this.myWallet.nowMoney}`
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: `/pages/driver/mine/wallet/withdrawDeposit?money=${this.myWallet.nowMoney}`
|
||||
})
|
||||
}
|
||||
},
|
||||
formatter(type, value) {
|
||||
if (type === 'year') {
|
||||
@@ -155,6 +208,9 @@
|
||||
const year = date.getFullYear();
|
||||
const month = date.getMonth() + 1; // 月份是从0开始计数的,所以要加1
|
||||
this.dateText = `${year}-${month<10?('0'+month):month}`
|
||||
},
|
||||
onShow() {
|
||||
this.getMyWallet()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -166,7 +222,7 @@
|
||||
|
||||
.box-cont {
|
||||
background-color: #fff;
|
||||
padding: 40rpx 24rpx;
|
||||
padding: 16rpx 24rpx 16rpx 24rpx;
|
||||
}
|
||||
|
||||
.box-list-title {
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
<text class="f-52 c111 fw-b mt-1">{{ myWallet.nowMoney }}</text>
|
||||
</view>
|
||||
<view class="flex align-center">
|
||||
<u-button color="#333" :customStyle="{width: '136rpx', height: '64rpx', lineHeight: '64rpx'}"
|
||||
<u-button color="#13AFA8" :customStyle="{width: '136rpx', height: '64rpx', lineHeight: '64rpx'}"
|
||||
@click="topUpFn(1)">提现</u-button>
|
||||
<u-button color="#333"
|
||||
<u-button color="#13AFA8"
|
||||
:customStyle="{width: '136rpx', height: '64rpx', lineHeight: '64rpx', marginLeft: '32rpx'}"
|
||||
@click="topUpFn(2)">充值</u-button>
|
||||
</view>
|
||||
@@ -37,11 +37,11 @@
|
||||
</view>
|
||||
<view class="flex align-center justify-between mt-2 f-28 c666">
|
||||
<view class="">
|
||||
<text>支出:¥{{myWallet.monetary}}</text>
|
||||
<text>收入:¥{{myWallet.recharge}}</text>
|
||||
<text>支出:{{myWallet.monetary}}</text>
|
||||
<text>收入:{{myWallet.recharge}}</text>
|
||||
</view>
|
||||
<view class="">
|
||||
余额:¥{{ myWallet.nowMoney }}
|
||||
余额:{{myWallet.nowMoney }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -141,7 +141,11 @@
|
||||
...this.query
|
||||
}).then(res => {
|
||||
console.log(res);
|
||||
this.$refs.paging.complete(res.data.list[0].list)
|
||||
if (res.data.list[0]) {
|
||||
this.$refs.paging.complete(res.data.list[0].list)
|
||||
} else {
|
||||
this.$refs.paging.complete([])
|
||||
}
|
||||
}).catch(err => {
|
||||
this.$refs.paging.complete(false)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user