mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2026-02-05 05:09:49 +08:00
uniapp【修复】(接龙模块):接龙列表点击立即接龙时优先判断是否登录
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<coreshop-page title="接龙" mode="left" bgColor="#D33123" titleColor="#fff">
|
<coreshop-page title="接龙" mode="left" bgColor="#D33123" titleColor="#fff" showLoginModalDom>
|
||||||
<view class="layout-solitaire-box">
|
<view class="layout-solitaire-box">
|
||||||
<view class="config-box">
|
<view class="config-box">
|
||||||
<image class="img" :src="shopConfigStore?.config?.shopLogo"></image>
|
<image class="img" :src="shopConfigStore?.config?.shopLogo"></image>
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
<view class="solitaire-list" v-if="state.list.length > 0">
|
<view class="solitaire-list" v-if="state.list.length > 0">
|
||||||
<view class="item-box" v-for="item in state.list" :key="item.id"
|
<view class="item-box" v-for="item in state.list" :key="item.id"
|
||||||
@click="handleRouteNavigateTo(`/pages/subpackage/activity/solitaire/detail/detail?id=${item.id}`)">
|
@click="handleBuyNowSolitaire(item.id)">
|
||||||
<coreshop-goods-card type="horizontal" imgHeight="200rpx" imgWidth="200rpx"
|
<coreshop-goods-card type="horizontal" imgHeight="200rpx" imgWidth="200rpx"
|
||||||
:goodsData="hanldeCombinationGoodsData(item)">
|
:goodsData="hanldeCombinationGoodsData(item)">
|
||||||
<template #goodPrice>
|
<template #goodPrice>
|
||||||
@@ -46,15 +46,18 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { reactive } from 'vue';
|
import { reactive } from 'vue';
|
||||||
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
|
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
|
||||||
import { handleStaticResources, handleRouteNavigateTo } from '@/core/utils';
|
import { handleRouteNavigateTo } from '@/core/utils';
|
||||||
import { querySolitaireList } from '@/core/api';
|
import { querySolitaireList } from '@/core/api';
|
||||||
import { PaymentTypeEnum, IsStartSeckillEnum, EmptyEnum } from '@/core/enum';
|
import { EmptyEnum } from '@/core/enum';
|
||||||
import { useShopConfigStore } from '@/core/store';
|
import { useShopConfigStore, useLoginStore } from '@/core/store';
|
||||||
import { timeFormat } from '@/uni_modules/uv-ui-tools/libs/function/index.js';
|
import { timeFormat } from '@/uni_modules/uv-ui-tools/libs/function/index.js';
|
||||||
|
|
||||||
// 获取项目配置
|
/** 获取项目配置 */
|
||||||
const shopConfigStore = useShopConfigStore();
|
const shopConfigStore = useShopConfigStore();
|
||||||
|
|
||||||
|
/** 登录store */
|
||||||
|
const _useLoginStore = useLoginStore();
|
||||||
|
|
||||||
const state = reactive<{
|
const state = reactive<{
|
||||||
page : number;
|
page : number;
|
||||||
limit : number;
|
limit : number;
|
||||||
@@ -117,6 +120,13 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 立即接龙 */
|
||||||
|
const handleBuyNowSolitaire = (id : number) => {
|
||||||
|
_useLoginStore.checkLogin(() => {
|
||||||
|
handleRouteNavigateTo(`/pages/subpackage/activity/solitaire/detail/detail?id=${id}`)
|
||||||
|
})
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import './list.scss';
|
@import './list.scss';
|
||||||
|
|||||||
Reference in New Issue
Block a user