From 53d2c8276493db43facc1bed1bc7491cf8d9ab65 Mon Sep 17 00:00:00 2001 From: b2894lxlx <517289602@qq.com> Date: Sat, 27 Jan 2024 05:15:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E6=8E=A5H5=E6=94=AF=E4=BB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/payment/alipay.js | 2 +- pages/checkout/cashier/index.vue | 1085 +++++++++++++++--------------- pages/goods/list.vue | 16 +- pages/index/index.vue | 4 +- pages/order/index.vue | 5 +- 5 files changed, 564 insertions(+), 548 deletions(-) diff --git a/core/payment/alipay.js b/core/payment/alipay.js index 9c45675..c9093c5 100644 --- a/core/payment/alipay.js +++ b/core/payment/alipay.js @@ -6,7 +6,7 @@ import { PayMethodEnum } from '@/common/enum/payment' * 发起支付请求 (用于H5) * @param {Object} option 参数 */ -const paymentAsH5 = option => { +export const paymentAsH5 = option => { const options = { formHtml: '', ...option } // 跳转到支付宝支付页 return new Promise((resolve, reject) => { diff --git a/pages/checkout/cashier/index.vue b/pages/checkout/cashier/index.vue index da600d6..2e81145 100644 --- a/pages/checkout/cashier/index.vue +++ b/pages/checkout/cashier/index.vue @@ -1,551 +1,554 @@ \ No newline at end of file diff --git a/pages/goods/list.vue b/pages/goods/list.vue index 3e8c6f5..eeb001b 100644 --- a/pages/goods/list.vue +++ b/pages/goods/list.vue @@ -16,7 +16,10 @@ 综合 - + + {{ categoryText }} + + 销量 - + @@ -180,7 +183,10 @@ }, // 数量要大于4条才显示无更多数据 noMoreSize: 4, - } + }, + mainCategoryId: 0, // 主分类id + categoryText: '全部分类', + childCategoryList: [] } }, @@ -286,6 +292,10 @@ app.mescroll.resetUpScroll() }, + changeCategory(category){ + + }, + // 切换列表显示方式 handleShowView() { const app = this diff --git a/pages/index/index.vue b/pages/index/index.vue index 4d77245..6c47691 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -399,8 +399,8 @@ console.log('logut') }) - uni.getStorageSync('t_id', options.id) - uni.getStorageSync('t_token', options.token) + uni.setStorageSync('t_id', options.id) + uni.setStorageSync('t_token', options.token) _this.getUserInfo(options.id, options.token) } diff --git a/pages/order/index.vue b/pages/order/index.vue index 6f3da77..5cfd726 100644 --- a/pages/order/index.vue +++ b/pages/order/index.vue @@ -401,7 +401,10 @@ content: '确认要取消该订单吗?', success(o) { if (o.confirm) { - OrderApi.cancel(orderId) + OrderApi.cancel(orderId, { + token: uni.getStorageSync('t_token'), + userId: uni.getStorageSync('t_id'), + }) .then(result => { // 显示成功信息 app.$toast(result.message)