Files
aishangjia-uniapp/pages/flash/index.vue
赵忠林 d66a8dfe8c feat(house): 优化房源区域选择及删除功能
- 保存按钮布局调整优化,提升用户体验
- 房源详情地区显示只展示市级,简化展示信息
- 地区选择器调整,只显示市,确保区域数据统一
- 删除房源操作添加确认弹窗,避免误删
- 省市区数据加载逻辑简化,使用固定城区列表替代异步接口请求
- 替换首页及闪屏logo图片,更新为新资源路径
- 隐藏房源详情页电话咨询按钮,暂不支持电话功能
- 代码格式和注释优化,提升代码可读性
2026-05-01 10:55:34 +08:00

160 lines
2.9 KiB
Vue

<template>
<view class="page-wrap">
<view class="main">
<view class="logo">
<image src="@/static/logo-chang.jpg" mode="widthFix"></image>
<!-- <image src="https://oss.jimeigroup.cn/static/flash-logo-text.png" mode="widthFix"></image> -->
<!-- <text class="logo-name">
爱尚家找房
</text> -->
</view>
<view class="btn" @click="onSkip">
<text>立即跳过({{ times }})</text>
</view>
</view>
<view class="bg"></view>
</view>
</template>
<script>
import storage from '@/utils/storage'
import {
ACCESS_TOKEN,
USER_ID,
USER_INFO
} from '@/store/mutation-types'
import {
getToken
} from '@/api/login.js'
// 倒计时时长(秒)
const times = 5
export default {
data() {
return {
times,
smsState: false
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options = {}) {
const refereeId = options.user_id
if(refereeId){
uni.setStorageSync('refereeId',refereeId)
}
this.checkLogin()
this.timer()
},
onShow() {
},
methods: {
// 执行定时器
timer() {
const app = this
app.smsState = false
if(uni.getStorageSync('skip')){
app.onLogin()
return;
}
const inter = setInterval(() => {
app.times = app.times - 1
if (app.times <= 0) {
app.smsState = true
app.times = 0
app.onLogin()
clearInterval(inter)
}
}, 1000)
},
checkLogin() {
const token = storage.get(ACCESS_TOKEN)
if (token) {
this.$navTo('pages/index/index')
}
},
// 1. 未登录则使用免密登录方式登录(游客身份)
onLogin() {
uni.reLaunch({
url: '/pages/index/index'
})
// const token = storage.get(ACCESS_TOKEN)
// if (!token) {
// getToken().then(res => {
// })
// }
},
onSkip(){
uni.setStorageSync('skip',true)
this.onLogin()
}
}
}
</script>
<style>
page{
background-color: #ffffff;
}
</style>
<style lang="scss" scoped>
.page{
min-height: 100vh;
background: linear-gradient(#47076b, #8d1a50);
}
.bg {
width: 750rpx;
height: 78vh;
// background: url('https://oss.jimeigroup.cn/static/login-bg01.png');
padding: 180rpx 0;
position: relative;
z-index: 0;
}
.main {
margin-top: 25vh;
position: fixed;
display: flex;
flex-direction: column;
justify-content: space-between;
width: 750rpx;
height: 900rpx;
z-index: 100;
.logo {
width: 750rpx;
margin: auto;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
image {
width: 300rpx;
}
.logo-name {
color: #ffffff;
font-size: 40rpx;
}
}
.btn {
width: 230rpx;
margin: auto;
padding: 20rpx 40rpx;
color: #ffffff;
font-size: 28rpx;
border-radius: 50rpx;
background: linear-gradient(#27b0fd, #3f72f4);
display: flex;
justify-content: center;
}
}
</style>