From c3d84b87d3e071d57b54feba5f097983fcecf7c2 Mon Sep 17 00:00:00 2001 From: zmj <1493694146@qq.com> Date: Mon, 20 May 2024 16:37:11 +0800 Subject: [PATCH] add --- pages/index/index.vue | 18 +++++++++++------- pagesOrder/detail/detail.vue | 4 ++-- store/user.js | 4 ++-- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/pages/index/index.vue b/pages/index/index.vue index 4fcca90..2612d4c 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -6,7 +6,7 @@ </template> </up-navbar> <view class="navbar"> - <view style="width: 500rpx;"> + <view style="width: 400rpx;"> <up-search placeholder="请输入商品" @search="searchKeyword" @clear="searchKeyword" v-model="keyword" :showAction="false"></up-search> </view> @@ -14,6 +14,10 @@ <image src="@/static/tab/ba.png"></image> <text>购物车</text> </view> + <view class="nav-item" @click="navTo('/pagesOrder/order/order?type=0')"> + <image src="@/static/tab/ba.png"></image> + <text>我的订单</text> + </view> <view class="nav-item" @click="navTo('/pages/my/my')"> <image src="@/static/tab/ca.png"></image> <text>个人中心</text> @@ -297,13 +301,13 @@ const goodClassList = ref([]); // 一级分类 const goodClassTow = ref([]); // 二级分类 const goodClassThree = ref([]); // 三级分类 - const classMap = new Map(); + const classMap = new Map(); const getgoodClassList = (pid = 0) => { - let page_no = classMap.get(pid) || 1; - console.log(classMap.get(pid)); + let page_no = classMap.get(pid) || 1; + console.log(classMap.get(pid)); goodClassListApi({ pid: pid, - page_no: page_no, + page_no: page_no, page_size: 30 }).then(res => { if (pid == 0) { // 加载一级分类时设置全部分类 @@ -372,8 +376,8 @@ } }) } - page_no++; - classMap.set(pid, page_no); + page_no++; + classMap.set(pid, page_no); }) } diff --git a/pagesOrder/detail/detail.vue b/pagesOrder/detail/detail.vue index 338c95c..3459ca6 100644 --- a/pagesOrder/detail/detail.vue +++ b/pagesOrder/detail/detail.vue @@ -64,8 +64,8 @@ <view>¥{{item.sell}}</view> </view> <view class="tips"> - <view>{{item.goods_unit}}</view> - <view>x{{item.nums}}</view> + <view>{{}}</view> + <view>x{{item.nums+item.goods_unit}}</view> </view> <view class="time"> {{item.msg}} diff --git a/store/user.js b/store/user.js index 2ffdb86..07cc81e 100644 --- a/store/user.js +++ b/store/user.js @@ -25,7 +25,7 @@ const useUserStore = defineStore("user", () => { // #ifdef H5 - token.value = "356b6f0615184692de99df42b9329749" + token.value = "0bb8817664d817e9e881500cc2631ef8" // token.value = "95b24dd6d2dda836fe07854b08ba0944" userInfo.value = { avatar: "https://lihaiim.oss-cn-chengdu.aliyuncs.com/image/admin/default_avatar.png", @@ -35,7 +35,7 @@ const useUserStore = defineStore("user", () => { mobile: "19330904744", nickname: "用户1714964250", supplier: null, - token: "356b6f0615184692de99df42b9329749" + token: "0bb8817664d817e9e881500cc2631ef8" } // #endif