|
@@ -106,7 +106,7 @@ import { useRoute, useRouter } from "vue-router"
|
|
|
import { useStore } from "vuex"
|
|
|
import StartUp from '@/components/StartUp.vue'
|
|
|
import FeedBack from "@/components/FeedBack.vue"
|
|
|
-import { ElMessage } from 'element-plus'
|
|
|
+import { ElMessageBox } from 'element-plus'
|
|
|
|
|
|
const route = useRoute()
|
|
|
const router = useRouter()
|
|
@@ -124,16 +124,41 @@ if (store.state.loginStatus === store.getters.loginStatusEnum.notLogin && route.
|
|
|
|
|
|
const isShowFeedBack = ref(false)
|
|
|
function onClickFeedBack() {
|
|
|
- // if (store.state.loginStatus === store.getters.loginStatusEnum.wxUser) {
|
|
|
- isShowFeedBack.value = true
|
|
|
- // } else {
|
|
|
- // ElMessage('需登录后才能体验')
|
|
|
- // }
|
|
|
+ if (store.state.loginStatus === store.getters.loginStatusEnum.wxUser) {
|
|
|
+ isShowFeedBack.value = true
|
|
|
+ } else {
|
|
|
+ ElMessageBox.confirm(
|
|
|
+ '需登录后才能体验',
|
|
|
+ '提示',
|
|
|
+ {
|
|
|
+ confirmButtonText: '去登录',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'message',
|
|
|
+ }
|
|
|
+ ).then(() => {
|
|
|
+ isShowFeedBack.value = true
|
|
|
+ }).catch(() => {
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
function onClickShop() {
|
|
|
- // todo: 要求登录
|
|
|
- router.push({ name: 'ShopView' })
|
|
|
+ if (store.state.loginStatus === store.getters.loginStatusEnum.wxUser) {
|
|
|
+ isShowFeedBack.value = true
|
|
|
+ } else {
|
|
|
+ ElMessageBox.confirm(
|
|
|
+ '需登录后才能体验',
|
|
|
+ '提示',
|
|
|
+ {
|
|
|
+ confirmButtonText: '去登录',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'message',
|
|
|
+ }
|
|
|
+ ).then(() => {
|
|
|
+ isShowFeedBack.value = true
|
|
|
+ }).catch(() => {
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
</script>
|
|
|
|