From de57d4e18d8c25e27cf44aba0caf27c1e62f172f Mon Sep 17 00:00:00 2001 From: mhsnet Date: Wed, 14 Aug 2024 13:22:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=86=E4=BA=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/deviceList/index.vue | 5 ++ src/pages/dzOrder/dzOrder.vue | 76 +++++++++++++++++----- src/pages/index/index.vue | 35 ++++++++-- src/pages/my/my.vue | 6 ++ src/pages/timeOrder/timeOrder.vue | 103 ++++++++++++++++++++++-------- 5 files changed, 174 insertions(+), 51 deletions(-) diff --git a/src/pages/deviceList/index.vue b/src/pages/deviceList/index.vue index 00f6b95..91081c4 100644 --- a/src/pages/deviceList/index.vue +++ b/src/pages/deviceList/index.vue @@ -38,6 +38,11 @@ onShow(() => { console.log(queryParams.value) fnGetDeviceList() } + uni.showShareMenu({ + title: '宁夏回收端', + menus: ['shareAppMessage', 'shareTimeline'], + path: '/pages/index/index', + }) }) // 微信 - 获取当前经纬度 const getLocationInfo = () => { diff --git a/src/pages/dzOrder/dzOrder.vue b/src/pages/dzOrder/dzOrder.vue index 35ef797..9afe059 100644 --- a/src/pages/dzOrder/dzOrder.vue +++ b/src/pages/dzOrder/dzOrder.vue @@ -49,7 +49,7 @@ const getUnitData = async () => { return } const params = { - mobilePhone: clientMobile.value + mobilePhone: clientMobile.value, } const res = await getUnitListAPI(params) unitList.value = res.data @@ -57,6 +57,14 @@ const getUnitData = async () => { onLoad(() => { getData() }) +// 获取坐标信息 +onShow(() => { + uni.showShareMenu({ + title: '宁夏回收端', + menus: ['shareAppMessage', 'shareTimeline'], + path: '/pages/index/index', + }) +}) // 计算金额 const sumVal = computed(() => { @@ -77,7 +85,7 @@ const sumVal = computed(() => { const priceChange = (item: any) => { const val = item.actualRecoveryPrice - item.recoveryPrice const num1 = Math.abs(val) - const percent = (Math.round(num1 / item.recoveryPrice * 10000) / 100).toFixed(); + const percent = (Math.round((num1 / item.recoveryPrice) * 10000) / 100).toFixed() if (percent > 10) { if (val < 0) { item.actualRecoveryPrice = Number(item.recoveryPrice * 0.9).toFixed(2) @@ -103,7 +111,7 @@ const handlePayment = async () => { return } const arrFlag = siteProductList.value.map((q) => { - const childFlag = q.children.some(q => { + const childFlag = q.children.some((q) => { return q?.productActualWeight && q?.actualRecoveryPrice }) return childFlag @@ -264,12 +272,23 @@ const popupDel = (idx) => { 手机号: - + 是否单位订单: - + 单位名称: @@ -284,14 +303,25 @@ const popupDel = (idx) => { {{ selectText }} - + - + - + @@ -304,12 +334,19 @@ const popupDel = (idx) => { 实际价格: - + 实际重量Kg: - {{ item2.productActualWeight }} + {{ + item2.productActualWeight + }} @@ -333,7 +370,12 @@ const popupDel = (idx) => { 第{{ index + 1 }}次称重: - + 删除 @@ -520,7 +562,7 @@ page { } .pay-action { - background: linear-gradient(143deg, #51B6FF 1%, #3775F6 92%); + background: linear-gradient(143deg, #51b6ff 1%, #3775f6 92%); width: 400rpx; margin: 20rpx auto 0; padding: 10rpx 0; @@ -562,7 +604,7 @@ page { color: #333; font-size: 32rpx; text-align: center; - background-color: #3775F6; + background-color: #3775f6; border-radius: 25rpx; color: #fff; } @@ -602,7 +644,7 @@ page { height: 60rpx; line-height: 60rpx; border-radius: 10rpx; - background: linear-gradient(143deg, #51B6FF 1%, #3775F6 92%); + background: linear-gradient(143deg, #51b6ff 1%, #3775f6 92%); color: #fff; text-align: center; margin: 40rpx auto 10rpx; diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index aa761c4..d692902 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -7,6 +7,14 @@ import { onReady, onShow } from '@dcloudio/uni-app' // 获取屏幕边界到安全区域距离 const orderAcceptPopup = ref() const memberStore = useMemberStore() +// 页面加载 +onShow(async () => { + uni.showShareMenu({ + title: '宁夏回收端', + menus: ['shareAppMessage', 'shareTimeline'], + path: '/pages/index/index', + }) +}) const isLogin = computed(() => { const token = memberStore.profile?.token @@ -49,18 +57,31 @@ const handleOrderAccept = (item: any) => {