diff --git a/src/pages/apply/foreign-list.vue b/src/pages/apply/foreign-list.vue index 2b8b995..a35d7f8 100644 --- a/src/pages/apply/foreign-list.vue +++ b/src/pages/apply/foreign-list.vue @@ -88,7 +88,13 @@ const doCard = (v: any) => { 数量 {{ v.count }} - + + 已使用 + {{ v.useCount }} + + + + 有效期 {{ hooks.useTime(v.applyStartTime, " {y}-{m}-{d}") }} @@ -96,8 +102,7 @@ const doCard = (v: any) => { {{ hooks.useTime(v.applyEndTime, "{y}-{m}-{d}") }} - - + diff --git a/src/pages/apply/stride-items.vue b/src/pages/apply/stride-items.vue index e5a9a0c..98f2dcc 100644 --- a/src/pages/apply/stride-items.vue +++ b/src/pages/apply/stride-items.vue @@ -43,12 +43,12 @@ onShow(() => { v-for="(v, i) in pageHook.list" :key="i" @tap="hooks.usePreviewImage(v.code)"> - 未使用 - 已使用 + 未使用 + 已使用 {{ v.username }} - {{ v.userMobile }} + {{ v.userMobile }} diff --git a/src/pages/apply/stride-list.vue b/src/pages/apply/stride-list.vue index 1502690..1422acc 100644 --- a/src/pages/apply/stride-list.vue +++ b/src/pages/apply/stride-list.vue @@ -88,8 +88,12 @@ const doCard = (v: any) => { 数量 {{ v.count }} + + 已使用 + {{ v.useCount }} + - + diff --git a/src/pages/boxes/list.vue b/src/pages/boxes/list.vue index bb94ddd..c2c63e3 100644 --- a/src/pages/boxes/list.vue +++ b/src/pages/boxes/list.vue @@ -26,7 +26,7 @@ const state = reactive({ }) const pageRef = ref(null) -const pageHook = hooks.usePage(pageRef, boxesApi.page, null, 'data.list') +const pageHook = hooks.usePage(pageRef, boxesApi.page, null, 'data.records') const query = (page: number, pagesize: number) => { pageHook.startPage(page, pagesize, false, state.pa); } diff --git a/src/pages/merchant/detail.vue b/src/pages/merchant/detail.vue index c859e13..a2190af 100644 --- a/src/pages/merchant/detail.vue +++ b/src/pages/merchant/detail.vue @@ -1,393 +1,461 @@ \ No newline at end of file + diff --git a/src/pages/merchant/food.vue b/src/pages/merchant/food.vue index 611f7a1..2e07319 100644 --- a/src/pages/merchant/food.vue +++ b/src/pages/merchant/food.vue @@ -60,13 +60,13 @@ const initDate = () => { }) } state.dateList = list - state.pa.startTime = state.dateList[0].dateTime + state.pa.day = state.dateList[0].dateTime pageRef.value?.reload(false) } const doDateItem = (v: any, i: any) => { state.currentDateIndex = i - state.pa.startTime = state.dateList[i].dateTime + state.pa.day = state.dateList[i].dateTime pageRef.value.reload(true) } diff --git a/src/pages/tabbar/home.vue b/src/pages/tabbar/home.vue index edd34bb..500ca04 100644 --- a/src/pages/tabbar/home.vue +++ b/src/pages/tabbar/home.vue @@ -2,71 +2,92 @@ import { ref, reactive } from "vue"; import { onLoad, onShow } from "@dcloudio/uni-app"; -import { hooks, router } from "@@/index" -import { merchantApi } from "@@/api" +import { hooks, router } from "@@/index"; +import { merchantApi } from "@@/api"; -import { filePath } from "@@/utils/file" +import { filePath } from "@@/utils/file"; const state = reactive({ - pa: { - pagesize: 10, - type: '1' - } -}) - -onLoad(() => { - + pa: { + pagesize: 10, + type: "1", + }, }); + +onLoad(() => {}); onShow(() => { - if (pageRef.value) { - pageRef.value.reload(false) - } -}) + if (pageRef.value) { + pageRef.value.reload(false); + } +}); -const pageRef = ref(null) -const pageHook = hooks.usePage(pageRef, merchantApi.page, null, 'data.records') +const pageRef = ref(null); +const pageHook = hooks.usePage(pageRef, merchantApi.page, null, "data.records"); const query = (page: number, pagesize: number) => { - pageHook.startPage(page, pagesize, false, state.pa); -} + pageHook.startPage(page, pagesize, false, state.pa); +}; +const toDetail = async (v: any) => { + const isLogin = await hooks.useCheckLogin(); + if (isLogin) { + router.jump("/pages/merchant/detail", { id: v.id }); + } +}; - diff --git a/src/pages/tabbar/my.vue b/src/pages/tabbar/my.vue index 774930b..5f8f6b3 100644 --- a/src/pages/tabbar/my.vue +++ b/src/pages/tabbar/my.vue @@ -55,6 +55,8 @@ const getUserInfo = () => { const userStorage = uni.getStorageSync(userInfoKey); if (!isEmpty(userStorage)) { state.userInfo = userStorage; + console.log(state.userInfo,"state.userInfo"); + } }; @@ -97,7 +99,16 @@ const doLogin = async (loginType, token, accountId, sessionId) => { } }; +const toService = async (v:any)=>{ + const isLogin = await hooks.useCheckLogin(); + if(isLogin){ + router.jump(v.router) + } +} + const doLogout = async () => { + const isLogin = await hooks.useCheckLogin(); + if(!isLogin) return uni.showLoading({ title: "退出登录中...", mask: true, @@ -115,15 +126,15 @@ const doLogout = async () => {