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