Base Login

This commit is contained in:
ThienPhamVan
2026-03-25 10:06:01 +07:00
commit 3a2e16cf19
81 changed files with 27983 additions and 0 deletions

62
pages/welcome.vue Normal file
View File

@@ -0,0 +1,62 @@
<template>
<div>
<div class="columns is-centered mx-0 mt-2">
<div class="column is-10">
<Logo class="mb-5 pb-1"></Logo>
<p class="fs-16" v-if="login">Xin chào <b>{{ login.fullname }}</b><span v-if="packinfo? (packinfo.trialInfo==='active' || packinfo.buy) : false">. Sau đây gói dịch vụ quý khách <b>đang sử dụng</b></span>
</p>
<template v-if="login? login.type!==1 : false">
<Redirect class="mt-4"></Redirect>
</template>
<template v-else>
<AccessExtend v-if="extend"></AccessExtend>
<UserPack v-if="login" @info="getinfo"></UserPack>
<template v-if="packinfo">
<Redirect v-if="packinfo.trialInfo==='active' || packinfo.buy"></Redirect>
<template v-else>
<Redirect class="mb-3" v-if="packinfo.trialInfo==='no'"></Redirect>
<p class="mt-5 fs-16" v-if="packinfo.trialInfo==='expiry'">Quý khách vui lòng chọn <b>gói dịch vụ</b> để tiếp tục. Cảm ơn quý khách đã tin tưởng lựa chọn dịch vụ của chúng tôi</p>
<p class="mt-2 fs-16" v-else="packinfo.trialInfo==='expiry'">BigDataTechCloud cung cấp các gói dịch vụ như dưới dây, quý khách thể lựa chọn <b>dùng thử </b>để trải nghiệm sản phẩm hoặc <b>mua ngay</b>. Cảm ơn quý khách đã tin tưởng lựa chọn dịch vụ của chúng tôi</p>
<ServicePack v-bind="{packinfo: packinfo}"></ServicePack>
</template>
</template>
</template>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
packinfo: undefined,
expiry: undefined,
extend: false
}
},
// async created() {
// if(!this.login) return this.$router.push('/signin')
// let found = await this.$getdata('order', {user: this.login.id, payment_status__code: 'unpaid'}, undefined, true)
// if(found) return this.$router.push(`/service/order-info?id=${found.id}`)
// },
computed: {
login: {
get: function() {return this.$store.state.login},
set: function(val) {this.$store.commit('updateLogin', {login: val})}
}
},
methods: {
getinfo(v) {
if(this.login.type===1) {
let found = this.$find(this.$store.state.common, {category: 'system', classify: 'mode', code: 'status'})
if(found.detail==='dev') {
if(!(v.trialInfo==='active' || v.buy)) this.$router.push('/notice')
}
}
this.packinfo = v
if(v.trialInfo==='expiry' && !v.buy) this.extend = true
}
}
}
</script>