From 15b3a7d7f0ec49308bde6505f5d4a96a55e1d6ba Mon Sep 17 00:00:00 2001
From: "3321822538@qq.com" <3321822538@qq.com>
Date: Sat, 10 May 2025 17:54:20 +0800
Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E9=B9=BF=E9=AA=91=E8=A1=8C=20?=
=?UTF-8?q?=E4=BC=98=E5=8C=96=E8=93=9D=E7=89=99=E8=BF=9E=E6=8E=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/tab-bar/tab-bar.vue | 15 +-
page_fenbao/storedlist/trueorder.vue | 345 +++++-
page_shanghu/admin_index.vue | 1 +
page_shanghu/gongzuotai/AccountDetails.vue | 12 +-
page_shanghu/gongzuotai/ChargingTemplate.vue | 19 +-
page_shanghu/gongzuotai/woke_deviceMgmt.vue | 8 +-
page_shanghu/guanli/admin_order.vue | 9 +-
page_shanghu/guanli/device_detail.vue | 10 +-
page_shanghu/guanli/order_detail.vue | 62 +-
page_shanghu/guanli/yunying.vue | 224 ++--
page_user/huanbike.vue | 19 +-
page_user/shiming.vue | 8 +-
pages/index/index.vue | 11 +-
pages/myorder/returned/index.vue | 353 +++---
pages/nearbystores/index.vue | 7 +-
uni_modules/ksp-cropper/changelog.md | 36 +
.../components/ksp-cropper/ksp-cropper.vue | 1004 +++++++++++++++++
uni_modules/ksp-cropper/package.json | 81 ++
uni_modules/ksp-cropper/readme.md | 78 ++
19 files changed, 1934 insertions(+), 368 deletions(-)
create mode 100644 uni_modules/ksp-cropper/changelog.md
create mode 100644 uni_modules/ksp-cropper/components/ksp-cropper/ksp-cropper.vue
create mode 100644 uni_modules/ksp-cropper/package.json
create mode 100644 uni_modules/ksp-cropper/readme.md
diff --git a/components/tab-bar/tab-bar.vue b/components/tab-bar/tab-bar.vue
index 9036b8e..22cdd87 100644
--- a/components/tab-bar/tab-bar.vue
+++ b/components/tab-bar/tab-bar.vue
@@ -171,15 +171,20 @@
url:'/page_fenbao/storedlist/trueorder?modelId=' + this.modelId + '&sn=' + this.sn
})
}else{
- uni.showToast({
- title: '当前车辆不可用',
- icon: 'none'
- })
+ console.log('前台');
+ uni.showModal({
+ title: '提示',
+ content: '当前车辆不可用',
+ showCancel: false,
+ confirmText: '知道了'
+ })
}
}else{
+ console.log('系统');
uni.showToast({
title: res.msg,
- icon: 'none'
+ icon: 'none',
+ duration:2000
})
}
})
diff --git a/page_fenbao/storedlist/trueorder.vue b/page_fenbao/storedlist/trueorder.vue
index bbfb31d..b789d79 100644
--- a/page_fenbao/storedlist/trueorder.vue
+++ b/page_fenbao/storedlist/trueorder.vue
@@ -379,18 +379,24 @@
sn: '',
tit: '',
logoflag: false,
- devicesarr: [],
ver_dataflag: 1,
deviceId: '',
name: '',
- mac: '',
zhezhaoflag:true,
tit:' ',
actiobj:{},
- countdown:1
+ countdown:1,
+
+ ver_dataflag: 1,
+ mac: '',
+ deviceid: '',
+ devicename: '',
+ devicesarr: [],
+ findDeviceTimer: null,
}
},
onLoad(option) {
+ xBlufi.initXBlufi(1)
console.log(option)
if (option.modelId) {
uni.showLoading({
@@ -419,7 +425,6 @@
})
},1000)
} else {
- // this.zhezhaoflag = true
uni.showLoading({
title: '加载中...',
mask: true
@@ -448,9 +453,15 @@
this.sn = getQueryParam(decodedValue, 's')
this.$u.get(`/app/device/availableDetail?sn=${this.sn}`).then((res) => {
if (res.code == 200) {
+ console.log(res.data);
if (res.data) {
this.bikeobj = res.data
this.modelId = res.data.modelId
+ if(res.data.onlineStatus == 0){
+ this.mac = res.data.mac
+ console.log(this.mac)
+ this.findDevice()
+ }
this.gettaocan()
this.getcheliang()
} else {
@@ -467,7 +478,7 @@
} else { //不是则返回上一级
uni.navigateBack()
}
- }, 1500)
+ }, 2000)
}
}
})
@@ -488,8 +499,14 @@
this.$u.get(`/app/device/availableDetail?sn=${this.sn}`).then((res) => {
if (res.code == 200) {
if (res.data) {
+ console.log(res.data);
this.bikeobj = res.data
this.modelId = res.data.modelId
+ if(res.data.onlineStatus == 0){
+ this.mac = res.data.mac
+ console.log(this.mac);
+ this.findDevice()
+ }
this.gettaocan()
this.getcheliang()
} else {
@@ -518,7 +535,85 @@
this.getgg()
},1500)
},
+ onShow() {
+ xBlufi.notifyStartDiscoverBle({
+ 'isStart': true
+ })
+ xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent)
+ },
methods: {
+ // 判断离线连接蓝牙
+ findDevice() {
+ // 使用 find 方法查找匹配的设备
+ console.log(this.devicesarr);
+ const matchedDevice = this.devicesarr.find(device => {
+ // console.log(device.name, this.mac, '111')
+ return device.name.slice(-12) == this.mac.slice(-12)
+ })
+ if (matchedDevice) {
+ // 找到匹配的设备
+ xBlufi.notifyStartDiscoverBle({
+ 'isStart': false
+ })
+ xBlufi.notifyConnectBle({
+ isStart: true,
+ deviceId: matchedDevice.deviceId,
+ name: matchedDevice.name
+ })
+ this.deviceid = matchedDevice.deviceId
+ this.devicename = matchedDevice.name
+ console.log(this.deviceid, '11221')
+ } else {
+ this.findDeviceTimer = setTimeout(this.findDevice.bind(this), 1000) // 使用 bind 保持 this 上下文
+ }
+ },
+ // 获取附近蓝牙设备列表
+ funListenDeviceMsgEvent: function(options) {
+ switch (options.type) {
+ case xBlufi.XBLUFI_TYPE.TYPE_STATUS_CONNECTED:
+ if (!options.result) {
+ console.log('断开');
+ this.ver_dataflag = 1
+ console.log(this.ver_dataflag,'断开断开');
+ }
+ break;
+ case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS:
+ if (options.result) {
+ this.devicesarr = options.data
+ }
+ break;
+ case xBlufi.XBLUFI_TYPE.TYPE_CONNECTED:
+ console.log("连接回调:" + JSON.stringify(options))
+ if (options.result == true) {
+ setTimeout(() => {
+ this.ver_dataflag = 3
+ uni.hideLoading()
+ }, 2000)
+ xBlufi.notifyInitBleEsp32({
+ deviceId: this.deviceid
+ })
+ this.deviceid = options.data.deviceId
+ this.name = this.name
+ }else{
+ uni.hideLoading()
+ this.findDevice()
+ }
+ break;
+ case xBlufi.XBLUFI_TYPE.TYPE_RECIEVE_CUSTON_DATA:
+ console.log("1收到设备发来的自定义数据结果:", options.data)
+ break;
+ case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS_START:
+ if (!options.result) {
+ console.log('蓝牙未开启')
+ return
+ } else {
+ this.lanyaflag = false
+ }
+ break;
+ }
+ },
+
+
startCountdown() {
const timer = setInterval(() => {
if (this.countdown <= 0) {
@@ -562,6 +657,154 @@
},
// 点击进行支付
btnzhifu() {
+ if(this.bikeobj.onlineStatus == 0){
+ if(this.ver_dataflag == 3){
+ this.getlyzf()
+ }else{
+ uni.showLoading({
+ title: '车辆连接中...',
+ mask: true
+ })
+ }
+ }else{
+ if (this.bikeobj.areaAuthentication == true) { //判断是否需要实名认证
+ this.$u.get("/getInfo").then(res => {
+ if (res.code == 200) {
+ if (res.user.isReal == false) { //未实名需要去实名才能进行下单
+ uni.showModal({
+ title: '提示',
+ content: '您当前还未实名认证,是否前去实名认证?',
+ showCancel: true,
+ success: function(res) {
+ if (res.confirm) {
+ uni.navigateTo({
+ url: '/page_user/shiming'
+ })
+ } else if (res.cancel) {
+
+ }
+ }
+ })
+ }else{
+ if (this.checked == false) {
+ let that = this
+ uni.showModal({
+ title: '提示',
+ content: '您是否已经阅读完,并且同意此《电动车租赁协议》?',
+ showCancel: true,
+ success: function(res) {
+ if (res.confirm) {
+ that.checked = true
+ uni.showLoading({
+ title: '加载中...',
+ mask: true
+ })
+ that.$u.get(`/app/channel/list?appId=${that.$store.state.appid}`).then((
+ res) => {
+ if (res.code == 200) {
+ that.channelId = res.data[0].channelId
+ that.getzf()
+ } else if (res.code == 401) {
+ uni.hideLoading()
+ that.logoflag = true
+ } else {
+ uni.showToast({
+ title: res.msg,
+ icon: 'none',
+ duration: 2000
+ })
+ }
+ })
+ } else if (res.cancel) {
+ console.log('取消') // 用户点击取消
+ }
+ }
+ })
+ } else {
+ uni.showLoading({
+ title: '加载中...',
+ mask: true
+ })
+ this.$u.get(`/app/channel/list?appId=${this.$store.state.appid}`).then((res) => {
+ if (res.code == 200) {
+ this.channelId = res.data[0].channelId
+ this.getzf()
+ } else if (res.code == 401) {
+ uni.hideLoading()
+ this.logoflag = true
+ } else {
+ uni.showToast({
+ title: res.msg,
+ icon: 'none',
+ duration: 2000
+ })
+ }
+ })
+ }
+ }
+ }else if(res.code == 401){
+ this.logoflag = true
+ }
+ })
+ } else if (this.checked == false) {
+ let that = this
+ uni.showModal({
+ title: '提示',
+ content: '您是否已经阅读完,并且同意此《电动车租赁协议》?',
+ showCancel: true,
+ success: function(res) {
+ if (res.confirm) {
+ that.checked = true
+ uni.showLoading({
+ title: '加载中...',
+ mask: true
+ })
+ that.$u.get(`/app/channel/list?appId=${that.$store.state.appid}`).then((
+ res) => {
+ if (res.code == 200) {
+ that.channelId = res.data[0].channelId
+ that.getzf()
+ } else if (res.code == 401) {
+ uni.hideLoading()
+ that.logoflag = true
+ } else {
+ uni.showToast({
+ title: res.msg,
+ icon: 'none',
+ duration: 2000
+ })
+ }
+ })
+ } else if (res.cancel) {
+ console.log('取消') // 用户点击取消
+ }
+ }
+ })
+ } else {
+ uni.showLoading({
+ title: '加载中...',
+ mask: true
+ })
+ this.$u.get(`/app/channel/list?appId=${this.$store.state.appid}`).then((res) => {
+ if (res.code == 200) {
+ this.channelId = res.data[0].channelId
+ this.getzf()
+ } else if (res.code == 401) {
+ uni.hideLoading()
+ this.logoflag = true
+ } else {
+ uni.showToast({
+ title: res.msg,
+ icon: 'none',
+ duration: 2000
+ })
+ }
+ })
+ }
+ }
+ },
+ // 蓝牙支付
+ getlyzf(){
if (this.bikeobj.areaAuthentication == true) { //判断是否需要实名认证
this.$u.get("/getInfo").then(res => {
if (res.code == 200) {
@@ -576,7 +819,7 @@
url: '/page_user/shiming'
})
} else if (res.cancel) {
-
+
}
}
})
@@ -585,7 +828,7 @@
let that = this
uni.showModal({
title: '提示',
- content: '《电动车租赁协议》您是否已阅读并同意?',
+ content: '您是否已经阅读完,并且同意此《电动车租赁协议》?',
showCancel: true,
success: function(res) {
if (res.confirm) {
@@ -594,11 +837,10 @@
title: '加载中...',
mask: true
})
- that.$u.get(`/app/channel/list?appId=${that.$store.state.appid}`).then((
- res) => {
+ that.$u.get(`/app/channel/list?appId=${that.$store.state.appid}`).then((res) => {
if (res.code == 200) {
that.channelId = res.data[0].channelId
- that.getzf()
+ that.getlyxd()
} else if (res.code == 401) {
uni.hideLoading()
that.logoflag = true
@@ -623,7 +865,7 @@
this.$u.get(`/app/channel/list?appId=${this.$store.state.appid}`).then((res) => {
if (res.code == 200) {
this.channelId = res.data[0].channelId
- this.getzf()
+ this.getlyxd()
} else if (res.code == 401) {
uni.hideLoading()
this.logoflag = true
@@ -645,7 +887,7 @@
let that = this
uni.showModal({
title: '提示',
- content: '《电动车租赁协议》您是否已阅读并同意?',
+ content: '您是否已经阅读完,并且同意此《电动车租赁协议》?',
showCancel: true,
success: function(res) {
if (res.confirm) {
@@ -658,7 +900,7 @@
res) => {
if (res.code == 200) {
that.channelId = res.data[0].channelId
- that.getzf()
+ that.getlyxd()
} else if (res.code == 401) {
uni.hideLoading()
that.logoflag = true
@@ -683,7 +925,7 @@
this.$u.get(`/app/channel/list?appId=${this.$store.state.appid}`).then((res) => {
if (res.code == 200) {
this.channelId = res.data[0].channelId
- this.getzf()
+ this.getlyxd()
} else if (res.code == 401) {
uni.hideLoading()
this.logoflag = true
@@ -697,7 +939,65 @@
})
}
},
-
+ // 蓝牙下单
+ getlyxd(){
+ let data = {
+ deviceId: this.bikeobj.id,
+ suitId: this.suitId,
+ price: this.yucobj,
+ appId: this.$store.state.appid,
+ channelId: this.channelId
+ }
+ uni.showLoading({
+ title: '加载中...',
+ mask: true
+ })
+ this.$u.post(`/app/order`, data).then((resp) => {
+ if (resp.code == 200) {
+ uni.requestPayment({
+ provider: 'wxpay',
+ timeStamp: resp.data.payParams.timeStamp,
+ nonceStr: resp.data.payParams.nonceStr,
+ package: resp.data.payParams.packageVal,
+ signType: resp.data.payParams.signType,
+ paySign: resp.data.payParams.paySign,
+ success: (respc) => {
+ xBlufi.notifySendCustomData({
+ customData: "11open@"
+ })
+ console.log(respc, '支付成功')
+ // xBlufi.notifySendCustomData({
+ // customData: "11open@"
+ // })
+ this.$u.put(`/app/pay/refreshPayResult?no=${resp.data.pay.no}`).then((
+ res) => {
+ setTimeout(() => {
+ uni.switchTab({
+ url: '/pages/myorder/returned/index?orderid=' + resp.data.pay.bstId + '&vate=' + this.devicesarr
+ })
+ uni.hideLoading()
+ }, 1000)
+ }) //刷新支付结果
+ },
+ fail(err) {
+ setTimeout(() => {
+ uni.hideLoading()
+ }, 1000)
+ console.log('取消或者支付失败')
+ }
+ })
+ } else {
+ uni.hideLoading()
+ uni.showToast({
+ title: resp.msg,
+ icon: 'none',
+ duration: 2000
+ })
+ }
+ }).catch(e => {
+ uni.hideLoading()
+ })
+ },
// 下单
getzf() {
let data = {
@@ -758,6 +1058,10 @@
this.$u.get(`/app/device/availableDetail?sn=${this.sn}`).then((res) => {
if (res.code == 200) {
this.bikeobj = res.data
+ if(res.data.onlineStatus == 0){
+ this.mac = res.data.mac
+ this.findDevice()
+ }
console.log(res.data,'020202');
this.$u.put(`/app/user/bindArea?areaId=${res.data.areaId}`).then(resp =>{})
}
@@ -765,6 +1069,10 @@
} else {
this.$u.get(`/app/device/availableDetail?sn=${this.chesn}`).then((res) => {
if (res.code == 200) {
+ if(res.data.onlineStatus == 0){
+ this.mac = res.data.mac
+ this.findDevice()
+ }
this.bikeobj = res.data
}
})
@@ -775,8 +1083,10 @@
this.$u.get(`/app/suit/listByModel?modelId=${this.modelId}`).then((res) => {
if (res.code == 200) {
this.taocanlist = res.data
- this.suitId = res.data[0].id
- this.actiobj = res.data[0]
+ if(this.suitId == ''){
+ this.suitId = res.data[0].id
+ this.actiobj = res.data[0]
+ }
this.getjisuan()
}
})
@@ -858,6 +1168,7 @@
if (res.code == 200) {
wx.setStorageSync('token', res.token)
this.gettaocan()
+ // this.fanganindex = 0
this.tit = '确认订单页'
this.logoflag = false
} else {
diff --git a/page_shanghu/admin_index.vue b/page_shanghu/admin_index.vue
index 8432a5f..d31471c 100644
--- a/page_shanghu/admin_index.vue
+++ b/page_shanghu/admin_index.vue
@@ -425,6 +425,7 @@
let sceneValue = res.result
let decodedValue = decodeURIComponent(sceneValue)
this.sn = getQueryParam(decodedValue, 's')
+ console.log(this.sn,'....');
if (this.sn != '') {
this.$u.get('/bst/device?sn=' + this.sn).then((res) => {
if (res.code === 200) {
diff --git a/page_shanghu/gongzuotai/AccountDetails.vue b/page_shanghu/gongzuotai/AccountDetails.vue
index 0d95751..cd1e973 100644
--- a/page_shanghu/gongzuotai/AccountDetails.vue
+++ b/page_shanghu/gongzuotai/AccountDetails.vue
@@ -9,15 +9,15 @@
账户总余额
- ¥{{userInfo.balance == null ? '0.00' : userInfo.balance.toFixed(2)}}元
+ ¥{{userInfo.balance == null ? '0.00' : (Number(userInfo.balance) + Number(waitDivideAmount)).toFixed(2)}}元
- 待结算金额
+ 累计提现
- ¥{{waitDivideAmount == null ? '0.00' : waitDivideAmount.toFixed(2)}}元
+ ¥{{successAmount == null ? '0.00' : successAmount.toFixed(2)}}元
@@ -162,7 +162,8 @@
channelId:'',
objobj:{},
total:0,
- waitDivideAmount:''
+ waitDivideAmount:'',
+ successAmount:''
}
},
onLoad(e) {
@@ -209,7 +210,8 @@
if (res.code == 200) {
this.userInfo = res.user
this.gettxfs()
- this.waitDivideAmount = res.stat.bonus.waitDivideAmount
+ this.successAmount = res.stat.withdraw.successAmount == null ? 0 : res.stat.withdraw.successAmount
+ this.waitDivideAmount = res.stat.bonus.waitDivideAmount == null ? 0 : res.stat.bonus.waitDivideAmount
}
})
},
diff --git a/page_shanghu/gongzuotai/ChargingTemplate.vue b/page_shanghu/gongzuotai/ChargingTemplate.vue
index f71cc93..2e824a2 100644
--- a/page_shanghu/gongzuotai/ChargingTemplate.vue
+++ b/page_shanghu/gongzuotai/ChargingTemplate.vue
@@ -22,17 +22,12 @@
起步价:
- {{item.startRule.startingPrice || '--'}}元(含{{item.startRule.startingTime || '--'}}分钟小时天)
+ {{item.startRule.startingPrice || '--'}}元(含{{item.startRule.startingTime || '--'}}{{item.rentalUnit == 'minutes' ? '分钟' : item.rentalUnit == 'hours' ? '小时' : '天'}})
时长费:
- {{item.startRule.timeoutPrice || '--'}}元/{{ item.startRule.timeoutTime || '--'}}分钟小时天
+ {{item.startRule.timeoutPrice || '--'}}元/{{ item.startRule.timeoutTime || '--'}}{{item.rentalUnit == 'minutes' ? '分钟' : item.rentalUnit == 'hours' ? '小时' : '天'}}
+
@@ -92,12 +87,12 @@
-->
-
- 删除
-
编辑
+
+ 删除
+
@@ -436,7 +431,7 @@
.btn1 {
color: #ff4d4f;
- border-right: 1rpx solid #f0f0f0;
+ border-left: 1rpx solid #f0f0f0;
}
.btn2 {
diff --git a/page_shanghu/gongzuotai/woke_deviceMgmt.vue b/page_shanghu/gongzuotai/woke_deviceMgmt.vue
index 5943d3f..20a8bef 100644
--- a/page_shanghu/gongzuotai/woke_deviceMgmt.vue
+++ b/page_shanghu/gongzuotai/woke_deviceMgmt.vue
@@ -7,10 +7,10 @@
-
-
+
+
@@ -576,7 +576,7 @@ page {
color: #fff;
}
.input {
- width:540rpx !important;
+ width:680rpx !important;
font-size: 28rpx;
color: #1a1a1a;
border: 1px solid #ccc;
diff --git a/page_shanghu/guanli/admin_order.vue b/page_shanghu/guanli/admin_order.vue
index d2c7ac0..e010470 100644
--- a/page_shanghu/guanli/admin_order.vue
+++ b/page_shanghu/guanli/admin_order.vue
@@ -75,10 +75,10 @@
- 实收金额:0元
+ 实收金额:0元
- 实收金额:{{ formatPayedAmount(item.payedAmount, item.payRefunded, item.payRefunding) }}
+ 实收金额:{{ formatPayedAmount(item.payedAmount, item.payRefunded, item.payRefunding) }}
用户手机号:{{item.userPhone == null ? '--' : item.userPhone}}
@@ -105,9 +105,12 @@
-
+
开始时间:{{formatDate(item.startTime)}}
+
+ 开始时间:无
+
租赁时长:{{formatDatess(item.startTime,item.endTime)}}
diff --git a/page_shanghu/guanli/device_detail.vue b/page_shanghu/guanli/device_detail.vue
index 203c520..785ae0c 100644
--- a/page_shanghu/guanli/device_detail.vue
+++ b/page_shanghu/guanli/device_detail.vue
@@ -237,8 +237,8 @@
最后租车客户: {{deviceInfos.orderUserPhone == null ? '--' : deviceInfos.orderUserPhone}}
-
- 最后租车订单: {{deviceInfos.orderNo == null ? '--' : deviceInfos.orderNo}}
+
+ 最后租车订单: {{deviceInfos.orderNo == null ? '--' : deviceInfos.orderNo}}
最后用车时间: 使用中 {{deviceInfos.orderDeviceEndTime == null ? '--' : deviceInfos.orderDeviceEndTime}}
@@ -461,6 +461,12 @@
}
},
methods: {
+ // 点击跳转到订单详情
+ btndd(){
+ uni.navigateTo({
+ url:'/page_shanghu/guanli/order_detail?orid=' + this.deviceInfos.orderId + '&id=' + this.deviceInfos.sn
+ })
+ },
// 点击提示什么声音模式
btnsy(){
if(this.deviceInfos.music == 0){
diff --git a/page_shanghu/guanli/order_detail.vue b/page_shanghu/guanli/order_detail.vue
index f970dd9..80339c3 100644
--- a/page_shanghu/guanli/order_detail.vue
+++ b/page_shanghu/guanli/order_detail.vue
@@ -64,9 +64,8 @@
¥0.00
- 调度费用:¥{{orderxqobj.dispatchFee}}
- ¥{{orderxqobj.manageFee}}
- ¥0.00
+ 调度费用:¥{{orderxqobj.dispatchFee}}
+ ¥{{orderxqobj.manageFee}}
@@ -418,6 +417,7 @@
currentPolyline:[],
trackPoints: [], // 存储轨迹点数据
+ tkje:true
}
},
onLoad(e) {
@@ -662,28 +662,40 @@
// 点击退款
btntuikuan(){
- let data = {
- orderId:this.orid,
- amount:this.amount
- }
- this.$u.put(`/bst/order/refund`,data).then(res =>{
- if(res.code == 200){
- uni.showToast({
- title: '退款成功',
- icon: 'success',
- duration: 2000
- })
- this.tkflag = false
- this.deviceInfo()
- this.getorderxq()
- }else{
- uni.showToast({
- title: res.msg,
- icon: 'none',
- duration: 2000
- })
+ if(this.tkje == true){
+ this.tkje = false
+ let data = {
+ orderId:this.orid,
+ amount:this.amount
}
- })
+ this.$u.put(`/bst/order/refund`,data).then(res =>{
+ if(res.code == 200){
+ uni.showToast({
+ title: '退款成功',
+ icon: 'success',
+ duration: 2000
+ })
+ this.tkflag = false
+ this.deviceInfo()
+ this.getorderxq()
+ setTimeout(()=>{
+ this.tkje = true
+ },2000)
+ }else{
+ uni.showToast({
+ title: res.msg,
+ icon: 'none',
+ duration: 2000
+ })
+ this.tkflag = false
+ setTimeout(()=>{
+ this.tkje = true
+ },2000)
+ }
+ })
+ }else{
+ console.log(11);
+ }
},
// 点击辅助还车
btnfuzhu(){
@@ -2516,7 +2528,7 @@
view{
width: 50%;
margin-top: 10rpx;
- font-size: 24rpx;
+ font-size: 26rpx;
color: #979797;
span{
color: #000;
diff --git a/page_shanghu/guanli/yunying.vue b/page_shanghu/guanli/yunying.vue
index 07e2400..39d7507 100644
--- a/page_shanghu/guanli/yunying.vue
+++ b/page_shanghu/guanli/yunying.vue
@@ -20,7 +20,7 @@
账户余额(元)
- {{infoobj.balance == null ? '¥0.00' : '¥' + infoobj.balance.toFixed(2)}}
+ ¥{{infoobj.balance == null ? '0.00' : (Number(infoobj.balance) + Number(waitDivideAmount)).toFixed(2)}}
累积提现:{{successAmount == null ? '¥0.00' : '¥' + successAmount.toFixed(2)}}
@@ -38,7 +38,7 @@
- {{qbobj.user.count == null ? '0人' : qbobj.user.count + '人'}}
+ {{qbobj.orderUserCount == null ? '0人' : qbobj.orderUserCount + '人'}}
累计用户
@@ -46,15 +46,17 @@
- {{(Number(qbobj.bonus.amount) - Number(qbobj.bonusRefund.amount)).toFixed(2) == null ? '¥0.00' : '¥' + (Number(qbobj.bonus.amount) - Number(qbobj.bonusRefund.amount)).toFixed(2)}}
+
+ ¥{{qbobj.bonusActualAmount == null ? 0 : qbobj.bonusActualAmount}}
- 累计分成
+ 累计收益
- {{(Number(qbobj.order.payAmount) - Number(qbobj.orderRefund.amount)).toFixed(2) == null ? '¥0.00' : '¥' + (Number(qbobj.order.payAmount) - Number(qbobj.orderRefund.amount)).toFixed(2)}}
+
+ ¥{{qbobj.orderActualTotalAmount == null ? 0 : qbobj.orderActualTotalAmount}}
订单金额
@@ -62,7 +64,7 @@
- {{qbobj.order.count == null ? '0' : qbobj.order.count + '笔'}}
+ {{qbobj.orderCount == null ? '0' : qbobj.orderCount}}笔
订单数量
@@ -99,146 +101,102 @@
上月
+
+
+
+ ¥{{yunyingobj.orderActualTotalAmount == null ? 0 : yunyingobj.orderActualTotalAmount}}
+
+
+ 订单总金额
+
+
+
+
+ {{yunyingobj.orderCount == null ? 0 : yunyingobj.orderCount}}笔
+
+
+ 订单总数
+
+
+
+
+ {{yunyingobj.finishedOrderCount == null ? 0 : yunyingobj.finishedOrderCount}}笔
+
+
+ 已完成订单
+
+
+
+
+ {{yunyingobj.orderStatusMap.PROCESSING == null ? 0 : yunyingobj.orderStatusMap.PROCESSING}}笔
+
+
+ 进行中订单
+
+
+
- 营收情况
+ 我的收入{{yunyingobj.bonusActualAmount == null ? 0 : yunyingobj.bonusActualAmount}}元
-
-
-
-
- {{yunyingobj.order.count == null ? '0' : yunyingobj.order.count + '笔'}}
-
-
- 订单数量
-
-
-
-
- {{yunyingobj.order.payAmount == null ? '¥0.00' : '¥' + ((yunyingobj.order.payAmount - yunyingobj.orderRefund.amount).toFixed(2))}}
-
-
- 订单金额
-
-
-
+
+ 订单收入{{yunyingobj.orderActualAmount == null ? 0 : yunyingobj.orderActualAmount}}元
-
-
-
-
- {{yunyingobj.bonus.count == null ? '0' : yunyingobj.bonus.count + '笔'}}
-
-
- 分成数量
-
-
-
-
- {{(Number(yunyingobj.bonus.amount) - Number(yunyingobj.bonusRefund.amount)).toFixed(2) == null ? '¥0.00' : '¥' + (Number(yunyingobj.bonus.amount) - Number(yunyingobj.bonusRefund.amount)).toFixed(2)}}
-
-
- 分成金额
-
-
-
-
-
+
-
@@ -412,7 +370,8 @@
yunyingobj:{},
qbobj:{},
infoobj:{},
- areaId:''
+ areaId:'',
+ waitDivideAmount:''
}
},
onLoad() {
@@ -442,7 +401,8 @@
this.$u.get(`/getInfo`).then(res => {
if (res.code == 200) {
this.infoobj = res.user
- this.successAmount = res.stat.withdraw.successAmount
+ this.successAmount = res.stat.withdraw.successAmount == null ? 0 : res.stat.withdraw.successAmount
+ this.waitDivideAmount = res.stat.bonus.waitDivideAmount == null ? 0 : res.stat.bonus.waitDivideAmount
this.gettongji()
this.getqb()
}
@@ -450,8 +410,9 @@
},
// 请求全部运营统计数据
getqb() {
- let StatKeys = 'order_user_count,order_count,order_pay_amount,order_refund_amount,bonus_count,bonus_amount,bonus_refund_amount,bonus_refund_amount,user_balance'
- this.$u.get(`/dashboard/stat?keys=${StatKeys}&dateRange=&bonusUserId=${this.infoobj.userId}&areaId=${this.areaId}`).then(res => {
+
+ let StatKeys = 'order_user_count,bonus_actual_amount,order_actual_amount,order_count'
+ this.$u.get(`/dashboard/revenueStat?keys=${StatKeys}&dateRange=&userId=${this.infoobj.userId}&areaId=${this.areaId}`).then(res => {
if (res.code == 200) {
this.qbobj = res.data
}
@@ -459,8 +420,8 @@
},
// 请求筛选运营统计数据
gettongji() {
- let StatKeys = 'order_user_count,order_count,order_pay_amount,order_refund_amount,bonus_count,bonus_amount,bonus_refund_amount,bonus_refund_amount,user_balance'
- this.$u.get(`/dashboard/stat?keys=${StatKeys}&dateRange=${this.kstime + ',' + this.jstime}&bonusUserId=${this.infoobj.userId}&areaId=${this.areaId}`).then(res => {
+ let StatKeys = 'order_actual_amount,order_count,order_end_status_count,order_status_count,bonus_actual_amount,order_ridding_fee,order_deduction_fee,order_dispatch_fee,order_manage_fee,order_refund_amount'
+ this.$u.get(`/dashboard/revenueStat?keys=${StatKeys}&dateRange=${this.kstime + ',' + this.jstime}&userId=${this.infoobj.userId}&areaId=${this.areaId}`).then(res => {
if (res.code == 200) {
this.yunyingobj = res.data
}
@@ -551,6 +512,30 @@
diff --git a/uni_modules/ksp-cropper/package.json b/uni_modules/ksp-cropper/package.json
new file mode 100644
index 0000000..8198256
--- /dev/null
+++ b/uni_modules/ksp-cropper/package.json
@@ -0,0 +1,81 @@
+{
+ "id": "ksp-cropper",
+ "displayName": "ksp-cropper",
+ "version": "1.1.13",
+ "description": "高性能图片裁剪工具",
+ "keywords": [
+ "头像",
+ "图片",
+ "裁剪"
+],
+ "repository": "",
+ "engines": {
+ "HBuilderX": "^3.1.0"
+ },
+"dcloudext": {
+ "sale": {
+ "regular": {
+ "price": "0.00"
+ },
+ "sourcecode": {
+ "price": "0.00"
+ }
+ },
+ "contact": {
+ "qq": ""
+ },
+ "declaration": {
+ "ads": "无",
+ "data": "插件不采集任何数据",
+ "permissions": "无"
+ },
+ "npmurl": "",
+ "type": "component-vue"
+ },
+ "uni_modules": {
+ "dependencies": [],
+ "encrypt": [],
+ "platforms": {
+ "cloud": {
+ "tcb": "y",
+ "aliyun": "y"
+ },
+ "client": {
+ "Vue": {
+ "vue2": "y",
+ "vue3": "y"
+ },
+ "App": {
+ "app-vue": "y",
+ "app-nvue": "u"
+ },
+ "H5-mobile": {
+ "Safari": "y",
+ "Android Browser": "y",
+ "微信浏览器(Android)": "y",
+ "QQ浏览器(Android)": "y"
+ },
+ "H5-pc": {
+ "Chrome": "u",
+ "IE": "u",
+ "Edge": "u",
+ "Firefox": "u",
+ "Safari": "u"
+ },
+ "小程序": {
+ "微信": {
+ "minVersion": "2.9.0"
+ },
+ "阿里": "n",
+ "百度": "n",
+ "字节跳动": "n",
+ "QQ": "u"
+ },
+ "快应用": {
+ "华为": "u",
+ "联盟": "u"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/uni_modules/ksp-cropper/readme.md b/uni_modules/ksp-cropper/readme.md
new file mode 100644
index 0000000..2a4a4ba
--- /dev/null
+++ b/uni_modules/ksp-cropper/readme.md
@@ -0,0 +1,78 @@
+# ksp-cropper
+
+## 高性能图片裁剪工具
+
+### 属性说明
+|属性 |类型 |默认 |备注 |
+| :--------: | :-----: | :----: | :----: |
+| url |String | "" | 需要裁剪的图片路径,为空时控件隐藏,不为空时控件显示|
+| mode |String | "free" | 裁剪模式|
+| width |Number | 200 | 图片裁剪后的宽度,固定大小时有效|
+| height |Number | 200 | 图片裁剪后的高度,固定大小时有效|
+| maxWidth |Number | 1024 | 图片裁剪后的最大宽度 |
+| maxHeight |Number | 1024 | 图片裁剪后的最大高度 |
+
+### mode有效值
+
+| 模式 |值 |说明 |
+| :-----: | :-----: | :----: |
+| 固定模式 |fixed | 裁剪出指定大小的图片,一般用于头像上传 |
+| 等比缩放 |ratio | 限定宽高比,裁剪大小不固定 |
+| 自由模式 |free | 不限定宽高比,裁剪大小不固定 |
+
+### 事件说明
+|事件名称 |说明 |返回 |
+| :--------: | :-----: | :----: |
+| ok |点击确定按钮 | e:{path} |
+| cancel |点击取消按钮 | - |
+
+
+### 示例
+
+```html
+
+
+
+
+
+
+
+
+
+
+```
+
+### 注意
+1.微信小程序从基础库 2.21.0 开始, wx.chooseImage 停止维护,请使用 uni.chooseMedia 代替。
+2.微信小程序真机调试会报错,但正常运行是不会有问题的。
+3.uni-app版本不断更新,插件有时无法适应新版本,感谢大家及时提交bug,但希望大家手下留情,不要轻易给差评。
\ No newline at end of file