baodeng_xcx/pages/index/index.vue
2025-08-19 17:02:49 +08:00

199 lines
4.5 KiB
Vue

<template>
<view class="page">
<u-navbar :is-back="false" title=" " :border-bottom="false" back-icon-color="000" :background="bgc"
title-color='#fff' title-size='36' height='44' id="navbar">
</u-navbar>
<image class="bj" src="https://api.ccttiot.com/smartmeter/img/static/uofu8p6fV4G4FF2Z9mgI" mode=""></image>
<!-- <view class="jilu neon-button" @click="btnbd(2)">
拼桌
</view>
<view class="jilu neon-button" style="top: 500rpx;" @click="btnbd(3)">
点单
</view> -->
<!-- <view class="jilu neon-button" style="top: 500rpx;" @click="btnqu">
取号
</view> -->
<view class="jilu neon-button" style="width: 82rpx;height: 82rpx;" @click="btnbd(4)">
<image src="https://api.ccttiot.com/smartmeter/img/static/umq8VInMClfdTFJcrcdL" mode=""></image>
</view>
<!-- <view class="jilu neon-button" style="top: 700rpx;" @click="btnbd(5)">
充值
</view>
<view class="boxpic">
<image class="bd" @click="btnbd(1)" src="https://api.ccttiot.com/smartmeter/img/static/uQdax0INyCWNnNqWXerD"
mode=""></image>
</view> -->
<view class="caozuo">
<image @click="btnbd(1)" src="https://api.ccttiot.com/smartmeter/img/static/uEqBcBUMOPqyoXsULOp6" mode=""></image>
<image @click="btnbd(2)" src="https://api.ccttiot.com/smartmeter/img/static/up59WN8jtClAX8e7VaBa" mode=""></image>
</view>
</view>
</template>
<script>
var xBlufi = require("@/components/blufi/xBlufi.js")
export default {
data() {
return {
bgc: {
backgroundColor: " ",
},
}
},
onLoad(option) {
if (uni.getStorageSync('type')) {
uni.removeStorageSync('type')
} else {
xBlufi.initXBlufi(1)
}
},
onShow() {
xBlufi.notifyStartDiscoverBle({
'isStart': true
})
},
methods: {
btnqu(){
uni.navigateTo({
url:'/page_shanghu/paidui/index'
})
},
// 点击提示暂无功能
btnwu() {
uni.showToast({
title: '当前功能暂未开放',
icon: 'none',
duration: 2000
})
},
// 点击跳转到爆灯
btnbd(num) {
this.$u.get(`/getInfo`).then(res => {
if (res.code == 200) {
if(num == 1){ //跳转爆灯
uni.navigateTo({
url: '/pages/myorder/index'
})
}else if(num == 2){ //跳转拼桌
uni.navigateTo({
url:'/page_user/pingzhuo/index'
})
}else if(num == 3){ //跳转点单
uni.navigateTo({
url:'/page_user/diandan/index'
})
}else if(num == 4){ //跳转VR
uni.navigateTo({
url:'/page_user/vr'
})
}else if(num == 5){ //跳转充值
uni.navigateTo({
url:'/page_user/chongzhi/index'
})
}
} else if (res.code == 401) {
uni.showModal({
title: '提示',
content: '你还未登录,是否去登录?',
success: function(res) {
if (res.confirm) {
console.log('用户点击确定')
uni.reLaunch({
url: '/pages/login/login'
})
} else if (res.cancel) {
console.log('用户点击取消')
}
}
})
}
})
},
}
}
</script>
<style lang="scss">
page {
background: #fff;
border-radius: 0rpx 0rpx 0rpx 0rpx;
}
.caozuo{
width: 100%;
height: 206rpx;
display: flex;
align-items: center;
justify-content: space-between;
position: fixed;
left: 50%;
transform: translateX(-50%);
bottom: 100rpx;
image{
width: 312rpx;
height: 206rpx;
}
padding: 0 48rpx;
box-sizing: border-box;
}
/deep/ .u-line-1 {
padding-bottom: 14rpx;
}
.neon-button {
position: relative;
background: linear-gradient(90deg, #FF00FF, #00FFFF);
background-size: 200% 100%;
animation: neonGradient 3s linear infinite;
border-radius: 50rpx;
box-shadow: 0 0 10rpx rgba(255, 0, 255, 0.5),
0 0 20rpx rgba(0, 255, 255, 0.5);
transition: all 0.3s ease;
&:active {
transform: scale(0.95);
box-shadow: 0 0 5rpx rgba(255, 0, 255, 0.3),
0 0 10rpx rgba(0, 255, 255, 0.3);
}
}
.jilu {
position: fixed;
right: 30rpx;
top: 220rpx;
// padding-top: 10rpx;
box-sizing: border-box;
}
.boxpic {
width: 500rpx;
margin: auto;
margin-top: 460rpx;
.bdpic {
width: 580rpx;
margin: auto;
display: flex;
justify-content: space-between;
margin-top: 14rpx;
image {
width: 274rpx;
height: 138rpx;
}
}
.bd {
width: 500rpx;
height: 200rpx;
margin-top: 500rpx;
}
}
.bj {
width: 760rpx;
height: 110vh;
position: fixed;
top: 0;
left: -10rpx;
z-index: -1;
}
</style>