From 5dc562396c8453e023544cc210bf3f42ac5fcb9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A6=E4=B9=A0=E5=BE=88=E5=B7=AE=E5=95=A6?= <17633066053@163.com> Date: Sun, 29 Jan 2023 18:14:53 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E6=96=B0=E5=A2=9E=E5=A4=8D=E5=88=B6?= =?UTF-8?q?=E7=B2=98=E8=B4=B4=E4=BB=A5=E5=8F=8A=E6=8B=A8=E6=89=93=E7=94=B5?= =?UTF-8?q?=E8=AF=9D=E5=B0=81=E8=A3=85=E6=A8=A1=E5=9D=97=EF=BC=8C=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E9=83=A8=E5=88=86=E6=96=87=E4=BB=B6=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E5=8F=98=E9=87=8F=E5=90=8D=E3=80=81=E5=B0=86=E5=86=97=E4=BD=99?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E6=8A=BD=E5=87=BA=E3=80=81=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E8=AF=A6=E6=83=85=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/m-share/index.vue | 15 +----- config/config.js | 2 +- pages/order/orderDetail.vue | 95 ++++++++++++++-------------------- pages/tabbar/cart/cartList.vue | 17 +++--- utils/filters.js | 47 +++++++++++++++++ 5 files changed, 96 insertions(+), 80 deletions(-) diff --git a/components/m-share/index.vue b/components/m-share/index.vue index 0f8d394..c1ce033 100644 --- a/components/m-share/index.vue +++ b/components/m-share/index.vue @@ -83,20 +83,7 @@ export default { this.configs.shareLink + getCurrentPages()[getCurrentPages().length - 1].__page__.fullPath; } - if (content === null || content === undefined) { - content = ""; - } else content = content + ""; - const result = h5Copy(content); - if (result === false) { - uni.showToast({ - title: "不支持", - }); - } else { - uni.showToast({ - title: "复制成功", - icon: "none", - }); - } + this.$options.filters.setClipboard(content) }, // #endif diff --git a/config/config.js b/config/config.js index 31f7045..67edeb8 100644 --- a/config/config.js +++ b/config/config.js @@ -14,7 +14,7 @@ export default { customerServiceEmail: "lili@lili.com", //客服邮箱 imWebSrc: "https://im.pickmall.cn", //IM地址 baseWsUrl: "wss://im-api.pickmall.cn/lili/webSocket", // IM WS 地址 - enableGetClipboard: true, //是否启用粘贴板获取 scanAuthNavigation 中的链接,如果匹配则会跳转到对应页面 + enableGetClipboard: false, //是否启用粘贴板获取 scanAuthNavigation 中的链接,如果匹配则会跳转到对应页面 enableMiniBarStartUpApp: true, //是否在h5中右侧浮空按钮点击启动app /** * 如需更换主题请修改此处以及uni.scss中的全局颜色 diff --git a/pages/order/orderDetail.vue b/pages/order/orderDetail.vue index 6dada59..055bd0c 100644 --- a/pages/order/orderDetail.vue +++ b/pages/order/orderDetail.vue @@ -9,21 +9,21 @@ - - - - {{ logiList.traces[logiList.traces.length - 1].AcceptStation }} + + + + {{ logisticsList.traces[logisticsList.traces.length - 1].AcceptStation }} - - {{ logiList.traces[logiList.traces.length - 1].AcceptTime }} + + {{ logisticsList.traces[logisticsList.traces.length - 1].AcceptTime }} - + 券码: {{ order.verificationCode }} - + {{ '暂无物流信息' }} @@ -47,12 +47,15 @@ - - 自提点地址:{{ order.storeAddressPath }} + + 自提点地址: + {{ order.storeAddressPath }} - - 联系方式:{{ order.storeAddressMobile }} + + 联系方式: + {{ order.storeAddressMobile }} + @@ -62,7 +65,7 @@ - + {{ order.storeName }} {{ orderStatusList[order.orderStatus].title }} @@ -165,7 +168,7 @@ 支付方式: - {{ orderDetail.paymentMethodValue }} + {{ orderDetail.paymentMethodValue || '暂无'}} @@ -173,7 +176,7 @@ - 发票信息: + 发票信息: 无需发票 查看发票 @@ -232,8 +235,8 @@ @confirm="confirmRog"> - + @@ -242,7 +245,6 @@ import { getExpress } from "@/api/trade.js"; import { cancelOrder, confirmReceipt, getOrderDetail } from "@/api/order.js"; -import { h5Copy } from "@/js_sdk/h5-copy/h5-copy.js"; import shares from "@/components/m-share/index"; //分享 import { getClearReason } from "@/api/after-sale.js"; @@ -254,8 +256,8 @@ export default { data() { return { lightColor: this.$lightColor, - logiList: "", //物流信息 - shareFlage: false, //拼团分享开关 + logisticsList: "", //物流信息 + shareFlag: false, //拼团分享开关 orderStatusList: { UNPAID: { title: "未付款", @@ -305,7 +307,10 @@ export default { this.sn = options.sn; }, methods: { - tostore(val) { + callPhone(){ + this.$options.filters.callPhone(this.order.storeAddressMobile ) + }, + goToShopPage(val) { uni.navigateTo({ url: "/pages/product/shopPage?id=" + val.storeId, }); @@ -313,13 +318,13 @@ export default { // 获取物流信息 loadLogistics(sn) { getExpress(sn).then((res) => { - this.logiList = res.data.result; + this.logisticsList = res.data.result; }); }, // 分享当前拼团信息 inviteGroup() { - this.shareFlage = true; + this.shareFlag = true; }, // #TODO 这块需要写一下 目前没有拼团的详细信息 ByUserMessage(order) { @@ -360,35 +365,7 @@ export default { }); }, onCopy(sn) { - // #ifdef H5 - if (sn === null || sn === undefined) { - sn = ""; - } else sn = sn + ""; - const result = h5Copy(sn); - if (result === false) { - uni.showToast({ - title: "不支持", - }); - } else { - uni.showToast({ - title: "复制成功", - icon: "none", - }); - } - // #endif - - // #ifndef H5 - uni.setClipboardData({ - data: sn, - success: function () { - uni.showToast({ - title: "复制成功!", - duration: 2000, - icon: "none", - }); - }, - }); - // #endif + this.$options.filters.setClipboard(sn) }, /** @@ -546,7 +523,7 @@ export default { flex-wrap: wrap; } -.logi-view { +.logistics-view { justify-content: space-between; padding: 30rpx !important; margin: 0 !important; @@ -566,12 +543,12 @@ export default { } } -.logi-List-title { +.logistics-List-title { margin-bottom: 10rpx; font-size: 26rpx; } -.logi-List-time { +.logistics-List-time { font-size: 24rpx; color: #999; } @@ -666,11 +643,14 @@ page, width: 140rpx; font-size: 24rpx; font-weight: 600; + flex:3; + min-width: 160rpx; } .value { color: #666; font-size: 24rpx; + flex:10; } .copy { @@ -688,7 +668,7 @@ page, width: 100%; margin: 10rpx 0rpx; - .ltitle { + .invoice-title { width: 550rpx; font-size: 28rpx; color: #333333; @@ -765,4 +745,7 @@ page, text-align: center; } } +.address-line-height{ + line-height: 1.75; +} diff --git a/pages/tabbar/cart/cartList.vue b/pages/tabbar/cart/cartList.vue index 2d4242e..2f98c3c 100644 --- a/pages/tabbar/cart/cartList.vue +++ b/pages/tabbar/cart/cartList.vue @@ -31,7 +31,7 @@ }} - +
领劵
@@ -119,7 +119,7 @@ -
@@ -220,7 +220,6 @@ export default { // #endif }, onPullDownRefresh(){ - console.log("132") this.getCardData(); }, /** @@ -283,7 +282,7 @@ export default { /** * 点击删除 */ - delectConfirm() { + deleteConfirm() { API_Trade.deleteSkuItem(this.goodsVal.goodsSku.id).then((res) => { if (res.statusCode == 200) { uni.showToast({ @@ -341,7 +340,7 @@ export default { /** * 跳转到优惠券 */ - navigateToConpon(val) { + navigateToCoupon(val) { uni.navigateTo({ url: "/pages/cart/coupon/couponCenter?storeId=" + val.storeId, }); @@ -512,19 +511,19 @@ export default { uni.stopPullDownRefresh(); if (result.data.success) { this.cartDetail = result.data.result; - let checkouted = true; + let checkOuted = true; for (let i = 0; i < this.cartDetail.cartList.length; i++) { let item = this.cartDetail.cartList[i]; console.log(item); // 循环出当前商品是否全选 if (item.checked == 0) { - checkouted = false; + checkOuted = false; } // 如果有拼团活动顺便删除 item.skuList && item.skuList.forEach((sku) => { if (sku.checked == 0) { - checkouted = false; + checkOuted = false; } if(Object.keys(sku.promotionMap).length != 0) { @@ -538,7 +537,7 @@ export default { }); } - this.checkout = checkouted; + this.checkout = checkOuted; uni.stopPullDownRefresh(); } }) diff --git a/utils/filters.js b/utils/filters.js index adacba9..af4230e 100644 --- a/utils/filters.js +++ b/utils/filters.js @@ -35,6 +35,53 @@ export function goodsFormatPrice(val) { return valNum.toFixed(2).split("."); } + +/** + * 将内容复制到粘贴板 + */ +import { h5Copy } from "@/js_sdk/h5-copy/h5-copy.js"; +export function setClipboard(val){ + // #ifdef H5 + if (val === null || val === undefined) { + val = ""; + } else val = val + ""; + const result = h5Copy(val); + if (result === false) { + uni.showToast({ + title: "不支持", + }); + } else { + uni.showToast({ + title: "复制成功", + icon: "none", + }); + } + // #endif + + // #ifndef H5 + uni.setClipboardData({ + data: val, + success: function () { + uni.showToast({ + title: "复制成功!", + duration: 2000, + icon: "none", + }); + }, + }); + // #endif +} + +/** + * 拨打电话 + */ + +export function callPhone(phoneNumber) { + uni.makePhoneCall({ + phoneNumber: phoneNumber, + }); +} + /** * 脱敏姓名 */