no message
Showing
2 changed files
with
21 additions
and
19 deletions
| ... | @@ -17,7 +17,7 @@ | ... | @@ -17,7 +17,7 @@ |
| 17 | <div v-loading="loading" class="box"> | 17 | <div v-loading="loading" class="box"> |
| 18 | <el-row :gutter="20"> | 18 | <el-row :gutter="20"> |
| 19 | <el-col v-for="(h,index) in list" :lg="24" :md="24" :sm="24" :xl="24" :xs="24" class="mb20"> | 19 | <el-col v-for="(h,index) in list" :lg="24" :md="24" :sm="24" :xl="24" :xs="24" class="mb20"> |
| 20 | <el-card @click="goDetail(h)"> | 20 | <el-card> |
| 21 | <!-- 酒店列表--> | 21 | <!-- 酒店列表--> |
| 22 | <el-row :gutter="20" align="middle" class="hotel"> | 22 | <el-row :gutter="20" align="middle" class="hotel"> |
| 23 | <el-col :lg="6" :md="6"> | 23 | <el-col :lg="6" :md="6"> |
| ... | @@ -45,7 +45,8 @@ | ... | @@ -45,7 +45,8 @@ |
| 45 | <div class="price">{{ language == 0 ? '¥' : '$' }}<span>{{ h.price }}</span> | 45 | <div class="price">{{ language == 0 ? '¥' : '$' }}<span>{{ h.price }}</span> |
| 46 | <i v-if="language==0">起</i> | 46 | <i v-if="language==0">起</i> |
| 47 | </div> | 47 | </div> |
| 48 | <el-button class="w200px blackBtn" round type="primary">{{ language == 0 ? '立即预订' : 'Select' }} ⇀ | 48 | <el-button @click="goDetail(h)" class="w200px blackBtn" round type="primary"> |
| 49 | {{ language == 0 ? '立即预订' : 'Select' }} ⇀ | ||
| 49 | </el-button> | 50 | </el-button> |
| 50 | </el-col> | 51 | </el-col> |
| 51 | </el-row> | 52 | </el-row> | ... | ... |
| ... | @@ -57,14 +57,10 @@ | ... | @@ -57,14 +57,10 @@ |
| 57 | </template> | 57 | </template> |
| 58 | 58 | ||
| 59 | <script setup> | 59 | <script setup> |
| 60 | import {useRouter} from "vue-router"; | ||
| 61 | |||
| 62 | const router = useRouter() | ||
| 63 | import OrderRemark from '@/viewsPc/components/orderRemark' | 60 | import OrderRemark from '@/viewsPc/components/orderRemark' |
| 64 | import AffixInvitation from '@/viewsPc/match/components/affix-invitation' | 61 | import AffixInvitation from '@/viewsPc/match/components/affix-invitation' |
| 65 | import MediaRegister from '@/viewsPc/components/mediaRegister.vue' | 62 | import MediaRegister from '@/viewsPc/components/mediaRegister.vue' |
| 66 | 63 | import {useRouter} from "vue-router"; | |
| 67 | const {proxy} = getCurrentInstance() | ||
| 68 | import {useStorage} from "@vueuse/core/index"; | 64 | import {useStorage} from "@vueuse/core/index"; |
| 69 | import {ElMessage} from "element-plus"; | 65 | import {ElMessage} from "element-plus"; |
| 70 | import {getCurrentInstance} from "@vue/runtime-core"; | 66 | import {getCurrentInstance} from "@vue/runtime-core"; |
| ... | @@ -73,6 +69,11 @@ import {getBaseInfoByActiveId} from "@/apiPc/booking"; | ... | @@ -73,6 +69,11 @@ import {getBaseInfoByActiveId} from "@/apiPc/booking"; |
| 73 | import * as match from "@/apiPc/match"; | 69 | import * as match from "@/apiPc/match"; |
| 74 | import useUserStore from "@/store/modules/user"; | 70 | import useUserStore from "@/store/modules/user"; |
| 75 | 71 | ||
| 72 | |||
| 73 | const router = useRouter() | ||
| 74 | const {proxy} = getCurrentInstance() | ||
| 75 | const useStore = useUserStore() | ||
| 76 | |||
| 76 | const emit = defineEmits(['pickUp']) | 77 | const emit = defineEmits(['pickUp']) |
| 77 | 78 | ||
| 78 | const props = defineProps({ | 79 | const props = defineProps({ |
| ... | @@ -146,8 +147,6 @@ function applyInvitation() { | ... | @@ -146,8 +147,6 @@ function applyInvitation() { |
| 146 | proxy.$refs['dialogInvitationRef'].open(obj) | 147 | proxy.$refs['dialogInvitationRef'].open(obj) |
| 147 | } | 148 | } |
| 148 | 149 | ||
| 149 | const user = useUserStore().user | ||
| 150 | |||
| 151 | function goMedia() { | 150 | function goMedia() { |
| 152 | // proxy.$modal.msgWarning(language.value == 0 ? '暂未开放' : 'Not yet open') | 151 | // proxy.$modal.msgWarning(language.value == 0 ? '暂未开放' : 'Not yet open') |
| 153 | // return; | 152 | // return; |
| ... | @@ -156,11 +155,12 @@ function goMedia() { | ... | @@ -156,11 +155,12 @@ function goMedia() { |
| 156 | return | 155 | return |
| 157 | } | 156 | } |
| 158 | //如果没登录 | 157 | //如果没登录 |
| 159 | if (!user) { | 158 | if (!useStore.user) { |
| 160 | ElMessage({ | 159 | // ElMessage({ |
| 161 | type: 'warning', | 160 | // type: 'warning', |
| 162 | message: language.value == 0 ? '请先登录' : 'Please login first', | 161 | // message: language.value == 0 ? '请先登录' : 'Please login first', |
| 163 | }) | 162 | // }) |
| 163 | useStore.setVisitor() | ||
| 164 | return | 164 | return |
| 165 | } | 165 | } |
| 166 | 166 | ||
| ... | @@ -186,11 +186,12 @@ function popRemark(type) { | ... | @@ -186,11 +186,12 @@ function popRemark(type) { |
| 186 | return | 186 | return |
| 187 | } | 187 | } |
| 188 | 188 | ||
| 189 | if (!user) { | 189 | if (!useStore.user) { |
| 190 | ElMessage({ | 190 | // ElMessage({ |
| 191 | type: 'warning', | 191 | // type: 'warning', |
| 192 | message: language.value == 0 ? '请先登录' : 'Please login first', | 192 | // message: language.value == 0 ? '请先登录' : 'Please login first', |
| 193 | }) | 193 | // }) |
| 194 | useStore.setVisitor() | ||
| 194 | return | 195 | return |
| 195 | } | 196 | } |
| 196 | 197 | ... | ... |
-
Please register or sign in to post a comment